blob: 2f5f1882abd18365ddb4e70e7a0788e8bf43d9c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
JAVA_PKG_IUSE="doc source"
inherit java-pkg-2 java-ant-2
DESCRIPTION="NanoXML is a small non-validating parser for Java. "
HOMEPAGE="http://nanoxml.sourceforge.net/"
MY_P=NanoXML-${PV}
SRC_URI="http://nanoxml.cyberelf.be/downloads/${MY_P}.tar.gz"
LICENSE="ZLIB"
SLOT="0"
KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
IUSE=""
COMMON_DEP="dev-java/sax"
DEPEND=">=virtual/jdk-1.4
${COMMON_DEP}"
RDEPEND=">=virtual/jre-1.4
${COMMON_DEP}"
S=${WORKDIR}/${MY_P}
src_unpack() {
unpack ${A}
cd ${S}/ThirdParty/SAX
java-pkg_jar-from sax
cd ${S}
local docsed
if use doc; then
docsed="javadoc -source $(java-pkg_get-source)"
else
docsed="true"
fi
# Use the right arguments for javac/javadoc
sed -e "s:/tmp/:${T}/:g" \
-e "s/javac/javac $(java-pkg_javac-args)/" \
-e "s/-target 1.1//" \
-e "s/javadoc/${docsed}/" \
-i build.sh || die "failed to sed"
}
src_compile() {
./build.sh || die "failed to build"
}
src_install() {
java-pkg_dojar Output/*.jar
dohtml -r Documentation/NanoXML-*
use doc && java-pkg_dojavadoc Documentation/JavaDoc
}
|