diff options
author | Rong-En Fan <rafan@FreeBSD.org> | 2007-04-01 12:53:02 +0000 |
---|---|---|
committer | Rong-En Fan <rafan@FreeBSD.org> | 2007-04-01 12:53:02 +0000 |
commit | b3532e1dcffb058dea0753c397e18f02d92bb188 (patch) | |
tree | 8df84166693894c3e75b58b83cd508dc4c0bf6c9 /science/libsvm | |
parent | 7f82066b12f9bd4d4e96ecb9f21ae0a6048dd904 (diff) | |
download | ports-b3532e1dcffb058dea0753c397e18f02d92bb188.tar.gz ports-b3532e1dcffb058dea0753c397e18f02d92bb188.zip |
Notes
Diffstat (limited to 'science/libsvm')
-rw-r--r-- | science/libsvm/Makefile | 65 | ||||
-rw-r--r-- | science/libsvm/distinfo | 6 | ||||
-rw-r--r-- | science/libsvm/files/patch-python-Makefile | 11 | ||||
-rw-r--r-- | science/libsvm/pkg-plist | 6 |
4 files changed, 42 insertions, 46 deletions
diff --git a/science/libsvm/Makefile b/science/libsvm/Makefile index 6e265098d60e..72141fc21625 100644 --- a/science/libsvm/Makefile +++ b/science/libsvm/Makefile @@ -6,8 +6,7 @@ # PORTNAME= libsvm -PORTVERSION= 2.83 -PORTREVISION= 0 +PORTVERSION= 2.84 PORTEPOCH= 1 CATEGORIES= science math MASTER_SITES= http://www.csie.ntu.edu.tw/~cjlin/libsvm/ \ @@ -18,18 +17,24 @@ COMMENT= A library for Support Vector Machines USE_ZIP= yes -.if defined(WITH_PYTHON) +.if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX} == "-python" CATEGORIES+= python + USE_PYTHON= yes -PLIST_SUB+= LIBSVM_PYTHON="" + +MAKE_ARGS= PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR} + PYEXAMPLES= python/cross_validation.py \ python/svm_test.py \ python/test_cross_validation.py + +TXT_DOCS= README.python + +BUILD_WRKSRC= ${WRKSRC}/python + .else -PLIST_SUB+= LIBSVM_PYTHON="@comment " -.endif -TXT_DOCS= COPYRIGHT README FAQ.html README.python +TXT_DOCS= COPYRIGHT README FAQ.html README.tools .if !defined(NOPORTDOCS) PORTDOCS= ${TXT_DOCS} .endif @@ -38,50 +43,52 @@ TOOLS= tools/grid.py tools/easy.py tools/subset.py SUB_FILES= pkg-message SUB_LIST= DATADIR=${DATADIR} -.include <bsd.port.pre.mk> - -pre-everything:: -.if defined(WITH_PYTHON) - @${ECHO_CMD} "Build with Python interface." -.else - @${ECHO_CMD} "You can enable Python interface by defining WITH_PYTHON." .endif +.include <bsd.port.pre.mk> + post-patch: -.if defined(WITH_PYTHON) - @${REINPLACE_CMD} -e "s,%%PYTHON_INCLUDEDIR%%,${PYTHON_INCLUDEDIR}," ${WRKSRC}/python/Makefile -.endif -post-build: -.if defined(WITH_PYTHON) - cd ${WRKSRC}/python; ${MAKE} +post-extract: +.if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX} == "-python" + @${CP} ${WRKSRC}/python/README ${WRKSRC}/README.python +.else + @${CP} ${WRKSRC}/tools/README ${WRKSRC}/README.tools .endif +.if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX} == "-python" do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/svm-train ${TARGETDIR}/bin/ - ${INSTALL_PROGRAM} ${WRKSRC}/svm-predict ${TARGETDIR}/bin/ - ${INSTALL_PROGRAM} ${WRKSRC}/svm-scale ${TARGETDIR}/bin/ -.if defined(WITH_PYTHON) ${INSTALL_SCRIPT} ${WRKSRC}/python/svm.py ${PYTHON_SITELIBDIR}/ ${INSTALL_PROGRAM} ${WRKSRC}/python/svmc.so ${PYTHON_SITELIBDIR}/ ${MKDIR} ${EXAMPLESDIR} for f in ${PYEXAMPLES}; do \ ${INSTALL_DATA} ${WRKSRC}/$$f ${EXAMPLESDIR}; \ done -.endif + +.else + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/svm-train ${TARGETDIR}/bin/ + ${INSTALL_PROGRAM} ${WRKSRC}/svm-predict ${TARGETDIR}/bin/ + ${INSTALL_PROGRAM} ${WRKSRC}/svm-scale ${TARGETDIR}/bin/ ${MKDIR} ${DATADIR} for f in ${TOOLS}; do \ ${INSTALL_DATA} ${WRKSRC}/$$f ${DATADIR}; \ done + +.endif + +post-install: .if !defined(NOPORTDOCS) - ${MKDIR} ${DOCSDIR} - ${CP} ${WRKSRC}/python/README ${WRKSRC}/README.python + @${MKDIR} ${DOCSDIR} for f in ${TXT_DOCS}; do \ ${INSTALL_DATA} ${WRKSRC}/$$f ${DOCSDIR}; \ done .endif - @${ECHO_CMD} "" +.if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX} != "-python" + @${ECHO_MSG} "" @${CAT} ${PKGMESSAGE} - @${ECHO_CMD} "" + @${ECHO_MSG} "" +.endif .include <bsd.port.post.mk> diff --git a/science/libsvm/distinfo b/science/libsvm/distinfo index 0cadc2d6953a..4da210439a48 100644 --- a/science/libsvm/distinfo +++ b/science/libsvm/distinfo @@ -1,3 +1,3 @@ -MD5 (libsvm-2.83.zip) = fcd7a994906706f669e36ecf5e7c1ef1 -SHA256 (libsvm-2.83.zip) = 4ff5690224a2f1f511c91f222585af5873bef41645bb5b287c0a340e6d88cb73 -SIZE (libsvm-2.83.zip) = 434438 +MD5 (libsvm-2.84.zip) = 2ab586f7acc170ee8d215973f4f98297 +SHA256 (libsvm-2.84.zip) = 0651fd0fb6aef5b68945dad7b717579b18220c77e304f9317018fb19cef71cd9 +SIZE (libsvm-2.84.zip) = 434514 diff --git a/science/libsvm/files/patch-python-Makefile b/science/libsvm/files/patch-python-Makefile index f7cf19abaf1f..0dbef91c2e00 100644 --- a/science/libsvm/files/patch-python-Makefile +++ b/science/libsvm/files/patch-python-Makefile @@ -1,13 +1,8 @@ ---- python/Makefile.orig Tue Jul 12 01:11:46 2005 -+++ python/Makefile Tue Jul 12 01:11:50 2005 -@@ -1,8 +1,8 @@ +--- python/Makefile.orig Fri May 5 22:00:19 2006 ++++ python/Makefile Sun Apr 1 20:50:00 2007 +@@ -1,4 +1,4 @@ -CC = g++ +CC = ${CXX} SWIG ?= swig #Windows: see ../README ../Makefile.win --PYTHON_INCLUDEDIR ?= /usr/include/python2.4 -+PYTHON_INCLUDEDIR ?= %%PYTHON_INCLUDEDIR%% - - CFLAGS = -O3 -I$(PYTHON_INCLUDEDIR) -I.. - LDFLAGS = -shared diff --git a/science/libsvm/pkg-plist b/science/libsvm/pkg-plist index 76e989b9cb72..59b8d4f0b528 100644 --- a/science/libsvm/pkg-plist +++ b/science/libsvm/pkg-plist @@ -4,10 +4,4 @@ bin/svm-train %%DATADIR%%/grid.py %%DATADIR%%/easy.py %%DATADIR%%/subset.py -%%LIBSVM_PYTHON%%%%EXAMPLESDIR%%/cross_validation.py -%%LIBSVM_PYTHON%%%%EXAMPLESDIR%%/svm_test.py -%%LIBSVM_PYTHON%%%%EXAMPLESDIR%%/test_cross_validation.py -%%LIBSVM_PYTHON%%%%PYTHON_SITELIBDIR%%/svm.py -%%LIBSVM_PYTHON%%%%PYTHON_SITELIBDIR%%/svmc.so -%%LIBSVM_PYTHON%%@dirrm %%EXAMPLESDIR%% @dirrm %%DATADIR%% |