aboutsummaryrefslogtreecommitdiffstats
path: root/math/openblas
diff options
context:
space:
mode:
authormaho <maho@FreeBSD.org>2012-08-26 18:42:45 +0800
committermaho <maho@FreeBSD.org>2012-08-26 18:42:45 +0800
commit347328198a8eb51c6fc5b7b6c3e278bc2f8c3e81 (patch)
tree1b994039ba1af372cbc7382c0a12b81e93c4c55e /math/openblas
parentf51becb1e96a8be750bb729acadb87d83d1426fb (diff)
downloadfreebsd-ports-gnome-347328198a8eb51c6fc5b7b6c3e278bc2f8c3e81.tar.gz
freebsd-ports-gnome-347328198a8eb51c6fc5b7b6c3e278bc2f8c3e81.tar.zst
freebsd-ports-gnome-347328198a8eb51c6fc5b7b6c3e278bc2f8c3e81.zip
Add an math/openblas.
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. OpenBLAS is an open source project supported by Lab of Parallel Software and Computational Science, ISCAS. NOTE: If you want to specify your CPU microarchitecture manually, please use TARGET_CPU_ARCH knob, e.g., "make TARGET_CPU_ARCH=NEHALEM". This value is set TARGET build flag. WWW: https://github.com/xianyi/OpenBLAS PR: 165684 Submitted by: Eijiro Shibusawa <phd_kimberlite@yahoo.co.jp>
Diffstat (limited to 'math/openblas')
-rw-r--r--math/openblas/Makefile174
-rw-r--r--math/openblas/distinfo8
-rw-r--r--math/openblas/files/patch-Makefile84
-rw-r--r--math/openblas/files/patch-Makefile.rule15
-rw-r--r--math/openblas/files/patch-Makefile.system53
-rw-r--r--math/openblas/files/patch-c_check20
-rw-r--r--math/openblas/files/patch-cpuid_ia64.c12
-rw-r--r--math/openblas/files/patch-cpuid_sparc.c10
-rw-r--r--math/openblas/files/patch-exports+Makefile10
-rw-r--r--math/openblas/files/patch-exports+gensymbol14
-rw-r--r--math/openblas/files/patch-f_check20
-rw-r--r--math/openblas/files/patch-patch.for_lapack-3.4.0381
-rw-r--r--math/openblas/pkg-descr9
13 files changed, 810 insertions, 0 deletions
diff --git a/math/openblas/Makefile b/math/openblas/Makefile
new file mode 100644
index 000000000000..3c667e4f0746
--- /dev/null
+++ b/math/openblas/Makefile
@@ -0,0 +1,174 @@
+# New ports collection makefile for: openblas
+# Date created: 17 Feb 2012
+# Whom: Eijiro Shibusawa <ej-sib@ice.uec.ac.jp>
+#
+# $FreeBSD$
+#
+
+PORTNAME= openblas
+PORTVERSION= 0.2.2
+CATEGORIES= math
+MASTER_SITES= https://github.com/${GH_USER}/${GH_PORTNAME}/tarball/${GH_VERSION}/ \
+ NL:lapack,lapack_tmg
+MASTER_SITE_SUBDIR= lapack/:lapack lapack/timing/:lapack_tmg
+DISTFILES= ${GH_USER}-${GH_PORTNAME}-${GH_VERSION}-0-g${GH_REVISION}${EXTRACT_SUFX} \
+ lapack-${LAPACKVER}.tgz:lapack \
+ large.tgz:lapack_tmg timing.tgz:lapack_tmg
+
+MAINTAINER= phd_kimberlite@yahoo.co.jp
+COMMENT= An optimized BLAS library based on GotoBLAS2
+
+LICENSE= BSD
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+DIST_SUBDIR= openblas
+FETCH_ARGS= -pRr
+GH_USER= xianyi
+GH_PORTNAME= OpenBLAS
+GH_REVISION= 71d29fa
+GH_VERSION= v${PORTVERSION}
+LAPACKVER= 3.4.0
+LAPACK_SRCFILE= lapack-${LAPACKVER}.tgz
+LARGE_FILE= large.tgz
+TIMING_FILE= timing.tgz
+
+USE_GMAKE= yes
+USE_LDCONFIG= yes
+USE_FORTRAN= yes
+USE_PERL5_BUILD= yes
+OPENBLAS_SUFX= r${PORTVERSION}
+OPENBLAS_LIBS= libopenblas libopenblasp
+OPENBLAS_SVER= 0
+OPENBLAS_FILES= ${OPENBLAS_LIBS:S|$|.so|} ${OPENBLAS_LIBS:S|$|.so.${OPENBLAS_SVER}|} ${OPENBLAS_LIBS:S|$|.a|}
+PLIST_FILES= ${OPENBLAS_FILES:S|^|lib/|}
+
+MAKE_JOBS_SAFE= yes
+WRKSRC= ${WRKDIR}/${GH_USER}-${GH_PORTNAME}-4933d61
+
+.if defined(PACKAGE_BUILDING)
+DYNAMIC_ARCH_DEFAULT= on
+.else
+DYNAMIC_ARCH_DEFAULT= off
+.endif
+
+OPTIONS= DYNAMIC_ARCH "Support multiple CPU types on i386 and amd64" \
+ ${DYNAMIC_ARCH_DEFAULT} \
+ INTERFACE64 "Use 8 byte integers on 64-bit architectures" off \
+ OPENMP "Use OpenMP for threading" off \
+ AVX "Support Advanced Vector Extensions (AVX)" off
+
+.include <bsd.port.pre.mk>
+
+BUILDFLAGS+= NO_LAPACKE=1
+
+.if defined(TARGET_CPU_ARCH)
+BUILDFLAGS+= TARGET=${TARGET_CPU_ARCH}
+.endif
+
+MAXTHREADS?= 8
+
+.if ${ARCH:M*64} == ""
+BUILDFLAGS+= BINARY32=1
+.else
+BUILDFLAGS+= BINARY64=1
+.endif
+
+.if ! ( defined(WITH_DYNAMIC_ARCH) && ( ${ARCH} == "amd64" || ${ARCH} == "i386" ) )
+MANUAL_PACKAGE_BUILD= Optimizes for the build machine.
+.endif
+
+.if defined(WITH_DYNAMIC_ARCH)
+BUILDFLAGS+= DYNAMIC_ARCH=1
+.endif
+
+.if defined(WITH_INTERFACE64)
+BUILDFLAGS+= INTERFACE64=1
+.endif
+
+.if defined(WITH_OPENMP)
+BUILDFLAGS+= USE_OPENMP=1
+.endif
+
+.if defined(WITH_QUAD_PRECISION)
+BROKEN = WITH_QUAD_PRECISION is broken; please disable this option
+BUILDFLAGS+= QUAD_PRECISION=1
+.endif
+
+post-extract:
+ cd ${DISTDIR}/${DIST_SUBDIR} ; \
+ ${CP} ${LAPACK_SRCFILE} ${LARGE_FILE} ${TIMING_FILE} ${WRKSRC}
+ ${MKDIR} ${WRKDIR}/lib
+ ${RM} ${WRKSRC}/patch.for_lapack-3.4.0
+
+post-patch:
+ ${REINPLACE_CMD} -e "s+%%FC%%+${FC}+" -e "s+%%CC%%+${CC}+" \
+ ${WRKSRC}/Makefile.rule
+ ${REINPLACE_CMD} -e "s+%%LAPACKVER%%+${LAPACKVER}+g" \
+ ${WRKSRC}/Makefile
+ ${REINPLACE_CMD} -e "s+%%LAPACKVER%%+${LAPACKVER}+g" \
+ ${WRKSRC}/exports/gensymbol
+ ${REINPLACE_CMD} -e "s+(ARCH)+(ARCH_)+" \
+ ${WRKSRC}/Makefile.rule \
+ ${WRKSRC}/Makefile.tail \
+ ${WRKSRC}/driver/level3/Makefile \
+ ${WRKSRC}/driver/others/Makefile \
+ ${WRKSRC}/exports/Makefile \
+ ${WRKSRC}/interface/Makefile \
+ ${WRKSRC}/kernel/Makefile \
+ ${WRKSRC}/kernel/Makefile.L3 \
+ ${WRKSRC}/lapack/laswp/Makefile \
+ ${WRKSRC}/reference/Makefile
+ ${REINPLACE_CMD} -e "s+(ARCH)+(ARCH_)+" \
+ -e 's+%%LOCALBASE%%+${LOCALBASE}+' \
+ -e 's+%%_GCC_BUILD_DEPENDS%%+${_GCC_BUILD_DEPENDS}+' \
+ -e 's+$$(CROSS_SUFFIX)+${LOCALBASE}/bin/+' \
+ -e "s+%%LAPACKVER%%+${LAPACKVER}+g" \
+ ${WRKSRC}/Makefile.system
+.if defined(WITH_OPENMP)
+ ${REINPLACE_CMD} -e "s+OPENBLAS_NUM_THREADS+OMP_NUM_THREADS+g" \
+ ${WRKSRC}/test/Makefile \
+ ${WRKSRC}/ctest/Makefile
+.endif
+.if ! ( defined(WITH_AVX) )
+ ${REINPLACE_CMD} -e "s+CPUTYPE_SANDYBRIDGE+CPUTYPE_NEHALEM+g" \
+ -e "s+CORE_SANDYBRIDGE+CORE_NEHALEM+g" \
+ ${WRKSRC}/cpuid_x86.c
+.endif
+
+do-build:
+ cd ${WRKSRC} ; ${SETENV} ${BUILDFLAGS} NUM_THREADS=1 USE_THREAD=0 \
+ ${GMAKE} ${MAKE_ARGS}
+ ${CP} ${WRKSRC}/libopenblas-${OPENBLAS_SUFX}.a ${WRKDIR}/lib/libopenblas.a
+ ${CP} ${WRKSRC}/libopenblas-${OPENBLAS_SUFX}.so ${WRKDIR}/lib/libopenblas.so.${OPENBLAS_SVER}
+ cd ${WRKSRC} ; ${GMAKE} ${MAKE_ARGS} clean
+ cd ${WRKSRC} ; ${SETENV} ${BUILDFLAGS} NUM_THREADS=${MAXTHREADS} \
+ USE_THREAD=1 ${GMAKE} ${MAKE_ARGS}
+ ${CP} ${WRKSRC}/libopenblasp-${OPENBLAS_SUFX}.a ${WRKDIR}/lib/libopenblasp.a
+ ${CP} ${WRKSRC}/libopenblasp-${OPENBLAS_SUFX}.so ${WRKDIR}/lib/libopenblasp.so.${OPENBLAS_SVER}
+.if !defined(WITH_DEBUG)
+ ${LOCALBASE}/bin/strip -X ${WRKDIR}/lib/*.so.${OPENBLAS_SVER}
+.endif
+
+BENCHMARK_MAXTHREADS?= ${MAXTHREADS}
+.if defined(WITH_OPENMP)
+BENCHMARK_THREADS_FLAG = OMP_NUM_THREADS=${BENCHMARK_MAXTHREADS}
+.else
+BENCHMARK_THREADS_FLAG = OPENBLAS__NUM_THREADS=${BENCHMARK_MAXTHREADS}
+.endif
+
+benchmark: build
+ cd ${WRKSRC} ; ${SETENV} ${BUILDFLAGS} NUM_THREADS=${MAXTHREADS} \
+ USE_THREAD=1 ${GMAKE} ${MAKE_ARGS} hpl
+ cd ${WRKSRC}/benchmark ; ${SETENV} ${BUILDFLAGS} NUM_THREADS=${MAXTHREADS} \
+ USE_THREAD=1 ${BENCHMARK_THREADS_FLAG} ${GMAKE} ${MAKE_ARGS}
+
+do-install:
+ cd ${WRKDIR}/lib ; \
+ ${INSTALL_DATA} ${OPENBLAS_LIBS:S|$|.a|} ${OPENBLAS_LIBS:S|$|.so.${OPENBLAS_SVER}|} \
+ ${PREFIX}/lib/
+ cd ${PREFIX}/lib ; \
+ for i in ${OPENBLAS_LIBS:S|$|.so|}; do \
+ ${LN} -sf $$i.${OPENBLAS_SVER} $$i ; \
+ done
+
+.include <bsd.port.post.mk>
diff --git a/math/openblas/distinfo b/math/openblas/distinfo
new file mode 100644
index 000000000000..79a1393fd01f
--- /dev/null
+++ b/math/openblas/distinfo
@@ -0,0 +1,8 @@
+SHA256 (openblas/xianyi-OpenBLAS-v0.2.2-0-g71d29fa.tar.gz) = 19ffec70f9678f5c159feadc036ca47720681b782910fbaa95aa3867e7e86d8e
+SIZE (openblas/xianyi-OpenBLAS-v0.2.2-0-g71d29fa.tar.gz) = 3230868
+SHA256 (openblas/lapack-3.4.0.tgz) = a7139ef97004d0e3c4c30f1c52d508fd7ae84b5fbaf0dd8e792c167dc306c3e9
+SIZE (openblas/lapack-3.4.0.tgz) = 6127787
+SHA256 (openblas/large.tgz) = f328d88b7fa97722f271d7d0cfea1c220e0f8e5ed5ff01d8ef1eb51d6f4243a1
+SIZE (openblas/large.tgz) = 2595
+SHA256 (openblas/timing.tgz) = 999c65f8ea8bd4eac7f1c7f3463d4946917afd20a997807300fe35d70122f3af
+SIZE (openblas/timing.tgz) = 1059485
diff --git a/math/openblas/files/patch-Makefile b/math/openblas/files/patch-Makefile
new file mode 100644
index 000000000000..fd8c89d774e3
--- /dev/null
+++ b/math/openblas/files/patch-Makefile
@@ -0,0 +1,84 @@
+--- Makefile.orig 2012-07-06 23:09:12.000000000 +0900
++++ Makefile 2012-07-12 00:25:31.000000000 +0900
+@@ -34,7 +34,7 @@
+ @echo " OpenBLAS build complete."
+ @echo
+ @echo " OS ... $(OSNAME) "
+- @echo " Architecture ... $(ARCH) "
++ @echo " Architecture ... $(ARCH_) "
+ ifndef BINARY64
+ @echo " BINARY ... 32bit "
+ else
+@@ -203,7 +203,7 @@
+ netlib :
+
+ else
+-netlib : lapack-3.4.1 patch.for_lapack-3.4.1 $(NETLIB_LAPACK_DIR)/make.inc
++netlib : lapack-%%LAPACKVER%% patch.for_lapack-%%LAPACKVER%% $(NETLIB_LAPACK_DIR)/make.inc
+ ifndef NOFORTRAN
+ -@$(MAKE) -C $(NETLIB_LAPACK_DIR) lapacklib
+ endif
+@@ -212,7 +212,7 @@
+ endif
+ endif
+
+-prof_lapack : lapack-3.4.1 $(NETLIB_LAPACK_DIR)/make.inc
++prof_lapack : lapack-%%LAPACKVER%% $(NETLIB_LAPACK_DIR)/make.inc
+ -@$(MAKE) -C $(NETLIB_LAPACK_DIR) lapack_prof
+
+ $(NETLIB_LAPACK_DIR)/make.inc :
+@@ -225,7 +225,7 @@
+ -@echo "LOADOPTS = $(FFLAGS) $(EXTRALIB)" >> $(NETLIB_LAPACK_DIR)/make.inc
+ -@echo "CC = $(CC)" >> $(NETLIB_LAPACK_DIR)/make.inc
+ -@echo "CFLAGS = $(CFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc
+- -@echo "ARCH = $(AR)" >> $(NETLIB_LAPACK_DIR)/make.inc
++ -@echo "ARCH_ = $(AR)" >> $(NETLIB_LAPACK_DIR)/make.inc
+ -@echo "ARCHFLAGS = -ru" >> $(NETLIB_LAPACK_DIR)/make.inc
+ -@echo "RANLIB = $(RANLIB)" >> $(NETLIB_LAPACK_DIR)/make.inc
+ -@echo "LAPACKLIB = ../$(LIBNAME)" >> $(NETLIB_LAPACK_DIR)/make.inc
+@@ -237,24 +237,17 @@
+ -@cat make.inc >> $(NETLIB_LAPACK_DIR)/make.inc
+ endif
+
+-lapack-3.4.1 : lapack-3.4.1.tgz
++lapack-%%LAPACKVER%% : lapack-%%LAPACKVER%%.tgz
+ ifndef NOFORTRAN
+ ifndef NO_LAPACK
+- @if test `$(MD5SUM) lapack-3.4.1.tgz | $(AWK) '{print $$1}'` = 44c3869c38c8335c2b9c2a8bb276eb55; then \
+- echo $(TAR) zxf $< ;\
+- $(TAR) zxf $< && (cd $(NETLIB_LAPACK_DIR); $(PATCH) -p1 < ../patch.for_lapack-3.4.1) ;\
+- rm -f $(NETLIB_LAPACK_DIR)/lapacke/make.inc ;\
+- else \
+- rm -rf $(NETLIB_LAPACK_DIR) ;\
+- echo " Cannot download lapack-3.4.1.tgz or the MD5 check sum is wrong (Please use orignal)."; \
+- exit 1; \
+- fi
++ echo $(TAR) zxf $< ;\
++ $(TAR) zxf $< && (cd $(NETLIB_LAPACK_DIR); $(PATCH) -p1 < ../patch.for_lapack-%%LAPACKVER%%)
+ endif
+ endif
+
+-LAPACK_URL=http://www.netlib.org/lapack/lapack-3.4.1.tgz
++LAPACK_URL=http://www.netlib.org/lapack/lapack-%%LAPACKVER%%.tgz
+
+-lapack-3.4.1.tgz :
++lapack-%%LAPACKVER%%.tgz :
+ ifndef NOFORTRAN
+ #http://stackoverflow.com/questions/7656425/makefile-ifeq-logical-or
+ ifeq ($(OSNAME), $(filter $(OSNAME),Darwin NetBSD))
+@@ -278,7 +271,7 @@
+ -wget http://www.netlib.org/lapack/timing/timing.tgz
+ endif
+
+-lapack-timing : lapack-3.4.1 large.tgz timing.tgz
++lapack-timing : lapack-%%LAPACKVER%% large.tgz timing.tgz
+ ifndef NOFORTRAN
+ (cd $(NETLIB_LAPACK_DIR); $(TAR) zxf ../timing.tgz TIMING)
+ (cd $(NETLIB_LAPACK_DIR)/TIMING; $(TAR) zxf ../../large.tgz )
+@@ -316,4 +309,4 @@
+ rm -rf $(NETLIB_LAPACK_DIR) ;\
+ fi
+ @rm -f *.grd Makefile.conf_last config_last.h
+- @echo Done.
+\ No newline at end of file
++ @echo Done.
diff --git a/math/openblas/files/patch-Makefile.rule b/math/openblas/files/patch-Makefile.rule
new file mode 100644
index 000000000000..6c8eb4334307
--- /dev/null
+++ b/math/openblas/files/patch-Makefile.rule
@@ -0,0 +1,15 @@
+--- Makefile.rule.orig 2012-02-05 16:36:05.000000000 +0900
++++ Makefile.rule 2012-02-05 16:36:23.000000000 +0900
+@@ -14,10 +14,10 @@
+
+ # C compiler including binary type(32bit / 64bit). Default is gcc.
+ # Don't use Intel Compiler or PGI, it won't generate right codes as I expect.
+-# CC = gcc
++CC = %%CC%%
+
+ # Fortran compiler. Default is g77.
+-# FC = gfortran
++FC = %%FC%%
+
+ # Even you can specify cross compiler
+ # CC = x86_64-w64-mingw32-gcc
diff --git a/math/openblas/files/patch-Makefile.system b/math/openblas/files/patch-Makefile.system
new file mode 100644
index 000000000000..41cd7de396c1
--- /dev/null
+++ b/math/openblas/files/patch-Makefile.system
@@ -0,0 +1,53 @@
+--- Makefile.system.orig 2012-07-06 23:09:12.000000000 +0900
++++ Makefile.system 2012-07-12 23:03:26.000000000 +0900
+@@ -10,7 +10,7 @@
+ endif
+
+ ifndef NETLIB_LAPACK_DIR
+-NETLIB_LAPACK_DIR = $(TOPDIR)/lapack-3.4.1
++NETLIB_LAPACK_DIR = $(TOPDIR)/lapack-%%LAPACKVER%%
+ endif
+
+ # Default C compiler
+@@ -117,6 +117,8 @@
+ endif
+
+ ifeq ($(OSNAME), FreeBSD)
++EXTRALIB += -lm
++FCOMMON_OPT += -Wl,-rpath=%%LOCALBASE%%/lib/%%_GCC_BUILD_DEPENDS%%
+ MD5SUM = md5 -r
+ endif
+
+@@ -705,15 +707,6 @@
+ LIBSUFFIX = a
+ endif
+
+-ifndef DYNAMIC_ARCH
+-ifndef SMP
+-LIBNAME = $(LIBPREFIX)_$(LIBCORE)$(REVISION).$(LIBSUFFIX)
+-LIBNAME_P = $(LIBPREFIX)_$(LIBCORE)$(REVISION)_p.$(LIBSUFFIX)
+-else
+-LIBNAME = $(LIBPREFIX)_$(LIBCORE)p$(REVISION).$(LIBSUFFIX)
+-LIBNAME_P = $(LIBPREFIX)_$(LIBCORE)p$(REVISION)_p.$(LIBSUFFIX)
+-endif
+-else
+ ifndef SMP
+ LIBNAME = $(LIBPREFIX)$(REVISION).$(LIBSUFFIX)
+ LIBNAME_P = $(LIBPREFIX)$(REVISION)_p.$(LIBSUFFIX)
+@@ -721,7 +714,6 @@
+ LIBNAME = $(LIBPREFIX)p$(REVISION).$(LIBSUFFIX)
+ LIBNAME_P = $(LIBPREFIX)p$(REVISION)_p.$(LIBSUFFIX)
+ endif
+-endif
+
+
+ LIBSONAME = $(LIBNAME:.$(LIBSUFFIX)=.so)
+@@ -735,7 +727,7 @@
+ LIBS_P = $(TOPDIR)/$(LIBNAME_P)
+
+ export OSNAME
+-export ARCH
++export ARCH_
+ export CORE
+ export LIBCORE
+ export PGCPATH
diff --git a/math/openblas/files/patch-c_check b/math/openblas/files/patch-c_check
new file mode 100644
index 000000000000..b471c5682e60
--- /dev/null
+++ b/math/openblas/files/patch-c_check
@@ -0,0 +1,20 @@
+--- c_check.orig 2012-02-05 16:25:21.000000000 +0900
++++ c_check 2012-02-05 16:26:54.000000000 +0900
+@@ -2,7 +2,7 @@
+
+ # Checking cross compile
+ $hostos = `uname -s | sed -e s/\-.*//`; chop($hostos);
+-$hostarch = `uname -m | sed -e s/i.86/x86/`;chop($hostarch);
++$hostarch = `uname -m | sed -e s/i.86/x86/ | sed -e s/amd64/x86_64/`;chop($hostarch);
+
+ $binary = $ENV{"BINARY"};
+
+@@ -215,7 +215,7 @@
+ # print $data, "\n";
+
+ print MAKEFILE "OSNAME=$os\n";
+-print MAKEFILE "ARCH=$architecture\n";
++print MAKEFILE "ARCH_=$architecture\n";
+ print MAKEFILE "C_COMPILER=$compiler\n";
+ print MAKEFILE "BINARY32=\n" if $binformat ne bin32;
+ print MAKEFILE "BINARY64=\n" if $binformat ne bin64;
diff --git a/math/openblas/files/patch-cpuid_ia64.c b/math/openblas/files/patch-cpuid_ia64.c
new file mode 100644
index 000000000000..d0b46a84f2fe
--- /dev/null
+++ b/math/openblas/files/patch-cpuid_ia64.c
@@ -0,0 +1,12 @@
+--- cpuid_ia64.c.orig 2012-02-05 16:28:01.000000000 +0900
++++ cpuid_ia64.c 2012-02-05 16:28:41.000000000 +0900
+@@ -38,7 +38,9 @@
+
+ #include <stdio.h>
+ #include <string.h>
++#ifdef linux
+ #include <sys/sysinfo.h>
++#endif
+ #include "cpuid.h"
+
+ #ifdef __ECC
diff --git a/math/openblas/files/patch-cpuid_sparc.c b/math/openblas/files/patch-cpuid_sparc.c
new file mode 100644
index 000000000000..3c597dffec6b
--- /dev/null
+++ b/math/openblas/files/patch-cpuid_sparc.c
@@ -0,0 +1,10 @@
+--- cpuid_sparc.c.orig 2012-02-05 16:29:26.000000000 +0900
++++ cpuid_sparc.c 2012-02-05 16:29:45.000000000 +0900
+@@ -49,6 +49,7 @@
+ }
+
+ void get_cpuconfig(void){
++ printf("#define SPARC\n");
+ printf("#define V9\n");
+ printf("#define DTB_DEFAULT_ENTRIES 32\n");
+ }
diff --git a/math/openblas/files/patch-exports+Makefile b/math/openblas/files/patch-exports+Makefile
new file mode 100644
index 000000000000..df60f4028327
--- /dev/null
+++ b/math/openblas/files/patch-exports+Makefile
@@ -0,0 +1,10 @@
+--- exports/Makefile.orig 2012-02-05 16:32:13.000000000 +0900
++++ exports/Makefile 2012-02-05 16:33:32.000000000 +0900
+@@ -107,6 +107,7 @@
+ endif
+
+ ifeq ($(OSNAME), FreeBSD)
++EXTRALIB += -lgfortran
+
+ so : ../$(LIBSONAME)
+
diff --git a/math/openblas/files/patch-exports+gensymbol b/math/openblas/files/patch-exports+gensymbol
new file mode 100644
index 000000000000..06d7072ce8b7
--- /dev/null
+++ b/math/openblas/files/patch-exports+gensymbol
@@ -0,0 +1,14 @@
+--- exports/gensymbol.orig 2012-07-08 21:47:12.000000000 +0900
++++ exports/gensymbol 2012-07-08 21:48:26.000000000 +0900
+@@ -2666,10 +2666,7 @@
+ #LAPACKE_zlagsy_work,
+ );
+
+-if ($ARGV[5] == 1) {
+- #NO_LAPACK=1
+- @underscore_objs = (@blasobjs, @misc_underscore_objs);
+-} elsif (-d "../lapack-3.1.1" || -d "../lapack-3.4.0" || -d "../lapack-3.4.1") {
++if (-d "../lapack-%%LAPACKVER%%") {
+ @underscore_objs = (@blasobjs, @lapackobjs, @lapackobjs2, @misc_underscore_objs);
+ } else {
+ @underscore_objs = (@blasobjs, @lapackobjs, @misc_underscore_objs);
diff --git a/math/openblas/files/patch-f_check b/math/openblas/files/patch-f_check
new file mode 100644
index 000000000000..8b43700d1f5d
--- /dev/null
+++ b/math/openblas/files/patch-f_check
@@ -0,0 +1,20 @@
+--- f_check.orig 2012-02-05 16:41:59.000000000 +0900
++++ f_check 2012-02-05 16:42:41.000000000 +0900
+@@ -240,7 +240,7 @@
+
+ foreach $flags (@flags) {
+ if (
+- ($flags =~ /^\-L/)
++ ($flags =~ /^\-L\S/)
+ && ($flags !~ /^-LIST:/)
+ && ($flags !~ /^-LANG:/)
+ ) {
+@@ -263,7 +263,7 @@
+ }
+
+ if (
+- ($flags =~ /^\-l/)
++ ($flags =~ /^\-l\S/)
+ && ($flags !~ /gfortranbegin/)
+ && ($flags !~ /frtbegin/)
+ && ($flags !~ /pathfstart/)
diff --git a/math/openblas/files/patch-patch.for_lapack-3.4.0 b/math/openblas/files/patch-patch.for_lapack-3.4.0
new file mode 100644
index 000000000000..fb0f2dac5309
--- /dev/null
+++ b/math/openblas/files/patch-patch.for_lapack-3.4.0
@@ -0,0 +1,381 @@
+--- /dev/null 2012-02-01 12:00:00.000000000 +0900
++++ patch.for_lapack-3.4.0 2012-02-01 11:59:44.000000000 +0900
+@@ -0,0 +1,378 @@
++
++--- a/lapack-3.4.0/INSTALL/Makefile 2011-10-01 11:37:03.000000000 +0900
+++++ lapack-3.4.0/INSTALL/Makefile 2012-02-01 11:05:05.000000000 +0900
++@@ -27,7 +27,7 @@
++ $(LOADER) $(LOADOPTS) -o testversion ilaver.o LAPACK_version.o
++
++ clean:
++- rm -f *.o
+++ rm -f *.o test*
++ .f.o:
++ $(FORTRAN) $(OPTS) -c $< -o $@
++
++diff -ur /work/ports/va/lapack-3.4.0/Makefile lapack-3.4.0/Makefile
++--- a/lapack-3.4.0/Makefile 2011-11-12 06:08:04.000000000 +0900
+++++ lapack-3.4.0/Makefile 2012-02-01 11:05:05.000000000 +0900
++@@ -20,9 +20,12 @@
++ blaslib:
++ ( cd BLAS/SRC; $(MAKE) )
++
++-lapacklib: lapack_install
+++lapacklib:
++ ( cd SRC; $(MAKE) )
++
+++lapack_prof:
+++ ( cd SRC; $(MAKE) lapack_prof)
+++
++ variants:
++ ( cd SRC/VARIANTS ; $(MAKE))
++
++
++--- a/lapack-3.4.0/SRC/Makefile 2011-10-04 11:58:05.000000000 +0900
+++++ lapack-3.4.0/SRC/Makefile 2012-02-01 11:58:55.000000000 +0900
++@@ -54,9 +54,9 @@
++ #
++ #######################################################################
++
++-ALLAUX = ilaenv.o ieeeck.o lsamen.o xerbla.o xerbla_array.o iparmq.o \
+++ALLAUX = ilaenv.o ieeeck.o lsamen.o xerbla_array.o iparmq.o \
++ ilaprec.o ilatrans.o ilauplo.o iladiag.o chla_transtype.o \
++- ../INSTALL/ilaver.o ../INSTALL/lsame.o ../INSTALL/slamch.o
+++ ../INSTALL/ilaver.o
++
++ SCLAUX = \
++ sbdsdc.o \
++@@ -92,7 +92,7 @@
++ dlasr.o dlasrt.o dlassq.o dlasv2.o dpttrf.o dstebz.o dstedc.o \
++ dsteqr.o dsterf.o dlaisnan.o disnan.o \
++ dlartgp.o dlartgs.o \
++- ../INSTALL/dlamch.o ../INSTALL/dsecnd_$(TIMER).o
+++ ../INSTALL/dsecnd_$(TIMER).o
++
++ SLASRC = \
++ sgbbrd.o sgbcon.o sgbequ.o sgbrfs.o sgbsv.o \
++@@ -101,8 +101,8 @@
++ sgegs.o sgegv.o sgehd2.o sgehrd.o sgelq2.o sgelqf.o \
++ sgels.o sgelsd.o sgelss.o sgelsx.o sgelsy.o sgeql2.o sgeqlf.o \
++ sgeqp3.o sgeqpf.o sgeqr2.o sgeqr2p.o sgeqrf.o sgeqrfp.o sgerfs.o \
++- sgerq2.o sgerqf.o sgesc2.o sgesdd.o sgesv.o sgesvd.o sgesvx.o \
++- sgetc2.o sgetf2.o sgetri.o \
+++ sgerq2.o sgerqf.o sgesc2.o sgesdd.o sgesvd.o sgesvx.o \
+++ sgetc2.o sgetri.o \
++ sggbak.o sggbal.o sgges.o sggesx.o sggev.o sggevx.o \
++ sggglm.o sgghrd.o sgglse.o sggqrf.o \
++ sggrqf.o sggsvd.o sggsvp.o sgtcon.o sgtrfs.o sgtsv.o \
++@@ -118,16 +118,16 @@
++ slaqtr.o slar1v.o slar2v.o ilaslr.o ilaslc.o \
++ slarf.o slarfb.o slarfg.o slarfgp.o slarft.o slarfx.o slargv.o \
++ slarrv.o slartv.o \
++- slarz.o slarzb.o slarzt.o slaswp.o slasy2.o slasyf.o \
+++ slarz.o slarzb.o slarzt.o slasy2.o slasyf.o \
++ slatbs.o slatdf.o slatps.o slatrd.o slatrs.o slatrz.o slatzm.o \
++- slauu2.o slauum.o sopgtr.o sopmtr.o sorg2l.o sorg2r.o \
+++ sopgtr.o sopmtr.o sorg2l.o sorg2r.o \
++ sorgbr.o sorghr.o sorgl2.o sorglq.o sorgql.o sorgqr.o sorgr2.o \
++ sorgrq.o sorgtr.o sorm2l.o sorm2r.o \
++ sormbr.o sormhr.o sorml2.o sormlq.o sormql.o sormqr.o sormr2.o \
++ sormr3.o sormrq.o sormrz.o sormtr.o spbcon.o spbequ.o spbrfs.o \
++ spbstf.o spbsv.o spbsvx.o \
++ spbtf2.o spbtrf.o spbtrs.o spocon.o spoequ.o sporfs.o sposv.o \
++- sposvx.o spotf2.o spotri.o spstrf.o spstf2.o \
+++ sposvx.o spstrf.o spstf2.o \
++ sppcon.o sppequ.o \
++ spprfs.o sppsv.o sppsvx.o spptrf.o spptri.o spptrs.o sptcon.o \
++ spteqr.o sptrfs.o sptsv.o sptsvx.o spttrs.o sptts2.o srscl.o \
++@@ -143,7 +143,7 @@
++ stgsja.o stgsna.o stgsy2.o stgsyl.o stpcon.o stprfs.o stptri.o \
++ stptrs.o \
++ strcon.o strevc.o strexc.o strrfs.o strsen.o strsna.o strsyl.o \
++- strti2.o strtri.o strtrs.o stzrqf.o stzrzf.o sstemr.o \
+++ strtrs.o stzrqf.o stzrzf.o sstemr.o \
++ slansf.o spftrf.o spftri.o spftrs.o ssfrk.o stfsm.o stftri.o stfttp.o \
++ stfttr.o stpttf.o stpttr.o strttf.o strttp.o \
++ sgejsv.o sgesvj.o sgsvj0.o sgsvj1.o \
++@@ -152,7 +152,7 @@
++ sgeqrt.o sgeqrt2.o sgeqrt3.o sgemqrt.o \
++ stpqrt.o stpqrt2.o stpmqrt.o stprfb.o
++
++-DSLASRC = spotrs.o sgetrs.o spotrf.o sgetrf.o
+++DSLASRC = spotrs.o
++
++ ifdef USEXBLAS
++ SXLASRC = sgesvxx.o sgerfsx.o sla_gerfsx_extended.o sla_geamv.o \
++@@ -171,8 +171,8 @@
++ cgegs.o cgegv.o cgehd2.o cgehrd.o cgelq2.o cgelqf.o \
++ cgels.o cgelsd.o cgelss.o cgelsx.o cgelsy.o cgeql2.o cgeqlf.o cgeqp3.o \
++ cgeqpf.o cgeqr2.o cgeqr2p.o cgeqrf.o cgeqrfp.o cgerfs.o \
++- cgerq2.o cgerqf.o cgesc2.o cgesdd.o cgesv.o cgesvd.o \
++- cgesvx.o cgetc2.o cgetf2.o cgetri.o \
+++ cgerq2.o cgerqf.o cgesc2.o cgesdd.o cgesvd.o \
+++ cgesvx.o cgetc2.o cgetri.o \
++ cggbak.o cggbal.o cgges.o cggesx.o cggev.o cggevx.o cggglm.o \
++ cgghrd.o cgglse.o cggqrf.o cggrqf.o \
++ cggsvd.o cggsvp.o \
++@@ -200,21 +200,21 @@
++ clarf.o clarfb.o clarfg.o clarft.o clarfgp.o \
++ clarfx.o clargv.o clarnv.o clarrv.o clartg.o clartv.o \
++ clarz.o clarzb.o clarzt.o clascl.o claset.o clasr.o classq.o \
++- claswp.o clasyf.o clatbs.o clatdf.o clatps.o clatrd.o clatrs.o clatrz.o \
++- clatzm.o clauu2.o clauum.o cpbcon.o cpbequ.o cpbrfs.o cpbstf.o cpbsv.o \
+++ clasyf.o clatbs.o clatdf.o clatps.o clatrd.o clatrs.o clatrz.o \
+++ clatzm.o cpbcon.o cpbequ.o cpbrfs.o cpbstf.o cpbsv.o \
++ cpbsvx.o cpbtf2.o cpbtrf.o cpbtrs.o cpocon.o cpoequ.o cporfs.o \
++- cposv.o cposvx.o cpotf2.o cpotri.o cpstrf.o cpstf2.o \
+++ cposv.o cposvx.o cpstrf.o cpstf2.o \
++ cppcon.o cppequ.o cpprfs.o cppsv.o cppsvx.o cpptrf.o cpptri.o cpptrs.o \
++ cptcon.o cpteqr.o cptrfs.o cptsv.o cptsvx.o cpttrf.o cpttrs.o cptts2.o \
++- crot.o cspcon.o cspmv.o cspr.o csprfs.o cspsv.o \
+++ crot.o cspcon.o csprfs.o cspsv.o \
++ cspsvx.o csptrf.o csptri.o csptrs.o csrscl.o cstedc.o \
++- cstegr.o cstein.o csteqr.o csycon.o csymv.o \
++- csyr.o csyrfs.o csysv.o csysvx.o csytf2.o csytrf.o csytri.o csytri2.o csytri2x.o \
+++ cstegr.o cstein.o csteqr.o csycon.o \
+++ csyrfs.o csysv.o csysvx.o csytf2.o csytrf.o csytri.o csytri2.o csytri2x.o \
++ csyswapr.o csytrs.o csytrs2.o csyconv.o ctbcon.o ctbrfs.o ctbtrs.o ctgevc.o ctgex2.o \
++ ctgexc.o ctgsen.o ctgsja.o ctgsna.o ctgsy2.o ctgsyl.o ctpcon.o \
++ ctprfs.o ctptri.o \
++ ctptrs.o ctrcon.o ctrevc.o ctrexc.o ctrrfs.o ctrsen.o ctrsna.o \
++- ctrsyl.o ctrti2.o ctrtri.o ctrtrs.o ctzrqf.o ctzrzf.o cung2l.o cung2r.o \
+++ ctrsyl.o ctrtrs.o ctzrqf.o ctzrzf.o cung2l.o cung2r.o \
++ cungbr.o cunghr.o cungl2.o cunglq.o cungql.o cungqr.o cungr2.o \
++ cungrq.o cungtr.o cunm2l.o cunm2r.o cunmbr.o cunmhr.o cunml2.o \
++ cunmlq.o cunmql.o cunmqr.o cunmr2.o cunmr3.o cunmrq.o cunmrz.o \
++@@ -240,7 +240,7 @@
++ cla_lin_berr.o clarscl2.o clascl2.o cla_wwaddw.o
++ endif
++
++-ZCLASRC = cpotrs.o cgetrs.o cpotrf.o cgetrf.o
+++ZCLASRC = cpotrs.o
++
++ DLASRC = \
++ dgbbrd.o dgbcon.o dgbequ.o dgbrfs.o dgbsv.o \
++@@ -249,9 +249,9 @@
++ dgegs.o dgegv.o dgehd2.o dgehrd.o dgelq2.o dgelqf.o \
++ dgels.o dgelsd.o dgelss.o dgelsx.o dgelsy.o dgeql2.o dgeqlf.o \
++ dgeqp3.o dgeqpf.o dgeqr2.o dgeqr2p.o dgeqrf.o dgeqrfp.o dgerfs.o \
++- dgerq2.o dgerqf.o dgesc2.o dgesdd.o dgesv.o dgesvd.o dgesvx.o \
++- dgetc2.o dgetf2.o dgetrf.o dgetri.o \
++- dgetrs.o dggbak.o dggbal.o dgges.o dggesx.o dggev.o dggevx.o \
+++ dgerq2.o dgerqf.o dgesc2.o dgesdd.o dgesvd.o dgesvx.o \
+++ dgetc2.o dgetri.o \
+++ dggbak.o dggbal.o dgges.o dggesx.o dggev.o dggevx.o \
++ dggglm.o dgghrd.o dgglse.o dggqrf.o \
++ dggrqf.o dggsvd.o dggsvp.o dgtcon.o dgtrfs.o dgtsv.o \
++ dgtsvx.o dgttrf.o dgttrs.o dgtts2.o dhgeqz.o \
++@@ -266,16 +266,16 @@
++ dlaqtr.o dlar1v.o dlar2v.o iladlr.o iladlc.o \
++ dlarf.o dlarfb.o dlarfg.o dlarfgp.o dlarft.o dlarfx.o \
++ dlargv.o dlarrv.o dlartv.o \
++- dlarz.o dlarzb.o dlarzt.o dlaswp.o dlasy2.o dlasyf.o \
++- dlatbs.o dlatdf.o dlatps.o dlatrd.o dlatrs.o dlatrz.o dlatzm.o dlauu2.o \
++- dlauum.o dopgtr.o dopmtr.o dorg2l.o dorg2r.o \
+++ dlarz.o dlarzb.o dlarzt.o dlasy2.o dlasyf.o \
+++ dlatbs.o dlatdf.o dlatps.o dlatrd.o dlatrs.o dlatrz.o dlatzm.o \
+++ dopgtr.o dopmtr.o dorg2l.o dorg2r.o \
++ dorgbr.o dorghr.o dorgl2.o dorglq.o dorgql.o dorgqr.o dorgr2.o \
++ dorgrq.o dorgtr.o dorm2l.o dorm2r.o \
++ dormbr.o dormhr.o dorml2.o dormlq.o dormql.o dormqr.o dormr2.o \
++ dormr3.o dormrq.o dormrz.o dormtr.o dpbcon.o dpbequ.o dpbrfs.o \
++ dpbstf.o dpbsv.o dpbsvx.o \
++ dpbtf2.o dpbtrf.o dpbtrs.o dpocon.o dpoequ.o dporfs.o dposv.o \
++- dposvx.o dpotf2.o dpotrf.o dpotri.o dpotrs.o dpstrf.o dpstf2.o \
+++ dposvx.o dpotrs.o dpstrf.o dpstf2.o \
++ dppcon.o dppequ.o \
++ dpprfs.o dppsv.o dppsvx.o dpptrf.o dpptri.o dpptrs.o dptcon.o \
++ dpteqr.o dptrfs.o dptsv.o dptsvx.o dpttrs.o dptts2.o drscl.o \
++@@ -292,7 +292,7 @@
++ dtgsja.o dtgsna.o dtgsy2.o dtgsyl.o dtpcon.o dtprfs.o dtptri.o \
++ dtptrs.o \
++ dtrcon.o dtrevc.o dtrexc.o dtrrfs.o dtrsen.o dtrsna.o dtrsyl.o \
++- dtrti2.o dtrtri.o dtrtrs.o dtzrqf.o dtzrzf.o dstemr.o \
+++ dtrtrs.o dtzrqf.o dtzrzf.o dstemr.o \
++ dsgesv.o dsposv.o dlag2s.o slag2d.o dlat2s.o \
++ dlansf.o dpftrf.o dpftri.o dpftrs.o dsfrk.o dtfsm.o dtftri.o dtfttp.o \
++ dtfttr.o dtpttf.o dtpttr.o dtrttf.o dtrttp.o \
++@@ -319,8 +319,8 @@
++ zgegs.o zgegv.o zgehd2.o zgehrd.o zgelq2.o zgelqf.o \
++ zgels.o zgelsd.o zgelss.o zgelsx.o zgelsy.o zgeql2.o zgeqlf.o zgeqp3.o \
++ zgeqpf.o zgeqr2.o zgeqr2p.o zgeqrf.o zgeqrfp.o zgerfs.o zgerq2.o zgerqf.o \
++- zgesc2.o zgesdd.o zgesv.o zgesvd.o zgesvx.o zgetc2.o zgetf2.o zgetrf.o \
++- zgetri.o zgetrs.o \
+++ zgesc2.o zgesdd.o zgesvd.o zgesvx.o zgetc2.o \
+++ zgetri.o \
++ zggbak.o zggbal.o zgges.o zggesx.o zggev.o zggevx.o zggglm.o \
++ zgghrd.o zgglse.o zggqrf.o zggrqf.o \
++ zggsvd.o zggsvp.o \
++@@ -350,22 +350,22 @@
++ zlarfg.o zlarft.o zlarfgp.o \
++ zlarfx.o zlargv.o zlarnv.o zlarrv.o zlartg.o zlartv.o \
++ zlarz.o zlarzb.o zlarzt.o zlascl.o zlaset.o zlasr.o \
++- zlassq.o zlaswp.o zlasyf.o \
++- zlatbs.o zlatdf.o zlatps.o zlatrd.o zlatrs.o zlatrz.o zlatzm.o zlauu2.o \
++- zlauum.o zpbcon.o zpbequ.o zpbrfs.o zpbstf.o zpbsv.o \
+++ zlassq.o zlasyf.o \
+++ zlatbs.o zlatdf.o zlatps.o zlatrd.o zlatrs.o zlatrz.o zlatzm.o \
+++ zpbcon.o zpbequ.o zpbrfs.o zpbstf.o zpbsv.o \
++ zpbsvx.o zpbtf2.o zpbtrf.o zpbtrs.o zpocon.o zpoequ.o zporfs.o \
++- zposv.o zposvx.o zpotf2.o zpotrf.o zpotri.o zpotrs.o zpstrf.o zpstf2.o \
+++ zposv.o zposvx.o zpotrs.o zpstrf.o zpstf2.o \
++ zppcon.o zppequ.o zpprfs.o zppsv.o zppsvx.o zpptrf.o zpptri.o zpptrs.o \
++ zptcon.o zpteqr.o zptrfs.o zptsv.o zptsvx.o zpttrf.o zpttrs.o zptts2.o \
++- zrot.o zspcon.o zspmv.o zspr.o zsprfs.o zspsv.o \
+++ zrot.o zspcon.o zsprfs.o zspsv.o \
++ zspsvx.o zsptrf.o zsptri.o zsptrs.o zdrscl.o zstedc.o \
++- zstegr.o zstein.o zsteqr.o zsycon.o zsymv.o \
++- zsyr.o zsyrfs.o zsysv.o zsysvx.o zsytf2.o zsytrf.o zsytri.o zsytri2.o zsytri2x.o \
+++ zstegr.o zstein.o zsteqr.o zsycon.o \
+++ zsyrfs.o zsysv.o zsysvx.o zsytf2.o zsytrf.o zsytri.o zsytri2.o zsytri2x.o \
++ zsyswapr.o zsytrs.o zsytrs2.o zsyconv.o ztbcon.o ztbrfs.o ztbtrs.o ztgevc.o ztgex2.o \
++ ztgexc.o ztgsen.o ztgsja.o ztgsna.o ztgsy2.o ztgsyl.o ztpcon.o \
++ ztprfs.o ztptri.o \
++ ztptrs.o ztrcon.o ztrevc.o ztrexc.o ztrrfs.o ztrsen.o ztrsna.o \
++- ztrsyl.o ztrti2.o ztrtri.o ztrtrs.o ztzrqf.o ztzrzf.o zung2l.o \
+++ ztrsyl.o ztrtrs.o ztzrqf.o ztzrzf.o zung2l.o \
++ zung2r.o zungbr.o zunghr.o zungl2.o zunglq.o zungql.o zungqr.o zungr2.o \
++ zungrq.o zungtr.o zunm2l.o zunm2r.o zunmbr.o zunmhr.o zunml2.o \
++ zunmlq.o zunmql.o zunmqr.o zunmr2.o zunmr3.o zunmrq.o zunmrz.o \
++@@ -393,34 +393,46 @@
++
++ ALLOBJ = $(SLASRC) $(DLASRC) $(DSLASRC) $(CLASRC) $(ZLASRC) $(ZCLASRC) \
++ $(SCLAUX) $(DZLAUX) $(ALLAUX)
+++
+++ALLOBJ_P = $(ALLOBJ:.$(SUFFIX)=.$(PSUFFIX))
+++
+++
++
++ ifdef USEXBLAS
++ ALLXOBJ = $(SXLASRC) $(DXLASRC) $(CXLASRC) $(ZXLASRC)
++ endif
++
++ all: ../$(LAPACKLIB)
+++
+++lapack_prof: ../$(LAPACKLIB_P)
+++
+++
++
++ ../$(LAPACKLIB): $(ALLOBJ) $(ALLXOBJ)
++- $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ) $(ALLXOBJ)
+++ $(ARCH_) $(ARCHFLAGS) $@ $(ALLOBJ) $(ALLXOBJ)
+++ $(RANLIB) $@
+++
+++../$(LAPACKLIB_P): $(ALLOBJ_P)
+++ $(ARCH_) $(ARCHFLAGS) $@ $(ALLOBJ_P)
++ $(RANLIB) $@
++
++ single: $(SLASRC) $(DSLASRC) $(SXLASRC) $(SCLAUX) $(ALLAUX)
++- $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(SLASRC) $(DSLASRC) \
+++ $(ARCH_) $(ARCHFLAGS) ../$(LAPACKLIB) $(SLASRC) $(DSLASRC) \
++ $(SXLASRC) $(SCLAUX) $(ALLAUX) $(ALLXAUX)
++ $(RANLIB) ../$(LAPACKLIB)
++
++ complex: $(CLASRC) $(ZCLASRC) $(CXLASRC) $(SCLAUX) $(ALLAUX)
++- $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(CLASRC) $(ZCLASRC) \
+++ $(ARCH_) $(ARCHFLAGS) ../$(LAPACKLIB) $(CLASRC) $(ZCLASRC) \
++ $(CXLASRC) $(SCLAUX) $(ALLAUX) $(ALLXAUX)
++ $(RANLIB) ../$(LAPACKLIB)
++
++ double: $(DLASRC) $(DSLASRC) $(DXLASRC) $(DZLAUX) $(ALLAUX)
++- $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(DLASRC) $(DSLASRC) \
+++ $(ARCH_) $(ARCHFLAGS) ../$(LAPACKLIB) $(DLASRC) $(DSLASRC) \
++ $(DXLASRC) $(DZLAUX) $(ALLAUX) $(ALLXAUX)
++ $(RANLIB) ../$(LAPACKLIB)
++
++ complex16: $(ZLASRC) $(ZCLASRC) $(ZXLASRC) $(DZLAUX) $(ALLAUX)
++- $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(ZLASRC) $(ZCLASRC) \
+++ $(ARCH_) $(ARCHFLAGS) ../$(LAPACKLIB) $(ZLASRC) $(ZCLASRC) \
++ $(ZXLASRC) $(DZLAUX) $(ALLAUX) $(ALLXAUX)
++ $(RANLIB) ../$(LAPACKLIB)
++
++@@ -444,13 +456,20 @@
++ @FRC=$(FRC)
++
++ clean:
++- rm -f *.o
+++ rm -f *.o *.$(PSUFFIX)
++
++-.f.o:
+++%.o: %.f
++ $(FORTRAN) $(OPTS) -c $< -o $@
++
+++%.$(PSUFFIX): %.f
+++ $(FORTRAN) $(POPTS) -c $< -o $@
+++
++ slaruv.o: slaruv.f ; $(FORTRAN) $(NOOPT) -c $< -o $@
++ dlaruv.o: dlaruv.f ; $(FORTRAN) $(NOOPT) -c $< -o $@
+++
+++slaruv.$(PSUFFIX): slaruv.f ; $(FORTRAN) $(PNOOPT) -c $< -o $@
+++dlaruv.$(PSUFFIX): dlaruv.f ; $(FORTRAN) $(PNOOPT) -c $< -o $@
+++
++ sla_wwaddw.o: sla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@
++ dla_wwaddw.o: dla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@
++ cla_wwaddw.o: cla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c $< -o $@
++
++--- a/lapack-3.4.0/TESTING/EIG/Makefile 2011-09-27 06:52:31.000000000 +0900
+++++ lapack-3.4.0/TESTING/EIG/Makefile 2012-02-01 11:05:05.000000000 +0900
++@@ -129,22 +129,22 @@
++ ../xeigtsts: $(SEIGTST) $(SCIGTST) $(AEIGTST) ../../$(LAPACKLIB); \
++ $(LOADER) $(LOADOPTS) -o xeigtsts \
++ $(SEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) \
++- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtsts $@
+++ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) && mv xeigtsts $@
++
++ ../xeigtstc: $(CEIGTST) $(SCIGTST) $(AEIGTST) ../../$(LAPACKLIB); \
++ $(LOADER) $(LOADOPTS) -o xeigtstc \
++ $(CEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) \
++- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtstc $@
+++ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) && mv xeigtstc $@
++
++ ../xeigtstd: $(DEIGTST) $(DZIGTST) $(AEIGTST) ../../$(LAPACKLIB); \
++ $(LOADER) $(LOADOPTS) -o xeigtstd \
++ $(DEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) \
++- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtstd $@
+++ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) && mv xeigtstd $@
++
++ ../xeigtstz: $(ZEIGTST) $(DZIGTST) $(AEIGTST) ../../$(LAPACKLIB); \
++ $(LOADER) $(LOADOPTS) -o xeigtstz \
++ $(ZEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) \
++- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtstz $@
+++ ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) && mv xeigtstz $@
++
++ $(AEIGTST): $(FRC)
++ $(SCIGTST): $(FRC)
++
++--- a/lapack-3.4.0/TESTING/LIN/Makefile 2011-11-01 07:21:11.000000000 +0900
+++++ lapack-3.4.0/TESTING/LIN/Makefile 2012-02-01 11:05:05.000000000 +0900
++@@ -243,27 +243,27 @@
++
++ xlintsts : $(ALINTST) $(SLINTST) $(SCLNTST) ../../$(LAPACKLIB)
++ $(LOADER) $(LOADOPTS) $(ALINTST) $(SCLNTST) $(SLINTST) \
++- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@
+++ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) $(CEXTRALIB) -o $@
++
++ xlintstc : $(ALINTST) $(CLINTST) $(SCLNTST) ../../$(LAPACKLIB)
++ $(LOADER) $(LOADOPTS) $(ALINTST) $(SCLNTST) $(CLINTST) \
++- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@
+++ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) $(CEXTRALIB) -o $@
++
++ xlintstd : $(ALINTST) $(DLINTST) $(DZLNTST) ../../$(LAPACKLIB)
++ $(LOADER) $(LOADOPTS) $^ \
++- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@
+++ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) $(CEXTRALIB) -o $@
++
++ xlintstz : $(ALINTST) $(ZLINTST) $(DZLNTST) ../../$(LAPACKLIB)
++ $(LOADER) $(LOADOPTS) $(ALINTST) $(DZLNTST) $(ZLINTST) \
++- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@
+++ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) $(CEXTRALIB) -o $@
++
++ xlintstds : $(DSLINTST) ../../$(LAPACKLIB)
++ $(LOADER) $(LOADOPTS) $(DSLINTST) \
++- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@
+++ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) -o $@
++
++ xlintstzc : $(ZCLINTST) ../../$(LAPACKLIB)
++ $(LOADER) $(LOADOPTS) $(ZCLINTST) \
++- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@
+++ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) $(CEXTRALIB) -o $@
++
++ xlintstrfs : $(SLINTSTRFP) ../../$(LAPACKLIB)
++ $(LOADER) $(LOADOPTS) $(SLINTSTRFP) \
diff --git a/math/openblas/pkg-descr b/math/openblas/pkg-descr
new file mode 100644
index 000000000000..65a0eee4d4de
--- /dev/null
+++ b/math/openblas/pkg-descr
@@ -0,0 +1,9 @@
+OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
+OpenBLAS is an open source project supported by
+Lab of Parallel Software and Computational Science, ISCAS.
+
+NOTE: If you want to specify your CPU microarchitecture manually,
+please use TARGET_CPU_ARCH knob, e.g., "make TARGET_CPU_ARCH=NEHALEM".
+This value is set TARGET build flag.
+
+WWW: https://github.com/xianyi/OpenBLAS