blob: 4af114598dc4f34e0702832f7b99b45e8b990ba9 (
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# cp-tools OE build file
# Copyright (C) 2006, Rene Wagner. All Rights Reserved
# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
DESCRIPTION = "GNU Classpath tools (javah, javap, etc.)"
HOMEPAGE = "http://www.gnu.org/software/classpath/cp-tools/"
LICENSE = "GPLv2"
PRIORITY = "optional"
MAINTAINER = "Rene Wagner <rw@handhelds.org>"
SECTION = "utils"
inherit autotools java
FIXEDCVSDATE = "${@bb.data.getVar('PV', d, 1).split('cvs')[-1]}"
SRC_URI = "cvs://anonymous@cvs.sv.gnu.org/cvsroot/classpath;module=cp-tools;date=${FIXEDCVSDATE} \
file://bytecodejar-workaround.patch;patch=1 \
file://destdir.patch;patch=1 \
${GNU_MIRROR}/kawa/kawa-1.7.tar.gz"
S = "${WORKDIR}/cp-tools"
export CLASSPATH = ".:${STAGING_DATADIR}/classpath/glibj.zip:${WORKDIR}/bytecode.jar"
EXTRA_OECONF = "--disable-native --with-gnu-bytecode-jar=${WORKDIR}/bytecode.jar"
FILES_${PN} += "${datadir}/java"
do_configure () {
cd ${WORKDIR}/kawa-1.7
javac gnu/bytecode/*.java
zip bytecode.jar gnu/bytecode/*.class || die
mv bytecode.jar ..
cd ${S}
autotools_do_configure
}
binprograms="currencygen \
javah \
javap \
localegen \
native2ascii \
rmic \
rmiregistry \
serialver"
do_install () {
install -d ${D}${datadir}
install -d ${D}${datadir}/java
install -m 0644 cptools-0.00-cvs.jar ${D}${datadir}/java/cptools-${PV}.jar
(cd ${D}${datadir}/java && ln -sf cptools-${PV}.jar cptools-0.00-cvs.jar)
(cd ${D}${datadir}/java && ln -sf cptools-${PV}.jar cptools.jar)
install -m 0644 ${WORKDIR}/bytecode.jar ${D}${datadir}/java/
install -d ${D}${bindir}
for i in ${binprograms}; do
sed -e 's,java,java -cp .:${datadir}/java/bytecode.jar:${datadir}/java/cptools.jar,' bin/$i > bin/$i-cp
install -m 0755 bin/$i-cp ${D}${bindir}/$i-cp
done
}
pkg_postinst () {
for i in ${binprograms}; do
update-alternatives --install ${bindir}/$i $i ${bindir}/$i-cp 350
done
}
pkg_postrm_append () {
for i in ${binprograms}; do
update-alternatives --remove $i ${bindir}/$i-cp
done
}
|