aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2014-12-17 22:32:59 +0800
committerbapt <bapt@FreeBSD.org>2014-12-17 22:32:59 +0800
commit82f930622e350490aacfbee595d9a6e7309941f2 (patch)
tree75f01a41fd37cc679432072547c3f91fccc514ba /Mk/Uses
parent122e5b07d33fd17b90edc36665da400c3209c2df (diff)
downloadfreebsd-ports-gnome-82f930622e350490aacfbee595d9a6e7309941f2.tar.gz
freebsd-ports-gnome-82f930622e350490aacfbee595d9a6e7309941f2.tar.zst
freebsd-ports-gnome-82f930622e350490aacfbee595d9a6e7309941f2.zip
Add USES=fakeroot to allow packaging ports that are not stageable as a user
It uses debian's fakeroot, like NEED_ROOT (which it is supposed to replace) it is preferred to fix the port to properly stage without those hacks
Diffstat (limited to 'Mk/Uses')
-rw-r--r--Mk/Uses/fakeroot.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/Mk/Uses/fakeroot.mk b/Mk/Uses/fakeroot.mk
new file mode 100644
index 000000000000..d7ffc5a1495f
--- /dev/null
+++ b/Mk/Uses/fakeroot.mk
@@ -0,0 +1,17 @@
+# $FreeBSD$
+#
+# Changes some default behaviour of build systems to allow installing as user.
+#
+# Feature: fakeroot
+# Usage: USES=fakeroot
+# Valid ARGS: none
+#
+# MAINTAINER: bapt@FreeBSD.org
+
+.if !defined(_INCLUDE_USES_FAKEROOT_MK)
+_INCLUDE_USES_FAKEROOT_MK= yes
+.if ${UID} != 0
+BUILD_DEPENDS+= fakeroot:${PORTSDIR}/security/fakeroot
+FAKEROOT?= fakeroot
+.endif
+.endif