ProcursusTeam / Procursus

Modern *OS Bootstrap
https://apt.procurs.us
BSD Zero Clause License
868 stars 126 forks source link

libpng16-dev should depend on zlib #289

Closed deatondg closed 3 years ago

deatondg commented 3 years ago

Running pkg-config --libs libpng results in

Package zlib was not found in the pkg-config search path.                                                                                                                                  
Perhaps you should add the directory containing `zlib.pc'                                                                                                                                  
to the PKG_CONFIG_PATH environment variable                                                                                                                                                
Package 'zlib', required by 'libpng', not found          

but zlib is not in Procursus.

I will fix this with a PR (that also fixes a few other small things) in a few minutes.

CRKatri commented 3 years ago

zlib is an apple provided lib, we don't have pkgconfig stuff for it, so just edit the libpng.pc to remove the zlib dep and add -lz to you LDFLAGS.

deatondg commented 3 years ago

Oh, I see. I already have a copy of zlib building in Procursus. Is it worth submitting that?

CRKatri commented 3 years ago

Please do not, it will conflict with apple, you could submit a patch to remove the zlib dependency from libpng.pc however.

deatondg commented 3 years ago

Gotcha. Alternatively, would it be a good idea to make a zlib package which just provides the pkgconfig file so that anything else depending on zlib from pkg-config will know where to find it?

CRKatri commented 3 years ago

I think it'd be better to just patch the pkgconfig files to remove it as a dep but leave the stuff to link it. Although having a pkgconfig for zlib may not be a bad idea if a configure script is looking for it...

deatondg commented 3 years ago

Makes sense to me. Thanks for the info! I appreciate it.

On my system, a configure script is looking for it, but I can just make that for myself until someone else requests it. I’ll make a PR which fixes the pkgconfig file from libpng in a little bit.