diff options
author | Maho Nakata <maho@FreeBSD.org> | 2007-01-09 05:52:07 +0000 |
---|---|---|
committer | Maho Nakata <maho@FreeBSD.org> | 2007-01-09 05:52:07 +0000 |
commit | 39c24110db57e9d0bb64e09f51da5b4061c663ff (patch) | |
tree | 47fc40659e5545bb431cf0f05d66b8dbe1ca0a3d /math/taucs | |
parent | 4092e1a374776854b7f43a1222c97cad3ca1a803 (diff) |
Migrated to gfortran42.
install shared libs as well.
Notes
Notes:
svn path=/head/; revision=181837
Diffstat (limited to 'math/taucs')
-rw-r--r-- | math/taucs/Makefile | 50 | ||||
-rw-r--r-- | math/taucs/files/patch-config+FreeBSD.mk | 33 | ||||
-rw-r--r-- | math/taucs/files/patch-configure | 9 | ||||
-rw-r--r-- | math/taucs/pkg-plist | 2 |
4 files changed, 66 insertions, 28 deletions
diff --git a/math/taucs/Makefile b/math/taucs/Makefile index 1476cfe63ae1..c3f1c666e14c 100644 --- a/math/taucs/Makefile +++ b/math/taucs/Makefile @@ -7,7 +7,7 @@ PORTNAME= taucs PORTVERSION= 2.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= math MASTER_SITES= http://www.tau.ac.il/~stoledo/taucs/${PORTVERSION}/ DISTNAME= ${PORTNAME} @@ -16,22 +16,60 @@ EXTRACT_SUFX= .tgz MAINTAINER= ports@FreeBSD.org COMMENT= C library of sparse linear solvers -BUILD_DEPENDS= ${LOCALBASE}/lib/liblapack.a:${PORTSDIR}/math/lapack \ - ${LOCALBASE}/lib/libmetis.a:${PORTSDIR}/math/metis -LIB_DEPENDS= atlas.1:${PORTSDIR}/math/atlas +.if exists(${LOCALBASE}/lib/libatlas_r.so) && !defined(WITH_BLAS) +WITH_ATLAS= yes +.endif +.if defined(WITH_ATLAS) +LIB_DEPENDS+= atlas.1:${PORTSDIR}/math/atlas +BLAS= -lf77blas -latlas +LAPACK= -llapack +.else +LIB_DEPENDS+= lapack.1:${PORTSDIR}/math/lapack +LIB_DEPENDS+= blas.1:${PORTSDIR}/math/blas +BLAS= -lblas +LAPACK= -llapack +.endif +LIB_DEPENDS= metis:${PORTSDIR}/math/metis + +WANT_FORTRAN=yes +USE_GCC=4.2+ -NO_WRKSUBDIR= yes HAS_CONFIGURE= yes +WRKSRC= ${WRKDIR}/${PORTNAME} MAKEFILE= makefile ALL_TARGET= .include <bsd.port.pre.mk> +.if ${ARCH} == "sparc64" +PICFLAG?= -fPIC +.else +PICFLAG?= -fpic +.endif + +do-extract: + ${MKDIR} ${WRKSRC} ; cd ${WRKSRC} ; ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ${EXTRACT_AFTER_ARGS} + +post-patch: + @${MKDIR} ${WRKSRC}_SHARED ; ${CP} -r ${WRKSRC}/* ${WRKSRC}_SHARED + +do-configure: + cd ${WRKSRC}; ./configure + cd ${WRKSRC}_SHARED; ./configure post-configure: - cd ${WRKSRC}; ${PATCH} <${FILESDIR}/extra-patch-build-FreeBSD-makefile + @(cd ${WRKSRC}; ${PATCH} <${FILESDIR}/extra-patch-build-FreeBSD-makefile) + @(cd ${WRKSRC}_SHARED; ${PATCH} <${FILESDIR}/extra-patch-build-FreeBSD-makefile) + @${REINPLACE_CMD} -e 's+%%LOCALBASE%%+${LOCALBASE}+g;' -e 's+%%FC%%+${FC}+g;' -e 's+%%BLAS%%+${BLAS}+g;' -e 's+%%LAPACK%%+${LAPACK}+g;' -e 's+%%CC%%+${CC}+g;' -e 's+%%CFLAGS%%+${CFLAGS}+g;' -e 's+%%FFLAGS%%+${FFLAGS}+g;' ${WRKSRC}/config/FreeBSD.mk + @${REINPLACE_CMD} -e 's+%%LOCALBASE%%+${LOCALBASE}+g;' -e 's+%%FC%%+${FC}+g;' -e 's+%%BLAS%%+${BLAS}+g;' -e 's+%%LAPACK%%+${LAPACK}+g;' -e 's+%%CC%%+${CC}+g;' -e 's+%%CFLAGS%%+${CFLAGS} ${PICFLAG}+g;' -e 's+%%FFLAGS%%+${FFLAGS} ${PICFLAG}+g;' ${WRKSRC}_SHARED/config/FreeBSD.mk +do-build: + cd ${WRKSRC} ; ${MAKE} + cd ${WRKSRC}_SHARED ; ${SETENV} CFLAGS="${CFLAGS} ${PICFLAG}" ${MAKE} + cd ${WRKSRC}_SHARED/lib/FreeBSD ; ld -Bshareable -o libtaucs.so.1 -x -soname libtaucs.so.1 --whole-archive libtaucs.a do-install: @${INSTALL_DATA} ${WRKSRC}/lib/FreeBSD/libtaucs.a ${PREFIX}/lib + @${INSTALL_DATA} ${WRKSRC}_SHARED/lib/FreeBSD/libtaucs.so.1 ${PREFIX}/lib + @${LN} -sf libtaucs.so.1 ${PREFIX}/lib/libtaucs.so @${INSTALL_DATA} ${WRKSRC}/build/FreeBSD/*.h ${PREFIX}/include @${INSTALL_DATA} ${WRKSRC}/src/*.h ${PREFIX}/include @${INSTALL_PROGRAM} ${WRKSRC}/bin/FreeBSD/direct ${PREFIX}/bin diff --git a/math/taucs/files/patch-config+FreeBSD.mk b/math/taucs/files/patch-config+FreeBSD.mk index 78415d61a95f..20cb3ac7c3ee 100644 --- a/math/taucs/files/patch-config+FreeBSD.mk +++ b/math/taucs/files/patch-config+FreeBSD.mk @@ -1,35 +1,42 @@ --- config/FreeBSD.mk.orig Fri Aug 29 00:13:38 2003 -+++ config/FreeBSD.mk Mon Mar 13 11:38:31 2006 -@@ -9,15 +9,15 @@ ++++ config/FreeBSD.mk Tue Jan 9 14:18:49 2007 +@@ -8,16 +8,16 @@ + PATHSEP=/ DEFFLG=-D - FC ?= f77 +-FC ?= f77 -FFLAGS += -Os -fno-second-underscore -+FFLAGS += -fno-second-underscore ++FC = %%FC%% ++FFLAGS += -fno-second-underscore %%FFLAGS%% FOUTFLG =-o - #CC = cc +-#CC = cc -CFLAGS += -Os -D_POSIX_C_SOURCE=199506L -fPIC -+CFLAGS += -D_POSIX_C_SOURCE=199506L -fPIC ++CC = %%CC%% ++CFLAGS += -D_POSIX_C_SOURCE=199506L %%CFLAGS%% COUTFLG = -o - LD = $(CC) +-LD = $(CC) -LDFLAGS = $(CFLAGS) -static -+LDFLAGS = $(CFLAGS) ++LD = %%FC%% ++LDFLAGS = -L%%LOCALBASE%%/lib -L./ LOUTFLG = $(COUTFLG) AR = ar cr -@@ -26,10 +26,10 @@ +@@ -26,12 +26,12 @@ RANLIB = ranlib RM = rm -rf -LIBBLAS = -L/usr/local/lib -lf77blas -lcblas -latlas -lg2c -LIBLAPACK = -L/usr/local/lib -llapack -+LIBBLAS = -L${LOCALBASE}/lib -lf77blas -lcblas -latlas -lg2c -+LIBLAPACK = -L${LOCALBASE}/lib -llapack ++LIBBLAS = %%BLAS%% ++LIBLAPACK = %%LAPACK%% -LIBMETIS = -L/usr/local/lib -lmetis -+LIBMETIS = -L${LOCALBASE}/lib -lmetis ++LIBMETIS = -lmetis - LIBF77 = -lg2c +-LIBF77 = -lg2c ++LIBF77 = #compat is required for ftime() + LIBC = -lm -lcompat + diff --git a/math/taucs/files/patch-configure b/math/taucs/files/patch-configure index e3a5802ac725..9a63a4723c96 100644 --- a/math/taucs/files/patch-configure +++ b/math/taucs/files/patch-configure @@ -9,12 +9,3 @@ fi # If nothing works, we continue, but configurator will abort -@@ -46,7 +46,7 @@ - # If we find exceptions that cannot be fixed in a - # generic way, we should use OSTYPE to fix the problems. - --make -f configurator/makefile.unix -+${MAKE} -f configurator/makefile.unix - - # Third phase: try to run configurator with whatever - # arguments were passed to the script. If it fails, perhaps diff --git a/math/taucs/pkg-plist b/math/taucs/pkg-plist index ee38f670e61a..b9f88ae39c1e 100644 --- a/math/taucs/pkg-plist +++ b/math/taucs/pkg-plist @@ -1,6 +1,8 @@ bin/direct bin/iter lib/libtaucs.a +lib/libtaucs.so +lib/libtaucs.so.1 include/taucs.h include/taucs_config_build.h include/taucs_config_tests.h |