summaryrefslogtreecommitdiff
path: root/textproc/eruby/files/patch-configure.rb
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2009-07-12 14:36:01 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2009-07-12 14:36:01 +0000
commit08a5a0f3a78edd96f0c18da6e4b3a11aa9442b5c (patch)
treec19781c26da05df5cf3714ac83312acb098c1dae /textproc/eruby/files/patch-configure.rb
parentTermtter is a Terminal based Twitter client. (diff)
- make configure work with ruby19
- set PKGNAMEPREFIX - ugly fix for threads with ruby-1.8.7.160 - replace obsolteted funtions, experimental build with ruby19
Diffstat (limited to 'textproc/eruby/files/patch-configure.rb')
-rw-r--r--textproc/eruby/files/patch-configure.rb93
1 files changed, 90 insertions, 3 deletions
diff --git a/textproc/eruby/files/patch-configure.rb b/textproc/eruby/files/patch-configure.rb
index 19eb9d262bd4..be945604fab5 100644
--- a/textproc/eruby/files/patch-configure.rb
+++ b/textproc/eruby/files/patch-configure.rb
@@ -1,6 +1,39 @@
---- configure.rb.orig 2009-02-14 00:50:10.000000000 +0300
-+++ configure.rb 2009-02-14 00:50:18.000000000 +0300
-@@ -307,6 +307,7 @@
+--- configure.rb.orig 2003-02-10 04:18:10.000000000 +0100
++++ configure.rb 2009-07-12 16:05:45.000000000 +0200
+@@ -59,7 +59,7 @@
+ end
+ end
+
+-require 'ftools'
++require 'fileutils'
+
+ def AC_OUTPUT(*files)
+ if $AC_LIST_HEADER
+@@ -71,7 +71,7 @@
+ for file in files
+ print "creating ", file, "\n"
+ open(File.join($srcdir, file + ".in")) do |fin|
+- File.makedirs(File.dirname(file))
++ FileUtils.mkdir_p(File.dirname(file))
+ open(file, "w") do |fout|
+ while line = fin.gets
+ line.gsub!(/@([A-Za-z_]+)@/) do |s|
+@@ -301,12 +301,22 @@
+ else
+ $CFLAGS = CFLAGS + " " + CONFIG["CCDLFLAGS"]
+ end
++if not CONFIG["rubyhdrdir"].nil?
++ $CFLAGS << " -I" + CONFIG["rubyhdrdir"] + "/" + $sitearch
++end
++if not ENV["EXTRA_CFLAGS"].nil?
++ $CFLAGS << " " + ENV["EXTRA_CFLAGS"]
++end
+ $LDFLAGS = CONFIG["LDFLAGS"]
++if not ENV["EXTRA_LDFLAGS"].nil?
++ $LDFLAGS << " " + ENV["EXTRA_LDFLAGS"]
++end
+ if $LDFLAGS.to_s.empty? && /mswin32/ =~ RUBY_PLATFORM
+ $LDFLAGS = "-link -incremental:no -pdb:none"
end
$LIBS = CONFIG["LIBS"]
$XLDFLAGS = CONFIG["XLDFLAGS"]
@@ -8,3 +41,57 @@
$XLDFLAGS.gsub!(/-L\./, "")
if /mswin32/ !~ RUBY_PLATFORM
$XLDFLAGS += " -L$(libdir)"
+@@ -333,7 +343,7 @@
+ $LIBRUBY_A = CONFIG["LIBRUBY_A"]
+ $RUBY_SO_NAME = CONFIG["RUBY_SO_NAME"]
+
+-case PLATFORM
++case RUBY_PLATFORM
+ when /-aix/
+ if $RUBY_SHARED
+ $LIBRUBYARG = "-Wl,$(libdir)/" + CONFIG["LIBRUBY_SO"]
+@@ -407,7 +417,7 @@
+ AC_MSG_CHECKING("whether we are using gcc")
+ if $CC == "gcc" || `#{$CC} -v 2>&1` =~ /gcc/
+ $using_gcc = true
+- $CFLAGS += " -Wall"
++ $CFLAGS += " -Wall -g"
+ else
+ $using_gcc = false
+ end
+@@ -431,7 +441,7 @@
+ $ENABLE_SHARED = false
+ AC_ENABLE("shared") { |enableval|
+ if enableval == "yes"
+- if PLATFORM =~ /-mswin32/
++ if RUBY_PLATFORM =~ /-mswin32/
+ AC_MSG_ERROR("can't enable shared on mswin32")
+ end
+ $ENABLE_SHARED = true
+@@ -449,7 +459,7 @@
+ if $ENABLE_SHARED
+ $LIBERUBY = "${LIBERUBY_SO}"
+ $LIBERUBYARG = "-L. -leruby"
+- case PLATFORM
++ case RUBY_PLATFORM
+ when /-sunos4/
+ $LIBERUBY_ALIASES = "liberuby.so.$(MAJOR).$(MINOR) liberuby.so"
+ when /-linux/
+@@ -457,7 +467,7 @@
+ $LIBERUBY_ALIASES = "liberuby.so.$(MAJOR).$(MINOR) liberuby.so"
+ when /-(freebsd|netbsd)/
+ $LIBERUBY_SO = "liberuby.so.$(MAJOR).$(MINOR)"
+- if PLATFORM =~ /elf/ || PLATFORM =~ /-freebsd[3-9]/
++ if RUBY_PLATFORM =~ /elf/ || RUBY_PLATFORM =~ /-freebsd[3-9]/
+ $LIBERUBY_SO = "liberuby.so.$(MAJOR_MINOR)"
+ $LIBERUBY_ALIASES = "liberuby.so"
+ else
+@@ -493,7 +503,7 @@
+ end
+ end
+
+-if PLATFORM =~ /-mswin32/
++if RUBY_PLATFORM =~ /-mswin32/
+ $AR = "lib"
+ $AROPT = "/out:$@"
+ $LIBERUBY_A = "liberuby.lib"