ports/144568: Ruby 1.9.1 has rubygems version 1.3.1 built in, but some gems require a newer version. 1.3.5 is available by the ports, but needs the following changes.
Aaron D. Gifford
astounding at gmail.com
Tue Mar 9 02:30:04 UTC 2010
The following reply was made to PR ports/144568; it has been noted by GNATS.
From: "Aaron D. Gifford" <astounding at gmail.com>
To: FreeBSD-gnats-submit at freebsd.org, freebsd-ports-bugs at freebsd.org
Cc:
Subject: Re: ports/144568: Ruby 1.9.1 has rubygems version 1.3.1 built in, but
some gems require a newer version. 1.3.5 is available by the ports, but needs
the following changes.
Date: Mon, 8 Mar 2010 18:53:11 -0700
There's a typo in my Makefile patch. And also I missed patching
pkg-plist. Finally, a new version 1.3.6, of rubygems is out. I
patched distinfo with the MD5/SHA256/size info and Makefile version
and it appears to have installed seamlessly under 1.9.1 with my
patches.
The only other issue is probably with the package file list, because
when I uninstall the port, I do notice this:
pkg_delete: file
'/usr/local/lib/ruby/site_ruby/1.9/rubygems/digest/digest_adapter.rb'
doesn't exist
pkg_delete: file
'/usr/local/lib/ruby/site_ruby/1.9/rubygems/digest/md5.rb' doesn't
exist
pkg_delete: file
'/usr/local/lib/ruby/site_ruby/1.9/rubygems/digest/sha1.rb' doesn't
exist
pkg_delete: file
'/usr/local/lib/ruby/site_ruby/1.9/rubygems/digest/sha2.rb' doesn't
exist
pkg_delete: file '/usr/local/lib/ruby/site_ruby/1.9/rubygems/timer.rb'
doesn't exist
pkg_delete: file '/usr/local/lib/ruby/site_ruby/1.9/rubygems/digest'
doesn't exist
pkg_delete: unable to completely remove directory
'/usr/local/lib/ruby/site_ruby/1.9/rubygems/digest'
pkg_delete: unable to completely remove directory
'/usr/local/lib/ruby/site_ruby/1.9/rubygems/commands'
pkg_delete: unable to completely remove directory
'/usr/local/lib/ruby/site_ruby/1.9/rubygems'
I'm not familiar enough with FreeBSD port pkg-plist structure to
appropriately and compatibly conditionally omit those files that 1.9
doesn't use/install. I am guessing wildly that this issue appears
because these files are included with 1.9 but perhaps not with 1.8?
Aaron out.
UPDATED PATCHES for 1.3.6 devel/ruby-gems under Ruby 1.9.1 on FreeBSD:
Makefile/pkg-plist/distinfo patch:
Online at:
http://www.aarongifford.com/ruby-gems-makefile-patch.txt
--- Makefile.orig 2010-03-08 17:49:32.247247288 -0700
+++ Makefile 2010-03-08 18:37:18.555302097 -0700
@@ -6,7 +6,7 @@
#
PORTNAME= gems
-PORTVERSION= 1.3.5
+PORTVERSION= 1.3.6
CATEGORIES= devel ruby
MASTER_SITES= RF
MASTER_SITE_SUBDIR= ruby${PORTNAME}
@@ -43,9 +43,8 @@
.include <bsd.port.pre.mk>
-.if ${RUBY_VER} == 1.9
-IGNORE= already included in this ruby distribution
-.endif
+RUBY_SVER= ${RUBY_VER:S/.//g}
+PLIST_SUB+= RUBY_SVER="${RUBY_SVER}"
do-install:
cd ${WRKSRC}; ${RUBY} ${RUBY_SETUP} ${RUBY_SETUP_OPTIONS}
@@ -53,7 +52,7 @@
post-install:
@${MKDIR} ${PREFIX}/${GEMS_DOC_BASE_DIR}/
@${TOUCH} ${PREFIX}/${GEMS_DOC_BASE_DIR}/.keep_this
- @${LN} -sf ${PREFIX}/bin/gem18 ${PREFIX}/bin/gem
+ @${LN} -sf ${PREFIX}/bin/gem${RUBY_SVER} ${PREFIX}/bin/gem
.if !defined(NOPORTDOCS)
@${FIND} -ds ${PREFIX}/lib/ruby/gems/${RUBY_VER}/doc/${DISTNAME} \
@@ -69,8 +68,8 @@
# This target is only meant to be used by the port maintainer.
x-generate-plist:
${ECHO} bin/gem > pkg-plist.new
- ${ECHO} bin/gem18 >> pkg-plist.new
- ${ECHO} bin/update_rubygems18 >> pkg-plist.new
+ ${ECHO} bin/gem${RUBYS_VER} >> pkg-plist.new
+ ${ECHO} bin/update_rubygems${RUBY_SVER} >> pkg-plist.new
${ECHO} ${GEMS_VER_DIR_P}/cache/sources-0.0.2.gem >> pkg-plist.new
${FIND} ${PREFIX}/${GEMS_VER_DIR}/gems/sources-0.0.2 -type f |
${SORT} | ${SED} -e 's,${PREFIX}/${GEMS_VER_DIR},${GEMS_VER_DIR_P},'
>> pkg-plist.new
${ECHO} ${GEMS_VER_DIR_P}/specifications/sources-0.0.2.gemspec >>
pkg-plist.new
--- distinfo.orig 2010-03-08 18:37:49.285715931 -0700
+++ distinfo 2010-03-08 18:37:56.593576220 -0700
@@ -1,7 +1,3 @@
-MD5 (ruby/rubygems-1.3.5.tgz) = 6e317335898e73beab15623cdd5f8cff
-SHA256 (ruby/rubygems-1.3.5.tgz) =
c0928cc1ae54dedfb5f57ad3829882c1f90e42bc17bf50491aa6f93a937546ac
-SIZE (ruby/rubygems-1.3.5.tgz) = 278469
-
MD5 (ruby/rubygems-1.3.6.tgz) = 789ca8e9ad1d4d3fe5f0534fcc038a0d
SHA256 (ruby/rubygems-1.3.6.tgz) =
5c6e6ca672b68acccb8f898670f1661307dea8668fc7f71bb421cab51208d7b0
SIZE (ruby/rubygems-1.3.6.tgz) = 285167
--- pkg-plist.orig 2010-03-08 18:27:10.306935999 -0700
+++ pkg-plist 2010-03-08 18:37:29.782088283 -0700
@@ -1,7 +1,7 @@
@comment $FreeBSD: ports/devel/ruby-gems/pkg-plist,v 1.20 2009/08/05
03:01:51 pgollucci Exp $
bin/gem
-bin/gem18
-bin/update_rubygems18
+bin/gem%%RUBY_SVER%%
+bin/update_rubygems%%RUBY_SVER%%
lib/ruby/gems/%%RUBY_VER%%/cache/sources-0.0.2.gem
lib/ruby/gems/%%RUBY_VER%%/gems/sources-0.0.2/lib/sources.rb
lib/ruby/gems/%%RUBY_VER%%/specifications/sources-0.0.2.gemspec
The other patch remains the same, available online at:
http://www.aarongifford.com/ruby-gems-patch-lib__rubygems__defaults.rb.txt
More information about the freebsd-ports-bugs
mailing list