Skip to content

Commit 0edd048

Browse files
committed
net-libs/libwally-core: enable multilib build
1 parent 3de7be7 commit 0edd048

File tree

2 files changed

+34
-20
lines changed

2 files changed

+34
-20
lines changed

net-libs/libwally-core/libwally-core-0.8.5.ebuild

+7-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
EAPI=7
55

6-
inherit autotools
6+
inherit autotools multilib-minimal
77

88
DESCRIPTION="Collection of useful primitives for cryptocurrency wallets"
99
HOMEPAGE="https://github.com/ElementsProject/libwally-core"
@@ -18,8 +18,8 @@ RESTRICT="!test? ( test )"
1818
# TODO: python, java, js
1919

2020
DEPEND="
21-
!elements? ( >=dev-libs/libsecp256k1-0.1.0_pre20220329[ecdh,recovery] )
22-
elements? ( >=dev-libs/libsecp256k1-zkp-0.1.0_pre20220401[ecdh,ecdsa-s2c,generator,rangeproof,recovery,surjectionproof,whitelist] )
21+
!elements? ( >=dev-libs/libsecp256k1-0.1.0_pre20220329[${MULTILIB_USEDEP},ecdh,recovery] )
22+
elements? ( >=dev-libs/libsecp256k1-zkp-0.1.0_pre20220401[${MULTILIB_USEDEP},ecdh,ecdsa-s2c,generator,rangeproof,recovery,surjectionproof,whitelist] )
2323
"
2424
RDEPEND="${DEPEND}
2525
!<net-p2p/core-lightning-0.9.3-r2
@@ -57,8 +57,9 @@ src_prepare() {
5757
eautoreconf
5858
}
5959

60-
src_configure() {
61-
econf --includedir="${EPREFIX}"/usr/include/libwally/ \
60+
multilib_src_configure() {
61+
ECONF_SOURCE="${S}" econf \
62+
--includedir="${EPREFIX}/usr/include/libwally" \
6263
--enable-export-all \
6364
$(use_enable test tests) \
6465
$(use_enable elements) \
@@ -67,7 +68,7 @@ src_configure() {
6768
$(use_enable asm)
6869
}
6970

70-
src_install() {
71+
multilib_src_install_all() {
7172
default
7273
find "${ED}" -name '*.la' -delete || die
7374
}

net-libs/libwally-core/libwally-core-0.8.6.ebuild

+27-14
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{8..11} )
77
DISTUTILS_OPTIONAL=1
88
DISTUTILS_USE_PEP517=setuptools
99

10-
inherit autotools distutils-r1 java-pkg-opt-2
10+
inherit autotools distutils-r1 java-pkg-opt-2 multilib-minimal
1111

1212
PATCH_HASHES=(
1313
5a1fef754c72902c734370ea5d74a891c5d3db5d # src/Makefile.am: add missing headers to install
@@ -34,8 +34,8 @@ RESTRICT="!test? ( test )"
3434

3535
JAVA_PKG_NV_DEPEND=">=virtual/jdk-1.7"
3636
DEPEND+="
37-
!elements? ( >=dev-libs/libsecp256k1-0.1.0_pre20220329[ecdh,extrakeys,recovery] )
38-
elements? ( >=dev-libs/libsecp256k1-zkp-0.1.0_pre20220401[ecdh,ecdsa-s2c,extrakeys,generator,rangeproof,recovery,surjectionproof,whitelist] )
37+
!elements? ( >=dev-libs/libsecp256k1-0.1.0_pre20220329[${MULTILIB_USEDEP},ecdh,extrakeys,recovery] )
38+
elements? ( >=dev-libs/libsecp256k1-zkp-0.1.0_pre20220401[${MULTILIB_USEDEP},ecdh,ecdsa-s2c,extrakeys,generator,rangeproof,recovery,surjectionproof,whitelist] )
3939
"
4040
RDEPEND="${DEPEND}
4141
!<net-p2p/core-lightning-0.9.3-r2
@@ -111,24 +111,22 @@ src_prepare() {
111111
use java && java-pkg-opt-2_src_prepare
112112
}
113113

114-
src_configure() {
115-
econf --includedir="${EPREFIX}"/usr/include/libwally/ \
114+
multilib_src_configure() {
115+
multilib_is_native_abi && cd "${S}" # distutils needs in-tree native build
116+
ECONF_SOURCE="${S}" econf \
117+
--includedir="${EPREFIX}/usr/include/libwally" \
116118
--enable-export-all \
117119
$(use_enable test tests) \
118120
$(use_enable elements) \
119121
$(use_enable !elements standard-secp) \
120122
$(use_enable minimal) \
121123
$(use_enable asm) \
122-
$(use_enable {,swig-}java) \
123-
$(use_enable {,swig-}python)
124-
}
125-
126-
python_compile() {
127-
use python && distutils-r1_python_compile
124+
$(multilib_native_use_enable {,swig-}java) \
125+
$(multilib_native_use_enable {,swig-}python)
128126
}
129127

130128
src_compile() {
131-
default
129+
multilib-minimal_src_compile
132130
if use python ; then
133131
distutils-r1_src_compile
134132
elif use doc ; then
@@ -137,24 +135,39 @@ src_compile() {
137135
fi
138136
}
139137

138+
multilib_src_compile() {
139+
multilib_is_native_abi && cd "${S}"
140+
default
141+
}
142+
140143
python_test() {
141144
emake -C src check-swig-python PYTHON="${EPYTHON}"
142145
}
143146

144147
src_test() {
145148
python_setup
146-
emake -C src check-{TESTS,libwallycore} PYTHON="${EPYTHON}"
149+
multilib-minimal_src_test
147150
use java && emake -C src check-swig-java
148151
use python && distutils-r1_src_test
149152
}
150153

154+
multilib_src_test() {
155+
multilib_is_native_abi && cd "${S}"
156+
emake -C src check-{TESTS,libwallycore} PYTHON="${EPYTHON}"
157+
}
158+
151159
src_install() {
152-
default
160+
multilib-minimal_src_install
153161
find "${ED}" -name '*.la' -delete || die
154162
use java && java-pkg_dojar src/swig_java/wallycore.jar
155163
use python && distutils-r1_src_install
156164
}
157165

166+
multilib_src_install() {
167+
multilib_is_native_abi && cd "${S}"
168+
emake DESTDIR="${ED}" install
169+
}
170+
158171
pkg_preinst() {
159172
use java && java-pkg-opt-2_pkg_preinst
160173
}

0 commit comments

Comments
 (0)