Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk +++ Mk/bsd.port.mk @@ -1059,6 +1059,7 @@ INDEXDIR?= ${PORTSDIR} SRC_BASE?= /usr/src USESDIR?= ${PORTSDIR}/Mk/Uses +USES_LOCAL_DIR?=${PORTSDIR}/Mk/Uses.local SCRIPTSDIR?= ${PORTSDIR}/Mk/Scripts LIB_DIRS?= /lib /usr/lib ${LOCALBASE}/lib STAGEDIR?= ${WRKDIR}/stage @@ -1492,7 +1493,7 @@ QA_ENV+= USESSHAREDMIMEINFO=yes .endif -# Loading features +# Load framework features .for f in ${USES} _f:= ${f:C/\:.*//} .if !defined(${_f}_ARGS) @@ -1503,6 +1504,17 @@ .include "${USESDIR}/${f:C/\:.*//}.mk" .endfor +# Loading user-defined features +.for f in ${USES_LOCAL} +_f:= ${f:C/\:.*//} +.if !defined(${_f}_ARGS) +${_f}_ARGS:= ${f:C/^[^\:]*(\:|\$)//:S/,/ /g} +.endif +.endfor +.for f in ${USES_LOCAL} +.include "${USES_LOCAL_DIR}/${f:C/\:.*//}.mk" +.endfor + .if defined(USE_BZIP2) EXTRACT_SUFX?= .tar.bz2 .elif defined(USE_XZ) @@ -1915,7 +1927,7 @@ USE_SUBMAKE= yes .endif -# Loading features +# Load framework features .for f in ${_USES_POST} _f:= ${f:C/\:.*//} .if !defined(${_f}_ARGS) @@ -1926,6 +1938,17 @@ .include "${USESDIR}/${f:C/\:.*//}.mk" .endfor +# Load user-defined features +.for f in ${_USES_LOCAL_POST} +_f:= ${f:C/\:.*//} +.if !defined(${_f}_ARGS) +${_f}_ARGS:= ${f:C/^[^\:]*(\:|\$)//:S/,/ /g} +.endif +.endfor +.for f in ${_USES_LOCAL_POST} +.include "${USES_LOCAL_DIR}/${f:C/\:.*//}.mk" +.endfor + .if defined(USE_XORG) # Add explicit X options to avoid problems with false positives in configure .if defined(GNU_CONFIGURE)