summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2008-03-12 20:08:22 +0000
committerjlam <jlam@pkgsrc.org>2008-03-12 20:08:22 +0000
commit214b971f53ad46a1a37d0dbec9dffb9811c6ba69 (patch)
treee6a43302f00b69110b29286d2ccdf1973fd3538d
parent9bb044a2c2897487e107db4cb97db5154d2d40e2 (diff)
downloadpkgsrc-214b971f53ad46a1a37d0dbec9dffb9811c6ba69.tar.gz
Don't try to remove the intermediate build files unless the ext/ directory
exists.
-rw-r--r--misc/rubygems/rubygem.mk19
1 files changed, 10 insertions, 9 deletions
diff --git a/misc/rubygems/rubygem.mk b/misc/rubygems/rubygem.mk
index 1a623602d61..235d3706ae8 100644
--- a/misc/rubygems/rubygem.mk
+++ b/misc/rubygems/rubygem.mk
@@ -1,4 +1,4 @@
-# $NetBSD: rubygem.mk,v 1.5 2008/03/12 18:53:35 jlam Exp $
+# $NetBSD: rubygem.mk,v 1.6 2008/03/12 20:08:22 jlam Exp $
#
# This Makefile fragment is intended to be included by packages that build
# and install Ruby gems.
@@ -155,14 +155,15 @@ do-gem-install:
@${STEP_MSG} "Installing gem into buildroot"
${RUN} ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \
${RUBYGEM} install ${_RUBYGEM_OPTIONS}
- @${STEP_MSG} "Cleaning up intermediate gem build files"
- ${RUN} cd ${_RUBYGEM_BUILDROOT}${GEM_LIBDIR}/ext && ls | \
- while read file; do \
- if [ ! -f ${WRKSRC}/ext/$$file ]; then \
- echo "rm "${GEM_LIBDIR:T}"/ext/$$file"; \
- rm -f $$file; \
- fi; \
- done
+ ${RUN} if [ -d ${_RUBYGEM_BUILDROOT}${GEM_LIBDIR}/ext ]; then \
+ cd ${_RUBYGEM_BUILDROOT}${GEM_LIBDIR}/ext && ls | \
+ while read file; do \
+ if [ ! -f ${WRKSRC}/ext/$$file ]; then \
+ echo "rm "${GEM_LIBDIR:T}"/ext/$$file"; \
+ rm -f $$file; \
+ fi; \
+ done; \
+ fi
@${STEP_MSG} "Copying files into installation directory"
${RUN} cd ${_RUBYGEM_BUILDROOT}${PREFIX} && \
pax -rwpe . ${DESTDIR}${PREFIX}