[97566] trunk/dports/science/alps
ryandesign at macports.org
ryandesign at macports.org
Sun Sep 9 03:55:02 PDT 2012
Revision: 97566
https://trac.macports.org/changeset/97566
Author: ryandesign at macports.org
Date: 2012-09-09 03:55:02 -0700 (Sun, 09 Sep 2012)
Log Message:
-----------
alps: add python25, python26, python27 variants; conflicts_build boost; add +applications variant on by default; add openmpi variant; disable universal variant and livecheck (#35943)
Modified Paths:
--------------
trunk/dports/science/alps/Portfile
trunk/dports/science/alps/files/patch-config-FindPython.cmake.diff
Modified: trunk/dports/science/alps/Portfile
===================================================================
--- trunk/dports/science/alps/Portfile 2012-09-09 10:50:29 UTC (rev 97565)
+++ trunk/dports/science/alps/Portfile 2012-09-09 10:55:02 UTC (rev 97566)
@@ -3,9 +3,11 @@
PortSystem 1.0
PortGroup cmake 1.0
+PortGroup conflicts_build 1.0
name alps
version 2.1.1
+revision 1
categories science
platforms darwin
maintainers gmail.com:gamperl
@@ -22,12 +24,10 @@
checksums rmd160 f2ab3938a364a026be8557406427521901091a51 \
sha256 554841986ad5a9d5d5a89941e5665c249fe1b8eba537078001bb6c5c21a1f335
-depends_lib port:hdf5-18 \
- port:py26-numpy \
- port:py26-matplotlib \
- port:py26-scipy
+depends_lib port:hdf5-18
-patchfiles patch-config-FindPython.cmake.diff
+# alps has its own internal boost it wants to use, and fails if MacPorts' newer boost is active.
+conflicts_build boost
configure.args-delete -DCMAKE_SYSTEM_PREFIX_PATH=\"${prefix}\;/usr\"
configure.args-append -DCMAKE_SYSTEM_PREFIX_PATH=\"/usr\;${prefix}\" \
@@ -35,6 +35,63 @@
-DALPS_BUILD_TESTS=OFF \
-DALPS_INCLUDE_TUTORIALS=OFF \
-DALPS_BOOST_LIBRARY_NAME=alps-boost \
+ -DALPS_BUILD_APPLICATIONS=OFF \
+ -DALPS_ENABLE_MPI=OFF \
./alps
use_parallel_build yes
+
+variant applications description {compile ALPS with appliations} {
+ # alps/applications/dmrg/dmrg/dmrg.h:610:49: error: expected expression
+ # std::string name = simplify_name(it->get<1>());
+ # ^
+ compiler.blacklist clang
+
+ configure.args-delete -DALPS_BUILD_APPLICATIONS=OFF
+}
+
+variant openmpi description {Build with MPI support} {
+ depends_lib-append port:openmpi
+
+ configure.args-delete -DALPS_ENABLE_MPI=OFF
+}
+
+set pythons_suffixes {25 26 27}
+set pythons_ports {}
+foreach s ${pythons_suffixes} {
+ lappend pythons_ports python${s}
+}
+foreach s ${pythons_suffixes} {
+ set p python${s}
+ set v [string index ${s} 0].[string index ${s} 1]
+ set i [lsearch -exact ${pythons_ports} ${p}]
+ set c [lreplace ${pythons_ports} ${i} ${i}]
+ eval [subst {
+ variant ${p} description "Build ALPS for Python ${v}" conflicts ${c} {
+ depends_lib-append port:${p} \
+ port:py${s}-numpy \
+ port:py${s}-matplotlib \
+ port:py${s}-scipy
+
+ patchfiles-append patch-config-FindPython.cmake.diff
+
+ post-patch {
+ reinplace "s|@PYTHON@|python[regsub {(.)(.+)} ${s} {\1.\2}]|g" ${worksrcpath}/alps/config/FindPython.cmake
+ }
+ }
+ }]
+}
+
+set selected_version python27
+foreach s ${pythons_suffixes} {
+ if {[variant_isset python${s}]} {
+ set selected_version python${s}
+ }
+}
+
+default_variants +${selected_version} +applications
+
+# py-scipy and openmpi are not universal
+universal_variant no
+
+livecheck.type none
Modified: trunk/dports/science/alps/files/patch-config-FindPython.cmake.diff
===================================================================
--- trunk/dports/science/alps/files/patch-config-FindPython.cmake.diff 2012-09-09 10:50:29 UTC (rev 97565)
+++ trunk/dports/science/alps/files/patch-config-FindPython.cmake.diff 2012-09-09 10:55:02 UTC (rev 97566)
@@ -7,7 +7,7 @@
if (NOT PYTHON_INTERPRETER AND NOT PYTHON_VISTRAILS_OVERRIDE)
- find_program(PYTHON_INTERPRETER python PATHS $ENV{PATH})
-+ find_program(PYTHON_INTERPRETER python2.6 PATHS $ENV{PATH})
++ find_program(PYTHON_INTERPRETER @PYTHON@ PATHS $ENV{PATH})
if (NOT PYTHON_INTERPRETER)
set (PYTHON_FOUND FALSE)
else(NOT PYTHON_INTERPRETER)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120909/8b8555d2/attachment-0001.html>
More information about the macports-changes
mailing list