diff options
author | ijliao <ijliao@FreeBSD.org> | 2002-05-21 15:26:21 +0000 |
---|---|---|
committer | ijliao <ijliao@FreeBSD.org> | 2002-05-21 15:26:21 +0000 |
commit | 1c1e052bf229ead25308576f6da0542d9ae05a56 (patch) | |
tree | 369c2583f82b291f741d92be2faf8d3705438d61 /science/libsvm | |
parent | 9627ca39e2afe2296af4b10a7d71f6a86f5f5a68 (diff) | |
download | FreeBSD-ports-1c1e052bf229ead25308576f6da0542d9ae05a56.zip FreeBSD-ports-1c1e052bf229ead25308576f6da0542d9ae05a56.tar.gz |
* add python interface
* change maintainer email address
PR: 37919
Submitted by: maintainer
Diffstat (limited to 'science/libsvm')
-rw-r--r-- | science/libsvm/Makefile | 31 | ||||
-rw-r--r-- | science/libsvm/files/patch-Makefile | 14 | ||||
-rw-r--r-- | science/libsvm/pkg-plist.python | 2 |
3 files changed, 35 insertions, 12 deletions
diff --git a/science/libsvm/Makefile b/science/libsvm/Makefile index 729e15d..e34259b 100644 --- a/science/libsvm/Makefile +++ b/science/libsvm/Makefile @@ -1,18 +1,43 @@ # New ports collection Makefile for: libsvm # Date created: Oct 28 2001 -# Whom: Chia-Hsing Yu <davidyu@oio.cx> +# Whom: Chia-Hsing Yu <me@davidyu.org> # # $FreeBSD$ # PORTNAME= libsvm PORTVERSION= 2.33 +PORTREVISION= 1 CATEGORIES= science math MASTER_SITES= http://www.csie.ntu.edu.tw/~cjlin/libsvm/ -MAINTAINER= davidyu@oio.cx +MAINTAINER= me@davidyu.org -post-install: +.if defined(WITH_PYTHON) +USE_PYTHON= yes +PLIST= ${WRKDIR}/pkg-plist +ALL_TARGET= all py +MAKE_ARGS+= PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR} +.endif + +.if defined(WITH_PYTHON) +pre-install: + @cat ${PKGDIR}/pkg-plist.python ${PKGDIR}/pkg-plist > ${PLIST} +.endif + +pre-everything:: +.if !defined(WITH_PYTHON) + @${ECHO_MSG} "You can install python interface by defining WITH_PYTHON=yes" +.endif + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/svm-train ${PREFIX}/bin/ + ${INSTALL_PROGRAM} ${WRKSRC}/svm-predict ${PREFIX}/bin/ + ${INSTALL_PROGRAM} ${WRKSRC}/svm-scale ${PREFIX}/bin/ +.if defined(WITH_PYTHON) + ${INSTALL_SCRIPT} ${WRKSRC}/python/svm.py ${PYTHON_SITELIBDIR}/ + ${INSTALL_PROGRAM} ${WRKSRC}/python/svmc.so ${PYTHON_SITELIBDIR}/ +.endif .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/libsvm diff --git a/science/libsvm/files/patch-Makefile b/science/libsvm/files/patch-Makefile index 3c2c854..800400c 100644 --- a/science/libsvm/files/patch-Makefile +++ b/science/libsvm/files/patch-Makefile @@ -1,7 +1,5 @@ -$FreeBSD$ - ---- Makefile.orig Sat Sep 22 11:04:16 2001 -+++ Makefile Tue Dec 18 22:39:11 2001 +--- Makefile.orig Sat Sep 22 23:04:16 2001 ++++ Makefile Fri May 10 14:40:09 2002 @@ -1,5 +1,5 @@ -CXXC = g++ -CFLAGS = -Wall -O3 -g @@ -10,11 +8,9 @@ $FreeBSD$ all: svm-train svm-predict svm-scale -@@ -13,3 +13,7 @@ +@@ -13,3 +13,5 @@ $(CXXC) $(CFLAGS) -c svm.cpp clean: rm -f *~ svm.o svm-train svm-predict svm-scale -+ -+install: -+ install -d ${PREFIX}/bin/ -+ install -s -c -m 755 svm-train svm-predict svm-scale ${PREFIX}/bin/ ++py: ++ cd python; $(MAKE) PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR} diff --git a/science/libsvm/pkg-plist.python b/science/libsvm/pkg-plist.python new file mode 100644 index 0000000..cf9d92b --- /dev/null +++ b/science/libsvm/pkg-plist.python @@ -0,0 +1,2 @@ +lib/%%PYTHON_VERSION%%/site-packages/svm.py +lib/%%PYTHON_VERSION%%/site-packages/svmc.so |