summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2018-09-24 17:20:49 +0200
committerPatrice Clement <monsieurp@gentoo.org>2018-09-24 17:21:58 +0200
commit37863502ea06730388b4ed4f43f14612bbcd3ed8 (patch)
tree543e3981ddd12b18aeffc9d53c1ee4a4a8a91023 /net-libs/nativebiginteger/nativebiginteger-0.9.36.ebuild
parentdev-db/unixODBC: Bump to version 2.3.7 (diff)
downloadgentoo-37863502ea06730388b4ed4f43f14612bbcd3ed8.tar.gz
gentoo-37863502ea06730388b4ed4f43f14612bbcd3ed8.tar.bz2
gentoo-37863502ea06730388b4ed4f43f14612bbcd3ed8.zip
net-libs/nativebiginteger: improve ebuild.
* fix SRC_URI. * set up JVM properly and export JAVA_HOME when enabling tests. * minor comestic changes here and there. Closes: https://bugs.gentoo.org/665440 Closes: https://bugs.gentoo.org/665442 Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'net-libs/nativebiginteger/nativebiginteger-0.9.36.ebuild')
-rw-r--r--net-libs/nativebiginteger/nativebiginteger-0.9.36.ebuild31
1 files changed, 19 insertions, 12 deletions
diff --git a/net-libs/nativebiginteger/nativebiginteger-0.9.36.ebuild b/net-libs/nativebiginteger/nativebiginteger-0.9.36.ebuild
index d327fc138097..6e2963035dd2 100644
--- a/net-libs/nativebiginteger/nativebiginteger-0.9.36.ebuild
+++ b/net-libs/nativebiginteger/nativebiginteger-0.9.36.ebuild
@@ -7,7 +7,7 @@ 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"
+SRC_URI="https://download.i2p2.de/releases/${PV}/i2psource_${PV}.tar.bz2"
LICENSE="|| ( public-domain BSD MIT )"
SLOT="0"
@@ -15,18 +15,28 @@ KEYWORDS="~amd64 ~x86"
IUSE="test"
-RDEPEND="dev-libs/gmp"
+RDEPEND="dev-libs/gmp:0="
DEPEND="
${RDEPEND}
- test? ( >=virtual/jdk-1.7 )
-"
+ test? ( >=virtual/jdk-1.7 )"
-S=${WORKDIR}/i2p-${PV}/core
+S="${WORKDIR}/i2p-${PV}/core"
PATCHES=(
"${FILESDIR}/${P}"-asmfix.patch
)
+QA_PRESTRIPPED="usr/lib64/libjcpuid.so"
+
+QA_SONAME="usr/lib64/libjcpuid.so"
+
+pkg_setup() {
+ if use test; then
+ java-pkg-opt-2_pkg_setup
+ export JAVA_HOME=$(java-config -O)
+ fi
+}
+
src_compile() {
tc-export CC
@@ -34,15 +44,13 @@ src_compile() {
../../build_jbigi.sh dynamic ||
die 'unable to build jbigi'
- if use test
- then
+ 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
+ if ( use amd64 || use x86 ); then
cd "${S}/c/jcpuid" &&
./build.sh ||
die 'unable to build jcpuid'
@@ -51,15 +59,14 @@ src_compile() {
src_test() {
cd java/src &&
- java -Djava.library.path="${S}/c/jbigi/jbigi/src" net/i2p/util/NativeBigInteger ||
+ $(java-config -J) -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
+ if ( use amd64 || use x86 ); then
newlib.so \
"c/jcpuid/lib/freenet/support/CPUInformation/libjcpuid-$(tc-arch)-linux.so" \
libjcpuid.so