Update to 3.4.2.

Includes staging support and updates to the LIB_DEPENDS syntax.

PR:		191060
Submitted by:	phd_kimberlite@yahoo.co.jp (maintainer)
This commit is contained in:
Raphael Kubo da Costa 2014-06-20 14:32:10 +00:00
parent acf6d6d459
commit 503986e68b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=358577
7 changed files with 16 additions and 139 deletions

View file

@ -2,13 +2,12 @@
# $FreeBSD$ # $FreeBSD$
PORTNAME= lapacke PORTNAME= lapacke
PORTVERSION= 3.4.0 PORTVERSION= 3.4.2
PORTREVISION= 2
CATEGORIES= math CATEGORIES= math
MASTER_SITES= NL MASTER_SITES= NL
MASTER_SITE_SUBDIR= lapack MASTER_SITE_SUBDIR= lapack
DISTNAME= lapack-${PORTVERSION} DISTNAME= lapack-${PORTVERSION}
DISTFILES= ${DISTNAME}.tgz lapacke.tgz EXTRACT_SUFX= .tgz
DIST_SUBDIR= lapack DIST_SUBDIR= lapack
MAINTAINER= phd_kimberlite@yahoo.co.jp MAINTAINER= phd_kimberlite@yahoo.co.jp
@ -24,8 +23,7 @@ OPTIONS_DEFINE= PROFILE XLAPACKE
PROFILE_DESC= Build a profiling library PROFILE_DESC= Build a profiling library
XLAPACKE_DESC= Install interfaces to XLAPACK XLAPACKE_DESC= Install interfaces to XLAPACK
NO_STAGE= yes .include <bsd.port.options.mk>
.include <bsd.port.pre.mk>
LAPACKE_SVERSION= 1 LAPACKE_SVERSION= 1
LAPACKE_LIBNAME= lapacke LAPACKE_LIBNAME= lapacke
@ -50,25 +48,25 @@ WITH_BLAS?= reference
.endif .endif
.if ${WITH_BLAS} == "reference" .if ${WITH_BLAS} == "reference"
LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas \ LIB_DEPENDS+= libblas.so:${PORTSDIR}/math/blas \
lapack.4:${PORTSDIR}/math/lapack liblapack.so:${PORTSDIR}/math/lapack
BLAS= -lblas BLAS= -lblas
LAPACK= -llapack LAPACK= -llapack
.elif ${WITH_BLAS} == "gotoblas" .elif ${WITH_BLAS} == "gotoblas"
CFLAGS+= ${PTHREAD_CFLAGS} CFLAGS+= ${PTHREAD_CFLAGS}
LDFLAGS+= ${PTHREAD_LIBS} LDFLAGS+= ${PTHREAD_LIBS}
LIB_DEPENDS+= goto2p.1:${PORTSDIR}/math/gotoblas LIB_DEPENDS+= libgoto2p.so:${PORTSDIR}/math/gotoblas
BLAS= -lgoto2p BLAS= -lgoto2p
LAPACK= -lgoto2p LAPACK= -lgoto2p
.elif ${WITH_BLAS} == "atlas" .elif ${WITH_BLAS} == "atlas"
CFLAGS+= ${PTHREAD_CFLAGS} CFLAGS+= ${PTHREAD_CFLAGS}
LDFLAGS+= ${PTHREAD_LIBS} LDFLAGS+= ${PTHREAD_LIBS}
LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas LIB_DEPENDS+= libatlas.so:${PORTSDIR}/math/atlas
BLAS= -lptf77blas BLAS= -lptf77blas
LAPACK= -lalapack -lptcblas LAPACK= -lalapack -lptcblas
.endif .endif
.if ${PORT_OPTIONS:MXLAPACKE} .if ${PORT_OPTIONS:MXLAPACKE}
LIB_DEPENDS+= xlapack.4:${PORTSDIR}/math/xlapack LIB_DEPENDS+= libxlapack.so:${PORTSDIR}/math/xlapack
.endif .endif
LDFLAGS+= -L${LOCALBASE}/lib LDFLAGS+= -L${LOCALBASE}/lib
@ -107,23 +105,12 @@ PLIST_FILES+= lib/lib${XLAPACKE_LIBNAME}_p.a
MAKE_ENV+= NO_PROFILE= MAKE_ENV+= NO_PROFILE=
.endif .endif
post-extract:
@${CP} -r ${WRKSRC_LEGACY}/testing ${WRKSRC}/.
post-patch: post-patch:
@${FIND} ${WRKSRC} -name "Makefile*" -type f |\ @${FIND} ${WRKSRC} -name "Makefile*" -type f |\
${XARGS} ${REINPLACE_CMD} -e 's;$$(ARCH);$$(ARCH_);g' ${XARGS} ${REINPLACE_CMD} -e 's;$$(ARCH);$$(ARCH_);g'
@${REINPLACE_CMD} -e 's;%%CC%%;${CC};g' \
-e 's;%%CFLAGS%%;${CFLAGS};g' \
-e 's;%%LDFLAGS%%;${LDFLAGS};g' \
-e 's;%%AR%%;${AR};g' \
-e 's;%%RANLIB%%;${RANLIB};g' \
-e 's;%%BLAS%%;${BLAS};g' \
-e 's;%%LAPACK%%;${LAPACK};g' \
-e 's;%%LAPACKE_LIBNAME%%;${LAPACKE_LIBNAME};g' \
${WRKSRC}/make.inc
@${MV} ${WRKSRC}/Makefile ${WRKSRC}/Makefile.dist @${MV} ${WRKSRC}/Makefile ${WRKSRC}/Makefile.dist
@${CP} ${FILESDIR}/Makefile ${WRKSRC}/Makefile @${CP} ${FILESDIR}/Makefile ${WRKSRC}/Makefile
@${CP} ${WRKSRC}/include//lapacke_mangling_with_flags.h ${WRKSRC}/include//lapacke_mangling.h
@${MKDIR} ${WRKSRC}/lib @${MKDIR} ${WRKSRC}/lib
@${CP} ${FILESDIR}/Makefile.lib ${WRKSRC}/lib/Makefile @${CP} ${FILESDIR}/Makefile.lib ${WRKSRC}/lib/Makefile
@${MKDIR} ${WRKSRC}/libtmg @${MKDIR} ${WRKSRC}/libtmg
@ -146,15 +133,8 @@ post-patch:
post-install: post-install:
.if ${PORT_OPTIONS:MDOCS} .if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR} @${MKDIR} ${STAGEDIR}${DOCSDIR}
@(cd ${WRKSRC}/ && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}) @(cd ${WRKSRC}/ && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR})
.endif .endif
check regression-test test: build .include <bsd.port.mk>
@${CP} ${WRKSRC}/lib/lib${LAPACKE_LIBNAME}.a ${WRKSRC}/.
@${ECHO_CMD} "Testing static lapacke library"
@(cd ${WRKSRC}/testing; ${SETENV} ${MAKE_ENV} \
${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS})
@${CAT} ${WRKSRC}/testing/interface/*.out
.include <bsd.port.post.mk>

View file

@ -1,4 +1,2 @@
SHA256 (lapack/lapack-3.4.0.tgz) = a7139ef97004d0e3c4c30f1c52d508fd7ae84b5fbaf0dd8e792c167dc306c3e9 SHA256 (lapack/lapack-3.4.2.tgz) = 60a65daaf16ec315034675942618a2230521ea7adf85eea788ee54841072faf0
SIZE (lapack/lapack-3.4.0.tgz) = 6127787 SIZE (lapack/lapack-3.4.2.tgz) = 6168281
SHA256 (lapack/lapacke.tgz) = 7f992bd1f143251ddd03b99ef935942c17caf43652ae94a251601e00dce258e3
SIZE (lapack/lapacke.tgz) = 840233

View file

@ -1119,7 +1119,7 @@ UTILS_SRCS=\
lapacke_ztr_nancheck.c lapacke_ztr_trans.c lapacke_ztr_nancheck.c lapacke_ztr_trans.c
%%XLAPACKE%%beforeinstall: %%XLAPACKE%%beforeinstall:
%%XLAPACKE%% ${BSD_INSTALL_DATA} ${.CURDIR}/../include/lapacke.h ${PREFIX}/include %%XLAPACKE%% ${BSD_INSTALL_DATA} ${.CURDIR}/../include/lapacke.h ${DESTDIR}${PREFIX}/include
%%XLAPACKE%% ${BSD_INSTALL_DATA} ${.CURDIR}/../include/lapacke_utils.h ${PREFIX}/include %%XLAPACKE%% ${BSD_INSTALL_DATA} ${.CURDIR}/../include/lapacke_utils.h ${DESTDIR}${PREFIX}/include
.include <bsd.lib.mk> .include <bsd.lib.mk>

View file

@ -1,20 +0,0 @@
--- include/lapacke.h.orig 2010-12-03 20:56:19.000000000 +0900
+++ include/lapacke.h 2010-12-03 20:56:59.000000000 +0900
@@ -84,7 +84,7 @@
#endif
#ifndef lapack_complex_float_imag
-#define lapack_complex_float_imag(z) (imag(z))
+#define lapack_complex_float_imag(z) (cimag(z))
#endif
lapack_complex_float lapack_make_complex_float( float re, float im );
@@ -100,7 +100,7 @@
#endif
#ifndef lapack_complex_double_imag
-#define lapack_complex_double_imag(z) (imag(z))
+#define lapack_complex_double_imag(z) (cimag(z))
#endif
lapack_complex_double lapack_make_complex_double( double re, double im );

View file

@ -1,31 +0,0 @@
--- make.inc.orig 2011-11-10 07:56:15.000000000 +0900
+++ make.inc 2011-12-03 20:22:18.000000000 +0900
@@ -47,20 +47,19 @@
# LDFLAGS = -nofor-main
# - gfortran, set: LINKER = gfortran
#
-CC = gcc
-CFLAGS =
-LINKER = gfortran
-LDFLAGS =
+CC = %%CC%%
+CFLAGS = %%CFLAGS%%
+LINKER = $(CC)
+LDFLAGS = %%LDFLAGS%%
#
# The name of the libraries to be created/linked to
# Ensure that the libraries have the same data model (LP64/ILP64).
#
-LAPACKE = lapacke.a
-LIBS = /Users/julie/Documents/Boulot/lapack-dev/lapack/trunk/lapack_LINUX.a \
- /Users/julie/Documents/Boulot/lapack-dev/lapack/trunk/blas_LINUX.a -lm
+LAPACKE = ./lib%%LAPACKE_LIBNAME%%.a
+LIBS = %%LAPACK%% %%BLAS%%
# The archiver and the flag(s) to use when building archive (library)
# If your system has no ranlib, set RANLIB = echo.
#
-ARCH = ar
+ARCH_ = %%AR%%
ARCHFLAGS = cr
-RANLIB = ranlib
+RANLIB = %%RANLIB%%

View file

@ -1,16 +0,0 @@
--- ./testing/Makefile.orig 2010-10-01 17:17:25.000000000 +0900
+++ ./testing/Makefile 2011-09-30 19:38:00.000000000 +0900
@@ -35,9 +35,9 @@
include ../make.inc
all:
- cd utils && $(MAKE)
- cd interface && $(MAKE)
+ cd ${.CURDIR}/utils && $(MAKE)
+ cd ${.CURDIR}/interface && $(MAKE)
clean:
- cd utils && $(MAKE) clean
- cd interface && $(MAKE) clean
+ cd ${.CURDIR}/utils && $(MAKE) clean
+ cd ${.CURDIR}/interface && $(MAKE) clean

View file

@ -1,34 +0,0 @@
--- testing/interface/Makefile.orig 2010-12-06 20:30:08.000000000 +0900
+++ testing/interface/Makefile 2010-12-06 20:38:46.000000000 +0900
@@ -497,9 +497,9 @@
zupgtr_1 \
zupmtr_1
-OBJ = $(TST:%=%.o)
-EXE = $(TST:%=x%)
-OUT = $(TST:%=%.out)
+OBJ = ${TST:N*.h:R:S/$/.o/}
+EXE = ${TST}
+OUT = ${TST:N*.h:R:S/$/.out/}
AUX = ../utils/compare_complex_doubles.o \
../utils/compare_complex_floats.o \
@@ -510,14 +510,10 @@
tst: $(OUT)
-%.out : x%
- ./$< > $@
-
-x% : %.o
- $(LINKER) $(LDFLAGS) $< -o $@ $(AUX) ../../$(LAPACKE) $(LIBS)
-
-%.o : %.c
- $(CC) -c $(CFLAGS) -I ../include -I ../../include -o $@ $<
+.c.out :
+ $(CC) -c $(CFLAGS) -I ../include -I ../../include $<
+ $(LINKER) $(LDFLAGS) $*.o -o $* $(AUX) ../../$(LAPACKE) $(LIBS)
+ ./$* > $@
clean:
rm -f $(EXE) $(OBJ)