summaryrefslogtreecommitdiff
path: root/dev-java/jffi
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-java/jffi
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-java/jffi')
-rw-r--r--dev-java/jffi/Manifest8
-rw-r--r--dev-java/jffi/files/jffi-1.2.8-junit-4.11.patch14
-rw-r--r--dev-java/jffi/files/jffi-1.2.8-makefile.patch52
-rw-r--r--dev-java/jffi/files/jffi_maven-build.xml259
-rw-r--r--dev-java/jffi/jffi-1.2.9.ebuild130
-rw-r--r--dev-java/jffi/metadata.xml11
6 files changed, 474 insertions, 0 deletions
diff --git a/dev-java/jffi/Manifest b/dev-java/jffi/Manifest
new file mode 100644
index 000000000000..22a0df94d0f2
--- /dev/null
+++ b/dev-java/jffi/Manifest
@@ -0,0 +1,8 @@
+AUX jffi-1.2.8-junit-4.11.patch 700 SHA256 db896154d8f55aae69f564a908ca1ea79c96af44f561bd2a1cc47a99226fef4a SHA512 9cc2d41665ec3c2271d6c1c2e66dbfb506922a290e906df51fa66c61c918e1835dcb93313077fac92a8a622f132dfee08cf3b79ebce0be3a4b104c1cbcda5ea9 WHIRLPOOL 910bfba3cc1164bc2f7197195dfb9d739e32eb406185e8027f9d47a3e3cf6759fadac01b8cdfb0127d74ffd0f487280d5dacc360a81595f3aa5e93414197081b
+AUX jffi-1.2.8-makefile.patch 1443 SHA256 377dd2eed51f174041a2270877dd35352b0d4d7b5898a967f5d8bbaed908bdee SHA512 02f28b00e1ca6d16046c5f25c38268f78a41b5b202c4f284e8dac10dc245ad150f4639849c0af8c20f50dc3e7cf715bee6dfd2f1edc48496f822d78aaef01b39 WHIRLPOOL bedaa91b31190f703385654fb4211c7a01634fd019d96b7f11359df73e74975fc98004808a870c6b00e9182bf76c47565f52495fef6009d7a4ad9f6dd2008ad0
+AUX jffi_maven-build.xml 11287 SHA256 fa81bee544d5304731268fd807c5176ffeca6d50c0882aebd2d9510118782a0b SHA512 56ebbb915d359f3eacf170d08fc1cf30f6efe900c91df0259a1fb69c6873ae839df829227b55e1538b4435387a82ec3e774180cfb531eb747e05a562aa7b97c7 WHIRLPOOL 42f50c85cad6673cff32b41593c3b30c5193b1ce204a1df6a97d68d70ee6a6cd61f2b6d887bc36002e516849d91139fa1254a76b8951e839a483865e875964a5
+DIST jffi-1.2.9.tar.gz 1952668 SHA256 1cb854a913d295cb9a41cdb1349f68efe3c5d750b3135a1fa07a365d6806f5ef SHA512 2fd9a95cce9a3406a09856761d1318d4c6b976b1f9b66c7c5b0b5e95d44b19ba654ab8288f396782c7bb53e6d9949e7cfa9c46763f2a0761c6e86f102cd202e4 WHIRLPOOL 79ed9433b2b475fd9f5ae228e54bef1d637c9cdac97e63bb16f5510933707c968a0989e6eb7f09a9a79f06bb725ab5267c2373657da1daddbbbe3b093479de3b
+EBUILD jffi-1.2.9.ebuild 3133 SHA256 7af121b1ad4c977ec17ba2bc30ee6f131b105528e6f18c0ef4b3e948c0d79a41 SHA512 d19837738e4db90dc762ea76e6e067e6270d6d11d8f50d72c52c18c542cac2a07bda089935fccd1c0392eff1b056097e5d3a1bf18e10a08de8bd0ced188bdd2b WHIRLPOOL ada80b99174ea877bb41882f5693d18a5f6e882276f20975c7fb8d30d570b32810d48bc4dc98fe47b6c90d47672df3c3bac575e54864b8bbebb4caa0290ec12e
+MISC ChangeLog 5693 SHA256 3dc2b871d1fe672571a86d74be644a9bbe4ba7d5bae3f667c80521baa931c299 SHA512 7ef2bb6a574d9a7987f3811edcb4cb1be7a10f2264a8e2f413a020cae53fdae099798567b0236f4ac3a7f6b663fba499ad90adfc4f1c2b1908ca8c6e61091ac3 WHIRLPOOL 7f157efa2571d90631e81a82f0306237574b8974000120ed1788b75187a5132df9efea6de88a763d7570f13fc5563f834f23432a382d250cfa7c873e0d156336
+MISC ChangeLog-2015 7331 SHA256 d157793bf471cf9a68b7a795452bc1a7f5e3e8b78f3b295b1c20ad2371987de6 SHA512 305bf9ee59d090d0555a03374771d7c6e2efb1080bd086da46dd5cc47408791efab1446b14ec54156a72c29f03272e6649ff960f1677cab9f1847da06304d80f WHIRLPOOL ea99e75ee7251702794f796c3f2e2c861dfc1f6b664975a8421a2065acb497a5dd30bf097f84cf9223638ecadb7986e32434dfcd6447c14d17bc55880c62a224
+MISC metadata.xml 319 SHA256 aaaaa72e37a86293e5acaf63ea5dfc76d1ddeb0d9d138ddd9da236db08a2ed38 SHA512 ed411e700c518b64ce76a437771c3a4779ebf47207d839924220ae6174ab7fd9cde92cd347c93b1916849cc2fb7fd4a5e5c29911420bc3485cb2916034d3f71b WHIRLPOOL 367a3a9783937080d317f1a8dcf72d7867085a03847f6f216db55f107e850121c48d7c9fcc3c76e51cb7a60147259a671d71d8d8a5d7e5f53d5d6ca813e6bd33
diff --git a/dev-java/jffi/files/jffi-1.2.8-junit-4.11.patch b/dev-java/jffi/files/jffi-1.2.8-junit-4.11.patch
new file mode 100644
index 000000000000..ac3843a0053a
--- /dev/null
+++ b/dev-java/jffi/files/jffi-1.2.8-junit-4.11.patch
@@ -0,0 +1,14 @@
+--- a/src/test/java/com/kenai/jffi/NumberTest.java
++++ b/src/test/java/com/kenai/jffi/NumberTest.java
+@@ -234,9 +234,8 @@
+ private void returnF32(InvokerType type) {
+ LibNumberTest lib = UnitHelper.loadTestLibrary(LibNumberTest.class, type);
+ float[] values = { 0f, 1.0f, -2.0f };
+- for (int i = 0; i < values.length; ++i) {
+- assertEquals("Value not returned correctly", values[i], lib.ret_float(values[i]), 0.1f);
+- }
++ float[] lib_values = { lib.ret_float(0f), lib.ret_float(1.0f), lib.ret_float(-2.0f) };
++ assertArrayEquals("Value not returned correctly", values, lib_values, 0.1f);
+ }
+
+ @Test public void returnDefaultF64() {
diff --git a/dev-java/jffi/files/jffi-1.2.8-makefile.patch b/dev-java/jffi/files/jffi-1.2.8-makefile.patch
new file mode 100644
index 000000000000..7f9f07a500c5
--- /dev/null
+++ b/dev-java/jffi/files/jffi-1.2.8-makefile.patch
@@ -0,0 +1,52 @@
+--- jni/GNUmakefile
++++ jni/GNUmakefile
+@@ -41,6 +41,7 @@
+ JFFI_BUILD_DIR = $(BUILD_DIR)/jffi
+
+ ifeq ($(USE_SYSTEM_LIBFFI),1)
++ LIBFFI =
+ LIBFFI_LIBS ?= $(shell pkg-config --libs libffi)
+ LIBFFI_CFLAGS ?= $(shell pkg-config --cflags libffi)
+ else
+@@ -64,9 +65,8 @@
+ OFLAGS = -O2 $(JFLAGS)
+
+ # MacOS headers aren't completely warning free, so turn them off
+-WERROR = -Werror
+ ifneq ($(OS),darwin)
+- WFLAGS += -Wundef $(WERROR)
++ WFLAGS += -Wundef
+ endif
+ WFLAGS += -W -Wall -Wno-unused -Wno-parentheses -Wno-unused-parameter
+ PICFLAGS = -fPIC
+@@ -279,7 +279,7 @@
+ @echo "JFFI_BUILD_DIR=$(JFFI_BUILD_DIR)"
+ @echo "OBJS=$(OBJS)"
+
+-$(LIBJFFI): $(OBJS) $(LIBFFI_LIBS)
++$(LIBJFFI): $(OBJS) $(LIBFFI)
+ $(CC) -o $@ $(LDFLAGS) $(SOFLAGS) $(OBJS) $(LIBFFI_LIBS) $(LIBS)
+ $(STRIP) $@
+
+@@ -291,7 +291,7 @@
+ @mkdir -p $(@D)
+ @$(CC) $(CFLAGS) -o $@ -c $<
+
+-$(OBJS) : $(LIBFFI_LIBS)
++$(OBJS) : $(LIBFFI)
+
+ ifeq ($(OS), darwin)
+ build_ffi = \
+--- libtest/GNUmakefile
++++ libtest/GNUmakefile
+@@ -44,8 +44,8 @@
+ # Compiler/linker flags from:
+ # http://weblogs.java.net/blog/kellyohair/archive/2006/01/compilation_of_1.html
+ JFLAGS = -fno-omit-frame-pointer -fno-strict-aliasing
+-OFLAGS = -O2 $(JFLAGS)
+-WFLAGS = -W -Werror -Wall -Wno-unused -Wno-unused-parameter -Wno-parentheses
++OFLAGS = $(JFLAGS)
++WFLAGS = -W -Wall -Wno-unused -Wno-unused-parameter -Wno-parentheses
+ PICFLAGS = -fPIC
+ SOFLAGS = -shared -Wl,-O1
+ LDFLAGS += $(SOFLAGS)
diff --git a/dev-java/jffi/files/jffi_maven-build.xml b/dev-java/jffi/files/jffi_maven-build.xml
new file mode 100644
index 000000000000..d8114185ee41
--- /dev/null
+++ b/dev-java/jffi/files/jffi_maven-build.xml
@@ -0,0 +1,259 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. -->
+<!-- ====================================================================== -->
+
+<!-- ====================================================================== -->
+<!-- ===================== - DO NOT EDIT THIS FILE! - ===================== -->
+<!-- ====================================================================== -->
+<!-- -->
+<!-- Any modifications will be overwritten. -->
+<!-- -->
+<!-- Generated by Maven Ant Plugin on 1/9/12 9:52 AM -->
+<!-- See: http://maven.apache.org/plugins/maven-ant-plugin/ -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<project name="jffi-from-maven" default="package" basedir=".">
+
+ <!-- ====================================================================== -->
+ <!-- Build environment properties -->
+ <!-- ====================================================================== -->
+
+ <property file="${user.home}/.m2/maven.properties"/>
+ <property file="maven-build.properties"/>
+
+ <property name="maven.build.finalName" value="jffi-1.0.11"/>
+ <property name="maven.build.dir" value="target"/>
+ <property name="maven.build.outputDir" value="${maven.build.dir}/classes"/>
+ <property name="maven.build.srcDir.0" value="src/main/java"/>
+ <property name="maven.build.resourceDir.0" value="src/main/resources"/>
+ <property name="maven.build.testOutputDir" value="${maven.build.dir}/test-classes"/>
+ <property name="maven.build.testDir.0" value="src/test/java"/>
+ <property name="maven.build.testResourceDir.0" value="src/test/resources"/>
+ <property name="maven.test.reports" value="${maven.build.dir}/test-reports"/>
+ <property name="maven.reporting.outputDirectory" value="${maven.build.dir}/site"/>
+
+ <property name="maven.repo.local" value="${user.home}/.m2/repository"/>
+ <property name="maven.settings.offline" value="false"/>
+ <property name="maven.settings.interactiveMode" value="true"/>
+
+ <!-- ====================================================================== -->
+ <!-- Defining classpaths -->
+ <!-- ====================================================================== -->
+
+ <path id="build.classpath"/>
+ <path id="build.test.classpath">
+ <pathelement location="${maven.repo.local}/junit/junit/4.8.2/junit-4.8.2.jar"/>
+ </path>
+
+ <!-- ====================================================================== -->
+ <!-- Cleaning up target -->
+ <!-- ====================================================================== -->
+
+ <target name="clean" description="Clean the output directory">
+ <delete dir="${maven.build.dir}"/>
+ </target>
+
+ <!-- ====================================================================== -->
+ <!-- Compilation target -->
+ <!-- ====================================================================== -->
+
+ <target name="compile" depends="get-deps" description="Compile the code">
+ <mkdir dir="${maven.build.outputDir}"/>
+ <javac destdir="${maven.build.outputDir}"
+ nowarn="false"
+ debug="true"
+ optimize="false"
+ deprecation="true"
+ target="1.1"
+ verbose="false"
+ fork="false"
+ source="1.3">
+ <src>
+ <pathelement location="${maven.build.srcDir.0}"/>
+ </src>
+ <classpath refid="build.classpath"/>
+ </javac>
+ </target>
+
+ <!-- ====================================================================== -->
+ <!-- Test-compilation target -->
+ <!-- ====================================================================== -->
+
+ <target name="compile-tests"
+ depends="compile"
+ description="Compile the test code"
+ unless="maven.test.skip">
+ <mkdir dir="${maven.build.testOutputDir}"/>
+ <javac destdir="${maven.build.testOutputDir}"
+ nowarn="false"
+ debug="true"
+ optimize="false"
+ deprecation="true"
+ target="1.1"
+ verbose="false"
+ fork="false"
+ source="1.3">
+ <src>
+ <pathelement location="${maven.build.testDir.0}"/>
+ </src>
+ <classpath>
+ <path refid="build.test.classpath"/>
+ <pathelement location="${maven.build.outputDir}"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <!-- ====================================================================== -->
+ <!-- Run all tests -->
+ <!-- ====================================================================== -->
+
+ <target name="test"
+ depends="compile-tests, junit-missing"
+ unless="junit.skipped"
+ description="Run the test cases">
+ <mkdir dir="${maven.test.reports}"/>
+ <junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
+ <sysproperty key="basedir" value="."/>
+ <formatter type="xml"/>
+ <formatter type="plain" usefile="false"/>
+ <classpath>
+ <path refid="build.test.classpath"/>
+ <pathelement location="${maven.build.outputDir}"/>
+ <pathelement location="${maven.build.testOutputDir}"/>
+ </classpath>
+ <batchtest todir="${maven.test.reports}" unless="test">
+ <fileset dir="${maven.build.testDir.0}">
+ <include name="**/Test*.java"/>
+ <include name="**/*Test.java"/>
+ <include name="**/*TestCase.java"/>
+ <exclude name="**/*Abstract*Test.java"/>
+ </fileset>
+ </batchtest>
+ <batchtest todir="${maven.test.reports}" if="test">
+ <fileset dir="${maven.build.testDir.0}">
+ <include name="**/${test}.java"/>
+ <exclude name="**/*Abstract*Test.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="test-junit-present">
+ <available classname="junit.framework.Test" property="junit.present"/>
+ </target>
+
+ <target name="test-junit-status"
+ depends="test-junit-present">
+ <condition property="junit.missing">
+ <and>
+ <isfalse value="${junit.present}"/>
+ <isfalse value="${maven.test.skip}"/>
+ </and>
+ </condition>
+ <condition property="junit.skipped">
+ <or>
+ <isfalse value="${junit.present}"/>
+ <istrue value="${maven.test.skip}"/>
+ </or>
+ </condition>
+ </target>
+
+ <target name="junit-missing"
+ depends="test-junit-status"
+ if="junit.missing">
+ <echo>=================================== WARNING ===================================</echo>
+ <echo> JUnit is not present in your $ANT_HOME/lib directory. Tests not executed.</echo>
+ <echo>===============================================================================</echo>
+ </target>
+
+ <!-- ====================================================================== -->
+ <!-- Javadoc target -->
+ <!-- ====================================================================== -->
+
+ <target name="javadoc" description="Generates the Javadoc of the application">
+ <javadoc sourcepath="${maven.build.srcDir.0}"
+ packagenames="*"
+ destdir="${maven.reporting.outputDirectory}/apidocs"
+ access="protected"
+ old="false"
+ verbose="false"
+ version="true"
+ use="true"
+ author="true"
+ splitindex="false"
+ nodeprecated="false"
+ nodeprecatedlist="false"
+ notree="false"
+ noindex="false"
+ nohelp="false"
+ nonavbar="false"
+ serialwarn="false"
+ charset="ISO-8859-1"
+ linksource="false"
+ breakiterator="false"/>
+ </target>
+
+ <!-- ====================================================================== -->
+ <!-- Package target -->
+ <!-- ====================================================================== -->
+
+ <target name="package" depends="compile,test" description="Package the application">
+ <jar jarfile="${maven.build.dir}/${maven.build.finalName}.jar"
+ compress="true"
+ index="false"
+ basedir="${maven.build.outputDir}"
+ excludes="**/package.html"/>
+ </target>
+
+ <!-- ====================================================================== -->
+ <!-- A dummy target for the package named after the type it creates -->
+ <!-- ====================================================================== -->
+
+ <target name="jar" depends="package" description="Builds the jar for the application"/>
+
+ <!-- ====================================================================== -->
+ <!-- Download dependencies target -->
+ <!-- ====================================================================== -->
+
+ <target name="test-offline">
+ <condition property="maven.mode.offline">
+ <equals arg1="${maven.settings.offline}" arg2="true"/>
+ </condition>
+ </target>
+
+ <target name="get-deps"
+ depends="test-offline"
+ description="Download all dependencies"
+ unless="maven.mode.offline">
+ <mkdir dir="${maven.repo.local}"/>
+ <mkdir dir="${maven.repo.local}/junit/junit/4.8.2"/>
+ <get src="http://repository.jboss.com/maven2/junit/junit/4.8.2/junit-4.8.2.jar"
+ dest="${maven.repo.local}/junit/junit/4.8.2/junit-4.8.2.jar"
+ usetimestamp="false"
+ ignoreerrors="true"/>
+ <get src="http://snapshots.jboss.org/maven2/junit/junit/4.8.2/junit-4.8.2.jar"
+ dest="${maven.repo.local}/junit/junit/4.8.2/junit-4.8.2.jar"
+ usetimestamp="false"
+ ignoreerrors="true"/>
+ <get src="http://repository.jboss.org/maven2//junit/junit/4.8.2/junit-4.8.2.jar"
+ dest="${maven.repo.local}/junit/junit/4.8.2/junit-4.8.2.jar"
+ usetimestamp="false"
+ ignoreerrors="true"/>
+ <get src="https://repository.jboss.org/nexus/content/groups/public-jboss//junit/junit/4.8.2/junit-4.8.2.jar"
+ dest="${maven.repo.local}/junit/junit/4.8.2/junit-4.8.2.jar"
+ usetimestamp="false"
+ ignoreerrors="true"/>
+ <get src="https://oss.sonatype.org/content/repositories/snapshots/junit/junit/4.8.2/junit-4.8.2.jar"
+ dest="${maven.repo.local}/junit/junit/4.8.2/junit-4.8.2.jar"
+ usetimestamp="false"
+ ignoreerrors="true"/>
+ <get src="http://repo1.maven.org/maven2/junit/junit/4.8.2/junit-4.8.2.jar"
+ dest="${maven.repo.local}/junit/junit/4.8.2/junit-4.8.2.jar"
+ usetimestamp="false"
+ ignoreerrors="true"/>
+ </target>
+
+</project>
diff --git a/dev-java/jffi/jffi-1.2.9.ebuild b/dev-java/jffi/jffi-1.2.9.ebuild
new file mode 100644
index 000000000000..51bc215bdac7
--- /dev/null
+++ b/dev-java/jffi/jffi-1.2.9.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source test"
+
+inherit eutils java-pkg-2 java-ant-2 versionator
+
+DESCRIPTION="An optimized Java interface to libffi"
+HOMEPAGE="https://github.com/jnr/jffi"
+SRC_URI="https://github.com/jnr/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="|| ( Apache-2.0 LGPL-3 )"
+SLOT="1.2"
+KEYWORDS="amd64 ~arm64 ppc64 x86 ~ppc-macos ~x64-macos ~x86-macos"
+
+CDEPEND="virtual/libffi:0"
+
+RDEPEND="${CDEPEND}
+ >=virtual/jre-1.6"
+
+DEPEND="${CDEPEND}
+ >=virtual/jdk-1.6
+ virtual/pkgconfig
+ test? (
+ dev-java/ant-junit4:0
+ dev-java/junit:4
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.2.8-makefile.patch
+ "${FILESDIR}"/${PN}-1.2.8-junit-4.11.patch
+)
+
+RESTRICT="test"
+
+java_prepare() {
+ cp "${FILESDIR}"/${PN}_maven-build.xml build.xml || die
+
+ epatch "${PATCHES[@]}"
+
+ # misc fixes for Darwin
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ local uarch
+ # don't do multiarch
+ # avoid using Xcode stuff
+ # use Prefix' headers
+ # don't mess with deployment target
+ # set install_name
+ use x64-macos && uarch=x86_64
+ use x86-macos && uarch=i386
+ use ppc-macos && uarch=ppc
+ sed -i \
+ -e "/ARCHES +=/s/=.*$/= ${uarch}/" \
+ -e "/XCODE=/s:=.*$:=${EPREFIX}:" \
+ -e "/MACSDK/s/^/#/" \
+ -e "/MACOSX_DEPLOYMENT_TARGET=/s/MAC/NOMAC/" \
+ -e "/SOFLAGS =/s:=.*:= -install_name ${EPREFIX}/usr/lib/jffi-${SLOT}/libjffi-${SLOT}.jnilib:" \
+ jni/GNUmakefile || die
+ fi
+
+ find "${WORKDIR}" -iname '*.jar' -delete || die
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+EANT_EXTRA_ARGS="-Dmaven.build.finalName=${PN}"
+
+src_compile() {
+ # generate Version.java
+ cat > src/main/java/com/kenai/jffi/Version.java <<-EOF
+ package com.kenai.jffi;
+ public final class Version {
+ private Version() {}
+ public static final int MAJOR = $(get_version_component_range 1);
+ public static final int MINOR = $(get_version_component_range 2);
+ public static final int MICRO = $(get_version_component_range 3);
+ }
+ EOF
+
+ java-pkg-2_src_compile
+
+ # generate headers
+ mkdir -p build/jni
+ javah -d build/jni -classpath target/classes \
+ com.kenai.jffi.Foreign \
+ com.kenai.jffi.ObjectBuffer \
+ com.kenai.jffi.Version \
+ || die
+
+ #build native library.
+ local args=(
+ SRC_DIR=jni
+ JNI_DIR=jni
+ BUILD_DIR=build/jni
+ VERSION=$(get_version_component_range 1-2)
+ USE_SYSTEM_LIBFFI=1
+ CCACHE=
+ -f jni/GNUmakefile
+ )
+ emake "${args[@]}"
+}
+
+EANT_TEST_GENTOO_CLASSPATH="ant-junit4,junit-4"
+
+src_test() {
+ # build native test library
+ emake BUILD_DIR=build -f libtest/GNUmakefile
+
+ _JAVA_OPTIONS="-Djffi.boot.library.path=${S}/build/jni" \
+ java-pkg-2_src_test
+}
+
+src_install() {
+ local libname=".so"
+
+ [[ ${CHOST} == *-darwin* ]] && libname=.jnilib
+ java-pkg_doso build/jni/lib${PN}-$(get_version_component_range 1-2)${libname}
+
+ # must by after _doso to have JAVA_PKG_LIBDEST set
+ cat > boot.properties <<-EOF
+ jffi.boot.library.path = ${JAVA_PKG_LIBDEST}
+ EOF
+ jar -uf target/${PN}.jar boot.properties || die
+
+ java-pkg_dojar target/${PN}.jar
+
+ use doc && java-pkg_dojavadoc target/site/apidocs
+ use source && java-pkg_dosrc src/main/java/*
+}
diff --git a/dev-java/jffi/metadata.xml b/dev-java/jffi/metadata.xml
new file mode 100644
index 000000000000..d78b07b4d6bb
--- /dev/null
+++ b/dev-java/jffi/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">jnr/jffi</remote-id>
+ </upstream>
+</pkgmetadata>