diff options
Diffstat (limited to 'meta/recipes-extended/gperf')
3 files changed, 216 insertions, 3 deletions
diff --git a/meta/recipes-extended/gperf/gperf/0001-Make-the-code-C-17-compliant.patch b/meta/recipes-extended/gperf/gperf/0001-Make-the-code-C-17-compliant.patch new file mode 100644 index 0000000000..96e70cdb36 --- /dev/null +++ b/meta/recipes-extended/gperf/gperf/0001-Make-the-code-C-17-compliant.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 6194f0027045433598a61965758b4531a3d06d1f Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruno Haible <bruno@clisp.org> | ||
3 | Date: Sun, 30 Aug 2020 12:36:15 +0200 | ||
4 | Subject: [PATCH] Make the code C++17 compliant. | ||
5 | |||
6 | * lib/getline.cc (getstr): Don't use the 'register' keyword. | ||
7 | |||
8 | Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=gperf.git;a=commit;h=a63b830554920476881837eeacd4a6b507632b19] | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | lib/getline.cc | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/lib/getline.cc b/lib/getline.cc | ||
15 | index c57c633..0984a7c 100644 | ||
16 | --- a/lib/getline.cc | ||
17 | +++ b/lib/getline.cc | ||
18 | @@ -55,7 +55,7 @@ getstr (char **lineptr, size_t *n, FILE *stream, char terminator, size_t offset) | ||
19 | |||
20 | for (;;) | ||
21 | { | ||
22 | - register int c = getc (stream); | ||
23 | + int c = getc (stream); | ||
24 | |||
25 | /* We always want at least one char left in the buffer, since we | ||
26 | always (unless we get an error while reading the first char) | ||
27 | -- | ||
28 | 2.39.0 | ||
29 | |||
diff --git a/meta/recipes-extended/gperf/gperf/1862c6e57a308a05889c80c048dbc58bdc378dcb.patch b/meta/recipes-extended/gperf/gperf/1862c6e57a308a05889c80c048dbc58bdc378dcb.patch new file mode 100644 index 0000000000..98959db0a8 --- /dev/null +++ b/meta/recipes-extended/gperf/gperf/1862c6e57a308a05889c80c048dbc58bdc378dcb.patch | |||
@@ -0,0 +1,181 @@ | |||
1 | From 1862c6e57a308a05889c80c048dbc58bdc378dcb Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruno Haible <bruno@clisp.org> | ||
3 | Date: Tue, 5 Jul 2022 07:51:46 +0200 | ||
4 | Subject: [PATCH] Add support for reproducible builds. | ||
5 | |||
6 | Suggested by Richard Purdie <richard.purdie@linuxfoundation.org> in | ||
7 | <https://lists.gnu.org/archive/html/bug-gperf/2022-07/msg00000.html>. | ||
8 | |||
9 | * autogen.sh: Import also lib/filename.h. | ||
10 | * Makefile.in (IMPORTED_FILES): Add lib/filename.h. | ||
11 | * src/options.cc: Include filename.h. | ||
12 | (Options::print_options): Print only the base name of the program name. | ||
13 | * tests/*.exp: Update. | ||
14 | |||
15 | Upstream-Status: Backport | ||
16 | |||
17 | Index: gperf-3.1/ChangeLog | ||
18 | =================================================================== | ||
19 | --- gperf-3.1.orig/ChangeLog | ||
20 | +++ gperf-3.1/ChangeLog | ||
21 | @@ -1,3 +1,14 @@ | ||
22 | +2022-07-05 Bruno Haible <bruno@clisp.org> | ||
23 | + | ||
24 | + Add support for reproducible builds. | ||
25 | + Suggested by Richard Purdie <richard.purdie@linuxfoundation.org> in | ||
26 | + <https://lists.gnu.org/archive/html/bug-gperf/2022-07/msg00000.html>. | ||
27 | + * autogen.sh: Import also lib/filename.h. | ||
28 | + * Makefile.in (IMPORTED_FILES): Add lib/filename.h. | ||
29 | + * src/options.cc: Include filename.h. | ||
30 | + (Options::print_options): Print only the base name of the program name. | ||
31 | + * tests/*.exp: Update. | ||
32 | + | ||
33 | 2017-01-02 Marcel Schaible <marcel.schaible@studium.fernuni-hagen.de> | ||
34 | |||
35 | * gperf-3.1 released. | ||
36 | Index: gperf-3.1/src/options.cc | ||
37 | =================================================================== | ||
38 | --- gperf-3.1.orig/src/options.cc | ||
39 | +++ gperf-3.1/src/options.cc | ||
40 | @@ -26,6 +26,7 @@ | ||
41 | #include <string.h> /* declares strcmp() */ | ||
42 | #include <ctype.h> /* declares isdigit() */ | ||
43 | #include <limits.h> /* defines CHAR_MAX */ | ||
44 | +#include "filename.h" | ||
45 | #include "getopt.h" | ||
46 | #include "version.h" | ||
47 | |||
48 | @@ -280,6 +281,16 @@ Options::print_options () const | ||
49 | { | ||
50 | const char *arg = _argument_vector[i]; | ||
51 | |||
52 | + if (i == 0) | ||
53 | + { | ||
54 | + /* _argument_vector[0] is the program name. Print only its base name. | ||
55 | + This is useful for reproducible builds. */ | ||
56 | + const char *p = arg + strlen (arg); | ||
57 | + while (p > arg && ! ISSLASH (p[-1])) | ||
58 | + p--; | ||
59 | + arg = p; | ||
60 | + } | ||
61 | + | ||
62 | /* Escape arg if it contains shell metacharacters. */ | ||
63 | if (*arg == '-') | ||
64 | { | ||
65 | Index: gperf-3.1/lib/filename.h | ||
66 | =================================================================== | ||
67 | --- /dev/null | ||
68 | +++ gperf-3.1/lib/filename.h | ||
69 | @@ -0,0 +1,112 @@ | ||
70 | +/* Basic filename support macros. | ||
71 | + Copyright (C) 2001-2022 Free Software Foundation, Inc. | ||
72 | + This file is part of the GNU C Library. | ||
73 | + | ||
74 | + The GNU C Library is free software; you can redistribute it and/or | ||
75 | + modify it under the terms of the GNU Lesser General Public | ||
76 | + License as published by the Free Software Foundation; either | ||
77 | + version 2.1 of the License, or (at your option) any later version. | ||
78 | + | ||
79 | + The GNU C Library is distributed in the hope that it will be useful, | ||
80 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
81 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
82 | + Lesser General Public License for more details. | ||
83 | + | ||
84 | + You should have received a copy of the GNU Lesser General Public | ||
85 | + License along with the GNU C Library; if not, see | ||
86 | + <https://www.gnu.org/licenses/>. */ | ||
87 | + | ||
88 | +/* From Paul Eggert and Jim Meyering. */ | ||
89 | + | ||
90 | +#ifndef _FILENAME_H | ||
91 | +#define _FILENAME_H | ||
92 | + | ||
93 | +#include <string.h> | ||
94 | + | ||
95 | +#ifdef __cplusplus | ||
96 | +extern "C" { | ||
97 | +#endif | ||
98 | + | ||
99 | + | ||
100 | +/* Filename support. | ||
101 | + ISSLASH(C) tests whether C is a directory separator | ||
102 | + character. | ||
103 | + HAS_DEVICE(Filename) tests whether Filename contains a device | ||
104 | + specification. | ||
105 | + FILE_SYSTEM_PREFIX_LEN(Filename) length of the device specification | ||
106 | + at the beginning of Filename, | ||
107 | + index of the part consisting of | ||
108 | + alternating components and slashes. | ||
109 | + FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE | ||
110 | + 1 when a non-empty device specification | ||
111 | + can be followed by an empty or relative | ||
112 | + part, | ||
113 | + 0 when a non-empty device specification | ||
114 | + must be followed by a slash, | ||
115 | + 0 when device specification don't exist. | ||
116 | + IS_ABSOLUTE_FILE_NAME(Filename) | ||
117 | + tests whether Filename is independent of | ||
118 | + any notion of "current directory". | ||
119 | + IS_RELATIVE_FILE_NAME(Filename) | ||
120 | + tests whether Filename may be concatenated | ||
121 | + to a directory filename. | ||
122 | + Note: On native Windows, OS/2, DOS, "c:" is neither an absolute nor a | ||
123 | + relative file name! | ||
124 | + IS_FILE_NAME_WITH_DIR(Filename) tests whether Filename contains a device | ||
125 | + or directory specification. | ||
126 | + */ | ||
127 | +#if defined _WIN32 || defined __CYGWIN__ \ | ||
128 | + || defined __EMX__ || defined __MSDOS__ || defined __DJGPP__ | ||
129 | + /* Native Windows, Cygwin, OS/2, DOS */ | ||
130 | +# define ISSLASH(C) ((C) == '/' || (C) == '\\') | ||
131 | + /* Internal macro: Tests whether a character is a drive letter. */ | ||
132 | +# define _IS_DRIVE_LETTER(C) \ | ||
133 | + (((C) >= 'A' && (C) <= 'Z') || ((C) >= 'a' && (C) <= 'z')) | ||
134 | + /* Help the compiler optimizing it. This assumes ASCII. */ | ||
135 | +# undef _IS_DRIVE_LETTER | ||
136 | +# define _IS_DRIVE_LETTER(C) \ | ||
137 | + (((unsigned int) (C) | ('a' - 'A')) - 'a' <= 'z' - 'a') | ||
138 | +# define HAS_DEVICE(Filename) \ | ||
139 | + (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':') | ||
140 | +# define FILE_SYSTEM_PREFIX_LEN(Filename) (HAS_DEVICE (Filename) ? 2 : 0) | ||
141 | +# ifdef __CYGWIN__ | ||
142 | +# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0 | ||
143 | +# else | ||
144 | + /* On native Windows, OS/2, DOS, the system has the notion of a | ||
145 | + "current directory" on each drive. */ | ||
146 | +# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1 | ||
147 | +# endif | ||
148 | +# if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE | ||
149 | +# define IS_ABSOLUTE_FILE_NAME(Filename) \ | ||
150 | + ISSLASH ((Filename)[FILE_SYSTEM_PREFIX_LEN (Filename)]) | ||
151 | +# else | ||
152 | +# define IS_ABSOLUTE_FILE_NAME(Filename) \ | ||
153 | + (ISSLASH ((Filename)[0]) || HAS_DEVICE (Filename)) | ||
154 | +# endif | ||
155 | +# define IS_RELATIVE_FILE_NAME(Filename) \ | ||
156 | + (! (ISSLASH ((Filename)[0]) || HAS_DEVICE (Filename))) | ||
157 | +# define IS_FILE_NAME_WITH_DIR(Filename) \ | ||
158 | + (strchr ((Filename), '/') != NULL || strchr ((Filename), '\\') != NULL \ | ||
159 | + || HAS_DEVICE (Filename)) | ||
160 | +#else | ||
161 | + /* Unix */ | ||
162 | +# define ISSLASH(C) ((C) == '/') | ||
163 | +# define HAS_DEVICE(Filename) ((void) (Filename), 0) | ||
164 | +# define FILE_SYSTEM_PREFIX_LEN(Filename) ((void) (Filename), 0) | ||
165 | +# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0 | ||
166 | +# define IS_ABSOLUTE_FILE_NAME(Filename) ISSLASH ((Filename)[0]) | ||
167 | +# define IS_RELATIVE_FILE_NAME(Filename) (! ISSLASH ((Filename)[0])) | ||
168 | +# define IS_FILE_NAME_WITH_DIR(Filename) (strchr ((Filename), '/') != NULL) | ||
169 | +#endif | ||
170 | + | ||
171 | +/* Deprecated macros. For backward compatibility with old users of the | ||
172 | + 'filename' module. */ | ||
173 | +#define IS_ABSOLUTE_PATH IS_ABSOLUTE_FILE_NAME | ||
174 | +#define IS_PATH_WITH_DIR IS_FILE_NAME_WITH_DIR | ||
175 | + | ||
176 | + | ||
177 | +#ifdef __cplusplus | ||
178 | +} | ||
179 | +#endif | ||
180 | + | ||
181 | +#endif /* _FILENAME_H */ | ||
diff --git a/meta/recipes-extended/gperf/gperf_3.1.bb b/meta/recipes-extended/gperf/gperf_3.1.bb index f61b2a329a..c57ade9fe3 100644 --- a/meta/recipes-extended/gperf/gperf_3.1.bb +++ b/meta/recipes-extended/gperf/gperf_3.1.bb | |||
@@ -1,18 +1,21 @@ | |||
1 | DESCRIPTION = "GNU gperf is a perfect hash function generator" | 1 | DESCRIPTION = "GNU gperf is a perfect hash function generator" |
2 | HOMEPAGE = "http://www.gnu.org/software/gperf" | 2 | HOMEPAGE = "http://www.gnu.org/software/gperf" |
3 | SUMMARY = "Generate a perfect hash function from a set of keywords" | 3 | SUMMARY = "Generate a perfect hash function from a set of keywords" |
4 | LICENSE = "GPLv3+" | 4 | LICENSE = "GPL-3.0-or-later" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ |
6 | file://src/main.cc;beginline=8;endline=19;md5=dec8f611845d047387ed56b5b85fa99b" | 6 | file://src/main.cc;beginline=8;endline=19;md5=dec8f611845d047387ed56b5b85fa99b" |
7 | 7 | ||
8 | SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz" | 8 | SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ |
9 | file://0001-Make-the-code-C-17-compliant.patch" | ||
9 | SRC_URI[md5sum] = "9e251c0a618ad0824b51117d5d9db87e" | 10 | SRC_URI[md5sum] = "9e251c0a618ad0824b51117d5d9db87e" |
10 | SRC_URI[sha256sum] = "588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2" | 11 | SRC_URI[sha256sum] = "588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2" |
11 | 12 | ||
13 | SRC_URI += "file://1862c6e57a308a05889c80c048dbc58bdc378dcb.patch" | ||
14 | |||
12 | inherit autotools | 15 | inherit autotools |
13 | 16 | ||
14 | # The nested configures don't find the parent aclocal.m4 out of the box, so tell | 17 | # The nested configures don't find the parent aclocal.m4 out of the box, so tell |
15 | # it where to look explicitly (mirroring the behaviour of upstream's Makefile.devel). | 18 | # it where to look explicitly (mirroring the behaviour of upstream's Makefile.devel). |
16 | EXTRA_AUTORECONF += " -I ${S} --exclude=aclocal" | 19 | EXTRA_AUTORECONF += " -I ${S} --exclude=aclocal" |
17 | 20 | ||
18 | BBCLASSEXTEND = "native" | 21 | BBCLASSEXTEND = "native nativesdk" |