From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E10AB138335 for ; Sun, 21 Oct 2018 17:45:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E4CDDE0844; Sun, 21 Oct 2018 17:45:55 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B87A1E0844 for ; Sun, 21 Oct 2018 17:45:55 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B4305335D49 for ; Sun, 21 Oct 2018 17:45:53 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 39072436 for ; Sun, 21 Oct 2018 17:45:51 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1540143750.c5b6dfd9fa5f109a3ad44d6ed972e954a2bdae1e.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/nativebiginteger/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-libs/nativebiginteger/nativebiginteger-0.9.36-r1.ebuild X-VCS-Directories: net-libs/nativebiginteger/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: c5b6dfd9fa5f109a3ad44d6ed972e954a2bdae1e X-VCS-Branch: master Date: Sun, 21 Oct 2018 17:45:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: c29cea32-7626-4bd8-867a-1a0a9e97200a X-Archives-Hash: 5ad7c21bec0aa4bd80d2faed60a87e2e commit: c5b6dfd9fa5f109a3ad44d6ed972e954a2bdae1e Author: Valérian Rousset users noreply github com> AuthorDate: Thu Oct 4 17:36:08 2018 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Oct 21 17:42:30 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5b6dfd9 net-libs/nativebiginteger: fix build with -test Closes: https://bugs.gentoo.org/667292 Package-Manager: Portage-2.3.49, Repoman-2.3.11 Signed-off-by: Valérian Rousset users.noreply.github.com> Signed-off-by: Michał Górny gentoo.org> .../nativebiginteger-0.9.36-r1.ebuild | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) 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 00000000000..a4f330caaee --- /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 +}