Index: head/CHANGES =================================================================== --- head/CHANGES +++ head/CHANGES @@ -10,6 +10,11 @@ All ports committers are allowed to commit to this file. +20140901: +AUTHOR: bapt@FreeBSD.org + + Support for NO_STAGE has been removed + 20140825: AUTHOR: antoine@FreeBSD.org Index: head/Mk/Uses/cran.mk =================================================================== --- head/Mk/Uses/cran.mk +++ head/Mk/Uses/cran.mk @@ -51,12 +51,6 @@ R_POSTCMD_CHECK_OPTIONS+= --no-manual --no-rebuild-vignettes .endif -.if defined(NO_STAGE) -check-makevars:: - @${ECHO_MSG} "Makefile error: USE_R_MOD cannot be used with NO_STAGE" - @${FALSE} -.endif - regression-test: build @cd ${WRKDIR} ; ${SETENV} ${MAKE_ENV} _R_CHECK_FORCE_SUGGESTS_=FALSE \ ${R_COMMAND} ${R_PRECMD_CHECK_OPTIONS} CMD check \ Index: head/Mk/Uses/desktop-file-utils.mk =================================================================== --- head/Mk/Uses/desktop-file-utils.mk +++ head/Mk/Uses/desktop-file-utils.mk @@ -19,10 +19,6 @@ RUN_DEPENDS+= update-desktop-database:${PORTSDIR}/devel/desktop-file-utils desktop-file-post-install: -.if defined(NO_STAGE) -# run for port post-install - @-update-desktop-database -q -.endif # plist entries for packages. @${ECHO_CMD} "@exec ${LOCALBASE}/bin/update-desktop-database -q > /dev/null || /usr/bin/true" \ >> ${TMPPLIST}; \ Index: head/Mk/Uses/python.mk =================================================================== --- head/Mk/Uses/python.mk +++ head/Mk/Uses/python.mk @@ -497,9 +497,6 @@ # - it links against libpython*.so # - it uses USE_PYTHON=distutils # -.if defined(NO_STAGE) && defined(_PYTHON_FEATURE_CONCURRENT) -BROKEN= USE_PYTHON=concurrent uses USES=uniquefiles, which is not stage-safe -.endif .if defined(_PYTHON_FEATURE_CONCURRENT) _USES_POST+= uniquefiles:dirs @@ -541,9 +538,7 @@ . if !defined(PYDISTUTILS_INSTALLNOSINGLE) PYDISTUTILS_INSTALLARGS+= --single-version-externally-managed . endif -. if !defined(NO_STAGE) PYDISTUTILS_INSTALLARGS+= --root=${STAGEDIR} -. endif .endif PYDISTUTILS_INSTALLARGS:= --record ${_PYTHONPKGLIST} \ ${PYDISTUTILS_INSTALLARGS} Index: head/Mk/Uses/qmake.mk =================================================================== --- head/Mk/Uses/qmake.mk +++ head/Mk/Uses/qmake.mk @@ -97,7 +97,7 @@ QMAKE_SOURCE_PATH?= # empty .endif -.if !defined(NO_STAGE) && ! ${_qmake_ARGS:M_env} +.if ! ${_qmake_ARGS:M_env} DESTDIRNAME= INSTALL_ROOT .endif Index: head/Mk/Uses/scons.mk =================================================================== --- head/Mk/Uses/scons.mk +++ head/Mk/Uses/scons.mk @@ -25,10 +25,6 @@ MAKE_ARGS+= CCFLAGS="${CCFLAGS}" CXXFLAGS="${CXXFLAGS}" \ LINKFLAGS="${LINKFLAGS}" PKGCONFIGDIR="${PKGCONFIGDIR}" \ CPPPATH="${CPPPATH}" LIBPATH="${LIBPATH}" PREFIX="${PREFIX}" \ - CC="${CC}" CXX="${CXX}" - -.if !defined(NO_STAGE) -MAKE_ARGS+= ${DESTDIRNAME:tl}=${STAGEDIR} -.endif + CC="${CC}" CXX="${CXX}" ${DESTDIRNAME:tl}=${STAGEDIR} .endif Index: head/Mk/Uses/shared-mime-info.mk =================================================================== --- head/Mk/Uses/shared-mime-info.mk +++ head/Mk/Uses/shared-mime-info.mk @@ -19,10 +19,6 @@ RUN_DEPENDS+= update-mime-database:${PORTSDIR}/misc/shared-mime-info shared-mime-post-install: -.if defined(NO_STAGE) -# run for port post-install - @-update-mime-database ${PREFIX}/share/mime -.endif # plist entries for packages. @${ECHO_CMD} "@exec ${LOCALBASE}/bin/update-mime-database %D/share/mime" \ >> ${TMPPLIST}; \ Index: head/Mk/Uses/uniquefiles.mk =================================================================== --- head/Mk/Uses/uniquefiles.mk +++ head/Mk/Uses/uniquefiles.mk @@ -64,10 +64,6 @@ .if !defined(_INCLUDE_USES_UNIQUEFILES_MK) _INCLUDE_USES_UNIQUEFILES_MK= yes -.if defined(NO_STAGE) -BROKEN= uniquefiles USES can only be used for stage-safe ports -.endif - .if !defined(uniquefiles_ARGS) uniquefiles_ARGS= #empty .endif Index: head/Mk/bsd.apache.mk =================================================================== --- head/Mk/bsd.apache.mk +++ head/Mk/bsd.apache.mk @@ -485,9 +485,6 @@ .if !target(do-install) do-install: -. if defined(NO_STAGE) - @${APXS} -i ${AP_MOD_EN} -n ${SHORTMODNAME} ${WRKSRC}/${MODULENAME}.${AP_BUILDEXT} -. else @${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEMODDIR} @${APXS} -S LIBEXECDIR=${STAGEDIR}${PREFIX}/${APACHEMODDIR} -i -n ${SHORTMODNAME} ${WRKSRC}/${MODULENAME}.${AP_BUILDEXT} . if !defined(DEBUG) @@ -496,7 +493,6 @@ . else @${ECHO_MSG} "===> DEBUG is set, will not strip ${APACHEMODDIR}/${MODULENAME}.so" . endif -. endif .endif .endif # defined(AP_FAST_BUILD) Index: head/Mk/bsd.gnome.mk =================================================================== --- head/Mk/bsd.gnome.mk +++ head/Mk/bsd.gnome.mk @@ -820,7 +820,7 @@ . endfor .endif -. if defined(GCONF_SCHEMAS) && ! defined(NO_STAGE) +. if defined(GCONF_SCHEMAS) MAKE_ENV+= GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 . endif .endif @@ -917,11 +917,6 @@ ${ECHO_CMD} "@unexec ${LOCALBASE}/bin/gtk-update-icon-cache -q -f %D/$${i} 2>/dev/null || /usr/bin/true" \ >> ${TMPPLIST}; \ done -.if defined(NO_STAGE) - @for i in `${GREP} "^share/icons/.*/" ${TMPPLIST} | ${CUT} -d / -f 1-3 | ${SORT} -u`; do \ - ${LOCALBASE}/bin/gtk-update-icon-cache -q -f ${PREFIX}/$${i} 2>/dev/null || ${TRUE}; \ - done -.endif @if test -f ${TMPPLIST}.icons1; then \ ${CAT} ${TMPPLIST}.icons1 ${TMPPLIST} > ${TMPPLIST}.icons2; \ ${RM} -f ${TMPPLIST}.icons1; \ Index: head/Mk/bsd.ocaml.mk =================================================================== --- head/Mk/bsd.ocaml.mk +++ head/Mk/bsd.ocaml.mk @@ -82,9 +82,7 @@ # work well with staging. .if defined(USE_OCAML_LDCONFIG) . if !target(ocaml-ldconfig) -. if !defined(NO_STAGE) OCAMLFIND_LDCONF?= /dev/null -. endif . endif .endif @@ -147,9 +145,6 @@ . if !target(ocaml-ldconfig) ocaml-ldconfig: . for LIB in ${OCAML_LDLIBS} -. if defined(NO_STAGE) - @${ECHO_CMD} "${PREFIX}/${LIB}" >> "${PREFIX}/${OCAML_LDCONF}" -. endif @${ECHO_CMD} "@exec ${ECHO_CMD} "%D/${LIB}" >> %D/${OCAML_LDCONF}" \ >> ${TMPPLIST} @${ECHO_CMD} "@unexec ${SED} -i \"\" -e '/${LIB:S#/#\/#g}/d' %D/${OCAML_LDCONF}" >> ${TMPPLIST} Index: head/Mk/bsd.php.mk =================================================================== --- head/Mk/bsd.php.mk +++ head/Mk/bsd.php.mk @@ -203,17 +203,6 @@ @${GREP} "#define \(COMPILE\|HAVE\|USE\)_" ${WRKSRC}/config.h \ > ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h @${MKDIR} ${STAGEDIR}${PREFIX}/etc/php -.if defined(NO_STAGE) - @${ECHO_CMD} \#include \"ext/${PHP_MODNAME}/config.h\" \ - >> ${PREFIX}/include/php/ext/php_config.h -.if defined(USE_ZENDEXT) - @${ECHO_CMD} zend_extension=${PREFIX}/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so \ - >> ${PREFIX}/etc/php/extensions.ini -.else - @${ECHO_CMD} extension=${PHP_MODNAME}.so \ - >> ${PREFIX}/etc/php/extensions.ini -.endif -.endif add-plist-info: add-plist-phpext add-plist-phpext: Index: head/Mk/bsd.pkgng.mk =================================================================== --- head/Mk/bsd.pkgng.mk +++ head/Mk/bsd.pkgng.mk @@ -99,11 +99,7 @@ .if !target(fake-pkg) -.if defined(NO_STAGE) -STAGE_ARGS= -l -.else STAGE_ARGS= -i ${STAGEDIR} -.endif .if !defined(NO_PKG_REGISTER) fake-pkg: create-manifest @@ -214,10 +210,8 @@ .endif .if !target(do-package) -.if !defined(NO_STAGE) PKG_CREATE_ARGS= -r ${STAGEDIR} -m ${METADIR} -p ${TMPPLIST} do-package: create-manifest -.endif do-package: ${TMPPLIST} @if [ -d ${PACKAGES} ]; then \ if [ ! -d ${PKGREPOSITORY} ]; then \ Index: head/Mk/bsd.port.mk =================================================================== --- head/Mk/bsd.port.mk +++ head/Mk/bsd.port.mk @@ -1110,6 +1110,7 @@ USESDIR?= ${PORTSDIR}/Mk/Uses SCRIPTSDIR?= ${PORTSDIR}/Mk/Scripts LIB_DIRS?= /lib /usr/lib ${LOCALBASE}/lib +STAGEDIR?= ${WRKDIR}/stage NOTPHONY?= PKG_ENV+= PORTSDIR=${PORTSDIR} CONFIGURE_ENV+= XDG_DATA_HOME=${WRKDIR} \ @@ -1118,10 +1119,24 @@ MAKE_ENV+= XDG_DATA_HOME=${WRKDIR} \ XDG_CONFIG_HOME=${WRKDIR} \ HOME=${WRKDIR} - -.if defined(FORCE_STAGE) -.undef NO_STAGE -.endif +QA_ENV+= STAGEDIR=${STAGEDIR} \ + PREFIX=${PREFIX} \ + LOCALBASE=${LOCALBASE} \ + "STRIP=${STRIP}" \ + TMPPLIST=${TMPPLIST} +CO_ENV+= STAGEDIR=${STAGEDIR} \ + PREFIX=${PREFIX} \ + LOCALBASE=${LOCALBASE} \ + WRKDIR=${WRKDIR} \ + WRKSRC=${WRKSRC} \ + MTREE_FILE=${MTREE_FILE} \ + GNOME_MTREE_FILE=${GNOME_MTREE_FILE} \ + TMPPLIST=${TMPPLIST} \ + SCRIPTSDIR=${SCRIPTSDIR} \ + WITH_PKGNG=${WITH_PKGNG} \ + PLIST_SUB_SED="${PLIST_SUB_SED}" \ + PORT_OPTIONS="${PORT_OPTIONS}" \ + PORTSDIR="${PORTSDIR}" # make sure bmake treats -V as expected .MAKE.EXPAND_VARIABLES= yes @@ -1129,14 +1144,12 @@ .include "${PORTSDIR}/Mk/bsd.commands.mk" .if defined(NO_STAGE) +BROKEN= Not staged. DEPRECATED?= Not staged. See http://lists.freebsd.org/pipermail/freebsd-ports-announce/2014-May/000080.html EXPIRATION_DATE?= 2014-08-31 .endif .if defined(X_BUILD_FOR) -.if defined(NO_STAGE) -IGNORE= Cross building is only compatible with stagified ports -.endif .if !defined(.PARSEDIR) IGNORE= Cross building can only be done when using bmake(1) as make(1) .endif @@ -1509,6 +1522,18 @@ UID!= ${ID} -u .endif +DESTDIRNAME?= DESTDIR + +.if !empty(USES:Mdesktop-file-utils) +QA_ENV+= USESDESKTOPFILEUTILS=yes +.endif +.if !empty(USES:Mlibtool*) +QA_ENV+= USESLIBTOOL=yes +.endif +.if !empty(USES:Mshared-mime-info) +QA_ENV+= USESSHAREDMIMEINFO=yes +.endif + # Loading features .for f in ${USES} _f=${f:C/\:.*//g} @@ -1814,15 +1839,23 @@ . endfor .endif -.if !defined(NO_STAGE) -.include "${PORTSDIR}/Mk/bsd.stage.mk" +.if defined(_DESTDIR_VIA_ENV) +MAKE_ENV+= ${DESTDIRNAME}=${STAGEDIR} .else -# Ignore STAGEDIR if set from make.conf -.undef STAGEDIR -# From command line it is impossible to undefined so we must raise an error -.if defined(STAGEDIR) -IGNORE= Do not define STAGEDIR in command line +MAKE_ARGS+= ${DESTDIRNAME}=${STAGEDIR} .endif + +.if defined(WITH_PKGNG) +CO_ENV+= PACKAGE_DEPENDS="${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,:C,${PORTSDIR}/,,}" \ + PKG_QUERY="${PKG_QUERY}" +.else +CO_ENV+= PACKAGE_DEPENDS=${ACTUAL-PACKAGE-DEPENDS:Q} \ + PKG_QUERY="${PKG_INFO}" +.endif +.if defined(NO_PREFIX_RMDIR) +CO_ENV+= NO_PREFIX_RMDIR=1 +.else +CO_ENV+= NO_PREFIX_RMDIR=0 .endif .if defined(WITH_PKGNG) @@ -3051,10 +3084,9 @@ IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} "${IGNORE:Q}.;exit 1 .endif -_TARGETS= check-sanity fetch checksum extract patch configure all build install reinstall package -.if !defined(NO_STAGE) -_TARGETS+= stage restage -.endif +_TARGETS= check-sanity fetch checksum extract patch configure all build \ + install reinstall package stage restage + .for target in ${_TARGETS} .if !target(${target}) ${target}: @@ -3126,11 +3158,7 @@ .endif .if !target(all) -. if defined(NO_STAGE) -all: build -. else all: stage -. endif .endif .if !defined(DEPENDS_TARGET) @@ -3183,13 +3211,6 @@ @${TOUCH} ${TOUCH_FLAGS} ${BUILD_COOKIE} .endif -# Disable staging. Be non-fatal here as some scripts may just call it as a -# matter of correctness in their ordering. -.if defined(NO_STAGE) && !target(stage) -stage: - @${ECHO_MSG} "===> This port does not yet support staging" -.endif - # Disable install .if defined(NO_INSTALL) && !target(do-install) do-install: @@ -3769,18 +3790,8 @@ exit 1; \ fi; \ fi; \ - fi -.if defined(NO_STAGE) - @if ${PKG_CMD} -b ${PKGNAME} ${PKGFILE}; then \ - if [ -d ${PACKAGES} ]; then \ - cd ${.CURDIR} && eval ${MAKE} package-links; \ - fi; \ - else \ - cd ${.CURDIR} && eval ${MAKE} delete-package >/dev/null; \ - exit 1; \ - fi -.else - @_LATE_PKG_ARGS=""; \ + fi ; \ + _LATE_PKG_ARGS=""; \ if [ -f ${PKGINSTALL} ]; then \ _LATE_PKG_ARGS="$${_LATE_PKG_ARGS} -i ${PKGINSTALL}"; \ fi; \ @@ -3815,7 +3826,6 @@ exit 1; \ fi .endif -.endif # Some support rules for do-package @@ -3854,12 +3864,8 @@ .if !target(delete-package) delete-package: delete-package-links @${ECHO_MSG} "===> Deleting package for ${PKGNAME}" -. if defined(NO_STAGE) - @${RM} -f ${PKGFILE} -. else # When staging, the package may only be in the workdir if not root @${RM} -f ${PKGFILE} ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} 2>/dev/null || : -. endif .endif .if !target(delete-package-links-list) @@ -3981,20 +3987,7 @@ .if defined(USE_LDCONFIG) || defined(USE_LDCONFIG32) .if defined(USE_LDCONFIG) .if defined(USE_LINUX_PREFIX) -.if defined(NO_STAGE) - @${ECHO_MSG} "===> Running linux ldconfig" - ${LDCONFIG_CMD} -.endif .else -.if defined(NO_STAGE) -.if !defined(INSTALL_AS_USER) - @${ECHO_MSG} "===> Running ldconfig" - ${LDCONFIG} -m ${USE_LDCONFIG} -.else - @${ECHO_MSG} "===> Running ldconfig (errors are ignored)" - -${LDCONFIG} -m ${USE_LDCONFIG} -.endif -.endif .if ${USE_LDCONFIG} != "${LOCALBASE}/lib" && !defined(INSTALL_AS_USER) @${ECHO_MSG} "===> Installing ldconfig configuration file" .if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} @@ -4009,15 +4002,6 @@ .endif .endif .if defined(USE_LDCONFIG32) -.if defined(NO_STAGE) -.if !defined(INSTALL_AS_USER) - @${ECHO_MSG} "===> Running ldconfig" - ${LDCONFIG} -32 -m ${USE_LDCONFIG32} -.else - @${ECHO_MSG} "===> Running ldconfig (errors are ignored)" - -${LDCONFIG} -32 -m ${USE_LDCONFIG32} -.endif -.endif .if !defined(INSTALL_AS_USER) @${ECHO_MSG} "===> Installing 32-bit ldconfig configuration file" .if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} @@ -4070,14 +4054,6 @@ fi @IFS=":"; ${GREP} -h ^${_group}: ${GID_FILES} | head -n 1 | while read group foo gid members; do \ gid=$$(($$gid+${GID_OFFSET})); \ - if [ "${NO_STAGE}" = "yes" ]; then \ - if ! ${PW} groupshow $$group >/dev/null 2>&1; then \ - ${ECHO_MSG} "Creating group \`$$group' with gid \`$$gid'."; \ - ${PW} groupadd $$group -g $$gid; \ - else \ - ${ECHO_MSG} "Using existing group \`$$group'."; \ - fi; \ - fi ; \ if [ -z "${WITH_PKGNG}" ]; then \ ${ECHO_CMD} "@exec if ! ${PW} groupshow $$group >/dev/null 2>&1; then \ echo \"Creating group '$$group' with gid '$$gid'.\"; \ @@ -4107,15 +4083,6 @@ gid=$$(($$gid+${GID_OFFSET})); \ class="$${class:+-L }$$class"; \ homedir=$$(echo $$homedir | sed "s|^/usr/local|${PREFIX}|"); \ - if [ "${NO_STAGE}" = "yes" ]; then \ - if ! ${PW} usershow $$login >/dev/null 2>&1; then \ - ${ECHO_MSG} "Creating user \`$$login' with uid \`$$uid'."; \ - eval ${PW} useradd $$login -u $$uid -g $$gid $$class -c \"$$gecos\" -d $$homedir -s $$shell; \ - case $$homedir in /|/nonexistent|/var/empty) ;; *) ${INSTALL} -d -g $$gid -o $$uid $$homedir;; esac; \ - else \ - ${ECHO_MSG} "Using existing user \`$$login'."; \ - fi; \ - fi; \ if [ -z "${WITH_PKGNG}" ]; then \ ${ECHO_CMD} "@exec if ! ${PW} usershow $$login >/dev/null 2>&1; then \ echo \"Creating user '$$login' with uid '$$uid'.\"; \ @@ -4138,12 +4105,6 @@ IFS=","; for _login in $$members; do \ for _user in ${USERS}; do \ if [ "x$${_user}" = "x$${_login}" ]; then \ - if [ "${NO_STAGE}" = "yes" ]; then \ - if ! ${PW} groupshow ${_group} | ${GREP} -qw $${_login}; then \ - ${ECHO_MSG} "Adding user \`$${_login}' to group \`${_group}'."; \ - ${PW} groupmod ${_group} -m $${_login}; \ - fi; \ - fi; \ if [ -z "${WITH_PKGNG}" ]; then \ ${ECHO_CMD} "@exec if ! ${PW} groupshow ${_group} | ${GREP} -qw $${_login}; then \ echo \"Adding user '$${_login}' to group '${_group}'.\"; \ @@ -4378,7 +4339,7 @@ .if !target(do-clean) do-clean: -.if !defined(NO_STAGE) && defined(NEED_ROOT) && ${UID} != 0 && !defined(INSTALL_AS_USER) && exists(${STAGE_COOKIE}) +.if defined(NEED_ROOT) && ${UID} != 0 && !defined(INSTALL_AS_USER) && exists(${STAGE_COOKIE}) @${ECHO_MSG} "===> Switching to root credentials for '${.TARGET}' target" @cd ${.CURDIR} && \ ${SU_CMD} "${MAKE} ${.TARGET}" @@ -4766,15 +4727,8 @@ .if !target(package-noinstall) package-noinstall: -.if defined(NO_STAGE) - @${MKDIR} ${WRKDIR} - @cd ${.CURDIR} && ${MAKE} ${_PACKAGE_REAL_SEQ} - @${RM} -f ${TMPPLIST} - -@${RMDIR} ${WRKDIR} -.else @cd ${.CURDIR} && ${MAKE} package .endif -.endif ################################################################ # Dependency checking @@ -5467,7 +5421,7 @@ @${ECHO_MSG} "===> Generating temporary packing list" @${MKDIR} `${DIRNAME} ${TMPPLIST}` @if [ ! -f ${DESCR} ]; then ${ECHO_MSG} "** Missing pkg-descr for ${PKGNAME}."; exit 1; fi -.if defined(NO_STAGE) || defined(NEED_ROOT) +.if defined(NEED_ROOT) @>${TMPPLIST} .else @${ECHO_CMD} -e "@owner root\n@group wheel" >${TMPPLIST} @@ -5475,25 +5429,6 @@ @for file in ${PLIST_FILES}; do \ ${ECHO_CMD} $${file} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} >> ${TMPPLIST}; \ done -.if defined(NO_STAGE) - @for man in ${__MANPAGES}; do \ - ${ECHO_CMD} $${man} >> ${TMPPLIST}; \ - done -.for _PREFIX in ${PREFIX} -.if ${_TMLINKS:M${_PREFIX}*}x != x - @for i in ${_TMLINKS:M${_PREFIX}*:S|^${_PREFIX}/||}; do \ - ${ECHO_CMD} "$$i" >> ${TMPPLIST}; \ - done -.endif -.if ${_TMLINKS:N${_PREFIX}*}x != x - @${ECHO_CMD} @cwd / >> ${TMPPLIST} - @for i in ${_TMLINKS:N${_PREFIX}*:S|^/||}; do \ - ${ECHO_CMD} "$$i" >> ${TMPPLIST}; \ - done - @${ECHO_CMD} '@cwd ${PREFIX}' >> ${TMPPLIST} -.endif -.endfor -.endif @if [ -f ${PLIST} ]; then \ ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${PLIST} >> ${TMPPLIST}; \ fi @@ -5625,9 +5560,6 @@ fi # Process GNU INFO files at package install/deinstall time .for i in ${INFO} -.if defined(NO_STAGE) - indexinfo ${PREFIX}/${INFO_PATH} -.endif .if !defined(WITH_PKGNG) @${ECHO_CMD} "@unexec indexinfo %D/${INFO_PATH}" >> ${TMPPLIST} @${LS} ${STAGEDIR}${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${STAGEDIR}${PREFIX}/::g >> ${TMPPLIST} @@ -5685,33 +5617,67 @@ .endif .endif -# Compress (or uncompress) and symlink manpages. +# Compress all manpage not already compressed which are not hardlinks +# Find all manpages which are not compressed and are hadlinks, and only get the list of inodes concerned, for each of them compress the first one found and recreate the hardlinks for the others +# Fixes all dead symlinks left by the previous round .if !target(compress-man) -.if defined(_MANPAGES) || defined(_MLINKS) compress-man: -.if ${MANCOMPRESSED} == yes && defined(NO_MANCOMPRESS) - @${ECHO_MSG} "===> Uncompressing manual pages for ${PKGNAME}" - @_manpages='${_MANPAGES:S/'/'\''/g}' && [ "$${_manpages}" != "" ] && ( eval ${GUNZIP_CMD} $${_manpages} ) || ${TRUE} -.elif ${MANCOMPRESSED} == no && !defined(NO_MANCOMPRESS) - @${ECHO_MSG} "===> Compressing manual pages for ${PKGNAME}" - @_manpages='${_MANPAGES:S/'/'\''/g}' && [ "$${_manpages}" != "" ] && ( eval ${GZIP_CMD} $${_manpages} ) || ${TRUE} -.endif -.if defined(_MLINKS) - @set -- ${_MLINKS}; \ - while :; do \ - [ $$# -eq 0 ] && break || ${TRUE}; \ - ${RM} -f $${2%.gz}; ${RM} -f $$2.gz; \ - ${LN} -fs `${ECHO_CMD} $$1 $$2 | ${AWK} '{ \ - z=split($$1, a, /\//); x=split($$2, b, /\//); \ - while (a[i] == b[i]) i++; \ - for (q=i; q Compressing man pages (compress-man)" + @mdirs= ; \ + for dir in ${MANDIRS:S/^/${STAGEDIR}/} ; do \ + [ -d $$dir ] && mdirs="$$mdirs $$dir" ;\ + done ; \ + for dir in $$mdirs; do \ + ${FIND} $$dir -type f \! -name "*.gz" -links 1 -exec ${GZIP_CMD} {} \; ; \ + ${FIND} $$dir -type f \! -name "*.gz" \! -links 1 -exec ${STAT} -f '%i' {} \; | \ + ${SORT} -u | while read inode ; do \ + unset ref ; \ + for f in $$(${FIND} $$dir -type f -inum $${inode} -print); do \ + if [ -z $$ref ]; then \ + ref=$${f}.gz ; \ + ${GZIP_CMD} $${f} ; \ + continue ; \ + fi ; \ + ${RM} -f $${f} ; \ + (cd $${f%/*}; ${LN} -f $${ref##*/} $${f##*/}.gz) ; \ + done ; \ + done ; \ + ${FIND} $$dir -type l \! -name "*.gz" | while read link ; do \ + ${LN} -sf $$(readlink $$link).gz $$link.gz ;\ + ${RM} -f $$link ; \ + done; \ done .endif + +.if !target(stage-dir) +stage-dir: + @${MKDIR} ${STAGEDIR}${PREFIX} +.if !defined(NO_MTREE) + @${MTREE_CMD} ${MTREE_ARGS} ${STAGEDIR}${PREFIX} > /dev/null .endif .endif +.if !target(makeplist) +makeplist: stage + @${SETENV} ${CO_ENV} ${SH} ${SCRIPTSDIR}/check-stagedir.sh makeplist +.endif + +.if !target(check-plist) +check-plist: stage + @${ECHO_MSG} "====> Checking for pkg-plist issues (check-plist)" + @${SETENV} ${CO_ENV} ${SH} ${SCRIPTSDIR}/check-stagedir.sh checkplist + @${ECHO_MSG} "===> No pkg-plist issues found (check-plist)" +.endif + +.if !target(check-orphans) +check-orphans: check-plist +.endif + +.if !target(stage-qa) +stage-qa: + @${ECHO_MSG} "====> Running Q/A tests (stage-qa)" + @${SETENV} ${QA_ENV} ${SH} ${SCRIPTSDIR}/qa.sh +.endif # Fake installation of package so that user can pkg_delete it later. # Also, make sure that an installed port is recognized correctly in # accordance to the @pkgdep directive in the packing lists @@ -6373,10 +6339,7 @@ # Please note that the order of the following targets is important, and # should not be modified. -_TARGETS_STAGES= SANITY PKG FETCH EXTRACT PATCH CONFIGURE BUILD INSTALL PACKAGE -.if !defined(NO_STAGE) -_TARGETS_STAGES+= STAGE -.endif +_TARGETS_STAGES= SANITY PKG FETCH EXTRACT PATCH CONFIGURE BUILD INSTALL PACKAGE STAGE # Define the SEQ of actions to take when each target is ran, and which targets # it depends on before running its SEQ. @@ -6409,7 +6372,6 @@ _BUILD_DEP= configure _BUILD_SEQ= build-message pre-build pre-build-script do-build \ post-build post-build-script -.if !defined(NO_STAGE) _STAGE_DEP= build _STAGE_SEQ= stage-message stage-dir run-depends lib-depends apply-slist pre-install generate-plist \ @@ -6459,24 +6421,6 @@ _INSTALL_SUSEQ= install-package security-check .endif -.else # NO_STAGE - -_INSTALL_DEP= build -_INSTALL_SEQ= install-message check-install-conflicts run-depends lib-depends apply-slist pre-install \ - pre-install-script generate-plist check-already-installed -_INSTALL_SUSEQ= check-umask install-mtree pre-su-install \ - pre-su-install-script create-users-groups do-install \ - install-desktop-entries install-license install-rc-script \ - desktop-file-post-install kmod-post-install shared-mime-post-install webplugin-post-install \ - post-install post-install-script add-plist-buildinfo \ - add-plist-info add-plist-docs add-plist-examples \ - add-plist-data add-plist-post fix-plist-sequence \ - compress-man install-ldconfig-file fake-pkg security-check -_PACKAGE_DEP= install -_PACKAGE_SEQ= package-message pre-package pre-package-script \ - do-package post-package-script -.endif - # Enforce order for -jN builds .for _t in ${_TARGETS_STAGES} Index: head/Mk/bsd.sanity.mk =================================================================== --- head/Mk/bsd.sanity.mk +++ head/Mk/bsd.sanity.mk @@ -66,19 +66,17 @@ # print warning if no reason given for NO_STAGE .if defined(NO_STAGE) -DEV_WARNING+= "NO_STAGE is deprecated, convert port to stage directory:" -DEV_WARNING+= "https://wiki.freebsd.org/ports/StageDir" +DEV_ERROR+= "NO_STAGE is unsupported, convert port to stage directory:" +DEV_ERROR+= "https://wiki.freebsd.org/ports/StageDir" .endif -.if !defined(NO_STAGE) .for a in 1 2 3 4 5 6 7 8 9 L N .if defined(MAN${a}) DEV_WARNING+= "MAN${a} macros are deprecated when using stage directory" .endif .endfor -.endif -.if !defined(NO_STAGE) && defined(MLINKS) +.if defined(MLINKS) DEV_WARNING+= "MLINKS macros are deprecated when using stage directory" .endif Index: head/Mk/bsd.stage.mk =================================================================== --- head/Mk/bsd.stage.mk +++ head/Mk/bsd.stage.mk @@ -1,113 +0,0 @@ -# -# $FreeBSD$ -# - -STAGEDIR?= ${WRKDIR}/stage -DESTDIRNAME?= DESTDIR - -.if defined(_DESTDIR_VIA_ENV) -MAKE_ENV+= ${DESTDIRNAME}=${STAGEDIR} -.else -MAKE_ARGS+= ${DESTDIRNAME}=${STAGEDIR} -.endif -QA_ENV+= STAGEDIR=${STAGEDIR} \ - PREFIX=${PREFIX} \ - LOCALBASE=${LOCALBASE} \ - "STRIP=${STRIP}" \ - TMPPLIST=${TMPPLIST} -.if !empty(USES:Mdesktop-file-utils) -QA_ENV+= USESDESKTOPFILEUTILS=yes -.endif -.if !empty(USES:Mlibtool*) -QA_ENV+= USESLIBTOOL=yes -.endif -.if !empty(USES:Mshared-mime-info) -QA_ENV+= USESSHAREDMIMEINFO=yes -.endif -CO_ENV+= STAGEDIR=${STAGEDIR} \ - PREFIX=${PREFIX} \ - LOCALBASE=${LOCALBASE} \ - WRKDIR=${WRKDIR} \ - WRKSRC=${WRKSRC} \ - MTREE_FILE=${MTREE_FILE} \ - GNOME_MTREE_FILE=${GNOME_MTREE_FILE} \ - TMPPLIST=${TMPPLIST} \ - SCRIPTSDIR=${SCRIPTSDIR} \ - WITH_PKGNG=${WITH_PKGNG} \ - PLIST_SUB_SED="${PLIST_SUB_SED}" \ - PORT_OPTIONS="${PORT_OPTIONS}" \ - PORTSDIR="${PORTSDIR}" -.if defined(WITH_PKGNG) -CO_ENV+= PACKAGE_DEPENDS="${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,:C,${PORTSDIR}/,,}" \ - PKG_QUERY="${PKG_QUERY}" -.else -CO_ENV+= PACKAGE_DEPENDS=${ACTUAL-PACKAGE-DEPENDS:Q} \ - PKG_QUERY="${PKG_INFO}" -.endif -.if defined(NO_PREFIX_RMDIR) -CO_ENV+= NO_PREFIX_RMDIR=1 -.else -CO_ENV+= NO_PREFIX_RMDIR=0 -.endif - -.if !target(stage-dir) -stage-dir: - @${MKDIR} ${STAGEDIR}${PREFIX} -.if !defined(NO_MTREE) - @${MTREE_CMD} ${MTREE_ARGS} ${STAGEDIR}${PREFIX} > /dev/null -.endif -.endif - -# Compress all manpage not already compressed which are not hardlinks -# Find all manpages which are not compressed and are hadlinks, and only get the list of inodes concerned, for each of them compress the first one found and recreate the hardlinks for the others -# Fixes all dead symlinks left by the previous round -.if !target(compress-man) -compress-man: - @${ECHO_MSG} "====> Compressing man pages (compress-man)" - @mdirs= ; \ - for dir in ${MANDIRS:S/^/${STAGEDIR}/} ; do \ - [ -d $$dir ] && mdirs="$$mdirs $$dir" ;\ - done ; \ - for dir in $$mdirs; do \ - ${FIND} $$dir -type f \! -name "*.gz" -links 1 -exec ${GZIP_CMD} {} \; ; \ - ${FIND} $$dir -type f \! -name "*.gz" \! -links 1 -exec ${STAT} -f '%i' {} \; | \ - ${SORT} -u | while read inode ; do \ - unset ref ; \ - for f in $$(${FIND} $$dir -type f -inum $${inode} -print); do \ - if [ -z $$ref ]; then \ - ref=$${f}.gz ; \ - ${GZIP_CMD} $${f} ; \ - continue ; \ - fi ; \ - ${RM} -f $${f} ; \ - (cd $${f%/*}; ${LN} -f $${ref##*/} $${f##*/}.gz) ; \ - done ; \ - done ; \ - ${FIND} $$dir -type l \! -name "*.gz" | while read link ; do \ - ${LN} -sf $$(readlink $$link).gz $$link.gz ;\ - ${RM} -f $$link ; \ - done; \ - done -.endif - -.if !target(makeplist) -makeplist: stage - @${SETENV} ${CO_ENV} ${SH} ${SCRIPTSDIR}/check-stagedir.sh makeplist -.endif - -.if !target(check-plist) -check-plist: stage - @${ECHO_MSG} "====> Checking for pkg-plist issues (check-plist)" - @${SETENV} ${CO_ENV} ${SH} ${SCRIPTSDIR}/check-stagedir.sh checkplist - @${ECHO_MSG} "===> No pkg-plist issues found (check-plist)" -.endif - -.if !target(check-orphans) -check-orphans: check-plist -.endif - -.if !target(stage-qa) -stage-qa: - @${ECHO_MSG} "====> Running Q/A tests (stage-qa)" - @${SETENV} ${QA_ENV} ${SH} ${SCRIPTSDIR}/qa.sh -.endif Index: head/Mk/bsd.tex.mk =================================================================== --- head/Mk/bsd.tex.mk +++ head/Mk/bsd.tex.mk @@ -189,9 +189,6 @@ .PHONY: do-texhash do-texhash: . if !empty(USE_TEX:Mtexhash-bootstrap) -.if defined(NO_STAGE) - @${LOCALBASE}/bin/mktexlsr ${TEXHASHDIRS:S,^,${PREFIX}/,} -.endif @${ECHO_CMD} "@exec ${LOCALBASE}/bin/mktexlsr " \ "${TEXHASHDIRS:S,^,%D/,}" >> ${TMPPLIST} @for D in ${TEXHASHDIRS}; do \ @@ -199,11 +196,6 @@ ${ECHO_CMD} "@unexec ${RMDIR} %D/$$D 2> /dev/null || ${TRUE}"; \ done >> ${TMPPLIST} . else -.if defined(NO_STAGE) - @for D in ${TEXHASHDIRS:S,^,${PREFIX}/,}; do \ - if [ -r $$D/ls-R ]; then ${LOCALBASE}/bin/mktexlsr $$D; fi; \ - done -.endif @${ECHO_CMD} "@exec for D in ${TEXHASHDIRS:S,^,${PREFIX}/,}; do " \ "if [ -r \$$D/ls-R ]; then " \ "${LOCALBASE}/bin/mktexlsr \$$D; " \ @@ -258,11 +250,6 @@ .if !empty(USE_TEX:Mupdmap) .PHONY: do-updmap do-updmap: -.if defined(NO_STAGE) - ${SETENV} PATH=${PATH}:${LOCALBASE}/bin \ - TEXMFMAIN=${LOCALBASE}/${TEXMFDIR} \ - ${LOCALBASE}/bin/updmap-sys -.endif @${ECHO_CMD} "@exec ${SETENV} PATH=${PATH}:${LOCALBASE}/bin " \ "TEXMFMAIN=${LOCALBASE}/${TEXMFDIR} " \ "${LOCALBASE}/bin/updmap-sys" >> ${TMPPLIST}