diff options
Diffstat (limited to 'science/libsvm/Makefile')
-rw-r--r-- | science/libsvm/Makefile | 59 |
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> |