Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jun 2008 15:11:20 GMT
From:      "Pedro F. Giffuni" <giffunip@tutopia.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/124786: Enhancements to math/superlu
Message-ID:  <200806201511.m5KFBKX5089116@www.freebsd.org>
Resent-Message-ID: <200806201520.m5KFK1wY078306@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         124786
>Category:       ports
>Synopsis:       Enhancements to math/superlu
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 20 15:20:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Pedro F. Giffuni
>Release:        6.3-Release
>Organization:
>Environment:
FreeBSD kakumen.cable.net.co 6.3-RELEASE FreeBSD 6.3-RELEASE #10: Sat Jan 19 01:13:55 COT 2008     root@kakumen.cable.net.co:/usr/src/sys/amd64/compile/SMP  amd64
>Description:
- Added target for regression-test
- This also resulted in cleanups to the build.
- This is a library, however I should note that when mixing C and gfortran (like in the test programs) we must use gfortran as a linker to avoid undefined references to the gfortran stuff.
- No functional change
>How-To-Repeat:

>Fix:
diff -ruN superlu.orig/Makefile superlu/Makefile
--- superlu.orig/Makefile	2008-06-19 17:38:56.000000000 -0500
+++ superlu/Makefile	2008-06-20 10:00:23.000000000 -0500
@@ -26,34 +26,27 @@
 .endif
 .if defined(WITH_ATLAS)
 LIB_DEPENDS+=	atlas.2:${PORTSDIR}/math/atlas
-BLAS=		-lf77blas -latlas
-LAPACK=		-lalapack
+BLAS_LIBS=	-lf77blas -latlas
 .else
 LIB_DEPENDS+=	lapack.4:${PORTSDIR}/math/lapack
 LIB_DEPENDS+=	blas.2:${PORTSDIR}/math/blas
-BLAS=		-lblas
-LAPACK=		-llapack
+BLAS_LIBS=	-lblas
 .endif
 
 USE_FORTRAN=	yes
 
 P_VERSION=	3.0
 WRKSRC=		${WRKDIR}/SuperLU_${P_VERSION}
-ALL_TARGET=	superlulib
+ALL_TARGET=	lib
 
 ARCH2FIX=	SRC/Makefile TESTING/MATGEN/Makefile CBLAS/Makefile make.inc	\
 		MAKE_INC/make.alpha MAKE_INC/make.inc
 
 post-patch:
-	@${REINPLACE_CMD} -e 's+%%BLAS_LIBS%%+-L${LOCALBASE}/lib ${BLAS_LIBS}+' \
-	${WRKSRC}/make.inc
-	@${REINPLACE_CMD} -e 's+%%CC%%+${CC}+' \
-	${WRKSRC}/make.inc
-	@${REINPLACE_CMD} -e 's+%%FC%%+${FC}+' \
-	${WRKSRC}/make.inc
-	@${REINPLACE_CMD} -e 's+%%CFLAGS%%+${CFLAGS}+' \
-	${WRKSRC}/make.inc
-	@${REINPLACE_CMD} -e 's+%%FFLAGS%%+${FFLAGS}+' \
+	@${REINPLACE_CMD} -e 's+%%BLAS_LIBS%%+-L${LOCALBASE}/lib ${BLAS_LIBS}+ ; \
+			s+%%CC%%+${CC}+; s+%%FC%%+${FC}+; \
+			s+%%CFLAGS%%+${CFLAGS}+; \
+			s+%%FFLAGS%%+${FFLAGS}+' \
 	${WRKSRC}/make.inc
 .for fmk in ${ARCH2FIX}
 	@${REINPLACE_CMD} -e 's|^ARCH *.= ar|ARCMD = ar| ; \
@@ -72,10 +65,8 @@
 	${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/superlu_ug.pdf ${DOCSDIR}
 .endif
 
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
-CFLAGS+=	-fPIC
-.endif
+regression-test: build
+	@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} testing )
+	@(cd ${WRKSRC}/TESTING && ${CAT} *.out )
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff -ruN superlu.orig/files/patch-make.inc superlu/files/patch-make.inc
--- superlu.orig/files/patch-make.inc	2008-06-19 17:38:56.000000000 -0500
+++ superlu/files/patch-make.inc	2008-06-19 22:09:19.000000000 -0500
@@ -1,5 +1,14 @@
---- make.inc.orig	Sun Jan  1 18:52:00 2006
-+++ make.inc	Sat Feb  4 19:25:37 2006
+--- make.inc.orig	2006-01-01 18:52:00.000000000 -0500
++++ make.inc	2008-06-19 22:08:49.000000000 -0500
+@@ -19,7 +19,7 @@
+ #
+ TMGLIB       = libtmglib.a
+ SUPERLULIB   = libsuperlu_3.0.a
+-BLASLIB      = ../libblas.a
++BLASLIB      = %%BLAS_LIBS%%
+ 
+ #
+ #  The archiver and the flag(s) to use when building archive (library)
 @@ -29,12 +29,12 @@
  ARCHFLAGS    = cr
  RANLIB       = ranlib
@@ -14,7 +23,7 @@
 +CFLAGS       = %%CFLAGS%%
 +FORTRAN	     = %%FC%%
 +FFLAGS       = %%FFLAGS%%
-+LOADER       = %%CC%%
++LOADER       = %%FC%%
 +LOADOPTS     = 
  
  #


>Release-Note:
>Audit-Trail:
>Unformatted:



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