summaryrefslogtreecommitdiff
path: root/science
diff options
context:
space:
mode:
authorSergey Matveychuk <sem@FreeBSD.org>2004-12-19 22:15:28 +0000
committerSergey Matveychuk <sem@FreeBSD.org>2004-12-19 22:15:28 +0000
commit2041d1980930c21b46d1f0b726d77250c2007853 (patch)
tree3017c746e861c1995d7c57f85e4e56af11b49aa3 /science
parentReset undeliverable maintainer address: (diff)
- add -fPIC for amd64
- fix pkg-plist, bump PORTREVISION Poked by pointyhat via Kris. PR: ports/75248 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=124531
Diffstat (limited to 'science')
-rw-r--r--science/libsvm/Makefile21
-rw-r--r--science/libsvm/files/patch-Makefile12
-rw-r--r--science/libsvm/files/patch-python-Makefile2
-rw-r--r--science/libsvm/pkg-message1
-rw-r--r--science/libsvm/pkg-plist4
5 files changed, 31 insertions, 9 deletions
diff --git a/science/libsvm/Makefile b/science/libsvm/Makefile
index 9152bc144fc6..55f77fb58930 100644
--- a/science/libsvm/Makefile
+++ b/science/libsvm/Makefile
@@ -7,7 +7,7 @@
PORTNAME= libsvm
PORTVERSION= 2.71
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= science math
MASTER_SITES= http://www.csie.ntu.edu.tw/~cjlin/libsvm/ \
http://www.csie.ntu.edu.tw/~cjlin/libsvm/oldfiles/
@@ -16,16 +16,17 @@ MAINTAINER= rafan@infor.org
COMMENT= A library for Support Vector Machines
USE_ZIP= yes
+USE_REINPLACE= yes
+
.if defined(WITH_PYTHON)
CATEGORIES+= python
USE_PYTHON= yes
-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
+.else
+PLIST_SUB+= LIBSVM_PYTHON="@comment "
.endif
TXT_DOCS= COPYRIGHT README FAQ.html README.python
@@ -37,6 +38,14 @@ TOOLS= python/grid.py python/easy.py
MSG_FILE= ${PKGDIR}/pkg-message
PKGMESSAGE= ${WRKSRC}/pkg-message
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "amd64"
+AMD64= -fPIC
+.else
+AMD64=
+.endif
+
pre-everything::
.if defined(WITH_PYTHON)
@${ECHO_MSG} "Build with Python interface."
@@ -47,7 +56,9 @@ pre-everything::
post-patch:
.if defined(WITH_PYTHON)
@${REINPLACE_CMD} -e "s,%%PYTHON_INCLUDEDIR%%,${PYTHON_INCLUDEDIR}," ${WRKSRC}/python/Makefile
+ @${REINPLACE_CMD} -e "s,%%AMD64%%,${AMD64}," ${WRKSRC}/python/Makefile
.endif
+ @${REINPLACE_CMD} -e "s,%%AMD64%%,${AMD64}," ${WRKSRC}/Makefile
@${SED} 's|%%DATADIR%%|${DATADIR}|g' ${MSG_FILE} > ${PKGMESSAGE}
post-build:
@@ -82,4 +93,4 @@ do-install:
@${CAT} ${PKGMESSAGE}
@${ECHO} ""
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/science/libsvm/files/patch-Makefile b/science/libsvm/files/patch-Makefile
index f45745ff642e..c64fd7b5b59d 100644
--- a/science/libsvm/files/patch-Makefile
+++ b/science/libsvm/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Tue Nov 16 00:45:06 2004
-+++ Makefile Tue Nov 16 00:46:01 2004
+--- Makefile.orig Sat Nov 20 09:35:29 2004
++++ Makefile Sat Dec 18 02:14:59 2004
@@ -1,5 +1,4 @@
-CXXC = g++
-CFLAGS = -Wall -O3
@@ -7,3 +7,11 @@
all: svm-train svm-predict svm-scale
+@@ -10,6 +9,6 @@
+ svm-scale: svm-scale.c
+ $(CXXC) $(CFLAGS) svm-scale.c -o svm-scale
+ svm.o: svm.cpp svm.h
+- $(CXXC) $(CFLAGS) -c svm.cpp
++ $(CXXC) $(CFLAGS) %%AMD64%% -c svm.cpp
+ clean:
+ rm -f *~ svm.o svm-train svm-predict svm-scale
diff --git a/science/libsvm/files/patch-python-Makefile b/science/libsvm/files/patch-python-Makefile
index 34dee6afbd37..fb0e6cd43af6 100644
--- a/science/libsvm/files/patch-python-Makefile
+++ b/science/libsvm/files/patch-python-Makefile
@@ -11,7 +11,7 @@
-CFLAGS = -O3 -I$(PYTHON_INCLUDEDIR) -I..
-LDFLAGS = -shared
-+CFLAGS += -I$(PYTHON_INCLUDEDIR) -I..
++CFLAGS += -I$(PYTHON_INCLUDEDIR) -I.. %%AMD64%%
+LDFLAGS += -shared
all: svmc.so
diff --git a/science/libsvm/pkg-message b/science/libsvm/pkg-message
index e15736d7ed83..66242c832d50 100644
--- a/science/libsvm/pkg-message
+++ b/science/libsvm/pkg-message
@@ -2,4 +2,3 @@
Some useful tools are installed to %%DATADIR%%.
Most of them are written in Python, please install
lang/python before trying them.
-
diff --git a/science/libsvm/pkg-plist b/science/libsvm/pkg-plist
index 43cfad3c77ad..1a789c2e8bf4 100644
--- a/science/libsvm/pkg-plist
+++ b/science/libsvm/pkg-plist
@@ -3,6 +3,10 @@ bin/svm-scale
bin/svm-train
%%DATADIR%%/grid.py
%%DATADIR%%/easy.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%%