Bug 80414 - fbi depends on both libungif and libgif
Bug#: 80414 Product:  Gentoo Linux Version: unspecified Platform: x86
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: spock@gentoo.org Reported By: stsp@binarchy.net
Component: Ebuilds
URL: 
Summary: fbi depends on both libungif and libgif
Keywords:  
Status Whiteboard: 
Opened: 2005-02-01 20:20 0000
Description:   Opened: 2005-02-01 20:20 0000
fbi-1.31.ebuild has a hardcoded dependency on both libungif and giflib.
This is not necessary.

------- Comment #1 From Stefan Sperling 2005-02-01 20:23:16 0000 -------
Created an attachment (id=50190) [details]
this patch makes fbi depend on either giflib or libungif

I tested this patch twice, having only giflib installed the first time 
and libungif the second time. Works fine here.

------- Comment #2 From Michal Januszewski 2005-02-05 15:03:16 0000 -------
Actually, it's not that easy. Please notice that with only giflib installed,
gif.c  never gets compiled and with only libungif installed, the compilation
fails (bug #78243).

------- Comment #3 From Stefan Sperling 2005-02-05 16:07:12 0000 -------
I knew about bug #78243, but I couldn't reproduce it the other day.
Now I even know why :)

I just looked into this again, and you are partially right:
Compilation fails if giflib is not installed _and_ USE=gif is set.

This is the relevant line from the libungif ebuild:

    use gif && rm -r "${D}"/usr/bin "${D}"/usr/include/gif_lib.h

It removes gif_lib.h, assuming giflib already provides it.
fbi then fails to include the header.

The fbi makefile only checks for libungif and ignores giflib as you rightly
pointed out. fbi compiles fine with gif_lib.h from libungif (just tested).

fbi should check the gif useflag and depend on both libgif
and libungif if the flag is set, and on only libungif is the flag is not set.

I could imagine that there are other ebuilds in the tree that trip
over giflib/libungif madness. It's a nuisance, really. Damn patents...

There actually is an open bug on this: bug #18820

------- Comment #4 From Michal Januszewski 2005-02-06 09:15:28 0000 -------
If the 'gif' flag is not set, fbi shouldn't depend on either library, as it is
likely that the user simply doesn't want support for the GIF fileformat.

------- Comment #5 From Stefan Sperling 2005-02-06 09:54:08 0000 -------
that's exactly why the gif useflag is currently ambigious.
again, please see bug #18820 and add your comments.

------- Comment #6 From Michal Januszewski 2005-03-23 06:25:26 0000 -------
Fixed in -r1.

------- Comment #7 From Michal Januszewski 2005-03-23 06:25:38 0000 -------
Fixed in -r1.