aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2014-09-01 13:43:02 +0800
committerbapt <bapt@FreeBSD.org>2014-09-01 13:43:02 +0800
commita60ca623f1afc4714151f2317c9d927e9d281642 (patch)
treea05c3950ed484702259a77932c4e76ca60cb0894 /Mk
parent613a47fe99d6d0f6517bcb4a893c859b4fa72beb (diff)
downloadfreebsd-ports-gnome-a60ca623f1afc4714151f2317c9d927e9d281642.tar.gz
freebsd-ports-gnome-a60ca623f1afc4714151f2317c9d927e9d281642.tar.zst
freebsd-ports-gnome-a60ca623f1afc4714151f2317c9d927e9d281642.zip
Remove support for NO_STAGE
Mark all current non staged ports as BROKEN Reviewed by: antoine Exp-run: antoine Differential Revision: https://reviews.freebsd.org/D693
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/cran.mk6
-rw-r--r--Mk/Uses/desktop-file-utils.mk4
-rw-r--r--Mk/Uses/python.mk5
-rw-r--r--Mk/Uses/qmake.mk2
-rw-r--r--Mk/Uses/scons.mk6
-rw-r--r--Mk/Uses/shared-mime-info.mk4
-rw-r--r--Mk/Uses/uniquefiles.mk4
-rw-r--r--Mk/bsd.apache.mk4
-rw-r--r--Mk/bsd.gnome.mk7
-rw-r--r--Mk/bsd.ocaml.mk5
-rw-r--r--Mk/bsd.php.mk11
-rw-r--r--Mk/bsd.pkgng.mk6
-rw-r--r--Mk/bsd.port.mk274
-rw-r--r--Mk/bsd.sanity.mk8
-rw-r--r--Mk/bsd.stage.mk113
-rw-r--r--Mk/bsd.tex.mk13
16 files changed, 115 insertions, 357 deletions
diff --git a/Mk/Uses/cran.mk b/Mk/Uses/cran.mk
index 7e9003e145a7..9275f4b72468 100644
--- a/Mk/Uses/cran.mk
+++ b/Mk/Uses/cran.mk
@@ -51,12 +51,6 @@ R_POSTCMD_CHECK_OPTIONS?= --timings
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 \
diff --git a/Mk/Uses/desktop-file-utils.mk b/Mk/Uses/desktop-file-utils.mk
index 91128ad9a601..bf475020b157 100644
--- a/Mk/Uses/desktop-file-utils.mk
+++ b/Mk/Uses/desktop-file-utils.mk
@@ -19,10 +19,6 @@ BUILD_DEPENDS+= update-desktop-database:${PORTSDIR}/devel/desktop-file-utils
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}; \
diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk
index 55a063e86c9e..4576b2840a7f 100644
--- a/Mk/Uses/python.mk
+++ b/Mk/Uses/python.mk
@@ -497,9 +497,6 @@ _PYTHONPKGLIST= ${WRKDIR}/.PLIST.pymodtmp
# - 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 @@ PYDISTUTILS_INSTALLARGS?= -c -O1 --prefix=${PREFIX}
. 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}
diff --git a/Mk/Uses/qmake.mk b/Mk/Uses/qmake.mk
index a88d3005cee2..610b9192e478 100644
--- a/Mk/Uses/qmake.mk
+++ b/Mk/Uses/qmake.mk
@@ -97,7 +97,7 @@ QMAKE_SOURCE_PATH?= ${WRKSRC}
QMAKE_SOURCE_PATH?= # empty
.endif
-.if !defined(NO_STAGE) && ! ${_qmake_ARGS:M_env}
+.if ! ${_qmake_ARGS:M_env}
DESTDIRNAME= INSTALL_ROOT
.endif
diff --git a/Mk/Uses/scons.mk b/Mk/Uses/scons.mk
index 7282b8492ab9..869e6e790b8b 100644
--- a/Mk/Uses/scons.mk
+++ b/Mk/Uses/scons.mk
@@ -25,10 +25,6 @@ MAKE_CMD?= ${SCONS}
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
diff --git a/Mk/Uses/shared-mime-info.mk b/Mk/Uses/shared-mime-info.mk
index f9566e8a79f8..d9ee3e1a915a 100644
--- a/Mk/Uses/shared-mime-info.mk
+++ b/Mk/Uses/shared-mime-info.mk
@@ -19,10 +19,6 @@ BUILD_DEPENDS+= update-mime-database:${PORTSDIR}/misc/shared-mime-info
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}; \
diff --git a/Mk/Uses/uniquefiles.mk b/Mk/Uses/uniquefiles.mk
index c4809e3dcfe5..79083a6e1d08 100644
--- a/Mk/Uses/uniquefiles.mk
+++ b/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
diff --git a/Mk/bsd.apache.mk b/Mk/bsd.apache.mk
index e9067e126d30..f61ed7ed22e4 100644
--- a/Mk/bsd.apache.mk
+++ b/Mk/bsd.apache.mk
@@ -485,9 +485,6 @@ do-build: ap-gen-plist
.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 @@ do-install:
. else
@${ECHO_MSG} "===> DEBUG is set, will not strip ${APACHEMODDIR}/${MODULENAME}.so"
. endif
-. endif
.endif
.endif # defined(AP_FAST_BUILD)
diff --git a/Mk/bsd.gnome.mk b/Mk/bsd.gnome.mk
index 8a1fed0cd9f5..049dbbb6bd1c 100644
--- a/Mk/bsd.gnome.mk
+++ b/Mk/bsd.gnome.mk
@@ -820,7 +820,7 @@ GNOME_PRE_PATCH+= ; ${${component}_PRE_PATCH}
. 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 @@ gnome-post-install:
${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; \
diff --git a/Mk/bsd.ocaml.mk b/Mk/bsd.ocaml.mk
index e0515cbbe557..ef8410881a20 100644
--- a/Mk/bsd.ocaml.mk
+++ b/Mk/bsd.ocaml.mk
@@ -82,9 +82,7 @@ OCAML_LDCONF?= ${OCAML_LIBDIR}/ld.conf
# 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 @@ OCAML_LDLIBS?= ${OCAML_SITELIBDIR}/${PORTNAME}
. 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}
diff --git a/Mk/bsd.php.mk b/Mk/bsd.php.mk
index b71083dfe058..6b316b2a6026 100644
--- a/Mk/bsd.php.mk
+++ b/Mk/bsd.php.mk
@@ -203,17 +203,6 @@ do-install:
@${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:
diff --git a/Mk/bsd.pkgng.mk b/Mk/bsd.pkgng.mk
index 46c23091bba7..e16f38405e45 100644
--- a/Mk/bsd.pkgng.mk
+++ b/Mk/bsd.pkgng.mk
@@ -99,11 +99,7 @@ create-manifest:
.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 @@ check-install-conflicts:
.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 \
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 666ba5e5b752..711244d154e0 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1110,6 +1110,7 @@ SRC_BASE?= /usr/src
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 @@ CONFIGURE_ENV+= XDG_DATA_HOME=${WRKDIR} \
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 @@ MAKE_ENV+= XDG_DATA_HOME=${WRKDIR} \
.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 @@ USES+= python
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 @@ RUN_DEPENDS+= ${_GL_${_component}_RUN_DEPENDS}
. 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= ${DO_NADA}
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 @@ all:
.endif
.if !target(all)
-. if defined(NO_STAGE)
-all: build
-. else
all: stage
-. endif
.endif
.if !defined(DEPENDS_TARGET)
@@ -3183,13 +3211,6 @@ build: configure
@${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 @@ do-package: ${TMPPLIST}
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 @@ do-package: ${TMPPLIST}
exit 1; \
fi
.endif
-.endif
# Some support rules for do-package
@@ -3854,12 +3864,8 @@ delete-package-links:
.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 @@ install-ldconfig-file:
.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 @@ install-ldconfig-file:
.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 @@ create-users-groups:
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 @@ create-users-groups:
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 @@ create-users-groups:
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 @@ deinstall-all:
.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 @@ pre-repackage:
.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 @@ generate-plist: ${WRKDIR}
@${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 @@ generate-plist: ${WRKDIR}
@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 @@ add-plist-info:
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 @@ install-rc-script:
.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<x; q++) printf "../"; \
- for (; i<z; i++) printf a[i] "/"; printf a[z]; }'` $$2; \
- shift; shift; \
+ @${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(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 @@ show-dev-errors:
# 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 @@ _CONFIGURE_SEQ= build-depends lib-depends configure-message run-autotools-fixup
_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_SEQ= install-message run-depends lib-depends check-already-installed
_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}
diff --git a/Mk/bsd.sanity.mk b/Mk/bsd.sanity.mk
index 7d118e2d343a..a45dce2e4d3d 100644
--- a/Mk/bsd.sanity.mk
+++ b/Mk/bsd.sanity.mk
@@ -66,19 +66,17 @@ DEV_ERROR+= "USE_TCL and USE_TK are no longer supported, please use USES=tcl or
# 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
diff --git a/Mk/bsd.stage.mk b/Mk/bsd.stage.mk
deleted file mode 100644
index 737f071694de..000000000000
--- a/Mk/bsd.stage.mk
+++ /dev/null
@@ -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
diff --git a/Mk/bsd.tex.mk b/Mk/bsd.tex.mk
index 9cdaa6acd940..e08c4a27ad9a 100644
--- a/Mk/bsd.tex.mk
+++ b/Mk/bsd.tex.mk
@@ -189,9 +189,6 @@ ${_C}_DEPENDS+= ${TEX_${_C}_DEPENDS:O:u}
.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 @@ do-texhash:
${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 @@ PLIST_DIRSTRY= ${_PLIST_DIRSTRY:O:u} ${TEXMFVARDIR}/web2c
.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}