public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-util/gperf/files/, dev-util/gperf/
@ 2022-09-08  3:17 Sam James
  0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2022-09-08  3:17 UTC (permalink / raw
  To: gentoo-commits

commit:     c9c6ed9355576ee71fee1988a08ec9258162a1d4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Sep  8 03:17:19 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep  8 03:17:19 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9c6ed93

dev-util/gperf: fix strncmp declaration

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

 .../files/gperf-3.1-strncmp-decl-mismatch.patch    | 28 ++++++++++++++++++++++
 dev-util/gperf/gperf-3.1-r1.ebuild                 | 24 +++++++++++++++++++
 2 files changed, 52 insertions(+)

diff --git a/dev-util/gperf/files/gperf-3.1-strncmp-decl-mismatch.patch b/dev-util/gperf/files/gperf-3.1-strncmp-decl-mismatch.patch
new file mode 100644
index 000000000000..67380fb0279c
--- /dev/null
+++ b/dev-util/gperf/files/gperf-3.1-strncmp-decl-mismatch.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/869134
+
+From 09844ce4ca3d5975469640cea9c5414d5c0baa44 Mon Sep 17 00:00:00 2001
+From: Bruno Haible <bruno@clisp.org>
+Date: Thu, 8 Sep 2022 04:45:03 +0200
+Subject: [PATCH] Fix a warning regarding strncmp.
+
+Reported by Sam James in <https://savannah.gnu.org/bugs/?63031>.
+
+* lib/getopt.c (strncmp): Declare with a prototype.
+--- a/lib/getopt.c
++++ b/lib/getopt.c
+@@ -194,7 +194,6 @@ static char *posixly_correct;
+    whose names are inconsistent.  */
+ 
+ extern char *getenv ();
+-extern int strncmp ();
+ 
+ static char *
+ my_index (const char *str, int chr)
+@@ -209,6 +208,7 @@ my_index (const char *str, int chr)
+ }
+ 
+ extern int strcmp (const char *, const char *);
++extern int strncmp (const char *, const char *, size_t);
+ extern size_t strlen (const char *);
+ 
+ #endif /* not __GNU_LIBRARY__ */

diff --git a/dev-util/gperf/gperf-3.1-r1.ebuild b/dev-util/gperf/gperf-3.1-r1.ebuild
new file mode 100644
index 000000000000..bdabce4d841e
--- /dev/null
+++ b/dev-util/gperf/gperf-3.1-r1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="A perfect hash function generator"
+HOMEPAGE="https://www.gnu.org/software/gperf/"
+SRC_URI="mirror://gnu/gperf/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-strncmp-decl-mismatch.patch
+)
+
+src_prepare() {
+	sed -i \
+		-e "/^CPPFLAGS /s:=:+=:" \
+		*/Makefile.in || die #444078
+
+	default
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/gperf/files/, dev-util/gperf/
@ 2022-12-06  9:31 Sam James
  0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2022-12-06  9:31 UTC (permalink / raw
  To: gentoo-commits

commit:     2ea07b25e4bdcbf5af59008efddf89e0e7525711
Author:     Lukas Schmelting <l3s8g <AT> posteo <DOT> eu>
AuthorDate: Sat Nov 26 15:16:23 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec  6 09:30:35 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ea07b25

dev-util/gperf: clang-16 -Wregister fix

Bug: https://bugs.gentoo.org/882787
Signed-off-by: Lukas Schmelting <l3s8g <AT> posteo.eu>
Closes: https://github.com/gentoo/gentoo/pull/28441
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../gperf/files/gperf-3.1-clang-16-wregister.patch  | 21 +++++++++++++++++++++
 dev-util/gperf/gperf-3.1-r1.ebuild                  |  1 +
 2 files changed, 22 insertions(+)

diff --git a/dev-util/gperf/files/gperf-3.1-clang-16-wregister.patch b/dev-util/gperf/files/gperf-3.1-clang-16-wregister.patch
new file mode 100644
index 000000000000..4bbcca6d57e0
--- /dev/null
+++ b/dev-util/gperf/files/gperf-3.1-clang-16-wregister.patch
@@ -0,0 +1,21 @@
+https://bugs.gentoo.org/882787
+https://git.savannah.gnu.org/gitweb/?p=gperf.git;a=commit;h=a63b830554920476881837eeacd4a6b507632b19
+
+From a63b830554920476881837eeacd4a6b507632b19 Mon Sep 17 00:00:00 2001
+From: Bruno Haible <bruno@clisp.org>
+Date: Sun, 30 Aug 2020 12:36:15 +0200
+Subject: [PATCH] Make the code C++17 compliant.
+
+* lib/getline.cc (getstr): Don't use the 'register' keyword.
+
+--- a/lib/getline.cc
++++ b/lib/getline.cc
+@@ -55,7 +55,7 @@ getstr (char **lineptr, size_t *n, FILE *stream, char terminator, size_t offset)
+ 
+   for (;;)
+     {
+-      register int c = getc (stream);
++      int c = getc (stream);
+ 
+       /* We always want at least one char left in the buffer, since we
+          always (unless we get an error while reading the first char)

diff --git a/dev-util/gperf/gperf-3.1-r1.ebuild b/dev-util/gperf/gperf-3.1-r1.ebuild
index bdabce4d841e..093d0f549a5e 100644
--- a/dev-util/gperf/gperf-3.1-r1.ebuild
+++ b/dev-util/gperf/gperf-3.1-r1.ebuild
@@ -13,6 +13,7 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~
 
 PATCHES=(
 	"${FILESDIR}"/${P}-strncmp-decl-mismatch.patch
+	"${FILESDIR}"/${P}-clang-16-wregister.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/gperf/files/, dev-util/gperf/
@ 2025-04-09 14:47 Sam James
  0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2025-04-09 14:47 UTC (permalink / raw
  To: gentoo-commits

commit:     b977ded145274778cec27e8492f44bc1c50407cf
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Apr  9 14:43:28 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Apr  9 14:46:56 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b977ded1

dev-util/gperf: backport upstream fixes, especially for -Wundef

Backport two fixes:
* -Wundef with C++ which fixes kcodecs (KF5)
* Test fix (didn't affect us but maybe could with Clang or something, harmless
  so let's pull it in)

Closes: https://github.com/gentoo/gentoo/pull/41501
Closes: https://bugs.gentoo.org/953407
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/gperf/Manifest                    |  1 +
 dev-util/gperf/files/gperf-3.2-tests.patch | 46 ++++++++++++++++++++++++++++++
 dev-util/gperf/gperf-3.2-r1.ebuild         | 30 +++++++++++++++++++
 3 files changed, 77 insertions(+)

diff --git a/dev-util/gperf/Manifest b/dev-util/gperf/Manifest
index ab8f7d11379e..3f3da6166c83 100644
--- a/dev-util/gperf/Manifest
+++ b/dev-util/gperf/Manifest
@@ -1,2 +1,3 @@
 DIST gperf-3.1.tar.gz 1215925 BLAKE2B bc4c54ade3f7dce484714d77cb5759dcc02b7a607d7b1aff6bdbcd06ee4c83e9449038a7217d5f25bcbef058ba56e1fce9383b9599de005154e5a9b566ac9c69 SHA512 855ebce5ff36753238a44f14c95be7afdc3990b085960345ca2caf1a2db884f7db74d406ce9eec2f4a52abb8a063d4ed000a36b317c9a353ef4e25e2cca9a3f4
+DIST gperf-3.2-c++.patch.xz 2096 BLAKE2B acaf0d685434afe6eb5dc2cabc507b2ebff182af65d7297a4526af547280ab49ea030edca79500414420d590e4ba1493ad061a9018a48421243276228636164b SHA512 dd405440790fd30f4cf36f1be735900fc7b6850e5477f74482d24bd7c1ce9dbe3f795158c44901cff407e51bcba669be3798efa853ca182b796be5ff77db34d4
 DIST gperf-3.2.tar.gz 1268603 BLAKE2B 6c90d665ff6b7f07862668b250ce06c5df386e6c746398ecb7d40912ed1ca820455addb9ecd17650925b6ef7cd2ff00b8ed9174e55da16a410f84d87b244e8f8 SHA512 97addf85e5b6f801f0f7084ec065d0d4a24a07f3fb6e60e2bc57b0f8813bd5db1bb4bed4f51fb96d0a8b278ffde1dfd0e42302cae911a619b95cc3cc46254fb3

diff --git a/dev-util/gperf/files/gperf-3.2-tests.patch b/dev-util/gperf/files/gperf-3.2-tests.patch
new file mode 100644
index 000000000000..191b8216f66c
--- /dev/null
+++ b/dev-util/gperf/files/gperf-3.2-tests.patch
@@ -0,0 +1,46 @@
+https://git.savannah.gnu.org/gitweb/?p=gperf.git;a=commit;h=1a8e476f99335ad5a553f24f1956a084fc6adc10
+
+From 1a8e476f99335ad5a553f24f1956a084fc6adc10 Mon Sep 17 00:00:00 2001
+From: Bruno Haible <bruno@clisp.org>
+Date: Wed, 9 Apr 2025 13:10:17 +0200
+Subject: [PATCH] Fix "make check" failure with an ISO C 23 conforming C
+ compiler.
+
+Prompted by
+<https://lists.gnu.org/archive/html/bug-gperf/2025-04/msg00002.html>.
+
+* tests/smtp.gperf (my_case_strcmp, main): Convert from K&R C syntax
+to ISO C 90 syntax.
+---
+ ChangeLog        | 8 ++++++++
+ tests/smtp.gperf | 8 ++------
+ 2 files changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/tests/smtp.gperf b/tests/smtp.gperf
+index da6ec7d..a5c448d 100644
+--- a/tests/smtp.gperf
++++ b/tests/smtp.gperf
+@@ -124,9 +124,7 @@ Xref
+ #include <ctype.h>
+ 
+ static int
+-my_case_strcmp (s1, s2)
+-     register const char *s1;
+-     register const char *s2;
++my_case_strcmp (const char *s1, const char *s2)
+ {
+   for (;;)
+     {
+@@ -143,9 +141,7 @@ my_case_strcmp (s1, s2)
+ }
+ 
+ int
+-main (argc, argv)
+-     int argc;
+-     char *argv[];
++main (int argc, char *argv[])
+ {
+   int i, j, k, n, exitcode;
+   size_t len;
+-- 
+2.17.1

diff --git a/dev-util/gperf/gperf-3.2-r1.ebuild b/dev-util/gperf/gperf-3.2-r1.ebuild
new file mode 100644
index 000000000000..c1857b2012db
--- /dev/null
+++ b/dev-util/gperf/gperf-3.2-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="A perfect hash function generator"
+HOMEPAGE="https://www.gnu.org/software/gperf/"
+SRC_URI="mirror://gnu/gperf/${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-c++.patch.xz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+
+PATCHES=(
+	"${WORKDIR}"/${P}-c++.patch
+	"${FILESDIR}"/${P}-tests.patch
+)
+
+src_prepare() {
+	default
+
+	sed -i \
+		-e "/^CPPFLAGS /s:=:+=:" \
+		*/Makefile.in || die #444078
+}
+
+src_configure() {
+	econf --cache-file="${S}"/config.cache
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-04-09 14:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-06  9:31 [gentoo-commits] repo/gentoo:master commit in: dev-util/gperf/files/, dev-util/gperf/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2025-04-09 14:47 Sam James
2022-09-08  3:17 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox