[93456] trunk/dports/math/atlas/Portfile
vince at macports.org
vince at macports.org
Wed May 23 03:18:54 PDT 2012
Revision: 93456
https://trac.macports.org/changeset/93456
Author: vince at macports.org
Date: 2012-05-23 03:18:52 -0700 (Wed, 23 May 2012)
Log Message:
-----------
Fix a bug in the Portfile (the fortran library path was truncated, causing dylib generation errors that were fixed by a (thus spurious) patch embedded in the Portfile).
Modified Paths:
--------------
trunk/dports/math/atlas/Portfile
Modified: trunk/dports/math/atlas/Portfile
===================================================================
--- trunk/dports/math/atlas/Portfile 2012-05-23 07:58:20 UTC (rev 93455)
+++ trunk/dports/math/atlas/Portfile 2012-05-23 10:18:52 UTC (rev 93456)
@@ -89,16 +89,15 @@
# The clang compiler bundled with Xcode < 4.3 is not suitable for
# Atlas compiling.
-if {[vercmp $xcodeversion 4.3] < 0} {
+if {[join [split ${xcodeversion} "."] ""] < 43} {
- if {[variant_isset clang] || [variant_isset dragonegg]} {
- pre-fetch {
- return -code error "Use of Clang is disabled with this version of Xcode."
- }
+ if {[variant_isset clang] || [variant_isset dragonegg46]} {
+
+ return -code error "Use of Clang is disabled with this version of Xcode."
}
-
+
if {[variant_isset gcc45]} {
-
+
set gccversion 4.5
} elseif {[variant_isset gcc46]} {
@@ -116,9 +115,8 @@
# Defaults to gcc46
set gccversion 4.6
- default_variants +gcc46
}
-
+
} else {
# On Xcode > 4.2 we may use the standard Clang
@@ -166,6 +164,11 @@
set use_clang 1
}
+if {[info exists depends_skip_archcheck] && [info exists gccversion]} {
+
+ depends_skip_archcheck gcc${gccnumber}
+}
+
# No cross-compilation possible
if {${os.arch} == "i386"} {
@@ -241,8 +244,8 @@
}
}
-if {(${os.major} >= 11 && ![catch {sysctl hw.optional.avx1_0} result1] && $result1 == 1) || \
- (${os.major} > 8 && ![catch {sysctl hw.cpufamily} result2] && $result2 == 1418770316)} {
+if {(${os.major} >= 11 && [sysctl hw.optional.avx1_0] == 1) || \
+ (${os.major} > 8 && [sysctl hw.cpufamily] == 1418770316)} {
# Core i2 processors (AVX)
# AVX instruction can’t be used with GCC because Apple bundled as(1)
@@ -292,6 +295,12 @@
-b 64 \
-s gas_x86_64 \
-Fa alg '-fPIC -m64'
+} else {
+
+ lappend merger_configure_args(ppc)
+ lappend merger_configure_args(ppc64)
+ lappend merger_configure_args(i386)
+ lappend merger_configure_args(x86_64)
}
@@ -361,18 +370,33 @@
set gccnumber \
[join [split [string range ${configure.f77} end-2 end] "."] ""]
ui_msg "Selected gfortran${gccnumber}."
-
- configure.args-append -C if ${configure.f77}
- configure.args-append -Ss f77lib ${prefix}/lib/gcc${gccnumber}
}
}
- # If we use gcc, then select the corresponding gfortran compiler
+ # Select the proper gfortran and corresponding libgfortran library
if {[info exists gccnumber] && ![variant_isset nofortran]} {
+
configure.args-append -C if ${configure.f77}
- configure.args-append -Ss f77lib ${prefix}/lib/gcc${gccnumber}
- }
+ set libgfbasepath ${prefix}/lib/gcc${gccnumber}
+ if {[variant_isset universal]} {
+ foreach arch ${universal_archs_to_use} {
+
+ set libgfarchpath ${libgfbasepath}/${arch}
+ if {[file exists ${libgfarchpath}/libgfortran.dylib]} {
+
+ lappend merger_configure_args($arch) \
+ -Ss f77lib ${libgfarchpath}/libgfortran.dylib
+ } else {
+
+ lappend merger_configure_args($arch) \
+ -Ss f77lib ${libgfbasepath}/libgfortran.dylib
+ }
+ }
+ }
+ }
+
+ # Create build trees
if {[variant_isset universal]} {
foreach arch ${universal_archs_to_use} {
copy ${workpath}/${name}-${version} \
@@ -424,7 +448,6 @@
set archs ${build_arch}
}
- set libgfbasepath ${prefix}/lib/gcc${gccnumber}
foreach arch ${archs} {
if {![variant_isset universal]} {
@@ -439,23 +462,6 @@
ui_debug "patch to recursively remove directories on clean"
reinplace "s|rm -f|rm -rf|g" ${atlas_path}/build/Makefile
- # Workaround a bug in dylib generation
-
- if {[info exists gccnumber]} {
-
- set libgfarchpath ${libgfbasepath}/${arch}
- if {[file exists ${libgfarchpath}/libgfortran.dylib]} {
-
- reinplace \
- "s|F77SYSLIB.*|F77SYSLIB = ${libgfarchpath}/libgfortran.dylib|" \
- ${atlas_path}/build/Make.inc
- } else {
-
- reinplace \
- "s|F77SYSLIB.*|F77SYSLIB = ${libgfbasepath}/libgfortran.dylib|" \
- ${atlas_path}/build/Make.inc
- }
- }
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120523/5e7052e1/attachment.html>
More information about the macports-changes
mailing list