commit:     5507c2df5d98f518edd20ca590e7a33e5c75f0ec
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 12 04:14:35 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Oct 12 04:14:35 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5507c2df

app-benchmarks/httperf: add 0.9.1_p20201206

Closes: https://bugs.gentoo.org/943906
Thanks-to: Matt Hartley <mhartley <AT> caltech.edu>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-benchmarks/httperf/Manifest                    |  1 +
 .../files/httperf-0.9.1_p20201206-c23.patch        | 62 ++++++++++++++++++++++
 .../httperf/httperf-0.9.1_p20201206.ebuild         | 42 +++++++++++++++
 3 files changed, 105 insertions(+)

diff --git a/app-benchmarks/httperf/Manifest b/app-benchmarks/httperf/Manifest
index 2c7c897714b0..9ff454719a8a 100644
--- a/app-benchmarks/httperf/Manifest
+++ b/app-benchmarks/httperf/Manifest
@@ -1 +1,2 @@
 DIST httperf-0.9.1_p20181111.tar.gz 107070 BLAKE2B 
044f45b0d4b17bc714a718835be1e713092fe7f6d6573df237ba87791e5783e8f60d1218f29e01473ccdeec3b461d3ab7d35d68a1037ee693865a37fd78b7ea5
 SHA512 
34cc92f3de6d1dadc3fedc5b5f617538b76787496f9dd28b7800866abaf96c7410765d4bb0989000910bf2b51433292c0a7009fe64ba4fd29889ce96cc4d10fc
+DIST httperf-0.9.1_p20201206.tar.gz 107789 BLAKE2B 
8285ab8ae36ff5776510b6d88901d1e8fc9a2e1092131e1b4778e4cf3a3db7188eaad39f54f9bcc8a6e6b94006020a9def69492eb8ff3f27319f4ddacf502ef7
 SHA512 
505c7042841c53730e27454c8bc945f133cf8244daa978fb699a0590074dfe2b6b883d15968bde5586ad9f4dc96705fa2fc20b45dbe8a2557fe2b45521eb4e09

diff --git a/app-benchmarks/httperf/files/httperf-0.9.1_p20201206-c23.patch 
b/app-benchmarks/httperf/files/httperf-0.9.1_p20201206-c23.patch
new file mode 100644
index 000000000000..531b5429cc09
--- /dev/null
+++ b/app-benchmarks/httperf/files/httperf-0.9.1_p20201206-c23.patch
@@ -0,0 +1,62 @@
+https://bugs.gentoo.org/943906
+https://github.com/httperf/httperf/pull/84
+
+From e6dd35c7bffbec001fe0eba4071bfcf3395c9cc6 Mon Sep 17 00:00:00 2001
+From: Matt Hartley <[email protected]>
+Date: Thu, 9 Oct 2025 18:44:15 -0500
+Subject: [PATCH 1/2] fixed build issue with gcc 15
+
+---
+ src/httperf.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/httperf.c b/src/httperf.c
+index 5dbba07..c355493 100755
+--- a/src/httperf.c
++++ b/src/httperf.c
+@@ -1381,7 +1381,7 @@ main(int argc, char **argv)
+       }
+       core_init();
+ 
+-      signal(SIGINT, (void (*)()) core_exit);
++      signal(SIGINT, (__sighandler_t) core_exit);
+ 
+       for (i = 0; i < num_stats; ++i)
+               (*stat[i]->init) ();
+
+From 620afdd3a7d39764203c66d7b3144b5500653d4e Mon Sep 17 00:00:00 2001
+From: Matt Hartley <[email protected]>
+Date: Thu, 9 Oct 2025 18:55:03 -0500
+Subject: [PATCH 2/2] got rid of offending cast entirely using a wrapper
+ function
+
+---
+ src/httperf.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/httperf.c b/src/httperf.c
+index c355493..a9bf213 100755
+--- a/src/httperf.c
++++ b/src/httperf.c
+@@ -228,6 +228,11 @@ perf_sample(struct Timer *t, Any_Type regarg)
+                     __LINE__);
+ }
+ 
++void wrapped_core_exit(int _)
++{
++  core_exit();
++}
++
+ int
+ main(int argc, char **argv)
+ {
+@@ -1381,7 +1386,7 @@ main(int argc, char **argv)
+       }
+       core_init();
+ 
+-      signal(SIGINT, (__sighandler_t) core_exit);
++      signal(SIGINT, wrapped_core_exit);
+ 
+       for (i = 0; i < num_stats; ++i)
+               (*stat[i]->init) ();
+

diff --git a/app-benchmarks/httperf/httperf-0.9.1_p20201206.ebuild 
b/app-benchmarks/httperf/httperf-0.9.1_p20201206.ebuild
new file mode 100644
index 000000000000..1a2bedf385b5
--- /dev/null
+++ b/app-benchmarks/httperf/httperf-0.9.1_p20201206.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+HTTPERF_COMMIT="de8cd6ad8a79779a0cb74a4aa2175afa9e24df57"
+inherit autotools
+
+DESCRIPTION="Tool from HP for measuring web server performance"
+HOMEPAGE="https://github.com/httperf/httperf";
+SRC_URI="https://github.com/${PN}/${PN}/archive/${HTTPERF_COMMIT}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}/${PN}-${HTTPERF_COMMIT}"
+
+LICENSE="GPL-2+-with-openssl-exception"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~x86 ~amd64-linux ~x64-macos"
+IUSE="debug idleconn"
+
+DEPEND="
+       dev-libs/openssl:=
+       idleconn? ( dev-libs/libevent:= )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.9.1_p20201206-c23.patch
+)
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       local myeconfargs=(
+               --bindir="${EPREFIX}"/usr/bin
+               $(use_enable debug)
+               $(use_enable idleconn)
+       )
+
+       econf "${myeconfargs[@]}"
+}

Reply via email to