summaryrefslogtreecommitdiff
path: root/lang/ruby/gem.mk
diff options
context:
space:
mode:
authortaca <taca>2012-03-02 03:46:09 +0000
committertaca <taca>2012-03-02 03:46:09 +0000
commit768910f538997afcee99953c2066aebe4b6c7696 (patch)
treeffbe999ae4e7438047a37c975adae3868e0c4e76 /lang/ruby/gem.mk
parentb2207c571c3ee00de360371fecc5fa28ac463ee2 (diff)
downloadpkgsrc-768910f538997afcee99953c2066aebe4b6c7696.tar.gz
o Now OVERRIDE_GEMSPEC can modify files in gemspec.
o Protect multiple inclusion. Nothing should affect current packages.
Diffstat (limited to 'lang/ruby/gem.mk')
-rw-r--r--lang/ruby/gem.mk50
1 files changed, 37 insertions, 13 deletions
diff --git a/lang/ruby/gem.mk b/lang/ruby/gem.mk
index e96db684e7f..557c9cc42ec 100644
--- a/lang/ruby/gem.mk
+++ b/lang/ruby/gem.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gem.mk,v 1.11 2012/01/12 08:43:22 obache Exp $
+# $NetBSD: gem.mk,v 1.12 2012/03/02 03:46:09 taca Exp $
#
# This Makefile fragment is intended to be included by packages that build
# and install Ruby gems.
@@ -18,24 +18,44 @@
# Default: not defined
#
# OVERRIDE_GEMSPEC
-# Fix version of depending gem. Specify as gem and dependency
-# pattern as usual pkgsrc's one.
+# Fix version of depending gem or modify files in gemspec.
#
-# Example:
-# When gemspec contains "json~>1.4.7" as runtime dependency
-# (i.e. json>=1.4.7<1.5) and if you want to relax it to
-# "json>=1.4.6" then use:
+# (1) Specify as gem and dependency pattern as usual pkgsrc's one.
+#
+# Example:
+# When gemspec contains "json~>1.4.7" as runtime dependency
+# (i.e. json>=1.4.7<1.5) and if you want to relax it to
+# "json>=1.4.6" then use:
+#
+# OVERRIDE_GEMSPEC+= json>=1.4.6
+#
+# If you want to change depending gem to "json_pure>=1.4.6"
+# then use:
+#
+# OVERRIDE_GEMSPEC+= json:json_pure>=1.4.6
+#
+# You can also remove dependency:
+#
+# OVERRIDE_GEMSPEC+= json:
+#
+# (2) Modify files in gemspec.
+#
+# Example:
+# Remove files (a.rb and b.rb) from 'files':
#
-# OVERRIDE_GEMSPEC+= json>=1.4.6
+# OVERRIDE_GEMSPEC+= :files a.rb= b.rb=
#
-# If you want to change depending gem to "json_pure>=1.4.6"
-# then use:
+# Example:
+# Add a file (exec.rb) to 'executables':
#
-# OVERRIDE_GEMSPEC+= json:json_pure>=1.4.6
+# OVERRIDE_GEMSPEC+= :executables exec.rb
#
-# You can also remove dependency:
+# Example:
+# Rename a file (from 'ruby' to 'ruby193') in 'files':
#
-# OVERRIDE_GEMSPEC+= json:
+# OVERRIDE_GEMSPEC+= :files ruby=ruby193
+#
+# Note: Because of limited parser, argumetns for (1) must preceed to (2).
#
# Default: (empty)
#
@@ -86,6 +106,8 @@
# RUBYGEM
# The path to the rubygems ``gem'' script.
#
+.if !defined(_RUBYGEM_MK)
+_RUBYGEM_MK= # defined
# By default, assume that gems are capable of user-destdir installation.
PKG_DESTDIR_SUPPORT?= user-destdir
@@ -378,3 +400,5 @@ _gem-install:
@${STEP_MSG} "gem install"
${RUN} cd ${RUBYGEM_INSTALL_ROOT}${PREFIX} && \
pax -rwpe . ${DESTDIR}${PREFIX}
+
+.endif