Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 11999 - SLOT libgd-2.x and libgd-1.x
Summary: SLOT libgd-2.x and libgd-1.x
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
: 22253 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-12-11 20:59 UTC by Nathaniel C. Domingo
Modified: 2003-06-26 11:30 UTC (History)
2 users (show)

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


Attachments
libgd-2.0.9.ebuild (libgd-2.0.9.tar.gz,758 bytes, text/plain)
2002-12-11 21:01 UTC, Nathaniel C. Domingo
Details
libgd-1.8.3-r7.ebuild (libgd-1.8.3-r7.ebuild,1.83 KB, text/plain)
2003-02-18 04:33 UTC, Eivind Tagseth
Details
libgd-2.0.9-r1.ebuild (libgd-2.0.9.ebuild,1.11 KB, text/plain)
2003-02-18 04:37 UTC, Eivind Tagseth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nathaniel C. Domingo 2002-12-11 20:59:31 UTC
attached is the ebuild for the latest libgd
Comment 1 Nathaniel C. Domingo 2002-12-11 21:01:20 UTC
Created attachment 6423 [details]
libgd-2.0.9.ebuild
Comment 2 Eivind Tagseth 2003-02-18 04:30:24 UTC
The libgd situation is a bit messy, some programs require version 1.8 or newer, but only work with 1.8.x, not with 2.x.  Is there a way to specifiy this dependency in the ebuild files?

Either way, this won't work, since you cannot have libgd-1.8.x and libgd-2.0.x installed at the same time.

I've changed the ebuilds for libgd-1.8 and libgd-2.0 to use SLOT and exist together without conflicts.  This requires some modification to the programs using libgd though (at least programs requiring the old version).  See how this works with my updated version of dev-perl/GD.


Eivind
Comment 3 Eivind Tagseth 2003-02-18 04:33:01 UTC
Created attachment 8411 [details]
libgd-1.8.3-r7.ebuild

Sets SLOT to "1.8", and installs includefiles in /usr/include/gd-1.8/.
The library is renamed to /usr/lib/libgd-1.8.a

Programs needing libgd-1.8 must change the include settings and library
settings.
Comment 4 Eivind Tagseth 2003-02-18 04:37:09 UTC
Created attachment 8413 [details]
libgd-2.0.9-r1.ebuild

Uses SLOT="2.0", installs headers into /usr/include/gd-2.0.

The library installs as before, the shared one should be ok, but the static
library will we overwritten by the next major release of libgd.

Programs compiled against libgd must be changed to add /usr/include/gd-2.0 to
the include path.
Comment 5 SpanKY gentoo-dev 2003-02-23 21:47:28 UTC
mine
Comment 6 SpanKY gentoo-dev 2003-02-23 23:21:45 UTC
in the meantime i added libgd-2.0.11 to portage and it works wonderfully with php ;)
Comment 7 SpanKY gentoo-dev 2003-04-29 06:29:52 UTC
will post update soon
Comment 8 SpanKY gentoo-dev 2003-06-06 13:56:17 UTC
*** Bug 22253 has been marked as a duplicate of this bug. ***
Comment 9 SpanKY gentoo-dev 2003-06-26 11:28:33 UTC
ok, ive added SLOT support to libgd !@

heres how it works ...

include files go into /usr/include/gd{majorver} ... so you have gd1 and gd2 ...
those files are symlinked inside /usr/include/ ... thus you have this:
/usr/include/gd.h -> /usr/include/gdX/gd.h
the same goes for the static library ... we have libgd1.a and libgd2.a and
libgd.a is a symlink to libgdX.a ...

now the tricky part :)
if you have only libgd-1.x installed, then the symlinks are all created and
the binaries are installed to support libgd-1.x

if you emerge libgd-2.x afterwards, the symlinks in /usr/include/ are overwritten,
as is the libgd.a symlink.  the binaries in /usr/bin/ also become ver2

if you emerge libgd-1.x later, it will detect you have libgd-2.x, and thus not
install the symlinks and binaries ... it will only install files that will not
clobber libgd-2.x

i tested all the packages that use libgd to build and they *all* build with libgd2 ...
that is why i am now making (in ~ARCH for now) libgd2 the default version ... oh
and its a lot better than 1.x ;)

the only other thing left to do is maybe add local useflags 'gd1' and 'gd2' to
both ebuilds so that the user can decide which binaries/include files/libraries
are symlinked to by default ... but i'll add that only if i get a request to ;)
Comment 11 SpanKY gentoo-dev 2003-06-26 11:30:32 UTC
why the hell cant i close this heh
Comment 12 SpanKY gentoo-dev 2003-06-26 11:30:48 UTC
there we go