diff options
author | jlam <jlam> | 2002-09-06 14:25:24 +0000 |
---|---|---|
committer | jlam <jlam> | 2002-09-06 14:25:24 +0000 |
commit | acf2ccfd83d32198a4609d403f655e7af9b7458e (patch) | |
tree | 5c32735433c12c61a9b9c7d4dd49177736951cf4 | |
parent | 960f9e5bdf6b5a789e1bf3efc419a342ea29fbb1 (diff) | |
download | pkgsrc-acf2ccfd83d32198a4609d403f655e7af9b7458e.tar.gz |
Create _BLNK_PROTECT_SED and _BLNK_UNPROTECT_SED variables to protect
${_PKGSRCDIR} and ${BUILDLINK_DIR} from any filtering, as they may be
subdirectories of ${LOCALBASE}, /usr/pkg, or /usr/local.
This should fix pkg/18142 and other puzzling problems reported on the
tech-pkg mailing list where it was necessary to revert back to buildlink1
versions of packages in order to build when the pkgsrc tree or the work
directories are kept under /usr/local.
-rw-r--r-- | mk/buildlink2/bsd.buildlink2.mk | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/mk/buildlink2/bsd.buildlink2.mk b/mk/buildlink2/bsd.buildlink2.mk index ed5717fede6..108d400ac60 100644 --- a/mk/buildlink2/bsd.buildlink2.mk +++ b/mk/buildlink2/bsd.buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink2.mk,v 1.15 2002/09/06 07:21:28 jlam Exp $ +# $NetBSD: bsd.buildlink2.mk,v 1.16 2002/09/06 14:25:24 jlam Exp $ # # An example package buildlink2.mk file: # @@ -222,10 +222,23 @@ _BLNK_TRANSFORM+= r:-I/usr/local _BLNK_TRANSFORM+= r:-L/usr/local .endif # +# Create _BLNK_PROTECT_SED and _BLNK_UNPROTECT_SED variables to protect +# ${_PKGSRCDIR} and ${BUILDLINK_DIR} from any filtering, as they may be +# subdirectories of ${LOCALBASE}, /usr/pkg, or /usr/local. +# +_BLNK_PROTECT_SED= -e "s|${_PKGSRCDIR}|_pKgSrCdIr_|g" +_BLNK_PROTECT_SED+= -e "s|${BUILDLINK_DIR}|_bUiLdLiNk_dIr_|g" +_BLNK_UNPROTECT_SED= -e "s|_bUiLdLiNk_dIr_|${BUILDLINK_DIR}|g" +_BLNK_UNPROTECT_SED+= -e "s|_pKgSrCdIr_|${_PKGSRCDIR}|g" +# # Create _BLNK_TRANSFORM_SED.{1,2,3} from _BLNK_TRANSFORM. We must use # separate variables instead of just one because the contents are too long # for one variable when we substitute into a shell script later on. # +_BLNK_TRANSFORM_SED.1+= ${_BLNK_PROTECT_SED} +_BLNK_TRANSFORM_SED.2+= ${_BLNK_PROTECT_SED} +_BLNK_TRANSFORM_SED.3+= ${_BLNK_PROTECT_SED} +# # Change "/usr/pkg/lib/libfoo.so" into "-L/usr/pkg/lib -lfoo" and # "/usr/X11R6/lib/libbar.so" into "-L/usr/X11R6/lib -lbar". # @@ -343,6 +356,10 @@ _BLNK_TRANSFORM_SED.3+= \ -e "s|-L/usr/lib ||g" \ -e "s|-L/usr/lib$$||g" +_BLNK_TRANSFORM_SED.1+= ${_BLNK_UNPROTECT_SED} +_BLNK_TRANSFORM_SED.2+= ${_BLNK_UNPROTECT_SED} +_BLNK_TRANSFORM_SED.3+= ${_BLNK_UNPROTECT_SED} + # Generate wrapper scripts for the compiler tools that sanitize the # argument list by converting references to ${LOCALBASE} and ${X11BASE} # into references to ${BUILDLINK_DIR}, ${BUILDLINK_X11PKG_DIR}, and |