Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/esh/, app-shells/esh/files/
Date: Mon, 31 Oct 2022 17:43:46
Message-Id: 1667237988.8b77ee848a2e52f0c7dbfc8cdb17b18212c3f230.sam@gentoo
1 commit: 8b77ee848a2e52f0c7dbfc8cdb17b18212c3f230
2 Author: Pascal Jäger <pascal.jaeger <AT> leimstift <DOT> de>
3 AuthorDate: Sun Oct 23 20:42:08 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 31 17:39:48 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b77ee84
7
8 app-shells/esh: revbump, fix build to work with clang16
9
10 Closes: https://bugs.gentoo.org/871351
11 Signed-off-by: Pascal Jäger <pascal.jaeger <AT> leimstift.de>
12 Closes: https://github.com/gentoo/gentoo/pull/27920
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 .../{esh-0.8.5-r2.ebuild => esh-0.8.5-r3.ebuild} | 11 +++++--
16 .../files/esh-0.8.5-fix-build-for-clang16.patch | 38 ++++++++++++++++++++++
17 2 files changed, 46 insertions(+), 3 deletions(-)
18
19 diff --git a/app-shells/esh/esh-0.8.5-r2.ebuild b/app-shells/esh/esh-0.8.5-r3.ebuild
20 similarity index 92%
21 rename from app-shells/esh/esh-0.8.5-r2.ebuild
22 rename to app-shells/esh/esh-0.8.5-r3.ebuild
23 index 164a969d91f4..29ed1611a7a0 100644
24 --- a/app-shells/esh/esh-0.8.5-r2.ebuild
25 +++ b/app-shells/esh/esh-0.8.5-r3.ebuild
26 @@ -1,7 +1,7 @@
27 -# Copyright 1999-2021 Gentoo Authors
28 +# Copyright 1999-2022 Gentoo Authors
29 # Distributed under the terms of the GNU General Public License v2
30
31 -EAPI=7
32 +EAPI=8
33
34 inherit flag-o-matic toolchain-funcs
35
36 @@ -19,13 +19,18 @@ DEPEND=">=sys-libs/readline-4.1:="
37 RDEPEND="${DEPEND}"
38 BDEPEND="virtual/pkgconfig"
39
40 +PATCHES=(
41 + "${FILESDIR}"/${P}-fix-build-for-clang16.patch
42 +)
43 +
44 src_prepare() {
45 - default
46
47 # For some reason, this tarball has binary files in it for x86.
48 # Make clean so we can rebuild for our arch and optimization.
49 emake clean
50
51 + default
52 +
53 sed -i \
54 -e 's|-g ||' \
55 -e 's|-DMEM_DEBUG ||' \
56
57 diff --git a/app-shells/esh/files/esh-0.8.5-fix-build-for-clang16.patch b/app-shells/esh/files/esh-0.8.5-fix-build-for-clang16.patch
58 new file mode 100644
59 index 000000000000..1d87f583f53a
60 --- /dev/null
61 +++ b/app-shells/esh/files/esh-0.8.5-fix-build-for-clang16.patch
62 @@ -0,0 +1,38 @@
63 +This fixes the build for clang16.
64 +
65 +Signed-off-by: Pascal Jäger <pascal.jaeger@×××××××××.de>
66 +
67 +diff --git a/hash.c b/hash.c
68 +index f3d7a3d..cf3c25a 100644
69 +--- a/hash.c
70 ++++ b/hash.c
71 +@@ -148,7 +148,7 @@ void hash_init(hash_table* _hash_array, hash_entry data[]) {
72 + }
73 +
74 + void hash_free(hash_table* tab,
75 +- void (*func)()) {
76 ++ void (*func)(void* data)) {
77 + int i;
78 + list* iter;
79 +
80 +
81 +--- a/read-rl.c
82 ++++ b/read-rl.c
83 +@@ -99,7 +99,7 @@ static char** rl_esh_completion(char* word, int start, int end) {
84 + }
85 +
86 + if (openparen(rl_line_buffer[start])) {
87 +- return completion_matches(word, rl_find_builtin);
88 ++ return rl_completion_matches(word, (rl_compentry_func_t *)rl_find_builtin);
89 +
90 + } else {
91 + return NULL;
92 +@@ -110,7 +110,7 @@ void read_init(void) {
93 + rl_bind_key('\012', rl_literal_newline);
94 +
95 + /* rl_catch_signals = 0; */
96 +- rl_attempted_completion_function = rl_esh_completion;
97 ++ rl_attempted_completion_function = (rl_completion_func_t *)rl_esh_completion;
98 + }
99 +
100 + char* read_read(char* prompt) {