Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 496218 - sys-devel/gettext - add multilib support
Summary: sys-devel/gettext - add multilib support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: InOverlay
Depends on: 480404
Blocks: 496220
  Show dependency tree
 
Reported: 2013-12-27 19:29 UTC by David Heidelberg (okias)
Modified: 2014-03-18 22:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gettext-0.18.3.1-r2.diff (gettext-0.18.3.1-r2.diff,2.89 KB, patch)
2014-01-01 17:44 UTC, David Heidelberg (okias)
Details | Diff
Suggested patch to gettext-0.18.3.1-r1.ebuild (gettext-0.18.3.1-r2.ebuild.diff,4.48 KB, patch)
2014-01-04 11:14 UTC, Michał Górny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Heidelberg (okias) 2013-12-27 19:29:56 UTC
$SUBJ

Reproducible: Always
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-12-30 09:06:34 UTC
I wonder if we need that. Do we support multilib on any non-GNU systems?
Comment 2 Alexis Ballier gentoo-dev 2013-12-30 09:13:50 UTC
(In reply to Michał Górny from comment #1)
> I wonder if we need that. Do we support multilib on any non-GNU systems?

yes

and anyway, even on linux:

$ equery files gettext | grep libgett
/usr/lib/debug/usr/lib64/libgettextlib-0.18.3.so.debug
/usr/lib/debug/usr/lib64/libgettextpo.so.0.5.2.debug
/usr/lib/debug/usr/lib64/libgettextsrc-0.18.3.so.debug
/usr/lib64/libgettextlib-0.18.3.so
/usr/lib64/libgettextlib.so
/usr/lib64/libgettextpo.so
/usr/lib64/libgettextpo.so.0
/usr/lib64/libgettextpo.so.0.5.2
/usr/lib64/libgettextsrc-0.18.3.so
/usr/lib64/libgettextsrc.so
Comment 3 David Heidelberg (okias) 2013-12-30 21:33:46 UTC
first working try.

* use DOCS
* changed config.cache path to reflect multilib

Not sure about where is myconf variable used? I feel like nowhere :)

--- gettext-0.18.3.1-r1.ebuild  2013-12-16 08:31:35.000000000 +0100
+++ gettext-0.18.3.1-r2.ebuild  2013-12-30 22:27:11.743014354 +0100
@@ -4,7 +4,7 @@
 
 EAPI="4"
 
-inherit flag-o-matic eutils multilib toolchain-funcs mono-env libtool java-pkg-opt-2
+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/"
@@ -16,8 +16,8 @@
 IUSE="acl -cvs doc emacs git java nls +cxx ncurses openmp static-libs elibc_glibc"
 
 DEPEND="virtual/libiconv
-       dev-libs/libxml2
-       dev-libs/expat
+       dev-libs/libxml2[${MULTILIB_USEDEP}]
+       dev-libs/expat[${MULTILIB_USEDEP}]
        acl? ( virtual/acl )
        ncurses? ( sys-libs/ncurses )
        java? ( >=virtual/jdk-1.4 )"
@@ -27,14 +27,18 @@
        java? ( >=virtual/jre-1.4 )"
 PDEPEND="emacs? ( app-emacs/po-mode )"
 
+DOCS=( AUTHORS ChangeLog NEWS README THANKS )
+
 src_prepare() {
        epatch "${FILESDIR}"/${P}-use_m4_fallback_dir.patch #487794
        java-pkg-opt-2_src_prepare
        epunt_cxx
        elibtoolize
+
+       multilib_copy_sources
 }
 
-src_configure() {
+multilib_src_configure() {
        local myconf=""
        # Build with --without-included-gettext (on glibc systems)
        if use elibc_glibc ; then
@@ -42,6 +46,13 @@
        else
                myconf="${myconf} --with-included-gettext --enable-nls"
        fi
+
+       if multilib_is_native_abi; then
+               myconf+=" $(use_enable acl)
+                               $(use_enable java)
+                               $(use_enable ncurses curses)"
+       fi
+
        use cxx || export CXX=$(tc-getCC)
 
        # --without-emacs: Emacs support is now in a separate package
@@ -51,23 +62,20 @@
        # --with-included-libunistring will _disable_ libunistring (since
        # --it's not bundled), see bug #326477
        econf \
-               --cache-file="${S}"/config.cache \
+               --cache-file="${S}-${ABI}"/config.cache \
                --docdir="/usr/share/doc/${PF}" \
                --without-emacs \
                --without-lispdir \
-               $(use_enable java) \
                --with-included-glib \
                --with-included-libcroco \
                --with-included-libunistring \
-               $(use_enable acl) \
-               $(use_enable ncurses curses) \
                $(use_enable openmp) \
                $(use_enable static-libs static) \
                $(use_with git) \
                $(usex git --without-cvs $(use_with cvs))
 }
 
-src_install() {
+multilib_src_install() {
        emake install DESTDIR="${D}"
        use nls || rm -r "${D}"/usr/share/locale
        use static-libs || rm -f "${D}"/usr/lib*/*.la
@@ -99,8 +107,6 @@
                rm -rf "${D}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1}
        fi
        rm -f "${D}"/usr/share/doc/${PF}/*.html
-
-       dodoc AUTHORS ChangeLog NEWS README THANKS
 }
 
 pkg_preinst() {
Comment 4 Thomas Sachau gentoo-dev 2014-01-01 10:59:07 UTC
(In reply to David Heidelberger (okias) from comment #3)
> +       if multilib_is_native_abi; then

s/multilib_is_native_abi/multilib_build_binaries/
Comment 5 David Heidelberg (okias) 2014-01-01 17:44:27 UTC
Created attachment 366702 [details, diff]
gettext-0.18.3.1-r2.diff

improved version
Comment 6 David Heidelberg (okias) 2014-01-03 13:50:47 UTC
remineder^
Comment 7 David Heidelberg (okias) 2014-01-03 22:16:32 UTC
sys-devel/gettext-0.18.3.1-r2::ixit
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-01-04 10:25:25 UTC
I'm seriously wondering if we really want all the gettext tool libs. I doubt that many (if any) packages actually use those, and doubt even more that we will need them in multilib.

I'd just go for building gettext-runtime (libasprint & potential libintl) multilibby.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-01-04 11:14:44 UTC
Created attachment 366954 [details, diff]
Suggested patch to gettext-0.18.3.1-r1.ebuild

A few notes:

- only gettext-runtime is built for non-native ABIs (potential libintl + libasprintf),

- i've removed the libintl removal code since it doesn't get installed (anymore?),

- the USE=cxx hackery may be unwanted, since the configure seems to have --disable-c++ switch.
Comment 10 David Heidelberg (okias) 2014-01-04 14:07:39 UTC
checking for suffix of object files... configure: error: in `/var/tmp/portage/sys-devel/gettext-0.18.3.1-r2/work/gettext-0.18.3.1-amd64/gettext-runtime':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
configure: error: /var/tmp/portage/sys-devel/gettext-0.18.3.1-r2/work/gettext-0.18.3.1/gettext-runtime/configure failed for gettext-runtime

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sys-devel/gettext-0.18.3.1-r2/work/gettext-0.18.3.1-amd64/config.log

I end up with this.
Comment 11 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-01-16 13:37:00 UTC
+*gettext-0.18.3.2 (16 Jan 2014)
+
+  16 Jan 2014; Lars Wendler <polynomial-c@gentoo.org> +gettext-0.18.3.2.ebuild:
+  Version bump. Added multilib support (bug #496218).
+
p.masked until collisions with emul-linux-x86-baselibs were sorted out.