mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-20 04:02:27 +00:00
- Update to 2.84
- Now libsvm-python installs only python interface bits and it should be buildable on Python 2.5
This commit is contained in:
parent
7f82066b12
commit
b3532e1dcf
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=188937
@ -11,6 +11,6 @@ MAINTAINER= rafan@FreeBSD.org
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../../science/libsvm
|
||||
|
||||
WITH_PYTHON= yes
|
||||
PLIST= ${.CURDIR}/pkg-plist
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
||||
|
6
science/libsvm-python/pkg-plist
Normal file
6
science/libsvm-python/pkg-plist
Normal file
@ -0,0 +1,6 @@
|
||||
%%EXAMPLESDIR%%/cross_validation.py
|
||||
%%EXAMPLESDIR%%/svm_test.py
|
||||
%%EXAMPLESDIR%%/test_cross_validation.py
|
||||
%%PYTHON_SITELIBDIR%%/svm.py
|
||||
%%PYTHON_SITELIBDIR%%/svmc.so
|
||||
@dirrm %%EXAMPLESDIR%%
|
@ -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
|
||||
.else
|
||||
PLIST_SUB+= LIBSVM_PYTHON="@comment "
|
||||
.endif
|
||||
|
||||
TXT_DOCS= COPYRIGHT README FAQ.html README.python
|
||||
TXT_DOCS= README.python
|
||||
|
||||
BUILD_WRKSRC= ${WRKSRC}/python
|
||||
|
||||
.else
|
||||
|
||||
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}
|
||||
|
||||
.endif
|
||||
|
||||
.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
|
||||
|
||||
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>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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%%
|
||||
|
Loading…
Reference in New Issue
Block a user