summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2015-09-27 06:41:06 +0000
committertaca <taca@pkgsrc.org>2015-09-27 06:41:06 +0000
commitfb1e0a925b82f22e6449279b41c3a6ecc7f3cfeb (patch)
treee2f1c62129758b7f1d6a934b8001caf03071a015
parentf7a7f696326bbc30e468ee9d57fbc55bcc69603b (diff)
downloadpkgsrc-fb1e0a925b82f22e6449279b41c3a6ecc7f3cfeb.tar.gz
Allow ruby-wxruby to built with newer version of Ruby, 2.0.0 and later.
-rw-r--r--x11/ruby-wxruby/Makefile4
-rw-r--r--x11/ruby-wxruby/distinfo8
-rw-r--r--x11/ruby-wxruby/patches/patch-rake_rakeconfigure.rb44
-rw-r--r--x11/ruby-wxruby/patches/patch-rake_rakemingw.rb10
-rw-r--r--x11/ruby-wxruby/patches/patch-rake_rakemswin.rb32
-rw-r--r--x11/ruby-wxruby/patches/patch-rake_rakewx.rb25
-rw-r--r--x11/ruby-wxruby/patches/patch-rakefile22
7 files changed, 132 insertions, 13 deletions
diff --git a/x11/ruby-wxruby/Makefile b/x11/ruby-wxruby/Makefile
index 23c6be0716e..e2755ac309a 100644
--- a/x11/ruby-wxruby/Makefile
+++ b/x11/ruby-wxruby/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2015/04/25 14:25:20 tnn Exp $
+# $NetBSD: Makefile,v 1.22 2015/09/27 06:41:06 taca Exp $
#
DISTNAME= wxruby-2.0.1
@@ -13,8 +13,6 @@ LICENSE= mit
BUILD_DEPENDS+= ${RUBY_PKGPREFIX}-redcloth>=4.2.0:../../textproc/ruby-redcloth
-RUBY_VERSION_SUPPORTED= 193
-
BUILD_TARGET= default html_docs
USE_RAKE= YES
RAKE= rake -I "./lib"
diff --git a/x11/ruby-wxruby/distinfo b/x11/ruby-wxruby/distinfo
index f76e6607408..61e8833ca3c 100644
--- a/x11/ruby-wxruby/distinfo
+++ b/x11/ruby-wxruby/distinfo
@@ -1,8 +1,12 @@
-$NetBSD: distinfo,v 1.3 2015/03/26 19:46:19 joerg Exp $
+$NetBSD: distinfo,v 1.4 2015/09/27 06:41:06 taca Exp $
SHA1 (wxruby-2.0.1.tar.gz) = ca53e97430330b34856d10dcde210e3772d61826
RMD160 (wxruby-2.0.1.tar.gz) = 053a0adc5c08b339ab48b1931723095ca218dd59
Size (wxruby-2.0.1.tar.gz) = 1878831 bytes
+SHA1 (patch-rake_rakeconfigure.rb) = f1591dc6c0596894bff947a5d07363da5df3c34a
SHA1 (patch-rake_rakedocs.rb) = f8abbc78dd44127ccc8b97ef20c17278f6c5b022
+SHA1 (patch-rake_rakemingw.rb) = 27f4ecec928b8e490e538ff145931321f6ac19d0
+SHA1 (patch-rake_rakemswin.rb) = 764408da0097cdd7a46651838a96176ff3e6feb0
SHA1 (patch-rake_rakenetbsd.rb) = 759c637e1280d6c5bfd3108168841b048f52e691
-SHA1 (patch-rake_rakewx.rb) = eb2bd65e914030a870026e109c6e2e751dcae1af
+SHA1 (patch-rake_rakewx.rb) = 3e37bc1d54c1e584d9646af5d5470128486c5aec
+SHA1 (patch-rakefile) = 0ba5099ef4c4e716c89a7f2c3ec2e95f3f496880
diff --git a/x11/ruby-wxruby/patches/patch-rake_rakeconfigure.rb b/x11/ruby-wxruby/patches/patch-rake_rakeconfigure.rb
new file mode 100644
index 00000000000..63851b891fd
--- /dev/null
+++ b/x11/ruby-wxruby/patches/patch-rake_rakeconfigure.rb
@@ -0,0 +1,44 @@
+$NetBSD: patch-rake_rakeconfigure.rb,v 1.1 2015/09/27 06:41:06 taca Exp $
+
+--- rake/rakeconfigure.rb.orig 2009-09-08 20:36:50.000000000 +0000
++++ rake/rakeconfigure.rb
+@@ -33,29 +33,29 @@ $excluded_classes = ENV['WXRUBY_EXCLUDED
+ # Get ruby's info on how it was built
+ require "rbconfig"
+
+-$ruby_cppflags = Config::CONFIG["CFLAGS"]
++$ruby_cppflags = RbConfig::CONFIG["CFLAGS"]
+
+ # Ruby 1.9.0 changes location of some header files
+ if RUBY_VERSION >= "1.9.0"
+- includes = [ Config::CONFIG["rubyhdrdir"],
+- Config::CONFIG["sitehdrdir"],
+- Config::CONFIG["vendorhdrdir"],
+- File.join(Config::CONFIG["rubyhdrdir"],
+- Config::CONFIG['arch']) ]
++ includes = [ RbConfig::CONFIG["rubyhdrdir"],
++ RbConfig::CONFIG["sitehdrdir"],
++ RbConfig::CONFIG["vendorhdrdir"],
++ File.join(RbConfig::CONFIG["rubyhdrdir"],
++ RbConfig::CONFIG['arch']) ]
+ $ruby_includes = " -I. -I " + includes.join(' -I ')
+ else
+- $ruby_includes = " -I. -I " + Config::CONFIG["archdir"]
++ $ruby_includes = " -I. -I " + RbConfig::CONFIG["archdir"]
+ end
+
+-$ruby_ldflags = Config::CONFIG["LDFLAGS"]
+-$ruby_libs = Config::CONFIG["LIBS"]
++$ruby_ldflags = RbConfig::CONFIG["LDFLAGS"]
++$ruby_libs = RbConfig::CONFIG["LIBS"]
+ $extra_cppflags = ""
+ $extra_ldflags = ""
+ $extra_objs = ""
+ $extra_libs = ""
+ $cpp_out_flag = "-o "
+ $link_output_flag = "-o "
+-OBJ_EXT = Config::CONFIG["OBJEXT"]
++OBJ_EXT = RbConfig::CONFIG["OBJEXT"]
+
+ # This is now set with the detection of WXRUBY_EXCLUDED
+ # some classes are not implemented by WxWidgets on all platforms
diff --git a/x11/ruby-wxruby/patches/patch-rake_rakemingw.rb b/x11/ruby-wxruby/patches/patch-rake_rakemingw.rb
new file mode 100644
index 00000000000..60a13d87268
--- /dev/null
+++ b/x11/ruby-wxruby/patches/patch-rake_rakemingw.rb
@@ -0,0 +1,10 @@
+$NetBSD: patch-rake_rakemingw.rb,v 1.1 2015/09/27 06:41:06 taca Exp $
+
+--- rake/rakemingw.rb.orig 2009-09-08 20:36:50.000000000 +0000
++++ rake/rakemingw.rb
+@@ -115,4 +115,4 @@ File.read(WXWIDGETS_SETUP_H).scan(/^#def
+ end
+
+ $extra_libs = "#{libs.join(' ')} " +
+- File.join(Config::CONFIG['libdir'], Config::CONFIG['LIBRUBY'])
++ File.join(RbConfig::CONFIG['libdir'], RbConfig::CONFIG['LIBRUBY'])
diff --git a/x11/ruby-wxruby/patches/patch-rake_rakemswin.rb b/x11/ruby-wxruby/patches/patch-rake_rakemswin.rb
new file mode 100644
index 00000000000..9c4d325614a
--- /dev/null
+++ b/x11/ruby-wxruby/patches/patch-rake_rakemswin.rb
@@ -0,0 +1,32 @@
+$NetBSD: patch-rake_rakemswin.rb,v 1.1 2015/09/27 06:41:06 taca Exp $
+
+--- rake/rakemswin.rb.orig 2009-09-08 20:36:50.000000000 +0000
++++ rake/rakemswin.rb
+@@ -97,7 +97,7 @@ if $unicode_build
+ end
+
+ # Extra files for the linker - WINDOWS_SYS_LIBS are common in rakewindows.rb
+-lib_ruby = File.join(Config::CONFIG['libdir'], Config::CONFIG['LIBRUBY'])
++lib_ruby = File.join(RbConfig::CONFIG['libdir'], RbConfig::CONFIG['LIBRUBY'])
+ $extra_libs = WINDOWS_SYS_LIBS.map { | lib | "#{lib}.lib" }.join(" ")
+ $extra_libs << " #{lib_ruby}"
+
+@@ -128,14 +128,14 @@ file 'temp' do
+ # This is a temporary rakefile to install the Microsoft v8 runtime
+ require 'rbconfig'
+ task :default do
+- mv 'msvcp80.dll', Config::CONFIG['bindir']
+- mv 'msvcr80.dll', Config::CONFIG['bindir']
+- ruby_manifest = File.join(Config::CONFIG['bindir'], 'ruby.exe.manifest')
++ mv 'msvcp80.dll', RbConfig::CONFIG['bindir']
++ mv 'msvcr80.dll', RbConfig::CONFIG['bindir']
++ ruby_manifest = File.join(RbConfig::CONFIG['bindir'], 'ruby.exe.manifest')
+ if File.exists? ruby_manifest
+ mv ruby_manifest, ruby_manifest + ".old"
+ end
+ cp 'wxruby2.so.manifest', ruby_manifest
+- rubyw_manifest = File.join(Config::CONFIG['bindir'], 'rubyw.exe.manifest')
++ rubyw_manifest = File.join(RbConfig::CONFIG['bindir'], 'rubyw.exe.manifest')
+ if File.exists? rubyw_manifest
+ mv rubyw_manifest, rubyw_manifest + ".old"
+ end
diff --git a/x11/ruby-wxruby/patches/patch-rake_rakewx.rb b/x11/ruby-wxruby/patches/patch-rake_rakewx.rb
index 236133f14aa..9b9c6434f5b 100644
--- a/x11/ruby-wxruby/patches/patch-rake_rakewx.rb
+++ b/x11/ruby-wxruby/patches/patch-rake_rakewx.rb
@@ -1,10 +1,19 @@
-$NetBSD: patch-rake_rakewx.rb,v 1.2 2015/03/26 19:46:19 joerg Exp $
+$NetBSD: patch-rake_rakewx.rb,v 1.3 2015/09/27 06:41:06 taca Exp $
* Tweak to use vendorlibdir/vendorarchdir instead of sitelbdir/sitearchdir.
* wx-config --ld ends in "-o" already, so use that.
--- rake/rakewx.rb.orig 2009-09-08 20:36:50.000000000 +0000
+++ rake/rakewx.rb
+@@ -3,7 +3,7 @@
+ # released under the MIT-style wxruby2 license
+
+ require "rbconfig"
+-$ruby_exe = Config::CONFIG["ruby_install_name"]
++$ruby_exe = RbConfig::CONFIG["ruby_install_name"]
+
+ # Skim all the SWIG sources to detect import/include dependencies that
+ # should force recompiles
@@ -98,7 +98,7 @@ end
# Target to run the linker to create a final .so/.dll wxruby2 library
file TARGET_LIB => all_obj_files do | t |
@@ -20,11 +29,11 @@ $NetBSD: patch-rake_rakewx.rb,v 1.2 2015/03/26 19:46:19 joerg Exp $
task :install => [ :default, *ALL_RUBY_LIB_FILES ] do | t |
- dest_dir = Config::CONFIG['sitelibdir']
+ if ENV['DESTDIR'].nil?
-+ arch_dir = Config::CONFIG['vendorarchdir']
-+ dest_dir = Config::CONFIG['vendorlibdir']
++ arch_dir = RbConfig::CONFIG['vendorarchdir']
++ dest_dir = RbConfig::CONFIG['vendorlibdir']
+ else
-+ arch_dir = File.join(ENV['DESTDIR'], Config::CONFIG['vendorarchdir'])
-+ dest_dir = File.join(ENV['DESTDIR'], Config::CONFIG['vendorlibdir'])
++ arch_dir = File.join(ENV['DESTDIR'], RbConfig::CONFIG['vendorarchdir'])
++ dest_dir = File.join(ENV['DESTDIR'], RbConfig::CONFIG['vendorlibdir'])
+ end
force_mkdir File.join(dest_dir, 'wx')
force_mkdir File.join(dest_dir, 'wx', 'classes')
@@ -40,9 +49,9 @@ $NetBSD: patch-rake_rakewx.rb,v 1.2 2015/03/26 19:46:19 joerg Exp $
- rm_rf File.join(Config::CONFIG['sitearchdir'],File.basename(TARGET_LIB))
- rm_rf File.join(Config::CONFIG['sitelibdir'], 'wx.rb')
- rm_rf File.join(Config::CONFIG['sitelibdir'], 'wx')
-+ rm_rf File.join(Config::CONFIG['vendorarchdir'],File.basename(TARGET_LIB))
-+ rm_rf File.join(Config::CONFIG['vendorlibdir'], 'wx.rb')
-+ rm_rf File.join(Config::CONFIG['vendorlibdir'], 'wx')
++ rm_rf File.join(RbConfig::CONFIG['vendorarchdir'],File.basename(TARGET_LIB))
++ rm_rf File.join(RbConfig::CONFIG['vendorlibdir'], 'wx.rb')
++ rm_rf File.join(RbConfig::CONFIG['vendorlibdir'], 'wx')
end
desc "Generate C++ source and header files using SWIG"
diff --git a/x11/ruby-wxruby/patches/patch-rakefile b/x11/ruby-wxruby/patches/patch-rakefile
new file mode 100644
index 00000000000..87911108ce6
--- /dev/null
+++ b/x11/ruby-wxruby/patches/patch-rakefile
@@ -0,0 +1,22 @@
+$NetBSD: patch-rakefile,v 1.1 2015/09/27 06:41:06 taca Exp $
+
+--- rakefile.orig 2009-09-08 20:36:55.000000000 +0000
++++ rakefile
+@@ -22,7 +22,7 @@ DEST_DIR = 'lib'
+ CLASSES_DIR = File.join(SWIG_DIR, 'classes')
+
+ # THE BINARY LIBRARY TO BE COMPILED
+-DLL_LIB = "wxruby2.#{Config::CONFIG["DLEXT"]}"
++DLL_LIB = "wxruby2.#{RbConfig::CONFIG["DLEXT"]}"
+ TARGET_LIB = File.join(DEST_DIR, DLL_LIB)
+
+ # FOR ENSURING SUITABLE SWIG VERSION IS AVAILABLE
+@@ -31,7 +31,7 @@ SWIG_CMD = ENV['SWIG_CMD'] || "swig"
+ case RUBY_VERSION
+ when /^1\.8/
+ SWIG_MINIMUM_VERSION = '1.3.32'
+-when /^1\.9/
++when /^(1\.9|2\.[0-9])/
+ SWIG_MINIMUM_VERSION = '1.3.37'
+ else
+ raise "This version of Ruby (#{RUBY_VERSION}) is not supported"