diff options
author | jlam <jlam@pkgsrc.org> | 2004-02-19 12:50:47 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-02-19 12:50:47 +0000 |
commit | b4081e63006b5ced0e7d62f5a35a30d7acb1ea73 (patch) | |
tree | 060adcc712b4acbe4bdf016de3d5ae92cca0001b /mk | |
parent | 7af2f4a0a2f85b959d6d2e9327270e31d89084cb (diff) | |
download | pkgsrc-b4081e63006b5ced0e7d62f5a35a30d7acb1ea73.tar.gz |
Resolve ${LOCALBASE} to its phyiscal path and mangle it back into
${LOCALBASE}. Some packages' configure scripts resolve all paths to
physical paths, and since buildlink3 suppresses references outside of
${LOCALBASE}, it can break the build of those packages.
This should fix the problem noted by Nathan Williams in the thread
titled "x11/tk build failure" at:
http://mail-index.netbsd.org/tech-pkg/2004/02/17/0004.html
Diffstat (limited to 'mk')
-rw-r--r-- | mk/buildlink3/bsd.buildlink3.mk | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk index 379eafd7ddf..15bf6cf4138 100644 --- a/mk/buildlink3/bsd.buildlink3.mk +++ b/mk/buildlink3/bsd.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink3.mk,v 1.95 2004/02/19 07:41:44 jlam Exp $ +# $NetBSD: bsd.buildlink3.mk,v 1.96 2004/02/19 12:50:47 jlam Exp $ # # An example package buildlink3.mk file: # @@ -759,16 +759,6 @@ _BLNK_PASSTHRU_RPATHDIRS+= ${BUILDLINK_PASSTHRU_RPATHDIRS} # _BLNK_PASSTHRU_RPATHDIRS:= ${_BLNK_PASSTHRU_RPATHDIRS:N/usr/lib} -# Resolve the path to ${WRKDIR} completely in case it's a symlink. -.if !defined(_BLNK_WRKDIR) -_BLNK_WRKDIR!= if [ -d ${WRKDIR} ]; then \ - cd ${WRKDIR}; ${PWD_CMD}; \ - else \ - ${ECHO} ${WRKDIR}; \ - fi -MAKEFLAGS+= _BLNK_WRKDIR=${_BLNK_WRKDIR:Q} -.endif - _BLNK_MANGLE_DIRS= # empty _BLNK_MANGLE_DIRS+= ${BUILDLINK_DIR} _BLNK_MANGLE_DIRS+= ${BUILDLINK_X11_DIR} @@ -816,11 +806,31 @@ _BLNK_UNPROTECT_DIRS+= ${WRKDIR} _BLNK_UNPROTECT_DIRS+= ${BUILDLINK_X11_DIR} _BLNK_UNPROTECT_DIRS+= ${BUILDLINK_DIR} -# Transform all references to the physical path to ${WRKDIR} into ${WRKDIR}. +# Resolve some important directories to their phyiscal paths as symlinks +# tend to confuse buildlink3. # -.if ${_BLNK_WRKDIR} != ${WRKDIR} -_BLNK_TRANSFORM+= mangle:${_BLNK_WRKDIR}:${WRKDIR} -.endif +_BLNK_PHYSICAL_PATH_VARS?= WRKDIR LOCALBASE +.for _var_ in ${_BLNK_PHYSICAL_PATH_VARS} +. if !defined(_BLNK_PHYSICAL_PATH.${_var_}) +_BLNK_PHYSICAL_PATH.${_var_}!= \ + if [ -d ${${_var_}} ]; then \ + cd ${${_var_}}; ${PWD_CMD}; \ + else \ + ${ECHO} ${${_var_}}; \ + fi +MAKEFLAGS+= _BLNK_PHYSICAL_PATH.${_var_}=${_BLNK_PHYSICAL_PATH.${_var_}:Q} +. endif +.endfor + +# Transform all references to the physical paths to some important +# directories into their given names. +# +.for _var_ in ${_BLNK_PHYSICAL_PATH_VARS} +. if (${_BLNK_PHYSICAL_PATH.${_var_}} != ${${_var_}}) && \ + empty(${_var_}:M${_BLNK_PHYSICAL_PATH.${_var_}}/*) +_BLNK_TRANSFORM+= mangle:${_BLNK_PHYSICAL_PATH.${_var_}}:${${_var_}} +. endif +.endfor # # Protect work directories and the dependency directories from all the # transformations we're about to do. |