diff options
author | Maho Nakata <maho@FreeBSD.org> | 2007-02-06 00:43:02 +0000 |
---|---|---|
committer | Maho Nakata <maho@FreeBSD.org> | 2007-02-06 00:43:02 +0000 |
commit | 93f79f9f520c028c937ba49470fbc967f2cb3550 (patch) | |
tree | 00ca01d339185262eda0cdbe2dd5c968f54e02e9 /math/gotoblas | |
parent | 6761fe7fe7cc1c05b3d564f635dcbe44700f0e5c (diff) | |
download | ports-93f79f9f520c028c937ba49470fbc967f2cb3550.tar.gz ports-93f79f9f520c028c937ba49470fbc967f2cb3550.zip |
Notes
Diffstat (limited to 'math/gotoblas')
-rw-r--r-- | math/gotoblas/Makefile | 120 | ||||
-rw-r--r-- | math/gotoblas/distinfo | 3 | ||||
-rw-r--r-- | math/gotoblas/files/patch-Makefile.rule | 102 | ||||
-rw-r--r-- | math/gotoblas/files/patch-export-Makefile | 11 | ||||
-rw-r--r-- | math/gotoblas/files/patch-level1-asum-Makefile | 11 | ||||
-rw-r--r-- | math/gotoblas/files/patch-level1-others-Makefile | 20 | ||||
-rw-r--r-- | math/gotoblas/files/patch-level3-Makefile | 11 | ||||
-rw-r--r-- | math/gotoblas/files/patch-x86_64-zdot.S | 21 | ||||
-rw-r--r-- | math/gotoblas/pkg-descr | 5 |
9 files changed, 304 insertions, 0 deletions
diff --git a/math/gotoblas/Makefile b/math/gotoblas/Makefile new file mode 100644 index 000000000000..4cc47f5897c5 --- /dev/null +++ b/math/gotoblas/Makefile @@ -0,0 +1,120 @@ +# Ports collection makefile for: gotoblas +# Date created: 20070203 +# Whom: Sato Hiroki <hrs@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= gotoblas +PORTVERSION= 1.10 +CATEGORIES= math +MASTER_SITES= #empty +DISTNAME= GotoBLAS-${PORTVERSION} + +MAINTAINER= maho@FreeBSD.org +COMMENT= The fastest implementation of the Basic Linear Algebra Subroutines + +USE_GMAKE= yes +USE_LDCONFIG= yes +RESTRICTED= Redistribution not permitted +WRKSRC= ${WRKDIR}/GotoBLAS +PLIST_FILES= lib/libgoto.a \ + lib/libgoto.so \ + lib/libgoto.so.1 \ + lib/libgotop.a \ + lib/libgotop.so \ + lib/libgotop.so.1 + +.include <bsd.port.pre.mk> + +WANT_FORTRAN= yes #dummy but future use +BUILD_DEPENDS+= gfortran42:${PORTSDIR}/lang/gcc42 +FC= gfortran42 +F77= gfortran42 + +.if ${ARCH} == "amd64" || ${ARCH} == "alpha" || ${ARCH} == "sparc64" || ${ARCH} == "ia64" +MAKE_FLAGS+= BINARY64=1 +.else +MAKE_FLAGS+= BINARY32=1 +.endif + +.if defined(WITH_INTERFACE64) +MAKE_FLAGS+= INTERFACE64=1 +.endif + +.if defined(WITH_G77) +MAKE_FLAGS+= F_COMPILER=GFORTRAN +.elif defined(WITH_G77) +MAKE_FLAGS+= F_COMPILER=G77 +.elif defined(WITH_G95) +MAKE_FLAGS+= F_COMPILER=G95 +.elif defined(WITH_IFORT) +MAKE_FLAGS+= F_COMPILER=INTEL +.elif defined(WITH_PGF77) +MAKE_FLAGS+= F_COMPILER=PGI +.elif defined(WITH_PATHF90) +MAKE_FLAGS+= F_COMPILER=PATHF90 +.elif defined(WITH_XLF) +MAKE_FLAGS+= F_COMPILER=IBM +.endif + +MAKE_FLAGS_SMP= PTHREAD_LIBS="${PTHREAD_LIBS}" \ + PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" + +pre-everything:: + @${ECHO_CMD} "****" + @${ECHO_CMD} "You can choose FORTRAN compiler" \ + "by using the following knobs:" + @${ECHO_CMD} " WITH_GFORTRAN=yes (gfortran; default)" + @${ECHO_CMD} " WITH_G77=yes (g77)" + @${ECHO_CMD} " WITH_G95=yes (g95)" + @${ECHO_CMD} " WITH_IFORT=yes (ifort)" + @${ECHO_CMD} " WITH_PGF77=yes (pgf77)" + @${ECHO_CMD} " WITH_PATHF90=yes (pathf90)" + @${ECHO_CMD} " WITH_XLF=yes (xlf)" + @${ECHO_CMD} " WITH_INTERFACE64=yes (for using 64-bit integer interface)" + @${ECHO_CMD} "- Note that if the specified compiler does not exist" \ + "on your system, build will fail." + @${ECHO_CMD} "- None is specified, gfortran will be used." + @${ECHO_CMD} "****" + +.if !exists(${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}${EXTRACT_SUFX}) +do-fetch: + @${ECHO_CMD} "You need to fetch ${DISTFILES} from:" + @${ECHO_CMD} "http://www.tacc.utexas.edu/resources/software/software.php" + @${ECHO_CMD} "and put it to ${DISTDIR}." +.endif + +#Honor F77 and CC, but this makes Makefile.rule bit dirtier +pre-build: + @${REINPLACE_CMD} -e "s+%%F77%%+${F77}+" -e "s+%%CC%%+${CC}+" ${WRKSRC}/Makefile.rule + +do-build: + ${MKDIR} ${WRKDIR}/lib + cd ${WRKSRC} && \ + ${GMAKE} ${MAKE_FLAGS} + cd ${WRKSRC}/exports \ + && ${GMAKE} ${MAKE_FLAGS} so + ${INSTALL_DATA} ${WRKSRC}/libgoto-r${PORTVERSION}.a \ + ${WRKDIR}/lib/libgoto.a + ${INSTALL_DATA} ${WRKSRC}/libgoto-r${PORTVERSION}.so \ + ${WRKDIR}/lib/libgoto.so.1 + cd ${WRKSRC} && ${GMAKE} clean + cd ${WRKSRC} && \ + ${GMAKE} ${MAKE_FLAGS_SMP} ${MAKE_FLAGS} SMP=1 + cd ${WRKSRC}/exports && \ + ${GMAKE} ${MAKE_FLAGS_SMP} ${MAKE_FLAGS} SMP=1 so + ${INSTALL_DATA} ${WRKSRC}/libgotop-r${PORTVERSION}.a \ + ${WRKDIR}/lib/libgotop.a + ${INSTALL_DATA} ${WRKSRC}/libgotop-r${PORTVERSION}.so \ + ${WRKDIR}/lib/libgotop.so.1 + +do-install: + ${INSTALL_DATA} ${WRKDIR}/lib/libgoto.a ${PREFIX}/lib/libgoto.a + ${INSTALL_DATA} ${WRKDIR}/lib/libgoto.so.1 ${PREFIX}/lib/libgoto.so.1 + ${INSTALL_DATA} ${WRKDIR}/lib/libgotop.a ${PREFIX}/lib/libgotop.a + ${INSTALL_DATA} ${WRKDIR}/lib/libgotop.so.1 ${PREFIX}/lib/libgotop.so.1 + cd ${PREFIX}/lib && ${LN} -s -f libgoto.so.1 libgoto.so + cd ${PREFIX}/lib && ${LN} -s -f libgotop.so.1 libgotop.so + +.include <bsd.port.post.mk> diff --git a/math/gotoblas/distinfo b/math/gotoblas/distinfo new file mode 100644 index 000000000000..ebd2b5f5f2c4 --- /dev/null +++ b/math/gotoblas/distinfo @@ -0,0 +1,3 @@ +MD5 (GotoBLAS-1.10.tar.gz) = acc4b8a3ac4377acf49b2d209f8749b0 +SHA256 (GotoBLAS-1.10.tar.gz) = 99c644bb3fa6be0557c3754b97968d544114746cffdd17042e9113c46176334f +SIZE (GotoBLAS-1.10.tar.gz) = 1583396 diff --git a/math/gotoblas/files/patch-Makefile.rule b/math/gotoblas/files/patch-Makefile.rule new file mode 100644 index 000000000000..14492e17962d --- /dev/null +++ b/math/gotoblas/files/patch-Makefile.rule @@ -0,0 +1,102 @@ +--- Makefile.rule.orig Thu Jan 4 16:10:00 2007 ++++ Makefile.rule Tue Feb 6 09:07:21 2007 +@@ -141,11 +141,11 @@ + endif + + ifndef F_COMPILER +-F_COMPILER = G77 ++F_COMPILER = GFORTRAN + endif + + ifeq ($(C_COMPILER), GNU) +-COMPILER = gcc ++COMPILER = %%CC%% + CCOMMON_OPT += -Wall + ifneq ($(OSNAME), CYGWIN_NT) + CCOMMON_OPT += -fPIC +@@ -163,12 +163,12 @@ + endif + + ifeq ($(C_COMPILER), INTEL) +-COMPILER = icc ++COMPILER = %%CC%% + CCOMMON_OPT += -fPIC + endif + + ifeq ($(F_COMPILER), G77) +-COMPILER_F77 = g77 ++COMPILER_F77 = %%F77%% + BU = _ + CCOMMON_OPT += -DF_INTERFACE_F2C -DNEED_F2CCONV + FCOMMON_OPT += -Wall +@@ -185,7 +185,7 @@ + endif + + ifeq ($(F_COMPILER), G95) +-COMPILER_F77 = g95 ++COMPILER_F77 = %%F77%% + BU = _ + CCOMMON_OPT += -DF_INTERFACE_F2C + FCOMMON_OPT += -Wall +@@ -202,11 +202,12 @@ + endif + + ifeq ($(F_COMPILER), GFORTRAN) +-COMPILER_F77 = gfortran ++COMPILER_F77 = %%F77%% + BU = _ + CCOMMON_OPT += -DF_INTERFACE_GFORT + FCOMMON_OPT += -Wall +-EXTRALIB += -lgfortran ++GCCPATH = $(shell dirname `%%F77%% -print-libgcc-file-name`) ++EXTRALIB += -L$(GCCPATH)/../../../ -lgfortran + ifneq ($(OSNAME), CYGWIN_NT) + FCOMMON_OPT += -fPIC + endif +@@ -224,7 +225,7 @@ + endif + + ifeq ($(F_COMPILER), INTEL) +-COMPILER_F77 = ifort ++COMPILER_F77 = %%F77%% + BU = _ + CCOMMON_OPT += -DF_INTERFACE_F2C + FCOMMON_OPT += -fPIC +@@ -276,10 +277,9 @@ + endif + endif + +-ifneq ($(OSNAME), CYGWIN_NT) + ifdef SMP +-PTHREADLIB += -lpthread +-endif ++PTHREADLIB += ${PTHREAD_LIBS} ++CCOMMON_OPT+= ${PTHREAD_CFLAGS} + endif + + ifeq ($(F_COMPILER), PATHSCALE) +@@ -326,7 +326,7 @@ + GETARCH_CC = gcc + endif + +-ARCH := $(shell (cd $(TOPDIR); ./getarch 0 $(GETARCH_CC) $(GETARCH_FLAGS))) ++GARCH := $(shell (cd $(TOPDIR); ./getarch 0 $(GETARCH_CC) $(GETARCH_FLAGS))) + SUBARCH := $(shell (cd $(TOPDIR); ./getarch 1 $(GETARCH_CC) $(GETARCH_FLAGS))) + ARCHSUBDIR := $(shell (cd $(TOPDIR); ./getarch 2 $(GETARCH_CC) $(GETARCH_FLAGS))) + CONFIG := $(shell (cd $(TOPDIR); ./getarch 3 $(GETARCH_CC) $(GETARCH_FLAGS))) +@@ -407,11 +407,11 @@ + FPFLAGS = $(COMMON_OPT) $(FCOMMON_OPT) $(COMMON_PROF) + + ifndef SMP +-LIBNAME = $(LIBPREFIX)_$(LIBSUBARCH)$(REVISION).a +-LIBNAME_P = $(LIBPREFIX)_$(LIBSUBARCH)$(REVISION)_p.a ++LIBNAME = $(LIBPREFIX)$(REVISION).a ++LIBNAME_P = $(LIBPREFIX)$(REVISION)_p.a + else +-LIBNAME = $(LIBPREFIX)_$(LIBSUBARCH)p$(REVISION).a +-LIBNAME_P = $(LIBPREFIX)_$(LIBSUBARCH)p$(REVISION)_p.a ++LIBNAME = $(LIBPREFIX)p$(REVISION).a ++LIBNAME_P = $(LIBPREFIX)p$(REVISION)_p.a + endif + + LIBSONAME = $(LIBNAME:.a=.so) diff --git a/math/gotoblas/files/patch-export-Makefile b/math/gotoblas/files/patch-export-Makefile new file mode 100644 index 000000000000..1bbd7498cbc9 --- /dev/null +++ b/math/gotoblas/files/patch-export-Makefile @@ -0,0 +1,11 @@ +--- exports/Makefile.orig Sun Jan 21 14:01:28 2007 ++++ exports/Makefile Sun Jan 21 14:02:13 2007 +@@ -181,7 +181,7 @@ + ./gensymbol win2kasm > symbol.S + + test : linktest.c +- $(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(EXTRALIB) -lm && echo OK. ++ $(CC) $(CFLAGS) $(PTHREAD_CFLAGS) -w -o linktest $(PTHREAD_LIBS) linktest.c ../$(LIBSONAME) $(EXTRALIB) -lm && echo OK. + rm -f linktest + + linktest.c : gensymbol ../Makefile.rule ../getarch.c diff --git a/math/gotoblas/files/patch-level1-asum-Makefile b/math/gotoblas/files/patch-level1-asum-Makefile new file mode 100644 index 000000000000..0d49760e85a6 --- /dev/null +++ b/math/gotoblas/files/patch-level1-asum-Makefile @@ -0,0 +1,11 @@ +--- level1/asum/Makefile.orig Sun Jan 21 11:17:30 2007 ++++ level1/asum/Makefile Sun Jan 21 11:17:35 2007 +@@ -8,7 +8,7 @@ + ZOBJS = dzasumf.o + XOBJS = qxasumf.o + +-ifeq ($(ARCH), X86) ++ifeq ($(GARCH), X86) + SBLASOBJS = sasum.o + DBLASOBJS = dasum.o + QBLASOBJS = qasum.o diff --git a/math/gotoblas/files/patch-level1-others-Makefile b/math/gotoblas/files/patch-level1-others-Makefile new file mode 100644 index 000000000000..a62dab2add4e --- /dev/null +++ b/math/gotoblas/files/patch-level1-others-Makefile @@ -0,0 +1,20 @@ +--- level1/others/Makefile.orig Sun Jan 21 11:18:16 2007 ++++ level1/others/Makefile Sun Jan 21 11:18:30 2007 +@@ -16,7 +16,7 @@ + + LIBOTHERS = libothers.a + +-ifeq ($(ARCH), X86) ++ifeq ($(GARCH), X86) + COMMONOBJS += cpuid.o + endif + +@@ -111,7 +111,7 @@ + staticbuffer.o staticbuffer.po : dummy + cd $(ARCHSUBDIR) && $(MAKE) ../$(@F) + +-ifeq ($(ARCH), X86) ++ifeq ($(GARCH), X86) + cpuid.o cpuid.po : dummy + cd $(ARCHSUBDIR) && $(MAKE) ../$(@F) + endif diff --git a/math/gotoblas/files/patch-level3-Makefile b/math/gotoblas/files/patch-level3-Makefile new file mode 100644 index 000000000000..43fb5a8fb17b --- /dev/null +++ b/math/gotoblas/files/patch-level3-Makefile @@ -0,0 +1,11 @@ +--- level3/Makefile.orig Sun Jan 21 11:19:32 2007 ++++ level3/Makefile Sun Jan 21 11:19:37 2007 +@@ -1,7 +1,7 @@ + TOPDIR = .. + include ../Makefile.rule + +-ifeq ($(ARCH), ALPHA) ++ifeq ($(GARCH), ALPHA) + TRSMDIR = oldtrsm + TRMMDIR = oldtrmm + endif diff --git a/math/gotoblas/files/patch-x86_64-zdot.S b/math/gotoblas/files/patch-x86_64-zdot.S new file mode 100644 index 000000000000..2a1e88e2a5a2 --- /dev/null +++ b/math/gotoblas/files/patch-x86_64-zdot.S @@ -0,0 +1,21 @@ +--- level1/dot/x86_64/zdot.S Mon Jan 1 01:15:06 2007 ++++ level1/dot/x86_64/zdot.S Tue Feb 6 09:05:33 2007 +@@ -266,12 +266,12 @@ + FST 1 * SIZE(%rax) + FST 0 * SIZE(%rax) + #elif defined(F_INTERFACE) && defined(F_INTERFACE_GFORT) && !defined(DOUBLE) +- subq $2 * SIZE, rsp +- FST 1 * SIZE(rsp) +- FST 0 * SIZE(rsp) +- movq 0 * SIZE(rsp), %rax +- movq 1 * SIZE(rsp), %edx +- addq $2 * SIZE, rsp ++ subq $2 * SIZE, %rsp ++ FST 1 * SIZE(%rsp) ++ FST 0 * SIZE(%rsp) ++ movq 0 * SIZE(%rsp), %rax ++ movq 1 * SIZE(%rsp), %rdx ++ addq $2 * SIZE, %rsp + #else + fxch %st(1) + #endif diff --git a/math/gotoblas/pkg-descr b/math/gotoblas/pkg-descr new file mode 100644 index 000000000000..1d0a830b4dbb --- /dev/null +++ b/math/gotoblas/pkg-descr @@ -0,0 +1,5 @@ +The GotoBLAS codes are currently the fastest implementations +of the Basic Linear Algebra Subroutines(BLAS; math/blas). +It supports various architectures. + +WWW: http://www.tacc.utexas.edu/resources/software/ |