diff options
author | tharvik <tharvik@users.noreply.github.com> | 2018-08-26 16:18:14 +0200 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2018-09-07 10:23:50 +0200 |
commit | fd6e992a45c0835bca83f25237c2b928f743d57b (patch) | |
tree | c5028291b9a555ce7b0f0cc4400908f9f28c6971 /net-libs/nativebiginteger | |
parent | app-admin/cdist: version bump. (diff) | |
download | gentoo-fd6e992a45c0835bca83f25237c2b928f743d57b.tar.gz gentoo-fd6e992a45c0835bca83f25237c2b928f743d57b.tar.bz2 gentoo-fd6e992a45c0835bca83f25237c2b928f743d57b.zip |
net-libs/nativebiginteger: bump to 0.9.36.
Closes: https://github.com/gentoo/gentoo/pull/9702
Diffstat (limited to 'net-libs/nativebiginteger')
-rw-r--r-- | net-libs/nativebiginteger/Manifest | 1 | ||||
-rw-r--r-- | net-libs/nativebiginteger/files/nativebiginteger-0.9.36-asmfix.patch | 31 | ||||
-rw-r--r-- | net-libs/nativebiginteger/nativebiginteger-0.9.36.ebuild | 67 |
3 files changed, 99 insertions, 0 deletions
diff --git a/net-libs/nativebiginteger/Manifest b/net-libs/nativebiginteger/Manifest index 8bd47c536490..18eaf831a7c4 100644 --- a/net-libs/nativebiginteger/Manifest +++ b/net-libs/nativebiginteger/Manifest @@ -1 +1,2 @@ DIST i2psource_0.8.7.tar.bz2 18473515 BLAKE2B 9f79cd2e69f26ba0fadc24b6cad0ff43301c65fd640313688687895de908c6a0c6fd9d1be6c82a6d7478cd4ecf633ce3b8fd4d200cce644512a7b4fa275a0927 SHA512 32b4eb4bf8bc7d6bb692b3ecd6b0a34c4d3d7c94b0d09a4ff330151979ccdaca9a6c88fef9b7e7965a1bba8ef54dbb710d89e0bb19265ee177ce547ff50ca969 +DIST i2psource_0.9.36.tar.bz2 29856168 BLAKE2B 0f10101b874bf6fc8415f10b08282947962a6fb8c3eaefde67d3f250d65a159551c24038625aa6712e88b368ccae38d136314025ac19fcb9dd9145251283b357 SHA512 e9023cae1c7dbdd92c9c4823497dfa8497cee3683de1232deddbdc548ba08edefe218bd81e00e952d8a95037c32de8359daaf43c2d5f25c75aba65554d2d47b4 diff --git a/net-libs/nativebiginteger/files/nativebiginteger-0.9.36-asmfix.patch b/net-libs/nativebiginteger/files/nativebiginteger-0.9.36-asmfix.patch new file mode 100644 index 000000000000..cdb8c7f64cbb --- /dev/null +++ b/net-libs/nativebiginteger/files/nativebiginteger-0.9.36-asmfix.patch @@ -0,0 +1,31 @@ +--- c/jcpuid/src/jcpuid.c 2008-10-06 09:44:53.000000000 -0400 ++++ c/jcpuid/src/jcpuid.c.new2 2010-12-27 09:41:53.000000000 -0500 +@@ -19,6 +19,7 @@ + mov d, edx + } + #else ++ #ifdef _LP64 + //Use GCC assembler notation + asm + ( +@@ -29,6 +30,20 @@ + "=d"(d) + :"a"(iFunction) + ); ++ #elif defined(__i386__) ++ asm ++ ( ++ "pushl %%ebx\n\t" ++ "cpuid\n\t" ++ "movl %%ebx, %%edi\n\t" ++ "popl %%ebx" ++ : "=a" (a), ++ "=D" (b), ++ "=c" (c), ++ "=d" (d) ++ :"a"(iFunction) ++ ); ++ #endif + #endif + return (*env)->NewObject(env, clsResult,constructor,a,b,c,d); + } diff --git a/net-libs/nativebiginteger/nativebiginteger-0.9.36.ebuild b/net-libs/nativebiginteger/nativebiginteger-0.9.36.ebuild new file mode 100644 index 000000000000..d327fc138097 --- /dev/null +++ b/net-libs/nativebiginteger/nativebiginteger-0.9.36.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils toolchain-funcs multilib java-pkg-opt-2 + +DESCRIPTION="jbigi JNI library for net.i2p.util.NativeBigInteger java-class from I2P" +HOMEPAGE="http://www.i2p2.de" +SRC_URI="http://mirror.i2p2.de/i2psource_${PV}.tar.bz2" + +LICENSE="|| ( public-domain BSD MIT )" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="test" + +RDEPEND="dev-libs/gmp" +DEPEND=" + ${RDEPEND} + test? ( >=virtual/jdk-1.7 ) +" + +S=${WORKDIR}/i2p-${PV}/core + +PATCHES=( + "${FILESDIR}/${P}"-asmfix.patch +) + +src_compile() { + tc-export CC + + cd c/jbigi/jbigi/src && + ../../build_jbigi.sh dynamic || + die 'unable to build jbigi' + + if use test + then + cd "${S}/java/src" && + ejavac -encoding UTF-8 net/i2p/util/NativeBigInteger.java || + die 'unable to build tests' + fi + + if ( use amd64 || use x86 ) + then + cd "${S}/c/jcpuid" && + ./build.sh || + die 'unable to build jcpuid' + fi +} + +src_test() { + cd java/src && + java -Djava.library.path="${S}/c/jbigi/jbigi/src" net/i2p/util/NativeBigInteger || + die 'unable to pass tests' +} + +src_install() { + dolib c/jbigi/jbigi/src/libjbigi.so + + if ( use amd64 || use x86 ) + then + newlib.so \ + "c/jcpuid/lib/freenet/support/CPUInformation/libjcpuid-$(tc-arch)-linux.so" \ + libjcpuid.so + fi +} |