2001-12-19 03:44:59 +00:00
|
|
|
# New ports collection Makefile for: libsvm
|
|
|
|
# Date created: Oct 28 2001
|
2002-05-21 15:26:21 +00:00
|
|
|
# Whom: Chia-Hsing Yu <me@davidyu.org>
|
2001-12-19 03:44:59 +00:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= libsvm
|
2011-04-24 04:30:35 +00:00
|
|
|
PORTVERSION= 3.10
|
2005-07-12 12:05:46 +00:00
|
|
|
PORTEPOCH= 1
|
2001-12-19 03:44:59 +00:00
|
|
|
CATEGORIES= science math
|
2004-12-11 04:39:53 +00:00
|
|
|
MASTER_SITES= http://www.csie.ntu.edu.tw/~cjlin/libsvm/ \
|
|
|
|
http://www.csie.ntu.edu.tw/~cjlin/libsvm/oldfiles/
|
2009-11-03 06:07:36 +00:00
|
|
|
DISTNAME= ${PORTNAME}-${PORTVERSION:C/0$//}
|
2001-12-19 03:44:59 +00:00
|
|
|
|
2006-06-27 03:58:58 +00:00
|
|
|
MAINTAINER= rafan@FreeBSD.org
|
2003-02-21 13:28:59 +00:00
|
|
|
COMMENT= A library for Support Vector Machines
|
2001-12-19 03:44:59 +00:00
|
|
|
|
2011-04-24 04:30:35 +00:00
|
|
|
LICENSE= BSD
|
|
|
|
LICENSE_FILE= ${WRKSRC}/COPYRIGHT
|
|
|
|
|
2008-12-22 15:48:54 +00:00
|
|
|
OPTIONS= OCFLAGS "Use optimized CFLAGS" On
|
|
|
|
|
2004-12-11 04:39:53 +00:00
|
|
|
USE_ZIP= yes
|
2004-12-19 22:15:28 +00:00
|
|
|
|
2010-04-05 10:24:25 +00:00
|
|
|
USE_LDCONFIG= yes
|
|
|
|
ALL_TARGET= all lib
|
|
|
|
|
2007-04-01 12:53:02 +00:00
|
|
|
.if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX} == "-python"
|
2004-12-13 10:33:51 +00:00
|
|
|
CATEGORIES+= python
|
2007-04-01 12:53:02 +00:00
|
|
|
|
2002-05-21 15:26:21 +00:00
|
|
|
USE_PYTHON= yes
|
2007-04-01 12:53:02 +00:00
|
|
|
|
|
|
|
MAKE_ARGS= PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR}
|
|
|
|
|
|
|
|
TXT_DOCS= README.python
|
|
|
|
|
2010-04-05 10:24:25 +00:00
|
|
|
NO_BUILD= yes
|
2007-04-01 12:53:02 +00:00
|
|
|
|
2004-12-19 22:15:28 +00:00
|
|
|
.else
|
2007-04-01 12:53:02 +00:00
|
|
|
TXT_DOCS= COPYRIGHT README FAQ.html README.tools
|
2007-04-02 19:08:56 +00:00
|
|
|
|
2007-12-12 02:04:56 +00:00
|
|
|
TOOLS= tools/checkdata.py tools/easy.py tools/grid.py tools/subset.py
|
2004-12-11 04:39:53 +00:00
|
|
|
|
2006-11-18 12:52:04 +00:00
|
|
|
SUB_FILES= pkg-message
|
|
|
|
SUB_LIST= DATADIR=${DATADIR}
|
2004-12-11 04:39:53 +00:00
|
|
|
|
|
|
|
.endif
|
|
|
|
|
2007-04-02 19:08:56 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
PORTDOCS= ${TXT_DOCS}
|
|
|
|
.endif
|
|
|
|
|
2007-04-01 12:53:02 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2008-12-22 15:48:54 +00:00
|
|
|
.if !defined(WITHOUT_OCFLAGS)
|
|
|
|
# same as LIBSVM itself
|
|
|
|
CFLAGS= -Wall -Wconversion -O3
|
|
|
|
.endif
|
|
|
|
|
2004-12-11 04:39:53 +00:00
|
|
|
post-patch:
|
2007-04-01 12:53:02 +00:00
|
|
|
.if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX} == "-python"
|
|
|
|
@${CP} ${WRKSRC}/python/README ${WRKSRC}/README.python
|
|
|
|
.else
|
|
|
|
@${CP} ${WRKSRC}/tools/README ${WRKSRC}/README.tools
|
2002-05-21 15:26:21 +00:00
|
|
|
.endif
|
|
|
|
|
2007-04-01 12:53:02 +00:00
|
|
|
.if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX} == "-python"
|
2002-05-21 15:26:21 +00:00
|
|
|
do-install:
|
2010-04-05 10:24:25 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/python/svm.py ${PYTHON_SITELIBDIR}/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/python/svmutil.py ${PYTHON_SITELIBDIR}/
|
2007-04-01 12:53:02 +00:00
|
|
|
.else
|
|
|
|
|
|
|
|
do-install:
|
2007-08-04 11:41:30 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/svm-train ${PREFIX}/bin/
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/svm-predict ${PREFIX}/bin/
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/svm-scale ${PREFIX}/bin/
|
2010-11-10 14:06:44 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/svm.h ${PREFIX}/include/
|
|
|
|
${INSTALL_LIB} ${WRKSRC}/libsvm.so.2 ${PREFIX}/lib/
|
2011-04-24 04:30:35 +00:00
|
|
|
${LN} -sf libsvm.so.2 ${PREFIX}/lib/libsvm.so
|
2004-12-11 04:39:53 +00:00
|
|
|
${MKDIR} ${DATADIR}
|
|
|
|
for f in ${TOOLS}; do \
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/$$f ${DATADIR}; \
|
|
|
|
done
|
2007-04-01 12:53:02 +00:00
|
|
|
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-install:
|
2001-12-19 03:44:59 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
2007-04-01 12:53:02 +00:00
|
|
|
@${MKDIR} ${DOCSDIR}
|
2004-12-11 04:39:53 +00:00
|
|
|
for f in ${TXT_DOCS}; do \
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/$$f ${DOCSDIR}; \
|
|
|
|
done
|
2001-12-19 03:44:59 +00:00
|
|
|
.endif
|
2007-04-01 12:53:02 +00:00
|
|
|
.if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX} != "-python"
|
|
|
|
@${ECHO_MSG} ""
|
2004-12-11 04:39:53 +00:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
2007-04-01 12:53:02 +00:00
|
|
|
@${ECHO_MSG} ""
|
|
|
|
.endif
|
2001-12-19 03:44:59 +00:00
|
|
|
|
2004-12-19 22:15:28 +00:00
|
|
|
.include <bsd.port.post.mk>
|