From patchwork Sun Oct 21 15:37:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Diorcet X-Patchwork-Id: 193033 X-Patchwork-Delegate: esben@haabendal.dk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [130.225.254.102]) by ozlabs.org (Postfix) with ESMTP id 8B8542C0096 for ; Mon, 22 Oct 2012 02:38:17 +1100 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id 59FEB3FD5E for ; Sun, 21 Oct 2012 17:38:16 +0200 (CEST) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from mail-we0-f179.google.com (mail-we0-f179.google.com [74.125.82.179]) by hugin.dotsrc.org (Postfix) with ESMTPS id 54B433FC31 for ; Sun, 21 Oct 2012 17:38:14 +0200 (CEST) Received: by mail-we0-f179.google.com with SMTP id z49so959240wey.10 for ; Sun, 21 Oct 2012 08:38:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=Ha5CyItBUOvXGnsKAL+9KV4aDi8IOZu1TyUCppUiO9s=; b=WmniZnxR3j/qJfzSzXGALqcYOOVA3Xmtt0Lxq5qI71Bj5miuepktreqjLzeWmQ/ID9 h8EUYo++q/V7VCBXNmHfscq7H64gLQDWhZODMr2oGIWg4+ErCnsjjg3OeK+qC9hjIrhC MFdOSpkj1z1yeo6nUoNhKxtE70wUwgiDkr1FOf2r4uHLA9HmSqtEGnZx68FBaWmoJLjZ BqFUhJiQMlMtDxDXn3ih+BAFRlYsqdP3JfkgeXOOtr3Q4qZGwSg9x65noLxSjfLtAzci r2Iu1GwvlyIWjJXH/nSTjcBFa6sx6sJinppPyHwFKlWA8h7HMji0vyukSQEt2T1eml1G FQXg== Received: by 10.216.200.78 with SMTP id y56mr4012546wen.143.1350833894065; Sun, 21 Oct 2012 08:38:14 -0700 (PDT) Received: from localhost.localdomain (dom38-1-82-236-154-183.fbx.proxad.net. [82.236.154.183]) by mx.google.com with ESMTPS id gm7sm16535929wib.10.2012.10.21.08.38.12 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 21 Oct 2012 08:38:13 -0700 (PDT) From: Yann Diorcet To: dev@oe-lite.org Subject: [PATCH 11/16] gettext: rework for osx and mingw32 Date: Sun, 21 Oct 2012 17:37:50 +0200 Message-Id: <1350833876-9499-11-git-send-email-diorcet.yann@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1350833876-9499-1-git-send-email-diorcet.yann@gmail.com> References: <1350833876-9499-1-git-send-email-diorcet.yann@gmail.com> Cc: Yann Diorcet X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org From: Yann Diorcet --- recipes/gettext/gettext-0.18.1.1/osx.patch | 49 ++++++++++++++++++++++++++++ recipes/gettext/gettext.inc | 39 +++++++++++++++++----- recipes/gettext/gettext_0.18.1.1.oe | 1 + 3 files changed, 81 insertions(+), 8 deletions(-) create mode 100644 recipes/gettext/gettext-0.18.1.1/osx.patch diff --git a/recipes/gettext/gettext-0.18.1.1/osx.patch b/recipes/gettext/gettext-0.18.1.1/osx.patch new file mode 100644 index 0000000..7f90deb --- /dev/null +++ b/recipes/gettext/gettext-0.18.1.1/osx.patch @@ -0,0 +1,49 @@ +diff -urN gettext-0.18.1.1/build-aux/install-reloc gettext-0.18.1.1.mod/build-aux/install-reloc +--- gettext-0.18.1.1/build-aux/install-reloc 2012-10-08 15:46:56.000000000 +0200 ++++ gettext-0.18.1.1.mod/build-aux/install-reloc 2012-10-08 15:47:01.000000000 +0200 +@@ -160,6 +160,8 @@ + "$srcdir"/canonicalize-lgpl.c \ + "$srcdir"/malloca.c \ + "$srcdir"/relocatable.c \ ++ "$srcdir"/lstat.c \ ++ "$srcdir"/stat.c \ + "$srcdir"/setenv.c \ + "$srcdir"/strerror.c \ + "$srcdir"/c-ctype.c \ +diff -urN gettext-0.18.1.1/gettext-tools/Makefile.in gettext-0.18.1.1.mod/gettext-tools/Makefile.in +--- gettext-0.18.1.1/gettext-tools/Makefile.in 2010-06-06 22:12:33.000000000 +0200 ++++ gettext-0.18.1.1.mod/gettext-tools/Makefile.in 2012-10-08 14:54:25.000000000 +0200 +@@ -1248,7 +1248,7 @@ + top_srcdir = @top_srcdir@ + AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies + ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4 +-SUBDIRS = doc intl gnulib-lib libgrep src libgettextpo po projects styles misc man m4 tests gnulib-tests examples ++SUBDIRS = doc intl gnulib-lib libgrep src libgettextpo po projects styles misc man m4 tests gnulib-tests + + # Allow users to use "gnulib-tool --update". + +diff -urN gettext-0.18.1.1/gettext-tools/configure gettext-0.18.1.1.mod/gettext-tools/configure +--- gettext-0.18.1.1/gettext-tools/configure 2010-06-06 22:12:20.000000000 +0200 ++++ gettext-0.18.1.1.mod/gettext-tools/configure 2012-10-08 14:54:59.000000000 +0200 +@@ -40606,7 +40606,9 @@ + #include + #include /* for strcpy */ + /* The stpncpy prototype is missing in on AIX 4. */ ++#ifndef stpncpy + extern char *stpncpy (char *dest, const char *src, size_t n); ++#endif + int main () { + const char *src = "Hello"; + char dest[10]; +diff -urN gettext-0.18.1.1/gettext-tools/gnulib-lib/stpncpy.c gettext-0.18.1.1.mod/gettext-tools/gnulib-lib/stpncpy.c +--- gettext-0.18.1.1/gettext-tools/gnulib-lib/stpncpy.c 2010-05-24 11:42:47.000000000 +0200 ++++ gettext-0.18.1.1.mod/gettext-tools/gnulib-lib/stpncpy.c 2012-10-08 15:00:12.000000000 +0200 +@@ -25,7 +25,7 @@ + #include + + #ifndef weak_alias +-# define __stpncpy stpncpy ++//# define __stpncpy stpncpy + #endif + + /* Copy no more than N bytes of SRC to DST, returning a pointer past the diff --git a/recipes/gettext/gettext.inc b/recipes/gettext/gettext.inc index ae0ac8d..c54fae9 100644 --- a/recipes/gettext/gettext.inc +++ b/recipes/gettext/gettext.inc @@ -5,13 +5,21 @@ HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html" RECIPE_TYPES = "machine native sdk" inherit c++ autotools-autoreconf library make-vpath +DEPENDS_AUTORECONF = "" require conf/fetch/gnu.conf SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz" -DEPENDS = "libiconv ${DEPENDS_HOST_OS} ${DEPENDS_SELF_NATIVE}" -DEPENDS_HOST_OS = "libdl libpthread libm libncurses" -DEPENDS_HOST_OS:HOST_OS_mingw32 = "libm libncurses" +DEPENDS = "libiconv ${DEPENDS_LIBDL} ${DEPENDS_LIBPTHREAD} libm ${DEPENDS_SELF_NATIVE}" +DEPENDS_LIBNCURSES = "libncurses" +DEPENDS_LIBNCURSES:TARGET_OS_mingw32 = "" + +DEPENDS_LIBDL = "libdl" +DEPENDS_LIBDL:TARGET_OS_mingw32 = "" + +DEPENDS_LIBPTHREAD = "libpthread" +DEPENDS_LIBPTHREAD:TARGET_OS_mingw32 = "" + DEPENDS_SELF_NATIVE = "native:gettext" DEPENDS_SELF_NATIVE:native = "" @@ -24,7 +32,6 @@ EXTRA_OECONF += "\ --disable-dependency-tracking \ --disable-java --disable-native-java \ --disable-csharp \ ---disable-nls \ --without-lispdir \ --disable-libasprintf \ --disable-acl \ @@ -36,26 +43,42 @@ EXTRA_OECONF += "\ --without-emacs --without-git --without-cvs \ --with-included-glib \ " + +CFLAGS += "-O1" + +RECIPE_FLAGS += "nls" +EXTRA_OECONF += "${EXTRA_OECONF_NLS}" +EXTRA_OECONF_NLS = " --disable-nls" +EXTRA_OECONF_NLS:USE_nls = " --enable-nls" +EXTRA_OECONF_NLS:native = " --enable-nls" +EXTRA_OECONF_NLS:TARGET_OS_mingw32 = " --enable-nls" +EXTRA_OECONF_NLS:TARGET_OS_darwin = " --enable-nls" + EXTRA_OECONF += "${EXTRA_OECONF_GETTEXT}" EXTRA_OECONF_GETTEXT = "" EXTRA_OECONF_GETTEXT:native = "--disable-curses --with-included-gettext" -EXTRA_OECONF_GETTEXT:HOST_OS_mingw32 = "--with-included-gettext" +EXTRA_OECONF_GETTEXT:TARGET_OS_mingw32 = "--disable-curses --with-included-gettext" DEPENDS_${PN} = "libintl libgettextpo libgettextlib \ - libiconv libncurses libdl libm" + libiconv ${DEPENDS_LIBNCURSES} ${DEPENDS_LIBDL} libm" RDEPENDS_${PN} = "${DEPENDS_${PN}}" +do_autoreconf () { + bash ./autogen.sh --quick --skip-gnulib +} + PACKAGES =+ "${PN}-utils" FILES_${PN}-utils = "${bindir}/*" FILES_${PN} += "${libdir}/gettext ${datadir}/gettext" +DEPENDS_${PN}-utils += "gettext" inherit auto-package-libs AUTO_PACKAGE_LIBS = "intl gettextpo gettextlib gettextsrc" AUTO_PACKAGE_LIBS_DEV_DEPENDS = "${PN}-dev_${PV}" DEPENDS_${PN}-libintl += "libiconv" DEPENDS_${PN}-libgettextpo += "libiconv" -DEPENDS_${PN}-libgettextlib += "libiconv libncurses" -DEPENDS_${PN}-libgettextsrc += "libgettextlib libiconv libncurses libdl libm" +DEPENDS_${PN}-libgettextlib += "libiconv ${DEPENDS_LIBNCURSES}" +DEPENDS_${PN}-libgettextsrc += "libgettextlib libiconv ${DEPENDS_LIBNCURSES} ${DEPENDS_LIBDL} libm" FILES_${PN}-libintl += "${sharedlibdir}/preloadable_libintl${SOLIBSDEV}" FILES_${PN}-libgettextlib += "${sharedlibdir}/libgettextlib${SOLIBSDEV}" FILES_${PN}-libgettextsrc += "${sharedlibdir}/libgettextsrc${SOLIBSDEV}" diff --git a/recipes/gettext/gettext_0.18.1.1.oe b/recipes/gettext/gettext_0.18.1.1.oe index dfe630a..8918c50 100644 --- a/recipes/gettext/gettext_0.18.1.1.oe +++ b/recipes/gettext/gettext_0.18.1.1.oe @@ -4,3 +4,4 @@ require gettext.inc SRC_URI += "file://ac-fix.patch" SRC_URI += "file://gettext-0.18-gettextpo-woe32-memchr.patch" +SRC_URI:>TARGET_OS_darwin = " file://osx.patch"