On 02/24/2014 02:06 AM, eroen wrote:
On Sun, 23 Feb 2014 17:54:07 +0100, Fox <halfsocial...@gmail.com> wrote:
Hello,
I am trying to compile fltk-1.1.10 both using an ebuild from [1] and
with just the downloaded source. I think this version needs libpng
1.2 which is installed in one of the slots.

Using the source code and cmake with FLTK_USE_SYSTEM_PNG off it
complies fine. I can see that it automatically points the libs to
/usr/lib64/libpng12.so.0.

The ebuild does not use cmake, it uses autoconf/automake which is
also suported. I tried to build the code this way with
--disable/enable-localpng with no luck.

The problem is the used png.h file. Which is /usr/include/png.h which
points to /usr/include/libpng16/png.h but I need the one from version
1.2.

I thought slots would allow to have both versions of the library and
use them but only one include file is present:
$ equery f libpng:1.2
   * Searching for libpng:1.2 ...
   * Contents of media-libs/libpng-1.2.50-r1:
/usr
/usr/lib64
/usr/lib64/libpng12.so.0
/usr/share
/usr/share/doc
/usr/share/doc/libpng-1.2.50-r1
/usr/share/doc/libpng-1.2.50-r1/CHANGES.bz2
/usr/share/doc/libpng-1.2.50-r1/README.bz2
/usr/share/doc/libpng-1.2.50-r1/TODO.bz2

Any idea on how to solve this problem? Some how it should be possible
maybe not using the system lib like I did with cmake but I can't
figure it out how to do it with autoconf/automake.

Thank you,
Quim


[1]
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-libs/fltk/fltk-1.1.10.ebuild?view=log

The libpng slots, apart from "0", only install the shared library files,
not the headers. They are intended for compatibility with old binaries
for which no source code is available, not for building new software.

Afaik the common opinion is that different libpng versions are mostly
source compatible, and minor patching to other things is preferable to
inventing a non-standard way to make the libpng implementation
switchable at build-time.

Is there a reason you can not use fltk-1.1.10-r2.ebuild [1] in stead,
which incorporates a patch [2] for libpng-1.5 (which probably still
works with 1.6), as well as various other fixes?

1:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-libs/fltk/fltk-1.1.10-r2.ebuild
2:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-libs/fltk/files/fltk-1.1.10-libpng15.patch

I didn't know about this patch, this should make the job.




Reply via email to