proxy-libintl: Bring in recipes from OE

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2011-03-31 19:33:37 -07:00
parent 0781931dc3
commit aacf3bff8d
4 changed files with 165 additions and 0 deletions

View File

@ -0,0 +1,31 @@
--- a/src/proxy-libintl/Makefile.org 2009-09-12 23:19:04.989421607 -0700
+++ a/src/proxy-libintl/Makefile 2009-09-12 23:21:14.100640001 -0700
@@ -4,20 +4,20 @@ ZIPFILE = proxy-libintl-$(TIMESTAMP).zip
CC = gcc
CFLAGS = -Wall -I ../../include
-all : ../../lib/libintl.a ../../lib/intl.lib
+all : ../../lib/libintl.so ../../lib/intl.lib
-../../lib/libintl.a : libintl.o
- ar rc $@ libintl.o
+../../lib/libintl.so : libintl.o
+ $(CC) -shared -o $@ libintl.o
-../../lib/intl.lib : ../../lib/libintl.a
- cp ../../lib/libintl.a $@
- strip --strip-unneeded $@
+../../lib/intl.lib : ../../lib/libintl.so
+ cp ../../lib/libintl.so $@
+ $(STRIP) --strip-unneeded $@
libintl.o : libintl.c
$(CC) $(CFLAGS) -c libintl.c
clean :
- rm -f *.o ../../lib/libintl.a ../../$(ZIPFILE)
+ rm -f *.o ../../lib/libintl.so ../../$(ZIPFILE)
dist : clean all
- cd ../..; zip $(ZIPFILE) include/libintl.h lib/{libintl.a,intl.lib} src/proxy-libintl/{README.txt,COPYING.LIB.txt,Makefile,libintl.[ch]}; manifestify $(ZIPFILE)
+ cd ../..; zip $(ZIPFILE) include/libintl.h lib/{libintl.so,intl.lib} src/proxy-libintl/{README.txt,COPYING.LIB.txt,Makefile,libintl.[ch]}; manifestify $(ZIPFILE)

View File

@ -0,0 +1,23 @@
Index: proxy-libintl-20080418-r6/src/proxy-libintl/Makefile
===================================================================
--- proxy-libintl-20080418-r6.orig/src/proxy-libintl/Makefile 2010-07-25 08:40:22.893620001 -0700
+++ proxy-libintl-20080418-r6/src/proxy-libintl/Makefile 2010-07-25 10:51:29.573620000 -0700
@@ -6,16 +6,13 @@ CFLAGS = -Wall -I ../../include
all : ../../lib/libintl.so ../../lib/intl.lib
-../../lib/libintl.so : libintl.o
- $(CC) -shared -o $@ libintl.o
+../../lib/libintl.so : libintl.c
+ $(CC) $(CFLAGS) -shared -Wl,-soname -Wl,libintl.so -o $@ $<
../../lib/intl.lib : ../../lib/libintl.so
cp ../../lib/libintl.so $@
$(STRIP) --strip-unneeded $@
-libintl.o : libintl.c
- $(CC) $(CFLAGS) -c libintl.c
-
clean :
rm -f *.o ../../lib/libintl.so ../../$(ZIPFILE)

View File

@ -0,0 +1,72 @@
Index: proxy-libintl/src/proxy-libintl/libintl.c
===================================================================
--- proxy-libintl.orig/src/proxy-libintl/libintl.c
+++ proxy-libintl/src/proxy-libintl/libintl.c
@@ -18,9 +18,12 @@
*/
#ifdef _WIN32
-#include <windows.h>
+# include <windows.h>
#else
-#include <dlfcn.h>
+# include <stddef.h>
+# if !STUB_ONLY
+# include <dlfcn.h>
+# endif
typedef void* HMODULE;
#endif
@@ -65,11 +68,13 @@ static char * (*p_bind_textdomain_codese
static int
use_intl_dll (HMODULE dll)
{
-#ifdef _WIN32
-#define LOOKUP(fn) p_##fn = (void *) GetProcAddress (dll, #fn); if (p_##fn == NULL) return 0
-#else
-#define LOOKUP(fn) p_##fn = (void *) dlsym (dll, #fn); if (p_##fn == NULL) return 0
-#endif
+#if !STUB_ONLY
+# ifdef _WIN32
+# define LOOKUP(fn) p_##fn = (void *) GetProcAddress (dll, #fn); if (p_##fn == NULL) return 0
+# else
+# define LOOKUP(fn) p_##fn = (void *) dlsym (dll, #fn); if (p_##fn == NULL) return 0
+# endif /* _WIN32 */
+
LOOKUP (gettext);
LOOKUP (dgettext);
@@ -82,7 +87,7 @@ use_intl_dll (HMODULE dll)
LOOKUP (bind_textdomain_codeset);
#undef LOOKUP
-
+#endif /* !STUB_ONLY */
return 1;
}
@@ -171,13 +176,17 @@ setup (void)
if (!beenhere)
{
-#ifdef _WIN32
- HMODULE intl_dll = LoadLibrary ("intl.dll");
-#elif defined(__APPLE__) && defined(__MACH__)
- HMODULE intl_dll = dlopen ("libintl.dylib", RTLD_LAZY);
-#else
- HMODULE intl_dll = dlopen ("libintl.so", RTLD_LAZY);
-#endif
+#if !STUB_ONLY
+# ifdef _WIN32
+ HMODULE intl_dll = LoadLibrary ("intl.dll");
+# elif defined(__APPLE__) && defined(__MACH__)
+ HMODULE intl_dll = dlopen ("libintl.dylib", RTLD_LAZY);
+# else
+ HMODULE intl_dll = dlopen ("libintl.so", RTLD_LAZY);
+# endif
+#else /* !STUB_ONLY */
+ HMODULE intl_dll = NULL;
+#endif /* STUB_ONLY */
if (intl_dll != NULL &&
use_intl_dll (intl_dll))

View File

@ -0,0 +1,39 @@
DESCRIPTION = "Proxy libintl"
HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/"
SECTION = "libs"
LICENSE = "LGPLv2"
LIC_FILES_CHKSUM = "file://src/proxy-libintl/COPYING.LIB.txt;md5=bc400bc21422f9a92e76ec2c5167ca2e"
PR = "r7"
PROVIDES = "virtual/libintl"
SRC_URI = " \
http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/${PN}-${PV}.zip \
file://stub-only.patch \
file://create-as-shared-lib.patch \
file://soname.patch \
"
S = "${WORKDIR}"
FILES_${PN}-dev = "${includedir}/libintl.h ${libdir}/libintl.a"
FILES_${PN} = "${libdir}/libintl.so"
CFLAGS_append = " -fPIC -Wall -I ../../include ${@['-DSTUB_ONLY', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']}"
TARGET_CC_ARCH += "${LDFLAGS}"
do_compile() {
cd ${WORKDIR}/src/proxy-libintl
oe_runmake
}
do_install() {
install -d ${D}/${includedir}
install -m 0644 ${WORKDIR}/include/libintl.h ${D}/${includedir}
install -d ${D}/${libdir}
oe_libinstall -a -so -C lib libintl ${D}/${libdir}
}
SRC_URI[md5sum] = "63047fcbe5ff853db0d04981dd9f1888"
SRC_URI[sha256sum] = "b8519dfd77939b23ca599a724b536f48340f2c795552aa2a600155230571141c"