>Submitter-Id:  current-users
>Originator:    Sunpoet Po-Chuan Hsieh
>Organization:  The FreeBSD Project
>Confidential:  no 
>Synopsis:      [PATCH] devel/ruby-gems: fix and cleanup PLIST
>Severity:      non-critical
>Priority:      low
>Category:      ports 
>Class:         change-request
>Release:       FreeBSD 9.0-STABLE amd64
>Environment:
System: FreeBSD bonjour.sunpoet.net 9.0-STABLE FreeBSD 9.0-STABLE #0: Sun Jan 
29 23:36:49 CST 2012
>Description:
- Fix and cleanup PLIST
  - GEMS_DOC_DIR does not exist if NOPORTDOCS is set [1]
  - 4 entries in PLIST are no-op [2]
    (they are equivalent to the TMPPLIST manipulation in post-patch:)
    (they should occur after the entries of doc files)

Port maintainer (r...@freebsd.org) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:

[1]
% make NOPORTDOCS=yes install deinstall
...
===>  Deinstalling for devel/ruby-gems
===>   Deinstalling ruby19-gems-1.8.11
pkg_delete: file '/usr/local/lib/ruby/gems/1.9/doc/rubygems-1.8.11' doesn't 
exist
pkg_delete: unable to completely remove directory 
'/usr/local/lib/ruby/gems/1.9/doc/rubygems-1.8.11'
pkg_delete: couldn't entirely delete package `ruby19-gems-1.8.11'
(perhaps the packing list is incorrectly specified?)

[2]
% make install
% grep lib/ruby/gems/`make -V RUBY_VER` `make -V TMPPLIST`

>Fix:

--- ruby-gems-1.8.11.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/devel/ruby-gems/Makefile,v
retrieving revision 1.48
diff -u -u -r1.48 Makefile
--- Makefile    18 Jan 2012 05:22:52 -0000      1.48
+++ Makefile    28 Feb 2012 17:22:57 -0000
@@ -59,9 +59,9 @@
            ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
        @${FIND} -ds ${PREFIX}/${GEMS_DOC_DIR}/ -type d -mindepth 1 | \
            ${SED} -E -e 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
+       @${ECHO_CMD} "@dirrm ${GEMS_DOC_DIR}" >> ${TMPPLIST}
 .endif
 
-       @${ECHO_CMD} "@dirrm ${GEMS_DOC_DIR}" >> ${TMPPLIST}
        @${ECHO_CMD} "@unexec rmdir %D/lib/ruby/gems/${RUBY_VER}/doc 
2>/dev/null || true" >> ${TMPPLIST}
        @${ECHO_CMD} "@unexec rmdir %D/lib/ruby/gems/${RUBY_VER} 2>/dev/null || 
true" >> ${TMPPLIST}
        @${ECHO_CMD} "@unexec rmdir %D/lib/ruby/gems 2>/dev/null || true" >> 
${TMPPLIST}
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/devel/ruby-gems/pkg-plist,v
retrieving revision 1.28
diff -u -u -r1.28 pkg-plist
--- pkg-plist   28 Aug 2011 20:01:09 -0000      1.28
+++ pkg-plist   28 Feb 2012 17:22:57 -0000
@@ -100,7 +100,3 @@
 @dirrm %%RUBY_SITELIBDIR%%/rbconfig
 @dirrmtry %%RUBY_SITELIBDIR%%
 @dirrmtry lib/ruby/site_ruby
-@dirrmtry lib/ruby/gems/%%RUBY_VER%%/doc
-@dirrmtry lib/ruby/gems/%%RUBY_VER%%
-@dirrmtry lib/ruby/gems
-@dirrmtry lib/ruby
--- ruby-gems-1.8.11.patch ends here ---

_______________________________________________
freebsd-ruby@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ruby
To unsubscribe, send any mail to "freebsd-ruby-unsubscr...@freebsd.org"

Reply via email to