/[gentoo-x86]/dev-util/weka/weka-3.5.8.ebuild
Gentoo

Contents of /dev-util/weka/weka-3.5.8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Nov 1 10:09:26 2008 UTC (5 years, 10 months ago) by serkan
Branch: MAIN
Version bump. Remove old. Fixes bug #213183.
(Portage version: 2.2_rc12/cvs/Linux 2.6.25-gentoo-r7 x86_64)

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-util/weka/weka-3.5.7.ebuild,v 1.5 2008/07/01 20:24:10 ken69267 Exp $
4
5 JAVA_PKG_IUSE="doc source"
6
7 inherit eutils java-pkg-2 versionator
8
9 MY_P="${PN}-$(replace_all_version_separators '-')"
10 DESCRIPTION="A Java data mining package"
11 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip"
12 HOMEPAGE="http://www.cs.waikato.ac.nz/ml/weka/"
13 SLOT="0"
14 LICENSE="GPL-2"
15 KEYWORDS="~amd64 ~ppc ~x86"
16 DEPEND=">=virtual/jdk-1.5
17 app-arch/unzip"
18 RDEPEND=">=virtual/jre-1.5"
19 IUSE=""
20
21 S="${WORKDIR}/${MY_P}"
22
23 src_unpack() {
24 unpack ${A}
25 cd "${S}"
26
27 unzip -qq "${PN}-src.jar" -d src || die "Failed to unpack the source"
28
29 rm -v *.jar || die
30 }
31
32 src_compile() {
33 mkdir build dist
34 echo "Compiling sources"
35 # We need to set the maximum heap size to 128m to avoid
36 # OutOfMemoryErrors
37 local mem=128
38 use amd64 && mem=256
39 find src/ -name "*.java" | xargs javac -J-Xmx${mem}m -d build \
40 $(java-pkg_javac-args) -sourcepath src/ -nowarn \
41 || die "Failed to compile sources"
42
43 echo "Copying resources"
44 cd src
45 find . -type f -not -name '*.java' -and -not -name "*.MF" -print | \
46 while read file; do
47 mkdir -p $(dirname "../build/${file}")
48 cp "${file}" "../build/${file}" || die "Failed to extract resources"
49 done
50 cd ..
51
52 echo "Creating JAR"
53 jar cf dist/${PN}.jar -C build . || die "Failed to create JAR archive"
54
55 if use doc ; then
56 mkdir -p dist/doc
57 echo "Generating javadocs"
58 find src/ -name "*.java" | xargs javadoc -d dist/doc/ \
59 -J-Xmx${mem}m -quiet || die "Failed to generate javadoc"
60 fi
61 }
62
63 src_install() {
64 java-pkg_dojar dist/*.jar
65
66 java-pkg_dolauncher weka --main "${PN}.gui.GUIChooser"
67 # Really need a virtual to list all available drivers and pull the ones
68 # instaled
69 java-pkg_register-optional-dependency hsqldb,jdbc-mysql,mckoi-1
70
71 use source && java-pkg_dosrc src/weka
72
73 dodoc README || die
74 use doc && java-pkg_dojavadoc dist/doc/
75
76 dodir /usr/share/${PN}/data/
77 insinto /usr/share/${PN}/data/
78 doins data/*
79 }

  ViewVC Help
Powered by ViewVC 1.1.20