summaryrefslogtreecommitdiff
path: root/dev-libs/libbase58/libbase58-0.1.4-r1.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /dev-libs/libbase58/libbase58-0.1.4-r1.ebuild
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'dev-libs/libbase58/libbase58-0.1.4-r1.ebuild')
-rw-r--r--dev-libs/libbase58/libbase58-0.1.4-r1.ebuild53
1 files changed, 53 insertions, 0 deletions
diff --git a/dev-libs/libbase58/libbase58-0.1.4-r1.ebuild b/dev-libs/libbase58/libbase58-0.1.4-r1.ebuild
new file mode 100644
index 000000000000..375b6956313a
--- /dev/null
+++ b/dev-libs/libbase58/libbase58-0.1.4-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="C implementation of Bitcoin's base58 encoding"
+HOMEPAGE="https://github.com/luke-jr/libbase58"
+LICENSE="MIT"
+
+SRC_URI="https://github.com/luke-jr/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SLOT="0/0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
+IUSE="test tools"
+RESTRICT="!test? ( test )"
+
+# NOTE: If not testing, we don't need non-native libgcrypt
+RDEPEND="tools? ( dev-libs/libgcrypt )"
+DEPEND="${RDEPEND}
+ test? ( dev-libs/libgcrypt[${MULTILIB_USEDEP}] )
+"
+
+src_prepare() {
+ eapply_user
+ eautoreconf
+
+ # NOTE: Needed because test suite uses srcdir instead of builddir to set PATH and for
+ # multilib support.
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myeconf=(
+ --disable-static
+ LIBGCRYPT_CONFIG="${EPREFIX}/usr/bin/${CHOST}-libgcrypt-config"
+ )
+ if multilib_is_native_abi && use tools; then
+ myeconf+=( --enable-tool )
+ elif use test; then
+ myeconf+=( --enable-tool --bindir='/TRASH' )
+ else
+ myeconf+=( --disable-tool )
+ fi
+ econf "${myeconf[@]}"
+}
+
+multilib_src_install_all() {
+ if use test; then
+ # It's hard to control this directory with multilib_is_native_abi && use tools, hence -f.
+ rm -rf "${ED}/TRASH" || die
+ fi
+}