Page MenuHomeFreeBSD

Patch tcl pkgconf file: remove zlib Requirement.
ClosedPublic

Authored by jonathan on Dec 3 2015, 1:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 23, 5:49 AM
Unknown Object (File)
Sun, Dec 22, 6:50 AM
Unknown Object (File)
Sat, Dec 14, 9:08 AM
Unknown Object (File)
Sat, Dec 7, 4:01 PM
Unknown Object (File)
Sat, Dec 7, 2:06 PM
Unknown Object (File)
Fri, Dec 6, 7:49 PM
Unknown Object (File)
Nov 25 2024, 1:59 PM
Unknown Object (File)
Nov 25 2024, 10:24 AM
Subscribers
None

Details

Summary

On FreeBSD 9, the 'Requires.private: zlib' line in tcl.pc causes breakage in
ports that use pkg-config tcl to build their cflags, libraries, etc. This
commit fixes at least the devel/libdistance build on 9; it may fix others, too.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jonathan retitled this revision from to Patch tcl pkgconf file: remove zlib Requirement..
jonathan updated this object.
jonathan edited the test plan for this revision. (Show Details)
jonathan added a reviewer: gahr.

How does the Requires.private break libdistance?

By the way, I just tried to build libdistance on 10.2-RELEASE-p7 and it doesn't build cause it's JOBS_UNSAFE.

Hi,

libdistance uses pkg-config --cflags tcl as part of its build configuration, which works fine on 10 and 11, but not on 9:

build9# pkg-config --cflags tcl
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 'tcl', not found

So, the patch I've proposed makes things that use pkg-config --cflags tcl work again on 9. Once 9-STABLE goes EoL we can probably remove the patch...

On the MAKE_JOBS_UNSAFE thing: I see what you mean now that I try to build with make -j12. Sorry, I'm still pretty new to porting... do I just set MAKE_JOBS_UNSAFE=yes in the Makefile?

Please patch only on 9, then.

Also, please note that you cannot freely rename the wrapper library, as Tcl is looking for the symbol <Library>_Init, in this case _Distance_wrap_Init, which it won't find.

do I just set MAKE_JOBS_UNSAFE=yes in the Makefile?

Yes please.

Sorry, I slightly let the ball drop here. How do I create a patch that only applies on one major version?

Sorry, I slightly let the ball drop here. How do I create a patch that only applies on one major version?

OSVERSION is your friend. See for example how x11/nvidia-driver conditionally patches based on that value. Valid values are those listed here: https://www.freebsd.org/doc/en/books/porters-handbook/book.html#versions

Most likely, you're looking for:

900010 March 22, 2010 9.0-CURRENT after the import of zlib 1.2.4.

jonathan edited edge metadata.
  • switch to Makefile-based patching with OSVERSION
gahr edited edge metadata.
This revision is now accepted and ready to land.Jul 20 2016, 7:09 AM
This revision was automatically updated to reflect the committed changes.