tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: finding png libraries in configure scripts



> On Aug 7, 2020, at 12:13 PM, Thomas Klausner <tk%giga.or.at@localhost> wrote:
> 
> On Fri, Aug 07, 2020 at 12:02:40PM -0600, Brook Milligan wrote:
>> I am working on a package that uses png but the configure script tries to find libpng.so not libpng16.so.  Note that it does this by looking for the file directly not linking.
> 
> Well, it shouldn't do that :)

Yes, don't we all wish things were done right.

>> What is the best way to handle this.
>> 
>> - Patch configure to look for libpng16.so?
> 
> I'd probably either patch the Makefile to use pkg-config and send that
> upstream, or find some combination of MAKE_FLAGS/MAKE_ENV that
> overrides its detection method.

I've been investigating the pkg-config approach, because that seemed cleanest.  However, it leads to another issue with the libpng.pc file that is installed by the png package.  That file includes "Requires: zlib", which might be reasonable because png does in fact require zlib. However, zlib might be built-in in which case no zlib.pc file is installed.  As a result, pkg-config libpng fails.

Should the libpng.pc file installed by pkgsrc be modified (i.e., include or not the Required: zlib line) depending on whether or not zlib is builtin?

What is the correct solution here?

Thanks.

Cheers,
Brook




Home | Main Index | Thread Index | Old Index