Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk +++ Mk/bsd.port.mk @@ -859,6 +859,10 @@ # - The substitution process is the same as PLIST_FILES, as # described below except that any line beginning with @comment # is deleted. +# SUB_FILES_EARLY +# - Like SUB_FILES except that substitution occurs in the +# extract target allowing the files to be used in configure +# and build targets. # SUB_LIST - List of "variable=value" pair for substitution in ${SUB_FILES} # Some pairs are added by default: eg. PREFIX=${PREFIX} # @@ -4531,6 +4535,19 @@ .endif .endif +.if !target(apply-slist-early) +apply-slist-early: +.if defined(SUB_FILES_EARLY) +.for file in ${SUB_FILES_EARLY} +.if !exists(${FILESDIR}/${file}.in) + @${ECHO_MSG} "** Missing ${FILESDIR}/${file}.in for ${PKGNAME}."; exit 1 +.else + @${SED} ${_SUB_LIST_TEMP} -e '/^@comment /d' ${FILESDIR}/${file}.in > ${WRKDIR}/${file} +.endif +.endfor +.endif +.endif + # Generate packing list. Also tests to make sure all required package # files exist. @@ -5304,6 +5321,7 @@ _CONFIGURE_SEQ= 150:build-depends 151:lib-depends 160:create-binary-alias \ 161:create-binary-wrappers \ 200:configure-message \ + 250:apply-slist-early \ 300:pre-configure 450:pre-configure-script \ 490:run-autotools-fixup 500:do-configure 700:post-configure \ 850:post-configure-script \