aboutsummaryrefslogtreecommitdiffstats
path: root/science/libsvm/Makefile
diff options
context:
space:
mode:
authorsem <sem@FreeBSD.org>2004-12-11 12:39:53 +0800
committersem <sem@FreeBSD.org>2004-12-11 12:39:53 +0800
commitaebb766ae28d58461e0f1fda25a52fa371e333ac (patch)
tree7ab0b3b331fd7c7b69338d043d6b1e130d3f9528 /science/libsvm/Makefile
parentfcd3942324b3ff90122d2efdecd4022e604b8f01 (diff)
downloadfreebsd-ports-gnome-aebb766ae28d58461e0f1fda25a52fa371e333ac.tar.gz
freebsd-ports-gnome-aebb766ae28d58461e0f1fda25a52fa371e333ac.tar.zst
freebsd-ports-gnome-aebb766ae28d58461e0f1fda25a52fa371e333ac.zip
- Update to 2.71
- Install tools - Make python interface to a slave port - Respect to CXX and CFLAGS in python/Makefile - Pass a maintainership to the submitter PR: ports/73981 Submitted by: Rong-En Fan <rafan(at)infor.org> Approved by: former maintainer
Diffstat (limited to 'science/libsvm/Makefile')
-rw-r--r--science/libsvm/Makefile59
1 files changed, 49 insertions, 10 deletions
diff --git a/science/libsvm/Makefile b/science/libsvm/Makefile
index 15f08f6c48a7..75a5e52f6d3f 100644
--- a/science/libsvm/Makefile
+++ b/science/libsvm/Makefile
@@ -6,25 +6,51 @@
#
PORTNAME= libsvm
-PORTVERSION= 2.5
+PORTVERSION= 2.71
CATEGORIES= science math
-MASTER_SITES= http://www.csie.ntu.edu.tw/~cjlin/libsvm/
+MASTER_SITES= http://www.csie.ntu.edu.tw/~cjlin/libsvm/ \
+ http://www.csie.ntu.edu.tw/~cjlin/libsvm/oldfiles/
-MAINTAINER= me@davidyu.org
+MAINTAINER= rafan@infor.org
COMMENT= A library for Support Vector Machines
+USE_ZIP= yes
.if defined(WITH_PYTHON)
USE_PYTHON= yes
-ALL_TARGET= all py
-MAKE_ARGS+= PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR}
+USE_REINPLACE= yes
PLIST_SUB+= LIBSVM_PYTHON=""
.else
PLIST_SUB+= LIBSVM_PYTHON="@comment "
+PYEXAMPLES= python/cross_validation.py \
+ python/svm_test.py \
+ python/test_cross_validation.py
.endif
+TXT_DOCS= COPYRIGHT README FAQ.html python/README.python
+.if !defined(NOPORTDOCS)
+PORTDOCS= ${TXT_DOCS}
+.endif
+TOOLS= python/grid.py python/easy.py
+
+MSG_FILE= ${PKGDIR}/pkg-message
+PKGMESSAGE= ${WRKSRC}/pkg-message
+
pre-everything::
-.if !defined(WITH_PYTHON)
- @${ECHO_MSG} "You can install python interface by defining WITH_PYTHON=yes"
+.if defined(WITH_PYTHON)
+ @${ECHO_MSG} "Build with Python interface."
+.else
+ @${ECHO_MSG} "You can enable Python interface by defining WITH_PYTHON."
+.endif
+
+post-patch:
+.if defined(WITH_PYTHON)
+ @${REINPLACE_CMD} -e "s,%%PYTHON_INCLUDEDIR%%,${PYTHON_INCLUDEDIR}," ${WRKSRC}/python/Makefile
+.endif
+ @${SED} 's|%%DATADIR%%|${DATADIR}|g' ${MSG_FILE} > ${PKGMESSAGE}
+
+post-build:
+.if defined(WITH_PYTHON)
+ cd ${WRKSRC}/python; ${MAKE}
.endif
do-install:
@@ -34,11 +60,24 @@ do-install:
.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
+ ${MKDIR} ${DATADIR}
+ for f in ${TOOLS}; do \
+ ${INSTALL_DATA} ${WRKSRC}/$$f ${DATADIR}; \
+ done
.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/COPYRIGHT ${DOCSDIR}
+ ${MKDIR} ${DOCSDIR}
+ ${CP} ${WRKSRC}/python/README ${WRKSRC}/python/README.python
+ for f in ${TXT_DOCS}; do \
+ ${INSTALL_DATA} ${WRKSRC}/$$f ${DOCSDIR}; \
+ done
.endif
+ @${ECHO} ""
+ @${CAT} ${PKGMESSAGE}
+ @${ECHO} ""
.include <bsd.port.mk>