aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-01-27 15:29:32 +0800
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-01-27 15:29:32 +0800
commit5d68e6a30ce5f3fbf2cc04ff6e4a9a624e4f7822 (patch)
tree9463a44d4109c702b91eb61a5343959d3962f183 /Mk/Uses
parent1fce2b04404159dd61c0d85a7b9d9b5e7ad43e14 (diff)
downloadfreebsd-ports-gnome-5d68e6a30ce5f3fbf2cc04ff6e4a9a624e4f7822.tar.gz
freebsd-ports-gnome-5d68e6a30ce5f3fbf2cc04ff6e4a9a624e4f7822.tar.zst
freebsd-ports-gnome-5d68e6a30ce5f3fbf2cc04ff6e4a9a624e4f7822.zip
Add USES=desthack
This allow to pass DESTDIR through configure --prefix to ports that are not destdir aware Obtained from: OpenBSD ports tree (discussed in Malta with Marc Espie)
Diffstat (limited to 'Mk/Uses')
-rw-r--r--Mk/Uses/desthack.mk29
1 files changed, 29 insertions, 0 deletions
diff --git a/Mk/Uses/desthack.mk b/Mk/Uses/desthack.mk
new file mode 100644
index 000000000000..eb49af650cfc
--- /dev/null
+++ b/Mk/Uses/desthack.mk
@@ -0,0 +1,29 @@
+#
+# $FreeBSD$
+#
+# Handle gnu configure that does not properly support DESTDIR
+#
+# MAINTAINER: portmgr@FreeBSD.org
+#
+# Feature: desthack
+# Usage: USES=desthack
+# Valide ARGS: none
+#
+
+.if !defined(_INCLUDE_USES_DESTHACK_MK)
+_INCLUDE_USES_DESTHACK_MK= yes
+
+.if defined(_desthack_ARGS)
+IGNORE= USES=desthack does not require args
+.endif
+
+_USES_POST= desthack
+GNU_CONFIGURE_PREFIX= \$${${DESTDIRNAME}}${PREFIX}
+GNU_CONFIGURE_MANPREFIX= \$${${DESTDIRNAME}}${MANPREFIX}
+.endif
+
+.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_DESTHACK_POST_MK)
+_INCLUDE_USES_DESTHACK_POST_MK= yes
+post-stage:
+ @${SED} -i '' -e 's,${STAGEDIR},,g' ${STAGEDIR}${PREFIX}/lib/*.la
+.endif