Page MenuHomeFreeBSD

Patch tcl pkgconf file: remove zlib Requirement.
ClosedPublic

Authored by jonathan on Dec 3 2015, 1:59 PM.

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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jonathan updated this revision to Diff 10698.Dec 3 2015, 1:59 PM
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.
gahr edited edge metadata.Dec 3 2015, 2:44 PM

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?

gahr added a comment.Dec 3 2015, 3:06 PM

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.

gahr added a comment.Dec 3 2015, 3:07 PM

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?

gahr added a comment.May 19 2016, 8:49 AM

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 updated this revision to Diff 18561.Jul 19 2016, 6:01 PM
jonathan edited edge metadata.
  • switch to Makefile-based patching with OSVERSION
gahr accepted this revision.Jul 20 2016, 7:09 AM
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.