5 |
5 |
|
6 |
6 |
inherit flag-o-matic multilib toolchain-funcs multilib-minimal
|
7 |
7 |
|
8 |
|
NSPR_VER="4.34.1"
|
|
8 |
NSPR_VER="4.35"
|
9 |
9 |
RTM_NAME="NSS_${PV//./_}_RTM"
|
10 |
10 |
|
11 |
11 |
DESCRIPTION="Mozilla's Network Security Services library that implements PKI support"
|
... | ... | |
15 |
15 |
|
16 |
16 |
LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
|
17 |
17 |
SLOT="0"
|
18 |
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-solaris"
|
19 |
|
IUSE="cacert test +utils cpu_flags_ppc_altivec cpu_flags_ppc_vsx"
|
|
18 |
KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-solaris"
|
|
19 |
IUSE="cacert test +utils cpu_flags_ppc_altivec cpu_flags_x86_avx2 cpu_flags_x86_sse3 cpu_flags_ppc_vsx"
|
20 |
20 |
RESTRICT="!test? ( test )"
|
21 |
21 |
# pkg-config called by nss-config -> virtual/pkgconfig in RDEPEND
|
22 |
22 |
RDEPEND="
|
... | ... | |
35 |
35 |
)
|
36 |
36 |
|
37 |
37 |
PATCHES=(
|
38 |
|
# Custom changes for gentoo
|
|
38 |
"${FILESDIR}/${PN}-3.53-gentoo-fixups.patch"
|
39 |
39 |
"${FILESDIR}/${PN}-3.21-gentoo-fixup-warnings.patch"
|
40 |
40 |
"${FILESDIR}/${PN}-3.23-hppa-byte_order.patch"
|
41 |
|
"${FILESDIR}/${PN}-3.53-gentoo-fixups.patch"
|
42 |
|
"${FILESDIR}/${PN}-3.79-fix-client-cert-crash.patch"
|
43 |
|
"${FILESDIR}/${PN}-3.79-gcc-13.patch"
|
44 |
41 |
"${FILESDIR}"/nss-3.87-use-clang-as-bgo892686.patch
|
45 |
42 |
)
|
46 |
43 |
|
... | ... | |
52 |
49 |
fi
|
53 |
50 |
|
54 |
51 |
pushd coreconf >/dev/null || die
|
55 |
|
|
56 |
52 |
# hack nspr paths
|
57 |
53 |
echo 'INCLUDES += -I$(DIST)/include/dbm' \
|
58 |
54 |
>> headers.mk || die "failed to append include"
|
... | ... | |
62 |
58 |
-i source.mk || die
|
63 |
59 |
|
64 |
60 |
# Respect LDFLAGS
|
65 |
|
sed -i -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/g' rules.mk || die
|
|
61 |
sed -i -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/g' rules.mk
|
66 |
62 |
|
67 |
63 |
# Workaround make-4.4's change to sub-make, bmo#1800237, bgo#882069
|
68 |
64 |
sed -i -e "s/^CPU_TAG = _.*/CPU_TAG = _$(nssarch)/" Linux.mk || die
|
... | ... | |
150 |
146 |
RANLIB="$(tc-getRANLIB)"
|
151 |
147 |
OPTIMIZER=
|
152 |
148 |
${mybits}
|
|
149 |
disable_ckbi=0
|
153 |
150 |
)
|
154 |
151 |
|
155 |
152 |
# Take care of nspr settings #436216
|
... | ... | |
178 |
175 |
|
179 |
176 |
export NSS_DISABLE_GTESTS=$(usex !test 1 0)
|
180 |
177 |
|
|
178 |
# Include exportable custom settings defined by users, #900915
|
|
179 |
# Two examples uses:
|
|
180 |
# EXTRA_NSSCONF="MYONESWITCH=1"
|
|
181 |
# EXTRA_NSSCONF="MYVALUE=0 MYOTHERVALUE=1 MYTHIRDVALUE=1"
|
|
182 |
# e.g.
|
|
183 |
# EXTRA_NSSCONF="NSS_ALLOW_SSLKEYLOGFILE=0"
|
|
184 |
# or
|
|
185 |
# EXTRA_NSSCONF="NSS_ALLOW_SSLKEYLOGFILE=0 NSS_ENABLE_WERROR=1"
|
|
186 |
# etc.
|
|
187 |
if [[ -n "${EXTRA_NSSCONF}" ]]; then
|
|
188 |
ewarn "EXTRA_NSSCONF applied, please disable custom settings before reporting bugs."
|
|
189 |
read -a myextranssconf <<< "${EXTRA_NSSCONF}"
|
|
190 |
|
|
191 |
for (( i=0; i<${#myextranssconf[@]}; i++ )); do
|
|
192 |
export "${myextranssconf[$i]}"
|
|
193 |
echo "exported ${myextranssconf[$i]}"
|
|
194 |
done
|
|
195 |
fi
|
|
196 |
|
181 |
197 |
# explicitly disable altivec/vsx if not requested
|
182 |
198 |
# https://bugs.gentoo.org/789114
|
183 |
199 |
case ${ARCH} in
|
... | ... | |
187 |
203 |
;;
|
188 |
204 |
esac
|
189 |
205 |
|
|
206 |
use cpu_flags_x86_avx2 || export NSS_DISABLE_AVX2=1
|
|
207 |
use cpu_flags_x86_sse3 || export NSS_DISABLE_SSE3=1
|
|
208 |
|
190 |
209 |
local d
|
191 |
210 |
|
192 |
211 |
# Build the host tools first.
|
... | ... | |
195 |
214 |
NSPR_LIB_DIR="${T}/fakedir" \
|
196 |
215 |
emake -C coreconf \
|
197 |
216 |
CC="$(tc-getBUILD_CC)" \
|
198 |
|
${buildbits-${mybits}}
|
|
217 |
${buildbits-${mybits}}
|
199 |
218 |
makeargs+=( NSINSTALL="${PWD}/$(find -type f -name nsinstall)" )
|
200 |
219 |
|
201 |
220 |
# Then build the target tools.
|
... | ... | |
219 |
238 |
export DOMSUF="localdomain"
|
220 |
239 |
export USE_IP=TRUE
|
221 |
240 |
export IP_ADDRESS="127.0.0.1"
|
|
241 |
# Per README, this is recommended to make run tests quicker.
|
|
242 |
export NSS_CYCLES="standard"
|
222 |
243 |
|
223 |
244 |
NSINSTALL="${PWD}/$(find -type f -name nsinstall)"
|
224 |
245 |
|
... | ... | |
297 |
318 |
|
298 |
319 |
# create an nss-softokn.pc from nss.pc for libfreebl and some private headers
|
299 |
320 |
# bug 517266
|
300 |
|
sed -e 's#Libs:#Libs: -lfreebl#' \
|
|
321 |
sed -e 's#Libs:#Libs: -lfreebl#' \
|
301 |
322 |
-e 's#Cflags:#Cflags: -I${includedir}/private#' \
|
302 |
323 |
*/lib/pkgconfig/nss.pc >"${ED}"/usr/$(get_libdir)/pkgconfig/nss-softokn.pc \
|
303 |
324 |
|| die "could not create nss-softokn.pc"
|