2010-08-28 01:51:58 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Gmtl < Formula
|
2011-03-05 21:03:41 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/ggt/Generic%20Math%20Template%20Library/0.6.1/gmtl-0.6.1.tar.gz'
|
2010-08-28 01:51:58 +00:00
|
|
|
homepage 'http://ggt.sourceforge.net/'
|
2011-03-05 21:03:41 +00:00
|
|
|
md5 '1391af2c5ea050dda7735855ea5bb4c1'
|
|
|
|
head 'https://ggt.svn.sourceforge.net/svnroot/ggt/trunk/'
|
2010-08-28 01:51:58 +00:00
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'scons' => :build
|
2010-08-28 01:51:58 +00:00
|
|
|
|
2011-03-05 21:03:41 +00:00
|
|
|
# Build assumes that Python is a framework, which isn't always true. See:
|
|
|
|
# https://sourceforge.net/tracker/?func=detail&aid=3172856&group_id=43735&atid=437247
|
2011-10-06 08:27:45 +00:00
|
|
|
# The SConstruct from gmtl's HEAD doesn't need to be patched
|
2011-03-05 21:03:41 +00:00
|
|
|
def patches
|
2012-04-28 22:28:05 +00:00
|
|
|
DATA unless ARGV.build_head?
|
2011-03-05 21:03:41 +00:00
|
|
|
end
|
|
|
|
|
2010-08-28 01:51:58 +00:00
|
|
|
def install
|
|
|
|
system "scons", "install", "prefix=#{prefix}"
|
|
|
|
end
|
|
|
|
end
|
2012-04-28 22:28:05 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/SConstruct b/SConstruct
|
|
|
|
index 8326a89..2eb7ff0 100644
|
|
|
|
--- a/SConstruct
|
|
|
|
+++ b/SConstruct
|
|
|
|
@@ -126,7 +126,9 @@ def BuildDarwinEnvironment():
|
|
|
|
|
|
|
|
exp = re.compile('^(.*)\/Python\.framework.*$')
|
|
|
|
m = exp.search(distutils.sysconfig.get_config_var('prefix'))
|
|
|
|
- framework_opt = '-F' + m.group(1)
|
|
|
|
+ framework_opt = None
|
|
|
|
+ if m:
|
|
|
|
+ framework_opt = '-F' + m.group(1)
|
|
|
|
|
|
|
|
CXX = os.environ.get("CXX", WhereIs('g++'))
|
|
|
|
|
|
|
|
@@ -138,7 +140,10 @@ def BuildDarwinEnvironment():
|
|
|
|
|
|
|
|
LINK = CXX
|
|
|
|
CXXFLAGS = ['-ftemplate-depth-256', '-DBOOST_PYTHON_DYNAMIC_LIB',
|
|
|
|
- '-Wall', framework_opt, '-pipe']
|
|
|
|
+ '-Wall', '-pipe']
|
|
|
|
+
|
|
|
|
+ if framework_opt is not None:
|
|
|
|
+ CXXFLAGS.append(framework_opt)
|
|
|
|
|
|
|
|
compiler_ver = match_obj.group(1)
|
|
|
|
compiler_major_ver = int(match_obj.group(2))
|
|
|
|
@@ -152,7 +157,10 @@ def BuildDarwinEnvironment():
|
|
|
|
CXXFLAGS += ['-Wno-long-double', '-no-cpp-precomp']
|
|
|
|
|
|
|
|
SHLIBSUFFIX = distutils.sysconfig.get_config_var('SO')
|
|
|
|
- SHLINKFLAGS = ['-bundle', framework_opt, '-framework', 'Python']
|
|
|
|
+ SHLINKFLAGS = ['-bundle']
|
|
|
|
+
|
|
|
|
+ if framework_opt is not None:
|
|
|
|
+ SHLINKFLAGS.extend([framework_opt, '-framework', 'Python'])
|
|
|
|
LINKFLAGS = []
|
|
|
|
|
|
|
|
# Enable profiling?
|