pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/misc/rubygems Move targets requiring the root privileg...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/77f81893dae7
branches:  trunk
changeset: 547233:77f81893dae7
user:      minskim <minskim%pkgsrc.org@localhost>
date:      Sun Sep 14 17:34:28 2008 +0000

description:
Move targets requiring the root privilege to the install stage.
This fixes PR 39333.

Thanks to taca@ for testing.

diffstat:

 misc/rubygems/rubygem.mk |  31 +++++++++++++++++--------------
 1 files changed, 17 insertions(+), 14 deletions(-)

diffs (62 lines):

diff -r 436879c88f9b -r 77f81893dae7 misc/rubygems/rubygem.mk
--- a/misc/rubygems/rubygem.mk  Sun Sep 14 16:15:28 2008 +0000
+++ b/misc/rubygems/rubygem.mk  Sun Sep 14 17:34:28 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rubygem.mk,v 1.37 2008/05/25 21:42:22 joerg Exp $
+# $NetBSD: rubygem.mk,v 1.38 2008/09/14 17:34:28 minskim Exp $
 #
 # This Makefile fragment is intended to be included by packages that build
 # and install Ruby gems.
@@ -59,6 +59,8 @@
 #      The path to the rubygems ``gem'' script.
 #
 
+PRIVILEGED_STAGES+=    clean
+
 # By default, assume that gems are capable of user-destdir installation.
 PKG_DESTDIR_SUPPORT?=  user-destdir
 
@@ -172,18 +174,9 @@
 PKG_FAIL_REASON=       "GEM_CLEANBUILD must be relative to "${GEM_LIBDIR:Q}"."
 .endif
 
-_GEM_BUILD_TARGETS=    _gem-${GEM_BUILD}-build
-_GEM_BUILD_TARGETS+=   _gem-build-install-root
-_GEM_BUILD_TARGETS+=   _gem-build-install-root-check
-.if !empty(GEM_CLEANBUILD)
-_GEM_BUILD_TARGETS+=   _gem-build-cleanbuild
-.endif
-
-.ORDER: ${_GEM_BUILD_TARGETS}
-
 .PHONY: gem-build
 do-build: gem-build
-gem-build: ${_GEM_BUILD_TARGETS}
+gem-build: _gem-${GEM_BUILD}-build
 
 .PHONY: _gem-gemspec-build
 _gem-gemspec-build:
@@ -262,10 +255,20 @@
          ${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} -type d -print | \
                ${SORT} -r | ${SED} -e "s,^,@dirrm ," );
 
+_GEM_INSTALL_TARGETS=  _gem-build-install-root
+_GEM_INSTALL_TARGETS+= _gem-build-install-root-check
+.if !empty(GEM_CLEANBUILD)
+_GEM_INSTALL_TARGETS+= _gem-build-cleanbuild
+.endif
+_GEM_INSTALL_TARGETS+= _gem-install
+
+.ORDER: ${_GEM_INSTALL_TARGETS}
+
 USE_TOOLS+=    pax
 
-.PHONY: gem-install
-do-install: gem-install
-gem-install:
+do-install: ${_GEM_INSTALL_TARGETS}
+
+.PHONY: _gem-install
+_gem-install:
        ${RUN} cd ${_RUBYGEM_INSTALL_ROOT}${PREFIX} && \
                pax -rwpe . ${DESTDIR}${PREFIX}



Home | Main Index | Thread Index | Old Index