1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-01 01:17:02 +00:00

Make all the targets in USES use the _USES_* helpers.

It is left as an exercise to the reader to reorder some of those targets
to fix some small problems, and to add a comment about why each target
is ran when it is ran.

Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D5717
This commit is contained in:
Mathieu Arnold 2016-04-22 09:24:34 +00:00
parent 0aea547be0
commit d5e588bc6e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=413768
4 changed files with 26 additions and 27 deletions

View File

@ -670,19 +670,14 @@ SUB_LIST+= GNOME_SUBR=${GNOME_SUBR}
_INCLUDE_USES_GNOME_POST_MK= yes
.if defined(GNOME_PRE_PATCH)
_USES_patch+= 290:gnome-pre-patch
gnome-pre-patch:
@${GNOME_PRE_PATCH:C/^;//1}
.endif
.if defined(GCONF_SCHEMAS) || defined(INSTALLS_OMF) || defined(INSTALLS_ICONS) \
|| defined(GLIB_SCHEMAS)
_USES_install+= 690:gnome-post-install
gnome-post-install:
. if defined(GCONF_SCHEMAS)
.if defined(GCONF_SCHEMAS)
_USES_install+= 690:gnome-post-gconf-schemas
gnome-post-gconf-schemas:
@for i in ${GCONF_SCHEMAS}; do \
${ECHO_CMD} "@postunexec env GCONF_CONFIG_SOURCE=xml:${GCONF_CONFIG_OPTIONS}:%D/${GCONF_CONFIG_DIRECTORY} HOME=${WRKDIR} gconftool-2 --makefile-uninstall-rule %D/etc/gconf/schemas/$${i} > /dev/null || /usr/bin/true" \
>> ${TMPPLIST}; \
@ -690,27 +685,33 @@ gnome-post-install:
${ECHO_CMD} "@postexec env GCONF_CONFIG_SOURCE=xml:${GCONF_CONFIG_OPTIONS}:%D/${GCONF_CONFIG_DIRECTORY} HOME=${WRKDIR} gconftool-2 --makefile-install-rule %D/etc/gconf/schemas/$${i} > /dev/null || /usr/bin/true" \
>> ${TMPPLIST}; \
done
. endif
.endif
# we put the @unexec behind the plist schema entry, because it compiles files
# in the directory. So we should remove the port file first before recompiling.
. if defined(GLIB_SCHEMAS)
.if defined(GLIB_SCHEMAS)
_USES_install+= 690:gnome-post-glib-schemas
gnome-post-glib-schemas:
@for i in ${GLIB_SCHEMAS}; do \
${ECHO_CMD} "share/glib-2.0/schemas/$${i}" >> ${TMPPLIST}; \
done
@${ECHO_CMD} "@glib-schemas" >> ${TMPPLIST};
.endif
. if defined(INSTALLS_OMF)
.if defined(INSTALLS_OMF)
_USES_install+= 690:gnome-post-omf
gnome-post-omf:
@for i in `${GREP} "\.omf$$" ${TMPPLIST}`; do \
${ECHO_CMD} "@postexec scrollkeeper-install -q %D/$${i} 2>/dev/null || /usr/bin/true" \
>> ${TMPPLIST}; \
${ECHO_CMD} "@postunexec scrollkeeper-uninstall -q %D/$${i} 2>/dev/null || /usr/bin/true" \
>> ${TMPPLIST}; \
done
. endif
.endif
. if defined(INSTALLS_ICONS)
.if defined(INSTALLS_ICONS)
_USES_install+= 690:gnome-post-icons
gnome-post-icons:
@${RM} -f ${TMPPLIST}.icons1
@for i in `${GREP} "^share/icons/.*/" ${TMPPLIST} | ${CUT} -d / -f 1-3 | ${SORT} -u`; do \
${ECHO_CMD} "@rmtry $${i}/icon-theme.cache" \
@ -725,7 +726,6 @@ gnome-post-install:
${RM} -f ${TMPPLIST}.icons1; \
${MV} -f ${TMPPLIST}.icons2 ${TMPPLIST}; \
fi
. endif
.endif
.endif

View File

@ -83,6 +83,7 @@ PKGDEINSTALL?= ${WRKDIR}/pear-deinstall
.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PEAR_POST_MK)
_INCLUDE_USES_PEAR_POST_MK= yes
_USES_install+= 250:pear-pre-install
pear-pre-install:
.if exists(${LOCALBASE}/lib/php.DIST_PHP) \
|| exists(${PHP_BASE}/lib/php.DIST_PHP) \
@ -110,7 +111,8 @@ DIRFILTER= ${SED} -En '\:^.*/[^/]*$$:s:^(.+)/[^/]*$$:\1:p' \
) | ${SORT} -ur
.if !defined(USE_PHPIZE)
do-autogenerate-plist: patch
_USES_install+= 260:do-autogenerate-plist
do-autogenerate-plist:
@${ECHO_MSG} "===> Generating packing list with pear"
@${LN} -sf ${WRKDIR}/package.xml ${WRKSRC}/package.xml
@cd ${WRKSRC} && ${PEAR} install -n -f -P ${WRKDIR}/inst package.xml > /dev/null 2> /dev/null
@ -128,9 +130,7 @@ do-autogenerate-plist: patch
@cd ${WRKDIR}/inst/${PREFIX} && ${FIND} . -type f | ${SORT} \
| ${CUT} -c 3- >> ${PLIST}
pre-install: pear-pre-install do-autogenerate-plist do-generate-deinstall-script
do-install: do-auto-install pear-post-install
_USES_install+= 450:do-auto-install
do-auto-install:
@cd ${WRKSRC} && ${PEAR} install -n -f -P ${STAGEDIR} package.xml
# Clean up orphans re-generated by pear-install
@ -140,9 +140,11 @@ do-auto-install:
.endfor
.endif
_USES_install+= 270:do-generate-deinstall-script
do-generate-deinstall-script:
@${SED} ${_SUB_LIST_TEMP} -e '/^@comment /d' ${PORTSDIR}/devel/pear/pear-deinstall.in > ${WRKDIR}/pear-deinstall
_USES_install+= 460:pear-post-install
pear-post-install:
@${MKDIR} ${STAGEDIR}${PKGREGDIR}
@${INSTALL_DATA} ${WRKDIR}/package.xml ${STAGEDIR}${PKGREGDIR}

View File

@ -494,11 +494,12 @@ PYDISTUTILS_PKGVERSION?=${PORTVERSION}
PYDISTUTILS_EGGINFO?= ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-py${PYTHON_VER}.egg-info
PYDISTUTILS_EGGINFODIR?=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
add-plist-egginfo:
.if !defined(_PYTHON_FEATURE_NOEGGINFO) && \
!defined(_PYTHON_FEATURE_AUTOPLIST) && \
defined(_PYTHON_FEATURE_DISTUTILS) && \
defined(PYTHON_REL)
_USES_stage+= 933:add-plist-egginfo
add-plist-egginfo:
. for egginfo in ${PYDISTUTILS_EGGINFO}
if [ -d "${PYDISTUTILS_EGGINFODIR}/${egginfo}" ]; then \
${LS} ${PYDISTUTILS_EGGINFODIR}/${egginfo} | while read f; do \
@ -506,15 +507,13 @@ add-plist-egginfo:
done; \
fi;
. endfor
.else
@${DO_NADA}
.endif
.if defined(_PYTHON_FEATURE_AUTOPLIST) && defined(_PYTHON_FEATURE_DISTUTILS)
_RELSITELIBDIR= ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;}
_RELLIBDIR= ${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;}
add-plist-post: add-plist-pymod
_USES_stage+= 934:add-plist-pymod
add-plist-pymod:
@${SED} -e 's|^${STAGEDIR}${PREFIX}/||' \
-e 's|^${PREFIX}/||' \
@ -533,7 +532,8 @@ PYOEXTENSION= pyo
.else
PYOEXTENSION= opt-1.pyc
.endif
add-plist-post:
_USES_stage+= 935:add-plist-python
add-plist-python:
@${AWK} '\
/\.py[co]$$/ && !($$0 ~ "/" pc "/") {id = match($$0, /\/[^\/]+\.py[co]$$/); if (id != 0) {d = substr($$0, 1, RSTART - 1); dirs[d] = 1}; sub(/\.pyc$$/, "." mt "&"); sub(/\.pyo$$/, "." mt "." pyo); sub(/[^\/]+\.py[co]$$/, pc "/&"); print; next} \
/^@dirrm / {d = substr($$0, 8); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \
@ -622,7 +622,5 @@ do-build:
do-install:
@(cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS})
.endif
add-plist-post: add-plist-egginfo
.endif # defined(_PYTHON_FEATURE_DISTUTILS)
.endif # defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PYTHON_POST_MK)

View File

@ -107,8 +107,7 @@ qmake-configure:
${SETENV} ${QMAKE_ENV} ${_QMAKE} ${QMAKE_ARGS} ${QMAKE_SOURCE_PATH}
.if !target(do-configure) && ! ${qmake_ARGS:M_env}
do-configure: qmake-configure
@${DO_NADA}
_USES_configure+= 450:qmake-configure
.endif
.endif # !defined(_INCLUDE_USES_QMAKE_MK)