Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 548076 - media-libs/openjpeg - add multilib support
Summary: media-libs/openjpeg - add multilib support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-04-28 22:20 UTC by James Le Cuirot
Modified: 2016-12-09 17:49 UTC (History)
0 users

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


Attachments
Patch against openjpeg-2.1.0.ebuild (openjpeg-multilib.patch,1.71 KB, patch)
2015-04-28 22:20 UTC, James Le Cuirot
Details | Diff
Patch against openjpeg-2.1.0.ebuild (openjpeg-multilib.patch,1.46 KB, patch)
2015-04-29 22:47 UTC, James Le Cuirot
Details | Diff
Patch against openjpeg-2.1.0.ebuild (openjpeg-multilib.patch,1.43 KB, patch)
2015-04-30 09:43 UTC, James Le Cuirot
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Le Cuirot gentoo-dev 2015-04-28 22:20:33 UTC
Created attachment 402202 [details, diff]
Patch against openjpeg-2.1.0.ebuild

May I interest you in a patch for the openjpeg ebuild to add multilib support? It's very straightforward. I'd like to add multilib support to Leptonica and this is the only dependency that's missing it.
Comment 1 Alexis Ballier gentoo-dev 2015-04-29 06:54:01 UTC
that'd be great if things were so simple, however:

- docs shouldnt be built on non native abis
- executables shouldn't be built on non native abis
- openjpeg dependencies are only for the executables, libopenjp2 only uses the libc afaik, hence the ${MULTILIB_USEDEP} changes aren't needed
Comment 2 James Le Cuirot gentoo-dev 2015-04-29 22:47:47 UTC
Created attachment 402250 [details, diff]
Patch against openjpeg-2.1.0.ebuild

Fair enough, I was aware that those first two points would be beneficial but I hadn't seen any other ebuilds going out their way to do this. The current ebuild also builds the static executables when they're not needed either. Still, it's an interesting exercise so I'll bite! How's this?
Comment 3 Alexis Ballier gentoo-dev 2015-04-30 08:54:35 UTC
Comment on attachment 402250 [details, diff]
Patch against openjpeg-2.1.0.ebuild

>-src_configure() {
>+multilib_src_configure() {
> 	local mycmakeargs=(
> 		-DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)"
>-		$(cmake-utils_use_build doc)
> 		$(cmake-utils_use_build test TESTING)
>+		-DBUILD_CODEC=$(multilib_is_native_abi && echo ON || echo OFF)
>+		-DBUILD_DOC=$(multilib_is_native_abi && use doc && echo ON || echo OFF)
> 		)

maybe:
$(multilib_native_usex doc ON OFF)


otherwise, lgtm
Comment 4 James Le Cuirot gentoo-dev 2015-04-30 09:43:09 UTC
Created attachment 402282 [details, diff]
Patch against openjpeg-2.1.0.ebuild

Okay, done. Strange we have a helper for that but not for the simpler BUILD_CODEC case.

Shall I leave this with you so you can decide whether you want to backport it to the older SLOTs?
Comment 5 Alexis Ballier gentoo-dev 2015-04-30 12:57:55 UTC
(In reply to James Le Cuirot from comment #4)
> Created attachment 402282 [details, diff] [details, diff]

as far as i am concerned, feel free to commit

extras kudos if you can take this into account:


*openjpeg-1.5.1-r1 (11 Aug 2013)

  11 Aug 2013; Alexis Ballier <aballier@gentoo.org> +openjpeg-1.5.1-r1.ebuild:
  Convert to multilib. Do not build executables for the static libs build, drop
  the static-libs useflag propagation since the libs do not need it and we do
  not build the executables anymore.


by:
1. fixing static-libs propagation in your 2.1.0 rev bump
2. backporting style changes to 1.5.2: I think cmake-multilib wasn't multilib-build based and that multilib_native_usex didn't exist at that time
Comment 6 James Le Cuirot gentoo-dev 2015-04-30 13:06:22 UTC
D'oh, I didn't even notice you'd already done this to 1.5.2. No problem though, I'll get all that done later.
Comment 7 James Le Cuirot gentoo-dev 2015-05-01 21:49:13 UTC
Done. Unfortunately this couldn't be applied to 2.0.0 due to a header conflict. Fixed doxygen docs in all versions while I was at it.

I noticed that the tests won't run, even if you force them, because they require -DBUILD_CODEC=ON but given that they totally fail anyway, I didn't want to further complicate the configure logic.