diff options
author | Khem Raj <raj.khem@gmail.com> | 2011-03-31 19:33:37 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2011-03-31 19:36:46 -0700 |
commit | aacf3bff8de14bf01ddfa059f4e9b360f59df43c (patch) | |
tree | a366c16c12e5b72408e008b86d9a5060a7ece1ec /meta-oe/recipes-core/proxy-libintl | |
parent | 0781931dc3d599af1e77937f75777ab01ad84447 (diff) | |
download | meta-openembedded-aacf3bff8de14bf01ddfa059f4e9b360f59df43c.tar.gz |
proxy-libintl: Bring in recipes from OE
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-core/proxy-libintl')
4 files changed, 165 insertions, 0 deletions
diff --git a/meta-oe/recipes-core/proxy-libintl/proxy-libintl-20080418/create-as-shared-lib.patch b/meta-oe/recipes-core/proxy-libintl/proxy-libintl-20080418/create-as-shared-lib.patch new file mode 100644 index 000000000..306e3b821 --- /dev/null +++ b/meta-oe/recipes-core/proxy-libintl/proxy-libintl-20080418/create-as-shared-lib.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | --- a/src/proxy-libintl/Makefile.org 2009-09-12 23:19:04.989421607 -0700 | ||
2 | +++ a/src/proxy-libintl/Makefile 2009-09-12 23:21:14.100640001 -0700 | ||
3 | @@ -4,20 +4,20 @@ ZIPFILE = proxy-libintl-$(TIMESTAMP).zip | ||
4 | CC = gcc | ||
5 | CFLAGS = -Wall -I ../../include | ||
6 | |||
7 | -all : ../../lib/libintl.a ../../lib/intl.lib | ||
8 | +all : ../../lib/libintl.so ../../lib/intl.lib | ||
9 | |||
10 | -../../lib/libintl.a : libintl.o | ||
11 | - ar rc $@ libintl.o | ||
12 | +../../lib/libintl.so : libintl.o | ||
13 | + $(CC) -shared -o $@ libintl.o | ||
14 | |||
15 | -../../lib/intl.lib : ../../lib/libintl.a | ||
16 | - cp ../../lib/libintl.a $@ | ||
17 | - strip --strip-unneeded $@ | ||
18 | +../../lib/intl.lib : ../../lib/libintl.so | ||
19 | + cp ../../lib/libintl.so $@ | ||
20 | + $(STRIP) --strip-unneeded $@ | ||
21 | |||
22 | libintl.o : libintl.c | ||
23 | $(CC) $(CFLAGS) -c libintl.c | ||
24 | |||
25 | clean : | ||
26 | - rm -f *.o ../../lib/libintl.a ../../$(ZIPFILE) | ||
27 | + rm -f *.o ../../lib/libintl.so ../../$(ZIPFILE) | ||
28 | |||
29 | dist : clean all | ||
30 | - cd ../..; zip $(ZIPFILE) include/libintl.h lib/{libintl.a,intl.lib} src/proxy-libintl/{README.txt,COPYING.LIB.txt,Makefile,libintl.[ch]}; manifestify $(ZIPFILE) | ||
31 | + cd ../..; zip $(ZIPFILE) include/libintl.h lib/{libintl.so,intl.lib} src/proxy-libintl/{README.txt,COPYING.LIB.txt,Makefile,libintl.[ch]}; manifestify $(ZIPFILE) | ||
diff --git a/meta-oe/recipes-core/proxy-libintl/proxy-libintl-20080418/soname.patch b/meta-oe/recipes-core/proxy-libintl/proxy-libintl-20080418/soname.patch new file mode 100644 index 000000000..0df232d25 --- /dev/null +++ b/meta-oe/recipes-core/proxy-libintl/proxy-libintl-20080418/soname.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Index: proxy-libintl-20080418-r6/src/proxy-libintl/Makefile | ||
2 | =================================================================== | ||
3 | --- proxy-libintl-20080418-r6.orig/src/proxy-libintl/Makefile 2010-07-25 08:40:22.893620001 -0700 | ||
4 | +++ proxy-libintl-20080418-r6/src/proxy-libintl/Makefile 2010-07-25 10:51:29.573620000 -0700 | ||
5 | @@ -6,16 +6,13 @@ CFLAGS = -Wall -I ../../include | ||
6 | |||
7 | all : ../../lib/libintl.so ../../lib/intl.lib | ||
8 | |||
9 | -../../lib/libintl.so : libintl.o | ||
10 | - $(CC) -shared -o $@ libintl.o | ||
11 | +../../lib/libintl.so : libintl.c | ||
12 | + $(CC) $(CFLAGS) -shared -Wl,-soname -Wl,libintl.so -o $@ $< | ||
13 | |||
14 | ../../lib/intl.lib : ../../lib/libintl.so | ||
15 | cp ../../lib/libintl.so $@ | ||
16 | $(STRIP) --strip-unneeded $@ | ||
17 | |||
18 | -libintl.o : libintl.c | ||
19 | - $(CC) $(CFLAGS) -c libintl.c | ||
20 | - | ||
21 | clean : | ||
22 | rm -f *.o ../../lib/libintl.so ../../$(ZIPFILE) | ||
23 | |||
diff --git a/meta-oe/recipes-core/proxy-libintl/proxy-libintl-20080418/stub-only.patch b/meta-oe/recipes-core/proxy-libintl/proxy-libintl-20080418/stub-only.patch new file mode 100644 index 000000000..7186b13c0 --- /dev/null +++ b/meta-oe/recipes-core/proxy-libintl/proxy-libintl-20080418/stub-only.patch | |||
@@ -0,0 +1,72 @@ | |||
1 | Index: proxy-libintl/src/proxy-libintl/libintl.c | ||
2 | =================================================================== | ||
3 | --- proxy-libintl.orig/src/proxy-libintl/libintl.c | ||
4 | +++ proxy-libintl/src/proxy-libintl/libintl.c | ||
5 | @@ -18,9 +18,12 @@ | ||
6 | */ | ||
7 | |||
8 | #ifdef _WIN32 | ||
9 | -#include <windows.h> | ||
10 | +# include <windows.h> | ||
11 | #else | ||
12 | -#include <dlfcn.h> | ||
13 | +# include <stddef.h> | ||
14 | +# if !STUB_ONLY | ||
15 | +# include <dlfcn.h> | ||
16 | +# endif | ||
17 | typedef void* HMODULE; | ||
18 | #endif | ||
19 | |||
20 | @@ -65,11 +68,13 @@ static char * (*p_bind_textdomain_codese | ||
21 | static int | ||
22 | use_intl_dll (HMODULE dll) | ||
23 | { | ||
24 | -#ifdef _WIN32 | ||
25 | -#define LOOKUP(fn) p_##fn = (void *) GetProcAddress (dll, #fn); if (p_##fn == NULL) return 0 | ||
26 | -#else | ||
27 | -#define LOOKUP(fn) p_##fn = (void *) dlsym (dll, #fn); if (p_##fn == NULL) return 0 | ||
28 | -#endif | ||
29 | +#if !STUB_ONLY | ||
30 | +# ifdef _WIN32 | ||
31 | +# define LOOKUP(fn) p_##fn = (void *) GetProcAddress (dll, #fn); if (p_##fn == NULL) return 0 | ||
32 | +# else | ||
33 | +# define LOOKUP(fn) p_##fn = (void *) dlsym (dll, #fn); if (p_##fn == NULL) return 0 | ||
34 | +# endif /* _WIN32 */ | ||
35 | + | ||
36 | |||
37 | LOOKUP (gettext); | ||
38 | LOOKUP (dgettext); | ||
39 | @@ -82,7 +87,7 @@ use_intl_dll (HMODULE dll) | ||
40 | LOOKUP (bind_textdomain_codeset); | ||
41 | |||
42 | #undef LOOKUP | ||
43 | - | ||
44 | +#endif /* !STUB_ONLY */ | ||
45 | return 1; | ||
46 | } | ||
47 | |||
48 | @@ -171,13 +176,17 @@ setup (void) | ||
49 | |||
50 | if (!beenhere) | ||
51 | { | ||
52 | -#ifdef _WIN32 | ||
53 | - HMODULE intl_dll = LoadLibrary ("intl.dll"); | ||
54 | -#elif defined(__APPLE__) && defined(__MACH__) | ||
55 | - HMODULE intl_dll = dlopen ("libintl.dylib", RTLD_LAZY); | ||
56 | -#else | ||
57 | - HMODULE intl_dll = dlopen ("libintl.so", RTLD_LAZY); | ||
58 | -#endif | ||
59 | +#if !STUB_ONLY | ||
60 | +# ifdef _WIN32 | ||
61 | + HMODULE intl_dll = LoadLibrary ("intl.dll"); | ||
62 | +# elif defined(__APPLE__) && defined(__MACH__) | ||
63 | + HMODULE intl_dll = dlopen ("libintl.dylib", RTLD_LAZY); | ||
64 | +# else | ||
65 | + HMODULE intl_dll = dlopen ("libintl.so", RTLD_LAZY); | ||
66 | +# endif | ||
67 | +#else /* !STUB_ONLY */ | ||
68 | + HMODULE intl_dll = NULL; | ||
69 | +#endif /* STUB_ONLY */ | ||
70 | |||
71 | if (intl_dll != NULL && | ||
72 | use_intl_dll (intl_dll)) | ||
diff --git a/meta-oe/recipes-core/proxy-libintl/proxy-libintl_20080418.bb b/meta-oe/recipes-core/proxy-libintl/proxy-libintl_20080418.bb new file mode 100644 index 000000000..fbdf76a44 --- /dev/null +++ b/meta-oe/recipes-core/proxy-libintl/proxy-libintl_20080418.bb | |||
@@ -0,0 +1,39 @@ | |||
1 | DESCRIPTION = "Proxy libintl" | ||
2 | HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/" | ||
3 | SECTION = "libs" | ||
4 | LICENSE = "LGPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://src/proxy-libintl/COPYING.LIB.txt;md5=bc400bc21422f9a92e76ec2c5167ca2e" | ||
6 | |||
7 | PR = "r7" | ||
8 | PROVIDES = "virtual/libintl" | ||
9 | |||
10 | SRC_URI = " \ | ||
11 | http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/${PN}-${PV}.zip \ | ||
12 | file://stub-only.patch \ | ||
13 | file://create-as-shared-lib.patch \ | ||
14 | file://soname.patch \ | ||
15 | " | ||
16 | |||
17 | S = "${WORKDIR}" | ||
18 | FILES_${PN}-dev = "${includedir}/libintl.h ${libdir}/libintl.a" | ||
19 | FILES_${PN} = "${libdir}/libintl.so" | ||
20 | |||
21 | CFLAGS_append = " -fPIC -Wall -I ../../include ${@['-DSTUB_ONLY', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']}" | ||
22 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
23 | |||
24 | do_compile() { | ||
25 | cd ${WORKDIR}/src/proxy-libintl | ||
26 | oe_runmake | ||
27 | } | ||
28 | |||
29 | do_install() { | ||
30 | install -d ${D}/${includedir} | ||
31 | install -m 0644 ${WORKDIR}/include/libintl.h ${D}/${includedir} | ||
32 | |||
33 | install -d ${D}/${libdir} | ||
34 | oe_libinstall -a -so -C lib libintl ${D}/${libdir} | ||
35 | } | ||
36 | |||
37 | |||
38 | SRC_URI[md5sum] = "63047fcbe5ff853db0d04981dd9f1888" | ||
39 | SRC_URI[sha256sum] = "b8519dfd77939b23ca599a724b536f48340f2c795552aa2a600155230571141c" | ||