svn commit: r319912 - in head/math: liblbfgs libtsnnls py-symeig xblas
Baptiste Daroussin
bapt at FreeBSD.org
Tue Jun 4 21:26:54 UTC 2013
Author: bapt
Date: Tue Jun 4 21:26:52 2013
New Revision: 319912
URL: http://svnweb.freebsd.org/changeset/ports/319912
Log:
Convert to new options framework
Modified:
head/math/liblbfgs/Makefile
head/math/libtsnnls/Makefile
head/math/py-symeig/Makefile
head/math/xblas/Makefile
Modified: head/math/liblbfgs/Makefile
==============================================================================
--- head/math/liblbfgs/Makefile Tue Jun 4 21:25:59 2013 (r319911)
+++ head/math/liblbfgs/Makefile Tue Jun 4 21:26:52 2013 (r319912)
@@ -1,9 +1,5 @@
-# New ports collection makefile for: liblbfgs
-# Date created: 2010-06-08
-# Whom: Hung-Yi Chen <gaod at hychen.org>
-#
+# Created by: Hung-Yi Chen <gaod at hychen.org>
# $FreeBSD$
-#
PORTNAME= liblbfgs
PORTVERSION= 1.10
@@ -11,7 +7,7 @@ CATEGORIES= math
MASTER_SITES= http://cloud.github.com/downloads/chokkan/liblbfgs/
MAINTAINER= gaod at hychen.org
-COMMENT= A library of Limited-memory Broyden-Fletcher-Goldfarb-Shanno
+COMMENT= Library of Limited-memory Broyden-Fletcher-Goldfarb-Shanno
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/COPYING
@@ -19,16 +15,13 @@ LICENSE_FILE= ${WRKSRC}/COPYING
GNU_CONFIGURE= yes
USE_AUTOTOOLS= autoconf:env
-OPTIONS= OPTIMIZED "Enable SSE2 optimization routines" Off
+OPTIONS_DEFINE= OPTIMIZED
+OPTIMIZED_DESC= SSE2 optimization routines
-.include <bsd.port.pre.mk>
-
-.if (${OSVERSION} < 700000)
-IGNORE= does not install properly on 6.x
-.endif
+.include <bsd.port.options.mk>
# Enable/disable compilation optimizations.
-.if defined(WITH_OPTIMIZED)
+.if ${PORT_OPTIONS:MOPTIMIZED}
CONFIGURE_ARGS+= --enable-sse2
.endif
@@ -38,8 +31,8 @@ PLIST_FILES= lib/liblbfgs-1.10.so.0.0 li
PORTDOCS= README INSTALL COPYING AUTHORS ChangeLog NEWS
post-patch:
-.if defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
@${REINPLACE_CMD} -e 's/install-data-am$$//' ${WRKSRC}/Makefile.in
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Modified: head/math/libtsnnls/Makefile
==============================================================================
--- head/math/libtsnnls/Makefile Tue Jun 4 21:25:59 2013 (r319911)
+++ head/math/libtsnnls/Makefile Tue Jun 4 21:26:52 2013 (r319912)
@@ -1,9 +1,5 @@
-# New ports collection makefile for: libtsnnls
-# Date created: 18 October 2010
-# Whom: Tz-Huan Huang <tzhuan at gmail.com>
-#
+# Created by: Tz-Huan Huang <tzhuan at gmail.com>
# $FreeBSD$
-#
PORTNAME= libtsnnls
PORTVERSION= 2.3.3
@@ -17,21 +13,22 @@ GNU_CONFIGURE= yes
USE_FORTRAN= yes
USE_LDCONFIG= yes
-OPTIONS= GOTOBLAS "Use gotoblas (conflict with USE_ATLAS)" off \
- ATLAS "Use atlas (conflict with USE_GOTOBLAS)" off
+OPTIONS_DEFINE= GOTOBLAS ATLAS
+GOTOBLAS_DESC= Use gotoblas (conflict with USE_ATLAS)
+ATLAS_DESC= Use atlas (conflict with USE_GOTOBLAS)
# DMALLOC "Use dmalloc" off
.include <bsd.port.options.mk>
WITH_BLAS=reference
-.if defined(WITH_GOTOBLAS)
+.if ${PORT_OPTIONS:MGOTOBLAS}
WITH_BLAS=gotoblas
-.elif defined(WITH_ATLAS)
+.elif ${PORT_OPTIONS:MATLAS}
WITH_BLAS=atlas
.endif
# FIXME compiling error when using dmalloc
-#.if defined(WITH_DMALLOC)
+#.if ${PORT_OPTIONS:MDMALLOC}
#CONFIGURE_ARGS+=--with-dmalloc
#LIB_DEPENDS+=dmalloc.1:${PORTSDIR}/devel/dmalloc
#.endif
Modified: head/math/py-symeig/Makefile
==============================================================================
--- head/math/py-symeig/Makefile Tue Jun 4 21:25:59 2013 (r319911)
+++ head/math/py-symeig/Makefile Tue Jun 4 21:26:52 2013 (r319912)
@@ -1,9 +1,5 @@
-# Ports collection makefile for: Symeig
-# Date created: September 10, 2008
-# Whom: Li-Lun Wang <llwang at infor.org>
-#
+# Created by: Li-Lun Wang <llwang at infor.org>
# $FreeBSD$
-#
PORTNAME= symeig
PORTVERSION= 1.4
@@ -25,9 +21,12 @@ USE_FORTRAN= yes
USE_PYTHON= 2.4+
USE_PYDISTUTILS= yes
-OPTIONS= ATLAS "Use optimized blas library" OFF
+OPTIONS_DEFINE= ATLAS
+ATLAS_DESC= Use optimized blas library
-.if defined(WITH_ATLAS)
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MATLAS}
LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas
.if !exists(${LOCALBASE}/lib/libalapack.a)
IGNORE= atlas needs to be built with WITH_STATIC for symeig to function properly
Modified: head/math/xblas/Makefile
==============================================================================
--- head/math/xblas/Makefile Tue Jun 4 21:25:59 2013 (r319911)
+++ head/math/xblas/Makefile Tue Jun 4 21:26:52 2013 (r319912)
@@ -1,10 +1,5 @@
-# ex:ts=8
-# Ports collection makefile for: xblas
-# Date created: 5 January 2012
-# Whom: bf at FreeBSD.org
-#
+# Created by: bf at FreeBSD.org
# $FreeBSD$
-#
PORTNAME= xblas
PORTVERSION= 1.0.248
@@ -25,8 +20,10 @@ HEADERS= blas_dense_proto.h blas_enum.h
blas_extended_private.h blas_extended_proto.h blas_fpu.h \
blas_malloc.h f2c-bridge.h
MAKE_ENV= EXTRA_LIBS="-lm" LINKER="${CC}" M4="${M4}" RANLIB="${RANLIB}"
-OPTIONS= SHARED "Build a shared library and PIC archive" on \
- STATIC "Build a non-PIC archive" off
+OPTIONS_DEFINE= SHARED STATIC
+OPTIONS_DEFAULT= SHARED
+SHARED_DESC= Build a shared library and PIC archive
+STATIC_DESC= Build a non-PIC archive
PLIST_DIRS= ${HDIR}
PLIST_FILES= ${HEADERS:S|^|${HDIR}/|}
SHLIB_MAJOR= 0
@@ -52,11 +49,11 @@ PICFLAG= -fpic
PORTDOCS= report.ps
.endif
-.ifdef(WITH_SHARED)
+.if ${PORT_OPTIONS:MSHARED}
PLIST_FILES+= lib/libxblas_pic.a lib/libxblas.so lib/libxblas.so.${SHLIB_MAJOR}
.endif
-.ifdef(WITH_STATIC)
+.if ${PORT_OPTIONS:MSTATIC}
PLIST_FILES+= lib/libxblas.a
.endif
@@ -64,7 +61,7 @@ post-patch:
@${REINPLACE_CMD} -E \
-e '/(ARCH|CC|(C|LD)FLAGS|EXTRA_LIBS|M4|M4_OPTS|RANLIB|XBLASLIB)[[:blank:]]*=/d' \
${WRKSRC}/make.inc
-.ifdef(WITH_STATIC)
+.if ${PORT_OPTIONS:MSTATIC}
@${CP} -af ${WRKSRC} ${WRKSRC}_STATIC
.endif
@${PRINTF} "\nCFLAGS+=\t${PICFLAG}\n" >> ${WRKSRC}/make.inc
@@ -72,7 +69,7 @@ post-patch:
do-build: build-shared build-static
build-shared: patch
-.ifdef(WITH_SHARED)
+.if ${PORT_OPTIONS:MSHARED}
@cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} XBLASLIB="libxblas_pic.a" ${MAKE} \
${_MAKE_JOBS} ${MAKE_ARGS} ARCH="${AR}" lib ; \
${CC} ${CFLAGS} ${PICFLAG} ${LDFLAGS} -shared -Wl,-x \
@@ -81,7 +78,7 @@ build-shared: patch
.endif
build-static: patch
-.ifdef(WITH_STATIC)
+.if ${PORT_OPTIONS:MSTATIC}
@cd ${WRKSRC}_STATIC; ${SETENV} ${MAKE_ENV} XBLASLIB="libxblas.a" ${MAKE} \
${_MAKE_JOBS} ${MAKE_ARGS} ARCH="${AR}" lib
.endif
@@ -89,12 +86,12 @@ build-static: patch
do-install:
@${MKDIR} ${PREFIX}/${HDIR}
@cd ${WRKSRC}/src; ${INSTALL_DATA} ${HEADERS} ${PREFIX}/${HDIR}
-.ifdef(WITH_SHARED)
+.if ${PORT_OPTIONS:MSHARED}
@cd ${WRKSRC}; ${INSTALL_DATA} libxblas_pic.a \
libxblas.so.${SHLIB_MAJOR} ${PREFIX}/lib
@${LN} -sf libxblas.so.${SHLIB_MAJOR} ${PREFIX}/lib/libxblas.so
.endif
-.ifdef(WITH_STATIC)
+.if ${PORT_OPTIONS:MSTATIC}
@${INSTALL_DATA} ${WRKSRC}_STATIC/libxblas.a ${PREFIX}/lib
.endif
.ifndef(NOPORTDOCS)
@@ -105,13 +102,13 @@ do-install:
check regression-test test: test-shared test-static
test-shared: build
-.ifdef(WITH_SHARED)
+.if ${PORT_OPTIONS:MSHARED}
@cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} XBLASLIB="libxblas_pic.a" ${MAKE} \
${_MAKE_JOBS} ${MAKE_ARGS} ARCH="${AR}" tests
.endif
test-static: build
-.ifdef(WITH_STATIC)
+.if ${PORT_OPTIONS:MSTATIC}
@cd ${WRKSRC}_STATIC; ${SETENV} ${MAKE_ENV} XBLASLIB="libxblas.a" ${MAKE} \
${_MAKE_JOBS} ${MAKE_ARGS} ARCH="${AR}" tests
.endif
More information about the svn-ports-all
mailing list