From: Patrice Clement Date: Mon, 31 Aug 2015 22:26:46 +0000 (+0000) Subject: dev-java/jffi: Version bump. Restrict tests for now. Keyword for ppc64. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ffd50ae2fc7ecadbf5905cbfd64cd5d009a57dbe;p=gentoo.git dev-java/jffi: Version bump. Restrict tests for now. Keyword for ppc64. Package-Manager: portage-2.2.18 Signed-off-by: Patrice Clement --- diff --git a/dev-java/jffi/Manifest b/dev-java/jffi/Manifest index e6419066fa3d..e29364c6d90e 100644 --- a/dev-java/jffi/Manifest +++ b/dev-java/jffi/Manifest @@ -3,3 +3,4 @@ DIST jffi-1.2.5.tar.gz 1798081 SHA256 2101c48855558902f2e21baacd0b2c8b7098feb3ca DIST jffi-1.2.6.tar.gz 1850410 SHA256 b568d832828bf0cb980c545e8fd16147034048ca2d3ffc62cae4f844c8cc6cec SHA512 df178691e6894599f2a45146950cca7e4c81e92c38fc751c40b39e660970c19d0dce41c9192053dddf07f42317d28033f59b7140c904784c477526e7471b6938 WHIRLPOOL adb57b9ac981177ae7d697aae41bbaaff3a38dab4c4364258b13272023076dacdd93a751eb24a339ae17a4162d4511685a4aa67afd5d8fab2f852e0403ee73f1 DIST jffi-1.2.7.tar.gz 1908203 SHA256 25f1930f294cec9651447edd08a51a990b7c92c69eca87257233e86e4dd5f979 SHA512 837ebb0085ec2acc5dc688c3e1883a7c986df62a32a41887196b88f5b5714ee667f918f2bdf005f019faae02df2f7903f291fa32c5ec3cabc360d9b1d8e4548d WHIRLPOOL 0e9824d54b21eb61142f4a868cd10122d9837c34732fc4ff9ba3093c0d4c11ee25dc0e045a40a4157faed201de9498e7cea28df85e7f14d07b58d2f4d1fb26e1 DIST jffi-1.2.8.tar.gz 1988785 SHA256 445263cd24dccc34e2bd7fb3c488aa182697b1bc3f86d3343e07183161e2986c SHA512 c6622a2cc0cd040d871417d66a074aeaad57f266559c8135692e2b76bb00f05287a4e4c4f17e8e4225c4d5e7e8941d9c883fbb4cfe5db920a79dd9a29ffea105 WHIRLPOOL 165f44b195310cf2826359d00ba74bb0eac66a47c566ec1a522df50627721c6564bd1730459098a8aa973433978fa815b3a418bbcf787b75ebf1cc3cd585909d +DIST jffi-1.2.9.tar.gz 1952668 SHA256 1cb854a913d295cb9a41cdb1349f68efe3c5d750b3135a1fa07a365d6806f5ef SHA512 2fd9a95cce9a3406a09856761d1318d4c6b976b1f9b66c7c5b0b5e95d44b19ba654ab8288f396782c7bb53e6d9949e7cfa9c46763f2a0761c6e86f102cd202e4 WHIRLPOOL 79ed9433b2b475fd9f5ae228e54bef1d637c9cdac97e63bb16f5510933707c968a0989e6eb7f09a9a79f06bb725ab5267c2373657da1daddbbbe3b093479de3b 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..1503a4525f2b --- /dev/null +++ b/dev-java/jffi/jffi-1.2.9.ebuild @@ -0,0 +1,131 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 ~ppc ~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/* +}