1 |
commit: c9c6ed9355576ee71fee1988a08ec9258162a1d4 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 8 03:17:19 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 8 03:17:19 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9c6ed93 |
7 |
|
8 |
dev-util/gperf: fix strncmp declaration |
9 |
|
10 |
Closes: https://bugs.gentoo.org/869134 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
.../files/gperf-3.1-strncmp-decl-mismatch.patch | 28 ++++++++++++++++++++++ |
14 |
dev-util/gperf/gperf-3.1-r1.ebuild | 24 +++++++++++++++++++ |
15 |
2 files changed, 52 insertions(+) |
16 |
|
17 |
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 |
18 |
new file mode 100644 |
19 |
index 000000000000..67380fb0279c |
20 |
--- /dev/null |
21 |
+++ b/dev-util/gperf/files/gperf-3.1-strncmp-decl-mismatch.patch |
22 |
@@ -0,0 +1,28 @@ |
23 |
+https://bugs.gentoo.org/869134 |
24 |
+ |
25 |
+From 09844ce4ca3d5975469640cea9c5414d5c0baa44 Mon Sep 17 00:00:00 2001 |
26 |
+From: Bruno Haible <bruno@×××××.org> |
27 |
+Date: Thu, 8 Sep 2022 04:45:03 +0200 |
28 |
+Subject: [PATCH] Fix a warning regarding strncmp. |
29 |
+ |
30 |
+Reported by Sam James in <https://savannah.gnu.org/bugs/?63031>. |
31 |
+ |
32 |
+* lib/getopt.c (strncmp): Declare with a prototype. |
33 |
+--- a/lib/getopt.c |
34 |
++++ b/lib/getopt.c |
35 |
+@@ -194,7 +194,6 @@ static char *posixly_correct; |
36 |
+ whose names are inconsistent. */ |
37 |
+ |
38 |
+ extern char *getenv (); |
39 |
+-extern int strncmp (); |
40 |
+ |
41 |
+ static char * |
42 |
+ my_index (const char *str, int chr) |
43 |
+@@ -209,6 +208,7 @@ my_index (const char *str, int chr) |
44 |
+ } |
45 |
+ |
46 |
+ extern int strcmp (const char *, const char *); |
47 |
++extern int strncmp (const char *, const char *, size_t); |
48 |
+ extern size_t strlen (const char *); |
49 |
+ |
50 |
+ #endif /* not __GNU_LIBRARY__ */ |
51 |
|
52 |
diff --git a/dev-util/gperf/gperf-3.1-r1.ebuild b/dev-util/gperf/gperf-3.1-r1.ebuild |
53 |
new file mode 100644 |
54 |
index 000000000000..bdabce4d841e |
55 |
--- /dev/null |
56 |
+++ b/dev-util/gperf/gperf-3.1-r1.ebuild |
57 |
@@ -0,0 +1,24 @@ |
58 |
+# Copyright 1999-2022 Gentoo Authors |
59 |
+# Distributed under the terms of the GNU General Public License v2 |
60 |
+ |
61 |
+EAPI=8 |
62 |
+ |
63 |
+DESCRIPTION="A perfect hash function generator" |
64 |
+HOMEPAGE="https://www.gnu.org/software/gperf/" |
65 |
+SRC_URI="mirror://gnu/gperf/${P}.tar.gz" |
66 |
+ |
67 |
+LICENSE="GPL-2" |
68 |
+SLOT="0" |
69 |
+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" |
70 |
+ |
71 |
+PATCHES=( |
72 |
+ "${FILESDIR}"/${P}-strncmp-decl-mismatch.patch |
73 |
+) |
74 |
+ |
75 |
+src_prepare() { |
76 |
+ sed -i \ |
77 |
+ -e "/^CPPFLAGS /s:=:+=:" \ |
78 |
+ */Makefile.in || die #444078 |
79 |
+ |
80 |
+ default |
81 |
+} |