summaryrefslogtreecommitdiff
path: root/misc/rubygems
diff options
context:
space:
mode:
authorjlam <jlam>2008-03-13 15:57:25 +0000
committerjlam <jlam>2008-03-13 15:57:25 +0000
commitb68b6435b6871b66f8c7486fb95d319321a7e86e (patch)
tree7688f4086c718857cbcbf1b52b2dbfc78e191d54 /misc/rubygems
parent21d27deddcac5bb2e9a27b79a9f7616d493f66f7 (diff)
downloadpkgsrc-b68b6435b6871b66f8c7486fb95d319321a7e86e.tar.gz
When cleaning out the intermediate build files, be more thorough about
looking through the ext/ directory structure. Not all gems are simple.
Diffstat (limited to 'misc/rubygems')
-rw-r--r--misc/rubygems/rubygem.mk13
1 files changed, 9 insertions, 4 deletions
diff --git a/misc/rubygems/rubygem.mk b/misc/rubygems/rubygem.mk
index b99758c2390..232c39377a6 100644
--- a/misc/rubygems/rubygem.mk
+++ b/misc/rubygems/rubygem.mk
@@ -1,4 +1,4 @@
-# $NetBSD: rubygem.mk,v 1.12 2008/03/13 15:48:32 jlam Exp $
+# $NetBSD: rubygem.mk,v 1.13 2008/03/13 15:57:25 jlam Exp $
#
# This Makefile fragment is intended to be included by packages that build
# and install Ruby gems.
@@ -192,10 +192,15 @@ _gem-install-buildroot:
_gem-install-cleanbuild:
@${STEP_MSG} "Cleaning intermediate gem build files"
${RUN} if [ -d ${_RUBYGEM_BUILDROOT}${GEM_LIBDIR}/ext ]; then \
- cd ${_RUBYGEM_BUILDROOT}${GEM_LIBDIR}/ext && ls | \
+ cd ${_RUBYGEM_BUILDROOT}${GEM_LIBDIR} && \
+ find ext -print | sort -r | \
while read file; do \
- if [ ! -f ${WRKSRC}/ext/$$file ]; then \
- echo "rm "${GEM_LIBDIR:T}"/ext/$$file"; \
+ [ ! -e ${WRKSRC:Q}"/$$file" ] || continue; \
+ if [ -d ${WRKSRC:Q}"/$$file" ]; then \
+ echo "rmdir "${GEM_LIBDIR:T}"/$$file"; \
+ rmdir $$file; \
+ else \
+ echo "rm "${GEM_LIBDIR:T}"/$$file"; \
rm -f $$file; \
fi; \
done; \