Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 499268 - media-libs/imlib: ebuild improvements
Summary: media-libs/imlib: ebuild improvements
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 367645 486372 492342 509030
  Show dependency tree
 
Reported: 2014-01-25 21:27 UTC by Greg Turner
Modified: 2016-10-09 11:06 UTC (History)
2 users (show)

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


Attachments
media-libs_imlib_overlaylet.tar.gz (media-libs_imlib-overlaylet.tar.gz,14.72 KB, application/gzip)
2014-01-25 21:28 UTC, Greg Turner
Details
media-libs_imlib-overlaylet-ebuild.diff (media-libs_imlib-overlaylet-ebuild.diff,2.17 KB, patch)
2014-01-25 21:29 UTC, Greg Turner
Details | Diff
media-libs_imlib-overlaylet-ebuild.diff (media-libs_imlib-overlaylet-ebuild.diff,2.24 KB, patch)
2014-01-26 04:55 UTC, Greg Turner
Details | Diff
media-libs_imlib_overlaylet.tar.gz (media-libs_imlib-overlaylet.tar.gz,14.73 KB, application/gzip-compressed-tar)
2014-01-26 04:57 UTC, Greg Turner
Details
imlib-1.9.15-myPrintGifError.patch (imlib-1.9.15-myPrintGifError.patch,4.74 KB, patch)
2014-05-31 11:42 UTC, Greg Turner
Details | Diff
imlib-1.9.15-giflib5support.patch (imlib-1.9.15-giflib5support.patch,1.03 KB, patch)
2014-05-31 11:44 UTC, Greg Turner
Details | Diff
imlib-1.9.15-t-load-requries-libx11.patch (imlib-1.9.15-t-load-requries-libx11.patch,433 bytes, patch)
2014-05-31 11:47 UTC, Greg Turner
Details | Diff
imlib-1.9.15-r4_to_r5.patch (imlib-1.9.15-r4_to_r5.patch,851 bytes, patch)
2014-05-31 11:54 UTC, Greg Turner
Details | Diff
imlib-1.9.15-r4_to_r5-spin2.patch (imlib-1.9.15-r4_to_r5-spin2.patch,970 bytes, patch)
2014-05-31 12:05 UTC, Greg Turner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Turner 2014-01-25 21:27:50 UTC
Blah.

Sorry, was trying to put my patches into, respectively, reasonable existing bugs, but this is just going to result in three or four different places to follow recipes to get a non-working ebuild.

On ~amd64, four different bugs to fix to make imlib work right.  I've thrown in multilib-utization as well.  I promise to investigate whether some of these should go upstream and take appropriate action, but I won't have time to do that for several hours.

Here's a sub-overlay that belongs as a subtree of media-libs, with a working, multilib imlib ebuild.

Reproducible: Always

Steps to Reproduce:
emerge media-libs/imlib


Actual Results:  
failure


I'll attach two files, the mini-overlay files, and a diff showing the (meaningful) differences between my overlay's ebuild and gx86's.
Comment 1 Greg Turner 2014-01-25 21:28:31 UTC
Created attachment 368724 [details]
media-libs_imlib_overlaylet.tar.gz
Comment 2 Greg Turner 2014-01-25 21:29:09 UTC
Created attachment 368726 [details, diff]
media-libs_imlib-overlaylet-ebuild.diff

This shows just the differences between my ebuild and upstream's.
Comment 3 Greg Turner 2014-01-25 22:47:37 UTC
Probably would help if I explained what I've changed, so:

* fixes various compilation failures due to recent-giflib incompatibilities (ie: #486372).  These may merit submission to upstream.

* fixes missing X11 library dependency (Not sure where this comes from.  I suspect this is a gentoo-specific issue, perhaps simply a result of the giflib-5 patches I added -- in which case, this too might merit upstream submission).

* fixes qa warnings due to LDFLAGS bleeding into pkgconfig .pc files

* multilib-utization (no interesting changes required).

I have not yet had the chance to make a thorough check for conflicts between this ebuild and emul-linux-x86 packages.  There may be some.  It's on my todo list so I'll update the bug if there prove to be any.
Comment 4 Greg Turner 2014-01-26 00:56:36 UTC
> I have not yet had the chance to make a thorough check for conflicts between
> this ebuild and emul-linux-x86 packages.  There may be some.  It's on my
> todo list so I'll update the bug if there prove to be any.

indeed, there are some

from emul-linux-x86-gtklibs we need:

usr/lib32/libImlib.so
usr/lib32/libImlib.so.1
usr/lib32/pkgconfig/imlib.pc
usr/lib32/libImlib.so.1.9.15

added to remove-native

and suitable blockers added.  So this would need, i.e.:

abi_x86_32? ( >=media-libs/imlib-1.9.15-r4 )

added to RDEPEND in emul-linux-x86-gktlibs, and 

BLOCKER="
abi_x86_32? ( !<=app-emulation/emul-linux-x86-gtklibs !app-emulation/emul-linux-x86-gtklibs
Comment 5 Greg Turner 2014-01-26 00:59:01 UTC
> from emul-linux-x86-gtklibs we need:
> 
> usr/lib32/libImlib.so
> usr/lib32/libImlib.so.1
> usr/lib32/pkgconfig/imlib.pc
> usr/lib32/libImlib.so.1.9.15
> 
> added to remove-native
> 
> and suitable blockers added.  So this would need, i.e.:
> 
> abi_x86_32? ( >=media-libs/imlib-1.9.15-r4 )
> 
> added to RDEPEND in emul-linux-x86-gktlibs, and 
> 
> BLOCKER="
> abi_x86_32? ( !<=app-emulation/emul-linux-x86-gtklibs
> !app-emulation/emul-linux-x86-gtklibs

sorry, premature clickification there.  the rest was:

BLOCKER="
  abi_x86_32? (
    !<=app-emulation/emul-linux-x86-gtklibs
    !app-emulation/emul-linux-x86-gtklibs[-abi_x86_32(-)]
  )"
RDEPEND+=" ${BLOCKER}"
DEPEND+=" ${BLOCKER}"

in the imlib ebuild.
Comment 6 Greg Turner 2014-01-26 01:02:45 UTC
> abi_x86_32? ( >=media-libs/imlib-1.9.15-r4 )

oops, this should really be

abi_x86_32 ( >=media-libs/imlib-1.9.15-r4[abi_x86_32(-)] )
Comment 7 Greg Turner 2014-01-26 04:55:53 UTC
Created attachment 368736 [details, diff]
media-libs_imlib-overlaylet-ebuild.diff

noop housekeeping update
Comment 8 Greg Turner 2014-01-26 04:57:41 UTC
Created attachment 368738 [details]
media-libs_imlib_overlaylet.tar.gz

noop housekeeping update
Comment 9 Julian Ospald 2014-04-18 14:50:18 UTC
+*imlib-1.9.15-r4 (18 Apr 2014)
+
+  18 Apr 2014; Julian Ospald <hasufell@gentoo.org> +imlib-1.9.15-r4.ebuild:
+  add multilib support wrt #499268


The non-multilib parts of your changes were not integrated. I leave that to the maintainer.
Comment 10 Greg Turner 2014-05-31 10:16:32 UTC
For the record, that leaves only the following unmerged bits:

--- media-libs/imlib/imlib-1.9.15-r4.ebuild        2014-04-18 07:58:35.000000000 -0700
+++ media-libs/imlib/imlib-1.9.15-r5.ebuild     2014-04-21 13:14:12.075355240 -0700
@@ -40,6 +42,11 @@
        epatch "${FILESDIR}"/${P}-asneeded.patch #207638
        epatch "${FILESDIR}"/${P}-libpng15.patch #357167
 
+       # 499268
+       epatch "${FILESDIR}"/${P}-giflib5support.patch
+       epatch "${FILESDIR}"/${P}-t-load-requries-libx11.patch
+       epatch "${FILESDIR}"/${P}-myPrintGifError.patch
+
        mkdir m4 && cp "${WORKDIR}"/gtk-1-for-imlib.m4 m4
 
        AT_M4DIR="m4" eautoreconf
@@ -55,6 +62,9 @@
 
 multilib_src_install() {
        emake DESTDIR="${D}" install || die
+       # fix ldflags leaking into pkgconifg
+       sed -e 's/-L\${libdir}.*-lImlib/-L${libdir} -lImlib/' \
+               -i "${ED}"/usr/$(get_libdir)/pkgconfig/imlib.pc || die
 }
 
 multilib_src_install_all() {
--

The three added patches in the attached tarball are still valid.  They can also be perused in gitweb:

http://git.overlays.gentoo.org/gitweb/?p=user/gmt.git;a=blob_plain;f=media-libs/imlib/files/imlib-1.9.15-giflib5support.patch;hb=1b0f087

http://git.overlays.gentoo.org/gitweb/?p=user/gmt.git;a=blob_plain;f=media-libs/imlib/files/imlib-1.9.15-t-load-requries-libx11.patch;hb=1b0f087

http://git.overlays.gentoo.org/gitweb/?p=user/gmt.git;a=blob_plain;f=media-libs/imlib/files/imlib-1.9.15-myPrintGifError.patch;hb=1b0f087
Comment 11 Greg Turner 2014-05-31 10:30:12 UTC
(In reply to Greg Turner from comment #10)
> The three added patches in the attached tarball are still valid.  They can
> also be perused in gitweb:
> 
> http://git.overlays.gentoo.org/gitweb/?p=user/gmt.git;a=blob_plain;f=media-
> libs/imlib/files/imlib-1.9.15-giflib5support.patch;hb=1b0f087
> 
> http://git.overlays.gentoo.org/gitweb/?p=user/gmt.git;a=blob_plain;f=media-
> libs/imlib/files/imlib-1.9.15-t-load-requries-libx11.patch;hb=1b0f087
> 
> http://git.overlays.gentoo.org/gitweb/?p=user/gmt.git;a=blob_plain;f=media-
> libs/imlib/files/imlib-1.9.15-myPrintGifError.patch;hb=1b0f087

Actually, I just noticed some thinkographical mistakes in myPrintGifError.patch.  I'll fix that, audit the rest and revise this bug presently once everything seems to be in order.
Comment 12 Greg Turner 2014-05-31 11:42:42 UTC
Created attachment 377932 [details, diff]
imlib-1.9.15-myPrintGifError.patch

updated version of imlib-1.9.15-myPrintGifError.patch; hopefully bug-free-ish now
Comment 13 Greg Turner 2014-05-31 11:44:22 UTC
Created attachment 377934 [details, diff]
imlib-1.9.15-giflib5support.patch

More giflib-compatibility cruft
Comment 14 Greg Turner 2014-05-31 11:47:47 UTC
Created attachment 377936 [details, diff]
imlib-1.9.15-t-load-requries-libx11.patch

Patch required by ebuild
Comment 15 Greg Turner 2014-05-31 11:54:47 UTC
Created attachment 377940 [details, diff]
imlib-1.9.15-r4_to_r5.patch

Updated ebuild diff (for clarity/clean patching -- no novel content relative to previously posted patch).
Comment 16 Greg Turner 2014-05-31 12:05:13 UTC
Created attachment 377942 [details, diff]
imlib-1.9.15-r4_to_r5-spin2.patch

Added yet another sed hack for generated pkgconfig files :(
Comment 17 David Leverton 2014-06-01 16:29:05 UTC
(In reply to Julian Ospald (hasufell) from comment #9)
> +*imlib-1.9.15-r4 (18 Apr 2014)
> +
> +  18 Apr 2014; Julian Ospald <hasufell@gentoo.org> +imlib-1.9.15-r4.ebuild:
> +  add multilib support wrt #499268
> 
> 
> The non-multilib parts of your changes were not integrated. I leave that to
> the maintainer.

So now it's just plain broken - it requires multilib giflib, but all the giflib ebuilds with multilib support have the PrintGifError change.  The ebuild succeeds as long as you don't try to run the tests (hooray for C and implicit declarations), but trying to link any program using the library results in

/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../lib64/libImlib.so: undefined reference to `PrintGifError'

Sure, this was the case previously for anyone using the newer giflib, but now that the emul- packages rely on the from-source multilib imlib and giflib, I now basically /have/ to use one of the affected versions.
Comment 18 Greg Turner 2014-06-29 08:10:40 UTC
(In reply to David Leverton from comment #17)
> (In reply to Julian Ospald (hasufell) from comment #9)
> > The non-multilib parts of your changes were not integrated. I leave that to
> > the maintainer.
> 
> So now it's just plain broken - it requires multilib giflib, but all the
> giflib ebuilds with multilib support have the PrintGifError change.

I guess, for now, if you actually want imlib to work, your best bet is to copy it from my overlay (please do NOT install my overlay via layman, unless you happen to be a techno-masochist):

http://git.overlays.gentoo.org/gitweb/?p=user/gmt.git;a=snapshot;h=60a425e2ec2b6e93f552873de0ba7c10fcc66d34;sf=tbz2

Perhaps by muddling things together, I've done the community a disservice.  If nothing happens for a week or two, I'll file a separate bug and close this one, to hopefully get the right eyeballs on it.
Comment 19 Greg Turner 2014-06-29 08:16:38 UTC
Anyone taking the above advice should probably apply the following patch to my ebuild:

--- a/media-libs/imlib/imlib-1.9.15-r5.ebuild
+++ b/media-libs/imlib/imlib-1.9.15-r5.ebuild
@@ -29,7 +29,7 @@ RDEPEND=">=media-libs/tiff-3.5.5[${MULTILIB_USEDEP}]
        )"
 DEPEND="${RDEPEND}"
 
-MULTILIB_WRAPPED_EXECUTABLES=(@/usr/bin/imlib-config)
+MULTILIB_CHOST_TOOLS=(/usr/bin/imlib-config)
 
 src_prepare() {
        # Fix aclocal underquoted definition warnings.
--
Comment 20 Pacho Ramos gentoo-dev 2016-10-09 11:06:52 UTC
should be fixed in 1.9.15-r5