ports/93005: Minor port enhancement to math/umfpack port

Pedro F. Giffuni giffunip at asme.org
Wed Feb 8 00:50:04 UTC 2006


>Number:         93005
>Category:       ports
>Synopsis:       Minor port enhancement to math/umfpack port
>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:   Wed Feb 08 00:50:02 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Pedro F. Giffuni
>Release:        6.0R amd64
>Organization:
>Environment:
FreeBSD etoile.cable.net.co 6.0-RELEASE FreeBSD 6.0-RELEASE #11: Thu Feb  2 23:55:44 COT 2006     root at etoile.cable.net.co:/usr/src/sys/amd64/compile/DIMENSION  amd64
>Description:
              Let the cblas library get overriden from the ports makefile, also implement maintainers mode. 
FWIW, I wanted to activate LP64 for amd64 and ia64 but the author recommended not doing this as unfortunately the current BLAS libraries don't implement 64 bit extensions and this would hit performance very badly. 
>How-To-Repeat:
              
>Fix:
    Patch follows:
diff -ruN umfpack.orig/Makefile umfpack/Makefile
--- umfpack.orig/Makefile	Sun Dec 18 16:03:54 2005
+++ umfpack/Makefile	Tue Feb  7 19:40:17 2006
@@ -19,10 +19,20 @@
 WRKSRC=		${WRKDIR}/${DISTNAME}/UMFPACK
 ALL_TARGET=	lib
 
+USE_REINPLACE=	yes
+CBLAS_LIBS?=	-lcblas -latlas
+
 post-extract:
 	${CP}	${WRKDIR}/${DISTNAME}/AMD/Make/Make.linux	\
 		${WRKDIR}/${DISTNAME}/AMD/Make/Make.freebsd
 
+pre-build:
+	@${REINPLACE_CMD} -e 's+%%CC%%+${CC}+g ;	\
+	s+%%CFLAGS%%+${CFLAGS}+ ;		\
+	s+%%BLASBASE%%+${LOCALBASE}+ ;		\
+	s+%%CBLAS_LIBS%%+${CBLAS_LIBS}+ ;'	\
+	 ${WRKDIR}/${DISTNAME}/AMD/Make/Make.freebsd
+
 do-install:
 	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/AMD/Lib/libamd.a ${PREFIX}/lib
 	${INSTALL_DATA} ${WRKSRC}/Lib/libumfpack.a ${PREFIX}/lib
@@ -46,5 +56,11 @@
 	@${FIND} ${EXAMPLESDIR} | ${XARGS} ${CHOWN} ${SHAREOWN}:${SHAREGRP}
 	@${FIND} ${EXAMPLESDIR} -type f | ${XARGS} ${CHMOD} ${SHAREMODE}
 .endif
+
+.if defined(MAINTAINER_MODE)
+test:	build
+	@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} $(MAKE) hb )
+.endif
+
 
 .include <bsd.port.mk>
diff -ruN umfpack.orig/files/patch-Make+Make.freebsd umfpack/files/patch-Make+Make.freebsd
--- umfpack.orig/files/patch-Make+Make.freebsd	Sun Dec 18 16:03:54 2005
+++ umfpack/files/patch-Make+Make.freebsd	Tue Feb  7 19:39:19 2006
@@ -1,13 +1,13 @@
---- Make/Make.freebsd.orig	Fri Mar 18 22:29:13 2005
-+++ Make/Make.freebsd	Fri Mar 18 22:30:13 2005
+--- Make/Make.freebsd.orig	Sat Jan 14 17:09:34 2006
++++ Make/Make.freebsd	Sat Jan 14 17:13:14 2006
 @@ -6,8 +6,8 @@
  # if you use the Intel compiler and the Fortran BLAS.
  
  # Using GNU gcc and f77 compilers:
 -  CC = gcc
 -  CFLAGS = -O3 -fPIC
-+  CC ?= cc
-+  CFLAGS ?= -O3 -fPIC
++  CC = %%CC%%
++  CFLAGS = %%CFLAGS%% -fPIC
  
  # Using Intel's icc and ifc compilers:
  # F77 = ifc
@@ -17,14 +17,14 @@
  # 2: with the ATLAS C-BLAS (http://www.netlib.org/atlas).
 -# CONFIG = -DCBLAS -I../ATLAS/include
 -# LIB = -lcblas -latlas -lm
-+CONFIG = -DCBLAS -I../ATLAS/include -I${LOCALBASE}/include
-+LIB = -L${LOCALBASE}/lib -lcblas -latlas -lm
++CONFIG = -DGETRUSAGE -DCBLAS -I../ATLAS/include -I%%BLASBASE%%/include
++LIB = -L%%BLASBASE%%/lib %%CBLAS_LIBS%% -lm
  
  # 3: with Fortran interface to the ATLAS BLAS
 -# CONFIG =
 -# LIB = -lf77blas -latlas -lfrtbegin -lg2c -lm
-+# CONFIG = -I${LOCALBASE}/include
-+# LIB = -L${LOCALBASE}/lib -lf77blas -latlas -lfrtbegin -lg2c -lm
++# CONFIG = -I%%BLASBASE%%/include
++# LIB = -L%%BLASBASE%%/lib -lf77blas -latlas -lfrtbegin -lg2c -lm
  
  # 4: with Fortran interface to the BLAS, and Goto's BLAS
 -  CONFIG =

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



More information about the freebsd-ports-bugs mailing list