From abdc05694263827160202b1e2cde8039544a42a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Sat, 1 Jun 2019 13:03:04 +0200 Subject: [PATCH] mame: upgrade 0209 -> 0210 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fetch sources from git Signed-off-by: Andreas Müller --- recipes-emulators/mame/mame.bb | 10 ++- .../files/0006-Fix-build-with-gcc-9.patch | 64 +++++++++++++++++++ 2 files changed, 68 insertions(+), 6 deletions(-) create mode 100644 recipes-games/opentyrian/files/0006-Fix-build-with-gcc-9.patch diff --git a/recipes-emulators/mame/mame.bb b/recipes-emulators/mame/mame.bb index 96ba349..4aaca07 100644 --- a/recipes-emulators/mame/mame.bb +++ b/recipes-emulators/mame/mame.bb @@ -5,15 +5,13 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://LICENSE.md;md5=798620970c471a3a6b7b5e9c9192fe12" SRC_URI = " \ - https://github.com/mamedev/mame/archive/${BPN}${PV}.tar.gz \ + git://github.com/mamedev/mame.git \ file://no-upstream/0001-pokey-Make-step_one_clock-inline.patch \ file://mame.desktop \ " -PV = "0209" -SRC_URI[md5sum] = "47054af93e71d9d0a5010b620ae7e1a2" -SRC_URI[sha256sum] = "9442e88bd87cfe407eb093a2ecb42a3850cabe31cd52c4efdef1bf7f584a8eab" - -S = "${WORKDIR}/${BPN}-${BPN}${PV}" +PV = "0210" +SRCREV = "ad45c9c6094b2dc78a5610422566bd0ce39e0d9e" +S = "${WORKDIR}/git" inherit siteinfo gtk-icon-cache diff --git a/recipes-games/opentyrian/files/0006-Fix-build-with-gcc-9.patch b/recipes-games/opentyrian/files/0006-Fix-build-with-gcc-9.patch new file mode 100644 index 0000000..d54a9dc --- /dev/null +++ b/recipes-games/opentyrian/files/0006-Fix-build-with-gcc-9.patch @@ -0,0 +1,64 @@ +From 28a0682bf3af1433ffdcd3c0458fdf4ebd5cc11a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Fri, 7 Jun 2019 21:49:17 +0200 +Subject: [PATCH] Fix build with gcc 9 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller +--- + src/destruct.c | 2 +- + src/game_menu.c | 4 ++-- + src/video_scale_hqNx.c | 4 ++-- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/destruct.c b/src/destruct.c +index 873c76b..1150ab5 100644 +--- a/src/destruct.c ++++ b/src/destruct.c +@@ -2240,7 +2240,7 @@ static void DE_RunTickAI( void ) + ptrUnit = ptrTarget->unit; + for (j = 0; j < config.max_installations; j++, ptrUnit++) + { +- if (abs(ptrUnit->unitX - ptrCurUnit->unitX) < 8) ++ if (abs(((Sint32)ptrUnit->unitX) - ((Sint32)ptrCurUnit->unitX)) < 8) + { + /* I get it. This makes helicoptors hover over + * their enemies. */ +diff --git a/src/game_menu.c b/src/game_menu.c +index 7d24ad7..438c247 100644 +--- a/src/game_menu.c ++++ b/src/game_menu.c +@@ -1992,9 +1992,9 @@ void JE_updateNavScreen( void ) + navX = navX + (newNavX - navX) / 2.0f; + navY = navY + (newNavY - navY) / 2.0f; + +- if (abs(newNavX - navX) < 1) ++ if (fabs(newNavX - navX) < 1) + navX = newNavX; +- if (abs(newNavY - navY) < 1) ++ if (fabs(newNavY - navY) < 1) + navY = newNavY; + + fill_rectangle_xy(VGAScreen, 314, 0, 319, 199, 230); +diff --git a/src/video_scale_hqNx.c b/src/video_scale_hqNx.c +index 51836e6..6c7b5a5 100644 +--- a/src/video_scale_hqNx.c ++++ b/src/video_scale_hqNx.c +@@ -120,8 +120,8 @@ inline void interp10(Uint32 *pc, Uint32 c1, Uint32 c2, Uint32 c3) + + inline bool diff(unsigned int w1, unsigned int w2) + { +- Uint32 YUV1 = yuv_palette[w1]; +- Uint32 YUV2 = yuv_palette[w2]; ++ Sint32 YUV1 = yuv_palette[w1]; ++ Sint32 YUV2 = yuv_palette[w2]; + return ( ( abs((YUV1 & Ymask) - (YUV2 & Ymask)) > trY ) || + ( abs((YUV1 & Umask) - (YUV2 & Umask)) > trU ) || + ( abs((YUV1 & Vmask) - (YUV2 & Vmask)) > trV ) ); +-- +2.20.1 +