1 |
commit: c5b6dfd9fa5f109a3ad44d6ed972e954a2bdae1e |
2 |
Author: Valérian Rousset <tharvik <AT> users <DOT> noreply <DOT> github <DOT> com> |
3 |
AuthorDate: Thu Oct 4 17:36:08 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 21 17:42:30 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5b6dfd9 |
7 |
|
8 |
net-libs/nativebiginteger: fix build with -test |
9 |
|
10 |
Closes: https://bugs.gentoo.org/667292 |
11 |
Package-Manager: Portage-2.3.49, Repoman-2.3.11 |
12 |
Signed-off-by: Valérian Rousset <tharvik <AT> users.noreply.github.com> |
13 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
14 |
|
15 |
.../nativebiginteger-0.9.36-r1.ebuild | 70 ++++++++++++++++++++++ |
16 |
1 file changed, 70 insertions(+) |
17 |
|
18 |
diff --git a/net-libs/nativebiginteger/nativebiginteger-0.9.36-r1.ebuild b/net-libs/nativebiginteger/nativebiginteger-0.9.36-r1.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..a4f330caaee |
21 |
--- /dev/null |
22 |
+++ b/net-libs/nativebiginteger/nativebiginteger-0.9.36-r1.ebuild |
23 |
@@ -0,0 +1,70 @@ |
24 |
+# Copyright 2018 Gentoo Authors |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=6 |
28 |
+ |
29 |
+inherit java-pkg-2 toolchain-funcs |
30 |
+ |
31 |
+DESCRIPTION='jbigi library used by net-vpn/i2p' |
32 |
+HOMEPAGE='https://geti2p.net' |
33 |
+SRC_URI="https://download.i2p2.de/releases/${PV}/i2psource_${PV}.tar.bz2" |
34 |
+ |
35 |
+LICENSE='public-domain' |
36 |
+SLOT='0' |
37 |
+KEYWORDS='~amd64 ~x86' |
38 |
+IUSE='test' |
39 |
+ |
40 |
+DEPEND=' |
41 |
+ dev-libs/gmp:0= |
42 |
+ virtual/jdk:1.8 |
43 |
+' |
44 |
+RDEPEND="${DEPEND}" |
45 |
+ |
46 |
+S="${WORKDIR}/i2p-${PV}/core" |
47 |
+ |
48 |
+PATCHES=( |
49 |
+ "${FILESDIR}/${P}-asmfix.patch" |
50 |
+) |
51 |
+ |
52 |
+src_compile() { |
53 |
+ local compile_lib |
54 |
+ compile_lib() { |
55 |
+ local name="${1}" |
56 |
+ local file="${2}" |
57 |
+ shift 2 |
58 |
+ |
59 |
+ "$(tc-getCC)" "${@}" ${CFLAGS} $(java-pkg_get-jni-cflags) \ |
60 |
+ ${LDFLAGS} -shared -fPIC "-Wl,-soname,lib${name}.so" \ |
61 |
+ "${file}" -o "lib${name}.so" |
62 |
+ } |
63 |
+ |
64 |
+ cd "${S}/c/jbigi/jbigi" && |
65 |
+ compile_lib jbigi src/jbigi.c -Iinclude -lgmp || |
66 |
+ die 'unable to build jbigi' |
67 |
+ |
68 |
+ if use amd64 || use x86; then |
69 |
+ cd "${S}/c/jcpuid" && |
70 |
+ compile_lib jcpuid src/jcpuid.c -Iinclude || |
71 |
+ die 'unable to build jcpuid' |
72 |
+ fi |
73 |
+ |
74 |
+ if use test; then |
75 |
+ cd "${S}/java/src" && |
76 |
+ ejavac -encoding UTF-8 net/i2p/util/NativeBigInteger.java || |
77 |
+ die 'unable to build tests' |
78 |
+ fi |
79 |
+} |
80 |
+ |
81 |
+src_test() { |
82 |
+ cd "${S}/java/src" && |
83 |
+ "$(java-config -J)" -Djava.library.path="${S}/c/jbigi/jbigi" net/i2p/util/NativeBigInteger || |
84 |
+ die 'unable to pass tests' |
85 |
+} |
86 |
+ |
87 |
+src_install() { |
88 |
+ dolib.so c/jbigi/jbigi/libjbigi.so |
89 |
+ |
90 |
+ if use amd64 || use x86; then |
91 |
+ dolib.so c/jcpuid/libjcpuid.so |
92 |
+ fi |
93 |
+} |