enigma2 : change vfd font (skin_user.xml)
[vuplus_openembedded] / recipes / swt / swt-gtk.inc
1 DESCRIPTION = "SWT is an open source widget toolkit for Java designed to provide efficient, portable access to the user-interface facilities"
2 LICENSE = "CPL MPL LGPL"
3
4 inherit java-library
5
6 # classpath provides jni.h which is needed herein
7 DEPENDS = "fastjar-native cairo gtk+ atk libxtst classpath"
8
9 S = "${WORKDIR}/swt-source"
10
11 # A number which is used by SWT to mark the shared libraries. It can be found
12 # in the version.txt file inside the source directory.
13 SWTVERSION = ${@bb.fatal('SWTVERSION is not defined in this swt-gtk recipe!')}
14 SWT_API_VERSION = ${@bb.fatal('SWT_API_VERSION is not defined in this swt-gtk recipe!')}
15
16 do_unpackpost() {
17   if [ ! -d ${S} ]; then
18     mkdir ${S}
19     cd ${S}
20   fi
21
22   unzip -o ../src.zip
23   cp ../Makefile .
24
25   sed -i -e "s|RELEASE=OE_SWT_RELEASE|RELEASE=${PV}|" Makefile
26   sed -i -e "s|SONAME_VERSION=OE_SWT_API_VERSION|SONAME_VERSION=${SWT_API_VERSION}|" Makefile
27 }
28
29 do_compile() {
30   oe_runmake NATIVE_STATS="-I${STAGING_INCDIR}/classpath"
31 }
32
33 addtask unpackpost after do_unpack before do_patch
34
35 do_install() {
36   oe_jarinstall swt-gtk-${PV}.jar swt-gtk.jar swt.jar
37
38   oe_libinstall -so libswt-atk-gtk-${SWTVERSION} ${D}/${libdir_jni}
39   oe_libinstall -so libswt-cairo-gtk-${SWTVERSION} ${D}/${libdir_jni}  
40   oe_libinstall -so libswt-pi-gtk-${SWTVERSION} ${D}/${libdir_jni}
41   oe_libinstall -so libswt-gtk-${SWTVERSION} ${D}/${libdir_jni}
42 }
43
44 do_stage() {
45   oe_jarinstall -s swt-gtk-${PV}.jar swt-gtk.jar swt.jar
46 }
47
48 PACKAGES += "lib${PN}-jni"
49
50 FILES_lib${PN}-jni = "${libdir_jni}/lib*.so*"
51
52 RDEPENDS_${JPN} = "lib${PN}-jni"
53 RPROVIDES_${JPN} = "libswt${SWT_API_VERSION}-gtk-java"
54