Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Sep 2017 15:26:10 +0000 (UTC)
From:      Thomas Zander <riggs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r450007 - in head/math/taucs: . files
Message-ID:  <201709171526.v8HFQAPl013497@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: riggs
Date: Sun Sep 17 15:26:09 2017
New Revision: 450007
URL: https://svnweb.freebsd.org/changeset/ports/450007

Log:
  Modernise port to allow for new features in future (e.g. CilkPlus support)
  
  Details:
  - Use standard HAS_CONFIGURE instead of rolling our own
  - Use blaslapack
  - Regenerate patches with "make makepatch".
  - Add LICENSE
  - Fortran is used as linker but all the code is in C so use CFLAGS
    instead of FFLAGS.
  
  PR:		214963
  Submitted by:	pfg

Added:
  head/math/taucs/files/TAUCS-license.txt   (contents, props changed)
Modified:
  head/math/taucs/Makefile
  head/math/taucs/files/patch-config+FreeBSD.mk
  head/math/taucs/files/patch-configure
  head/math/taucs/files/patch-src__taucs_timer.c

Modified: head/math/taucs/Makefile
==============================================================================
--- head/math/taucs/Makefile	Sun Sep 17 14:43:25 2017	(r450006)
+++ head/math/taucs/Makefile	Sun Sep 17 15:26:09 2017	(r450007)
@@ -12,10 +12,15 @@ 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
 
@@ -25,28 +30,11 @@ OPTIONS_DEFINE=	DOCS
 
 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
@@ -59,9 +47,6 @@ post-patch:
 	@${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
 
@@ -75,7 +60,7 @@ archives: configure
 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
@@ -114,7 +99,7 @@ check test: build
 	${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" \

Added: head/math/taucs/files/TAUCS-license.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/taucs/files/TAUCS-license.txt	Sun Sep 17 15:26:09 2017	(r450007)
@@ -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/

Modified: head/math/taucs/files/patch-config+FreeBSD.mk
==============================================================================
--- head/math/taucs/files/patch-config+FreeBSD.mk	Sun Sep 17 14:43:25 2017	(r450006)
+++ head/math/taucs/files/patch-config+FreeBSD.mk	Sun Sep 17 15:26:09 2017	(r450007)
@@ -1,6 +1,6 @@
---- 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

Modified: head/math/taucs/files/patch-configure
==============================================================================
--- head/math/taucs/files/patch-configure	Sun Sep 17 14:43:25 2017	(r450006)
+++ head/math/taucs/files/patch-configure	Sun Sep 17 15:26:09 2017	(r450007)
@@ -1,6 +1,6 @@
---- 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

Modified: head/math/taucs/files/patch-src__taucs_timer.c
==============================================================================
--- head/math/taucs/files/patch-src__taucs_timer.c	Sun Sep 17 14:43:25 2017	(r450006)
+++ head/math/taucs/files/patch-src__taucs_timer.c	Sun Sep 17 15:26:09 2017	(r450007)
@@ -1,6 +1,6 @@
---- 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 <sys/time.h>
  #include <sys/resource.h>
  #include <sys/types.h>                                                 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709171526.v8HFQAPl013497>