summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam>2004-01-10 22:22:50 +0000
committerjlam <jlam>2004-01-10 22:22:50 +0000
commita84dab6801d32ebaf6ad852b4c26e64b8e6ed16d (patch)
tree7cbd8230afc82a2b63cada312ddfd86074f32dd0 /mk
parente9a761d0e1defd8c93110bd50d3387305b36801c (diff)
downloadpkgsrc-a84dab6801d32ebaf6ad852b4c26e64b8e6ed16d.tar.gz
If BUILDLINK_PREFIX.<pkg> is "/usr" and BUILDLINK_{INCDIRS,LIBDIRS}.<pkg>
lists values other "include" or "lib", then protect those directories from being eaten by the wrapper scripts. This allows -I/usr/include/krb5 to be passed safely through to the real compiler when heimdal/buildlink3.mk is included.
Diffstat (limited to 'mk')
-rw-r--r--mk/buildlink3/bsd.buildlink3.mk28
1 files changed, 27 insertions, 1 deletions
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk
index 8cf27d6d060..c88f1478ca6 100644
--- a/mk/buildlink3/bsd.buildlink3.mk
+++ b/mk/buildlink3/bsd.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.44 2004/01/10 10:52:09 jlam Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.45 2004/01/10 22:22:50 jlam Exp $
#
# An example package buildlink3.mk file:
#
@@ -294,6 +294,29 @@ BUILDLINK_LDFLAGS+= ${_COMPILER_LD_FLAG}${RPATH_FLAG}${_dir_}
. endfor
. endif
.endfor
+
+# _BLNK_BUILTIN_DIRS lists directories in /usr that shouldn't be stripped
+# from the command line by the wrapper scripts, e.g. /usr/include/krb5.
+#
+.for _pkg_ in ${_BLNK_PACKAGES}
+. if ${BUILDLINK_PREFIX.${_pkg_}} == "/usr"
+. if !empty(BUILDLINK_INCDIRS.${_pkg_}:Ninclude)
+. for _dir_ in ${BUILDLINK_INCDIRS.${_pkg_}:Ninclude:S/^/\/usr\//}
+. if exists(${_dir_})
+_BLNK_BUILTIN_DIRS+= ${_dir_}
+. endif
+. endfor
+. endif
+. if !empty(BUILDLINK_LIBDIRS.${_pkg_}:Nlib)
+. for _dir_ in ${BUILDLINK_LIBDIRS.${_pkg_}:Nlib:S/^/\/usr\//}
+. if exists(${_dir_})
+_BLNK_BUILTIN_DIRS+= ${_dir_}
+. endif
+. endfor
+. endif
+. endif
+.endfor
+
#
# Add the default view library directories to the runtime library search
# path so that wildcard dependencies on library packages can always be
@@ -624,6 +647,7 @@ _BLNK_MANGLE_DIRS+= ${BUILDLINK_DIR}
_BLNK_MANGLE_DIRS+= ${BUILDLINK_X11_DIR}
_BLNK_MANGLE_DIRS+= ${WRKDIR}
_BLNK_MANGLE_DIRS+= ${_BLNK_ALLOWED_RPATHDIRS}
+_BLNK_MANGLE_DIRS+= ${_BLNK_BUILTIN_DIRS}
# We only want these for the untransform case, so don't add these
# directories to _BLNK_{,UN}PROTECT_DIRS below.
@@ -648,6 +672,7 @@ _BLNK_UNPROTECT= # empty
_BLNK_PROTECT_DIRS+= ${BUILDLINK_DIR}
_BLNK_PROTECT_DIRS+= ${BUILDLINK_X11_DIR}
_BLNK_PROTECT_DIRS+= ${WRKDIR}
+_BLNK_PROTECT_DIRS+= ${_BLNK_BUILTIN_DIRS}
.if ${PKG_INSTALLATION_TYPE} == "pkgviews"
. for _pkg_ in ${_BLNK_PACKAGES}
. if !empty(BUILDLINK_IS_DEPOT.${_pkg_}:M[yY][eE][sS])
@@ -656,6 +681,7 @@ _BLNK_UNPROTECT_DIRS+= ${BUILDLINK_PREFIX.${_pkg_}}
. endif
. endfor
.endif
+_BLNK_UNPROTECT_DIRS+= ${_BLNK_BUILTIN_DIRS}
_BLNK_UNPROTECT_DIRS+= ${WRKDIR}
_BLNK_UNPROTECT_DIRS+= ${BUILDLINK_X11_DIR}
_BLNK_UNPROTECT_DIRS+= ${BUILDLINK_DIR}