Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 488998 - x11-libs/gdk-pixbuf - add multilib support
Summary: x11-libs/gdk-pixbuf - add multilib support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks: gx86-multilib 489000 499170
  Show dependency tree
 
Reported: 2013-10-22 11:53 UTC by Andrew Church
Modified: 2014-03-05 08:33 UTC (History)
2 users (show)

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


Attachments
gdk-pixbuf-2.28.2.ebuild.patch (gdk-pixbuf-2.28.2.ebuild.patch,2.48 KB, patch)
2013-10-22 11:53 UTC, Andrew Church
Details | Diff
gdk-pixbuf-2.28.2.ebuild.patch (gdk-pixbuf-2.28.2.ebuild.patch,2.78 KB, patch)
2013-12-30 19:52 UTC, Andrew Church
Details | Diff
gdk-pixbuf-2.28.2.ebuild.patch (gdk-pixbuf-2.28.2.ebuild.patch,2.78 KB, patch)
2014-01-17 06:30 UTC, Andrew Church
Details | Diff
gdk-pixbuf-2.28.2.ebuild.patch (gdk-pixbuf-2.28.2.ebuild.patch,2.45 KB, patch)
2014-01-17 08:27 UTC, Andrew Church
Details | Diff
gdk-pixbuf-2.28.2.ebuild.patch (gdk-pixbuf-2.28.2.ebuild.patch,2.45 KB, patch)
2014-01-17 15:29 UTC, Andrew Church
Details | Diff
gdk-pixbuf-2.28.2.ebuild.patch (gdk-pixbuf-2.28.2.ebuild.patch,2.29 KB, patch)
2014-01-17 19:30 UTC, Andrew Church
Details | Diff
gdk-pixbuf-2.30.4.ebuild.patch (gdk-pixbuf-2.30.4.ebuild.patch,2.35 KB, patch)
2014-02-10 07:20 UTC, Andrew Church
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Church 2013-10-22 11:53:45 UTC
Created attachment 361606 [details, diff]
gdk-pixbuf-2.28.2.ebuild.patch

Dependency of GTK+.

The gdk-pixbuf-query-loaders-32 bit is copied out of emul-linux-x86-gtklibs (with appropriate changes for native multilib).
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2013-10-28 13:50:01 UTC
Can't we just use program-suffix instead of moving bins around ?
Comment 2 Andrew Church 2013-10-28 14:52:31 UTC
>Can't we just use program-suffix instead of moving bins around ?

I thought about that, but that would install all of the binaries (gdk-pixbuf-csource, gdk-pixbuf-pixdata, gdk-pixbuf-query-loaders) when the only one we actually need a 32-bit version of is query-loaders.  We could rm the unneeded ones, but as long as we're modifying the install anyway, it seemed more concise to just skip program-suffix.
Comment 3 Christoph Junghans (RETIRED) gentoo-dev 2013-12-30 19:02:04 UTC
Due to the recent discussions on multilib@gentoo.org, should the binary be named ${CHOST}-gdk-* ? And multilib_build_binaries should be used to decide if all binaries should be build.
Comment 4 Andrew Church 2013-12-30 19:52:34 UTC
Created attachment 366592 [details, diff]
gdk-pixbuf-2.28.2.ebuild.patch

Thanks for the review.  I've updated the patch to use mutilib_build_binaries, and it will now use a ${CHOST}- prefix on non-native ABI binaries -- is that what you intended?  (I'm not on multilib@gentoo.org and I can't find a list archive offhand.)
Comment 5 Christoph Junghans (RETIRED) gentoo-dev 2014-01-12 01:47:31 UTC
We should wait until Michał's latest patch to wrap binaries gets merged and use the functions provided therein.
Comment 6 Christoph Junghans (RETIRED) gentoo-dev 2014-01-16 22:51:16 UTC
MULTILIB_CHOST_TOOLS from multilib-build.eclass can now be used.
Comment 7 Andrew Church 2014-01-17 06:30:16 UTC
Created attachment 367984 [details, diff]
gdk-pixbuf-2.28.2.ebuild.patch

Patch updated.  It works fine for me, but I'm not sure whether or how MULTILIB_CHOST_TOOLS would interact with --program-prefix in the multilib_build_binaries && ! multilib_is_native_abi case.  Will the eclass deal with that properly?
Comment 8 Jonathan Callen (RETIRED) gentoo-dev 2014-01-17 07:27:35 UTC
Please don't hardcode lib32 in pkg_postinst(), instead do something like this:

do_update() {
    local GDK_PIXBUF_UPDATE_BIN=/usr/bin/${CHOST}-gdk-pixbuf-query-loaders
    gnome2_gdk_pixbuf_update
}

multilib_foreach_abi do_update

This way, all ABIs get updated and the correct libdir is used for each ABI (for instance, I have LIBDIR_x86=lib, and *no* lib32 dir on my system).
Comment 9 Andrew Church 2014-01-17 08:27:45 UTC
Created attachment 367986 [details, diff]
gdk-pixbuf-2.28.2.ebuild.patch

Done.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-01-17 15:14:51 UTC
Comment on attachment 367986 [details, diff]
gdk-pixbuf-2.28.2.ebuild.patch

>--- gdk-pixbuf-2.28.2.ebuild.orig	2013-09-04 07:01:36 +0900
>+++ gdk-pixbuf-2.28.2.ebuild	2014-01-17 17:24:52 +0900
>@@ -4,7 +4,7 @@
>-src_configure() {
>+multilib_src_configure() {
>+	local program_prefix=""
>+	if multilib_build_binaries && ! multilib_is_native_abi; then
>+		program_prefix="--program-prefix=${CHOST}-"
>+	fi

What does it do? Aren't you basically mixing eclass renaming with some custom renaming?

> 	# png always on to display icons
>+	ECONF_SOURCE="${S}" \
> 	econf \
>+		${program_prefix} \
> 		$(usex debug --enable-debug=yes "") \
> 		$(use_with jpeg libjpeg) \
> 		$(use_with jpeg2k libjasper) \
> 		$(use_with tiff libtiff) \
>-		$(use_enable introspection) \
>+		$(multilib_is_native_abi \
>+			&& use_enable introspection \
>+			|| echo --disable-introspection) \

multilib_build_binaries here. You should never use multilib_is_native_abi.

>+do_update() {
>+	local GDK_PIXBUF_UPDATE_BIN=/usr/bin/${CHOST}-gdk-pixbuf-query-loaders
>+	gnome2_gdk_pixbuf_update
>+}

Can't we move this logic to the eclass? I don't think it'd hurt anything if it had a search logic similar to autoconf.
Comment 11 Andrew Church 2014-01-17 15:29:56 UTC
Created attachment 368014 [details, diff]
gdk-pixbuf-2.28.2.ebuild.patch

>What does it do? Aren't you basically mixing eclass renaming with some custom >renaming?

This is to handle binaries other than gdk-pixbuf-query-loaders (which is always installed for all ABIs).  Isn't program-prefix necessary when building binaries for non-native ABIs?  Or do you just assume a separate prefix for each ABI in that case?

>multilib_build_binaries here. You should never use multilib_is_native_abi.

Done.

>Can't we move this logic to the eclass? I don't think it'd hurt anything if it >had a search logic similar to autoconf.

SGTM.  Should I put a patch here or open a separate bug for it?
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-01-17 15:38:34 UTC
(In reply to Andrew Church from comment #11)
> >What does it do? Aren't you basically mixing eclass renaming with some custom >renaming?
> 
> This is to handle binaries other than gdk-pixbuf-query-loaders (which is
> always installed for all ABIs).  Isn't program-prefix necessary when
> building binaries for non-native ABIs?  Or do you just assume a separate
> prefix for each ABI in that case?

Does it make sense to wrap all of them? I'd rather you use the eclass renaming since it keeps basename working.

> >Can't we move this logic to the eclass? I don't think it'd hurt anything if it >had a search logic similar to autoconf.
> 
> SGTM.  Should I put a patch here or open a separate bug for it?

Wait for gnome@'s reply.
Comment 13 Thomas Sachau gentoo-dev 2014-01-17 15:52:45 UTC
-src_configure() {
+multilib_src_configure() {
+	local program_prefix=""
+	if multilib_build_binaries && ! multilib_is_native_abi; then
+		program_prefix="--program-prefix=${CHOST}-"
+	fi

This part does make no sense at all and means your assignment will never be done. multilib_is_native_abi and multilib_build_binaries by default return the same.
Comment 14 Andrew Church 2014-01-17 16:08:00 UTC
>Does it make sense to wrap all of them? I'd rather you use the eclass renaming >since it keeps basename working.

Not really, since only gdk-pixbuf-query-loaders is needed for all ABIs.  E.g. on multilib amd64, we still need i686-...-query-loaders to generate the loader cache for 32-bit programs, but the other binaries only need amd64 versions.

>This part does make no sense at all and means your assignment will never be >done. multilib_is_native_abi and multilib_build_binaries by default return the >same.

Then how does one tell whether building for a non-native ABI?
Comment 15 Thomas Sachau gentoo-dev 2014-01-17 16:17:57 UTC
(In reply to Andrew Church from comment #14)
> >This part does make no sense at all and means your assignment will never be >done. multilib_is_native_abi and multilib_build_binaries by default return the >same.
> 
> Then how does one tell whether building for a non-native ABI?

multilib_build_binaries can be used the same way as previously multilib_is_default_abi, so just check for a false of multilib_build_binaries.

As a short information: multilib_build_binaries is the same as multilib_is_native_abi, but it can be overriden for external use-cases like multilb-portage. After initial introduction, where it was only planned for conditional building of binaries, it has been shown that it is instead a complete replacement for multilib_is_native_abi, so you should always use multilib_build_binaries instead of multilib_is_native_abi.
Comment 16 Andrew Church 2014-01-17 19:29:30 UTC
>As a short information: multilib_build_binaries is the same as
>multilib_is_native_abi, but it can be overriden for external use-cases like
>multilb-portage. After initial introduction, where it was only planned for
>conditional building of binaries, it has been shown that it is instead a
>complete replacement for multilib_is_native_abi, so you should always use
>multilib_build_binaries instead of multilib_is_native_abi.

Hmm, okay... I think the is_native_abi name is clearer, but whatever (:
In that case I'll just drop the program-prefix setting since there won't be multiple ABI versions of non-wrapped binaries.
Comment 17 Andrew Church 2014-01-17 19:30:26 UTC
Created attachment 368032 [details, diff]
gdk-pixbuf-2.28.2.ebuild.patch
Comment 18 Christoph Junghans (RETIRED) gentoo-dev 2014-01-24 04:44:22 UTC
Looks ok to me.
Comment 19 Christoph Junghans (RETIRED) gentoo-dev 2014-02-07 22:41:28 UTC
ping @ gnome!
Comment 20 Gilles Dartiguelongue (RETIRED) gentoo-dev 2014-02-09 12:38:59 UTC
Sorry but adding multilib support is not our #1 priority right now. We will process these reports as soon as possible but our focus is on stabilizing Gnome 3.8 and 3.10 and stop being months late in Gnome releases. Thanks for your understanding.
Comment 21 Pacho Ramos gentoo-dev 2014-02-09 13:07:45 UTC
Anyway, if people from multilib has time to review the patches and they consider them ok, no problem with going ahead and committing on a new revision as done already with glib (for example) and other gnome maintained stuff
Comment 22 Christoph Junghans (RETIRED) gentoo-dev 2014-02-09 18:27:11 UTC
As said above the patch looks good to me.

@mgorny: any final comments?
Comment 23 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-02-09 22:13:29 UTC
Could you update the patch for the latest ebuild, please? It does no longer apply cleanly.
Comment 24 Andrew Church 2014-02-10 07:20:07 UTC
Created attachment 370008 [details, diff]
gdk-pixbuf-2.30.4.ebuild.patch

Here you go.
Comment 25 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-02-10 08:01:29 UTC
Well, it's missing a proper blocker against emul-linux-x86-gtklibs. Other than that, looks fine.

@gnome: though I'd honestly prefer having some kind of 'type -p' check for ${CHOST}-gdk-pixbuf-query-loaders.
Comment 26 Andrew Church 2014-02-10 08:50:23 UTC
Did you want me to add the emul-linux blocker?  I figured that would have to be synced with an update to emul-linux-x86-gtklibs so I left it out.
Comment 27 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-03-01 10:20:35 UTC
+*gdk-pixbuf-2.30.5-r1 (01 Mar 2014)
+
+  01 Mar 2014; Michał Górny <mgorny@gentoo.org> +gdk-pixbuf-2.30.5-r1.ebuild:
+  Introduce multilib support, bug #488998.

+*emul-linux-x86-gtklibs-20131008-r3 (01 Mar 2014)
+
+  01 Mar 2014; Michał Górny <mgorny@gentoo.org>
+  +emul-linux-x86-gtklibs-20131008-r3.ebuild, +files/remove-native-20131008-r3:
+  Add gdk-pixbuf.
Comment 28 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-03-01 10:25:54 UTC
Well, let's mark it FIXED to have dep-graph updated.
Comment 29 Alexandre Rostovtsev (RETIRED) gentoo-dev 2014-03-05 06:15:18 UTC
In 2.30.6-r1 pkg_postrm(), why are you using "rm -f "${EROOT}"usr/lib*/${PN}-2.0/2.10.0/loaders.cache" instead of "multilib_foreach_abi rm -f "${EROOT}"usr/$(get_libdir)/${PN}-2.0/2.10.0/loaders.cache"?

It shouldn't cause problems for users with sane profiles, but it looks strange.
Comment 30 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-03-05 08:33:59 UTC
(In reply to Alexandre Rostovtsev from comment #29)
> In 2.30.6-r1 pkg_postrm(), why are you using "rm -f
> "${EROOT}"usr/lib*/${PN}-2.0/2.10.0/loaders.cache" instead of
> "multilib_foreach_abi rm -f
> "${EROOT}"usr/$(get_libdir)/${PN}-2.0/2.10.0/loaders.cache"?
> 
> It shouldn't cause problems for users with sane profiles, but it looks
> strange.

For proper $(get_libdir) expansion, it would have to go to a sub-function. I doubt it makes real sense but feel free to change that.