openbsd-ports/databases/ruby-swift/patches/patch-ext_extconf_rb

39 lines
1.4 KiB
Plaintext

$OpenBSD: patch-ext_extconf_rb,v 1.2 2012/04/06 19:26:13 jeremy Exp $
--- ext/extconf.rb.orig Wed Dec 31 16:00:00 1969
+++ ext/extconf.rb Wed Feb 22 13:58:58 2012
@@ -4,14 +4,14 @@ require 'mkmf'
Config::CONFIG['CC'] = 'g++'
Config::CONFIG['CPP'] = 'g++'
-$CFLAGS = '-fPIC -Os -I/usr/include -I/opt/local/include -I/usr/local/include'
+$CFLAGS = "-fPIC -I#{ENV['LOCALBASE']}/include"
def apt_install_hint pkg
"sudo apt-get install #{pkg}"
end
def library_installed? name, hint
- if find_library(name, 'main', *%w(/usr/lib /usr/local/lib /opt/lib /opt/local/lib /sw/lib))
+ if find_library(name, 'main', *%w(/usr/lib #{ENV['LOCALBASE']}/lib))
true
else
$stderr.puts <<-ERROR
@@ -34,7 +34,7 @@ end
def assert_dbicpp_version ver
passed = false
- header = '/usr/include/dbic++.h'
+ header = "#{ENV['LOCALBASE']}/include/dbic++.h"
message = "Swift needs dbic++ >= #{ver}. Please update your dbic++ installation."
if File.exists?(header) && match = File.read(header).match(/DBI_VERSION\s+(.*?)\n/mi)
@@ -52,7 +52,7 @@ def assert_dbicpp_version ver
end
exit 1 unless library_installed? 'pcrecpp', apt_install_hint('libpcre3-dev')
-exit 1 unless library_installed? 'uuid', apt_install_hint('uuid-dev')
+exit 1 unless library_installed? 'e2fs-uuid', apt_install_hint('uuid-dev')
exit 1 unless library_installed? 'dbic++', apt_install_hint('dbic++-dev')
assert_dbicpp_version '0.5.9'