From 4d18981865f0b2cccb172ea1c6b661ede21cce19 Mon Sep 17 00:00:00 2001 From: acoul Date: Mon, 6 Dec 2010 22:48:51 +0000 Subject: [PATCH] libs/gettext: fix uClibc-0.9.32 compile issues, enable parallel build, refresh patches git-svn-id: svn://svn.openwrt.org/openwrt/packages@24291 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- libs/gettext/Makefile | 1 + libs/gettext/patches/001-autotools.patch | 24 +++++++++++++++++++ .../002-gettext-autoconf-lib-link-no-L.patch | 24 +++++++++++++++++++ .../003-gettext-error_print_progname.patch | 11 +++++++++ .../004-gnulib-uclibc-sched_param-def.patch | 17 +++++++++++++ libs/gettext/patches/100-error_progname.patch | 5 ++-- 6 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 libs/gettext/patches/001-autotools.patch create mode 100644 libs/gettext/patches/002-gettext-autoconf-lib-link-no-L.patch create mode 100644 libs/gettext/patches/003-gettext-error_print_progname.patch create mode 100644 libs/gettext/patches/004-gnulib-uclibc-sched_param-def.patch diff --git a/libs/gettext/Makefile b/libs/gettext/Makefile index 65430a7e1..4c297b612 100644 --- a/libs/gettext/Makefile +++ b/libs/gettext/Makefile @@ -17,6 +17,7 @@ PKG_MD5SUM:=3dd55b952826d2b32f51308f2f91aa89 PKG_FIXUP:=libtool PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/libs/gettext/patches/001-autotools.patch b/libs/gettext/patches/001-autotools.patch new file mode 100644 index 000000000..7d35cf389 --- /dev/null +++ b/libs/gettext/patches/001-autotools.patch @@ -0,0 +1,24 @@ +--- a/gettext-runtime/man/Makefile.am ++++ b/gettext-runtime/man/Makefile.am +@@ -159,8 +159,7 @@ bind_textdomain_codeset.3.html: bind_tex + $(MAN2HTML) $(srcdir)/bind_textdomain_codeset.3.in | sed -e '/CreationDate:/d' > t-$@ + mv t-$@ $@ + +-install-html-local: +- $(mkdir_p) $(DESTDIR)$(htmldir) ++install-html: installdirs-html + for file in $(man_HTML); do \ + if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ + $(INSTALL_DATA) $$dir/$$file $(DESTDIR)$(htmldir)/$$file; \ +--- a/gettext-tools/man/Makefile.am ++++ b/gettext-tools/man/Makefile.am +@@ -186,8 +186,7 @@ autopoint.1.html: autopoint.1 + $(MAN2HTML) `if test -f autopoint.1; then echo .; else echo $(srcdir); fi`/autopoint.1 | sed -e '/CreationDate:/d' > t-$@ + mv t-$@ $@ + +-install-html-local: +- $(mkdir_p) $(DESTDIR)$(htmldir) ++install-html: installdirs-html + for file in $(man_HTML); do \ + if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ + $(INSTALL_DATA) $$dir/$$file $(DESTDIR)$(htmldir)/$$file; \ diff --git a/libs/gettext/patches/002-gettext-autoconf-lib-link-no-L.patch b/libs/gettext/patches/002-gettext-autoconf-lib-link-no-L.patch new file mode 100644 index 000000000..a145ce1f0 --- /dev/null +++ b/libs/gettext/patches/002-gettext-autoconf-lib-link-no-L.patch @@ -0,0 +1,24 @@ +--- a/gettext-runtime/gnulib-m4/lib-link.m4 ++++ b/gettext-runtime/gnulib-m4/lib-link.m4 +@@ -312,6 +312,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], + fi + fi + fi ++ dnl Just let the compiler find the library, the compiler and user are smarter then this script ++ dnl when cross compiling and working with a relocated install. ++ found_dir="" + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) +--- a/gettext-tools/gnulib-m4/lib-link.m4 ++++ b/gettext-tools/gnulib-m4/lib-link.m4 +@@ -312,6 +312,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], + fi + fi + fi ++ dnl Just let the compiler find the library, the compiler and user are smarter then this script ++ dnl when cross compiling and working with a relocated install. ++ found_dir="" + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) diff --git a/libs/gettext/patches/003-gettext-error_print_progname.patch b/libs/gettext/patches/003-gettext-error_print_progname.patch new file mode 100644 index 000000000..9e84551a9 --- /dev/null +++ b/libs/gettext/patches/003-gettext-error_print_progname.patch @@ -0,0 +1,11 @@ +--- a/gettext-tools/libgettextpo/error.h ++++ b/gettext-tools/libgettextpo/error.h +@@ -49,7 +49,7 @@ extern void error_at_line (int __status, + /* If NULL, error will flush stdout, then print on stderr the program + name, a colon and a space. Otherwise, error will call this + function without parameters instead. */ +-extern DLL_VARIABLE void (*error_print_progname) (void); ++void (*error_print_progname) (void); + + /* This variable is incremented each time `error' is called. */ + extern DLL_VARIABLE unsigned int error_message_count; diff --git a/libs/gettext/patches/004-gnulib-uclibc-sched_param-def.patch b/libs/gettext/patches/004-gnulib-uclibc-sched_param-def.patch new file mode 100644 index 000000000..051c3747f --- /dev/null +++ b/libs/gettext/patches/004-gnulib-uclibc-sched_param-def.patch @@ -0,0 +1,17 @@ +uclibc defines __GLIBC__ but it does not expose struct shed_param as much as glibc +and is not needed too per standard. gnulib attempts to use it but we have to account +for it because in this case uclibc does not behave like glibc. + +-Khem + +--- a/gettext-tools/gnulib-lib/spawn.in.h ++++ b/gettext-tools/gnulib-lib/spawn.in.h +@@ -31,7 +31,7 @@ + + /* Get definitions of 'struct sched_param' and 'sigset_t'. + But avoid namespace pollution on glibc systems. */ +-#ifndef __GLIBC__ ++#if !defined __GLIBC__ || defined __UCLIBC__ + # include + # include + #endif diff --git a/libs/gettext/patches/100-error_progname.patch b/libs/gettext/patches/100-error_progname.patch index 2db2849c7..f414703d9 100644 --- a/libs/gettext/patches/100-error_progname.patch +++ b/libs/gettext/patches/100-error_progname.patch @@ -1,6 +1,5 @@ -diff -pruN gettext-0.17.orig/gettext-runtime/intl/intl-compat.c gettext-0.17/gettext-runtime/intl/intl-compat.c ---- gettext-0.17.orig/gettext-runtime/intl/intl-compat.c 2009-05-19 17:15:41.881718113 +0200 -+++ gettext-0.17/gettext-runtime/intl/intl-compat.c 2009-05-19 17:16:33.585732221 +0200 +--- a/gettext-runtime/intl/intl-compat.c ++++ b/gettext-runtime/intl/intl-compat.c @@ -131,3 +131,7 @@ bind_textdomain_codeset (const char *dom { return libintl_bind_textdomain_codeset (domainname, codeset);