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-editors/bvi/, app-editors/bvi/files/
Date: Tue, 08 Nov 2022 04:38:19
Message-Id: 1667882287.8da276544f3a2ba236fae9275236674c04e1faad.sam@gentoo
1 commit: 8da276544f3a2ba236fae9275236674c04e1faad
2 Author: Christopher Head <chead <AT> chead <DOT> ca>
3 AuthorDate: Tue Nov 8 04:21:05 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 8 04:38:07 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8da27654
7
8 app-editors/bvi: fix strict Clang compilation
9
10 There is an `ANSI` macro which, if defined, includes proper prototypes.
11 A few of them don’t match the function definitions, so patch them.
12
13 Signed-off-by: Christopher Head <chead <AT> chead.ca>
14 Closes: https://github.com/gentoo/gentoo/pull/28179
15 Signed-off-by: Sam James <sam <AT> gentoo.org>
16
17 app-editors/bvi/bvi-1.4.1-r1.ebuild | 22 +++++++++++++++
18 app-editors/bvi/files/bvi-1.4.1-prototypes.patch | 34 ++++++++++++++++++++++++
19 2 files changed, 56 insertions(+)
20
21 diff --git a/app-editors/bvi/bvi-1.4.1-r1.ebuild b/app-editors/bvi/bvi-1.4.1-r1.ebuild
22 new file mode 100644
23 index 000000000000..4b500d68d576
24 --- /dev/null
25 +++ b/app-editors/bvi/bvi-1.4.1-r1.ebuild
26 @@ -0,0 +1,22 @@
27 +# Copyright 1999-2021 Gentoo Authors
28 +# Distributed under the terms of the GNU General Public License v2
29 +
30 +EAPI=7
31 +
32 +DESCRIPTION="Display-oriented editor for binary files, based on the vi texteditor"
33 +HOMEPAGE="http://bvi.sourceforge.net/"
34 +SRC_URI="mirror://sourceforge/${PN}/${P}.src.tar.gz"
35 +
36 +LICENSE="GPL-3+"
37 +SLOT="0"
38 +IUSE=""
39 +KEYWORDS="~amd64 ~ppc ~riscv ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
40 +
41 +DEPEND="sys-libs/ncurses:0="
42 +RDEPEND="${DEPEND}"
43 +
44 +PATCHES=( "${FILESDIR}/${P}-prototypes.patch" )
45 +
46 +src_configure() {
47 + econf CFLAGS=-DANSI
48 +}
49
50 diff --git a/app-editors/bvi/files/bvi-1.4.1-prototypes.patch b/app-editors/bvi/files/bvi-1.4.1-prototypes.patch
51 new file mode 100644
52 index 000000000000..ab4010303011
53 --- /dev/null
54 +++ b/app-editors/bvi/files/bvi-1.4.1-prototypes.patch
55 @@ -0,0 +1,34 @@
56 +https://sourceforge.net/p/bvi/bugs/14/
57 +
58 +diff --git a/bmore.h b/bmore.h
59 +index bb5174514a66..0c4811f743b2 100644
60 +--- a/bmore.h
61 ++++ b/bmore.h
62 +@@ -135,12 +135,12 @@ extern int no_tty, no_intty;
63 + #ifdef ANSI
64 + void initterm(void), set_tty(void), reset_tty(void);
65 + void cleartoeol(void), clearscreen(void), highlight(void);
66 +- void normal(void), bmbeep(void), home(void), sig(void);
67 ++ void normal(void), bmbeep(void), home(void), sig(int);
68 + void doshell(char *), emsg(char *);
69 + void do_next(int);
70 + void bmsearch(int);
71 + void pushback(int, char *);
72 +- int open_file(void);
73 ++ int open_file(char *);
74 + int printout(int), rdline(int, char *);
75 + int nextchar(void), vgetc(void);
76 + int sbracket(int, char *, int);
77 +diff --git a/bvi.h b/bvi.h
78 +index 0881ce79d6fd..90f68c9eeb92 100644
79 +--- a/bvi.h
80 ++++ b/bvi.h
81 +@@ -215,7 +215,7 @@ extern off_t block_begin, block_end, block_size;
82 + void docmdline(char *), do_over(PTR, off_t, PTR), do_put(PTR, off_t, PTR);
83 + void jmpproc(int), printline(PTR, int);
84 + int addfile(char *);
85 +- int bregexec(PTR, char *);
86 ++ PTR bregexec(PTR, char *);
87 + int chk_comm(int);
88 + int doecmd(char *, int);
89 + int do_append(off_t, char *), do_logic(int, char *);