Created attachment 264725 [details] fix freetype2.pc where bzip2.pc is missing Since 2.14.1 (PR 289576), when a package has been built on a machine with bzip2.pc, this package cannot be used on a machine without it: $ pkg-config freetype2 --libs Package bzip2 was not found in the pkg-config search path. Perhaps you should add the directory containing `bzip2.pc' to the PKG_CONFIG_PATH environment variable Package 'bzip2', required by 'freetype2', not found With the attached patch, the problem is solved: $ pkg-config freetype2 --libs -L/usr/local/lib -lfreetype
Looks like there's something else going on with your box? fetch "https://pkg.freebsd.org/FreeBSD:13:amd64/latest/All/freetype2-2.14.1.pkg" tar xf freetype2-2.14.1.pkg tar: Removing leading '/' from member names cat usr/local/libdata/pkgconfig/freetype2.pc .... Requires: Requires.private: zlib, libpng, libbrotlidec Libs: -L${libdir} -lfreetype Libs.private: -lbz2 Cflags: -I${includedir}/freetype2 pkg-config freetype2 --libs -L/usr/local/lib -lfreetype
Try the same commands for FreeBSD-16: $ fetch "https://pkg.freebsd.org/FreeBSD:16:amd64/latest/All/freetype2-2.14.1.pkg" $ tar xvf freetype2-2.14.1.pkg $ cat usr/local/libdata/pkgconfig/freetype2.pc prefix=/usr/local exec_prefix=${prefix} libdir=${prefix}/lib includedir=${prefix}/include Name: FreeType 2 URL: https://freetype.org Description: A free, high-quality, and portable font engine. Version: 26.4.20 Requires: Requires.private: zlib, bzip2, libpng, libbrotlidec Libs: -L${libdir} -lfreetype Libs.private: Cflags: -I${includedir}/freetype2 More precisely: $ grep Requires.private usr/local/libdata/pkgconfig/freetype2.pc Requires.private: zlib, bzip2, libpng, libbrotlidec
(In reply to Thierry Thomas from comment #2) 16 provides a pc file so I don't really see how you'd end up with your scenario unless you're mixing and matching build hosts and ports/packages which is to my knowledge not supported.
Just two 16-CURRENT of different dates: on one machine (the package builder) bzip2.pc exists, and you installs the package on another machine slightly older.
I'm closing this as its unsupported workflow/setup