Andrew noted to me off-list that clang-3.3 is required at runtime as well as at compile time, so the automatic build dependency is insufficient.
vq Sent from my iPhone > On Nov 6, 2014, at 10:39 PM, Lawrence Velázquez <[email protected]> wrote: > > It isn't necessary to add clang-3.3 to depends_lib; base does that for you > when you set configure.compiler. > > vq > >> On Nov 6, 2014, at 6:13 PM, [email protected] wrote: >> >> Revision >> 127912 >> Author >> [email protected] >> 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 >> Diff >> >> Modified: trunk/dports/python/py-llvmmath/Portfile (127911 => 127912) >> >> --- 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 (0 >> => 127912) >> >> --- 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 (0 => >> 127912) >> >> --- 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) >> _______________________________________________ >> macports-changes mailing list >> [email protected] >> https://lists.macosforge.org/mailman/listinfo/macports-changes > > _______________________________________________ > macports-dev mailing list > [email protected] > https://lists.macosforge.org/mailman/listinfo/macports-dev
_______________________________________________ macports-dev mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-dev
