net-libs/nghttp2: Sync with Gentoo

It's from Gentoo commit 8c7e37bb9cfbd98860593a2d363fae110fbc6ccf.
This commit is contained in:
Flatcar Buildbot 2025-03-31 07:10:32 +00:00
parent d1e7b16a1a
commit a670abd01e
6 changed files with 115 additions and 128 deletions

View File

@ -1,2 +1 @@
DIST nghttp2-1.64.0.tar.xz 1676124 BLAKE2B e2cad95fbe8447e99728af3ad7656d4dd2d1f51f31294bd38b6c69ee07e6e8e6302c124d47e6274a9a1531257a90bcc5833de390ac704b4b3adf435b9ce38fc9 SHA512 b544196c3b7a55faacd11700d11e2fe4f16a7418282c9abb24a668544a15293580fd1a2cc5f93367c8a17c7ee45335c6d2f5c68a72dd176d516fd033f203eeec
DIST nghttp2-1.65.0.tar.xz 1604848 BLAKE2B 8fb752f55936110a8b5c27873e7e262a0c84740beac46444a80596e25b256ca3a4b0f0cc97a91e104a0f1c59ac0304546310a2817af126efabd2ce26cfd0ee06 SHA512 e1ef685a425017474ea0412c8ad13a217a45a320322b3aee48e646be21457d9b1f374abb9f681f47595a0ad8feb07d076bd0aa3279d35c5c9b5b8c921d8dd39e

View File

@ -1,28 +0,0 @@
https://github.com/nemequ/munit/pull/105
--- a/tests/munit/munit.c
+++ b/tests/munit/munit.c
@@ -858,23 +858,18 @@ static psnip_uint64_t munit_clock_get_elapsed(struct PsnipClockTimespec *start,
#if defined(_OPENMP)
# define ATOMIC_UINT32_T uint32_t
-# define ATOMIC_UINT32_INIT(x) (x)
#elif defined(HAVE_STDATOMIC)
# include <stdatomic.h>
# define ATOMIC_UINT32_T _Atomic uint32_t
-# define ATOMIC_UINT32_INIT(x) ATOMIC_VAR_INIT(x)
#elif defined(HAVE_CLANG_ATOMICS)
# define ATOMIC_UINT32_T _Atomic uint32_t
-# define ATOMIC_UINT32_INIT(x) (x)
#elif defined(_WIN32)
# define ATOMIC_UINT32_T volatile LONG
-# define ATOMIC_UINT32_INIT(x) (x)
#else
# define ATOMIC_UINT32_T volatile uint32_t
-# define ATOMIC_UINT32_INIT(x) (x)
#endif
-static ATOMIC_UINT32_T munit_rand_state = ATOMIC_UINT32_INIT(42);
+static ATOMIC_UINT32_T munit_rand_state = 42;
#if defined(_OPENMP)
static inline void munit_atomic_store(ATOMIC_UINT32_T *dest,

View File

@ -1,65 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake-multilib
DESCRIPTION="HTTP/2 C Library"
HOMEPAGE="https://nghttp2.org/"
SRC_URI="https://github.com/nghttp2/nghttp2/releases/download/v${PV}/${P}.tar.xz"
LICENSE="MIT"
SLOT="0/1.14" # 1.<SONAME>
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="debug hpack-tools jemalloc static-libs systemd test utils xml"
REQUIRED_USE="test? ( static-libs )"
RESTRICT="!test? ( test )"
SSL_DEPEND="
>=dev-libs/openssl-1.0.2:0=[-bindist(-),${MULTILIB_USEDEP}]
"
RDEPEND="
hpack-tools? ( >=dev-libs/jansson-2.5:= )
jemalloc? ( dev-libs/jemalloc:=[${MULTILIB_USEDEP}] )
utils? (
${SSL_DEPEND}
>=dev-libs/libev-4.15[${MULTILIB_USEDEP}]
>=sys-libs/zlib-1.2.3[${MULTILIB_USEDEP}]
net-dns/c-ares:=[${MULTILIB_USEDEP}]
)
systemd? ( >=sys-apps/systemd-209 )
xml? ( >=dev-libs/libxml2-2.7.7:2[${MULTILIB_USEDEP}] )"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${PN}-1.64.0-munit-c23.patch
)
multilib_src_configure() {
#TODO: enable HTTP3
#requires quictls/openssl, libngtcp2, libngtcp2_crypto_quictls, libnghttp3
local mycmakeargs=(
-DENABLE_EXAMPLES=OFF
-DENABLE_FAILMALLOC=OFF
-DENABLE_HTTP3=OFF
-DENABLE_WERROR=OFF
-DENABLE_THREADS=ON
-DENABLE_DEBUG=$(usex debug)
-DENABLE_HPACK_TOOLS=$(multilib_native_usex hpack-tools)
$(cmake_use_find_package hpack-tools Jansson)
-DWITH_JEMALLOC=$(multilib_native_usex jemalloc)
-DBUILD_STATIC_LIBS=$(usex static-libs)
-DBUILD_TESTING=$(usex test)
$(cmake_use_find_package systemd Systemd)
-DENABLE_APP=$(multilib_native_usex utils)
-DWITH_LIBXML2=$(multilib_native_usex xml)
)
cmake_src_configure
}
multilib_src_test() {
eninja check
}

View File

@ -0,0 +1,70 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Built with autotools rather than cmake to avoid circular dep (bug #951525)
inherit multilib-minimal
DESCRIPTION="HTTP/2 C Library"
HOMEPAGE="https://nghttp2.org/"
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/nghttp2/nghttp2.git"
inherit git-r3
else
inherit autotools
SRC_URI="https://github.com/nghttp2/nghttp2/releases/download/v${PV}/${P}.tar.xz"
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
LICENSE="MIT"
SLOT="0/1.14" # 1.<SONAME>
IUSE="debug hpack-tools jemalloc systemd test utils xml"
RESTRICT="!test? ( test )"
RDEPEND="
hpack-tools? ( >=dev-libs/jansson-2.5:= )
jemalloc? ( dev-libs/jemalloc:=[${MULTILIB_USEDEP}] )
utils? (
>=dev-libs/openssl-1.0.2:0=[-bindist(-),${MULTILIB_USEDEP}]
>=dev-libs/libev-4.15[${MULTILIB_USEDEP}]
net-dns/c-ares:=[${MULTILIB_USEDEP}]
>=sys-libs/zlib-1.2.3[${MULTILIB_USEDEP}]
)
systemd? ( >=sys-apps/systemd-209 )
xml? ( >=dev-libs/libxml2-2.7.7:2[${MULTILIB_USEDEP}] )
"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
src_prepare() {
default
[[ ${PV} == 9999 ]] && eautoreconf
}
multilib_src_configure() {
# TODO: enable HTTP3
# requires quictls/openssl, libngtcp2, libngtcp2_crypto_quictls, libnghttp3
local myeconfargs=(
--disable-examples
--disable-failmalloc
--disable-werror
--enable-threads
$(use_enable debug)
$(multilib_native_use_enable hpack-tools)
$(multilib_native_use_with hpack-tools jansson)
$(multilib_native_use_with jemalloc)
$(multilib_native_use_with systemd)
$(multilib_native_use_enable utils app)
$(multilib_native_use_with xml libxml2)
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_install_all() {
einstalldocs
find "${ED}"/usr -type f -name '*.la' -delete || die
}

View File

@ -11,7 +11,7 @@ SRC_URI="https://github.com/nghttp2/nghttp2/releases/download/v${PV}/${P}.tar.xz
LICENSE="MIT"
SLOT="0/1.14" # 1.<SONAME>
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="debug hpack-tools jemalloc static-libs systemd test utils xml"
REQUIRED_USE="test? ( static-libs )"

View File

@ -1,59 +1,70 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake-multilib git-r3
# Built with autotools rather than cmake to avoid circular dep (bug #951525)
inherit multilib-minimal
DESCRIPTION="HTTP/2 C Library"
HOMEPAGE="https://nghttp2.org/"
EGIT_REPO_URI="https://github.com/nghttp2/nghttp2.git"
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/nghttp2/nghttp2.git"
inherit git-r3
else
inherit autotools
SRC_URI="https://github.com/nghttp2/nghttp2/releases/download/v${PV}/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
LICENSE="MIT"
SLOT="0/1.14" # 1.<SONAME>
IUSE="debug hpack-tools jemalloc static-libs systemd test utils xml"
IUSE="debug hpack-tools jemalloc systemd test utils xml"
RESTRICT="!test? ( test )"
SSL_DEPEND="
>=dev-libs/openssl-1.0.2:0=[-bindist(-),${MULTILIB_USEDEP}]
"
RDEPEND="
hpack-tools? ( >=dev-libs/jansson-2.5:= )
jemalloc? ( dev-libs/jemalloc:=[${MULTILIB_USEDEP}] )
utils? (
${SSL_DEPEND}
>=dev-libs/openssl-1.0.2:0=[-bindist(-),${MULTILIB_USEDEP}]
>=dev-libs/libev-4.15[${MULTILIB_USEDEP}]
>=sys-libs/zlib-1.2.3[${MULTILIB_USEDEP}]
net-dns/c-ares:=[${MULTILIB_USEDEP}]
>=sys-libs/zlib-1.2.3[${MULTILIB_USEDEP}]
)
systemd? ( >=sys-apps/systemd-209 )
xml? ( >=dev-libs/libxml2-2.7.7:2[${MULTILIB_USEDEP}] )"
xml? ( >=dev-libs/libxml2-2.7.7:2[${MULTILIB_USEDEP}] )
"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
multilib_src_configure() {
#TODO: enable HTTP3
#requires quictls/openssl, libngtcp2, libngtcp2_crypto_quictls, libnghttp3
local mycmakeargs=(
-DENABLE_EXAMPLES=OFF
-DENABLE_FAILMALLOC=OFF
-DENABLE_HTTP3=OFF
-DENABLE_WERROR=OFF
-DENABLE_THREADS=ON
-DENABLE_DEBUG=$(usex debug)
-DENABLE_HPACK_TOOLS=$(multilib_native_usex hpack-tools)
$(cmake_use_find_package hpack-tools Jansson)
-DWITH_JEMALLOC=$(multilib_native_usex jemalloc)
-DBUILD_STATIC_LIBS=$(usex static-libs)
-DBUILD_TESTING=$(usex test)
$(cmake_use_find_package systemd Systemd)
-DENABLE_APP=$(multilib_native_usex utils)
-DWITH_LIBXML2=$(multilib_native_usex xml)
)
cmake_src_configure
src_prepare() {
default
[[ ${PV} == 9999 ]] && eautoreconf
}
multilib_src_test() {
eninja check
multilib_src_configure() {
# TODO: enable HTTP3
# requires quictls/openssl, libngtcp2, libngtcp2_crypto_quictls, libnghttp3
local myeconfargs=(
--disable-examples
--disable-failmalloc
--disable-werror
--enable-threads
$(use_enable debug)
$(multilib_native_use_enable hpack-tools)
$(multilib_native_use_with hpack-tools jansson)
$(multilib_native_use_with jemalloc)
$(multilib_native_use_with systemd)
$(multilib_native_use_enable utils app)
$(multilib_native_use_with xml libxml2)
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_install_all() {
einstalldocs
find "${ED}"/usr -type f -name '*.la' -delete || die
}