aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/jna
diff options
context:
space:
mode:
authorRobert Schuster <rschus@tarub.tarent.buero>2011-03-12 12:21:00 +0100
committerRobert Schuster <rschus@tarub.tarent.buero>2011-03-12 12:21:00 +0100
commit5280bbec3f6ba6902b1f7d3f2b094cc9e5e6b1b0 (patch)
treec253c67ce74f7f2fbe8f4430aaff27db44b5daa0 /recipes/jna
parent28d9710a010850638c3c867cd43b3732bbc6269f (diff)
downloadopenembedded-5280bbec3f6ba6902b1f7d3f2b094cc9e5e6b1b0.tar.gz
jna 3.2.7: Added JNA library.
Diffstat (limited to 'recipes/jna')
-rw-r--r--recipes/jna/jna/omit-native.patch13
-rw-r--r--recipes/jna/jna_3.2.7.bb40
2 files changed, 53 insertions, 0 deletions
diff --git a/recipes/jna/jna/omit-native.patch b/recipes/jna/jna/omit-native.patch
new file mode 100644
index 0000000000..2be1eed0f9
--- /dev/null
+++ b/recipes/jna/jna/omit-native.patch
@@ -0,0 +1,13 @@
+Index: jna-3.2.7/build.xml
+===================================================================
+--- jna-3.2.7.orig/build.xml 2011-03-12 11:35:30.450283882 +0100
++++ jna-3.2.7/build.xml 2011-03-12 11:35:48.000000000 +0100
+@@ -202,7 +202,7 @@
+ </srcfiles>
+ </uptodate>
+ </target>
+- <target name="jar" depends="-setup,native,:jar" unless="-jar"
++ <target name="jar" depends="-setup,:jar" unless="-jar"
+ description="Build primary jar">
+ <jar jarfile="${build}/${jar}">
+ <manifest>
diff --git a/recipes/jna/jna_3.2.7.bb b/recipes/jna/jna_3.2.7.bb
new file mode 100644
index 0000000000..2676d2e8e4
--- /dev/null
+++ b/recipes/jna/jna_3.2.7.bb
@@ -0,0 +1,40 @@
+DESCRIPTION = "Java library to dynamically access native libraries"
+LICENSES = "LGPL"
+
+HOMEPAGE = "https://jna.dev.java.net"
+
+SRC_URI = "\
+ https://svn.java.net/svn/jna~svn/tags/${PV}/jnalib/dist/src.zip;subdir=${P} \
+ file://omit-native.patch \
+ "
+
+SRC_URI[md5sum] = "ebc750bf7d1cd8148ad5d5b07adaf762"
+SRC_URI[sha256sum] = "2b32ed48744ffa1d0887c66af74ae9b6c3bfe9023933543a0e2e2ae052dff376"
+
+inherit java-library
+
+DEPENDS = "ant-native virtual/java-native libffi"
+RDEPENDS_${JPN} = "lib${PN}-jni"
+
+do_compile() {
+ # 'jar' target was patched to not include 'native' (so we have to do a steps on our own now).
+ ant -Dbuild=build compile javah jar
+
+ # Move created jar into subdir and give it proper name
+ mv build/jna.jar ${JARFILENAME}
+
+ ${CC} ${CFLAGS} ${LDFLAGS} -shared -fPIC -o libjnidispatch.so \
+ native/dispatch.c \
+ native/callback.c \
+ -Ibuild/native -I${STAGING_INCDIR}/classpath -lffi
+}
+
+do_install_append() {
+ install -d ${D}${libdir_jni}
+ oe_libinstall libjnidispatch ${D}${libdir_jni}
+}
+
+PACKAGES += "lib${PN}-jni-dbg lib${PN}-jni"
+
+FILES_lib${PN}-jni-dbg = "${libdir_jni}/.debug"
+FILES_lib${PN}-jni = "${libdir_jni}"