diff options
author | jlam <jlam> | 2004-01-11 04:02:52 +0000 |
---|---|---|
committer | jlam <jlam> | 2004-01-11 04:02:52 +0000 |
commit | b858c22443076caef80c7e029e4a18638f1f55c1 (patch) | |
tree | 54f653ac63c1456c6462e8557fc55e032d0ec79e /mk/buildlink3 | |
parent | d541c8f3db19545082210aa6507b699b73666f10 (diff) | |
download | pkgsrc-b858c22443076caef80c7e029e4a18638f1f55c1.tar.gz |
Back out the changes in revision 1.41 which were much more complex than
they needed to be. Now, when we're emitting untransform rules, we:
(1) change everything back from ${BUILDLINK_DIR} and ${BUILDLINK_X11_DIR}
back into ${LOCALBASE} and ${X11BASE},
(2) protect ${LOCALBASE} and ${X11BASE} from changes,
(3) nuke all other compiler/linker options that have absolute paths that
we haven't blessed, and
(4) unmangle all of the protected directory names back into the right
names.
This should correctly fix the problem where "gtk-config --cflags" didn't
emit any directories for glib headers.
Diffstat (limited to 'mk/buildlink3')
-rw-r--r-- | mk/buildlink3/bsd.buildlink3.mk | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk index c88f1478ca6..ac8ad1073f8 100644 --- a/mk/buildlink3/bsd.buildlink3.mk +++ b/mk/buildlink3/bsd.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink3.mk,v 1.45 2004/01/10 22:22:50 jlam Exp $ +# $NetBSD: bsd.buildlink3.mk,v 1.46 2004/01/11 04:02:52 jlam Exp $ # # An example package buildlink3.mk file: # @@ -653,6 +653,7 @@ _BLNK_MANGLE_DIRS+= ${_BLNK_BUILTIN_DIRS} # directories to _BLNK_{,UN}PROTECT_DIRS below. # _BLNK_MANGLE_DIRS+= ${PREFIX} +_BLNK_MANGLE_DIRS+= ${LOCALBASE} _BLNK_MANGLE_DIRS+= ${X11BASE} _BLNK_MANGLE_START= _bUiLdLiNk_ @@ -693,13 +694,6 @@ _BLNK_UNPROTECT_DIRS+= ${BUILDLINK_DIR} _BLNK_TRANSFORM+= mangle:${_dir_}:${_BLNK_MANGLE_DIR.${_dir_}} .endfor # -# Protect ${PREFIX} and ${X11BASE} from change when untransforming, e.g. -# when unbuildlinkifying files. -# -.for _dir_ in ${PREFIX} ${X11BASE} -_BLNK_TRANSFORM+= untransform:mangle:${_dir_}:${_BLNK_MANGLE_DIR.${_dir_}} -.endfor -# # Change any buildlink directories in runtime library search paths into # the canonical actual installed paths. # @@ -719,8 +713,7 @@ _BLNK_TRANSFORM+= rpath:${_dir_}:${_BLNK_MANGLE_DIR.${_dir_}} # are just found in the default view. # .if ${PKG_INSTALLATION_TYPE} == "overwrite" -_BLNK_TRANSFORM+= transform:depot:${DEPOTBASE}:${LOCALBASE} -_BLNK_TRANSFORM+= untransform:depot:${DEPOTBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}} +_BLNK_TRANSFORM+= depot:${DEPOTBASE}:${LOCALBASE} .endif # # Convert direct paths to shared libraries into "-Ldir -llib" equivalents. @@ -738,11 +731,6 @@ _BLNK_TRANSFORM+= P:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}} _BLNK_TRANSFORM+= P:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}} .endif # -# Explicitly remove everything that's an absolute path when -# untransforming. -# -_BLNK_TRANSFORM+= untransform:r: -# # Transform references into ${X11BASE} into ${BUILDLINK_X11_DIR}. # .if defined(USE_X11) @@ -757,14 +745,20 @@ _BLNK_TRANSFORM+= I:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}} _BLNK_TRANSFORM+= L:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}} .endif # +# Protect any remaining references to ${PREFIX}, ${LOCALBASE}, or ${X11BASE}. +# +.for _dir_ in ${PREFIX} ${LOCALBASE} ${X11BASE} +_BLNK_TRANSFORM+= untransform:mangle:${_dir_}:${_BLNK_MANGLE_DIR.${_dir_}} +.endfor +# # Add any package specified transformations (l:, etc.) # _BLNK_TRANSFORM+= ${BUILDLINK_TRANSFORM} # -# Explicitly remove everything else that's an absolute path when -# transforming, since we've already protected the ones we care about. +# Explicitly remove everything else that's an absolute path, since we've +# already protected the ones we care about. # -_BLNK_TRANSFORM+= transform:r: +_BLNK_TRANSFORM+= r: # # Remove -Wl,-R* and *-rpath* if _USE_RPATH == "no". # Transform -Wl,-R* and *-rpath* if Sun compilers are used. @@ -780,10 +774,10 @@ _BLNK_TRANSFORM+= no-rpath _BLNK_TRANSFORM+= rpath:${_BLNK_MANGLE_DIR.${_dir_}}:${_dir_} .endfor # -# Undo the protection for ${PREFIX} and ${X11BASE} so that the directory -# names are correct, e.g. when unbuildlinkifying files. +# Undo the protection for ${PREFIX}, ${X11BASE} and ${X11BASE} so that the +# directory names are correct, e.g. when unbuildlinkifying files. # -.for _dir_ in ${PREFIX} ${X11BASE} +.for _dir_ in ${PREFIX} ${LOCALBASE} ${X11BASE} _BLNK_TRANSFORM+= untransform:mangle:${_BLNK_MANGLE_DIR.${_dir_}}:${_dir_} .endfor # |