[packages/bogl] Rel 14

arekm arekm at pld-linux.org
Wed May 20 14:08:38 CEST 2026


commit b09085ee3df1a2ec1b25724a1bdaa5be2eb8f4b6
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed May 20 14:08:02 2026 +0200

    Rel 14

 bogl-gcc15.patch     | 48 ++++++++++++++++++++++++++++++++++++++
 bogl-no-common.patch | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 bogl.spec            |  8 +++++--
 3 files changed, 120 insertions(+), 2 deletions(-)
---
diff --git a/bogl.spec b/bogl.spec
index bb76919..7214d5f 100644
--- a/bogl.spec
+++ b/bogl.spec
@@ -4,7 +4,7 @@ Summary:	A terminal program for displaying Unicode on the console
 Summary(pl.UTF-8):	Program terminalowy do wyświetlania Unikodu na konsoli
 Name:		bogl
 Version:	0.1.18
-Release:	12
+Release:	14
 Epoch:		0
 License:	GPL
 Group:		Libraries
@@ -26,6 +26,8 @@ Patch5:		%{name}-0.1.18-noexecstack.patch
 Patch6:		%{name}-page_mask.patch
 Patch7:		%{name}-shared.patch
 Patch8:		format-security.patch
+Patch9:		%{name}-gcc15.patch
+Patch10:	%{name}-no-common.patch
 URL:		http://www.stanford.edu/~blp/projects.html
 BuildRequires:	gd-devel
 BuildRequires:	libpng-devel
@@ -91,6 +93,8 @@ konsoli.
 %patch -P6 -p1
 %patch -P7 -p1
 %patch -P8 -p1
+%patch -P9 -p1
+%patch -P10 -p1
 
 mkdir -p fonts
 cd fonts
@@ -99,7 +103,7 @@ tar zxf %{SOURCE3}
 
 %build
 %{__make} -j1 \
-	CFLAGS="%{rpmcflags} -fPIC"
+	CFLAGS="%{rpmcflags} %{rpmcppflags} -fPIC"
 #./mergebdf fonts/9x18.bdf fonts/18x18ja.bdf > font.bdf
 gunzip -c %{SOURCE4} > font.bdf
 ./bdftobogl -b font.bdf > font.bgf
diff --git a/bogl-gcc15.patch b/bogl-gcc15.patch
new file mode 100644
index 0000000..d873bf1
--- /dev/null
+++ b/bogl-gcc15.patch
@@ -0,0 +1,48 @@
+Fix function prototype mismatches that fail with GCC 15+ (originally
+ISO C requires complete prototypes — empty () means "unspecified args",
+which conflicts with calls that pass arguments). Taken from Debian.
+
+--- a/bogl-pcfb.h
++++ b/bogl-pcfb.h
+@@ -21,7 +21,7 @@
+
+ #include <stddef.h>
+
+-size_t bogl_pcfb_init ();
++size_t bogl_pcfb_init (int fb, int new_bpp);
+
+ void bogl_pcfb_pixel (int x, int y, int c);
+ void bogl_pcfb_hline (int x1, int x2, int y, int c);
+--- a/bogl-vga16.h
++++ b/bogl-vga16.h
+@@ -21,7 +21,7 @@
+
+ #include <stddef.h>
+
+-size_t bogl_vga16_init ();
++size_t bogl_vga16_init (void);
+
+ void bogl_vga16_pixel (int x, int y, int c);
+ void bogl_vga16_hline (int x1, int x2, int y, int c);
+--- a/bogl.c
++++ b/bogl.c
+@@ -239,7 +239,7 @@ init_fb (void)
+   if (type == FB_TYPE_VGA_PLANES)
+     {
+       bogl_set_palette = bogl_fb_set_palette;
+-      return bogl_vga16_init (fb);
++      return bogl_vga16_init ();
+     }
+ #endif
+
+--- a/bogl-tcfb.h
++++ b/bogl-tcfb.h
+@@ -21,7 +21,7 @@
+
+ #include <stddef.h>
+
+-size_t bogl_tcfb_init ();
++size_t bogl_tcfb_init (int fb, int new_bpp);
+
+ void bogl_tcfb_pixel (int x, int y, int c);
+ void bogl_tcfb_hline (int x1, int x2, int y, int c);
diff --git a/bogl-no-common.patch b/bogl-no-common.patch
new file mode 100644
index 0000000..32bb422
--- /dev/null
+++ b/bogl-no-common.patch
@@ -0,0 +1,66 @@
+Fix multiple-definition errors with GCC 10+ default -fno-common.
+Globals in bogl.h were declared without extern (tentative definitions
+in every TU). Define them once in bogl.c, declare them extern in
+bogl.h. Taken from Debian.
+
+--- a/bogl.c
++++ b/bogl.c
+@@ -69,6 +69,22 @@ volatile char *bogl_frame;		/* boglP.h *
+ int bogl_drawing;
+ int bogl_line_len;
+
++/* Device-specific routines. */
++void (*bogl_pixel) (int x, int y, int c);
++void (*bogl_hline) (int x1, int x2, int y, int c);
++void (*bogl_vline) (int x, int y1, int y2, int c);
++void (*bogl_text) (int x, int y, const char *s, int n, int fg, int bg, int ul,
++ 		   const struct bogl_font *font);
++void (*bogl_clear) (int x1, int y1, int x2, int y2, int c);
++void (*bogl_move) (int sx, int sy, int dx, int dy, int w, int h);
++void (*bogl_put) (int x, int y, const struct bogl_pixmap *pixmap,
++ 		  const int color_map[16]);
++void (*bogl_pointer) (int visible, int x, int y,
++ 		      const struct bogl_pointer *,
++ 		      int colors[2]);
++void (*bogl_set_palette) (int c, int nc, const unsigned char palette[][3]);
++void (*bogl_reinit) (void);
++
+ /* Static variables. */
+ static int fb;			/* Framebuffer file handle. */
+ static int tty;			/* Tty file handle. */
+--- a/bogl.h
++++ b/bogl.h
+@@ -86,19 +86,19 @@ int bogl_font_glyph (const struct bogl_f
+ int bogl_in_font (const struct bogl_font *font, wchar_t wc);
+
+ /* Device-specific routines. */
+-void (*bogl_pixel) (int x, int y, int c);
+-void (*bogl_hline) (int x1, int x2, int y, int c);
+-void (*bogl_vline) (int x, int y1, int y2, int c);
+-void (*bogl_text) (int x, int y, const char *s, int n, int fg, int bg, int ul,
+-		   const struct bogl_font *font);
+-void (*bogl_clear) (int x1, int y1, int x2, int y2, int c);
+-void (*bogl_move) (int sx, int sy, int dx, int dy, int w, int h);
+-void (*bogl_put) (int x, int y, const struct bogl_pixmap *pixmap,
+-		  const int color_map[16]);
+-void (*bogl_pointer) (int visible, int x, int y,
+-		      const struct bogl_pointer *,
+-		      int colors[2]);
+-void (*bogl_set_palette) (int c, int nc, const unsigned char palette[][3]);
+-void (*bogl_reinit) (void);
++extern void (*bogl_pixel) (int x, int y, int c);
++extern void (*bogl_hline) (int x1, int x2, int y, int c);
++extern void (*bogl_vline) (int x, int y1, int y2, int c);
++extern void (*bogl_text) (int x, int y, const char *s, int n, int fg, int bg, int ul,
++			  const struct bogl_font *font);
++extern void (*bogl_clear) (int x1, int y1, int x2, int y2, int c);
++extern void (*bogl_move) (int sx, int sy, int dx, int dy, int w, int h);
++extern void (*bogl_put) (int x, int y, const struct bogl_pixmap *pixmap,
++			 const int color_map[16]);
++extern void (*bogl_pointer) (int visible, int x, int y,
++			     const struct bogl_pointer *,
++			     int colors[2]);
++extern void (*bogl_set_palette) (int c, int nc, const unsigned char palette[][3]);
++extern void (*bogl_reinit) (void);
+
+ #endif /* bogl_h */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/bogl.git/commitdiff/b09085ee3df1a2ec1b25724a1bdaa5be2eb8f4b6



More information about the pld-cvs-commit mailing list