aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authorbf <bf@FreeBSD.org>2011-09-25 02:36:59 +0800
committerbf <bf@FreeBSD.org>2011-09-25 02:36:59 +0800
commit50962803c396db4bc6b7578c73886f204110c0a2 (patch)
tree38fb83a1c16c1c44f7b572e4878c523c783ae5bf /math
parent4f8d2da18a70b70a4f29981add7de8520bbe35fe (diff)
downloadfreebsd-ports-gnome-50962803c396db4bc6b7578c73886f204110c0a2.tar.gz
freebsd-ports-gnome-50962803c396db4bc6b7578c73886f204110c0a2.tar.zst
freebsd-ports-gnome-50962803c396db4bc6b7578c73886f204110c0a2.zip
Update to 3.8.4 before the 3.10 release; clean up (substantially
reduce build times, introduce options, drop unneeded dependencies, and make linking with ATLAS shared libraries easier) Thanks to maho and A. Shterenlikht for review and testing, and to mm, T. Ludwig, skreuzer, and E. Lemos de Sa for reminders or related submissions PR: 117923, 139169, 155650, 159876
Diffstat (limited to 'math')
-rw-r--r--math/atlas/Makefile404
-rw-r--r--math/atlas/distinfo4
-rw-r--r--math/atlas/files/Makefile.test35
-rw-r--r--math/atlas/files/alpha-patch9
-rw-r--r--math/atlas/files/patch-CONFIG+src+SpewMakeInc.c59
-rw-r--r--math/atlas/files/patch-CONFIG+src+atlcomp.txt124
-rw-r--r--math/atlas/files/patch-CONFIG+src+backend+archinfo_freebsd.c114
-rw-r--r--math/atlas/files/patch-CONFIG+src+backend+archinfo_x86.c14
-rw-r--r--math/atlas/files/patch-makes+Make.sysinfo11
-rw-r--r--math/atlas/files/thread-patch12
-rw-r--r--math/atlas/files/tuning-message35
-rw-r--r--math/atlas/pkg-descr38
-rw-r--r--math/atlas/pkg-plist72
13 files changed, 439 insertions, 492 deletions
diff --git a/math/atlas/Makefile b/math/atlas/Makefile
index d25fd46c5733..d30c2e76f342 100644
--- a/math/atlas/Makefile
+++ b/math/atlas/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= atlas
-PORTVERSION= 3.8.3
-PORTREVISION= 1
+PORTVERSION= 3.8.4
PORTEPOCH= 1
CATEGORIES= math
MASTER_SITES= SF/math-${PORTNAME}/Stable/${PORTVERSION}
@@ -16,23 +15,30 @@ DISTNAME= ${PORTNAME}${PORTVERSION}
MAINTAINER= bf@FreeBSD.org
COMMENT= Automatically Tuned Linear Algebra Software (ATLAS)
-MANUAL_PACKAGE_BUILD= Optimizes for the local machine.
+LICENSE= BSD
+
+BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/math/lapack:checksum
USE_BZIP2= yes
-USE_GMAKE= yes
-WRKSRC= ${WRKDIR}/ATLAS
-USE_LDCONFIG= yes
+USE_FORTRAN= yes
+
CONFLICTS= atlas-devel-[0-9]*
+MANUAL_PACKAGE_BUILD= Optimizes for the local machine.
+
+OPTIONS= ARCHDEF "Use a specified architectural default" off \
+ SHARED "Build static PIC archives and shared libraries" on \
+ STATIC "Build static (non-PIC) archives" off \
+ TSC "If WALL_TIMER is enabled, use the TSC" off \
+ WALL_TIMER "Use less robust timing with higher resolution" off
+
PORTSCOUT= limitw:1,even
+WRKSRC= ${WRKDIR}/ATLAS
.include <bsd.port.pre.mk>
-NOT_FOR_ARCHS= alpha
-
-USE_FORTRAN= yes
-CCOMPILER= ${CC}
-LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas
-LIB_DEPENDS+= lapack.4:${PORTSDIR}/math/lapack
+#Increase ATLAS_MAXMALLOC if the atlas threaded libraries perform poorly on large problems:
+# http://math-atlas.sourceforge.net/errata.html#MaxMalloc
+ATLAS_MAXMALLOC?= 67108864
.if ${ARCH} == "sparc64"
PICFLAG?= -fPIC
@@ -40,229 +46,211 @@ PICFLAG?= -fPIC
PICFLAG?= -fpic
.endif
-.if ${ARCH} == "i386"
-POINTER= 32
-.endif
-.if ${ARCH} == "amd64"
-POINTER= 64
-.endif
-.if ${ARCH} == "sparc64"
-POINTER= 64
+.if defined(MAINTAINER_MODE)
+LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas
.endif
-.if (${OSVERSION} < 700000) && defined(WITH_GCC42KERNEL)
-BUILD_DEPENDS+= gcc42:${PORTSDIR}/lang/gcc42
-KERNELFLAG= -Ss kern gcc42
-.else
-KERNELFLAG= ""
-.endif
+.for i in DATA DOCS
+. if !defined(NOPORT${i})
+PORT${i}= *
+. endif
+.endfor
-.if defined(WITH_WALL_TIMER)
-. if defined(MHZ) && ( ${ARCH} == "i386" || ${ARCH} == "amd64" )
-TIMEFLAG= -D c -DPentiumCPS=${MHZ}
+.if defined(WITH_ARCHDEF)
+. if defined(ARCHDEF)
+. if ${ARCHDEF} == "NONE"
+ARCHDEFFLAG= -Si archdef 0
+. endif
. else
-TIMEFLAG= -D c -DWALL
+IGNORE = : You have set WITH_ARCHDEF, but have not defined ARCHDEF
. endif
-.else
-TIMEFLAG= ""
.endif
-# only used for lapack sub-project
-.if defined(WITH_OPTIMIZED_FLAGS)
-.if defined(CPUTYPE)
-FFLAGS+= -march=${CPUTYPE} -pipe -O2 -ffast-math
-.else
-FFLAGS+= -pipe -O2 -ffast-math
-.endif
-.endif
-.if defined(WITH_STATICLIB)
-PLIST_SUB+= WITH_STATICLIB=""
-.else
-PLIST_SUB+= WITH_STATICLIB="@comment "
+.if defined(WITH_SHARED)
+USE_LDCONFIG= yes
+.elifndef(WITH_STATIC)
+IGNORE = : You must select at least one of WITH_SHARED and WITH_STATIC
.endif
-post-extract:
- @${ECHO_MSG} 'This port engages in a long, computationally-demanding tuning process.'
- @${ECHO_MSG} 'Builds can take a day or more on older hardware, and temporarily occupy'
- @${ECHO_MSG} 'several hundred megabytes of disk space. You are advised to disable'
- @${ECHO_MSG} 'all forms of power management or CPU throttling (APM, ACPI, Intel'
- @${ECHO_MSG} 'SpeedStep, AMD PowerNow, AMD Cool and Quiet, p4tcc, powerd, etc.)'
- @${ECHO_MSG} 'that may change the disk I/O or CPU behavior during the build, and'
- @${ECHO_MSG} 'to set operating parameters to static values at which you ultimately'
- @${ECHO_MSG} 'intend to use the software. You should also avoid placing heavy loads'
- @${ECHO_MSG} 'on the system during the build, and temporarily disable any automatons'
- @${ECHO_MSG} 'that may do so. If you fail to follow these guidelines, you may prolong'
- @${ECHO_MSG} 'the build, perhaps indefinitely, and you may obtain libraries with'
- @${ECHO_MSG} 'sub-optimal performance.'
- @${ECHO_MSG}
- @${ECHO_MSG} 'Occasionally the autoconfiguration may fail for certain platforms, and'
- @${ECHO_MSG} 'you may have to override the architecture, compiler flags, assembly'
- @${ECHO_MSG} 'language dialect, or pointer bit-width by issuing additional configure'
- @${ECHO_MSG} 'arguments. Consult the FAQ, installation guide, and errata page at'
- @${ECHO_MSG} 'the project website for help if this is necessary, and notify the'
- @${ECHO_MSG} 'port maintainer.'
- @${ECHO_MSG}
- @${ECHO_MSG} "This port purposely ignores the CC and CFLAGS settings"
- @${ECHO_MSG} "Program and compiler flags are fine-tuned to the gcc 4.2.x"
- @${ECHO_MSG} "compiler, although other gcc versions may be used; gcc 4.1.x"
- @${ECHO_MSG} "is NOT recommended"
- @${ECHO_MSG}
-.if !defined(WITH_STATICLIB)
- @${ECHO_MSG} "You can build static libraries with"
- @${ECHO_MSG} "make -DWITH_STATICLIB"
- @${ECHO_MSG}
-.endif
-.if !defined(WITH_WALL_TIMER)
- @${ECHO_MSG} "If your machine will be solely dedicated to"
- @${ECHO_MSG} "building atlas with gcc during the lengthy optimization"
- @${ECHO_MSG} "process, and not subjected to other loads, you"
- @${ECHO_MSG} "may enable the more accurate wall timer (instead of"
- @${ECHO_MSG} "the default CPU-time timer) with make -DWITH_WALL_TIMER"
- @${ECHO_MSG} "If, in addition, you are on i386 or amd64, you may set MHZ"
- @${ECHO_MSG} "to your CPU clock frequency in MHz (rounded to the nearest"
- @${ECHO_MSG} "integer value) in the build environment for cycle-to-time"
- @${ECHO_MSG} "conversion"
- @${ECHO_MSG}
-.endif
-.if (${OSVERSION} < 700000)
-.if !defined(WITH_GCC42KERNEL)
- @${ECHO_MSG} "If you don't want to make gcc 4.2.x your default compiler (CC),"
- @${ECHO_MSG} "but you want to have ATLAS use it to compile all the kernel"
- @${ECHO_MSG} "routines (this usually results in superior performance, and a"
- @${ECHO_MSG} "slightly faster build), while compiling interface routines and"
- @${ECHO_MSG} "doing any linking with gcc 3.x, make a hybrid build with"
- @${ECHO_MSG} "make -DWITH_GCC42KERNEL"
- @${ECHO_MSG}
-.endif
-.endif
+.for opt in SHARED STATIC
+. if defined(WITH_${opt})
+PLIST_SUB+= ${opt}=""
+. else
+PLIST_SUB+= ${opt}="@comment "
+. endif
+.endfor
+
+EXTRA_FLAGS?= -Wl,-rpath=${LOCALBASE}/lib/${_GCC_BUILD_DEPENDS}
+SHARED_FLAGS= ${PTHREAD_CFLAGS} ${PICFLAG} -DPIC
+SHARED_LAPACK_WRKSRC= WRKSRC_SHARED
+STATIC_FLAGS= ${PTHREAD_CFLAGS}
+STATIC_LAPACK_WRKSRC= WRKSRC
-pre-configure:
- @${REINPLACE_CMD} -e "s|%%CC%%|${CCOMPILER}|g" \
- -e "s|%%FC%%|${FC}|g" ${WRKSRC}/CONFIG/src/atlcomp.txt
- @${REINPLACE_CMD} -e "s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g" \
- -e "s|%%PTHREAD_CFLAGS%%|${PTHREAD_CFLAGS}|g" \
- -e "s|%%LOCALBASE%%|${LOCALBASE}|g" \
+post-patch:
+ @cd ${WRKSRC}/CONFIG/ARCHS ; for t in *.tgz ; do \
+ ${MV} $${t} $${t}.bak ; \
+ ${TAR} -s '/gcc/${CC}/' -xf $${t}.bak ; \
+ ${TAR} -czf $${t} $${t%.tgz} ; \
+ ${RM} -r $${t%.tgz} $${t}.bak ; \
+ done
+ @${REINPLACE_CMD} -e 's|$$(ARCH)|$$(ATLAS_ARCH)|g' \
+ ${WRKSRC}/Make.top \
+ ${WRKSRC}/makes/Make.bin \
+ ${WRKSRC}/makes/Make.lib \
+ ${WRKSRC}/makes/Make.sysinfo \
+ ${WRKSRC}/CONFIG/src/Makefile \
+ ${WRKSRC}/CONFIG/ARCHS/Makefile
+ @${REINPLACE_CMD} -e "s|gcc|${CC}|" ${WRKSRC}/CONFIG/ARCHS/Makefile
+ @${REINPLACE_CMD} -e "\|OS=ALL|{N; s|'gcc'|'${CC}'|; \
+ s|'gfortran'|'${FC}'|; s|-mavx|-msse3|;s|'| ${EXTRA_FLAGS}'|4;}" \
+ ${WRKSRC}/CONFIG/src/atlcomp.txt
+ @${REINPLACE_CMD} -e "s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|" \
+ -e "s|%%CC%%|${CC}|" \
${WRKSRC}/CONFIG/src/SpewMakeInc.c
+ @${REINPLACE_CMD} -E -e \
+ "\|(#define ATL_MaxMalloc[[:blank:]]+)([[:digit:]]+)|s||\1${ATLAS_MAXMALLOC}|" \
+ ${WRKSRC}/include/atlas_lvl3.h
+ @${CAT} ${FILESDIR}/tuning-message
do-configure:
-#non-threaded
-#dummy f77lib, it is not used.
- ${MKDIR} ${WRKSRC}/NON_THREADED ; cd ${WRKSRC}/NON_THREADED ; \
- ../configure -v 2 -t 0 ${TIMEFLAG} -b ${POINTER} -Si cputhrchk 0 ${KERNELFLAG} -Ss f77lib " "
- ${MKDIR} ${WRKSRC}/NON_THREADED_PIC ; cd ${WRKSRC}/NON_THREADED_PIC ; \
- ../configure -v 2 -t 0 -b ${POINTER} -Fa alg '${PICFLAG} -DPIC' ${TIMEFLAG} -Si cputhrchk 0 ${KERNELFLAG} -Ss f77lib " "
-#threaded
-#dummy f77lib, it is not used.
- cd ${WRKSRC}; ${PATCH} < ${FILESDIR}/thread-patch
- ${MKDIR} ${WRKSRC}/THREADED ; cd ${WRKSRC}/THREADED ; \
- ../configure -v 2 -b ${POINTER} -Fa alg '${PTHREAD_CFLAGS} ' ${TIMEFLAG} -Si cputhrchk 0 ${KERNELFLAG} -Ss f77lib " "
- ${MKDIR} ${WRKSRC}/THREADED_PIC ; cd ${WRKSRC}/THREADED_PIC ; \
- ../configure -v 2 -b ${POINTER} -Fa alg '${PTHREAD_CFLAGS} ${PICFLAG} -DPIC' ${TIMEFLAG} -Si cputhrchk 0 ${KERNELFLAG} -Ss f77lib " "
+ @if [ "x${WITH_WALL_TIMER}" != "x" ] ; then \
+ TIMEFLAG= ; \
+ if [ \( ${ARCH} = "i386" -o ${ARCH} = "amd64" \) -a "x${WITH_TSC}" != "x" ] ; then \
+ freq=`${SYSCTL} -ni machdep.tsc_freq` ; \
+ if [ "x$${freq}" != "x" ] ; then \
+ if [ $${freq} -gt 1000000 ] ; then \
+ MHZ=$$(($${freq}/1000000)) ; \
+ TIMEFLAG="-D c -DPentiumCPS=$${MHZ}" ; \
+ fi ; \
+ fi ; \
+ fi ; \
+ if [ "x$${TIMEFLAG}" = "x" ] ; then \
+ TIMEFLAG="-D c -DWALL" ; \
+ fi ; \
+ fi ; \
+ ${ECHO_CMD} "TIMEFLAG = $${TIMEFLAG}" \
+ > ${WRKSRC}/saved_flags ; \
+ ${ECHO_CMD} "Dummy configuration of ATLAS to obtain compiler flags:" ; \
+ ${MKDIR} ${WRKSRC}/static ; cd ${WRKSRC}/static ; \
+ ../configure --cc="${CC}" --cflags="${CFLAGS}" \
+ --prefix="${PREFIX}" -v 2 $${TIMEFLAG} ${ARCHDEFFLAG} \
+ -Ss f77lib " " -Ss pmake "${MAKE} ${_MAKE_JOBS}" \
+ -Fa alg "${STATIC_FLAGS} "
+ @${SED} -ne "\|F77FLAGS =|p" ${WRKSRC}/static/Make.inc \
+ >> ${WRKSRC}/saved_flags
+
+post-configure:
+ @${RM} -r ${WRKSRC}/static
do-build:
-# make lapack
-.if ! exists(${WRKDIR}/lapack/Makefile)
- @${ECHO_MSG} "===> Extracting lapack sub project"
- @${MKDIR} ${WRKDIR}/lapack
- @${CP} -r ${PORTSDIR}/math/lapack/files ${WRKDIR}/lapack
- @${CP} ${PORTSDIR}/math/lapack/Makefile ${WRKDIR}/lapack
- @${CP} ${PORTSDIR}/math/lapack/distinfo ${WRKDIR}/lapack
- @${CP} ${PORTSDIR}/math/lapack/pkg-descr ${WRKDIR}/lapack
- @cd ${WRKDIR}/lapack ; ${MAKE} "FFLAGS=${FFLAGS}" FC="${FC}" build WRKDIRPREFIX=""
-.endif
-.if defined(WITH_STATICLIB)
- (cd ${WRKSRC}/NON_THREADED ; ${MAKE})
- (cd ${WRKSRC}/THREADED ; ${MAKE})
-.endif
- (cd ${WRKSRC}/NON_THREADED_PIC ; ${MAKE})
- (cd ${WRKSRC}/THREADED_PIC ; ${MAKE})
-test:
- @${MAKE} do-test
+.for opt in shared static
+. if defined(WITH_${opt:U})
+ @${ECHO_CMD} "Building the LAPACK archives with ${opt} ATLAS flags:"
+ F77FLAGS="`${MAKE} -f ${WRKSRC}/saved_flags -V F77FLAGS` ${EXTRA_FFLAGS}" ; \
+ LW=`${MAKE} -C ${PORTSDIR}/math/lapack -V ${${opt:U}_LAPACK_WRKSRC}` ; \
+ ${MAKE} -C ${PORTSDIR}/math/lapack FFLAGS="-pipe $${F77FLAGS}" \
+ clean patch ; \
+ ${MAKE} -C $${LW} ${.MAKEFLAGS} ${_MAKE_JOBS} ARCH="${AR}" \
+ FFLAGS="-pipe $${F77FLAGS}" lapacklib ; \
+ TIMEFLAG=`${MAKE} -f ${WRKSRC}/saved_flags -V TIMEFLAG` ; \
+ ${MKDIR} ${WRKSRC}/${opt} ; cd ${WRKSRC}/${opt} ; \
+ ${MV} $${LW}/liblapack.a liblapack_${opt}.a ; \
+ ${MAKE} -C ${PORTSDIR}/math/lapack clean ; \
+ ${ECHO_CMD} "Configuring ${opt} ATLAS:" ; \
+ ../configure --cc="${CC}" --cflags="${CFLAGS}" \
+ --with-netlib-lapack="${WRKSRC}/${opt}/liblapack_${opt}.a" \
+ --prefix="${PREFIX}" -v 2 $${TIMEFLAG} ${ARCHDEFFLAG} \
+ -Ss f77lib " " -Ss pmake "${MAKE} ${_MAKE_JOBS}" \
+ -Fa alg "${${opt:U}_FLAGS} " ; \
+ if [ "x${WITH_ARCHDEF}" != "x" ] ; then \
+ if [ "x${ARCHDEF}" != "xNONE" ] ; then \
+ if [ -f ${ARCHDEF} ] ; then \
+ ${CP} -f ${ARCHDEF} ${WRKSRC}/CONFIG/ARCHS/ ; \
+ elif [ ! -f ${WRKSRC}/CONFIG/ARCHS/${ARCHDEF} ] ; then \
+ ${ECHO_CMD} \
+ "==> ${PKGNAME} : ARCHDEF \"${ARCHDEF}\" does not exist" ; \
+ exit 1 ; \
+ fi ; \
+ ${REINPLACE_CMD} -E -e \
+ "\|[[:blank:]]*ARCH =|s|=.*|= ${ARCHDEF:T:S/.tgz$//}|" \
+ ${WRKSRC}/${opt}/Make.inc ; \
+ fi ; \
+ fi ; \
+ ${ECHO_CMD} "Building ${opt} ATLAS:" ; cd ${WRKSRC}/${opt} ; \
+ ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} all
+. endif
+.endfor
-ATLAS_LIBS1=libalapack libatlas libcblas libf77blas #libtstatlas
-ATLAS_LIBS2=libptcblas libptf77blas
-LAPACKWRKSRC=`cd ${WRKDIR}/lapack; ${MAKE} -V WRKSRC WRKDIRPREFIX=""`
+L1= ${FC} $${F77FLAGS} ${SHARED_FLAGS} ${LDFLAGS} -shared -Wl,-x \
+ -Wl,--whole-archive -Wl,-soname,
+L2= -Wl,--no-whole-archive -Wl,--as-needed ${PTHREAD_LIBS}
post-build:
-.if defined(WITH_STATICLIB)
-# make atlas-enhanced lapack (static ver)
- (cd ${WRKSRC}; ${MKDIR} tmp1 ; \
- ${CP} ${LAPACKWRKSRC}/liblapack.a tmp1 ;\
- cd tmp1 ;\
- ar x liblapack.a ;\
- ar x ../NON_THREADED/lib/liblapack.a ;\
- ar r ../NON_THREADED/lib/libalapack.a *.o ;\
- ranlib ../NON_THREADED/lib/libalapack.a )
-# make atlas-enhanced lapack (static and thread-safe ver)
- (cd ${WRKSRC}; ${MKDIR} tmp2 ; \
- ${CP} ${LAPACKWRKSRC}/liblapack.a tmp2 ;\
- cd tmp2 ;\
- ar x liblapack.a ;\
- ar x ../THREADED/lib/liblapack.a ;\
- ar r ../THREADED/lib/libalapack.a *.o ;\
- ranlib ../THREADED/lib/libalapack.a )
+.for opt in shared static
+. if defined(WITH_${opt:U})
+ @${ECHO_CMD} "Timing ${opt} ATLAS:"
+ @cd ${WRKSRC}/${opt} ; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} time ; \
+ cd ARCHS ; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} ArchNew tarfile
+. endif
+.endfor
+.if defined(WITH_SHARED)
+ @${ECHO_CMD} "Building ATLAS shared libraries:"
+ @F77FLAGS=`${MAKE} -f ${WRKSRC}/saved_flags -V F77FLAGS` ; \
+ cd ${WRKSRC}/shared/lib ; \
+ ${L1}libatlas.so.2 -o libatlas.so.2 libatlas.a ${L2} ; \
+ ${L1}libf77blas.so.2 -o libf77blas.so.2 libf77blas.a ${L2} libatlas.so.2 ; \
+ ${L1}libptf77blas.so.2 -o libptf77blas.so.2 libptf77blas.a ${L2} libatlas.so.2 ; \
+ ${L1}libcblas.so.2 -o libcblas.so.2 libcblas.a ${L2} libatlas.so.2 ; \
+ ${L1}libptcblas.so.2 -o libptcblas.so.2 libptcblas.a ${L2} libatlas.so.2 ; \
+ ${L1}libalapack.so.2 -o libalapack.so.2 liblapack.a ${L2} libatlas.so.2
.endif
-# make atlas-enhanced lapack (shared ver)
- ( cd ${WRKSRC}; ${MKDIR} tmp3 ;\
- ${CP} ${LAPACKWRKSRC}_shared/liblapack.a tmp3 ;\
- cd tmp3 ;\
- ar x liblapack.a ;\
- ar x ../NON_THREADED_PIC/lib/liblapack.a ;\
- ar r ../NON_THREADED_PIC/lib/libalapack.a *.o ;\
- ranlib ../NON_THREADED_PIC/lib/libalapack.a )
-# make atlas-enhanced lapack (shared and thread-safe ver)
- ( cd ${WRKSRC}; ${MKDIR} tmp4 ;\
- ${CP} ${LAPACKWRKSRC}_shared/liblapack.a tmp4 ;\
- cd tmp4 ;\
- ar x liblapack.a ;\
- ar x ../THREADED_PIC/lib/liblapack.a ;\
- ar r ../THREADED_PIC/lib/libalapack.a *.o ;\
- ranlib ../THREADED_PIC/lib/libalapack.a )
-# make atlas shared library
-.for i in ${ATLAS_LIBS1}
- ( cd ${WRKSRC}/NON_THREADED_PIC/lib ; \
- ld -Bshareable -o ${i}.so.2 -x -soname ${i}.so.2 --whole-archive ${i}.a )
-.endfor
+.if defined(MAINTAINER_MODE)
+STATIC_BLAS= ${LOCALBASE}/lib/libblas.a
+SHARED_BLAS= -L${LOCALBASE}/lib -lblas
-# make atlas shared (thread-safe) library
-.for i in ${ATLAS_LIBS1}
- ( cd ${WRKSRC}/THREADED_PIC/lib ; \
- ld -Bshareable -o ${i}_r.so.2 -x -soname ${i}_r.so.2 --whole-archive ${i}.a )
-.endfor
-.for i in ${ATLAS_LIBS2}
- ( cd ${WRKSRC}/THREADED_PIC/lib ; \
- ld -Bshareable -o ${i}.so.2 -x -soname ${i}.so.2 --whole-archive ${i}.a )
-.endfor
-do-install:
-.for i in ${ATLAS_LIBS1}
-.if defined(WITH_STATICLIB)
- @${INSTALL_DATA} ${WRKSRC}/NON_THREADED/lib/${i}.a ${PREFIX}/lib
-.endif
- @${INSTALL_DATA} ${WRKSRC}/NON_THREADED_PIC/lib/${i}.so.2 ${PREFIX}/lib
- @${LN} -sf ${i}.so.2 ${PREFIX}/lib/${i}.so
-.endfor
-.for i in ${ATLAS_LIBS1}
-.if defined(WITH_STATICLIB)
- @${INSTALL_DATA} ${WRKSRC}/THREADED/lib/${i}.a ${PREFIX}/lib/${i}_r.a
-.endif
- @${INSTALL_DATA} ${WRKSRC}/THREADED_PIC/lib/${i}_r.so.2 ${PREFIX}/lib/${i}_r.so.2
- @${LN} -sf ${i}_r.so.2 ${PREFIX}/lib/${i}_r.so
-.endfor
-.for i in ${ATLAS_LIBS2}
-.if defined(WITH_STATICLIB)
- @${INSTALL_DATA} ${WRKSRC}/THREADED/lib/${i}.a ${PREFIX}/lib
+check regression-test test: build
+. for opt in shared static
+. if defined(WITH_${opt:U})
+ @${ECHO_CMD} "Testing ${opt} ATLAS:"
+ @cd ${WRKSRC}/${opt} ; ${SETENV} ${MAKE_ENV} BLAS="${${opt:U}_BLAS}" \
+ ${MAKE} ${MAKE_ARGS} check ptcheck error_report
+. endif
+. endfor
.endif
- @${INSTALL_DATA} ${WRKSRC}/THREADED_PIC/lib/${i}.so.2 ${PREFIX}/lib
- @${LN} -sf ${i}.so.2 ${PREFIX}/lib/${i}.so
-.endfor
+do-install:
+.for i in libatlas libcblas libf77blas liblapack libptcblas libptf77blas
+. if defined(WITH_STATIC)
+ @${INSTALL_DATA} ${WRKSRC}/static/lib/${i}.a ${PREFIX}/lib/${i:S|lapack|alapack|}.a
+. endif
+. if defined(WITH_SHARED)
+ @${INSTALL_DATA} ${WRKSRC}/shared/lib/${i}.a ${PREFIX}/lib/${i:S|lapack|alapack|}_pic.a
+ @${INSTALL_DATA} ${WRKSRC}/shared/lib/${i:S|lapack|alapack|}.so.2 ${PREFIX}/lib
+ @${LN} -sf ${i:S|lapack|alapack|}.so.2 ${PREFIX}/lib/${i:S|lapack|alapack|}.so
+. endif
+.endfor
@${INSTALL_DATA} ${WRKSRC}/include/cblas.h ${PREFIX}/include
@${INSTALL_DATA} ${WRKSRC}/include/clapack.h ${PREFIX}/include
+.for opt in shared static
+. if defined(WITH_${opt:U})
+ @${MKDIR} ${PREFIX}/include/atlas/${opt}
+ @${INSTALL_DATA} ${WRKSRC}/${opt}/include/* ${PREFIX}/include/atlas/${opt}
+ @cd ${PREFIX} ; \
+ ${FIND} include/atlas/${opt} -type f -o -type l | ${SORT} >> ${TMPPLIST}
+ @${ECHO_CMD} "@dirrm include/atlas/${opt}" >> ${TMPPLIST}
+. if !defined(NOPORTDATA)
+ @${MKDIR} ${DATADIR}/${opt}
+ @cd ${WRKSRC}/${opt}/bin ; ${TAR} -czf INSTALL_LOG.tgz INSTALL_LOG ; \
+ ${INSTALL_DATA} INSTALL_LOG.tgz ${DATADIR}/${opt}
+ @${INSTALL_DATA} ${WRKSRC}/${opt}/ARCHS/*.tgz ${DATADIR}/${opt}
+. endif
+. endif
+.endfor
+ @${ECHO_CMD} "@dirrm include/atlas" >> ${TMPPLIST}
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
.endif
-.include <${FILESDIR}/Makefile.test>
.include <bsd.port.post.mk>
diff --git a/math/atlas/distinfo b/math/atlas/distinfo
index 17bf9db0e8b3..ecfbd2020eb6 100644
--- a/math/atlas/distinfo
+++ b/math/atlas/distinfo
@@ -1,2 +1,2 @@
-SHA256 (atlas3.8.3.tar.bz2) = e537168f2022db98b9029c8064815b5581620c12d782016138b1bf0bbb01f473
-SIZE (atlas3.8.3.tar.bz2) = 2527756
+SHA256 (atlas3.8.4.tar.bz2) = 0f7720fb16fa4b8b8a192ea791e57569546db6f5f016cf3caaee30a9d94583bf
+SIZE (atlas3.8.4.tar.bz2) = 2534071
diff --git a/math/atlas/files/Makefile.test b/math/atlas/files/Makefile.test
deleted file mode 100644
index 1eaae571f323..000000000000
--- a/math/atlas/files/Makefile.test
+++ /dev/null
@@ -1,35 +0,0 @@
-ALLTESTS = xsl3blastst xdl3blastst xcl3blastst xzl3blastst \
- xsl2blastst xdl2blastst xcl2blastst xzl2blastst \
- xsl1blastst xdl1blastst xcl1blastst xzl1blastst \
- xslutst xslutstF xdlutst xdlutstF xclutst xclutstF \
- xzlutst xzlutstF xsllttst xsllttstF xdllttst xdllttstF \
- xcllttst xcllttstF xzllttst xzllttstF
-
-ALLTESTS_PT = xsl3blastst_pt xdl3blastst_pt xcl3blastst_pt xzl3blastst_pt \
- xslutst_pt xslutstF_pt xdlutst_pt xdlutstF_pt xclutst_pt xclutstF_pt \
- xzlutst_pt xzlutstF_pt xsllttst_pt xsllttstF_pt xdllttst_pt \
- xdllttstF_pt xcllttst_pt xcllttstF_pt xzllttst_pt xzllttstF_pt
-#build errors?
-# xsl2blastst_pt xdl2blastst_pt xcl2blastst_pt xzl2blastst_pt \
-# xsl1blastst_pt xdl1blastst_pt xcl1blastst_pt xzl1blastst_pt \
-#Failed tests
-do-test:
- @for i in ${ALLTESTS} ; do \
- ${ECHO_CMD} "Making $${i}" ; \
- cd ${WRKDIR}/ATLAS/NON_THREADED_PIC/bin ; ${MAKE} $${i} ; \
- done
- @for i in ${ALLTESTS_PT} ; do \
- ${ECHO_CMD} "Making $${i}" ; \
- cd ${WRKDIR}/ATLAS/THREADED_PIC/bin ; ${MAKE} $${i} ; \
- done
- @for i in ${ALLTESTS} ; do \
- ${ECHO_CMD} "Benchmarking $${i}" ; \
- cd ${WRKDIR}/ATLAS/NON_THREADED_PIC/bin ; ./$${i} ; \
- done
- @for i in ${ALLTESTS_PT} ; do \
- ${ECHO_CMD} "Benchmarking $${i}" ; \
- cd ${WRKDIR}/ATLAS/THREADED_PIC/bin ; ./$${i} ; \
- done
-
-
-
diff --git a/math/atlas/files/alpha-patch b/math/atlas/files/alpha-patch
deleted file mode 100644
index 564198d5be91..000000000000
--- a/math/atlas/files/alpha-patch
+++ /dev/null
@@ -1,9 +0,0 @@
---- src/blas/gemm/GOTO/ATLU_usergemm.c~ Mon Jun 17 10:38:22 2002
-+++ src/blas/gemm/GOTO/ATLU_usergemm.c Sun Aug 18 10:41:19 2002
-@@ -1,5 +1,5 @@
- #include "atlas_misc.h"
--#include <sys/mman.h>
-+/*#include <sys/mman.h>*/
-
- #ifdef EV6
- #ifdef ATL_OS_OSF1
diff --git a/math/atlas/files/patch-CONFIG+src+SpewMakeInc.c b/math/atlas/files/patch-CONFIG+src+SpewMakeInc.c
index 975591f13f3b..6f41c19512da 100644
--- a/math/atlas/files/patch-CONFIG+src+SpewMakeInc.c
+++ b/math/atlas/files/patch-CONFIG+src+SpewMakeInc.c
@@ -1,15 +1,60 @@
---- CONFIG/src/SpewMakeInc.c.orig 2007-10-11 05:40:21.000000000 +0900
-+++ CONFIG/src/SpewMakeInc.c 2007-10-29 11:03:11.000000000 +0900
-@@ -693,14 +693,14 @@
+--- CONFIG/src/SpewMakeInc.c.orig 2011-05-14 13:33:24.000000000 -0400
++++ CONFIG/src/SpewMakeInc.c 2011-09-06 06:06:00.000000000 -0400
+@@ -399,7 +399,8 @@
+ &mhz, &ptrbits, &ncpu, comps, &gccflags, &outfile, &srcdir,
+ &blddir, &USEDEFL1, &USEARCHDEF, &nof77, &f2cdefs, &cdefs, &pmake,
+ &flapack, &smaflags, &dmaflags, &f77lib, &l2size, &targ);
+- if (ncpu > 1) THREADS = 1;
++ /* if (ncpu > 1) THREADS = 1; */
++ THREADS = 1;
+ if (!outfile)
+ fpout = stdout;
+ else
+@@ -482,7 +483,7 @@
+ fprintf(fpout, "# -------------------------------------------------\n");
+ fprintf(fpout, "# Name indicating the platform to configure BLAS to\n");
+ fprintf(fpout, "# -------------------------------------------------\n");
+- fprintf(fpout, " ARCH = %s", machnam[mach]);
++ fprintf(fpout, " ATLAS_ARCH = %s", machnam[mach]);
+ fprintf(fpout, "%d", ptrbits);
+ if (ISAX)
+ fprintf(fpout, "%s", ISAXNAM[ISAX]);
+@@ -649,7 +650,7 @@
+ comps[i][j-2] == 'c' && comps[i][j-1] == 'c')
+ break;
+ }
+- goodgcc = (j < NCOMP) ? comps[j] : "gcc";
++ goodgcc = (j < NCOMP) ? comps[j] : "%%CC%%";
+ fprintf(fpout, " GOODGCC = %s", goodgcc);
+ if (gccflags)
+ fprintf(fpout, " %s", gccflags);
+@@ -661,7 +662,7 @@
+ fprintf(fpout, " %s", sp);
+ fprintf(fpout, "\n");
+
+- fprintf(fpout, " LDFLAGS =");
++ fprintf(fpout, " LDFLAGS = %%LDFLAGS%% ");
+ if (MachIsX86(mach))
+ {
+ if (ptrbits == 32)
+@@ -679,7 +680,7 @@
+ fprintf(fpout, " FCLINKFLAGS = $(FLINKFLAGS)");
+ if (strstr(comps[F77_], "ifort") && !OSIsWin(OS))
+ fprintf(fpout, " -nofor_main");
+- fprintf(fpout, "\n ARCHIVER = ar\n");
++ fprintf(fpout, "\n ARCHIVER = $(AR)\n");
+ fprintf(fpout, " ARFLAGS = r\n");
+ /*
+ * JF Mertens says that even x86 OS X still need ranlib for safety
+@@ -702,14 +703,14 @@
fprintf(fpout, "# ------------------------------------\n");
fprintf(fpout, "# Reference and system libraries\n");
fprintf(fpout, "# ------------------------------------\n");
- fprintf(fpout, " BLASlib = \n");
- fprintf(fpout, " FBLASlib = \n");
-- fprintf(fpout, " FLAPACKlib = ");
-+ fprintf(fpout, " BLASlib = -L%%LOCALBASE%%/lib -lblas\n");
-+ fprintf(fpout, " FBLASlib = -L%%LOCALBASE%%/lib -lblas\n");
-+ fprintf(fpout, " FLAPACKlib = -L%%LOCALBASE%%/lib -llapack");
++ fprintf(fpout, " BLASlib = $(BLAS)\n");
++ fprintf(fpout, " FBLASlib = $(BLAS)\n");
+ fprintf(fpout, " FLAPACKlib = ");
if (flapack) fprintf(fpout, "%s", flapack);
fprintf(fpout, "\n");
fprintf(fpout, " SLAPACKlib = \n");
diff --git a/math/atlas/files/patch-CONFIG+src+atlcomp.txt b/math/atlas/files/patch-CONFIG+src+atlcomp.txt
deleted file mode 100644
index eba33bc10892..000000000000
--- a/math/atlas/files/patch-CONFIG+src+atlcomp.txt
+++ /dev/null
@@ -1,124 +0,0 @@
---- CONFIG/src/atlcomp.txt.orig 2009-02-19 03:47:37.000000000 +0900
-+++ CONFIG/src/atlcomp.txt 2009-04-13 16:46:44.000000000 +0900
-@@ -40,34 +40,34 @@
- #
- # Core2Solo and Core2Duo
- MACH=Core2Solo OS=ALL LVL=1000 COMPS=smc,dmc,skc,dkc,icc
-- 'gcc' '-fomit-frame-pointer -mfpmath=sse -msse3 -O2'
-+ '%%CC%%' '-fomit-frame-pointer -mfpmath=sse -msse3 -O2'
- # Core2 & Corei7
- MACH=Corei7 OS=ALL LVL=1000 COMPS=smc,dmc,skc,dkc,icc
-- 'gcc' '-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fno-schedule-insns2'
-+ '%%CC%%' '-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fno-schedule-insns2'
- MACH=Core2 OS=ALL LVL=1000 COMPS=smc,dmc,skc,dkc,icc
-- 'gcc' '-fomit-frame-pointer -mfpmath=sse -msse3 -O2'
-+ '%%CC%%' '-fomit-frame-pointer -mfpmath=sse -msse3 -O2'
- # PPRO,PII,PIII,P4,P4E,K7,HAMMER
- MACH=PPRO,PII,PIII,P4,P4E,K7,HAMMER OS=ALL LVL=1000 COMPS=f77
-- 'gfortran' '-fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4'
-+ '%%FC%%' '-fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4'
- MACH=PPRO,PII,PIII,P4,P4E,K7,HAMMER OS=ALL LVL=1000 COMPS=smc,dmc,skc,dkc,icc
-- 'gcc' '-fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4'
-+ '%%CC%%' '-fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4'
- # CoreSolo,CoreDuo
- MACH=CoreSolo,CoreDuo OS=ALL LVL=1000 COMPS=smc,dmc,skc,dkc,icc
-- 'gcc' '-fomit-frame-pointer -O3 -mfpmath=387'
-+ '%%CC%%' '-fomit-frame-pointer -O3 -mfpmath=387'
- # 3rd generation opteron (Barcelona and descendents)
- MACH=AMD64K10h OS=ALL LVL=1000 COMPS=f77
-- 'gfortran' '-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -falign-loops=32'
-+ '%%FC%%' '-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -falign-loops=32'
- MACH=AMD64K10h OS=ALL LVL=1000 COMPS=smc,dmc,skc,dkc,icc
-- 'gcc' '-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -falign-loops=32'
-+ '%%CC%%' '-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -falign-loops=32'
- # UltraSPARC III & IV
- MACH=USIII,USIV OS=ALL LVL=1000 COMPS=smc,dmc,skc,dkc
-- 'gcc' '-mcpu=ultrasparc3 -mtune=ultrasparc3 -O3 -funroll-all-loops'
-+ '%%CC%%' '-mcpu=ultrasparc3 -mtune=ultrasparc3 -O3 -funroll-all-loops'
- MACH=USIII,USIV OS=ALL LVL=1000 COMPS=icc,xcc
-- 'gcc' '-mcpu=ultrasparc3 -mtune=ultrasparc3 -O'
-+ '%%CC%%' '-mcpu=ultrasparc3 -mtune=ultrasparc3 -O'
- MACH=USIII,USIV OS=ALL LVL=1000 COMPS=f77
- 'f77' '-dalign -native -xO5'
- MACH=USIII,USIV OS=ALL LVL=100 COMPS=f77
-- 'gfortran' '-O -mcpu=ultrasparc3 -mtune=ultrasparc3'
-+ '%%FC%%' '-O -mcpu=ultrasparc3 -mtune=ultrasparc3'
- MACH=USIII,USIV OS=ALL LVL=10 COMPS=f77
- 'g77' '-O -mcpu=ultrasparc3 -mtune=ultrasparc3'
- #
-@@ -75,11 +75,11 @@
- #
- # These gcc 4 default flags will die on gcc3, allowing gcc3's flags to be used
- MACH=IA64Itan,IA64Itan2 OS=ALL LVL=1010 COMPS=smc,dmc,skc,dkc
-- 'gcc' '-fomit-frame-pointer -O2 -fno-tree-loop-optimize'
-+ '%%CC%%' '-fomit-frame-pointer -O2 -fno-tree-loop-optimize'
- MACH=IA64Itan,IA64Itan2 OS=ALL LVL=1000 COMPS=smc,dmc,skc,dkc
-- 'gcc' '-fomit-frame-pointer -O2'
-+ '%%CC%%' '-fomit-frame-pointer -O2'
- MACH=IA64Itan,IA64Itan2 OS=ALL LVL=1010 COMPS=f77
-- 'gfortran' '-fomit-frame-pointer -O2 -fno-tree-loop-optimize'
-+ '%%FC%%' '-fomit-frame-pointer -O2 -fno-tree-loop-optimize'
- #
- # IRIX/MIPS
- #
-@@ -93,16 +93,16 @@
- # Linux/MIPSICE9
- #
- MACH=MIPSICE9 OS=ALL LVL=1000 COMPS=icc,smc,dmc,skc,dkc,xcc
-- 'gcc' '-O2 -mips64 -march=5kf -mtune=5kf -fno-schedule-insns -fschedule-insns2 -fno-peephole -fno-peephole2'
-+ '%%CC%%' '-O2 -mips64 -march=5kf -mtune=5kf -fno-schedule-insns -fschedule-insns2 -fno-peephole -fno-peephole2'
- MACH=MIPSICE9 OS=ALL LVL=100 COMPS=f77
- 'pathf95' '-march=auto -O2'
- #
- # G4 flags
- #
- MACH=PPCG4 OS=ALL LVL=1000 COMPS=icc,smc,dmc,skc,dkc,xcc
-- 'gcc' '-O3 -maltivec -mabi=altivec -mcpu=7400 -mtune=7400'
-+ '%%CC%%' '-O3 -maltivec -mabi=altivec -mcpu=7400 -mtune=7400'
- MACH=PPCG4 OS=OSX LVL=1001 COMPS=icc,smc,dmc,skc,dkc,xcc
-- 'gcc' '-O3 -maltivec -mabi=altivec -mcpu=7400 -mtune=7400 -no-cpp-precomp -faltivec'
-+ '%%CC%%' '-O3 -maltivec -mabi=altivec -mcpu=7400 -mtune=7400 -no-cpp-precomp -faltivec'
-
- #
- # OS X / PowerPC970; the
-@@ -111,19 +111,19 @@
- # performance by removing them (for all PowerPC platforms)
- #
- MACH=PPCG5 OS=OSX LVL=1001 COMPS=icc,smc,dmc,skc,dkc,xcc
-- 'gcc' '-mpowerpc64 -maltivec -mabi=altivec -mcpu=970 -mtune=970 -faltivec -O3'
-+ '%%CC%%' '-mpowerpc64 -maltivec -mabi=altivec -mcpu=970 -mtune=970 -faltivec -O3'
- MACH=PPCG5 OS=OSX LVL=1010 COMPS=icc,smc,dmc,skc,dkc,xcc
-- 'gcc' '-mpowerpc64 -maltivec -mabi=altivec -mcpu=970 -mtune=970 -faltivec -force_cpusubtype_ALL -O3 -fno-schedule-insns -fno-rerun-loop-opt'
-+ '%%CC%%' '-mpowerpc64 -maltivec -mabi=altivec -mcpu=970 -mtune=970 -faltivec -force_cpusubtype_ALL -O3 -fno-schedule-insns -fno-rerun-loop-opt'
- MACH=PPCG5 OS=ALL LVL=1000 COMPS=icc,smc,dmc,skc,dkc,xcc
-- 'gcc' '-mpowerpc64 -maltivec -mabi=altivec -mcpu=970 -mtune=970 -O3'
-+ '%%CC%%' '-mpowerpc64 -maltivec -mabi=altivec -mcpu=970 -mtune=970 -O3'
- MACH=POWER5 OS=ALL LVL=1010 COMPS=icc,smc,dmc,skc,dkc,xcc
-- 'gcc' '-mcpu=power5 -mtune=power5 -O3 -fno-schedule-insns -fno-rerun-loop-opt'
-+ '%%CC%%' '-mcpu=power5 -mtune=power5 -O3 -fno-schedule-insns -fno-rerun-loop-opt'
- MACH=POWER5 OS=ALL LVL=1010 COMPS=f77
-- 'gfortran' '-mcpu=power5 -mtune=power5 -O3 -fno-schedule-insns -fno-rerun-loop-opt'
-+ '%%FC%%' '-mcpu=power5 -mtune=power5 -O3 -fno-schedule-insns -fno-rerun-loop-opt'
- MACH=POWER5 OS=ALL LVL=1010 COMPS=f77
- 'xlf' '-qtune=pwr5 -qarch=pwr5 -O3 -qmaxmem=-1 -qfloat=hsflt'
- MACH=POWER4 OS=ALL LVL=1010 COMPS=icc,dmc,smc,dkc,skc,xcc
-- 'gcc' '-mcpu=power4 -mtune=power4 -O3 -fno-schedule-insns -fno-rerun-loop-opt'
-+ '%%CC%%' '-mcpu=power4 -mtune=power4 -O3 -fno-schedule-insns -fno-rerun-loop-opt'
- MACH=POWER4 OS=ALL LVL=1010 COMPS=f77
- 'xlf' '-qtune=pwr4 -qarch=pwr4 -O3 -qmaxmem=-1 -qfloat=hsflt'
- #
-@@ -143,10 +143,10 @@
- # Generic defaults
- #
- MACH=ALL OS=ALL LVL=5 COMPS=icc,smc,dmc,skc,dkc,xcc
-- 'gcc' '-O -fomit-frame-pointer'
-+ '%%CC%%' '-O -fomit-frame-pointer'
- MACH=ALL OS=ALL LVL=5 COMPS=f77
-- 'gfortran' '-O'
-+ '%%FC%%' '-O'
- MACH=ALL OS=ALL LVL=4 COMPS=f77
-- 'g77' '-O'
-+ '%%FC%%' '-O'
- MACH=ALL OS=ALL LVL=0 COMPS=f77
-- 'f77' '-O'
-+ '%%FC%%' '-O'
diff --git a/math/atlas/files/patch-CONFIG+src+backend+archinfo_freebsd.c b/math/atlas/files/patch-CONFIG+src+backend+archinfo_freebsd.c
index a8f1e062dab5..b390c3540a3e 100644
--- a/math/atlas/files/patch-CONFIG+src+backend+archinfo_freebsd.c
+++ b/math/atlas/files/patch-CONFIG+src+backend+archinfo_freebsd.c
@@ -1,32 +1,50 @@
---- CONFIG/src/backend/archinfo_freebsd.c.orig Wed Jan 31 06:30:00 2007
-+++ CONFIG/src/backend/archinfo_freebsd.c Thu Feb 8 16:37:05 2007
-@@ -73,13 +73,24 @@
+--- CONFIG/src/backend/archinfo_freebsd.c.orig 2011-05-14 13:33:24.000000000 -0400
++++ CONFIG/src/backend/archinfo_freebsd.c 2011-09-20 07:05:52.000000000 -0400
+@@ -62,7 +62,7 @@
+ switch(fam)
+ {
+ case AFPPC: /* don't know */
+- if (!CmndOneLine(NULL, "sysctl hw.model", res))
++ if (!CmndOneLine(NULL, "sysctl -n hw.model", res))
+ {
+ if (strstr(res, "PowerMac"))
+ {
+@@ -97,32 +97,57 @@
+ }
}
break;
- case AFSPARC: /* don't know */
-+ if (!CmndOneLine(NULL, "sysctl hw.model", res))
-+ {
+- case AFSPARC: /* don't know */
+- break;
+- case AFALPHA:
+- #if 0
+- if (!CmndOneLine(NULL, "sysctl hw.model", res))
++ case AFSPARC: /* from src/sys/sparc64/sparc64/identcpu.c */
++ if (!CmndOneLine(NULL, "sysctl -n hw.model", res))
+ {
+- if (strstr(res, "433au")) mach = Dec21164;
+- else if (strstr(res, "XP1000")) mach = Dec21264;
+ if (strstr(res, "UltraSparc-IV")) mach = SunUSIV;
-+ if (strstr(res, "UltraSparc-II")) mach = SunUSII;
-+ if (strstr(res, "UltraSparc-I")) mach = SunUSI;
-+ if (strstr(res, "UltraSparc")) mach = SunUSI;
++ else if (strstr(res, "UltraSparc-III")) mach = SunUSIII;
++ else if (strstr(res, "UltraSparc-II")) mach = SunUSII;
+ else mach = SunUSI;
-+ }
- break;
- case AFALPHA:
- #if 0
- if (!CmndOneLine(NULL, "sysctl hw.model", res))
- {
- if (strstr(res, "433au")) mach = Dec21164;
-+ else if (strstr(res, "500au")) mach = Dec21164;
-+ else if (strstr(res, "AlphaPC 164")) mach = Dec21164;
- else if (strstr(res, "XP1000")) mach = Dec21264;
-+ else mach = Dec21264;
}
- #endif
+- #endif
+ break;
+- case AFIA64: /* don't know */
++ case AFIA64: /* from src/sys/ia64/ia64/machdep.c */
++ if (!CmndOneLine(NULL, "sysctl -n hw.model", res))
++ {
++ if (strstr(res, "Deerfield")) mach = IA64Itan2;
++ else if (strstr(res, "McKinley")) mach = IA64Itan2;
++ else if (strstr(res, "Madison")) mach = IA64Itan2;
++ else if (strstr(res, "Montecito")) mach = IA64Itan2;
++ else if (strstr(res, "Montvale")) mach = IA64Itan2;
++ else if (strstr(res, "Merced")) mach = IA64Itan;
++ }
break;
-@@ -89,15 +100,33 @@
- if (!CmndOneLine(NULL, "sysctl hw.model", res))
+ case AFX86:
+- if (!CmndOneLine(NULL, "sysctl hw.model", res))
++ if (!CmndOneLine(NULL, "sysctl -n hw.model", res))
{
if (strstr(res, "Pentium Pro")) mach = IntPPRO;
+ else if (strstr(res, "Pentium(R) D")) mach = IntP4E;
@@ -63,13 +81,57 @@
}
break;
default:;
-@@ -156,8 +185,8 @@
+@@ -135,7 +160,7 @@
+ int ncpu = 0;
+ char *reslns, res[1024];
+
+- if (!CmndOneLine(NULL, "sysctl hw.ncpu", res)) ncpu = GetLastInt(res);
++ if (!CmndOneLine(NULL, "sysctl -n hw.ncpu", res)) ncpu = GetFirstInt(res);
+ return(ncpu);
+ }
+
+@@ -169,7 +194,8 @@
+ * If uname is a known 64-bit platform, we're sure we've got OS support
+ * for 64bits (may not have compiler support, but that's not our fault)
+ */
+- if (strstr(res, "x86_64") || strstr(res, "ppc64") || strstr(res, "ia64"))
++ if (strstr(res, "amd64") || strstr(res, "ia64") ||
++ strstr(res, "powerpc64") || strstr(res, "sparc64"))
+ {
+ iret = 64;
+ *sure = 1;
+@@ -182,8 +208,10 @@
{
int mhz=0;
char res[1024];
- if (!CmndOneLine(NULL, "sysctl hw.cpufrequency", res) )
-+ if (!CmndOneLine(NULL, "sysctl machdep.tsc_freq", res) )
- mhz = GetFirstDouble(res) / 1000000;
+- mhz = GetFirstDouble(res) / 1000000;
++ if (!CmndOneLine(NULL, "sysctl -n dev.cpu.0.freq", res) )
++ mhz = GetFirstInt(res);
++ else if (!CmndOneLine(NULL, "sysctl -n hw.freq.cpu", res) )
++ mhz = GetFirstInt(res);
return(mhz);
}
+@@ -192,20 +220,7 @@
+ * RETURNS: 1 if cpu throttling is detected, 0 otherwise
+ */
+ {
+- int iret=0;
+- int imax=0, imin=0, icur=0;
+- char res[1024];
+-
+- if (!CmndOneLine(NULL, "sysctl hw.cpufrequency_max", res) )
+- imax = GetFirstInt(res);
+- if (!CmndOneLine(NULL, "sysctl hw.cpufrequency_min", res) )
+- imin = GetFirstInt(res);
+- if (imax)
+- {
+- if (imax != imin)
+- iret = 1;
+- }
+- return(iret);
++ return(0);
+ }
+
+ main(int nargs, char **args)
diff --git a/math/atlas/files/patch-CONFIG+src+backend+archinfo_x86.c b/math/atlas/files/patch-CONFIG+src+backend+archinfo_x86.c
new file mode 100644
index 000000000000..23f5948eceea
--- /dev/null
+++ b/math/atlas/files/patch-CONFIG+src+backend+archinfo_x86.c
@@ -0,0 +1,14 @@
+--- CONFIG/src/backend/archinfo_x86.c.orig 2011-05-14 13:33:24.000000000 -0400
++++ CONFIG/src/backend/archinfo_x86.c 2011-09-06 05:59:18.000000000 -0400
+@@ -309,9 +309,10 @@
+ case 0x1A:
+ case 0x1E:
+ case 0x1F:
++ case 0x25:
++ case 0x2C:
+ iret = IntCorei1;
+ break;
+- case 0x25:
+ case 0x2A:
+ iret = IntCorei2;
+ break;
diff --git a/math/atlas/files/patch-makes+Make.sysinfo b/math/atlas/files/patch-makes+Make.sysinfo
new file mode 100644
index 000000000000..51f755c68e4f
--- /dev/null
+++ b/math/atlas/files/patch-makes+Make.sysinfo
@@ -0,0 +1,11 @@
+--- makes/Make.sysinfo.orig 2011-05-14 13:33:24.000000000 -0400
++++ makes/Make.sysinfo 2011-09-03 12:30:23.000000000 -0400
+@@ -13,7 +13,7 @@
+ res/L1CacheSize:
+ $(MAKE) RunL1 MaxL1=$(MaxL1)
+ RunL1 : xL1
+- $(ATLRUN) $(SYSdir) xL1 $(MaxL1)
++ $(ATLRUN) $(SYSdir) xL1
+
+ $(INCAdir)/atlas_type.h:
+ $(MAKE) RunTyp
diff --git a/math/atlas/files/thread-patch b/math/atlas/files/thread-patch
deleted file mode 100644
index ea23f566a144..000000000000
--- a/math/atlas/files/thread-patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- CONFIG/src/SpewMakeInc.c~ Fri Feb 16 11:40:19 2007
-+++ CONFIG/src/SpewMakeInc.c Fri Feb 16 11:41:06 2007
-@@ -332,7 +332,8 @@
- &mhz, &ptrbits, &ncpu, comps, &gccflags, &outfile, &srcdir,
- &blddir, &USEDEFL1, &USEARCHDEF, &nof77, &f2cdefs, &cdefs, &pmake,
- &flapack, &smaflags, &dmaflags, &f77lib, &l2size, &targ);
-- if (ncpu > 1) THREADS = 1;
-+ /* if (ncpu > 1) THREADS = 1; */
-+ THREADS = 1;
- if (!outfile)
- fpout = stdout;
- else
diff --git a/math/atlas/files/tuning-message b/math/atlas/files/tuning-message
new file mode 100644
index 000000000000..a78973ba4bdc
--- /dev/null
+++ b/math/atlas/files/tuning-message
@@ -0,0 +1,35 @@
+
+ This port engages in a long, computationally-demanding tuning process.
+ Builds can take a day or more on older hardware, and can temporarily
+ occupy several hundred megabytes of disk space. You are advised to
+ disable all forms of power management or CPU throttling during the
+ build, and to set operating parameters to static values at which you
+ ultimately intend to use the software. You should also avoid placing
+ heavy loads on the system during the build, and temporarily disable
+ any automatons that may do so. If you fail to follow these guidelines,
+ you may prolong the build and obtain libraries with sub-optimal
+ performance.
+
+ Occasionally the auto-configuration may fail for certain platforms,
+ and you may have to override the architecture, compiler flags, assembly
+ language dialect, or pointer bit-width by issuing additional configure
+ arguments. Consult the FAQ, installation guide, and errata page at
+ the project website for help if this is necessary, and notify the
+ port maintainer. Note that in most cases the port intentionally
+ overrides user-selected compiler flags.
+
+ If your machine will be solely dedicated to building atlas during the
+ lengthy optimization process, and not subjected to other loads, you
+ may enable the more accurate wall timer (instead of the default
+ CPU-time timer) with the WALL_TIMER option.
+
+ If you want to override the architecture auto-detection, and use a
+ specific architectural default, then set WITH_ARCHDEF and define
+ ARCHDEF to be either the full path to a gzipped architectural default
+ tarball with suffix .tgz, or the basename of such a tarball in the
+ distribution CONFIG/ARCHS sub-directory. If you want to ignore all
+ architectural defaults, set WITH_ARCHDEF and define ARCHDEF=NONE.
+ Note that the use of versioned compiler names in Ports may prevent
+ the use of architectural default tarballs constructed on other systems
+ without some changes to their directory structure.
+
diff --git a/math/atlas/pkg-descr b/math/atlas/pkg-descr
index b4db288a0700..4ca7f327b9f0 100644
--- a/math/atlas/pkg-descr
+++ b/math/atlas/pkg-descr
@@ -1,24 +1,20 @@
-The ATLAS (Automatically Tuned Linear Algebra Software) project is
-an ongoing research effort focusing on applying empirical techniques
-in order to provide portable performance.
+The ATLAS (Automatically Tuned Linear Algebra Software) project is an ongoing
+research effort focusing on applying empirical techniques in order to provide
+portable performance. At present, it provides C and Fortran77 interfaces to
+a portable, efficient BLAS implementation, as well as enhanced versions of a
+few routines from LAPACK. To link with ATLAS shared libraries:
-At present, it provides C and Fortran77 interfaces to a portable,
-efficient BLAS implementation, as well as enhanced versions of
-a few routines from LAPACK.
-
-If you want to link software to ATLAS rather than the standard BLAS, simply
-use -lf77blas -latlas (order is important), or -lptf77blas -latlas for the
-threaded library (which is primarily useful on SMP machines), in place of
-the usual -lblas. Corresponding pure C versions of the ATLAS libraries are
-also included, in libcblas and libptcblas.
-
-The ATLAS-enhanced LAPACK routines are also provided.
-To link software with this library instead of the standard LAPACK, for example, use
--L/usr/local/lib/gcc-4.2.3 -L/usr/local/lib/gcc-4.2.3/gcc/i386-portbld-freebsd7.0/4.2.3 -lalapack -lf77blas -lcblas -latlas -lgfortranbegin -lgfortran -lm, or
--L/usr/local/lib/gcc-4.2.3 -L/usr/local/lib/gcc-4.2.3/gcc/i386-portbld-freebsd7.0/4.2.3 -lalapack_r -lptf77blas -lptcblas -latlas -lgfortranbegin -lgfortran
--lm for the threaded library, in place of the usual -llapack.
-Note that
--L/usr/local/lib/gcc-4.2.3 -L/usr/local/lib/gcc-4.2.3/gcc/i386-portbld-freebsd7.0/4.2.3
-depends on your environment.
+Serial (thread-safe) Fortran77 BLAS:
+ -lf77blas
+Multi-threaded Fortran77 BLAS:
+ -lptf77blas
+Serial (thread-safe) C BLAS:
+ -lcblas
+Multi-threaded C BLAS:
+ -lptcblas
+ATLAS-enhanced LAPACK, serial (thread-safe) interface:
+ -lalapack -lf77blas -lcblas
+ATLAS-enhanced LAPACK, multi-threaded interface:
+ -lalapack -lptf77blas -lptcblas
WWW: http://math-atlas.sourceforge.net/
diff --git a/math/atlas/pkg-plist b/math/atlas/pkg-plist
index 73fb82ea9e77..214b314d1c6b 100644
--- a/math/atlas/pkg-plist
+++ b/math/atlas/pkg-plist
@@ -1,50 +1,26 @@
include/cblas.h
include/clapack.h
-%%WITH_STATICLIB%%lib/libalapack.a
-lib/libalapack.so.2
-lib/libalapack.so
-%%WITH_STATICLIB%%lib/libalapack_r.a
-lib/libalapack_r.so.2
-lib/libalapack_r.so
-%%WITH_STATICLIB%%lib/libatlas.a
-lib/libatlas.so.2
-lib/libatlas.so
-%%WITH_STATICLIB%%lib/libatlas_r.a
-lib/libatlas_r.so.2
-lib/libatlas_r.so
-%%WITH_STATICLIB%%lib/libcblas.a
-lib/libcblas.so.2
-lib/libcblas.so
-%%WITH_STATICLIB%%lib/libcblas_r.a
-lib/libcblas_r.so.2
-lib/libcblas_r.so
-%%WITH_STATICLIB%%lib/libf77blas.a
-lib/libf77blas.so.2
-lib/libf77blas.so
-%%WITH_STATICLIB%%lib/libf77blas_r.a
-lib/libf77blas_r.so.2
-lib/libf77blas_r.so
-%%WITH_STATICLIB%%lib/libptcblas.a
-lib/libptcblas.so.2
-lib/libptcblas.so
-%%WITH_STATICLIB%%lib/libptf77blas.a
-lib/libptf77blas.so.2
-lib/libptf77blas.so
-%%PORTDOCS%%share/doc/atlas/AtlasCredits.txt
-%%PORTDOCS%%share/doc/atlas/BootSequence.txt
-%%PORTDOCS%%share/doc/atlas/ChangeLog
-%%PORTDOCS%%share/doc/atlas/DirStruct.txt
-%%PORTDOCS%%share/doc/atlas/INDEX.txt
-%%PORTDOCS%%share/doc/atlas/LibReadme.txt
-%%PORTDOCS%%share/doc/atlas/TestTime.txt
-%%PORTDOCS%%share/doc/atlas/TroubleShoot.txt
-%%PORTDOCS%%share/doc/atlas/Windows.txt
-%%PORTDOCS%%share/doc/atlas/atlas_contrib.pdf
-%%PORTDOCS%%share/doc/atlas/atlas_devel.pdf
-%%PORTDOCS%%share/doc/atlas/atlas_install.pdf
-%%PORTDOCS%%share/doc/atlas/atlas_over.pdf
-%%PORTDOCS%%share/doc/atlas/cblas.pdf
-%%PORTDOCS%%share/doc/atlas/cblasqref.pdf
-%%PORTDOCS%%share/doc/atlas/f77blasqref.pdf
-%%PORTDOCS%%share/doc/atlas/lapackqref.pdf
-%%PORTDOCS%%@dirrm share/doc/atlas
+%%STATIC%%lib/libalapack.a
+%%SHARED%%lib/libalapack_pic.a
+%%SHARED%%lib/libalapack.so.2
+%%SHARED%%lib/libalapack.so
+%%STATIC%%lib/libatlas.a
+%%SHARED%%lib/libatlas_pic.a
+%%SHARED%%lib/libatlas.so.2
+%%SHARED%%lib/libatlas.so
+%%STATIC%%lib/libcblas.a
+%%SHARED%%lib/libcblas_pic.a
+%%SHARED%%lib/libcblas.so.2
+%%SHARED%%lib/libcblas.so
+%%STATIC%%lib/libf77blas.a
+%%SHARED%%lib/libf77blas_pic.a
+%%SHARED%%lib/libf77blas.so.2
+%%SHARED%%lib/libf77blas.so
+%%STATIC%%lib/libptcblas.a
+%%SHARED%%lib/libptcblas_pic.a
+%%SHARED%%lib/libptcblas.so.2
+%%SHARED%%lib/libptcblas.so
+%%STATIC%%lib/libptf77blas.a
+%%SHARED%%lib/libptf77blas_pic.a
+%%SHARED%%lib/libptf77blas.so.2
+%%SHARED%%lib/libptf77blas.so