pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/misc/rubygems + For print-PLIST, don't output any file...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5bbd17434aac
branches:  trunk
changeset: 539744:5bbd17434aac
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Mar 12 18:53:35 2008 +0000

description:
+ For print-PLIST, don't output any files or directories in
  ${GEM_DOCDIR} as those are automatically listed by
  RUBYGEM_GENERATE_PLIST.

+ Clean up the intermediate build files in the "ext" directory of
  installed gem by removing everything that's not also in the unpacked
  gem.

diffstat:

 misc/rubygems/rubygem.mk |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r c17559bd4599 -r 5bbd17434aac misc/rubygems/rubygem.mk
--- a/misc/rubygems/rubygem.mk  Wed Mar 12 16:59:13 2008 +0000
+++ b/misc/rubygems/rubygem.mk  Wed Mar 12 18:53:35 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rubygem.mk,v 1.4 2008/03/12 16:59:13 jlam Exp $
+# $NetBSD: rubygem.mk,v 1.5 2008/03/12 18:53:35 jlam Exp $
 #
 # This Makefile fragment is intended to be included by packages that build
 # and install Ruby gems.
@@ -88,7 +88,7 @@
 PRINT_PLIST_AWK+=      /^(@dirrm )?${GEM_LIBDIR:S|${PREFIX}/||:S|/|\\/|g}/ \
                        { gsub(/${GEM_LIBDIR:S|${PREFIX}/||:S|/|\\/|g}/, "$${GEM_LIBDIR}"); print; next; }
 PRINT_PLIST_AWK+=      /^(@dirrm )?${GEM_DOCDIR:S|${PREFIX}/||:S|/|\\/|g}/ \
-                       { gsub(/${GEM_DOCDIR:S|${PREFIX}/||:S|/|\\/|g}/, "$${GEM_DOCDIR}"); print; next; }
+                       { next; }
 PRINT_PLIST_AWK+=      /^@dirrm ${GEM_HOME:S|${PREFIX}/||:S|/|\\/|g}(\/(gems|cache|doc|specifications))?$$/ \
                        { next; }
 PRINT_PLIST_AWK+=      /^(@dirrm )?${GEM_HOME:S|${PREFIX}/||:S|/|\\/|g}/ \
@@ -155,6 +155,14 @@
        @${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
        @${STEP_MSG} "Copying files into installation directory"
        ${RUN} cd ${_RUBYGEM_BUILDROOT}${PREFIX} && \
                pax -rwpe . ${DESTDIR}${PREFIX}



Home | Main Index | Thread Index | Old Index