summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorminskim <minskim>2009-06-10 21:44:30 +0000
committerminskim <minskim>2009-06-10 21:44:30 +0000
commitbe0c55fb7a96982f55682d2936042dda44f7ce31 (patch)
treee89bd547a6b334e1656eb6caf8dd73764cae7b38 /misc
parentcfcb4a19b57649098a3bb7d307c9bee9f8e0ea68 (diff)
downloadpkgsrc-be0c55fb7a96982f55682d2936042dda44f7ce31.tar.gz
Update rubygems to 1.3.4.
New features since 1.3.1: * RubyGems now loads plugins from rubygems_plugin.rb in installed gems. This can be used to add commands (See Gem::CommandManager) or add install/uninstall hooks (See Gem::Installer and Gem::Uninstaller). * Gem::Version now understands prerelease versions using letters. (eg. '1.2.1.b') Thanks to Josh Susser, Alex Vollmer and Phil Hagelberg. * RubyGems now includes a Rake task for creating gems which replaces rake's Rake::GemPackageTask. See Gem::PackageTask. * Gem::find_files now returns paths in $LOAD_PATH. * Added Gem::promote_load_path for use with Gem::find_files * Added Gem::bin_path to make finding executables easier. Patch #24114 by James Tucker. * Various improvements to build arguments for installing gems. * `gem contents` added --all and --no-prefix. * Gem::Specification * #validate strips directories and errors on not-files. * #description no longer removes newlines. * #name must be a String. * FIXME and TODO are no longer allowed in various fields. * Added support for a license attribute. Feature #11041 (partial). * Removed Gem::Specification::list, too much process growth. Bug #23668 by Steve Purcell. * `gem generate_index` * Can now generate an RSS feed. * Modern indicies can now be updated incrementally. * Legacy indicies can be updated separately from modern. * `gem server` allows port names (from /etc/services) with --port. * `gem server` now has search that jumps to RDoc. Patch #22959 by Vladimir Dobriakov. * `gem spec` can retrieve single fields from a spec (like `gem spec rake authors`). * Gem::Specification#has_rdoc= is deprecated and ignored (defaults to true) * RDoc is now generated regardless of Gem::Specification#has_rdoc?
Diffstat (limited to 'misc')
-rw-r--r--misc/rubygems/Makefile11
-rw-r--r--misc/rubygems/PLIST6
-rw-r--r--misc/rubygems/distinfo23
-rw-r--r--misc/rubygems/patches/patch-aa12
-rw-r--r--misc/rubygems/patches/patch-ab19
-rw-r--r--misc/rubygems/patches/patch-ac7
-rw-r--r--misc/rubygems/patches/patch-ad20
-rw-r--r--misc/rubygems/patches/patch-af24
-rw-r--r--misc/rubygems/patches/patch-ag28
-rw-r--r--misc/rubygems/patches/patch-ah10
-rw-r--r--misc/rubygems/patches/patch-aj8
-rw-r--r--misc/rubygems/rubygem.mk12
12 files changed, 88 insertions, 92 deletions
diff --git a/misc/rubygems/Makefile b/misc/rubygems/Makefile
index 29a23bb7cde..4666b3d1482 100644
--- a/misc/rubygems/Makefile
+++ b/misc/rubygems/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.23 2009/04/07 07:35:44 minskim Exp $
+# $NetBSD: Makefile,v 1.24 2009/06/10 21:44:30 minskim Exp $
-DISTNAME= rubygems-1.3.1
+DISTNAME= rubygems-1.3.4
CATEGORIES= misc ruby
-MASTER_SITES= http://rubyforge.org/frs/download.php/45905/
+MASTER_SITES= http://rubyforge.org/frs/download.php/57643/
EXTRACT_SUFX= .tgz
MAINTAINER= minskim@NetBSD.org
@@ -49,15 +49,16 @@ GENERATE_PLIST+= \
.include "../../lang/ruby/modules.mk"
# Force the Gem repository to be under ${DESTDIR}. This is harmless
-# because this packages depends on no other gems.
+# because this package depends on no other gems.
#
INSTALL_ENV+= GEM_HOME=${DESTDIR}${GEM_HOME}
+INSTALL_ENV+= GEM_PATH=${DESTDIR}${GEM_HOME}
INSTALL_TARGET= install
INSTALL_TARGET+= --vendor
INSTALL_TARGET+= --no-format-executable # "bin/gem", not "bin/gem18"
.if ${_USE_DESTDIR} != "no"
-INSTALL_TARGET+= --destdir=${DESTDIR:Q}${PREFIX:Q}
+INSTALL_TARGET+= --destdir=${DESTDIR:Q}
.endif
# rubygem's setup.rb is not the typical setup.rb -- manually run the
diff --git a/misc/rubygems/PLIST b/misc/rubygems/PLIST
index d41ae51f92d..35398fbe383 100644
--- a/misc/rubygems/PLIST
+++ b/misc/rubygems/PLIST
@@ -1,5 +1,6 @@
-@comment $NetBSD: PLIST,v 1.10 2008/09/15 08:43:44 taca Exp $
+@comment $NetBSD: PLIST,v 1.11 2009/06/10 21:44:31 minskim Exp $
bin/gem
+${RUBY_VENDORLIB}/gauntlet_rubygems.rb
${RUBY_VENDORLIB}/rbconfig/datadir.rb
${RUBY_VENDORLIB}/rubygems/builder.rb
${RUBY_VENDORLIB}/rubygems/command.rb
@@ -24,6 +25,7 @@ ${RUBY_VENDORLIB}/rubygems/commands/query_command.rb
${RUBY_VENDORLIB}/rubygems/commands/rdoc_command.rb
${RUBY_VENDORLIB}/rubygems/commands/search_command.rb
${RUBY_VENDORLIB}/rubygems/commands/server_command.rb
+${RUBY_VENDORLIB}/rubygems/commands/setup_command.rb
${RUBY_VENDORLIB}/rubygems/commands/sources_command.rb
${RUBY_VENDORLIB}/rubygems/commands/specification_command.rb
${RUBY_VENDORLIB}/rubygems/commands/stale_command.rb
@@ -65,6 +67,7 @@ ${RUBY_VENDORLIB}/rubygems/package/tar_reader/entry.rb
${RUBY_VENDORLIB}/rubygems/package/tar_reader.rb
${RUBY_VENDORLIB}/rubygems/package/tar_writer.rb
${RUBY_VENDORLIB}/rubygems/package.rb
+${RUBY_VENDORLIB}/rubygems/package_task.rb
${RUBY_VENDORLIB}/rubygems/platform.rb
${RUBY_VENDORLIB}/rubygems/remote_fetcher.rb
${RUBY_VENDORLIB}/rubygems/require_paths_builder.rb
@@ -78,6 +81,7 @@ ${RUBY_VENDORLIB}/rubygems/source_info_cache_entry.rb
${RUBY_VENDORLIB}/rubygems/spec_fetcher.rb
${RUBY_VENDORLIB}/rubygems/specification.rb
${RUBY_VENDORLIB}/rubygems/test_utilities.rb
+${RUBY_VENDORLIB}/rubygems/text.rb
${RUBY_VENDORLIB}/rubygems/timer.rb
${RUBY_VENDORLIB}/rubygems/uninstaller.rb
${RUBY_VENDORLIB}/rubygems/user_interaction.rb
diff --git a/misc/rubygems/distinfo b/misc/rubygems/distinfo
index 9f7610c0fe7..c73303561af 100644
--- a/misc/rubygems/distinfo
+++ b/misc/rubygems/distinfo
@@ -1,14 +1,13 @@
-$NetBSD: distinfo,v 1.19 2009/04/07 07:35:44 minskim Exp $
+$NetBSD: distinfo,v 1.20 2009/06/10 21:44:31 minskim Exp $
-SHA1 (rubygems-1.3.1.tgz) = a21ae466146bffb28ece05cddbdced0b908ca74f
-RMD160 (rubygems-1.3.1.tgz) = 898f33bf49ac6d29d8980cb4feaf30ade0125248
-Size (rubygems-1.3.1.tgz) = 263748 bytes
-SHA1 (patch-aa) = c504f63e6279a99ddc76a03c0978b89ae2e81024
-SHA1 (patch-ab) = b5a0de2c565ba15e2b0fd34993ead019ddee4469
-SHA1 (patch-ac) = 5f744d9556855f7a430401c855e288b42669c808
-SHA1 (patch-ad) = 84e1399a671d1888d330bace930fe44c2e72037a
-SHA1 (patch-af) = 75f7fe5c777c4eef652e537ba91c2977ee2cfdd6
-SHA1 (patch-ag) = 9f18db21fcd77d09f810913dd90eecd88cec6250
-SHA1 (patch-ah) = 0dcf44dfaaa1ae5d2b4165c8b1431ddbe46b4b24
-SHA1 (patch-aj) = 8b8c76daf32564eae2150a4262a85180f0cb0af7
+SHA1 (rubygems-1.3.4.tgz) = b973b4748c0bc08f9a62b3312bde935dda2eac6f
+RMD160 (rubygems-1.3.4.tgz) = 451797299921cac9997fc93a85601d6f28f17cf5
+Size (rubygems-1.3.4.tgz) = 293275 bytes
+SHA1 (patch-ab) = b38026920e31ae7782df6bbd7d7285d18dcf6ece
+SHA1 (patch-ac) = 30ff76c661575d9c51051bb207363f3d2d8b5283
+SHA1 (patch-ad) = 9e6b11f5edae0656a59d623f4dae05ca7ecbdfaf
+SHA1 (patch-af) = a89a1e21fa6389359653c21ed5eac02d84114b51
+SHA1 (patch-ag) = 20d4bf48fc13409107fcaa7c730b0a8c4641de15
+SHA1 (patch-ah) = 015aaccf066333d057997404f43b126e648ff379
+SHA1 (patch-aj) = fa2192319a01e7a9dc50e497de5d3d52ab9f5768
SHA1 (patch-ak) = 999b52ab6f61dd1c81608d08418b9bb34bdc8aa6
diff --git a/misc/rubygems/patches/patch-aa b/misc/rubygems/patches/patch-aa
deleted file mode 100644
index c71c2ddbb18..00000000000
--- a/misc/rubygems/patches/patch-aa
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-aa,v 1.5 2008/09/15 08:43:44 taca Exp $
-
---- lib/rubygems/commands/install_command.rb.orig 2008-06-21 05:05:41.000000000 +0900
-+++ lib/rubygems/commands/install_command.rb
-@@ -59,6 +59,7 @@ class Gem::Commands::InstallCommand < Ge
- :format_executable => options[:format_executable],
- :ignore_dependencies => options[:ignore_dependencies],
- :install_dir => options[:install_dir],
-+ :install_root => options[:install_root],
- :security_policy => options[:security_policy],
- :wrappers => options[:wrappers],
- :bin_dir => options[:bin_dir],
diff --git a/misc/rubygems/patches/patch-ab b/misc/rubygems/patches/patch-ab
index 1f48f59b2c4..ede66049c89 100644
--- a/misc/rubygems/patches/patch-ab
+++ b/misc/rubygems/patches/patch-ab
@@ -1,28 +1,29 @@
-$NetBSD: patch-ab,v 1.9 2009/04/07 07:35:44 minskim Exp $
+$NetBSD: patch-ab,v 1.10 2009/06/10 21:44:31 minskim Exp $
---- lib/rubygems/dependency_installer.rb.orig 2008-08-12 14:50:22.000000000 -0700
+--- lib/rubygems/dependency_installer.rb.orig 2009-03-04 17:07:04.000000000 -0800
+++ lib/rubygems/dependency_installer.rb
-@@ -37,13 +37,18 @@ class Gem::DependencyInstaller
+@@ -38,6 +38,7 @@ class Gem::DependencyInstaller
# :format_executable:: See Gem::Installer#initialize.
# :ignore_dependencies:: Don't install any dependencies.
# :install_dir:: See Gem::Installer#install.
+ # :install_root: See Gem::Installer#install.
+ # :prerelease:: Allow prerelease versions
# :security_policy:: See Gem::Installer::new and Gem::Security.
# :user_install:: See Gem::Installer.new
- # :wrappers:: See Gem::Installer::new
+@@ -45,7 +46,11 @@ class Gem::DependencyInstaller
def initialize(options = {})
if options[:install_dir] then
- spec_dir = options[:install_dir], 'specifications'
+ if options[:install_root].nil? or options[:install_root] == "" then
-+ spec_dir = options[:install_root], options[:install_dir], 'specifications'
-+ else
+ spec_dir = options[:install_dir], 'specifications'
++ else
++ spec_dir = options[:install_root], options[:install_dir], 'specifications'
+ end
@source_index = Gem::SourceIndex.from_gems_in spec_dir
else
@source_index = Gem.source_index
-@@ -65,7 +70,12 @@ class Gem::DependencyInstaller
+@@ -68,7 +73,12 @@ class Gem::DependencyInstaller
@installed_gems = []
@install_dir = options[:install_dir] || Gem.dir
@@ -36,11 +37,11 @@ $NetBSD: patch-ab,v 1.9 2009/04/07 07:35:44 minskim Exp $
end
##
-@@ -241,6 +251,7 @@ class Gem::DependencyInstaller
+@@ -244,6 +254,7 @@ class Gem::DependencyInstaller
:format_executable => @format_executable,
:ignore_dependencies => @ignore_dependencies,
:install_dir => @install_dir,
-+ :install_root => @install_root,
++ :install_root => @install_root,
:security_policy => @security_policy,
:source_index => @source_index,
:user_install => @user_install,
diff --git a/misc/rubygems/patches/patch-ac b/misc/rubygems/patches/patch-ac
index 474668d5def..4de08924d1c 100644
--- a/misc/rubygems/patches/patch-ac
+++ b/misc/rubygems/patches/patch-ac
@@ -1,14 +1,15 @@
-$NetBSD: patch-ac,v 1.3 2008/09/15 08:43:44 taca Exp $
+$NetBSD: patch-ac,v 1.4 2009/06/10 21:44:31 minskim Exp $
---- lib/rubygems/install_update_options.rb.orig 2008-05-07 11:15:51.000000000 +0900
+--- lib/rubygems/install_update_options.rb.orig 2009-03-13 16:01:10.000000000 -0700
+++ lib/rubygems/install_update_options.rb
-@@ -31,6 +31,11 @@ module Gem::InstallUpdateOptions
+@@ -34,6 +34,12 @@ module Gem::InstallUpdateOptions
options[:bin_dir] = File.expand_path(value)
end
+ add_option(:"Install", '-B', '--install-root DIR',
+ 'Root directory for gem files on install') do |value, options|
+ options[:install_root] = File.expand_path(value)
++ Gem.ensure_gem_subdirectories File.join options[:install_root], Gem.dir
+ end
+
add_option(:"Install/Update", '-d', '--[no-]rdoc',
diff --git a/misc/rubygems/patches/patch-ad b/misc/rubygems/patches/patch-ad
index 01010784bac..973f24c7f4b 100644
--- a/misc/rubygems/patches/patch-ad
+++ b/misc/rubygems/patches/patch-ad
@@ -1,8 +1,8 @@
-$NetBSD: patch-ad,v 1.4 2009/04/07 07:35:44 minskim Exp $
+$NetBSD: patch-ad,v 1.5 2009/06/10 21:44:31 minskim Exp $
---- lib/rubygems/installer.rb.orig 2008-10-10 11:22:39.000000000 -0700
+--- lib/rubygems/installer.rb.orig 2009-03-31 21:06:19.000000000 -0700
+++ lib/rubygems/installer.rb
-@@ -80,6 +80,9 @@ class Gem::Installer
+@@ -85,6 +85,9 @@ class Gem::Installer
# for a signed-gems-only policy.
# :ignore_dependencies:: Don't raise if a dependency is missing.
# :install_dir:: The directory to install the gem into.
@@ -12,7 +12,7 @@ $NetBSD: patch-ad,v 1.4 2009/04/07 07:35:44 minskim Exp $
# :format_executable:: Format the executable the same as the ruby executable.
# If your ruby is ruby18, foo_exec will be installed as
# foo_exec18.
-@@ -95,6 +98,7 @@ class Gem::Installer
+@@ -100,6 +103,7 @@ class Gem::Installer
:exec_format => false,
:force => false,
:install_dir => Gem.dir,
@@ -20,11 +20,11 @@ $NetBSD: patch-ad,v 1.4 2009/04/07 07:35:44 minskim Exp $
:source_index => Gem.source_index,
}.merge options
-@@ -109,6 +113,11 @@ class Gem::Installer
- @bin_dir = options[:bin_dir]
- @development = options[:development]
- @source_index = options[:source_index]
-+ install_root = options[:install_root]
+@@ -114,6 +118,11 @@ class Gem::Installer
+ @bin_dir = options[:bin_dir]
+ @development = options[:development]
+ @source_index = options[:source_index]
++ install_root = options[:install_root]
+ unless install_root.nil? or install_root == ""
+ @install_root = File.expand_path install_root
+ @gem_home = File.join(@install_root, @gem_home)
@@ -32,7 +32,7 @@ $NetBSD: patch-ad,v 1.4 2009/04/07 07:35:44 minskim Exp $
begin
@format = Gem::Format.from_file_by_path @gem, @security_policy
-@@ -310,7 +319,11 @@ class Gem::Installer
+@@ -312,7 +321,11 @@ class Gem::Installer
# If the user has asked for the gem to be installed in a directory that is
# the system gem directory, then use the system bin directory, else create
# (or use) a new bin dir under the gem_home.
diff --git a/misc/rubygems/patches/patch-af b/misc/rubygems/patches/patch-af
index a2cd82c7c12..cbfee4da6c5 100644
--- a/misc/rubygems/patches/patch-af
+++ b/misc/rubygems/patches/patch-af
@@ -1,16 +1,16 @@
-$NetBSD: patch-af,v 1.2 2008/09/15 08:43:44 taca Exp $
+$NetBSD: patch-af,v 1.3 2009/06/10 21:44:31 minskim Exp $
---- lib/rubygems/commands/uninstall_command.rb.orig 2008-02-24 11:26:47.000000000 +0900
+--- lib/rubygems/commands/uninstall_command.rb.orig 2009-03-13 16:16:55.000000000 -0700
+++ lib/rubygems/commands/uninstall_command.rb
-@@ -40,6 +40,11 @@ module Gem
- options[:bin_dir] = File.expand_path(value)
- end
+@@ -49,6 +49,11 @@ class Gem::Commands::UninstallCommand <
+ options[:user_install] = value
+ end
-+ add_option('-B', '--install-root DIR',
-+ 'Root directory for gem files') do |value, options|
-+ options[:install_root] = File.expand_path(value)
-+ end
++ add_option('-B', '--install-root DIR',
++ 'Root directory for gem files') do |value, options|
++ options[:install_root] = File.expand_path(value)
++ end
+
- add_version_option
- add_platform_option
- end
+ add_version_option
+ add_platform_option
+ end
diff --git a/misc/rubygems/patches/patch-ag b/misc/rubygems/patches/patch-ag
index b19bc6ead81..624459eab09 100644
--- a/misc/rubygems/patches/patch-ag
+++ b/misc/rubygems/patches/patch-ag
@@ -1,29 +1,29 @@
-$NetBSD: patch-ag,v 1.3 2009/04/07 07:35:44 minskim Exp $
+$NetBSD: patch-ag,v 1.4 2009/06/10 21:44:31 minskim Exp $
---- lib/rubygems/uninstaller.rb.orig 2008-08-14 15:57:27.000000000 -0700
+--- lib/rubygems/uninstaller.rb.orig 2009-05-15 11:32:23.000000000 -0700
+++ lib/rubygems/uninstaller.rb
-@@ -45,6 +45,11 @@ class Gem::Uninstaller
- @force_all = options[:all]
- @force_ignore = options[:ignore]
- @bin_dir = options[:bin_dir]
+@@ -55,6 +55,12 @@ class Gem::Uninstaller
+ @user_install = false
+ @user_install = options[:user_install] unless options[:install_dir]
+
+ install_root = options[:install_root]
+ unless install_root.nil? or install_root == ""
+ @install_root = File.expand_path install_root
+ @gem_home = File.join(@install_root, @gem_home)
+ end
-
++
spec_dir = File.join @gem_home, 'specifications'
@source_index = Gem::SourceIndex.from_gems_in spec_dir
-@@ -109,7 +114,11 @@ class Gem::Uninstaller
- return if gemspec.nil?
- if gemspec.executables.size > 0 then
-- bindir = @bin_dir ? @bin_dir : (Gem.bindir @gem_home)
-+ bindir = @bin_dir ? @bin_dir : (Gem.bindir @gem_home, @install_root)
+@@ -125,6 +131,11 @@ class Gem::Uninstaller
+
+ unless spec.executables.empty? then
+ bindir = @bin_dir ? @bin_dir : Gem.bindir(spec.installation_path)
++ bindir = @bin_dir ? @bin_dir : Gem.bindir(sepc_installation_path, @install_root)
+
+ unless @install_root.nil? or @install_root == ""
+ bindir = File.join(@install_root, bindir)
+ end
- list = @source_index.find_name(gemspec.name).delete_if { |spec|
- spec.version == gemspec.version
+ list = @source_index.find_name(spec.name).delete_if { |s|
+ s.version == spec.version
diff --git a/misc/rubygems/patches/patch-ah b/misc/rubygems/patches/patch-ah
index 6607f62facd..43205b9a63e 100644
--- a/misc/rubygems/patches/patch-ah
+++ b/misc/rubygems/patches/patch-ah
@@ -1,8 +1,8 @@
-$NetBSD: patch-ah,v 1.4 2008/09/15 08:43:44 taca Exp $
+$NetBSD: patch-ah,v 1.5 2009/06/10 21:44:31 minskim Exp $
---- lib/rubygems.rb.orig 2008-06-21 04:54:57.000000000 +0900
+--- lib/rubygems.rb.orig 2009-05-21 14:44:06.000000000 -0700
+++ lib/rubygems.rb
-@@ -230,7 +230,13 @@ module Gem
+@@ -396,7 +396,13 @@ module Gem
##
# The path where gem executables are to be installed.
@@ -17,7 +17,7 @@ $NetBSD: patch-ah,v 1.4 2008/09/15 08:43:44 taca Exp $
return File.join(install_dir, 'bin') unless
install_dir.to_s == Gem.default_dir
Gem.default_bindir
-@@ -435,12 +441,12 @@ module Gem
+@@ -637,12 +643,12 @@ module Gem
##
# The index to insert activated gem paths into the $LOAD_PATH.
#
@@ -32,7 +32,7 @@ $NetBSD: patch-ah,v 1.4 2008/09/15 08:43:44 taca Exp $
$LOAD_PATH.each_with_index do |path, i|
if path.instance_variables.include?(:@gem_prelude_index) or
-@@ -529,7 +535,8 @@ module Gem
+@@ -750,7 +756,8 @@ module Gem
def self.prefix
prefix = File.dirname File.expand_path(__FILE__)
diff --git a/misc/rubygems/patches/patch-aj b/misc/rubygems/patches/patch-aj
index f1d77ebe5a5..4ea55b0ee55 100644
--- a/misc/rubygems/patches/patch-aj
+++ b/misc/rubygems/patches/patch-aj
@@ -1,6 +1,6 @@
-$NetBSD: patch-aj,v 1.3 2009/04/07 07:35:44 minskim Exp $
+$NetBSD: patch-aj,v 1.4 2009/06/10 21:44:31 minskim Exp $
---- lib/rubygems/defaults.rb.orig 2008-10-10 13:29:53.000000000 -0700
+--- lib/rubygems/defaults.rb.orig 2009-05-20 16:30:35.000000000 -0700
+++ lib/rubygems/defaults.rb
@@ -18,7 +18,7 @@ module Gem
@@ -9,5 +9,5 @@ $NetBSD: patch-aj,v 1.3 2009/04/07 07:35:44 minskim Exp $
- File.join File.dirname(ConfigMap[:sitedir]), 'Gems',
+ File.join File.dirname(ConfigMap[:vendordir]), 'Gems',
ConfigMap[:ruby_version]
- else
- File.join(ConfigMap[:libdir], ruby_engine, 'gems',
+ # 1.9.2dev reverted to 1.8 style path
+ elsif RUBY_VERSION > '1.9' and RUBY_VERSION < '1.9.2' then
diff --git a/misc/rubygems/rubygem.mk b/misc/rubygems/rubygem.mk
index feb0b336bd4..fac408983d4 100644
--- a/misc/rubygems/rubygem.mk
+++ b/misc/rubygems/rubygem.mk
@@ -1,4 +1,4 @@
-# $NetBSD: rubygem.mk,v 1.40 2009/04/07 07:35:44 minskim Exp $
+# $NetBSD: rubygem.mk,v 1.41 2009/06/10 21:44:31 minskim Exp $
#
# This Makefile fragment is intended to be included by packages that build
# and install Ruby gems.
@@ -103,6 +103,7 @@ EXTRACT_ONLY?= # empty
# Base directory for Gems
GEM_HOME= ${PREFIX}/lib/ruby/gems/${RUBY_VER_DIR}
+MAKE_ENV+= GEM_PATH=${GEM_HOME}
# Directory for the Gem to install
GEM_NAME?= ${DISTNAME}
@@ -186,7 +187,7 @@ gem-build: _gem-${GEM_BUILD}-build
_gem-gemspec-build:
${RUN} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
${RUBYGEM} build ${GEM_SPECFILE}
- ${RUN} test -f ${WRKSRC}/${GEM_NAME}.gem || \
+ ${RUN} ${TEST} -f ${WRKSRC}/${GEM_NAME}.gem || \
${FAIL_MSG} "Build of ${GEM_NAME}.gem failed."
BUILD_TARGET?= gem
@@ -205,6 +206,7 @@ _RUBYGEM_INSTALL_ROOT= ${WRKDIR}/.inst
_RUBYGEM_OPTIONS= --no-update-sources # don't cache the gem index
_RUBYGEM_OPTIONS+= --install-dir ${GEM_HOME}
_RUBYGEM_OPTIONS+= --install-root ${_RUBYGEM_INSTALL_ROOT}
+_RUBYGEM_OPTIONS+= --ignore-dependencies
_RUBYGEM_OPTIONS+= --local ${WRKSRC}/${GEM_NAME}.gem
_RUBYGEM_OPTIONS+= -- --build-args ${CONFIGURE_ARGS}
@@ -219,7 +221,7 @@ _gem-build-install-root:
#
.PHONY: _gem-build-install-root-check
_gem-build-install-root-check:
- ${RUN} test -f ${_RUBYGEM_INSTALL_ROOT}${GEM_CACHEDIR}/${GEM_NAME}.gem || \
+ ${RUN} ${TEST} -f ${_RUBYGEM_INSTALL_ROOT}${GEM_CACHEDIR}/${GEM_NAME}.gem || \
${FAIL_MSG} "Installing ${GEM_NAME}.gem into installation root failed."
.if !empty(GEM_CLEANBUILD)
@@ -235,10 +237,10 @@ _gem-build-cleanbuild:
esac; \
[ ! -e ${WRKSRC:Q}"/$$file" ] || continue; \
if [ -d "$$file" ]; then \
- echo "rmdir "${GEM_LIBDIR:T}"/$$file"; \
+ ${ECHO} "rmdir "${GEM_LIBDIR:T}"/$$file"; \
rmdir $$file; \
else \
- echo "rm "${GEM_LIBDIR:T}"/$$file"; \
+ ${ECHO} "rm "${GEM_LIBDIR:T}"/$$file"; \
rm -f $$file; \
fi; \
done