tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg-config issue on macOS with builtin pkgs in OSX_SDK_PATH
Hi,
I have found that builtin package handling on macOS isn't fully aware
of OSX_SDK_PATH. When generating pkg-config files it sets the prefix
in the .pc file to /usr. This can lead to issues with some packages
that actually stat $prefix/include to see if it exists.
At least zlib and editline suffer from this problem, with for example
x11/qt6-qtbase failing like this due to zlib:
CMake Error in src/gui/CMakeLists.txt:
Imported target "WrapHarfbuzz::WrapHarfbuzz" includes non-existent path
"/usr/include"
Also, math/nickle fails to detect builtin editline correctly.
I would like to propose the following patch for this issue.
Don't have the hardware to do a full bulk build but I'm running
a pkgrrx of ~900 packages and will wait for it to finish before
committing anything.
Index: mk/buildlink3/bsd.buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/buildlink3/bsd.buildlink3.mk,v
retrieving revision 1.265
diff -p -u -r1.265 bsd.buildlink3.mk
--- mk/buildlink3/bsd.buildlink3.mk 11 Oct 2024 12:18:07 -0000 1.265
+++ mk/buildlink3/bsd.buildlink3.mk 1 May 2025 11:21:45 -0000
@@ -424,8 +424,10 @@ USE_BUILTIN.${_pkg_}?= no
_BLNK_PKG_DBDIR.${_pkg_}?= _BLNK_PKG_DBDIR.${_pkg_}_not_found
_BLNK_PKG_INFO.${_pkg_}?= ${TRUE}
BUILDLINK_PKGNAME.${_pkg_}?= ${_pkg_}
+. if defined(OSX_SDK_PATH)
+BUILDLINK_PREFIX.${_pkg_}?= ${OSX_SDK_PATH}/usr
# Usual systems has builtin packages in /usr
-. if exists(${TOOLS_CROSS_DESTDIR}/usr)
+. elif exists(${TOOLS_CROSS_DESTDIR}/usr)
BUILDLINK_PREFIX.${_pkg_}?= /usr
# Haiku OS has posix packages in /boot/sytem/develop (or /boot/common)
. elif exists(${TOOLS_CROSS_DESTDIR}/boot/system/develop)
Kind regards,
-Tobias
Home |
Main Index |
Thread Index |
Old Index