public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] libpng slot usage
@ 2014-02-23 16:54 Fox
  2014-02-24  1:06 ` [gentoo-user] " eroen
  0 siblings, 1 reply; 3+ messages in thread
From: Fox @ 2014-02-23 16:54 UTC (permalink / raw
  To: gentoo-user

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gentoo-user] Re: libpng slot usage
  2014-02-23 16:54 [gentoo-user] libpng slot usage Fox
@ 2014-02-24  1:06 ` eroen
  2014-02-24 10:02   ` Fox
  0 siblings, 1 reply; 3+ messages in thread
From: eroen @ 2014-02-24  1:06 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2482 bytes --]

On Sun, 23 Feb 2014 17:54:07 +0100, Fox <halfsocialfox@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

-- 
eroen

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-user] Re: libpng slot usage
  2014-02-24  1:06 ` [gentoo-user] " eroen
@ 2014-02-24 10:02   ` Fox
  0 siblings, 0 replies; 3+ messages in thread
From: Fox @ 2014-02-24 10:02 UTC (permalink / raw
  To: gentoo-user

On 02/24/2014 02:06 AM, eroen wrote:
> On Sun, 23 Feb 2014 17:54:07 +0100, Fox <halfsocialfox@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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-24 10:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-23 16:54 [gentoo-user] libpng slot usage Fox
2014-02-24  1:06 ` [gentoo-user] " eroen
2014-02-24 10:02   ` Fox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox