Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 458380

Summary: media-libs/jasper: ebuild patch for multilib support
Product: Gentoo Linux Reporter: Mario Kicherer <dev>
Component: [OLD] LibraryAssignee: Patrick Kursawe (RETIRED) <phosphan>
Status: RESOLVED FIXED    
Severity: enhancement CC: hasufell, junghans, mgorny, mmk, pacho, sci
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: jasper-multlib.patch
jasper-multlib.patch
jasper-multilib.patch

Description Mario Kicherer 2013-02-19 23:38:37 UTC
jasper is one of the 32bit dependencies for certain steam-based games, see bug #446682. I patched the ebuild to use autotools-multilib eclass and it builds without errors. Unfortunately I don't have a 32bit application to test if it's really working.

Reproducible: Always
Comment 1 Mario Kicherer 2013-02-19 23:39:55 UTC
Created attachment 339462 [details, diff]
jasper-multlib.patch
Comment 2 Pavel Borisov 2013-02-20 00:19:37 UTC
Perfect.
This ebuild fixes The Book Of Unwritten Tales for me :) voting

offtop: are there another multilib packages in the tree? I reemerged the world with ABI_X86="32 64" and it did  nothing.
Comment 3 Christoph Junghans (RETIRED) gentoo-dev 2013-02-20 00:22:32 UTC
Comment on attachment 339462 [details, diff]
jasper-multlib.patch

>--- jasper-1.900.1-r5.ebuild	2013-02-18 23:01:20.000000000 +0100
>+++ jasper-1.900.1-r6.ebuild	2013-02-20 00:32:36.841004753 +0100
>-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
>+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
Why did you drop ~arm-linux?

> IUSE="jpeg opengl static-libs"
> 
> RDEPEND="jpeg? ( virtual/jpeg )
32-bit version will depend on emul packages
abi_x86_32? ( jpeg? || (  emul-baselibs virtual/jpeg[abi_x86_32(-)] )
and the same for the opengl stuff. 
>@@ -21,21 +21,23 @@
> DEPEND="${RDEPEND}
> 	app-arch/unzip"
> 
>-src_prepare() {
>-	epatch "${WORKDIR}"/${P}-fixes-20120611.patch
>-	elibtoolize
>-}
>+PATCHES=(
>+	"${WORKDIR}/${P}-fixes-20120611.patch"
>+	)
Good job, elibtoolize will run automatically for autotools-utils.

> 
> src_configure() {
>-	econf \
>-		$(use_enable jpeg libjpeg) \
>-		$(use_enable opengl) \
>-		$(use_enable static-libs static) \
>+	local myeconfargs=(
>+		$(use_enable jpeg libjpeg)
>+		$(use_enable opengl)
>+		$(use_enable static-libs static)
> 		--enable-shared
>+		)
>+	autotools-multilib_src_configure
Perfect.
> }
> 
> src_install() {
>-	emake DESTDIR="${D}" install || die
>+	autotools-multilib_src_install
>+
> 	dodoc NEWS README doc/*
Add DOCS=( NEWS README doc ) in the header and this line can go away
> 	find "${ED}" -name '*.la' -delete
prune_libtool_files is called by autotools-utils_src_install so this is redundant. 
> }
With these two lines removed src_install can go.
Comment 4 Christoph Junghans (RETIRED) gentoo-dev 2013-02-20 04:54:17 UTC
(In reply to comment #2)
> Perfect.
> This ebuild fixes The Book Of Unwritten Tales for me :) voting
> 
> offtop: are there another multilib packages in the tree? I reemerged the
> world with ABI_X86="32 64" and it did  nothing.
fftw has it, but we will hopefully start some trackers soon.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-02-20 09:36:52 UTC
(In reply to comment #3)
> > RDEPEND="jpeg? ( virtual/jpeg )
> 32-bit version will depend on emul packages
> abi_x86_32? ( jpeg? || (  emul-baselibs virtual/jpeg[abi_x86_32(-)] )
> and the same for the opengl stuff. 

I'd rather go with 'amd64? ( abi_x86_32? ( emul-* ) )' if we're going to commit it before the deps. When the deps are ready, just switch to a single virtual/jpeg[$MULTILIB_USEDEP].

Otherwise, those scary constructs may remain.

> > 	dodoc NEWS README doc/*
> Add DOCS=( NEWS README doc ) in the header and this line can go away

DOCS=( NEWS README doc/. ) rather. Otherwise 'doc' subdirectory will be created.
Comment 6 Mario Kicherer 2013-02-20 10:22:37 UTC
Created attachment 339490 [details, diff]
jasper-multlib.patch

I did not change the keywords. Maybe the ebuild in main tree was updated after I copied the ebuild.

Maybe we can also remove libtool eclass?
Comment 7 Pacho Ramos gentoo-dev 2013-02-20 20:43:26 UTC
This should be done by package maintainers, no?
Comment 8 Christoph Junghans (RETIRED) gentoo-dev 2013-02-20 21:14:16 UTC
(In reply to comment #6)
> Created attachment 339490 [details, diff] [details, diff]
> jasper-multlib.patch
> 
> I did not change the keywords. Maybe the ebuild in main tree was updated
> after I copied the ebuild.
> 
> Maybe we can also remove libtool eclass?
Yes, and eutils as well as autotools eclass takes care of that.
Otherwise it looks ready to be merged.

(In reply to comment #7)
> This should be done by package maintainers, no?
Yes, you are right.
Comment 9 Mario Kicherer 2013-02-20 21:19:41 UTC
Created attachment 339516 [details, diff]
jasper-multilib.patch

Okay, removed redundant eclasses.
Comment 10 Patrick Kursawe (RETIRED) gentoo-dev 2013-03-14 20:43:30 UTC
(In reply to comment #9)
> Created attachment 339516 [details, diff] [details, diff]
> jasper-multilib.patch
> 
> Okay, removed redundant eclasses.

What about this one?
Error(s) in metadata for 'media-libs/jasper-1.900.1-r6':
  DEPEND: USE flag 'amd64' referenced in conditional 'amd64?' is not in IUSE
  RDEPEND: USE flag 'amd64' referenced in conditional 'amd64?' is not in IUSE

I wonder if it makes any sense to put an arch into IUSE. How to get rid of this?
Comment 11 Justin Lecher (RETIRED) gentoo-dev 2013-03-17 16:40:35 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > Created attachment 339516 [details, diff] [details, diff] [details, diff]
> > jasper-multilib.patch
> > 
> > Okay, removed redundant eclasses.
> 
> What about this one?
> Error(s) in metadata for 'media-libs/jasper-1.900.1-r6':
>   DEPEND: USE flag 'amd64' referenced in conditional 'amd64?' is not in IUSE
>   RDEPEND: USE flag 'amd64' referenced in conditional 'amd64?' is not in IUSE
> 
> I wonder if it makes any sense to put an arch into IUSE. How to get rid of
> this?

It's always in IUSE.
Comment 12 Justin Lecher (RETIRED) gentoo-dev 2013-03-17 16:42:04 UTC
*jasper-1.900.1-r6 (17 Mar 2013)
+
+  17 Mar 2013; Justin Lecher <jlec@gentoo.org> +jasper-1.900.1-r6.ebuild,
+  metadata.xml:
+  Do multi X86_ABI build, #458380, thanks Mario Kicherer for the patch
+
Comment 13 Patrick Kursawe (RETIRED) gentoo-dev 2013-03-18 07:35:27 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #9)
> > > Created attachment 339516 [details, diff] [details, diff] [details, diff] [details, diff]
> > > jasper-multilib.patch
> > > 
> > > Okay, removed redundant eclasses.
> > 
> > What about this one?
> > Error(s) in metadata for 'media-libs/jasper-1.900.1-r6':
> >   DEPEND: USE flag 'amd64' referenced in conditional 'amd64?' is not in IUSE
> >   RDEPEND: USE flag 'amd64' referenced in conditional 'amd64?' is not in IUSE
> > 
> > I wonder if it makes any sense to put an arch into IUSE. How to get rid of
> > this?
> 
> It's always in IUSE.

That's a bit irritating:
http://devmanual.gentoo.org/ebuild-writing/variables/index.html

IUSE

(...)

Arch USE flags (sparc, mips, x86-fbsd and so on) should not be listed.
Comment 14 Justin Lecher (RETIRED) gentoo-dev 2013-03-18 07:43:46 UTC
(In reply to comment #13)
> That's a bit irritating:
> http://devmanual.gentoo.org/ebuild-writing/variables/index.html
> 
> IUSE
> 
> (...)
> 
> Arch USE flags (sparc, mips, x86-fbsd and so on) should not be listed.

They can be used without explicit listing.
Comment 15 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-11-09 10:39:29 UTC
*** Bug 490158 has been marked as a duplicate of this bug. ***
Comment 16 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-11-09 10:41:34 UTC
But please fix the issues that were fixed or pointed out in the newer bug/patch:

1. missing MULTILIB_USEDEP on jpeg & opengl,

2. remove the || () for emul-linux compat, we do that only for stuff that used to do multilib without the eclass in the past.
Comment 17 Justin Lecher (RETIRED) gentoo-dev 2013-11-09 11:31:08 UTC
Like this?

Index: jasper-1.900.1-r6.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/media-libs/jasper/jasper-1.900.1-r6.ebuild,v
retrieving revision 1.2
diff -u -B -r1.2 jasper-1.900.1-r6.ebuild
--- jasper-1.900.1-r6.ebuild	28 Aug 2013 14:51:42 -0000	1.2
+++ jasper-1.900.1-r6.ebuild	9 Nov 2013 11:30:48 -0000
@@ -18,17 +18,10 @@
 IUSE="jpeg opengl static-libs"
 
 RDEPEND="
-	jpeg? (
-		virtual/jpeg:0
-		amd64? (
-			abi_x86_32? ( app-emulation/emul-linux-x86-baselibs )
-			)
-		)
+	jpeg? ( virtual/jpeg:0[${MULTILIB_USEDEP}] )
 	opengl? (
-		virtual/opengl media-libs/freeglut
-		amd64? (
-			abi_x86_32? ( app-emulation/emul-linux-x86-opengl )
-			)
+		virtual/opengl[${MULTILIB_USEDEP}]
+		media-libs/freeglut[${MULTILIB_USEDEP}]
 		)"
 DEPEND="${RDEPEND}
 	app-arch/unzip"
Comment 18 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-11-09 11:57:55 UTC
Yes. But please consider also using :0 (or proper slots) in all potential multilib deps since we may be forced to introduce binary-only slots in the future.
Comment 19 Justin Lecher (RETIRED) gentoo-dev 2013-11-09 12:15:26 UTC
+  09 Nov 2013; Justin Lecher <jlec@gentoo.org> jasper-1.900.1-r6.ebuild:
+  Fix multilib support, #458380
+
Comment 20 Pacho Ramos gentoo-dev 2013-12-29 17:31:42 UTC
*** Bug 496378 has been marked as a duplicate of this bug. ***