pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/gnustep-make Allow unprivileged builds of projec...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/87ba117111e0
branches:  trunk
changeset: 391760:87ba117111e0
user:      rh <rh%pkgsrc.org@localhost>
date:      Sat Apr 18 23:50:13 2009 +0000

description:
Allow unprivileged builds of projects that do a 'make install' into a work
subdir during the build phase.  This fixes PR pkg/36326.

diffstat:

 devel/gnustep-make/gnustep.mk |  37 +++++++++++++++++++++++++++++++++----
 1 files changed, 33 insertions(+), 4 deletions(-)

diffs (54 lines):

diff -r e6b620defab5 -r 87ba117111e0 devel/gnustep-make/gnustep.mk
--- a/devel/gnustep-make/gnustep.mk     Sat Apr 18 21:41:16 2009 +0000
+++ b/devel/gnustep-make/gnustep.mk     Sat Apr 18 23:50:13 2009 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: gnustep.mk,v 1.12 2009/04/18 03:32:17 rh Exp $
+#      $NetBSD: gnustep.mk,v 1.13 2009/04/18 23:50:13 rh Exp $
 
 .if !defined(GNUSTEP_MK)
 GNUSTEP_MK=            #defined
@@ -48,12 +48,41 @@
 SUBST_SED.gnustep_installation_dir+=   -e 's|INSTALL_ROOT_DIR|DESTDIR|g'
 .endif
 
+GNUSTEP_FAKE_PRIVILEGED_BUILD?=        YES
+
+.if !empty(GNUSTEP_FAKE_PRIVILEGED_BUILD:M[yY][eE][sS])
+post-wrapper: create-gnustep-chown-links
+
+create-gnustep-chown-links:
+       ${ECHO}  > ${BUILDLINK_BINDIR}/chown '#!${SH:Q}'
+       ${ECHO} >> ${BUILDLINK_BINDIR}/chown '${CHOWN:Q} "$$@" 2>/dev/null || \'
+       ${ECHO} >> ${BUILDLINK_BINDIR}/chown '${TRUE}'
+       ${ECHO}  > ${BUILDLINK_BINDIR}/chgrp '#!${SH:Q}'
+       ${ECHO} >> ${BUILDLINK_BINDIR}/chgrp '${CHGRP:Q} "$$@" 2>/dev/null || \'
+       ${ECHO} >> ${BUILDLINK_BINDIR}/chgrp '${TRUE}'
+       ${ECHO}  > ${BUILDLINK_BINDIR}/install '#!${SH:Q}'
+       ${ECHO} >> ${BUILDLINK_BINDIR}/install '${INSTALL:Q} "$$@" 2>/dev/null || \'
+       ${ECHO} >> ${BUILDLINK_BINDIR}/install '${INSTALL:Q} `${ECHO} "$$@" | \
+               ${SED} -e "s/-[og][     ]*[^    ]*//g"`'
+       ${CHMOD} +x ${BUILDLINK_BINDIR}/chown
+       ${CHMOD} +x ${BUILDLINK_BINDIR}/chgrp
+       ${CHMOD} +x ${BUILDLINK_BINDIR}/install
+
+GNUSTEP_INSTALL=       ${BUILDLINK_BINDIR}/install
+GNUSTEP_INSTALL_DATA=  ${INSTALL_DATA:S/${INSTALL}/${GNUSTEP_INSTALL}/}
+GNUSTEP_INSTALL_PROGRAM=${INSTALL_PROGRAM:S/${INSTALL}/${GNUSTEP_INSTALL}/}
+.else
+GNUSTEP_INSTALL=       ${INSTALL}
+GNUSTEP_INSTALL_DATA=  ${INSTALL_DATA}
+GNUSTEP_INSTALL_PROGRAM=${INSTALL_PROGRAM}
+.endif
+
 GNUSTEP_OVERRIDE_INSTALL?=     YES
 
 .if !empty(GNUSTEP_OVERRIDE_INSTALL:M[yY][eE][sS])
-MAKE_ENV+=     INSTALL=${INSTALL:Q}
-MAKE_ENV+=     INSTALL_PROGRAM=${INSTALL_PROGRAM:Q}
-MAKE_ENV+=     INSTALL_DATA=${INSTALL_DATA:Q}
+MAKE_ENV+=     INSTALL=${GNUSTEP_INSTALL:Q}
+MAKE_ENV+=     INSTALL_DATA=${GNUSTEP_INSTALL_DATA:Q}
+MAKE_ENV+=     INSTALL_PROGRAM=${GNUSTEP_INSTALL_PROGRAM:Q}
 .endif
 
 .if !defined(NO_GNUSTEP_ENV)



Home | Main Index | Thread Index | Old Index