commit: 944205f846c562430015be2d118762d1280c239e Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> AuthorDate: Thu Apr 19 19:33:29 2018 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Thu Apr 19 19:33:29 2018 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=944205f8
sys-devel/gettext: sync Package-Manager: Portage-2.3.18-prefix, Repoman-2.3.6 sys-devel/gettext/Manifest | 3 +- .../files/gettext-0.19.7-disable-libintl.patch | 30 ++++ .../files/gettext-0.19.8.1-format-security.patch | 87 +++++++++++ sys-devel/gettext/gettext-0.18.3.2.ebuild | 163 -------------------- sys-devel/gettext/gettext-0.19.3.ebuild | 169 --------------------- sys-devel/gettext/gettext-0.19.8.1.ebuild | 144 ++++++++++++++++++ 6 files changed, 262 insertions(+), 334 deletions(-) diff --git a/sys-devel/gettext/Manifest b/sys-devel/gettext/Manifest index c7880b2ecb..d3eb9b6db9 100644 --- a/sys-devel/gettext/Manifest +++ b/sys-devel/gettext/Manifest @@ -1,3 +1,2 @@ -DIST gettext-0.18.3.2.tar.gz 16189249 BLAKE2B e91a4ebc71aafaac7f13a7271063904051c7fc1c1451f84487f50cc8328e93fdaaebc198e7c4a04faeb54e23afb0e3d9f7821d2269906e6d9e31bae148823eff SHA512 0cf8f2bb844b9d94f5e63a0f4bddc133e2388d103fd4189614d2fc157a94e27836ec399eb32ab69410e2214425676e6bc195bbf13238cc5ad32b454ec6e2b5ef -DIST gettext-0.19.3.tar.gz 17414357 BLAKE2B b2b2085e8ee7339c6b6509807a9601163498edd9265f2ec899337943bd2c1394a905b01e8a9f44e7a57985cb11f4fdfe302ff9320dacf1da78fdc4fdb5e30fd9 SHA512 2ec02065b376cf9ec2b9d32328a7181d292ac940356a710f785450f37e03a8513e07d4b981824374671cfa2f60024e4649fc89ad79ee0adda87a8b9b63ad28e8 DIST gettext-0.19.7.tar.gz 19235781 BLAKE2B 4c2cfcb0b21a66a9f8d2d57de7420e624a1235f97180ad5ac194a5eb629760a9cacc7f3966cdf893d7af86c1740d8bb2266c639ebe2664ea44f2c47a962a841a SHA512 7ba89074d3eddd0b4a5e2980e1ec74b53c49b7a04a1fa91c70c4bc11ce9c30415e4df9d79698148eaaed325fb4feb25a340a2e8e01fbe86b1a66b1376a4c9e3d +DIST gettext-0.19.8.1.tar.gz 19704011 BLAKE2B 17dc7aad338a26d71b818fea51e46a47dccf14744ee575ce86b591becaea402e36d64dc018e1a84113c356122ffef367cf2fa424e51ebc9720350040b4960091 SHA512 073042fa2dc48804c58e76f036130a669e19612c25427b0ab14d0b366b549a63751bf3af03bfd0745d7c4f72497a4b2aab26a3cc6de83189ce111679073878e1 diff --git a/sys-devel/gettext/files/gettext-0.19.7-disable-libintl.patch b/sys-devel/gettext/files/gettext-0.19.7-disable-libintl.patch new file mode 100644 index 0000000000..f51de34843 --- /dev/null +++ b/sys-devel/gettext/files/gettext-0.19.7-disable-libintl.patch @@ -0,0 +1,30 @@ +https://bugs.gentoo.org/564168 +Never build libintl since it's in dev-libs/libintl now. + +We can drop this if/when upstream fixes the configure flag handling: +https://savannah.gnu.org/bugs/?48233 + +--- a/gettext-runtime/configure ++++ b/gettext-runtime/configure +@@ -20391,8 +20391,7 @@ $as_echo "$ac_res" >&6; } + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ +- && test "$PACKAGE" != gettext-runtime \ +- && test "$PACKAGE" != gettext-tools; }; then ++ }; then + gt_use_preinstalled_gnugettext=yes + else + LIBINTL= +--- a/gettext-tools/configure ++++ b/gettext-tools/configure +@@ -22746,8 +22746,7 @@ $as_echo "$ac_res" >&6; } + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ +- && test "$PACKAGE" != gettext-runtime \ +- && test "$PACKAGE" != gettext-tools; }; then ++ }; then + gt_use_preinstalled_gnugettext=yes + else + LIBINTL= diff --git a/sys-devel/gettext/files/gettext-0.19.8.1-format-security.patch b/sys-devel/gettext/files/gettext-0.19.8.1-format-security.patch new file mode 100644 index 0000000000..6af1604198 --- /dev/null +++ b/sys-devel/gettext/files/gettext-0.19.8.1-format-security.patch @@ -0,0 +1,87 @@ +From e546de65a333789e83f5485757967cee29ee3681 Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.y...@windriver.com> +Date: Sun, 19 Feb 2017 23:32:46 -0800 +Subject: [PATCH] cr-statement.c/timsort.h: fix formatting issues + +Fixed when compile with "-Wformat -Wformat-security -Werror=format-security": +| gettext-tools/gnulib-lib/libcroco/cr-statement.c: In function 'cr_statement_dump_charset': +| gettext-tools/gnulib-lib/libcroco/cr-statement.c:2661:17: error: format not a string literal and no format arguments [-Werror=format-security] +| fprintf (a_fp, str) ; + +And: +gettext-tools/gnulib-lib/libxml/timsort.h:326:80: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=] + fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size); + +Upstream-Status: Pending + +Signed-off-by: Robert Yang <liezhi.y...@windriver.com> +--- + gettext-tools/gnulib-lib/libcroco/cr-statement.c | 10 +++++----- + gettext-tools/gnulib-lib/libxml/timsort.h | 2 +- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/gettext-tools/gnulib-lib/libcroco/cr-statement.c b/gettext-tools/gnulib-lib/libcroco/cr-statement.c +index 617520f..100104b 100644 +--- a/gettext-tools/gnulib-lib/libcroco/cr-statement.c ++++ b/gettext-tools/gnulib-lib/libcroco/cr-statement.c +@@ -2607,7 +2607,7 @@ cr_statement_dump_ruleset (CRStatement * a_this, FILE * a_fp, glong a_indent) + g_return_if_fail (a_fp && a_this); + str = cr_statement_ruleset_to_string (a_this, a_indent); + if (str) { +- fprintf (a_fp, str); ++ fprintf (a_fp, "%s", str); + g_free (str); + str = NULL; + } +@@ -2658,7 +2658,7 @@ cr_statement_dump_charset (CRStatement * a_this, FILE * a_fp, gulong a_indent) + str = cr_statement_charset_to_string (a_this, + a_indent) ; + if (str) { +- fprintf (a_fp, str) ; ++ fprintf (a_fp, "%s", str) ; + g_free (str) ; + str = NULL ; + } +@@ -2685,7 +2685,7 @@ cr_statement_dump_page (CRStatement * a_this, FILE * a_fp, gulong a_indent) + + str = cr_statement_at_page_rule_to_string (a_this, a_indent) ; + if (str) { +- fprintf (a_fp, str); ++ fprintf (a_fp, "%s", str); + g_free (str) ; + str = NULL ; + } +@@ -2711,7 +2711,7 @@ cr_statement_dump_media_rule (CRStatement * a_this, + + str = cr_statement_media_rule_to_string (a_this, a_indent) ; + if (str) { +- fprintf (a_fp, str) ; ++ fprintf (a_fp, "%s", str) ; + g_free (str) ; + str = NULL ; + } +@@ -2737,7 +2737,7 @@ cr_statement_dump_import_rule (CRStatement * a_this, FILE * a_fp, + + str = cr_statement_import_rule_to_string (a_this, a_indent) ; + if (str) { +- fprintf (a_fp, str) ; ++ fprintf (a_fp, "%s", str) ; + g_free (str) ; + str = NULL ; + } +diff --git a/gettext-tools/gnulib-lib/libxml/timsort.h b/gettext-tools/gnulib-lib/libxml/timsort.h +index 795f272..443918a 100644 +--- a/gettext-tools/gnulib-lib/libxml/timsort.h ++++ b/gettext-tools/gnulib-lib/libxml/timsort.h +@@ -323,7 +323,7 @@ static void TIM_SORT_RESIZE(TEMP_STORAGE_T *store, const size_t new_size) + SORT_TYPE *tempstore = (SORT_TYPE *)realloc(store->storage, new_size * sizeof(SORT_TYPE)); + if (tempstore == NULL) + { +- fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size); ++ fprintf(stderr, "Error allocating temporary storage for tim sort: need %zu bytes", sizeof(SORT_TYPE) * new_size); + exit(1); + } + store->storage = tempstore; +-- +2.10.2 + diff --git a/sys-devel/gettext/gettext-0.18.3.2.ebuild b/sys-devel/gettext/gettext-0.18.3.2.ebuild deleted file mode 100644 index 7d535a1466..0000000000 --- a/sys-devel/gettext/gettext-0.18.3.2.ebuild +++ /dev/null @@ -1,163 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gettext/gettext-0.18.3.2.ebuild,v 1.15 2014/06/18 20:47:33 mgorny Exp $ - -EAPI="4" - -inherit flag-o-matic eutils multilib toolchain-funcs mono-env libtool java-pkg-opt-2 multilib-minimal - -DESCRIPTION="GNU locale utilities" -HOMEPAGE="http://www.gnu.org/software/gettext/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" - -LICENSE="GPL-3 LGPL-2" -SLOT="0" -KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" -IUSE="acl -cvs doc emacs git java nls +cxx ncurses openmp static-libs elibc_glibc" - -# only runtime goes multilib -DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] - dev-libs/libxml2 - dev-libs/expat - acl? ( virtual/acl ) - ncurses? ( sys-libs/ncurses ) - java? ( >=virtual/jdk-1.4 )" -RDEPEND="${DEPEND} - !git? ( cvs? ( dev-vcs/cvs ) ) - git? ( dev-vcs/git ) - java? ( >=virtual/jre-1.4 ) - abi_x86_32? ( - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] - !<=app-emulation/emul-linux-x86-baselibs-20131008-r11 - )" -PDEPEND="emacs? ( app-emacs/po-mode )" - -MULTILIB_WRAPPED_HEADERS=( - # only installed for native ABI - /usr/include/gettext-po.h -) - -src_prepare() { - java-pkg-opt-2_src_prepare - # this script uses syntax that Solaris /bin/sh doesn't grok - sed -i -e '1c\#!/usr/bin/env sh' \ - "${S}"/gettext-tools/misc/convert-archive.in || die - -# # work around problem in gnulib on OSX Lion, Mountain Lion and Mavericks -# if [[ ${CHOST} == *-darwin1[123] ]] ; then -# sed -i -e '/^#ifndef weak_alias$/a\# undef __stpncpy' \ -# gettext-tools/gnulib-lib/stpncpy.c || die -# sed -i -e '/^# undef __stpncpy$/a\# undef stpncpy' \ -# gettext-tools/gnulib-lib/stpncpy.c || die -# fi - - epunt_cxx - elibtoolize -} - -multilib_src_configure() { - local myconf=( - # switches common to runtime and top-level - --cache-file="${BUILD_DIR}"/config.cache - --docdir="${EPREFIX}/usr/share/doc/${PF}" - - $(use_enable cxx libasprintf) - $(use_enable java) - $(use_enable static-libs static) - ) - - # Build with --without-included-gettext (on glibc systems) - if use elibc_glibc ; then - myconf+=( - --without-included-gettext - $(use_enable nls) - ) - else - myconf+=( - --with-included-gettext - --enable-nls - ) - fi - use cxx || export CXX=$(tc-getCC) - - # Should be able to drop this hack in next release. #333887 - tc-is-cross-compiler && export gl_cv_func_working_acl_get_file=yes - - local ECONF_SOURCE=${S} - if ! multilib_is_native_abi ; then - # for non-native ABIs, we build runtime only - ECONF_SOURCE+=/gettext-runtime - else - # remaining switches - myconf+=( - # Emacs support is now in a separate package - --without-emacs - --without-lispdir - # glib depends on us so avoid circular deps - --with-included-glib - # libcroco depends on glib which ... ^^^ - --with-included-libcroco - # this will _disable_ libunistring (since it is not bundled), - # see bug #326477 - --with-included-libunistring - - $(use_enable acl) - $(use_enable ncurses curses) - $(use_enable openmp) - $(use_with git) - $(usex git --without-cvs $(use_with cvs)) - ) - fi - - econf "${myconf[@]}" -} - -multilib_src_install() { - default - - if multilib_is_native_abi ; then - dosym msgfmt /usr/bin/gmsgfmt #43435 - dobin gettext-tools/misc/gettextize - - [[ ${USERLAND} == "BSD" ]] && gen_usr_ldscript -a intl - fi -} - -multilib_src_install_all() { - use nls || rm -r "${ED}"/usr/share/locale - use static-libs || prune_libtool_files --all - - rm -f "${ED}"/usr/share/locale/locale.alias "${ED}"/usr/lib/charset.alias - - if use java ; then - java-pkg_dojar "${ED}"/usr/share/${PN}/*.jar - rm -f "${ED}"/usr/share/${PN}/*.jar - rm -f "${ED}"/usr/share/${PN}/*.class - if use doc ; then - java-pkg_dojavadoc "${ED}"/usr/share/doc/${PF}/javadoc2 - rm -rf "${ED}"/usr/share/doc/${PF}/javadoc2 - fi - fi - - if use doc ; then - dohtml "${ED}"/usr/share/doc/${PF}/*.html - else - rm -rf "${ED}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1} - fi - rm -f "${ED}"/usr/share/doc/${PF}/*.html - - dodoc AUTHORS ChangeLog NEWS README THANKS -} - -pkg_preinst() { - # older gettext's sometimes installed libintl ... - # need to keep the linked version or the system - # could die (things like sed link against it :/) - preserve_old_lib /{,usr/}$(get_libdir)/libintl$(get_libname 7) - - java-pkg-opt-2_pkg_preinst -} - -pkg_postinst() { - preserve_old_lib_notify /{,usr/}$(get_libdir)/libintl$(get_libname 7) -} diff --git a/sys-devel/gettext/gettext-0.19.3.ebuild b/sys-devel/gettext/gettext-0.19.3.ebuild deleted file mode 100644 index 09eed01487..0000000000 --- a/sys-devel/gettext/gettext-0.19.3.ebuild +++ /dev/null @@ -1,169 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gettext/gettext-0.19.3.ebuild,v 1.1 2014/10/17 16:25:10 polynomial-c Exp $ - -EAPI="4" - -inherit flag-o-matic eutils multilib toolchain-funcs mono-env libtool java-pkg-opt-2 multilib-minimal - -DESCRIPTION="GNU locale utilities" -HOMEPAGE="http://www.gnu.org/software/gettext/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" - -LICENSE="GPL-3 LGPL-2" -SLOT="0" -KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" -IUSE="acl -cvs doc emacs git java nls +cxx ncurses openmp static-libs elibc_glibc elibc_musl" - -if [[ ${PV} =~ _rc ]] ; then - SRC_URI="mirror://gnu-alpha/${PN}/${P/_/-}.tar.xz" - KEYWORDS="" - S="${WORKDIR}/${P/_/-}" -fi - -# only runtime goes multilib -DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] - dev-libs/libxml2 - dev-libs/expat - acl? ( virtual/acl ) - ncurses? ( sys-libs/ncurses ) - java? ( >=virtual/jdk-1.4 )" -RDEPEND="${DEPEND} - !git? ( cvs? ( dev-vcs/cvs ) ) - git? ( dev-vcs/git ) - java? ( >=virtual/jre-1.4 ) - abi_x86_32? ( - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] - !<=app-emulation/emul-linux-x86-baselibs-20131008-r11 - )" -PDEPEND="emacs? ( app-emacs/po-mode )" - -MULTILIB_WRAPPED_HEADERS=( - # only installed for native ABI - /usr/include/gettext-po.h -) - -src_prepare() { - java-pkg-opt-2_src_prepare - # this script uses syntax that Solaris /bin/sh doesn't grok - sed -i -e '1c\#!/usr/bin/env sh' \ - "${S}"/gettext-tools/misc/convert-archive.in || die - -# # work around problem in gnulib on OSX Lion, Mountain Lion and Mavericks -# if [[ ${CHOST} == *-darwin1[123] ]] ; then -# sed -i -e '/^#ifndef weak_alias$/a\# undef __stpncpy' \ -# gettext-tools/gnulib-lib/stpncpy.c || die -# sed -i -e '/^# undef __stpncpy$/a\# undef stpncpy' \ -# gettext-tools/gnulib-lib/stpncpy.c || die -# fi - - epunt_cxx - elibtoolize -} - -multilib_src_configure() { - local myconf=( - # switches common to runtime and top-level - --cache-file="${BUILD_DIR}"/config.cache - --docdir="${EPREFIX}/usr/share/doc/${PF}" - - $(use_enable cxx libasprintf) - $(use_enable java) - $(use_enable static-libs static) - ) - - # Build with --without-included-gettext (on glibc systems) - if use elibc_glibc || use elibc_musl ; then - myconf+=( - --without-included-gettext - $(use_enable nls) - ) - else - myconf+=( - --with-included-gettext - --enable-nls - ) - fi - use cxx || export CXX=$(tc-getCC) - - # Should be able to drop this hack in next release. #333887 - tc-is-cross-compiler && export gl_cv_func_working_acl_get_file=yes - - local ECONF_SOURCE=${S} - if ! multilib_is_native_abi ; then - # for non-native ABIs, we build runtime only - ECONF_SOURCE+=/gettext-runtime - else - # remaining switches - myconf+=( - # Emacs support is now in a separate package - --without-emacs - --without-lispdir - # glib depends on us so avoid circular deps - --with-included-glib - # libcroco depends on glib which ... ^^^ - --with-included-libcroco - # this will _disable_ libunistring (since it is not bundled), - # see bug #326477 - --with-included-libunistring - - $(use_enable acl) - $(use_enable ncurses curses) - $(use_enable openmp) - $(use_with git) - $(usex git --without-cvs $(use_with cvs)) - ) - fi - - econf "${myconf[@]}" -} - -multilib_src_install() { - default - - if multilib_is_native_abi ; then - dosym msgfmt /usr/bin/gmsgfmt #43435 - dobin gettext-tools/misc/gettextize - - [[ ${USERLAND} == "BSD" ]] && gen_usr_ldscript -a intl - fi -} - -multilib_src_install_all() { - use nls || rm -r "${ED}"/usr/share/locale - use static-libs || prune_libtool_files --all - - rm -f "${ED}"/usr/share/locale/locale.alias "${ED}"/usr/lib/charset.alias - - if use java ; then - java-pkg_dojar "${ED}"/usr/share/${PN}/*.jar - rm -f "${ED}"/usr/share/${PN}/*.jar - rm -f "${ED}"/usr/share/${PN}/*.class - if use doc ; then - java-pkg_dojavadoc "${ED}"/usr/share/doc/${PF}/javadoc2 - rm -rf "${ED}"/usr/share/doc/${PF}/javadoc2 - fi - fi - - if use doc ; then - dohtml "${ED}"/usr/share/doc/${PF}/*.html - else - rm -rf "${ED}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1} - fi - rm -f "${ED}"/usr/share/doc/${PF}/*.html - - dodoc AUTHORS ChangeLog NEWS README THANKS -} - -pkg_preinst() { - # older gettext's sometimes installed libintl ... - # need to keep the linked version or the system - # could die (things like sed link against it :/) - preserve_old_lib /{,usr/}$(get_libdir)/libintl$(get_libname 7) - - java-pkg-opt-2_pkg_preinst -} - -pkg_postinst() { - preserve_old_lib_notify /{,usr/}$(get_libdir)/libintl$(get_libname 7) -} diff --git a/sys-devel/gettext/gettext-0.19.8.1.ebuild b/sys-devel/gettext/gettext-0.19.8.1.ebuild new file mode 100644 index 0000000000..b83c0f8a1d --- /dev/null +++ b/sys-devel/gettext/gettext-0.19.8.1.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Note: Keep version bumps in sync with dev-libs/libintl. + +EAPI="5" + +inherit epatch epunt-cxx ltprune mono-env libtool java-pkg-opt-2 multilib-minimal + +DESCRIPTION="GNU locale utilities" +HOMEPAGE="https://www.gnu.org/software/gettext/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" + +# Only libasprintf is under the LGPL (and libintl is in a sep package), +# so put that license behind USE=cxx. +LICENSE="GPL-3+ cxx? ( LGPL-2.1+ )" +SLOT="0" +KEYWORDS="~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" +IUSE="acl -cvs +cxx doc emacs git java ncurses nls openmp static-libs" + +# only runtime goes multilib +# Note: The version of libxml2 corresponds to the version bundled via gnulib. +# If the build detects too old of a system version, it will end up falling back +# to the bundled copy. #596918 +# Note: expat lacks a subslot because it is dynamically loaded at runtime. We +# would depend on older subslots if they were available (based on the ABIs that +# are explicitly handled), but expat doesn't currently use subslots. +DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] + >=virtual/libintl-0-r2[${MULTILIB_USEDEP}] + >=dev-libs/libxml2-2.9.3:= + dev-libs/expat + acl? ( virtual/acl ) + ncurses? ( sys-libs/ncurses:0= ) + java? ( >=virtual/jdk-1.4:= )" +RDEPEND="${DEPEND} + !git? ( cvs? ( dev-vcs/cvs ) ) + git? ( dev-vcs/git ) + java? ( >=virtual/jre-1.4 )" +PDEPEND="emacs? ( app-emacs/po-mode )" + +MULTILIB_WRAPPED_HEADERS=( + # only installed for native ABI + /usr/include/gettext-po.h +) + +pkg_setup() { + mono-env_pkg_setup + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + java-pkg-opt-2_src_prepare + + epatch "${FILESDIR}"/${PN}-0.19.7-disable-libintl.patch #564168 + epatch "${FILESDIR}"/${PN}-0.19.8.1-format-security.patch + + # this script uses syntax that Solaris /bin/sh doesn't grok + sed -i -e '1c\#!/usr/bin/env sh' \ + gettext-tools/misc/convert-archive.in || die + + epunt_cxx + elibtoolize +} + +multilib_src_configure() { + local myconf=( + # switches common to runtime and top-level + --cache-file="${BUILD_DIR}"/config.cache + --docdir="\$(datarootdir)/doc/${PF}" + + # Emacs support is now in a separate package + --without-emacs + --without-lispdir + # glib depends on us so avoid circular deps + --with-included-glib + # libcroco depends on glib which ... ^^^ + --with-included-libcroco + # this will _disable_ libunistring (since it is not bundled), + # see bug #326477 + --with-included-libunistring + # Never build libintl since it's in dev-libs/libintl now. + --without-included-gettext + # Never build bundled copy of libxml2. + --without-included-libxml + + $(use_enable acl) + $(use_enable cxx c++) + $(use_enable cxx libasprintf) + $(use_with git) + $(usex git --without-cvs $(use_with cvs)) + $(use_enable java) + $(use_enable ncurses curses) + $(use_enable nls) + $(use_enable openmp) + $(use_enable static-libs static) + ) + + local ECONF_SOURCE=${S} + if ! multilib_is_native_abi ; then + # for non-native ABIs, we build runtime only + ECONF_SOURCE+=/gettext-runtime + fi + + econf "${myconf[@]}" +} + +multilib_src_install() { + default + + if multilib_is_native_abi ; then + dosym msgfmt /usr/bin/gmsgfmt #43435 + dobin gettext-tools/misc/gettextize + fi +} + +multilib_src_install_all() { + use nls || rm -r "${ED}"/usr/share/locale + use static-libs || prune_libtool_files --all + + rm -f "${ED}"/usr/share/locale/locale.alias "${ED}"/usr/lib/charset.alias + + if use java ; then + java-pkg_dojar "${ED}"/usr/share/${PN}/*.jar + rm -f "${ED}"/usr/share/${PN}/*.jar + rm -f "${ED}"/usr/share/${PN}/*.class + if use doc ; then + java-pkg_dojavadoc "${ED}"/usr/share/doc/${PF}/javadoc2 + rm -rf "${ED}"/usr/share/doc/${PF}/javadoc2 + fi + fi + + if use doc ; then + dohtml "${ED}"/usr/share/doc/${PF}/*.html + else + rm -rf "${ED}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1} + fi + rm -f "${ED}"/usr/share/doc/${PF}/*.html + + dodoc AUTHORS ChangeLog NEWS README THANKS +} + +pkg_preinst() { + java-pkg-opt-2_pkg_preinst +}