ports/99189: Enhancements to math/superlu

Pedro F. Giffuni giffunip at asme.org
Mon Jun 19 22:20:16 UTC 2006


>Number:         99189
>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:   Mon Jun 19 22:20:15 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Pedro F. Giffuni
>Release:        6.1-Release
>Organization:
>Environment:
FreeBSD etoile.cable.net.co 6.1-RELEASE FreeBSD 6.1-RELEASE #1: Fri May 12 00:18:58 COT 2006     root at etoile.cable.net.co:/usr/src/sys/amd64/compile/DIMENSION  amd64
>Description:
superlu was trying to use the static atlas libs for the examples but those are not  built anymore. I replaced BLAS_LIBS with the atlas shared libs but made it a knob (WITH_ATLAS) and I am using BLAS by default instead to make it easier to have superlu packaged.

I also tried to fix the build of PetSc with superlu on amd64, but this needs more testing.
>How-To-Repeat:

>Fix:
diff -ruN superlu.orig/Makefile superlu/Makefile
--- superlu.orig/Makefile	Mon Jun 19 16:19:39 2006
+++ superlu/Makefile	Mon Jun 19 16:38:28 2006
@@ -20,19 +20,27 @@
 MAINTAINER=	maho at FreeBSD.org
 COMMENT=	A library of routines for performing sparse factorization
 
+.ifdef WITH_ATLAS
 LIB_DEPENDS=    atlas:${PORTSDIR}/math/atlas
+.else
+LIB_DEPENDS= 	blas.1:${PORTSDIR}/math/blas
+.endif
 
 P_VERSION=	3.0
 WRKSRC=		${WRKDIR}/SuperLU_${P_VERSION}
 ALL_TARGET=	superlulib
 
-BLAS_LIBS=	${LOCALBASE}/lib/libf77blas.a ${LOCALBASE}/lib/libatlas.a
+.ifdef WITH_ATLAS
+BLAS_LIBS=	-lf77blas -latlas
+.else
+BLAS_LIBS?=	-lblas
+.endif
 
 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%%+${BLAS_LIBS}+' \
+	@${REINPLACE_CMD} -e 's+%%BLAS_LIBS%%+-L${LOCALBASE}/lib ${BLAS_LIBS}+' \
 	${WRKSRC}/make.inc
 	@${REINPLACE_CMD} -e 's+%%CC%%+${CC}+' \
 	${WRKSRC}/make.inc
@@ -59,4 +67,11 @@
 	${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/superlu_ug.ps.gz ${DOCSDIR}
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
+CFLAGS+=	-fPIC
+.endif
+
+.include <bsd.port.post.mk>

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



More information about the freebsd-ports-bugs mailing list