]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/kaffe/kaffe.inc
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / kaffe / kaffe.inc
1 DESCRIPTION = "Kaffe is a clean room implementation of the Java Virtual Machine"
2 HOMEPAGE = "http://www.kaffe.org/"
3 LICENSE  = "GPL LGPL W3C Classpath BSD"
4
5 DEPENDS = "jikes-native fastjar-native libffi zip-native"
6
7 SRC_URI += "file://disable-automake-checks.patch;patch=1"
8
9 inherit autotools gettext
10
11 EXTRA_OECONF = "--with-engine=intrp \
12         --with-libffi \
13         --with-threads=unix-pthreads \
14         --disable-alsatest \
15         --disable-esdtest \
16         --disable-sound \
17         --with-jikes"
18
19 CFLAGS += "-D_GNU_SOURCE"
20
21 # kaffe installs to non-standard locations. apply a similar workaround to 
22 # the one used in debian. i.e. override prefix
23 oe_runconf () {
24         if [ -x ${S}/configure ] ; then
25                 cfgcmd="${S}/configure \
26                     --build=${BUILD_SYS} \
27                     --host=${HOST_SYS} \
28                     --target=${TARGET_SYS} \
29                     --prefix=${libdir}/${PN} \
30                     --datadir=${datadir} \
31                     --sysconfdir=${sysconfdir} \
32                     --sharedstatedir=${sharedstatedir}/${PN} \
33                     --includedir=${includedir} \
34                     --oldincludedir=${oldincludedir} \
35                     --infodir=${infodir} \
36                     --mandir=${mandir} \
37                         ${EXTRA_OECONF} \
38                     $@"
39                 oenote "Running $cfgcmd..."
40                 $cfgcmd || oefatal "oe_runconf failed" 
41         else
42                 oefatal "no configure script found"
43         fi
44 }
45
46 PACKAGES =+ "${PN}-common"
47 FILES_${PN} += "${libdir}/${PN}"
48 RDEPENDS_${PN} = "${PN}-common (>= ${PV})"
49 FILES_${PN}-common = "${libdir}/${PN}/jre/lib/*.jar"
50
51 do_install () {
52         autotools_do_install
53
54         # move partially duplicate stuff to a single location
55         mv -f ${D}${libdir}/${PN}/bin/* ${D}${libdir}/${PN}/jre/bin
56         rmdir ${D}${libdir}/${PN}/bin
57         cd ${D}${libdir}/${PN} && ln -s jre/bin
58 }
59
60 # use update-alternatives for the various wrapper scripts
61 alternative_names = "appletviewer \
62 install-jar \
63 jar \
64 java \
65 javac \
66 javadoc \
67 javah \
68 javap \
69 kaffe \
70 kaffeh \
71 native2ascii \
72 rmic \
73 rmiregistry \
74 serialver"
75
76 pkg_postinst_${PN} () {
77         for name in ${alternative_names}; do
78                 update-alternatives --install ${bindir}/$name $name ${libdir}/${PN}/jre/bin/$name 300
79         done
80 }
81
82 pkg_postrm_${PN} () {
83         for name in ${alternative_names}; do
84                 update-alternatives --remove $name ${libdir}/${PN}/jre/bin/$name
85         done
86 }