aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-08-18 18:14:09 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2009-08-18 18:14:09 +0100
commitd3983072bc481df2803c12944f2eca6f7aa79809 (patch)
tree2249ca95498e58fb8edcc8cc072af7bfc7860c77
parentb2d195641dcbd4939680c1ab7bd51863b68bcc55 (diff)
downloadopenembedded-core-contrib-d3983072bc481df2803c12944f2eca6f7aa79809.tar.gz
Add gettext 0.17 (from OE.dev)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r--meta/packages/gettext/gettext-0.17/autotools.patch62
-rw-r--r--meta/packages/gettext/gettext-0.17/gettext-error_print_progname.patch13
-rw-r--r--meta/packages/gettext/gettext-0.17/use_open_properly.patch15
-rw-r--r--meta/packages/gettext/gettext-0.17/wchar-uclibc.patch96
-rw-r--r--meta/packages/gettext/gettext-native_0.17.bb67
-rw-r--r--meta/packages/gettext/gettext_0.17.bb49
6 files changed, 302 insertions, 0 deletions
diff --git a/meta/packages/gettext/gettext-0.17/autotools.patch b/meta/packages/gettext/gettext-0.17/autotools.patch
new file mode 100644
index 0000000000..9f16b1881f
--- /dev/null
+++ b/meta/packages/gettext/gettext-0.17/autotools.patch
@@ -0,0 +1,62 @@
+Index: gettext-0.17/gettext-runtime/man/Makefile.am
+===================================================================
+--- gettext-0.17.orig/gettext-runtime/man/Makefile.am 2007-10-07 21:37:36.000000000 +0200
++++ gettext-0.17/gettext-runtime/man/Makefile.am 2008-05-09 22:46:37.000000000 +0200
+@@ -158,8 +158,7 @@
+ $(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; \
+Index: gettext-0.17/gettext-tools/man/Makefile.am
+===================================================================
+--- gettext-0.17.orig/gettext-tools/man/Makefile.am 2007-10-28 00:18:37.000000000 +0200
++++ gettext-0.17/gettext-tools/man/Makefile.am 2008-05-09 22:46:37.000000000 +0200
+@@ -186,8 +186,7 @@
+ $(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; \
+Index: gettext-0.17/gettext-runtime/libasprintf/configure.ac
+===================================================================
+--- gettext-0.17.orig/gettext-runtime/libasprintf/configure.ac 2008-05-09 22:53:42.000000000 +0200
++++ gettext-0.17/gettext-runtime/libasprintf/configure.ac 2008-05-09 22:53:54.000000000 +0200
+@@ -1,5 +1,5 @@
+ dnl Configuration for the GNU libasprintf library
+-dnl Copyright (C) 2002-2006 Free Software Foundation, Inc.
++dnl Copyright (C) 2002-2007 Free Software Foundation, Inc.
+ dnl
+ dnl This program is free software: you can redistribute it and/or modify
+ dnl it under the terms of the GNU General Public License as published by
+@@ -54,8 +54,7 @@
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_INLINE
+ AC_TYPE_SIZE_T
+-gl_AC_TYPE_LONG_LONG
+-gt_TYPE_LONGDOUBLE
++AC_TYPE_LONG_LONG_INT
+ gt_TYPE_WCHAR_T
+ gt_TYPE_WINT_T
+ AC_CHECK_TYPE([ptrdiff_t], ,
+@@ -79,8 +78,11 @@
+ AC_SUBST([ALLOCA_H])
+
+ AC_CHECK_FUNCS([snprintf vasprintf wcslen])
+-AC_CHECK_DECLS([_snprintf])
++dnl Use the _snprintf function only if it is declared (because on NetBSD it
++dnl is defined as a weak alias of snprintf; we prefer to use the latter).
++AC_CHECK_DECLS([_snprintf], , , [#include <stdio.h>])
+ gt_PRINTF_POSIX
++gl_EOVERFLOW
+
+ dnl Check for tools needed for formatting the documentation.
+ ac_aux_dir_abs=`cd $ac_aux_dir && pwd`
diff --git a/meta/packages/gettext/gettext-0.17/gettext-error_print_progname.patch b/meta/packages/gettext/gettext-0.17/gettext-error_print_progname.patch
new file mode 100644
index 0000000000..0f67cd0b2e
--- /dev/null
+++ b/meta/packages/gettext/gettext-0.17/gettext-error_print_progname.patch
@@ -0,0 +1,13 @@
+Index: gettext-0.17/gettext-tools/libgettextpo/error.h
+===================================================================
+--- gettext-0.17.orig/gettext-tools/libgettextpo/error.h 2008-07-27 21:16:25.561115527 +0200
++++ gettext-0.17/gettext-tools/libgettextpo/error.h 2008-07-27 21:16:52.454440505 +0200
+@@ -49,7 +49,7 @@
+ /* 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/meta/packages/gettext/gettext-0.17/use_open_properly.patch b/meta/packages/gettext/gettext-0.17/use_open_properly.patch
new file mode 100644
index 0000000000..111714b543
--- /dev/null
+++ b/meta/packages/gettext/gettext-0.17/use_open_properly.patch
@@ -0,0 +1,15 @@
+Index: gettext-0.17/gettext-tools/src/write-catalog.c
+===================================================================
+--- gettext-0.17.orig/gettext-tools/src/write-catalog.c 2008-10-16 15:18:16.000000000 +0200
++++ gettext-0.17/gettext-tools/src/write-catalog.c 2008-10-16 18:17:13.000000000 +0200
+@@ -220,7 +220,9 @@
+ /* Open the output file. */
+ if (!to_stdout)
+ {
+- fd = open (filename, O_WRONLY | O_CREAT);
++ fd = open (filename, O_WRONLY | O_CREAT,
++ /* 0666 in portable POSIX notation: */
++ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
+ if (fd < 0)
+ {
+ const char *errno_description = strerror (errno);
diff --git a/meta/packages/gettext/gettext-0.17/wchar-uclibc.patch b/meta/packages/gettext/gettext-0.17/wchar-uclibc.patch
new file mode 100644
index 0000000000..7b3880bf77
--- /dev/null
+++ b/meta/packages/gettext/gettext-0.17/wchar-uclibc.patch
@@ -0,0 +1,96 @@
+Index: gettext-0.17/gettext-runtime/gnulib-lib/wchar.in.h
+===================================================================
+--- gettext-0.17.orig/gettext-runtime/gnulib-lib/wchar.in.h 2008-07-29 14:51:52.336394636 +0200
++++ gettext-0.17/gettext-runtime/gnulib-lib/wchar.in.h 2008-07-29 14:52:25.546430195 +0200
+@@ -1,6 +1,6 @@
+ /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
+
+- Copyright (C) 2007 Free Software Foundation, Inc.
++ Copyright (C) 2007-2008 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -26,6 +26,14 @@
+ * the declaration of wcwidth().
+ */
+
++#ifdef __need_mbstate_t
++/* Special invocation convention inside uClibc header files. */
++
++#@INCLUDE_NEXT@ @NEXT_WCHAR_H@
++
++#else
++/* Normal invocation convention. */
++
+ #ifndef _GL_WCHAR_H
+
+ /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+@@ -80,3 +88,4 @@
+
+ #endif /* _GL_WCHAR_H */
+ #endif /* _GL_WCHAR_H */
++#endif
+Index: gettext-0.17/gettext-tools/gnulib-lib/wchar.in.h
+===================================================================
+--- gettext-0.17.orig/gettext-tools/gnulib-lib/wchar.in.h 2008-07-29 14:52:03.886393956 +0200
++++ gettext-0.17/gettext-tools/gnulib-lib/wchar.in.h 2008-07-29 14:52:50.876388000 +0200
+@@ -1,6 +1,6 @@
+ /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
+
+- Copyright (C) 2007 Free Software Foundation, Inc.
++ Copyright (C) 2007-2008 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -26,6 +26,14 @@
+ * the declaration of wcwidth().
+ */
+
++#ifdef __need_mbstate_t
++/* Special invocation convention inside uClibc header files. */
++
++#@INCLUDE_NEXT@ @NEXT_WCHAR_H@
++
++#else
++/* Normal invocation convention. */
++
+ #ifndef _GL_WCHAR_H
+
+ /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+@@ -80,3 +88,4 @@
+
+ #endif /* _GL_WCHAR_H */
+ #endif /* _GL_WCHAR_H */
++#endif
+Index: gettext-0.17/gettext-tools/libgettextpo/wchar.in.h
+===================================================================
+--- gettext-0.17.orig/gettext-tools/libgettextpo/wchar.in.h 2008-07-29 14:51:58.826395009 +0200
++++ gettext-0.17/gettext-tools/libgettextpo/wchar.in.h 2008-07-29 14:52:38.609723575 +0200
+@@ -1,6 +1,6 @@
+ /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
+
+- Copyright (C) 2007 Free Software Foundation, Inc.
++ Copyright (C) 2007-2008 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -26,6 +26,14 @@
+ * the declaration of wcwidth().
+ */
+
++#ifdef __need_mbstate_t
++/* Special invocation convention inside uClibc header files. */
++
++#@INCLUDE_NEXT@ @NEXT_WCHAR_H@
++
++#else
++/* Normal invocation convention. */
++
+ #ifndef _GL_WCHAR_H
+
+ /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+@@ -80,3 +88,4 @@
+
+ #endif /* _GL_WCHAR_H */
+ #endif /* _GL_WCHAR_H */
++#endif
diff --git a/meta/packages/gettext/gettext-native_0.17.bb b/meta/packages/gettext/gettext-native_0.17.bb
new file mode 100644
index 0000000000..c73a19d78d
--- /dev/null
+++ b/meta/packages/gettext/gettext-native_0.17.bb
@@ -0,0 +1,67 @@
+require gettext_${PV}.bb
+PR = "r3"
+
+DEPENDS = ""
+PROVIDES = ""
+
+inherit native
+
+S = "${WORKDIR}/gettext-${PV}"
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gettext-${PV}"
+
+M4 = "\
+ansi-c++.m4 \
+codeset.m4 \
+gettext.m4 \
+glibc21.m4 \
+glibc2.m4 \
+iconv.m4 \
+intdiv0.m4 \
+intldir.m4 \
+intl.m4 \
+intlmacosx.m4 \
+intmax.m4 \
+inttypes_h.m4 \
+inttypes-pri.m4 \
+lcmessage.m4 \
+lock.m4 \
+longlong.m4 \
+nls.m4 \
+po.m4 \
+printf-posix.m4 \
+progtest.m4 \
+size_max.m4 \
+stdint_h.m4 \
+uintmax_t.m4 \
+visibility.m4 \
+wchar_t.m4 \
+wint_t.m4 \
+xsize.m4 \
+lib-ld.m4 \
+lib-link.m4 \
+lib-prefix.m4 \
+"
+
+do_stage_append() {
+ for i in ${M4}; do
+ src="gettext-runtime/m4/$i"
+ if [ ! -f $src ]; then
+ src="gettext-tools/m4/$i"
+ fi
+ if [ ! -f $src ]; then
+ src="autoconf-lib-link/m4/$i"
+ fi
+ if [ ! -f $src ]; then
+ echo "can't find $i" >&2
+ exit 1
+ fi
+ install -m 0644 $src ${STAGING_DATADIR}/aclocal/$i
+ done
+
+ # config.rpath is needed by some configure macros and needs to be autoinstalled.
+ # automake will do this but config.rpath needs to be visible to automake
+ for i in `ls -d ${STAGING_DATADIR}/automake*`
+ do
+ cp ${STAGING_DATADIR}/gettext/config.rpath $i
+ done
+}
diff --git a/meta/packages/gettext/gettext_0.17.bb b/meta/packages/gettext/gettext_0.17.bb
new file mode 100644
index 0000000000..83d1e24a91
--- /dev/null
+++ b/meta/packages/gettext/gettext_0.17.bb
@@ -0,0 +1,49 @@
+DESCRIPTION = "The GNU internationalization library."
+HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html"
+SECTION = "libs"
+LICENSE = "GPLv3"
+PR = "r2"
+DEPENDS = "gettext-native virtual/libiconv ncurses expat"
+PROVIDES = "virtual/libintl"
+
+SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
+ file://autotools.patch;patch=1 \
+ file://wchar-uclibc.patch;patch=1 \
+ file://use_open_properly.patch;patch=1 \
+ "
+
+SRC_URI_append_linux-uclibc = " file://gettext-error_print_progname.patch;patch=1"
+SRC_URI_append_linux-uclibcgnueabi = " file://gettext-error_print_progname.patch;patch=1"
+
+PARALLEL_MAKE = ""
+
+inherit autotools_stage
+
+EXTRA_OECONF += "--without-lispdir \
+ --disable-csharp \
+ --disable-libasprintf \
+ --disable-java \
+ --disable-native-java \
+ --disable-openmp \
+ --with-included-glib \
+ --without-emacs \
+ "
+
+acpaths = '-I ${S}/autoconf-lib-link/m4/ \
+ -I ${S}/gettext-runtime/m4 \
+ -I ${S}/gettext-tools/m4'
+
+
+# these lack the .x behind the .so, but shouldn't be in the -dev package
+# Otherwise you get the following results:
+# 7.4M glibc/images/ep93xx/Angstrom-console-image-glibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
+# 25M uclibc/images/ep93xx/Angstrom-console-image-uclibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
+# because gettext depends on gettext-dev, which pulls in more -dev packages:
+# 15228 KiB /ep93xx/libstdc++-dev_4.2.2-r2_ep93xx.ipk
+# 1300 KiB /ep93xx/uclibc-dev_0.9.29-r8_ep93xx.ipk
+# 140 KiB /armv4t/gettext-dev_0.14.1-r6_armv4t.ipk
+# 4 KiB /ep93xx/libgcc-s-dev_4.2.2-r2_ep93xx.ipk
+
+PACKAGES =+ "libgettextlib libgettextsrc"
+FILES_libgettextlib = "${libdir}/libgettextlib-*.so*"
+FILES_libgettextsrc = "${libdir}/libgettextsrc-*.so*"