[127912] trunk/dports/python/py-llvmmath
stromnov at macports.org
stromnov at macports.org
Thu Nov 6 15:13:48 PST 2014
Revision: 127912
https://trac.macports.org/changeset/127912
Author: stromnov at macports.org
Date: 2014-11-06 15:13:48 -0800 (Thu, 06 Nov 2014)
Log Message:
-----------
py-llvmmath: use specific LLVM/Clang compiler (#45804)
Modified Paths:
--------------
trunk/dports/python/py-llvmmath/Portfile
Added Paths:
-----------
trunk/dports/python/py-llvmmath/files/
trunk/dports/python/py-llvmmath/files/patch-llvmmath_build.py.diff
trunk/dports/python/py-llvmmath/files/patch-setup.py.diff
Modified: trunk/dports/python/py-llvmmath/Portfile
===================================================================
--- trunk/dports/python/py-llvmmath/Portfile 2014-11-06 22:38:41 UTC (rev 127911)
+++ trunk/dports/python/py-llvmmath/Portfile 2014-11-06 23:13:48 UTC (rev 127912)
@@ -6,7 +6,7 @@
name py-llvmmath
version 0.1.1
-revision 0
+revision 1
categories-append devel
platforms darwin
license BSD
@@ -33,6 +33,21 @@
depends_lib-append port:py${python.version}-llvmpy \
port:py${python.version}-numpy
+ # Keep in sync with py-llvmpy
+ depends_lib-append port:clang-3.3
+ configure.compiler macports-clang-3.3
+
+ patchfiles-append patch-setup.py.diff \
+ patch-llvmmath_build.py.diff
+
+ post-patch {
+ reinplace "s|@clang@|${prefix}/bin/clang-mp-3.3|g" ${worksrcpath}/llvmmath/build.py
+ }
+
+ build.env-append CC="${configure.cc}" CXX="${configure.cxx}"
+
+ destroot.env-append CC="${configure.cc}" CXX="${configure.cxx}"
+
livecheck.type none
} else {
livecheck.type regex
Added: trunk/dports/python/py-llvmmath/files/patch-llvmmath_build.py.diff
===================================================================
--- trunk/dports/python/py-llvmmath/files/patch-llvmmath_build.py.diff (rev 0)
+++ trunk/dports/python/py-llvmmath/files/patch-llvmmath_build.py.diff 2014-11-06 23:13:48 UTC (rev 127912)
@@ -0,0 +1,24 @@
+--- llvmmath/build.py.orig 2014-11-07 01:29:53.000000000 +0300
++++ llvmmath/build.py 2014-11-07 01:31:14.000000000 +0300
+@@ -52,7 +52,7 @@
+ Config = namedtuple('Config', 'clang conv_templ targets log output_dir')
+
+ _default_values = {
+- 'clang': 'clang',
++ 'clang': '@clang@',
+ 'conv_templ': join(root, 'generator', 'conv_template.py'),
+ 'targets': [build_llvm], #, build_shared],
+ 'log': logger.info,
+@@ -105,10 +105,10 @@
+ return exists(asmfile)
+
+ @cached
+-def have_clang():
++def have_clang(clang='clang'):
+ "See whether we have clang installed and working"
+ try:
+- return call(['clang', '--help'], stdout=PIPE) == 0
++ return call([clang, '--help'], stdout=PIPE) == 0
+ except EnvironmentError:
+ return False
+
Added: trunk/dports/python/py-llvmmath/files/patch-setup.py.diff
===================================================================
--- trunk/dports/python/py-llvmmath/files/patch-setup.py.diff (rev 0)
+++ trunk/dports/python/py-llvmmath/files/patch-setup.py.diff 2014-11-06 23:13:48 UTC (rev 127912)
@@ -0,0 +1,22 @@
+--- setup.py.orig 2014-11-07 01:26:17.000000000 +0300
++++ setup.py 2014-11-07 01:49:53.000000000 +0300
+@@ -88,7 +88,9 @@
+ # Generate code for build
+ #===------------------------------------------------------------------===
+
+-if build.have_clang():
++config = build.mkconfig(build.default_config)
++
++if build.have_clang(config.clang):
+ # Build llvm asm
+ targets = [build.build_llvm]
+ else:
+@@ -97,7 +99,7 @@
+ "default C compiler")
+ targets = []
+
+-config = build.mkconfig(build.default_config, targets=targets)
++config = build.mkconfig(config, targets=targets)
+ llvmmath.build.build_source(config)
+ try:
+ llvmmath.build.build_targets(config)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141106/2734d7e7/attachment.html>
More information about the macports-changes
mailing list