From owner-svn-ports-head@freebsd.org Fri Apr 22 09:24:35 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DDA8B18F39; Fri, 22 Apr 2016 09:24:35 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51AF31D02; Fri, 22 Apr 2016 09:24:35 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3M9OYqh061352; Fri, 22 Apr 2016 09:24:34 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3M9OY5r061348; Fri, 22 Apr 2016 09:24:34 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201604220924.u3M9OY5r061348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Fri, 22 Apr 2016 09:24:34 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r413768 - head/Mk/Uses X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2016 09:24:35 -0000 Author: mat Date: Fri Apr 22 09:24:34 2016 New Revision: 413768 URL: https://svnweb.freebsd.org/changeset/ports/413768 Log: 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 Modified: head/Mk/Uses/gnome.mk head/Mk/Uses/pear.mk head/Mk/Uses/python.mk head/Mk/Uses/qmake.mk Modified: head/Mk/Uses/gnome.mk ============================================================================== --- head/Mk/Uses/gnome.mk Fri Apr 22 09:02:53 2016 (r413767) +++ head/Mk/Uses/gnome.mk Fri Apr 22 09:24:34 2016 (r413768) @@ -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 Modified: head/Mk/Uses/pear.mk ============================================================================== --- head/Mk/Uses/pear.mk Fri Apr 22 09:02:53 2016 (r413767) +++ head/Mk/Uses/pear.mk Fri Apr 22 09:24:34 2016 (r413768) @@ -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:^ ) | ${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} Modified: head/Mk/Uses/python.mk ============================================================================== --- head/Mk/Uses/python.mk Fri Apr 22 09:02:53 2016 (r413767) +++ head/Mk/Uses/python.mk Fri Apr 22 09:24:34 2016 (r413768) @@ -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) Modified: head/Mk/Uses/qmake.mk ============================================================================== --- head/Mk/Uses/qmake.mk Fri Apr 22 09:02:53 2016 (r413767) +++ head/Mk/Uses/qmake.mk Fri Apr 22 09:24:34 2016 (r413768) @@ -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)