Index: Mk/Uses/autoreconf.mk =================================================================== --- Mk/Uses/autoreconf.mk +++ Mk/Uses/autoreconf.mk @@ -84,5 +84,6 @@ .endif @(cd ${CONFIGURE_WRKSRC} && ${LOCALBASE}/bin/autoreconf -f -i) .endif +_USES_pre_configure+= do-autoreconf .endif Index: Mk/Uses/charsetfix.mk =================================================================== --- Mk/Uses/charsetfix.mk +++ Mk/Uses/charsetfix.mk @@ -22,5 +22,6 @@ -e 's|need_charset_alias=true|need_charset_alias=false|g ; \ s|test -f $$(charset_alias)|false|g ;\ s|test -f $$(DESTDIR)$$(libdir)/charset.alias|false|g' +_USES_post_patch+= charsetfix-post-patch .endif Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk +++ Mk/bsd.port.mk @@ -1447,6 +1447,13 @@ DESTDIRNAME?= DESTDIR +# setup empty variables for USES targets +.for target in fetch extract patch configure build install package stage +.for prepost in pre post +_USES_${prepost}_${target}?= +.endfor +.endfor + # Loading features .for f in ${USES} _f:= ${f:C/\:.*//} @@ -5609,33 +5616,33 @@ _PKG_DEP= check-sanity _PKG_SEQ= pkg-depends _FETCH_DEP= pkg -_FETCH_SEQ= fetch-depends pre-fetch ${_OPTIONS_pre_fetch} pre-fetch-script \ - do-fetch fetch-specials post-fetch ${_OPTIONS_post_fetch} post-fetch-script +_FETCH_SEQ= fetch-depends pre-fetch ${_OPTIONS_pre_fetch} ${_USES_pre_fetch:O} pre-fetch-script \ + do-fetch fetch-specials post-fetch ${_OPTIONS_post_fetch} ${_USES_post_fetch:O} post-fetch-script _EXTRACT_DEP= fetch _EXTRACT_SEQ= check-build-conflicts extract-message checksum extract-depends \ - clean-wrkdir ${WRKDIR} pre-extract ${_OPTIONS_pre_extract} pre-extract-script do-extract \ - post-extract ${_OPTIONS_post_extract} post-extract-script + clean-wrkdir ${WRKDIR} pre-extract ${_OPTIONS_pre_extract} ${_USES_pre_extract:O} pre-extract-script do-extract \ + post-extract ${_OPTIONS_post_extract} ${_USES_post_extract:O} post-extract-script _PATCH_DEP= extract _PATCH_SEQ= ask-license patch-message patch-depends pathfix dos2unix fix-shebang \ - pre-patch ${_OPTIONS_pre_patch} \ - pre-patch-script do-patch charsetfix-post-patch post-patch ${_OPTIONS_post_patch} post-patch-script + pre-patch ${_OPTIONS_pre_patch} ${_USES_pre_patch:O} \ + pre-patch-script do-patch post-patch ${_OPTIONS_post_patch} ${_USES_post_patch:O} post-patch-script _CONFIGURE_DEP= patch _CONFIGURE_SEQ= build-depends lib-depends configure-message \ - pre-configure ${_OPTIONS_pre_configure} pre-configure-script \ - run-autotools do-autoreconf patch-libtool run-autotools-fixup do-configure \ - post-configure ${_OPTIONS_post_configure} post-configure-script + pre-configure ${_OPTIONS_pre_configure} ${_USES_pre_configure:O} pre-configure-script \ + run-autotools patch-libtool run-autotools-fixup do-configure \ + post-configure ${_OPTIONS_post_configure} ${_USES_post_configure:O} post-configure-script _BUILD_DEP= configure -_BUILD_SEQ= build-message pre-build ${_OPTIONS_pre_build} pre-build-script do-build \ - post-build ${_OPTIONS_post_build} post-build-script +_BUILD_SEQ= build-message pre-build ${_OPTIONS_pre_build} ${_USES_pre_build:O} pre-build-script do-build \ + post-build ${_OPTIONS_post_build} ${_USES_post_build:O} post-build-script _STAGE_DEP= build -_STAGE_SEQ= stage-message stage-dir run-depends lib-depends apply-slist pre-install ${_OPTIONS_pre_install} ${_OPTIONS_pre_stage} generate-plist \ +_STAGE_SEQ= stage-message stage-dir run-depends lib-depends apply-slist pre-install ${_OPTIONS_pre_install} ${_USES_pre_install:O} ${_OPTIONS_pre_stage} ${_USES_pre_stage:O} generate-plist \ pre-su-install # ${POST_PLIST} must be after anything that modifies TMPPLIST _STAGE_SEQ+= create-users-groups do-install \ kmod-post-install fix-perl-things \ - webplugin-post-install post-install ${_OPTIONS_post_install} post-install-script \ - move-uniquefiles patch-lafiles post-stage ${_OPTIONS_post_stage} compress-man \ + webplugin-post-install post-install ${_OPTIONS_post_install} ${_USES_post_install:O} post-install-script \ + move-uniquefiles patch-lafiles post-stage ${_OPTIONS_post_stage} ${_USES_post_stage:O} compress-man \ install-rc-script install-ldconfig-file install-license \ install-desktop-entries add-plist-info add-plist-docs \ add-plist-examples add-plist-data add-plist-post \ @@ -5648,7 +5655,7 @@ _INSTALL_SUSEQ= fake-pkg security-check _PACKAGE_DEP= stage -_PACKAGE_SEQ= package-message pre-package ${_OPTIONS_pre_package} pre-package-script do-package ${_OPTIONS_post_package} post-package-script +_PACKAGE_SEQ= package-message pre-package ${_OPTIONS_pre_package} ${_USES_pre_package:O} pre-package-script do-package ${_OPTIONS_post_package} ${_USES_post_package:O} post-package-script # Enforce order for -jN builds