diff options
author | thierry <thierry@FreeBSD.org> | 2006-02-20 16:56:57 +0800 |
---|---|---|
committer | thierry <thierry@FreeBSD.org> | 2006-02-20 16:56:57 +0800 |
commit | 79c36433c47597dc48900b01b2337f3eb5d005f0 (patch) | |
tree | 3d1df19b77336add88cc0999b8b457080bb8dd58 /math/umfpack | |
parent | 482a9ad7bc278eb0bb401cd5167deff7b9e49483 (diff) | |
download | freebsd-ports-gnome-79c36433c47597dc48900b01b2337f3eb5d005f0.tar.gz freebsd-ports-gnome-79c36433c47597dc48900b01b2337f3eb5d005f0.tar.zst freebsd-ports-gnome-79c36433c47597dc48900b01b2337f3eb5d005f0.zip |
- Let the cblas library get overriden from the ports makefile;
- Add a test: target;
- Define -fPIC on amd64.
PR: 93005
Submitted by: Pedro F. Giffuni <giffunip (at) asme.org>
Diffstat (limited to 'math/umfpack')
-rw-r--r-- | math/umfpack/Makefile | 22 | ||||
-rw-r--r-- | math/umfpack/files/patch-Make+Make.freebsd | 16 |
2 files changed, 29 insertions, 9 deletions
diff --git a/math/umfpack/Makefile b/math/umfpack/Makefile index 6371cda032f3..d73af3a1cd40 100644 --- a/math/umfpack/Makefile +++ b/math/umfpack/Makefile @@ -19,10 +19,19 @@ BUILD_DEPENDS= ${LOCALBASE}/lib/libcblas.a:${PORTSDIR}/math/atlas WRKSRC= ${WRKDIR}/${DISTNAME}/UMFPACK ALL_TARGET= lib +CBLAS_LIBS?= -L${LOCALBASE}/lib -lcblas -latlas + post-extract: ${CP} ${WRKDIR}/${DISTNAME}/AMD/Make/Make.linux \ ${WRKDIR}/${DISTNAME}/AMD/Make/Make.freebsd +pre-build: + @${REINPLACE_CMD} -e 's+%%CC%%+${CC}+g ; \ + s+%%CFLAGS%%+${CFLAGS}+ ; \ + s+%%LOCALBASE%%+${LOCALBASE}+ ; \ + s+%%CBLAS_LIBS%%+${CBLAS_LIBS}+ ;' \ + ${WRKDIR}/${DISTNAME}/AMD/Make/Make.freebsd + do-install: ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/AMD/Lib/libamd.a ${PREFIX}/lib ${INSTALL_DATA} ${WRKSRC}/Lib/libumfpack.a ${PREFIX}/lib @@ -47,4 +56,15 @@ do-install: @${FIND} ${EXAMPLESDIR} -type f | ${XARGS} ${CHMOD} ${SHAREMODE} .endif -.include <bsd.port.mk> +.if defined(MAINTAINER_MODE) +test: build + @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} hb ) +.endif + +.include <bsd.port.pre.mk> + +.if ${ARCH} == "amd64" +CFLAGS+= -fPIC +.endif + +.include <bsd.port.post.mk> diff --git a/math/umfpack/files/patch-Make+Make.freebsd b/math/umfpack/files/patch-Make+Make.freebsd index 6e68a56ca995..fbddae80a542 100644 --- a/math/umfpack/files/patch-Make+Make.freebsd +++ b/math/umfpack/files/patch-Make+Make.freebsd @@ -1,13 +1,13 @@ ---- Make/Make.freebsd.orig Fri Mar 18 22:29:13 2005 -+++ Make/Make.freebsd Fri Mar 18 22:30:13 2005 +--- Make/Make.freebsd.orig Sun Feb 19 15:26:42 2006 ++++ Make/Make.freebsd Sun Feb 19 15:29:05 2006 @@ -6,8 +6,8 @@ # if you use the Intel compiler and the Fortran BLAS. # Using GNU gcc and f77 compilers: - CC = gcc - CFLAGS = -O3 -fPIC -+ CC ?= cc -+ CFLAGS ?= -O3 -fPIC ++ CC = %%CC%% ++ CFLAGS = %%CFLAGS%% # Using Intel's icc and ifc compilers: # F77 = ifc @@ -17,14 +17,14 @@ # 2: with the ATLAS C-BLAS (http://www.netlib.org/atlas). -# CONFIG = -DCBLAS -I../ATLAS/include -# LIB = -lcblas -latlas -lm -+CONFIG = -DCBLAS -I../ATLAS/include -I${LOCALBASE}/include -+LIB = -L${LOCALBASE}/lib -lcblas -latlas -lm ++CONFIG = -DGETRUSAGE -DCBLAS -I../ATLAS/include -I%%LOCALBASE%%/include ++LIB = %%CBLAS_LIBS%% -lm # 3: with Fortran interface to the ATLAS BLAS -# CONFIG = -# LIB = -lf77blas -latlas -lfrtbegin -lg2c -lm -+# CONFIG = -I${LOCALBASE}/include -+# LIB = -L${LOCALBASE}/lib -lf77blas -latlas -lfrtbegin -lg2c -lm ++# CONFIG = -I%%LOCALBASE%%/include ++# LIB = -L%%LOCALBASE%%/lib -lf77blas -latlas -lfrtbegin -lg2c -lm # 4: with Fortran interface to the BLAS, and Goto's BLAS - CONFIG = |