summaryrefslogtreecommitdiff
path: root/net-libs/nativebiginteger
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/nativebiginteger')
-rw-r--r--net-libs/nativebiginteger/Manifest3
-rw-r--r--net-libs/nativebiginteger/metadata.xml2
-rw-r--r--net-libs/nativebiginteger/nativebiginteger-0.9.36-r1.ebuild70
3 files changed, 73 insertions, 2 deletions
diff --git a/net-libs/nativebiginteger/Manifest b/net-libs/nativebiginteger/Manifest
index 38784a3cb1ad..0efc1efb3304 100644
--- a/net-libs/nativebiginteger/Manifest
+++ b/net-libs/nativebiginteger/Manifest
@@ -7,5 +7,6 @@ AUX nativebiginteger-0.9.36-asmfix.patch 588 BLAKE2B 5bfc18fad9965210068df8cc86d
DIST i2psource_0.8.7.tar.bz2 18473515 BLAKE2B 9f79cd2e69f26ba0fadc24b6cad0ff43301c65fd640313688687895de908c6a0c6fd9d1be6c82a6d7478cd4ecf633ce3b8fd4d200cce644512a7b4fa275a0927 SHA512 32b4eb4bf8bc7d6bb692b3ecd6b0a34c4d3d7c94b0d09a4ff330151979ccdaca9a6c88fef9b7e7965a1bba8ef54dbb710d89e0bb19265ee177ce547ff50ca969
DIST i2psource_0.9.36.tar.bz2 29856168 BLAKE2B 0f10101b874bf6fc8415f10b08282947962a6fb8c3eaefde67d3f250d65a159551c24038625aa6712e88b368ccae38d136314025ac19fcb9dd9145251283b357 SHA512 e9023cae1c7dbdd92c9c4823497dfa8497cee3683de1232deddbdc548ba08edefe218bd81e00e952d8a95037c32de8359daaf43c2d5f25c75aba65554d2d47b4
EBUILD nativebiginteger-0.8.7.ebuild 1760 BLAKE2B 2b5d1d3bccc75e254674b87f53563279dc474165f48d567e4e467dbcdb24f02c17f073e88ce597ff4948054af5e0f7d256109b3e90cd40cc0b83745ba190e5a4 SHA512 b6ea041425c3a69962dce78836aa0b0ec08d25cbbe513ddc9a0cf44cfb62d6686baf2491e600abe213b672d2fa675b7d1939284dc00b5210c8432c63426968ae
+EBUILD nativebiginteger-0.9.36-r1.ebuild 1450 BLAKE2B 56c42caa16590ca0bf44f401f0a3b75b6400d71f876bc0a0279ac27b2032450fbf68af66d066d9d10804b3284ff910dda9cf7984ad1612cb177262837a618dfa SHA512 31731ab0a369bb304e45bfca41ad42f0464601a97df1202ec9d7a5e8e2734ba9e06f817416631da18594fe2e5de8342e9f9ee965524a17274d81085710a787e6
EBUILD nativebiginteger-0.9.36.ebuild 1528 BLAKE2B 6743746aca34ab8a4032a968e5bf2e1036707055ec7bbfe1f5a8cb3a1956cd1f274437db14d3e99c0f1f0732f0302e4dfdb9eb69d6c7e76bff8ddfa81ef83f6f SHA512 c9e455cd73955dbc6a65f39e4c6d83ddf5680d879871893a01656313f72fd7fcb890fa7c2cac3faf85cd1fd9606c575727ce4a6251dab1a1dfefa0ce7c71a661
-MISC metadata.xml 357 BLAKE2B 226a850638c4dba950a9a5f323e318a517dae550e18744deba0bf1252e84341c7e981aed1969ffe38dd441600cd2ca8c10793e663b1263fd311a65aa22c3c69b SHA512 77ead199b8c319b85982036765c8371a888121b3264669afb0a09aba0c79e7587f8da6910a130f737e12d395216cc0d2400ebc8877ecf14cc9e6b9ae0c31e307
+MISC metadata.xml 367 BLAKE2B e6ae176d14b1c47214343a27d2fe27d22f354879bbe3e27d01fd9fb06944ad57ca6791765dec8246e6a1583e9f66cfc72867b0f85a66f4d0752a64344d9fb5bc SHA512 a568f5918a48ac57cebe1bc19c22f8e7ee2f2e1e9710b088ae7411ae1435bc170a7e81307da909bea3781e2e3217f8791623e3b0f4a50658232af9b000bf4f2e
diff --git a/net-libs/nativebiginteger/metadata.xml b/net-libs/nativebiginteger/metadata.xml
index df6b33c99127..01c39ff1e755 100644
--- a/net-libs/nativebiginteger/metadata.xml
+++ b/net-libs/nativebiginteger/metadata.xml
@@ -3,7 +3,7 @@
<pkgmetadata>
<maintainer type="person">
<email>tharvik@gmail.com</email>
- <name>Tharvik</name>
+ <name>Valérian Rousset</name>
</maintainer>
<maintainer type="project">
<email>proxy-maint@gentoo.org</email>
diff --git a/net-libs/nativebiginteger/nativebiginteger-0.9.36-r1.ebuild b/net-libs/nativebiginteger/nativebiginteger-0.9.36-r1.ebuild
new file mode 100644
index 000000000000..a4f330caaee7
--- /dev/null
+++ b/net-libs/nativebiginteger/nativebiginteger-0.9.36-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit java-pkg-2 toolchain-funcs
+
+DESCRIPTION='jbigi library used by net-vpn/i2p'
+HOMEPAGE='https://geti2p.net'
+SRC_URI="https://download.i2p2.de/releases/${PV}/i2psource_${PV}.tar.bz2"
+
+LICENSE='public-domain'
+SLOT='0'
+KEYWORDS='~amd64 ~x86'
+IUSE='test'
+
+DEPEND='
+ dev-libs/gmp:0=
+ virtual/jdk:1.8
+'
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/i2p-${PV}/core"
+
+PATCHES=(
+ "${FILESDIR}/${P}-asmfix.patch"
+)
+
+src_compile() {
+ local compile_lib
+ compile_lib() {
+ local name="${1}"
+ local file="${2}"
+ shift 2
+
+ "$(tc-getCC)" "${@}" ${CFLAGS} $(java-pkg_get-jni-cflags) \
+ ${LDFLAGS} -shared -fPIC "-Wl,-soname,lib${name}.so" \
+ "${file}" -o "lib${name}.so"
+ }
+
+ cd "${S}/c/jbigi/jbigi" &&
+ compile_lib jbigi src/jbigi.c -Iinclude -lgmp ||
+ die 'unable to build jbigi'
+
+ if use amd64 || use x86; then
+ cd "${S}/c/jcpuid" &&
+ compile_lib jcpuid src/jcpuid.c -Iinclude ||
+ die 'unable to build jcpuid'
+ fi
+
+ if use test; then
+ cd "${S}/java/src" &&
+ ejavac -encoding UTF-8 net/i2p/util/NativeBigInteger.java ||
+ die 'unable to build tests'
+ fi
+}
+
+src_test() {
+ cd "${S}/java/src" &&
+ "$(java-config -J)" -Djava.library.path="${S}/c/jbigi/jbigi" net/i2p/util/NativeBigInteger ||
+ die 'unable to pass tests'
+}
+
+src_install() {
+ dolib.so c/jbigi/jbigi/libjbigi.so
+
+ if use amd64 || use x86; then
+ dolib.so c/jcpuid/libjcpuid.so
+ fi
+}