aboutsummaryrefslogtreecommitdiff
path: root/devel/ruby-gems
diff options
context:
space:
mode:
authorCheng-Lung Sung <clsung@FreeBSD.org>2008-01-07 03:51:31 +0000
committerCheng-Lung Sung <clsung@FreeBSD.org>2008-01-07 03:51:31 +0000
commit1c1e7a2364710db388bb4623a063da947ee4e7b4 (patch)
tree9412d4b471e05fbcb1287220929168d617ebb560 /devel/ruby-gems
parentc369e20f4d56c89d145179557b7c6fb723aa61c8 (diff)
downloadports-1c1e7a2364710db388bb4623a063da947ee4e7b4.tar.gz
ports-1c1e7a2364710db388bb4623a063da947ee4e7b4.zip
Notes
Diffstat (limited to 'devel/ruby-gems')
-rw-r--r--devel/ruby-gems/Makefile5
-rw-r--r--devel/ruby-gems/Makefile.common2
-rw-r--r--devel/ruby-gems/files/patch-lib-rubygems-installer.rb11
-rw-r--r--devel/ruby-gems/files/patch-lib-rubygems-source_info_cache.rb34
-rw-r--r--devel/ruby-gems/pkg-plist2
5 files changed, 51 insertions, 3 deletions
diff --git a/devel/ruby-gems/Makefile b/devel/ruby-gems/Makefile
index 5282ca066ba5..6ba298f3bd02 100644
--- a/devel/ruby-gems/Makefile
+++ b/devel/ruby-gems/Makefile
@@ -7,7 +7,7 @@
PORTNAME= gems
PORTVERSION= 1.0.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel ruby
MASTER_SITES= ${MASTER_SITE_RUBYFORGE}
MASTER_SITE_SUBDIR= ruby${PORTNAME}
@@ -30,4 +30,7 @@ PLIST_SUB+= DISTNAME="${DISTNAME}"
do-install:
cd ${WRKSRC}; ${RUBY} ${RUBY_SETUP}
+post-install:
+ @${LN} -sf ${PREFIX}/bin/gem${RUBY_VER:E} ${PREFIX}/bin/gem
+
.include <bsd.port.mk>
diff --git a/devel/ruby-gems/Makefile.common b/devel/ruby-gems/Makefile.common
index dd2ccb033caf..a6805e0897a9 100644
--- a/devel/ruby-gems/Makefile.common
+++ b/devel/ruby-gems/Makefile.common
@@ -49,5 +49,5 @@ GEMFILES= ${DISTNAME}${EXTRACT_SUFX}
do-install:
.for _D in ${GEMFILES}
- ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} install --no-ri --install-dir ${PREFIX}/lib/ruby/gems/${REV} ${DISTDIR}/${DIST_SUBDIR}/${_D} -- --build-args ${CONFIGURE_ARGS}
+ ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} install --no-update-sources --no-ri --install-dir ${PREFIX}/lib/ruby/gems/${REV} ${DISTDIR}/${DIST_SUBDIR}/${_D} -- --build-args ${CONFIGURE_ARGS}
.endfor
diff --git a/devel/ruby-gems/files/patch-lib-rubygems-installer.rb b/devel/ruby-gems/files/patch-lib-rubygems-installer.rb
new file mode 100644
index 000000000000..f627c9d8f2b6
--- /dev/null
+++ b/devel/ruby-gems/files/patch-lib-rubygems-installer.rb
@@ -0,0 +1,11 @@
+--- lib/rubygems/installer.rb.orig 2007-12-21 08:43:06.000000000 +0800
++++ lib/rubygems/installer.rb 2007-12-27 09:04:59.000000000 +0800
+@@ -134,7 +134,7 @@
+ build_extensions
+ write_spec
+
+- write_require_paths_file_if_needed
++ # write_require_paths_file_if_needed
+
+ # HACK remove? Isn't this done in multiple places?
+ cached_gem = File.join @gem_home, "cache", @gem.split(/\//).pop
diff --git a/devel/ruby-gems/files/patch-lib-rubygems-source_info_cache.rb b/devel/ruby-gems/files/patch-lib-rubygems-source_info_cache.rb
new file mode 100644
index 000000000000..85f801e750c4
--- /dev/null
+++ b/devel/ruby-gems/files/patch-lib-rubygems-source_info_cache.rb
@@ -0,0 +1,34 @@
+--- lib/rubygems/source_info_cache.rb.orig 2007-12-11 09:16:59.000000000 +0800
++++ lib/rubygems/source_info_cache.rb 2007-12-26 17:24:45.000000000 +0800
+@@ -70,6 +70,9 @@
+ begin
+ # Marshal loads 30-40% faster from a String, and 2MB on 20061116 is small
+ data = File.open cache_file, 'rb' do |fp| fp.read end
++ if data.length <= 4 then
++ raise ArgumentError, "Data too small"
++ end
+ @cache_data = Marshal.load data
+
+ @cache_data.each do |url, sice|
+@@ -85,11 +88,11 @@
+ end
+ end
+ @cache_data
+- rescue => e
++ rescue => ex
+ if Gem.configuration.really_verbose then
+ say "Exception during cache_data handling: #{ex.class} - #{ex}"
+ say "Cache file was: #{cache_file}"
+- say "\t#{e.backtrace.join "\n\t"}"
++ say "\t#{ex.backtrace.join "\n\t"}"
+ end
+ reset_cache_data
+ end
+@@ -107,6 +110,7 @@
+
+ def reset_cache_data
+ @cache_data = {}
++ FileUtils.rm @cache_file
+ end
+
+ # The name of the cache file to be read
diff --git a/devel/ruby-gems/pkg-plist b/devel/ruby-gems/pkg-plist
index 6aea1bd91b17..d2891e8faa69 100644
--- a/devel/ruby-gems/pkg-plist
+++ b/devel/ruby-gems/pkg-plist
@@ -1,3 +1,4 @@
+bin/gem
bin/gem18
bin/update_rubygems18
lib/ruby/gems/%%RUBY_VER%%/cache/sources-0.0.2.gem
@@ -1391,7 +1392,6 @@ lib/ruby/gems/%%RUBY_VER%%/doc/%%DISTNAME%%/ri/created.rid
@dirrm %%RUBY_SITELIBDIR%%/rubygems/commands
@dirrm %%RUBY_SITELIBDIR%%/rubygems
@dirrm %%RUBY_SITELIBDIR%%/rbconfig
-@dirrmtry lib/ruby/gems/%%RUBY_VER%%/source_cache
@dirrmtry lib/ruby/gems/%%RUBY_VER%%/specifications
@dirrm lib/ruby/gems/%%RUBY_VER%%/gems/sources-0.0.2/lib
@dirrm lib/ruby/gems/%%RUBY_VER%%/gems/sources-0.0.2