freebsd-ports/lang/ruby18/files/patch-mkmf.rb
Stanislav Sedov 4b16b0cd00 - Prepare port to make ruby libraries PREFIX-clean (also requires bsd.ruby.mk
modifications)
- Add OPTIONS
- Provide automatic pkg-plist generator to simplify updates
- Guarantee permissions safety when installing docs and examples (eliminate
  ${CP} -r *)
- Create handy docs and examples structure (install examples for external
  libraries in separate directories)
- Remove unused KNOB (NORUBYLIB)
- Add knob to disable RDOC generation [1]
- Add knob to disable IPv6 support
- Move list of obsoleted packages to the separate file (files/obsoleted)
- Add additional .keep_me like files to allow shared directories to not
  be deleted by dependent ports
- Minor cleanups and modifications
- Bump-up portrevision

All ruby ports were tested in tinderbox with these modifications.

Requested by:	VANHULLEBUS Yvan <vanhu_bsd@zeninc.net> [1]
PR:		ports/103353 [1], ports/102648, ports/102663, ports/102685, ports/102646
Approved by:	sem (mentor)
2006-10-01 19:10:48 +00:00

25 lines
1,000 B
Ruby

--- lib/mkmf.rb.orig Thu Aug 17 09:47:50 2006
+++ lib/mkmf.rb Wed Aug 30 13:14:44 2006
@@ -113,8 +113,12 @@
topdir = File.dirname(libdir = File.dirname(__FILE__))
extdir = File.expand_path("ext", topdir)
+setuparchdir = topdir + \
+ "/#{Config::CONFIG["ruby_version"]}/#{Config::CONFIG["arch"]}"
$extmk = File.expand_path($0)[0, extdir.size+1] == extdir+"/"
-if not $extmk and File.exist?(Config::CONFIG["archdir"] + "/ruby.h")
+if not $extmk and File.exist?(setuparchdir + "/ruby.h")
+ $hdrdir = $topdir = setuparchdir
+elsif not $extmk and File.exist?(Config::CONFIG["archdir"] + "/ruby.h")
$hdrdir = $topdir = Config::CONFIG["archdir"]
elsif File.exist?(($top_srcdir ||= topdir) + "/ruby.h") and
File.exist?(($topdir ||= Config::CONFIG["topdir"]) + "/config.h")
@@ -1281,7 +1285,7 @@
mfile.print <<-SITEINSTALL
-site-install: site-install-so site-install-rb
+site-install: site-install-so site-install-rb install
site-install-so: install-so
site-install-rb: install-rb