Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153932772
D3099.id7010.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
10 KB
Referenced Files
None
Subscribers
None
D3099.id7010.diff
View Options
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_configure+= 470: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_patch+= 600:charsetfix-post-patch
.endif
Index: Mk/Uses/cran.mk
===================================================================
--- Mk/Uses/cran.mk
+++ Mk/Uses/cran.mk
@@ -70,11 +70,12 @@
.endif
.if ${cran_ARGS:Mauto-plist}
-.if !target(post-install-script)
-post-install-script:
+.if !target(cran-auto-plist)
+cran-auto-plist:
@${FIND} -ds ${STAGEDIR}${PREFIX}/${R_MOD_DIR} \( -type f -or -type l \) -print | \
${SED} -E -e 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST}
.endif
+_USES_install+= 750:cran-auto-plist
.endif
.endif #_INCLUDE_USES_CRAN_MK
Index: Mk/Uses/display.mk
===================================================================
--- Mk/Uses/display.mk
+++ Mk/Uses/display.mk
@@ -26,16 +26,12 @@
XVFBPIDFILE= /tmp/.xvfb-${XVFBPORT}.pid
MAKE_ENV+= DISPLAY=":${XVFBPORT}"
-.PHONY: start-display stop-display
-pre-${display_ARGS}: start-display
-
-post-${display_ARGS}: stop-display
-
-start-display:
+start-display::
daemon -p ${XVFBPIDFILE} Xvfb :${XVFBPORT}
-stop-display:
+stop-display::
pkill -15 -F ${XVFBPIDFILE}
+_USES_${display_ARGS}+= 290:start-display 860:stop-display
.endif
.endif
Index: Mk/Uses/kmod.mk
===================================================================
--- Mk/Uses/kmod.mk
+++ Mk/Uses/kmod.mk
@@ -39,7 +39,7 @@
.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_KMOD_POST_MK)
_INCLUDE_USES_KMOD_POST_MK= yes
-pre-install: ${STAGEDIR}${KMODDIR}
+_USES_install+= 290:${STAGEDIR}${KMODDIR}
${STAGEDIR}${KMODDIR}:
@${MKDIR} ${.TARGET}
Index: Mk/Uses/libtool.mk
===================================================================
--- Mk/Uses/libtool.mk
+++ Mk/Uses/libtool.mk
@@ -25,6 +25,7 @@
.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LIBTOOL_POST_MK)
_INCLUDE_USES_LIBTOOL_POST_MK= yes
+_USES_configure+= 480:patch-libtool
patch-libtool:
@${FIND} ${WRKDIR} \( -name configure -or -name ltconfig \) \
-type f | while read i; do ${SED} -i.libtool.bak \
@@ -60,6 +61,7 @@
-e '/if.*prog.*linkmode.*relink = .*mode/s/||.*;/;/' \
-e 's/|-p|-pg|/|-B*|-fstack-protector*|-p|-pg|/'
+_USES_stage+= 790:patch-lafiles
patch-lafiles:
.if ${libtool_ARGS:Mkeepla}
@${FIND} ${STAGEDIR} -type f -name '*.la' | \
Index: Mk/Uses/pathfix.mk
===================================================================
--- Mk/Uses/pathfix.mk
+++ Mk/Uses/pathfix.mk
@@ -18,6 +18,7 @@
PATHFIX_MAKEFILEIN?= Makefile.in
+_USES_patch+= 190:pathfix
pathfix:
@${FIND} ${WRKSRC} -name "${PATHFIX_MAKEFILEIN}" -type f | ${XARGS} ${REINPLACE_CMD} -e \
's|[(]libdir[)]/locale|(prefix)/share/locale|g ; \
Index: Mk/Uses/perl5.mk
===================================================================
--- Mk/Uses/perl5.mk
+++ Mk/Uses/perl5.mk
@@ -274,6 +274,7 @@
# In all those, don't use - before the command so that the user does
# not wonder what has been ignored by this message "*** Error code 1 (ignored)"
+_USES_install+= 560:fix-perl-things
fix-perl-things:
# Remove STAGEDIR from .packlist and add the file to the plist.
@(if [ -d ${STAGEDIR}${PACKLIST_DIR} ] ; then \
Index: Mk/Uses/shebangfix.mk
===================================================================
--- Mk/Uses/shebangfix.mk
+++ Mk/Uses/shebangfix.mk
@@ -60,6 +60,7 @@
_SHEBANG_REINPLACE_ARGS+= -e "1s|^\#![[:space:]]*${${lang}_OLD_CMD}|\#!${${lang}_CMD}|"
.endfor
+_USES_patch+= 210:fix-shebang
fix-shebang:
@cd ${WRKSRC}; \
${ECHO_CMD} ${SHEBANG_FILES} | ${XARGS} ${SED} -i '' ${_SHEBANG_REINPLACE_ARGS}
Index: Mk/bsd.port.mk
===================================================================
--- Mk/bsd.port.mk
+++ Mk/bsd.port.mk
@@ -1447,6 +1447,11 @@
DESTDIRNAME?= DESTDIR
+# setup empty variables for USES targets
+.for target in fetch extract patch configure build install package stage
+_USES_${target}?=
+.endfor
+
# Loading features
.for f in ${USES}
_f:= ${f:C/\:.*//}
@@ -5598,62 +5603,64 @@
# Define the SEQ of actions to take when each target is ran, and which targets
# it depends on before running its SEQ.
+#
+# Main target has a priority of 500, pre-target 30, post-target 700, target-depends 150.
-_SANITY_SEQ= post-chroot pre-everything check-makefile \
- show-warnings show-dev-warnings show-dev-errors \
- check-categories check-makevars check-desktop-entries \
- check-depends identify-install-conflicts check-deprecated \
- check-vulnerable check-license check-config buildanyway-message \
- options-message
+_SANITY_SEQ= 050:post-chroot 100:pre-everything 150:check-makefile \
+ 200:show-warnings 210:show-dev-warnings 220:show-dev-errors \
+ 250:check-categories 300:check-makevars 350:check-desktop-entries \
+ 400:check-depends 450:identify-install-conflicts 500:check-deprecated \
+ 550:check-vulnerable 600:check-license 650:check-config 700:buildanyway-message \
+ 750:options-message
_PKG_DEP= check-sanity
-_PKG_SEQ= pkg-depends
+_PKG_SEQ= 500: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= 150:fetch-depends 300:pre-fetch ${_OPTIONS_pre_fetch:C/^/300://} 450:pre-fetch-script \
+ 500:do-fetch 550:fetch-specials 700:post-fetch ${_OPTIONS_post_fetch:C/^/700:/} 850:post-fetch-script ${_USES_fetch}
_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
+_EXTRACT_SEQ= 010:check-build-conflicts 050:extract-message 100:checksum 150:extract-depends \
+ 190:clean-wrkdir 200:${WRKDIR} 300:pre-extract ${_OPTIONS_pre_extract} pre-extract-script do-extract \
+ post-extract ${_OPTIONS_post_extract} post-extract-script ${_USES_extract}
_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
+_PATCH_SEQ= 050:ask-license 100:patch-message 150:patch-depends 200:dos2unix \
+ 300:pre-patch ${_OPTIONS_pre_patch:C/^/300:/} \
+ 450:pre-patch-script 500:do-patch 700:post-patch ${_OPTIONS_post_patch:C/^/700:/} 850:post-patch-script ${_USES_patch}
_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
+_CONFIGURE_SEQ= 150:build-depends 151:lib-depends 200:configure-message \
+ 300:pre-configure ${_OPTIONS_pre_configure:C/^/300:/} 450:pre-configure-script \
+ 460:run-autotools 490:run-autotools-fixup 500:do-configure \
+ 700:post-configure ${_OPTIONS_post_configure:C/^/700:} 850:post-configure-script ${_USES_configure}
_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= 100:build-message 300:pre-build ${_OPTIONS_pre_build:C/^/300:/} 450:pre-build-script 500:do-build \
+ 700:post-build ${_OPTIONS_post_build:C/^/700:/} 850:post-build-script ${_USES_build}
_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 \
- 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 \
- 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 \
- move-uniquefiles-plist ${POST_PLIST}
+_STAGE_SEQ= 050:stage-message 100:stage-dir 150:run-depends 151:lib-depends 200:apply-slist 300:pre-install ${_OPTIONS_pre_install:C/^/300:/} ${_OPTIONS_pre_stage:C/^/300:/} 400:generate-plist \
+ 450:pre-su-install
+# ${POST_PLIST} must be after anything that modifies TMPPLIST, so it gets priority 990.
+_STAGE_SEQ+= 475:create-users-groups 500:do-install \
+ 550:kmod-post-install \
+ 600:webplugin-post-install 700:post-install ${_OPTIONS_post_install:C/^/700:/} 750:post-install-script \
+ 775:move-uniquefiles 800:post-stage ${_OPTIONS_post_stage:C/^/800:/} 850:compress-man \
+ 860:install-rc-script 870:install-ldconfig-file 880:install-license \
+ 890:install-desktop-entries 900:add-plist-info 910:add-plist-docs \
+ 920:add-plist-examples 930:add-plist-data 940:add-plist-post \
+ 950:move-uniquefiles-plist ${_USES_install} ${_USES_stage} ${POST_PLIST:C/^/990:/}
.if defined(DEVELOPER)
-_STAGE_SEQ+= stage-qa
+_STAGE_SEQ+= 995:stage-qa
.endif
_INSTALL_DEP= stage
-_INSTALL_SEQ= install-message run-depends lib-depends check-already-installed
-_INSTALL_SUSEQ= fake-pkg security-check
+_INSTALL_SEQ= 100:install-message 150:run-depends 151:lib-depends 200:check-already-installed
+_INSTALL_SUSEQ= 300:fake-pkg 500: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= 100:package-message 300:pre-package ${_OPTIONS_pre_package:C/^/300:/} 450:pre-package-script 500:do-package ${_OPTIONS_post_package:C/^/700:/} 850:post-package-script ${_USES_package}
# Enforce order for -jN builds
.for _t in ${_TARGETS_STAGES}
-. for s in ${_${_t}_SEQ}
+. for s in ${_${_t}_SEQ:O:C/^[0-9]+://}
. if target(${s})
. if ! ${NOTPHONY:M${s}}
_PHONY_TARGETS+= ${s}
@@ -5661,7 +5668,7 @@
_${_t}_REAL_SEQ+= ${s}
. endif
. endfor
-. for s in ${_${_t}_SUSEQ}
+. for s in ${_${_t}_SUSEQ:O:C/^[0-9]+://}
. if target(${s})
. if ! ${NOTPHONY:M${s}}
_PHONY_TARGETS+= ${s}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 25, 10:02 PM (9 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32144236
Default Alt Text
D3099.id7010.diff (10 KB)
Attached To
Mode
D3099: Add a simple way to have USES add targets.
Attached
Detach File
Event Timeline
Log In to Comment