summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-misc/bb/bb-1.3.0_rc1-r6.ebuild (renamed from app-misc/bb/bb-1.3.0_rc1-r5.ebuild)7
-rw-r--r--app-misc/bb/files/bb-1.3.0_rc1-fix-build-for-clang16.patch23
-rw-r--r--app-misc/bb/files/bb-1.3.0_rc1-fix-lto-type-mismatch.patch18
-rw-r--r--app-misc/bb/files/bb-1.3.0_rc1-fix-return-type-and-QA.patch47
4 files changed, 93 insertions, 2 deletions
diff --git a/app-misc/bb/bb-1.3.0_rc1-r5.ebuild b/app-misc/bb/bb-1.3.0_rc1-r6.ebuild
index f1111fd96715..2a3d4e24f6b5 100644
--- a/app-misc/bb/bb-1.3.0_rc1-r5.ebuild
+++ b/app-misc/bb/bb-1.3.0_rc1-r6.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit autotools
@@ -34,6 +34,9 @@ PATCHES=(
"${FILESDIR}"/${P}-m4-stuff.patch
"${FILESDIR}"/${P}-protos.patch
"${FILESDIR}"/${P}-disable-pulse.patch
+ "${FILESDIR}"/${P}-fix-build-for-clang16.patch
+ "${FILESDIR}"/${P}-fix-lto-type-mismatch.patch
+ "${FILESDIR}"/${P}-fix-return-type-and-QA.patch
)
src_prepare() {
diff --git a/app-misc/bb/files/bb-1.3.0_rc1-fix-build-for-clang16.patch b/app-misc/bb/files/bb-1.3.0_rc1-fix-build-for-clang16.patch
new file mode 100644
index 000000000000..77b06874760b
--- /dev/null
+++ b/app-misc/bb/files/bb-1.3.0_rc1-fix-build-for-clang16.patch
@@ -0,0 +1,23 @@
+The two functions that are assigned to the formulas structs secnod field
+`int (*calculate)(number_t number_t number_t number_t)`
+(without the REGISTERS(3) which is just a macro to GCC regparm)
+
+However, clang16 has -Wincompatible-function-pointer-types by default, and it
+does not like that and complains, that assigning these functions into the
+structs fields is a problem due to incompatible types.
+
+Bug: https://bugs.gentoo.org/880385
+
+Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
+
+--- a/formulas.h
++++ b/formulas.h
+@@ -50,7 +50,7 @@ struct symetryinfo {
+ #define FORMULAMAGIC 1121
+ struct formula {
+ int magic;
+- int (*calculate) (number_t, number_t, number_t, number_t) REGISTERS(3);
++ int (*calculate) (number_t, number_t, number_t, number_t);
+ char *name[2];
+ vinfo v;
+ int mandelbrot;
diff --git a/app-misc/bb/files/bb-1.3.0_rc1-fix-lto-type-mismatch.patch b/app-misc/bb/files/bb-1.3.0_rc1-fix-lto-type-mismatch.patch
new file mode 100644
index 000000000000..6442a9c9fd29
--- /dev/null
+++ b/app-misc/bb/files/bb-1.3.0_rc1-fix-lto-type-mismatch.patch
@@ -0,0 +1,18 @@
+In tex.c these variables are initialized as unsigned longs, so they should
+be declared as unsigned longs. I have scanned the code base for any usage
+of them in the negatives - nothing.
+
+Bug: https://bugs.gentoo.org/854720
+
+Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
+
+--- a/tex.h
++++ b/tex.h
+@@ -28,5 +28,6 @@ extern void disp3d(void);
+ extern void set_zbuff(void);
+ extern void unset_zbuff(void);
+
+-extern int alfa,beta,gama,centerx,centery,centerz;
++extern unsigned long alfa,beta,gama;
++extern int centerx,centery,centerz;
+ extern float zoom;
diff --git a/app-misc/bb/files/bb-1.3.0_rc1-fix-return-type-and-QA.patch b/app-misc/bb/files/bb-1.3.0_rc1-fix-return-type-and-QA.patch
new file mode 100644
index 000000000000..b1c8f8115605
--- /dev/null
+++ b/app-misc/bb/files/bb-1.3.0_rc1-fix-return-type-and-QA.patch
@@ -0,0 +1,47 @@
+diff --git a/ctrl87.c b/ctrl87.c
+index 05f1e6d..8789d92 100644
+--- a/ctrl87.c
++++ b/ctrl87.c
+@@ -43,8 +43,7 @@ unsigned short _control87(unsigned short newcw, unsigned short mask)
+ : /* registers */ "ax", "bx", "dx"
+ );
+ }
+- return cw;
+ #endif
+ #endif
+-
++return cw;
+ } /* _control87 */
+diff --git a/main.c b/main.c
+index a9fac57..41b56d1 100644
+--- a/main.c
++++ b/main.c
+@@ -73,8 +73,8 @@ load_song (char *name)
+ sleep (1);
+ }
+ }
+- return 0;
+ #endif
++return 0;
+ }
+
+ void
+diff --git a/scene4.c b/scene4.c
+index 12b640c..b2f69f3 100644
+--- a/scene4.c
++++ b/scene4.c
+@@ -231,10 +231,10 @@ void scene4(void)
+ draw();
+ bbflushwait(0.1 * 1000000);
+ for (i = 20; i < aa_imgwidth(context) - 20; i++)
+- aa_putpixel(context, i, aa_imgheight(context) - 10, 255),
+- aa_putpixel(context, i, aa_imgheight(context) - 11, 255),
+- aa_putpixel(context, i, aa_imgheight(context) - 12, 255),
+- aa_putpixel(context, i, aa_imgheight(context) - 13, 255),
++ aa_putpixel(context, i, aa_imgheight(context) - 10, 255);
++ aa_putpixel(context, i, aa_imgheight(context) - 11, 255);
++ aa_putpixel(context, i, aa_imgheight(context) - 12, 255);
++ aa_putpixel(context, i, aa_imgheight(context) - 13, 255);
+ gentable();
+ timestuff(-25, drawfire, mydraw, 7 * 1000000);
+ free(table);