summaryrefslogtreecommitdiff
path: root/recipes/rxtx/rxtx_2.1-7r2.bb
blob: d2e78b1dbdcb3252a1a62416e7fe6f6124b14dab (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
DESCRIPTION = "RXTX provides serial and parallel communication for Java applications"
LICENSE = "LGPL"
SECTION = "libs"
HOMEPAGE = "http://rxtx.org"

PR = "r3"

DEPENDS = "classpath classpath-tools-native"

inherit autotools java-library

SRC_URI = "\
    http://rxtx.qbang.org/pub/rxtx/${PN}-${PV}.zip \
    file://rxtx-fixes-from-debian.patch \
    "

do_removebinaries_append() {
	rm acinclude.m4
}

do_compile() {
  # Whatever configure detected it is completely unusable. So we override heavily.
  oe_runmake \
    JAVAH="gjavah -classpath \$(CLASSPATH) -d \$(DEST) -jni" \
    JAR=gjar \
    JAVAC="javac -classpath \$(CLASSPATH) -d \$(TOP)/ -O -source 1.3 -target 1.3" \
    JAVAINCLUDEDIR=${STAGING_INCDIR}/classpath \
		GLIBTOOL="${TARGET_SYS}-libtool --tag=CC"
}

do_install() {
  install -d ${D}/${libdir_jni}
  install -d ${D}/${datadir_java}

  oe_runmake install \
    RXTX_PATH="${D}/${libdir_jni}" \
    JHOME="${D}/${datadir_java}" \
		GLIBTOOL="${TARGET_SYS}-libtool"
}

do_stage() {
  oe_jarinstall -s RXTXcomm.jar
}

PACKAGES = "${JPN} lib${PN}-jni lib${PN}-dev lib${PN}-jni-dbg"

FILES_lib${PN}-jni = "${libdir_jni}/lib*.so"
FILES_lib${PN}-dev = "${libdir_jni}/lib*.la ${libdir_jni}/lib*.a"
FILES_lib${PN}-jni-dbg = "${libdir_jni}/.debug/lib*.so"

SRC_URI[md5sum] = "9290b4832d46199f8d798a531209640b"
SRC_URI[sha256sum] = "31db3852a86105766758975519b27d262407c96cacad4f34ad0de5aae26addd9"