summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-06-13 16:24:36 +0000
committerSam James <sam@gentoo.org>2021-06-13 17:13:51 +0000
commit50861304fe434395c47e915ff4cd6df25f9afaf7 (patch)
tree34c35361571db5aaf06d690c0ef6a2d0052ce127 /games-arcade
parentmedia-plugins/vdr-pin: fix build with GCC 11 (diff)
downloadgentoo-50861304fe434395c47e915ff4cd6df25f9afaf7.tar.gz
gentoo-50861304fe434395c47e915ff4cd6df25f9afaf7.tar.bz2
gentoo-50861304fe434395c47e915ff4cd6df25f9afaf7.zip
games-arcade/briquolo: various compile fixes (GCC 11, Clang)
* Fix build with GCC 11 (const) * Fix build with Clang (widening conversion, patch from FreeBSD) * Change delimiter in sed away from colon Closes: https://bugs.gentoo.org/739094 Closes: https://bugs.gentoo.org/790746 Closes: https://bugs.gentoo.org/715738 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-arcade')
-rw-r--r--games-arcade/briquolo/briquolo-0.5.7.ebuild4
-rw-r--r--games-arcade/briquolo/files/briquolo-0.5.7-clang-widening.patch31
-rw-r--r--games-arcade/briquolo/files/briquolo-0.5.7-gcc11-fix-const.patch12
3 files changed, 46 insertions, 1 deletions
diff --git a/games-arcade/briquolo/briquolo-0.5.7.ebuild b/games-arcade/briquolo/briquolo-0.5.7.ebuild
index d58d4462cad1..fff6d3ea6456 100644
--- a/games-arcade/briquolo/briquolo-0.5.7.ebuild
+++ b/games-arcade/briquolo/briquolo-0.5.7.ebuild
@@ -30,6 +30,8 @@ PATCHES=(
"${FILESDIR}"/${P}-gcc43.patch
"${FILESDIR}"/${P}-libpng14.patch
"${FILESDIR}"/${P}-respect-AR.patch
+ "${FILESDIR}"/${P}-gcc11-fix-const.patch
+ "${FILESDIR}"/${P}-clang-widening.patch
)
src_prepare() {
@@ -40,7 +42,7 @@ src_prepare() {
-e '/^SUBDIRS/s/desktop//' \
Makefile.{in,am} || die
sed -i \
- -e "/CXXFLAGS/s:-O3:${CXXFLAGS}:" \
+ -e "/CXXFLAGS/s|-O3|${CXXFLAGS}|" \
-e 's:=.*share/locale:=/usr/share/locale:' \
configure{,.ac} || die
sed -i \
diff --git a/games-arcade/briquolo/files/briquolo-0.5.7-clang-widening.patch b/games-arcade/briquolo/files/briquolo-0.5.7-clang-widening.patch
new file mode 100644
index 000000000000..5afaaefd5848
--- /dev/null
+++ b/games-arcade/briquolo/files/briquolo-0.5.7-clang-widening.patch
@@ -0,0 +1,31 @@
+https://bugs.gentoo.org/739094
+https://svnweb.freebsd.org/ports/head/games/briquolo/files/patch-src-MOGL-MOGL_PoliceTTF.h?revision=460698&view=co
+
+Fix types passed to SDL_Rect structure (SDL 1.2)
+
+--- a/src/MOGL/MOGL_PoliceTTF.h
++++ b/src/MOGL/MOGL_PoliceTTF.h
+@@ -42,10 +42,10 @@
+ {
+ GLuint TextureName;
+ Uint16 carac;
+- unsigned int x1;
+- unsigned int y1;
+- unsigned int x2;
+- unsigned int y2;
++ Sint16 x1;
++ Sint16 y1;
++ int x2;
++ int y2;
+ };
+
+ struct MOGL_Struct_TextureCarac
+@@ -141,7 +141,7 @@
+ MOGL_Struct_Carac * _Caracteres;
+ MOGL_Struct_Carac * (_Correspondance[256-32]);
+
+- unsigned int _LastTextureX, _LastTextureY;
++ Sint16 _LastTextureX, _LastTextureY;
+ unsigned int maxHeightCarac;
+ MOGL_Map_Carac _MapCarac;
+ MOGL_Vector_TextureName _VectorTextureName;
diff --git a/games-arcade/briquolo/files/briquolo-0.5.7-gcc11-fix-const.patch b/games-arcade/briquolo/files/briquolo-0.5.7-gcc11-fix-const.patch
new file mode 100644
index 000000000000..d5d68819675a
--- /dev/null
+++ b/games-arcade/briquolo/files/briquolo-0.5.7-gcc11-fix-const.patch
@@ -0,0 +1,12 @@
+https://bugs.gentoo.org/790746
+--- a/src/MOGL/MOGL_Fenetre.h
++++ b/src/MOGL/MOGL_Fenetre.h
+@@ -52,7 +52,7 @@ class MOGL_Fenetre
+ private:
+ struct CompareResolution
+ {
+- bool operator() (const MOGL_Resolution & x, const MOGL_Resolution & y)
++ bool operator() (const MOGL_Resolution & x, const MOGL_Resolution & y) const
+ {
+ return x.w < y.w;
+ }