<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[130955] trunk/dports/python/py-scipy/Portfile</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/130955">130955</a></dd>
<dt>Author</dt> <dd>sean@macports.org</dd>
<dt>Date</dt> <dd>2015-01-03 22:01:08 -0800 (Sat, 03 Jan 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>py-scipy: refactor port to use compilers group; fixes #43321; closes #46266
A large refactor to simplify the scipy portfile. Mainly, this accomplishes:
- use compilers portgroup to unify behavior
- change default fortran to gcc49
- match atlas and numpy compilers for correct fortran ABI
- remove python 3.2</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportspythonpyscipyPortfile">trunk/dports/python/py-scipy/Portfile</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportspythonpyscipyPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/python/py-scipy/Portfile (130954 => 130955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/python/py-scipy/Portfile        2015-01-04 06:01:06 UTC (rev 130954)
+++ trunk/dports/python/py-scipy/Portfile        2015-01-04 06:01:08 UTC (rev 130955)
</span><span class="lines">@@ -4,9 +4,11 @@
</span><span class="cx"> PortSystem 1.0
</span><span class="cx"> PortGroup python 1.0
</span><span class="cx"> PortGroup active_variants 1.1
</span><ins>+PortGroup compilers 1.0
</ins><span class="cx">
</span><span class="cx"> name py-scipy
</span><span class="cx"> version 0.14.1
</span><ins>+revision 1
</ins><span class="cx"> platforms darwin
</span><span class="cx"> license BSD
</span><span class="cx"> maintainers sean michaelld openmaintainer
</span><span class="lines">@@ -20,11 +22,13 @@
</span><span class="cx"> checksums rmd160 137ac20d4fad632b42c3c5ce9ca759aad22715c1 \
</span><span class="cx"> sha256 ab75f161107ee411c054abc35e28ec2d19bb5ec8437aaf6c32b80916568f7dad
</span><span class="cx">
</span><del>-python.versions 26 27 32 33 34
</del><ins>+python.versions 26 27 33 34
</ins><span class="cx">
</span><span class="cx"> python.add_archflags no
</span><span class="cx"> universal_variant no
</span><span class="cx">
</span><ins>+compilers.setup require_fortran -clang -dragonegg -gcc44 -gcc45 -gcc46 -g95
+
</ins><span class="cx"> if {${name} ne ${subport}} {
</span><span class="cx">
</span><span class="cx"> depends_lib-append port:py${python.version}-numpy \
</span><span class="lines">@@ -38,8 +42,25 @@
</span><span class="cx"> destroot.env-append CCFLAGS="-I${prefix}/include -L${prefix}/lib"
</span><span class="cx"> configure.fflags-append -fno-second-underscore
</span><span class="cx">
</span><del>- if {[string match "*clang*" ${configure.compiler}]} {
- configure.fflags-append -ff2c
</del><ins>+ pre-configure {
+ if {![fortran_variant_isset]} {
+ configure.fflags-append -ff2c
+ }
+
+ set fc_options "config_fc --fcompiler gnu95 --f77exec ${configure.f77} --f77flags='${configure.f77_archflags} ${configure.fflags}' --f90exec ${configure.f90} --f90flags='${configure.f90_archflags} ${configure.fflags}'"
+ set config_options "config --cc ${configure.cc} --include-dirs ${prefix}/include --library-dirs ${prefix}/lib"
+ build.cmd-append ${fc_options} ${config_options}
+ destroot.cmd-append ${fc_options} ${config_options}
+
+ build.env-append CC="${configure.cc}" \
+ CXX="${configure.cxx}" \
+ CFLAGS="${configure.cc_archflags}" \
+ CXXFLAGS="${configure.cxx_archflags}"
+ destroot.env-append CC="${configure.cc}" \
+ CXX="${configure.cxx}" \
+ CFLAGS="${configure.cc_archflags}" \
+ CXXFLAGS="${configure.cxx_archflags}"
+
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> patchfiles umfpack_extra_libs.patch
</span><span class="lines">@@ -61,87 +82,55 @@
</span><span class="cx"> destroot.env-append ATLAS=${prefix}/lib \
</span><span class="cx"> LAPACK=${prefix}/lib \
</span><span class="cx"> BLAS=${prefix}/lib
</span><del>- } else {
- build.env-append ATLAS=None \
- LAPACK=/usr/lib \
- BLAS=/usr/lib
- destroot.env-append ATLAS=None \
- LAPACK=/usr/lib \
- BLAS=/usr/lib
- }
</del><span class="cx">
</span><del>- set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
- set default_fortran_variant +gcc48
</del><ins>+ pre-fetch {
+ # get the c compiler name, if blank set to clang which is what atlas
+ # does
+ set cc [c_variant_name]
+ if {$cc eq ""} {
+ set cc clang
+ }
</ins><span class="cx">
</span><del>- foreach ver ${gcc_versions} {
- set ver_no_dot [join [split ${ver} "."] ""]
</del><ins>+ # check the C compiler for atlas: if not the same then error out; we
+ # don't need to check the fortran compiler because if atlas is compiled
+ # with +clang then gcc48 (+gfortran in the compilers portgroup
+ # language) is used for fortran. If a +gcc variant is used to compile
+ # atlas, then that gcc's fortran is used so the c compiler check will
+ # suffice.
+ if {![catch {set result [active_variants atlas $cc ""]}]} {
+ if {!$result} {
+ return -code error \
+"You have selected the $cc compiler (either directly or indirectly) and the\
++atlas variant, which does not match the $cc compiler. Please ensure that both\
+are compiled with the same one."
+ }
+ }
</ins><span class="cx">
</span><del>- set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}"}
</del><ins>+ # also check that numpy has the atlas variant active
+ if {![catch {set result [active_variants py${python.version}-numpy atlas ""]}]} {
+ if {!$result} {
</ins><span class="cx">
</span><del>- foreach over ${gcc_versions} {
- if {${ver} == ${over}} {
- continue
</del><ins>+ return -code error \
+"You have selected the +atlas variant but py${python.version}-numpy does not\
+have the +atlas variant active. Please ensure that numpy is activated with the\
++atlas variant."
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- set over_no_dot [join [split ${over} "."] ""]
- append variant_line " conflicts gcc${over_no_dot}"
</del><span class="cx"> }
</span><del>- append variant_line { {}}
</del><span class="cx">
</span><del>- eval $variant_line
-
- if {[variant_isset gcc${ver_no_dot}]} {
- if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
- set default_fortran_variant ""
- }
- }
</del><ins>+ } else {
+ build.env-append ATLAS=None \
+ LAPACK=/usr/lib \
+ BLAS=/usr/lib
+ destroot.env-append ATLAS=None \
+ LAPACK=/usr/lib \
+ BLAS=/usr/lib
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- if {${default_fortran_variant} != ""} {
- default_variants-append "${default_fortran_variant}"
- }
-
- foreach ver ${gcc_versions} {
- set ver_no_dot [join [split ${ver} "."] ""]
-
- if {[variant_isset gcc${ver_no_dot}]} {
- depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
- depends_build-append port:gcc${ver_no_dot}
-
- configure.fc ${prefix}/bin/gfortran-mp-${ver}
- configure.f77 ${prefix}/bin/gfortran-mp-${ver}
- configure.f90 ${prefix}/bin/gfortran-mp-${ver}
- }
- }
-
- set fc_options "config_fc --fcompiler gnu95 --f77exec ${configure.f77} --f77flags='${configure.f77_archflags} ${configure.fflags}' --f90exec ${configure.f90} --f90flags='${configure.f90_archflags} ${configure.fflags}'"
- set config_options "config --cc ${configure.cc} --include-dirs ${prefix}/include --library-dirs ${prefix}/lib"
- build.cmd-append ${fc_options} ${config_options}
- destroot.cmd-append ${fc_options} ${config_options}
-
- build.env-append CC="${configure.cc}" \
- CXX="${configure.cxx}" \
- CFLAGS="${configure.cc_archflags}" \
- CXXFLAGS="${configure.cxx_archflags}"
- destroot.env-append CC="${configure.cc}" \
- CXX="${configure.cxx}" \
- CFLAGS="${configure.cc_archflags}" \
- CXXFLAGS="${configure.cxx_archflags}"
-
</del><span class="cx"> livecheck.type none
</span><span class="cx"> } else {
</span><span class="cx"> livecheck.type regex
</span><span class="cx"> livecheck.url http://sourceforge.net/projects/scipy/rss
</span><span class="cx"> livecheck.regex scipy-(\[0-9\.\]+)${extract.suffix}/download</guid>
</span><span class="cx"> }
</span><del>-
-subport py32-scipy {
- pre-activate {
- set regref [registry_open $subport $version $revision $portvariants ""]
- foreach f [registry_prop_retr $regref imagefiles] {
- if {[file extension $f] == ".pyc" && [file exists $f] && [registry_file_registered $f] == "0"} {
- file delete -force $f
- }
- }
- }
-}
</del></span></pre>
</div>
</div>
</body>
</html>