Index: head/math/taucs/Makefile =================================================================== --- head/math/taucs/Makefile (revision 450006) +++ head/math/taucs/Makefile (revision 450007) @@ -1,130 +1,115 @@ # Created by: Pedro Giffuni # $FreeBSD$ PORTNAME= taucs PORTVERSION= 2.2 PORTREVISION= 16 CATEGORIES= math MASTER_SITES= http://www.tau.ac.il/~stoledo/taucs/${PORTVERSION}/ \ LOCAL/bf DISTNAME= ${PORTNAME} MAINTAINER= ports@FreeBSD.org COMMENT= C library of sparse linear solvers +LICENSE= TAUCS +LICENSE_NAME= TAUCS License +LICENSE_FILE= ${FILESDIR}/TAUCS-license.txt +LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept + LIB_DEPENDS= libmetis.so:math/metis4 HAS_CONFIGURE= yes -USES= fortran tar:tgz +USES= blaslapack fortran tar:tgz USE_LDCONFIG= yes NO_WRKSUBDIR= yes OPTIONS_DEFINE= DOCS .include LDFLAGS+= -L${LOCALBASE}/lib LIBMETIS?= -lmetis -MAKE_ENV+= LIBBLAS="${BLAS}" LIBLAPACK="${LAPACK}" LIBMETIS="${LIBMETIS}" +MAKE_ENV+= LIBBLAS="${BLASLIB}" LIBLAPACK="${LAPACKLIB}" LIBMETIS="${LIBMETIS}" BINS?= direct iter taucs_run -TESTS ?= complex stack timer linsolve memory +TESTS?= complex stack timer linsolve memory -.if exists(${LOCALBASE}/lib/libatlas.so) -WITH_BLAS?= atlas -.else -WITH_BLAS?= reference -.endif - -.if ${WITH_BLAS} == atlas -LIB_DEPENDS+= libatlas.so:math/atlas -BLAS= -lf77blas -LAPACK= -lalapack -lcblas -.elif ${WITH_BLAS} == reference -LIB_DEPENDS+= liblapack.so:math/lapack -LIB_DEPENDS+= libblas.so:math/blas -BLAS= -lblas -LAPACK= -llapack -.endif - .if ${ARCH} == "sparc64" PICFLAG?= -fPIC .else PICFLAG?= -fpic .endif post-patch: @${REINPLACE_CMD} -e 's/succedd/succeed/' \ ${WRKSRC}/progs/taucs_blas_underscore_test.c @${REINPLACE_CMD} -e 's/SUCCEDD/SUCCEED/' \ ${WRKSRC}/progs/test_linsolve.c -do-configure: - (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SH} ./configure) - post-configure: @${CP} -r ${WRKSRC} ${WRKSRC}_SHARED archives: configure @${PRINTF} "\n\n%s\n\n\n" "Building libtaucs archives:" (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} lib/FreeBSD/libtaucs.a) (cd ${WRKSRC}_SHARED && ${SETENV} ${MAKE_ENV} PICFLAG="${PICFLAG}" \ ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} lib/FreeBSD/libtaucs.a) lib: archives @${PRINTF} "\n\n%s\n\n\n" "Building shared library:" (cd ${WRKSRC}_SHARED/lib/FreeBSD && \ - ${FC} ${FFLAGS} ${PICFLAG} ${LDFLAGS} -shared \ + ${FC} ${CFLAGS} ${PICFLAG} ${LDFLAGS} -shared \ -o libtaucs.so.1 -Wl,-x -Wl,-soname,libtaucs.so.1 \ -Wl,--whole-archive libtaucs.a -Wl,--no-whole-archive) ${STRIP_CMD} ${WRKSRC}_SHARED/lib/FreeBSD/libtaucs.so.1 bins: lib @${PRINTF} "\n\n%s\n\n\n" "Building (dynamically-linked) executables:" #for the second pass through WRKSRC_SHARED, use a nonexistent MAKEOBJDIR to #prevent make from entering the obj subdirectories and breaking the build (see, #for example, the description of .OBJDIR in make(1)): (cd ${WRKSRC}_SHARED && \ ${SETENV} ${MAKE_ENV} MAKEOBJDIR="${NONEXISTENT}" \ ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} ${BINS:S|^|bin/FreeBSD/|}) do-build: bins do-install: ${INSTALL_DATA} ${WRKSRC}/lib/FreeBSD/libtaucs.a \ ${STAGEDIR}${PREFIX}/lib ${INSTALL_DATA} ${WRKSRC}_SHARED/lib/FreeBSD/libtaucs.so.1 \ ${STAGEDIR}${PREFIX}/lib (cd ${STAGEDIR}${PREFIX}/lib && ${LN} -s libtaucs.so.1 libtaucs.so) ${INSTALL_DATA} ${WRKSRC}/build/FreeBSD/*.h \ ${STAGEDIR}${PREFIX}/include ${INSTALL_DATA} ${WRKSRC}/src/*.h ${STAGEDIR}${PREFIX}/include (cd ${WRKSRC}_SHARED/bin/FreeBSD && \ ${INSTALL_PROGRAM} ${BINS} ${STAGEDIR}${PREFIX}/bin) .if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/doc/*.pdf ${STAGEDIR}${DOCSDIR} .endif check test: build .for t in ${TESTS} @${PRINTF} "\n%s\n" "Building test_${t}" @cd ${WRKSRC}_SHARED ; ${FC} ${FFLAGS} -Llib/FreeBSD -L./ \ ${LDFLAGS} -o bin/FreeBSD/test_${t} \ `${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} -V STDDEFS` \ `${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} -V STDINCS` \ - progs/test_${t}.c -ltaucs ${LAPACK} ${BLAS} ${LIBMETIS} + progs/test_${t}.c -ltaucs ${LAPACKLIB} ${BLASLIB} ${LIBMETIS} @${PRINTF} "\n%s\n\n\n" "Running test_${t}:" -@cd ${WRKSRC}_SHARED ; \ ${SETENV} LD_LIBRARY_PATH="lib/FreeBSD:/lib:/usr/lib:${LOCALBASE}/lib" \ bin/FreeBSD/test_${t} .endfor #be conservative, and expose a regression test target for amd64 builds only, because #some of the tests run amok during i386 tinderbox builds on amd64 hosts .if ${ARCH} == "amd64" regression-test: check .endif .include Index: head/math/taucs/files/TAUCS-license.txt =================================================================== --- head/math/taucs/files/TAUCS-license.txt (nonexistent) +++ head/math/taucs/files/TAUCS-license.txt (revision 450007) @@ -0,0 +1,17 @@ +Copyright and License + +TAUCS Version 2.0, November 29, 2001. Copyright (c) 2001, 2002, 2003 by Sivan Toledo, Tel-Aviv Univesity, stoledo@tau.ac.il. All Rights Reserved. + +TAUCS License: + +Your use or distribution of TAUCS or any derivative code implies that you agree to this License. + +THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. + +Permission is hereby granted to use or copy this program, provided that the Copyright, this License, and the Availability of the original version is retained on all copies. User documentation of any code that uses this code or any derivative code must cite the Copyright, this License, the Availability note, and "Used by permission." If this code or any derivative code is accessible from within MATLAB, then typing "help taucs" must cite the Copyright, and "type taucs" must also cite this License and the Availability note. Permission to modify the code and to distribute modified code is granted, provided the Copyright, this License, and the Availability note are retained, and a notice that the code was modified is included. This software is provided to you free of charge. + +Availability + +As of version 2.1, we distribute the code in 4 formats: zip and tarred-gzipped (tgz), with or without binaries for external libraries. The bundled external libraries should allow you to build the test programs on Linux, Windows, and MacOS X without installing additional software. We recommend that you download the full distributions, and then perhaps replace the bundled libraries by higher performance ones (e.g., with a BLAS library that is specifically optimized for your machine). If you want to conserve bandwidth and you want to install the required libraries yourself, download the lean distributions. The zip and tgz files are identical, except that on Linux, Unix, and MacOS, unpacking the tgz file ensures that the configure script is marked as executable (unpack with tar zxvpf), otherwise you will have to change its permissions manually. + +http://www.tau.ac.il/~stoledo/taucs/ Property changes on: head/math/taucs/files/TAUCS-license.txt ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/math/taucs/files/patch-config+FreeBSD.mk =================================================================== --- head/math/taucs/files/patch-config+FreeBSD.mk (revision 450006) +++ head/math/taucs/files/patch-config+FreeBSD.mk (revision 450007) @@ -1,38 +1,38 @@ ---- config/FreeBSD.mk.orig 2003-08-28 11:13:38.000000000 -0400 -+++ config/FreeBSD.mk 2012-07-10 07:43:24.000000000 -0400 -@@ -9,30 +9,24 @@ +--- config/FreeBSD.mk.orig 2003-08-28 15:13:38 UTC ++++ config/FreeBSD.mk +@@ -9,30 +9,24 @@ PATHSEP=/ DEFFLG=-D FC ?= f77 -FFLAGS += -Os -fno-second-underscore +FFLAGS += $(PICFLAG) FOUTFLG =-o #CC = cc -CFLAGS += -Os -D_POSIX_C_SOURCE=199506L -fPIC +CFLAGS += $(PICFLAG) COUTFLG = -o -LD = $(CC) -LDFLAGS = $(CFLAGS) -static +LD = $(FC) +LDFLAGS := -L$(DIRLIB) -L./ $(LDFLAGS) LOUTFLG = $(COUTFLG) -AR = ar cr +AR += cr #AOUTFLG = -RANLIB = ranlib RM = rm -rf -LIBBLAS = -L/usr/local/lib -lf77blas -lcblas -latlas -lg2c -LIBLAPACK = -L/usr/local/lib -llapack -LIBMETIS = -L/usr/local/lib -lmetis -LIBF77 = -lg2c #compat is required for ftime() -LIBC = -lm -lcompat ######################################################### Index: head/math/taucs/files/patch-configure =================================================================== --- head/math/taucs/files/patch-configure (revision 450006) +++ head/math/taucs/files/patch-configure (revision 450007) @@ -1,11 +1,11 @@ ---- configure.orig Sun Aug 24 10:11:33 2003 -+++ configure Sat Feb 26 22:24:56 2005 -@@ -29,7 +29,7 @@ +--- configure.orig 2003-08-24 10:11:33 UTC ++++ configure +@@ -29,7 +29,7 @@ fi # Solaris, OSTYPE=solaris but uname returns SunOS. if [ ${OSTYPE:-fail} = "fail" ] ; then - OSTYPE=`uname | tr "A-Z" "a-z"` + OSTYPE=`uname` fi # If nothing works, we continue, but configurator will abort Index: head/math/taucs/files/patch-src__taucs_timer.c =================================================================== --- head/math/taucs/files/patch-src__taucs_timer.c (revision 450006) +++ head/math/taucs/files/patch-src__taucs_timer.c (revision 450007) @@ -1,50 +1,50 @@ ---- src/taucs_timer.c.orig 2003-09-01 06:28:54.000000000 -0400 -+++ src/taucs_timer.c 2012-07-10 07:24:08.000000000 -0400 -@@ -245,36 +245,35 @@ +--- src/taucs_timer.c.orig 2003-09-01 10:28:54 UTC ++++ src/taucs_timer.c +@@ -245,36 +245,35 @@ double timer() #include #include #include -#include double taucs_wtime() { - struct timeb T; + struct timeval T; /*static int first_time = 1;*/ /* static time_t start_time, time_diff; - static time_t start_mill, mill_diff; + static time_t start_micro, micro_diff; */ static time_t time_diff; - static time_t mill_diff; + static time_t micro_diff; /*int rc;*/ double dt; - (void) ftime( &T ); + (void) gettimeofday( &T,NULL ); /* if (first_time) { first_time = 0; - start_time = T.time; - start_mill = T.millitm; + start_time = T.tv_sec; + start_micro = T.tv_usec; } - time_diff = T.time - start_time; - mill_diff = T.millitm - start_mill; + time_diff = T.tv_sec - start_time; + micro_diff = T.tv_usec - start_micro; */ - time_diff = T.time; - mill_diff = T.millitm; + time_diff = T.tv_sec; + micro_diff = T.tv_usec; - dt = ((double) time_diff) + (1e-3) * ((double) mill_diff); + dt = ((double) time_diff) + (1e-6) * ((double) micro_diff); return dt; }