@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{8..11} )
7
7
DISTUTILS_OPTIONAL=1
8
8
DISTUTILS_USE_PEP517=setuptools
9
9
10
- inherit autotools distutils-r1 java-pkg-opt-2
10
+ inherit autotools distutils-r1 java-pkg-opt-2 multilib-minimal
11
11
12
12
PATCH_HASHES=(
13
13
5a1fef754c72902c734370ea5d74a891c5d3db5d # src/Makefile.am: add missing headers to install
@@ -34,8 +34,8 @@ RESTRICT="!test? ( test )"
34
34
35
35
JAVA_PKG_NV_DEPEND=" >=virtual/jdk-1.7"
36
36
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] )
39
39
"
40
40
RDEPEND=" ${DEPEND}
41
41
!<net-p2p/core-lightning-0.9.3-r2
@@ -111,24 +111,22 @@ src_prepare() {
111
111
use java && java-pkg-opt-2_src_prepare
112
112
}
113
113
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" \
116
118
--enable-export-all \
117
119
$( use_enable test tests) \
118
120
$( use_enable elements) \
119
121
$( use_enable ! elements standard-secp) \
120
122
$( use_enable minimal) \
121
123
$( 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)
128
126
}
129
127
130
128
src_compile () {
131
- default
129
+ multilib-minimal_src_compile
132
130
if use python ; then
133
131
distutils-r1_src_compile
134
132
elif use doc ; then
@@ -137,24 +135,39 @@ src_compile() {
137
135
fi
138
136
}
139
137
138
+ multilib_src_compile () {
139
+ multilib_is_native_abi && cd " ${S} "
140
+ default
141
+ }
142
+
140
143
python_test () {
141
144
emake -C src check-swig-python PYTHON=" ${EPYTHON} "
142
145
}
143
146
144
147
src_test () {
145
148
python_setup
146
- emake -C src check-{TESTS,libwallycore} PYTHON= " ${EPYTHON} "
149
+ multilib-minimal_src_test
147
150
use java && emake -C src check-swig-java
148
151
use python && distutils-r1_src_test
149
152
}
150
153
154
+ multilib_src_test () {
155
+ multilib_is_native_abi && cd " ${S} "
156
+ emake -C src check-{TESTS,libwallycore} PYTHON=" ${EPYTHON} "
157
+ }
158
+
151
159
src_install () {
152
- default
160
+ multilib-minimal_src_install
153
161
find " ${ED} " -name ' *.la' -delete || die
154
162
use java && java-pkg_dojar src/swig_java/wallycore.jar
155
163
use python && distutils-r1_src_install
156
164
}
157
165
166
+ multilib_src_install () {
167
+ multilib_is_native_abi && cd " ${S} "
168
+ emake DESTDIR=" ${ED} " install
169
+ }
170
+
158
171
pkg_preinst () {
159
172
use java && java-pkg-opt-2_pkg_preinst
160
173
}
0 commit comments