- WITH_BLAS knob was updated for GotoBLAS (math/gotoblas) support.

- Remove MD5

PR:		ports/152666
Submitted by:	Eijiro Shibusawa <phd_kimberlite@yahoo.co.jp> (maintainer)
This commit is contained in:
Wen Heping 2010-12-18 00:44:22 +00:00
parent 1520b8d691
commit 0892d5296f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=266532
3 changed files with 19 additions and 10 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= levmar
PORTVERSION= 2.5
PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= http://www.ics.forth.gr/~lourakis/levmar/
EXTRACT_SUFX= .tgz
@ -19,7 +20,11 @@ LICENSE= GPLv2
USE_LDCONFIG= yes
USE_FORTRAN= yes
.if exists(${LOCALBASE}/lib/libatlas.so)
.include <bsd.port.pre.mk>
.if exists(${LOCALBASE}/lib/libgoto2.so)
WITH_BLAS?= gotoblas
.elif exists(${LOCALBASE}/lib/libatlas_r.so)
WITH_BLAS?= atlas
.else
WITH_BLAS?= reference
@ -27,13 +32,18 @@ WITH_BLAS?= reference
.if ${WITH_BLAS} == "reference"
LIB_DEPENDS= blas.2:${PORTSDIR}/math/blas \
lapack.4:${PORTSDIR}/math/lapack
BLAS= -lblas
LAPACK = -llapack
lapack.4:${PORTSDIR}/math/lapack
BLAS= -lblas
LAPACK= -llapack
.elif ${WITH_BLAS} == "gotoblas"
LIB_DEPENDS= goto2:${PORTSDIR}/math/gotoblas \
lapack.4:${PORTSDIR}/math/lapack
BLAS= -lpthread -lgoto2p
LAPACK= -lpthread -lgoto2p
.elif ${WITH_BLAS} == "atlas"
LIB_DEPENDS= atlas:${PORTSDIR}/math/atlas
BLAS= -lf77blas -lcblas -latlas
LAPACK = -lalapack
BLAS= -pthread -lptf77blas -lptcblas -latlas_r
LAPACK= -pthread -lalapack_r
.endif
LDFLAGS+= -L${LOCALBASE}/lib
@ -78,4 +88,4 @@ post-install:
@(cd ${WRKSRC}/ && ${INSTALL_DATA} ${PORTEXAMPLES} ${EXAMPLESDIR})
.endif
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View File

@ -1,3 +1,2 @@
MD5 (levmar-2.5.tgz) = 7ca14d79eda6e985f8355b719ae47d35
SHA256 (levmar-2.5.tgz) = b70f6ac3eff30ec29150e217b137312cb84e85529815efea2c12e4eab74b9d75
SIZE (levmar-2.5.tgz) = 78817

View File

@ -3,7 +3,7 @@ CFLAGS= %%CFLAGS%%
LDFLAGS= %%LDFLAGS%%
LAPACK= %%LAPACK%%
BLAS= %%BLAS%%
LIBS= -llevmar $(LAPACK) $(BLAS) -lm -lgfortran
LIBS= -llevmar $(LAPACK) $(BLAS) -lm -lgcc_s -lgfortran
DEMOBJS= lmdemo.o
DEMOSRCS= lmdemo.c
@ -11,7 +11,7 @@ DEMOSRCS= lmdemo.c
all: lmdemo
lmdemo: $(DEMOBJS)
$(CC) $(LDFLAGS) $(DEMOBJS) -o lmdemo $(LIBS)
$(CC) $(CFLAGS) $(LDFLAGS) $(DEMOBJS) -o lmdemo $(LIBS)
clean:
@rm -f $(DEMOBJS)