commit:     a7716d6ed1fbff2e7c27618aa2f7d24bc748f7d1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 17 23:56:52 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Mar 18 00:27:39 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7716d6e

net-libs/nghttp2: switch back to autotools, rather than cmake

Naive first pass based on the live ebuild from 
3a38f9b245e674722d5d58dfbb6baafca2b26975
(live ebuild was done in subsequent commit).

We need to use autotools rather than CMake here because of a circular
dependency (ditto nghttp2):
```
(net-misc/curl-8.11.1-r2:0/0::gentoo, ebuild scheduled for merge) depends on
 (net-libs/nghttp3-1.7.0:0/0::gentoo, ebuild scheduled for merge) (buildtime)
  (dev-build/cmake-3.31.5:0/0::gentoo, ebuild scheduled for merge) (buildtime)
   (net-misc/curl-8.11.1-r2:0/0::gentoo, ebuild scheduled for merge) (buildtime)
```

I've taken the opportunity to add a live ebuild template to allow
easier syncing. I'm going to make some followup changes to deps to clean
them up a bit (I think, needs checking) but I want to do that separately
as I want to stabilise this version quickly.

Bug: https://bugs.gentoo.org/899568
Closes: https://bugs.gentoo.org/951525
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-libs/nghttp2/nghttp2-1.65.0-r1.ebuild | 68 +++++++++++++++++++++++++++++
 net-libs/nghttp2/nghttp2-9999.ebuild      | 71 +++++++++++++++++--------------
 2 files changed, 108 insertions(+), 31 deletions(-)

diff --git a/net-libs/nghttp2/nghttp2-1.65.0-r1.ebuild 
b/net-libs/nghttp2/nghttp2-1.65.0-r1.ebuild
new file mode 100644
index 000000000000..924cfbd58f82
--- /dev/null
+++ b/net-libs/nghttp2/nghttp2-1.65.0-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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
+}

diff --git a/net-libs/nghttp2/nghttp2-9999.ebuild 
b/net-libs/nghttp2/nghttp2-9999.ebuild
index 4ff41e17c664..924cfbd58f82 100644
--- a/net-libs/nghttp2/nghttp2-9999.ebuild
+++ b/net-libs/nghttp2/nghttp2-9999.ebuild
@@ -1,59 +1,68 @@
-# 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
+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"
 
+src_prepare() {
+       default
+       [[ ${PV} == 9999 ]] && eautoreconf
+}
+
 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)
+       # 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)
        )
-       cmake_src_configure
+       ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
 }
 
-multilib_src_test() {
-       eninja check
+multilib_src_install_all() {
+       einstalldocs
+       find "${ED}"/usr -type f -name '*.la' -delete || die
 }

Reply via email to