summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzeising <zeising@058c260c-8361-11dd-a0ac-aa2bafec7d09>2013-09-28 06:41:22 +0800
committerzeising <zeising@058c260c-8361-11dd-a0ac-aa2bafec7d09>2013-09-28 06:41:22 +0800
commit5d7d2d41f0814991dcea9c9742325b32c8bcfcbd (patch)
tree37970c6981f8f5155602b0933a030cd2695611e0
parent7e444d5e40e1336e74bfade12874917b3ecff93a (diff)
downloadxorg-devel-ports-5d7d2d41f0814991dcea9c9742325b32c8bcfcbd.tar
xorg-devel-ports-5d7d2d41f0814991dcea9c9742325b32c8bcfcbd.tar.gz
xorg-devel-ports-5d7d2d41f0814991dcea9c9742325b32c8bcfcbd.tar.bz2
xorg-devel-ports-5d7d2d41f0814991dcea9c9742325b32c8bcfcbd.tar.lz
xorg-devel-ports-5d7d2d41f0814991dcea9c9742325b32c8bcfcbd.tar.xz
xorg-devel-ports-5d7d2d41f0814991dcea9c9742325b32c8bcfcbd.tar.zst
xorg-devel-ports-5d7d2d41f0814991dcea9c9742325b32c8bcfcbd.zip
Sync with ports.
git-svn-id: https://trillian.chruetertee.ch/svn/ports/trunk@1173 058c260c-8361-11dd-a0ac-aa2bafec7d09
-rw-r--r--Mk/bsd.port.mk22
1 files changed, 19 insertions, 3 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 90cac2f..03f8f2d 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -2182,7 +2182,8 @@ BUILD_FAIL_MESSAGE+= Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reportin
# ccache support
# Support NO_CCACHE for common setups, require WITH_CCACHE_BUILD, and
# don't use if ccache already set in CC
-.if !defined(NO_CCACHE) && defined(WITH_CCACHE_BUILD) && !${CC:M*ccache*}
+.if !defined(NO_CCACHE) && defined(WITH_CCACHE_BUILD) && !${CC:M*ccache*} && \
+ !defined(NO_BUILD)
# Avoid depends loops between pkg and ccache
. if !${.CURDIR:M*/devel/ccache} && !${.CURDIR:M*/ports-mgmt/pkg}
BUILD_DEPENDS+= ${LOCALBASE}/bin/ccache:${PORTSDIR}/devel/ccache
@@ -3953,8 +3954,12 @@ delete-package-list: delete-package-links-list
.if !target(install-package)
install-package:
+.if defined(FORCE_PKG_REGISTER)
+ @${PKG_ADD} -f ${PKGFILE}
+.else
@${PKG_ADD} ${PKGFILE}
.endif
+.endif
# Utility targets follow
@@ -4124,12 +4129,14 @@ 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 ; \
${ECHO_CMD} "@exec if ! ${PW} groupshow $$group >/dev/null 2>&1; then \
echo \"Creating group '$$group' with gid '$$gid'.\"; \
${PW} groupadd $$group -g $$gid; else echo \"Using existing group '$$group'.\"; fi" >> ${TMPPLIST}; \
@@ -4153,6 +4160,7 @@ 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; \
@@ -4160,6 +4168,7 @@ create-users-groups:
else \
${ECHO_MSG} "Using existing user \`$$login'."; \
fi; \
+ fi; \
${ECHO_CMD} "@exec if ! ${PW} usershow $$login >/dev/null 2>&1; then \
echo \"Creating user '$$login' with uid '$$uid'.\"; \
${PW} useradd $$login -u $$uid -g $$gid $$class -c \"$$gecos\" -d $$homedir -s $$shell; \
@@ -4304,10 +4313,17 @@ _BUILD_SEQ= build-message pre-build pre-build-script do-build \
_STAGE_DEP= build
_STAGE_SEQ= stage-message stage-dir run-depends lib-depends apply-slist pre-install generate-plist \
pre-su-install
+.if defined(NEED_ROOT)
_STAGE_SUSEQ= create-users-groups do-install post-install 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 fix-plist-sequence
+.else
+_STAGE_SEQ+= create-users-groups do-install post-install 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 fix-plist-sequence
+.endif
.if defined(WITH_PKGNG)
_INSTALL_DEP= stage
_INSTALL_SEQ= install-message run-depends lib-depends
@@ -4577,7 +4593,7 @@ deinstall-all:
.if !target(do-clean)
do-clean:
-.if !defined(NO_STAGE) && ${UID} != 0 && !defined(INSTALL_AS_USER) && exists(${STAGE_COOKIE})
+.if !defined(NO_STAGE) && 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}"
@@ -5730,7 +5746,7 @@ generate-plist:
@${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)
+.if defined(NO_STAGE) || defined(NEED_ROOT)
@>${TMPPLIST}
.else
@${ECHO_CMD} -e "@owner root\n@group wheel" >${TMPPLIST}