diff mbox series

[meta-oe,v3] bvi: add new package

Message ID 20250523192321.333048-1-dimitris@siganos.org
State New
Headers show
Series [meta-oe,v3] bvi: add new package | expand

Commit Message

Dimitrios Siganos May 23, 2025, 7:23 p.m. UTC
bvi is a visual editor for binary files

Signed-off-by: Dimitrios Siganos <dimitris@siganos.org>
---
 meta-oe/recipes-support/bvi/bvi_1.4.2.bb      | 18 ++++++
 .../bvi/files/0001-gcc-15.patch               | 60 +++++++++++++++++++
 2 files changed, 78 insertions(+)
 create mode 100644 meta-oe/recipes-support/bvi/bvi_1.4.2.bb
 create mode 100644 meta-oe/recipes-support/bvi/files/0001-gcc-15.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/bvi/bvi_1.4.2.bb b/meta-oe/recipes-support/bvi/bvi_1.4.2.bb
new file mode 100644
index 0000000000..a44a7e7078
--- /dev/null
+++ b/meta-oe/recipes-support/bvi/bvi_1.4.2.bb
@@ -0,0 +1,18 @@ 
+SUMMARY = "Binary VI editor"
+DESCRIPTION = "bvi is a visual editor for binary files."
+HOMEPAGE = "https://sourceforge.net/projects/bvi"
+SECTION = "console/utils"
+LICENSE = "GPL-3.0-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a36207309d382da27cd66fdaae922e3c"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.src.tar.gz \
+           file://0001-gcc-15.patch \
+          "
+SRC_URI[sha256sum] = "4bba16c2b496963a9b939336c0abcc8d488664492080ae43a86da18cf4ce94f2"
+
+DEPENDS += "ncurses"
+
+# The project uses old style C interfaces, disable the warnings
+CFLAGS:append = " -Wno-old-style-definition"
+
+inherit pkgconfig autotools-brokensep
diff --git a/meta-oe/recipes-support/bvi/files/0001-gcc-15.patch b/meta-oe/recipes-support/bvi/files/0001-gcc-15.patch
new file mode 100644
index 0000000000..d5cb108eb6
--- /dev/null
+++ b/meta-oe/recipes-support/bvi/files/0001-gcc-15.patch
@@ -0,0 +1,60 @@ 
+This patch fixes the incompatibility problems with C23.
+
+The code uses some function prototypes without argument specifications,
+which makes it incompatible with C23 and this patch fixes them.
+
+The patch was copied from here:
+https://sourceforge.net/p/bvi/bugs/16
+
+Upstream-Status: Submitted [https://sourceforge.net/p/bvi/bugs/16]
+
+--- bvi.orig/re.c
++++ bvi/re.c
+@@ -36,7 +36,11 @@
+ #include	"bvi.h"
+ #include	"set.h"
+ 
++#ifdef __STDC__
++static	int sbracket(int, char *, int);
++#else
+ static	int sbracket();
++#endif
+ 
+ char	act_pat[MAXCMD];  /* found pattern */
+ char	pattern[MAXCMD + 1];
+--- bvi.orig/bm_unix.c
++++ bvi/bm_unix.c
+@@ -161,7 +161,11 @@
+ {
+ 	int	ret;
+ #ifndef DJGPP
++#ifdef __STDC__
++	char	*getenv(const char *);
++#else
+ 	char	*getenv();
++#endif
+ 	char	*shell;
+ 	char	cline[128];
+ #endif
+--- bvi.orig/bmore.h
++++ bvi/bmore.h
+@@ -136,7 +136,7 @@
+ 
+ 
+ 
+-#ifdef ANSI
++#if defined(ANSI) || defined(__STDC__)
+ 	void	initterm(void), set_tty(void), reset_tty(void);
+ 	void	cleartoeol(void), clearscreen(void), highlight(void);
+ 	void	normal(void), bmbeep(void), home(void), sig(int);
+--- bvi.orig/bvi.h
++++ bvi/bvi.h
+@@ -214,7 +214,7 @@
+ 	void	d_memmove(PTR, PTR, off_t);
+ #endif
+ 
+-#ifdef ANSI
++#if defined(ANSI) || defined(__STDC__)
+ 	off_t	alloc_buf(off_t, char **), yd_addr(void);
+ 	off_t	range(int);
+ 	void	do_dot(void), do_exit(void), do_shell(void), do_undo(void);