mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 14:11:07 +02:00
dev-libs/nspr: Sync with Gentoo
It's from Gentoo commit 5caead31afd6d66482e29c075b2a21675cb99015.
This commit is contained in:
parent
b6e767268b
commit
eea8405a27
@ -1 +1 @@
|
||||
DIST nspr-4.33.tar.gz 1078948 BLAKE2B b46e1c02ab7e5c442288a2cba2868166adb9461950d35fcd76074e3340734057f2b1bbeb3c700f38edf3710323ffd34576dd644814c379033de2a380c54d4fe3 SHA512 8064f826c977f1302a341ca7a7aaf7977b5d10102062c030b1d42b856638e3408ab262447e8c7cfd5a98879b9b1043d17ceae66fbb1e5ed86d6bc3531f26667e
|
||||
DIST nspr-4.35.tar.gz 1096974 BLAKE2B c80402d7be9e69ab6d1e768a18d271a8d28900f4cae7df2709d1ab26e100d908f508762bb771d4042aa7152934ce83d495e2102e894c56574187be8040d65629 SHA512 502815833116e25f79ddf71d1526484908aa92fbc55f8a892729cb404a4daafcc0470a89854cd080d2d20299fdb7d9662507c5362c7ae661cbacf308ac56ef7f
|
||||
|
@ -1,19 +1,11 @@
|
||||
From 8c57451f44d7ceb37bfb4ae6e457fc70b1f58d0a Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Kick <gentoo@blackphoenix.de>
|
||||
Date: Wed, 20 Mar 2019 13:36:06 -0500
|
||||
From 2e6a43c751707b6983760669988ba4d2826ffd5b Mon Sep 17 00:00:00 2001
|
||||
From: Violet Purcell <vimproved@inventati.org>
|
||||
Date: Sat, 10 Jun 2023 04:37:55 +0000
|
||||
Subject: [PATCH] Added IPv6 compatibility for musl libc
|
||||
|
||||
Signed-off-by: Moritz Kick <gentoo@blackphoenix.de>
|
||||
Signed-off-by: Jory Pratt <anarchy@gentoo.org>
|
||||
---
|
||||
pr/include/md/_linux.h | 13 +------------
|
||||
1 file changed, 1 insertion(+), 12 deletions(-)
|
||||
|
||||
diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h
|
||||
index 2370ab8..612184c 100644
|
||||
--- a/pr/include/md/_linux.h
|
||||
+++ b/pr/include/md/_linux.h
|
||||
@@ -289,33 +289,22 @@ static inline PRInt32 _MD_ATOMIC_SET(PRInt32 *ptr, PRInt32 nv)
|
||||
@@ -315,33 +315,19 @@ static inline PRInt32 _MD_ATOMIC_SET(PRInt32 *ptr, PRInt32 nv)
|
||||
#endif /* __arm__ */
|
||||
|
||||
#define USE_SETJMP
|
||||
@ -22,17 +14,17 @@ index 2370ab8..612184c 100644
|
||||
-#endif
|
||||
#undef _PR_USE_POLL
|
||||
#define _PR_STAT_HAS_ONLY_ST_ATIME
|
||||
#if defined(__alpha) || defined(__ia64__)
|
||||
-#if defined(__alpha) || defined(__ia64__)
|
||||
#define _PR_HAVE_LARGE_OFF_T
|
||||
-#elif (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \
|
||||
- || defined(ANDROID)
|
||||
-#define _PR_HAVE_OFF64_T
|
||||
#else
|
||||
-#else
|
||||
-#define _PR_NO_LARGE_FILES
|
||||
+#define _PR_HAVE_OFF64_T
|
||||
#endif
|
||||
-#endif
|
||||
-#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \
|
||||
- || defined(ANDROID)
|
||||
+#define _FILE_OFFSET_BITS 64
|
||||
#define _PR_INET6
|
||||
#define _PR_HAVE_INET_NTOP
|
||||
#define _PR_HAVE_GETHOSTBYNAME2
|
||||
@ -49,5 +41,5 @@ index 2370ab8..612184c 100644
|
||||
#define _PR_HAVE_GETHOST_R_INT
|
||||
#endif
|
||||
--
|
||||
2.21.0
|
||||
2.41.0
|
||||
|
||||
|
@ -0,0 +1,15 @@
|
||||
needed since https://github.com/bminor/musl/commit/25e6fee27f4a293728dd15b659170e7b9c7db9bc
|
||||
--
|
||||
diff --git a/pr/include/md/_unixos.h b/pr/include/md/_unixos.h
|
||||
index 7d444cd..0099d2c 100644
|
||||
--- a/pr/include/md/_unixos.h
|
||||
+++ b/pr/include/md/_unixos.h
|
||||
@@ -589,7 +589,7 @@ typedef off64_t _MDOff64_t;
|
||||
|
||||
#elif defined(_PR_HAVE_OFF64_T)
|
||||
typedef struct stat64 _MDStat64;
|
||||
-typedef off64_t _MDOff64_t;
|
||||
+typedef off_t _MDOff64_t;
|
||||
#elif defined(_PR_HAVE_LARGE_OFF_T)
|
||||
typedef struct stat _MDStat64;
|
||||
typedef off_t _MDOff64_t;
|
@ -1,9 +1,9 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EAPI=8
|
||||
|
||||
inherit autotools toolchain-funcs multilib-minimal
|
||||
inherit autotools flag-o-matic toolchain-funcs multilib-minimal
|
||||
|
||||
MIN_PV="$(ver_cut 2)"
|
||||
|
||||
@ -13,7 +13,7 @@ SRC_URI="https://archive.mozilla.org/pub/nspr/releases/v${PV}/src/${P}.tar.gz"
|
||||
|
||||
LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
|
||||
IUSE="debug"
|
||||
|
||||
MULTILIB_CHOST_TOOLS=(
|
||||
@ -21,21 +21,26 @@ MULTILIB_CHOST_TOOLS=(
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-4.10.6-solaris.patch
|
||||
"${FILESDIR}"/${PN}-4.23-prtime.patch
|
||||
"${FILESDIR}"/${PN}-4.7.1-solaris.patch
|
||||
"${FILESDIR}"/${PN}-4.10.6-solaris.patch
|
||||
"${FILESDIR}"/${PN}-4.8.4-darwin-install_name.patch
|
||||
"${FILESDIR}"/${PN}-4.8.9-link-flags.patch
|
||||
# We do not need to pass -L$libdir via nspr-config --libs
|
||||
"${FILESDIR}"/${PN}-4.9.5_nspr_config.patch
|
||||
)
|
||||
|
||||
QA_CONFIGURE_OPTIONS="--disable-static"
|
||||
|
||||
src_prepare() {
|
||||
cd "${S}"/nspr || die
|
||||
|
||||
default
|
||||
|
||||
use elibc_musl && eapply "${FILESDIR}"/${PN}-4.21-ipv6-musl-support.patch
|
||||
if use elibc_musl; then
|
||||
eapply "${FILESDIR}"/${PN}-4.21-ipv6-musl-support.patch
|
||||
eapply "${FILESDIR}"/nspr-4.35-bgo-905998-lfs64-musl.patch
|
||||
fi
|
||||
|
||||
# rename configure.in to configure.ac for new autotools compatibility
|
||||
if [[ -e "${S}"/nspr/configure.in ]] ; then
|
||||
@ -57,6 +62,9 @@ src_prepare() {
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
# The build system overrides user optimization level based on a configure flag. #886987
|
||||
local my_optlvl=$(get-flag '-O*')
|
||||
|
||||
# We use the standard BUILD_xxx but nspr uses HOST_xxx
|
||||
tc-export_build_env BUILD_CC
|
||||
export HOST_CC=${BUILD_CC} HOST_CFLAGS=${BUILD_CFLAGS} HOST_LDFLAGS=${BUILD_LDFLAGS}
|
||||
@ -65,11 +73,15 @@ multilib_src_configure() {
|
||||
&& export CROSS_COMPILE=1 \
|
||||
|| unset CROSS_COMPILE
|
||||
|
||||
local myconf=(
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)"
|
||||
$(use_enable debug)
|
||||
$(use_enable !debug optimize)
|
||||
)
|
||||
local myconf=( --libdir="${EPREFIX}/usr/$(get_libdir)" )
|
||||
|
||||
# Optimization is disabled when debug is enabled.
|
||||
if use debug; then
|
||||
myconf+=( --enable-debug )
|
||||
else
|
||||
myconf+=( --disable-debug )
|
||||
myconf+=( --enable-optimize="${my_optlvl}" )
|
||||
fi
|
||||
|
||||
# The configure has some fancy --enable-{{n,x}32,64bit} switches
|
||||
# that trigger some code conditional to platform & arch. This really
|
||||
@ -102,6 +114,37 @@ multilib_src_configure() {
|
||||
econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
# https://firefox-source-docs.mozilla.org/nspr/running_nspr_tests.html
|
||||
cd "${BUILD_DIR}/pr/tests" || die
|
||||
einfo "Building tests"
|
||||
emake
|
||||
|
||||
einfo "Running test suite"
|
||||
../../../${P}/${PN}/pr/tests/runtests.pl | tee "${T}"/${ABI}-tests.log
|
||||
|
||||
# Needed to check if runtests.pl itself or the tee (somehow) failed
|
||||
# (can't use die with pipes to check each component)
|
||||
[[ ${PIPESTATUS[@]} == "0 0" ]] || die "Tests failed to run!"
|
||||
|
||||
local known_failures=(
|
||||
# network-sandbox related?
|
||||
cltsrv
|
||||
# network-sandbox related?
|
||||
gethost
|
||||
)
|
||||
|
||||
local known_failure
|
||||
for known_failure in "${known_failures[@]}" ; do
|
||||
sed -i -e "/${known_failure}.*FAILED/d" "${T}"/${ABI}-tests.log || die
|
||||
done
|
||||
|
||||
# But to actually check the test results, we examine the log.
|
||||
if grep -q "FAILED" "${T}"/${ABI}-tests.log ; then
|
||||
die "Test failure for ${ABI}!"
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
# Their build system is royally confusing, as usual
|
||||
MINOR_VERSION=${MIN_PV} # Used for .so version
|
Loading…
x
Reference in New Issue
Block a user