diff options
author | Brendan Fabeny <bf@FreeBSD.org> | 2011-10-23 17:04:04 +0800 |
---|---|---|
committer | Brendan Fabeny <bf@FreeBSD.org> | 2011-10-23 17:04:04 +0800 |
commit | c677922c26975abb959b4fc3ac09a885d71ec1d7 (patch) | |
tree | e8ebdde851dad0dcdea8e4657d5a7b7405e50e76 /math/lapacke | |
parent | 66fb8f0b565f66dc45b419fbae9a367284d0be19 (diff) | |
download | freebsd-ports-gnome-c677922c26975abb959b4fc3ac09a885d71ec1d7.tar.gz freebsd-ports-gnome-c677922c26975abb959b4fc3ac09a885d71ec1d7.tar.zst freebsd-ports-gnome-c677922c26975abb959b4fc3ac09a885d71ec1d7.zip |
correct linking and dependency tests; remove MAKE_ENV
additions needed only on FreeBSD 6.* from math/levmar;
patch a makefile of, and add an option to build profiling
libraries to, math/lapacke; mark MAKE_JOBS_SAFE
PR: 161154, 161155
Submitted by: E. Shibusawa (maintainer)
Diffstat (limited to 'math/lapacke')
-rw-r--r-- | math/lapacke/Makefile | 49 | ||||
-rw-r--r-- | math/lapacke/files/patch-make.inc | 2 | ||||
-rw-r--r-- | math/lapacke/files/patch-testing+Makefile | 16 |
3 files changed, 49 insertions, 18 deletions
diff --git a/math/lapacke/Makefile b/math/lapacke/Makefile index acc4f60ffce6..e35af056ae65 100644 --- a/math/lapacke/Makefile +++ b/math/lapacke/Makefile @@ -7,20 +7,24 @@ PORTNAME= lapacke PORTVERSION= 1.0.0.009 +PORTREVISION= 1 CATEGORIES= math -MASTER_SITES= ftp://ftp.netlib.org/lapack/ \ - http://netlib.org/lapack/ +MASTER_SITES= NL +MASTER_SITE_SUBDIR= lapack DISTNAME= ${PORTNAME} EXTRACT_SUFX= .tgz MAINTAINER= phd_kimberlite@yahoo.co.jp COMMENT= Standard C language APIs for LAPACK -#LICENSE= BSD +LICENSE= BSD LICENSE_FILE= ${WRKSRC}/LICENSE USE_LDCONFIG= yes USE_FORTRAN= yes +MAKE_JOBS_SAFE= yes + +OPTIONS= PROFILE "Build a profiling library" Off .include <bsd.port.pre.mk> @@ -28,46 +32,57 @@ WRKSRC= ${WRKDIR}/${PORTNAME} .if exists(${LOCALBASE}/lib/libgoto2p.so) WITH_BLAS?= gotoblas -.elif exists(${LOCALBASE}/lib/libatlas_r.so) +.elif exists(${LOCALBASE}/lib/libatlas.so) WITH_BLAS?= atlas .else WITH_BLAS?= reference .endif .if ${WITH_BLAS} == "reference" -LIB_DEPENDS= blas.2:${PORTSDIR}/math/blas \ +LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas \ lapack.4:${PORTSDIR}/math/lapack BLAS= -lblas LAPACK= -llapack .elif ${WITH_BLAS} == "gotoblas" -LIB_DEPENDS= goto2:${PORTSDIR}/math/gotoblas -BLAS= -lpthread -lgoto2p -LAPACK= -lpthread -lgoto2p +CFLAGS+= ${PTHREAD_CFLAGS} +LDFLAGS+= ${PTHREAD_LIBS} +LIB_DEPENDS+= goto2p.1:${PORTSDIR}/math/gotoblas +BLAS= -lgoto2p +LAPACK= -lgoto2p WITHOUT_LAPACK_LATEST= yes .elif ${WITH_BLAS} == "atlas" -LIB_DEPENDS= atlas:${PORTSDIR}/math/atlas -BLAS= -lpthread -lptf77blas -lptcblas -latlas_r -LAPACK= -lpthread -lalapack_r +CFLAGS+= ${PTHREAD_CFLAGS} +LDFLAGS+= ${PTHREAD_LIBS} +LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas +BLAS= -lptf77blas -lptcblas -latlas +LAPACK= -lalapack .endif -LDFLAGS+= -L${LOCALBASE}/lib -lgfortran -lgcc_s -LDADD?= -lgfortran -lgcc_s -MAKE_ENV= LDADD="${LDADD}" +LDFLAGS+= -L${LOCALBASE}/lib .if defined(WITHOUT_LAPACK_LATEST) MAKE_ENV+= WITHOUT_LAPACK_LATEST=yes .endif .if !defined(NOPORTDOCS) -PORTDOCS= README \ - LICENSE +PORTDOCS= README .endif PLIST_FILES= include/lapacke.h \ include/lapacke_utils.h \ lib/liblapacke.a \ lib/liblapacke.so \ lib/liblapacke.so.1 -.if !(defined(NOPROFILE) || defined(NO_PROFILE) || defined(WITHOUT_PROFILE)) + +.if defined(WITH_PROFILE) +.if defined(NOPROFILE) || defined(NO_PROFILE) || defined(WITHOUT_PROFILE) +IGNORE = you have defined WITH_PROFILE, but have also defined\ +WITHOUT_PROFILE, NOPROFILE, or NO_PROFILE +.elif !exists(/usr/lib/libc_p.a) +IGNORE = you have chosen WITH_PROFILE, but have not installed the\ +base system profiling libraries +.endif PLIST_FILES+= lib/liblapacke_p.a +.else +MAKE_ENV+= NO_PROFILE= .endif post-patch: diff --git a/math/lapacke/files/patch-make.inc b/math/lapacke/files/patch-make.inc index 3dc94d1aed69..e7d8353c08ea 100644 --- a/math/lapacke/files/patch-make.inc +++ b/math/lapacke/files/patch-make.inc @@ -18,7 +18,7 @@ -LAPACKE = lapacke.a -LIBS = ../../../lapack-3.2.1/lapack.a ../../../lapack-3.2.1/blas.a -lm +LAPACKE = ./lib/liblapacke.a -+LIBS = %%BLAS%% %%LAPACK%% ++LIBS = %%LAPACK%% %%BLAS%% # # The archiver and the flag(s) to use when building archive (library) # If your system has no ranlib, set RANLIB = echo. diff --git a/math/lapacke/files/patch-testing+Makefile b/math/lapacke/files/patch-testing+Makefile new file mode 100644 index 000000000000..fab617b08eb3 --- /dev/null +++ b/math/lapacke/files/patch-testing+Makefile @@ -0,0 +1,16 @@ +--- ./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 |