diff options
author | joerg <joerg> | 2014-11-24 00:32:31 +0000 |
---|---|---|
committer | joerg <joerg> | 2014-11-24 00:32:31 +0000 |
commit | ba795e0da84115077ac10bdf94a76090f5e9f01b (patch) | |
tree | 26597f2d5441486aec548dbd8297821dbbe17292 /mk/buildlink3/bsd.buildlink3.mk | |
parent | 81deec58604d270463388f0e8662bbb6cd4c69f5 (diff) | |
download | pkgsrc-ba795e0da84115077ac10bdf94a76090f5e9f01b.tar.gz |
Add cwrappers glue as developed during Google's Summer of Code 2007.
Diffstat (limited to 'mk/buildlink3/bsd.buildlink3.mk')
-rw-r--r-- | mk/buildlink3/bsd.buildlink3.mk | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk index 9aae54f3405..74c23a8342e 100644 --- a/mk/buildlink3/bsd.buildlink3.mk +++ b/mk/buildlink3/bsd.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink3.mk,v 1.228 2014/10/31 16:14:07 wiz Exp $ +# $NetBSD: bsd.buildlink3.mk,v 1.229 2014/11/24 00:32:31 joerg Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -979,6 +979,7 @@ MAKEVARS+= _BLNK_PHYSICAL_PATH.${_var_} # Add any package specified transformations (l:, etc.) # _BLNK_TRANSFORM+= ${BUILDLINK_TRANSFORM} +_CWRAPPERS_TRANFORM+= ${BUILDLINK_TRANSFORM} # Transform all references to the physical paths to some important # directories into their given names. # @@ -998,6 +999,9 @@ _BLNK_TRANSFORM+= strip-slashdot: # .for _dir_ in ${_BLNK_PROTECT_DIRS} _BLNK_TRANSFORM+= mangle:${_dir_}:${_BLNK_MANGLE_DIR.${_dir_}} +_CWRAPPERS_TRANSFORM+= I:${_dir_}:${_dir_} +_CWRAPPERS_TRANSFORM+= L:${_dir_}:${_dir_} +_CWRAPPERS_TRANSFORM+= P:${_dir_}:${_dir_} .endfor # # Transform /usr/lib/../lib* to /usr/lib* so the following transformation @@ -1008,6 +1012,9 @@ _BLNK_TRANSFORM+= mangle:/usr/lib/../lib64:/usr/lib64 _BLNK_TRANSFORM+= mangle:/usr/lib/../lib:/usr/lib _BLNK_TRANSFORM+= mangle:/usr/lib/../lib32:/usr/lib32 _BLNK_TRANSFORM+= mangle:/usr/lib/../libx32:/usr/libx32 +_CWRAPPERS_TRANSFORM+= L:/usr/lib/../lib:/usr/lib +_CWRAPPERS_TRANSFORM+= L:/usr/lib/../lib32:/usr/lib32 +_CWRAPPERS_TRANSFORM+= L:/usr/lib/../libx32:/usr/libx32 .endif # # Protect -I/usr/include/* and -L/usr/lib/* from transformations (these @@ -1015,17 +1022,21 @@ _BLNK_TRANSFORM+= mangle:/usr/lib/../libx32:/usr/libx32 # .for _dir_ in ${COMPILER_INCLUDE_DIRS} _BLNK_TRANSFORM+= opt-sub:-I${_dir_}:-I${_BLNK_MANGLE_DIR.${_dir_}} +_CWRAPPERS_TRANSFORM+= I:${_dir_}:${_dir_} .endfor .for _dir_ in ${COMPILER_LIB_DIRS} _BLNK_TRANSFORM+= opt-sub:-L${_dir_}:-L${_BLNK_MANGLE_DIR.${_dir_}} ++_CWRAPPERS_TRANSFORM+= L:${_dir_}:${_dir_} .endfor # # Change any buildlink directories in runtime library search paths into # the canonical actual installed paths. # _BLNK_TRANSFORM+= rpath:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}:${LOCALBASE} +_CWRAPPERS_TRANSFORM+= R:${BUILDLINK_DIR}:${LOCALBASE} .if defined(USE_X11) && ${X11_TYPE} != "modular" _BLNK_TRANSFORM+= rpath:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}}:${X11BASE} +_CWRAPPERS_TRANSFORM+= R:${BUILDLINK_X11_DIR}:${X11BASE} .endif # # Protect some directories that we allow to be specified for the runtime @@ -1033,6 +1044,7 @@ _BLNK_TRANSFORM+= rpath:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}}:${X11BASE} # .for _dir_ in ${_BLNK_PASSTHRU_DIRS} ${_BLNK_PASSTHRU_RPATHDIRS} _BLNK_TRANSFORM+= rpath:${_dir_}:${_BLNK_MANGLE_DIR.${_dir_}} +_CWRAPPERS_TRANSFORM+= R:${_dir_}:${_dir_} .endfor # # Protect /usr/lib/* as they're all allowed to be specified for the @@ -1040,6 +1052,7 @@ _BLNK_TRANSFORM+= rpath:${_dir_}:${_BLNK_MANGLE_DIR.${_dir_}} # .for _dir_ in ${SYSTEM_DEFAULT_RPATH:S/:/ /g} _BLNK_TRANSFORM+= sub-rpath:${_dir_}:${_BLNK_MANGLE_DIR.${_dir}} +_CWRAPPERS_TRANSFORM+= R:/usr/lib:/usr/lib .endfor # # Change references to ${DEPOTBASE}/<pkg> into ${LOCALBASE} so that @@ -1055,8 +1068,10 @@ _BLNK_TRANSFORM+= depot:${DEPOTBASE}:${LOCALBASE} # .if ${PKG_INSTALLATION_TYPE} == "overwrite" _BLNK_TRANSFORM+= P:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}} +_CWRAPPERS_TRANSFORM+= P:${X11BASE}:${BUILDLINK_X11_DIR} . if defined(USE_X11) && ${X11_TYPE} != "modular" _BLNK_TRANSFORM+= P:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}} +_CWRAPPERS_TRANSFORM+= P:${LOCALBASE}:${BUILDLINK_DIR} . endif .endif # @@ -1067,6 +1082,8 @@ _BLNK_TRANSFORM+= P:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}} .if defined(USE_X11) && empty(LOCALBASE:M${X11BASE}*) && ${X11_TYPE} != "modular" _BLNK_TRANSFORM+= I:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}} _BLNK_TRANSFORM+= L:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}} +_CWRAPPERS_TRANSFORM+= I:${X11BASE}:${BUILDLINK_X11_DIR} +_CWRAPPERS_TRANSFORM+= L:${X11BASE}:${BUILDLINK_X11_DIR} .endif # # Transform references to ${LOCALBASE} into ${BUILDLINK_DIR}. @@ -1074,6 +1091,8 @@ _BLNK_TRANSFORM+= L:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}} .if ${PKG_INSTALLATION_TYPE} == "overwrite" _BLNK_TRANSFORM+= I:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}} _BLNK_TRANSFORM+= L:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}} +_CWRAPPERS_TRANSFORM+= I:${LOCALBASE}:${BUILDLINK_DIR} +_CWRAPPERS_TRANSFORM+= L:${LOCALBASE}:${BUILDLINK_DIR} .endif # # Transform references to ${X11BASE} into ${BUILDLINK_X11_DIR}. @@ -1083,6 +1102,8 @@ _BLNK_TRANSFORM+= L:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}} .if defined(USE_X11) && !empty(LOCALBASE:M${X11BASE}*) && ${X11_TYPE} != "modular" _BLNK_TRANSFORM+= I:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}} _BLNK_TRANSFORM+= L:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}} +_CWRAPPERS_TRANSFORM+= I:${X11BASE}:${BUILDLINK_X11_DIR} +_CWRAPPERS_TRANSFORM+= L:${X11BASE}:${BUILDLINK_X11_DIR} .endif # # Protect any remaining references to ${PREFIX}, ${LOCALBASE}, or ${X11BASE}. @@ -1136,6 +1157,10 @@ _BLNK_LIBTOOL_FIX_LA= ${WRAPPER_TMPDIR}/libtool-fix-la # We need to "unbuildlinkify" any libtool archives. _BLNK_WRAP_LT_UNTRANSFORM_SED= ${SUBST_SED.unwrap} +.if defined(USE_X11) && ${X11_TYPE} != "modular" +_CWRAPPERS_UNWRAP+= ${BUILDLINK_X11_DIR}:${X11BASE} +.endif +_CWRAPPERS_UNWRAP+= ${BUILDLINK_DIR}:${LOCALBASE} # The libtool wrapper should do all of the same transformations as the # compiler wrapper since the primary mode of operation of the wrapper |