pkgsrc/textproc/ruby-eruby/patches/patch-ac
taca 5536d408f0 - Switch to use vendor_dir with Ruby 1.8.7.
- And make it build with Ruby 1.8.7, too.

Bump PKGREVISION.
2008-06-19 14:55:16 +00:00

66 lines
2.5 KiB
Text

$NetBSD: patch-ac,v 1.4 2008/06/19 14:55:16 taca Exp $
--- configure.rb.orig 2003-02-10 03:18:10.000000000 +0000
+++ configure.rb
@@ -210,6 +210,7 @@ $bindir = CONFIG["bindir"].sub(prefix, "
$datadir = CONFIG["datadir"].sub(prefix, "$(prefix)").sub(drive, '')
$libdir = CONFIG["libdir"].sub(prefix, "$(exec_prefix)").sub(drive, '')
$archdir = $archdir.sub(prefix, "$(prefix)").sub(drive, '')
+$sitedir = $vendordir
$sitelibdir = $sitelibdir.sub(prefix, "$(prefix)").sub(drive, '')
$sitearchdir = $sitearchdir.sub(prefix, "$(prefix)").sub(drive, '')
$includedir = CONFIG["includedir"].sub(prefix, "$(prefix)").sub(drive, '')
@@ -307,11 +308,15 @@ if $LDFLAGS.to_s.empty? && /mswin32/ =~
end
$LIBS = CONFIG["LIBS"]
$XLDFLAGS = CONFIG["XLDFLAGS"]
-$XLDFLAGS.gsub!(/-L\./, "")
-if /mswin32/ !~ RUBY_PLATFORM
- $XLDFLAGS += " -L$(libdir)"
-elsif RUBY_VERSION >= "1.8"
- $XLDFLAGS += " #{CONFIG['LIBPATHFLAG'] % '$(libdir)'}"
+if $XLDFLAGS.nil?
+ $XLDFLAGS = ''
+else
+ $XLDFLAGS.gsub!(/-L\./, "")
+ if /mswin32/ !~ RUBY_PLATFORM
+ $XLDFLAGS += " -L$(libdir)"
+ elsif RUBY_VERSION >= "1.8"
+ $XLDFLAGS += " #{CONFIG['LIBPATHFLAG'] % '$(libdir)'}"
+ end
end
$DLDFLAGS = CONFIG["DLDFLAGS"]
$LDSHARED = CONFIG["LDSHARED"]
@@ -443,27 +448,22 @@ $LIBERUBY_A = "liberuby.a"
$LIBERUBY = "${LIBERUBY_A}"
$LIBERUBYARG="$(LIBERUBY_A)"
-$LIBERUBY_SO = "liberuby.#{CONFIG['DLEXT']}.$(MAJOR).$(MINOR).$(TEENY)"
-$LIBERUBY_ALIASES = "liberuby.#{CONFIG['DLEXT']}"
+$LIBERUBY_SO = "liberuby.#{CONFIG['DLEXT']}.$(MAJOR_MINOR)"
+$LIBERUBY_ALIASES = "liberuby.so.$(MAJOR_MINOR).$(TEENY) liberuby.so"
if $ENABLE_SHARED
$LIBERUBY = "${LIBERUBY_SO}"
$LIBERUBYARG = "-L. -leruby"
case PLATFORM
- when /-sunos4/
- $LIBERUBY_ALIASES = "liberuby.so.$(MAJOR).$(MINOR) liberuby.so"
when /-linux/
- $DLDFLAGS = '-Wl,-soname,liberuby.so.$(MAJOR).$(MINOR)'
- $LIBERUBY_ALIASES = "liberuby.so.$(MAJOR).$(MINOR) liberuby.so"
+ $DLDFLAGS = '-Wl,-soname,liberuby.so.$(MAJOR_MINOR)'
when /-(freebsd|netbsd)/
- $LIBERUBY_SO = "liberuby.so.$(MAJOR).$(MINOR)"
- if PLATFORM =~ /elf/ || PLATFORM =~ /-freebsd[3-9]/
+ if PLATFORM =~ /elf/ and PLATFORM =~ /-freebsd[3-9]/
$LIBERUBY_SO = "liberuby.so.$(MAJOR_MINOR)"
$LIBERUBY_ALIASES = "liberuby.so"
- else
- $LIBERUBY_ALIASES = "liberuby.so.$(MAJOR) liberuby.so"
end
when /-solaris/
+ $DLDFLAGS = "#{$DLDFLAGS} "'-Wl,-h,liberuby.so.$(MAJOR_MINOR)'
$XLDFLAGS = "-R$(prefix)/lib"
when /-hpux/
$XLDFLAGS = "-Wl,+s,+b,$(prefix)/lib"