Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-libs/libsvm: ChangeLog libsvm-2.90.ebuild
Date: Wed, 10 Feb 2010 21:21:09
Message-Id: E1NfJzg-0000uD-0U@stork.gentoo.org
1 jlec 10/02/10 21:21:08
2
3 Modified: ChangeLog
4 Added: libsvm-2.90.ebuild
5 Log:
6 Version bump per bug 304329
7 (Portage version: 2.2_rc62/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.16 sci-libs/libsvm/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/libsvm/ChangeLog?rev=1.16&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/libsvm/ChangeLog?rev=1.16&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/libsvm/ChangeLog?r1=1.15&r2=1.16
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sci-libs/libsvm/ChangeLog,v
19 retrieving revision 1.15
20 retrieving revision 1.16
21 diff -u -r1.15 -r1.16
22 --- ChangeLog 15 Aug 2009 00:08:44 -0000 1.15
23 +++ ChangeLog 10 Feb 2010 21:21:07 -0000 1.16
24 @@ -1,6 +1,12 @@
25 # ChangeLog for sci-libs/libsvm
26 -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/ChangeLog,v 1.15 2009/08/15 00:08:44 bicatali Exp $
28 +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
29 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/ChangeLog,v 1.16 2010/02/10 21:21:07 jlec Exp $
30 +
31 +*libsvm-2.90 (10 Feb 2010)
32 +
33 + 10 Feb 2010; Justin Lecher (jlec) <jlec@g.o>
34 + +files/2.90-fpic.patch, +libsvm-2.90.ebuild, +files/2.90-ldflags.patch:
35 + Version bump per bug 304329
36
37 *libsvm-2.89 (15 Aug 2009)
38
39
40
41
42 1.1 sci-libs/libsvm/libsvm-2.90.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/libsvm/libsvm-2.90.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/libsvm/libsvm-2.90.ebuild?rev=1.1&content-type=text/plain
46
47 Index: libsvm-2.90.ebuild
48 ===================================================================
49 # Copyright 1999-2010 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/libsvm-2.90.ebuild,v 1.1 2010/02/10 21:21:07 jlec Exp $
52
53 EAPI="3"
54 SUPPORT_PYTHON_ABIS="1"
55
56 inherit eutils java-pkg-opt-2 python toolchain-funcs multilib
57
58 MY_P="${PN}-${PV%0}"
59
60 DESCRIPTION="Library for Support Vector Machines"
61 HOMEPAGE="http://www.csie.ntu.edu.tw/~cjlin/libsvm/"
62 SRC_URI="http://www.csie.ntu.edu.tw/~cjlin/libsvm/${MY_P}.tar.gz"
63
64 LICENSE="BSD"
65 SLOT="0"
66 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
67 IUSE="java python tools"
68
69 DEPEND="java? ( >=virtual/jdk-1.4 )"
70 RDEPEND="${DEPEND}
71 tools? ( sci-visualization/gnuplot )"
72
73 RESTRICT_PYTHON_ABIS="3.*"
74
75 S="${WORKDIR}"/${MY_P}
76
77 src_prepare() {
78 epatch "${FILESDIR}"/${PV}-fpic.patch
79 epatch "${FILESDIR}"/${PV}-ldflags.patch
80 python_copy_sources --no-link
81 }
82
83 src_compile() {
84 emake \
85 CXX="$(tc-getCXX)" \
86 LDFLAGS="${LDFLAGS}" \
87 CFLAGS="${CXXFLAGS}" \
88 || die "emake failed"
89
90 sed -i -e 's@\.\./@/usr/bin/@g' tools/*.py \
91 || die "Failed to fix paths in python files"
92
93 if use python ; then
94 compilation () {
95 pushd python
96 emake \
97 CXX="$(tc-getCXX)" \
98 LDFLAGS="${LDFLAGS} -shared" \
99 CFLAGS="${CXXFLAGS} -I$(python_get_includedir) -I.." \
100 all || die "emake for python modules failed"
101 popd
102 }
103 python_execute_function -s compilation
104 fi
105
106 if use java ; then
107 pushd java
108 local JAVAC_FLAGS="$(java-pkg_javac-args)"
109 sed -i \
110 -e "s/JAVAC_FLAGS =/JAVAC_FLAGS=${JAVAC_FLAGS}/g" \
111 Makefile || die "Failed to fix java makefile"
112 emake || die "emake for java modules failed"
113 popd
114 fi
115 }
116
117 src_install() {
118 dobin svm-train svm-predict svm-scale \
119 || die "Failed to install binaries"
120 dohtml FAQ.html || die
121 dodoc README || die
122
123 if use tools; then
124 pushd tools
125 insinto /usr/share/${PN}/tools
126 doins easy.py grid.py subset.py \
127 || die "Failed to install python tools"
128 docinto tools
129 dodoc README || die
130 popd
131 fi
132
133 if use python ; then
134 installation() {
135 pushd python
136 insinto $(python_get_sitedir)
137 doins svmc.so svm.py \
138 || die "Failed to install python scripts"
139 docinto python
140 dodoc README || die
141 popd
142 }
143 python_execute_function -s installation
144 fi
145
146 if use java; then
147 pushd java
148 java-pkg_dojar libsvm.jar
149 docinto java
150 dohtml test_applet.html || die
151 popd
152 fi
153 }