maelstrom: Update to 3.0.7

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
This commit is contained in:
Marko Lindqvist
2022-08-24 23:21:25 +03:00
parent c90fd2a830
commit 1bb703b7b3
5 changed files with 32 additions and 135 deletions

View File

@@ -9,26 +9,19 @@ Content-Transfer-Encoding: 8bit
Upstream-Status: Inappropriate [OE specific] Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
configure.in | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/configure.in b/configure.in diff -Nurd Maelstrom-3.0.7/configure.in Maelstrom-3.0.7/configure.in
index 0170f4b..a6f76ac 100644 --- Maelstrom-3.0.7/configure.in 2021-02-04 19:17:55.000000000 +0200
--- a/configure.in +++ Maelstrom-3.0.7/configure.in 2022-08-24 23:12:31.161825755 +0300
+++ b/configure.in @@ -47,10 +47,7 @@
@@ -47,10 +47,7 @@ AC_SUBST(INETLIB)
dnl Check for SDL dnl Check for SDL
SDL_VERSION=1.2.0 SDL_VERSION=2.0.14
-AM_PATH_SDL($SDL_VERSION, -AM_PATH_SDL2($SDL_VERSION,
- :, - :,
- AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) - AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
-) -)
+PKG_CHECK_MODULES([SDL], [sdl >= $SDL_VERSION], [HAVE_SDL=yes], [AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])]) +PKG_CHECK_MODULES([SDL], [sdl2 >= $SDL_VERSION], [HAVE_SDL=yes], [AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])])
CFLAGS="$CFLAGS $SDL_CFLAGS" CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS" LIBS="$LIBS $SDL_LIBS"
--
2.20.1

View File

@@ -1,44 +0,0 @@
From b051343fcac17227369bc4c7e0b0b00811500e24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Tue, 12 Feb 2019 15:06:01 +0100
Subject: [PATCH] Fix install dir
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Inappropriate [Configuration]
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
Makefile.am | 2 +-
configure.in | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 4a9e949..a3194fc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -65,7 +65,7 @@ DIST_SUBDIRS = $(SUBDIRS) Images Docs
# Special install rule for the game
install:
- make install_gamedata target=@GAME_INSTALLDIR@
+ make install_gamedata target=$(DESTDIR)@GAME_INSTALLDIR@
install_gamedata:
sh mkinstalldirs $(target)/
diff --git a/configure.in b/configure.in
index a6f76ac..e158dd2 100644
--- a/configure.in
+++ b/configure.in
@@ -105,6 +105,7 @@ case "$target" in
GAME_INSTALLDIR="\$(prefix)/games/$PACKAGE"
;;
esac
+GAME_INSTALLDIR="\$(datadir)/$PACKAGE"
AC_SUBST(GAME_INSTALLDIR)
CFLAGS="$CFLAGS -DLIBDIR=\\\"$GAME_INSTALLDIR\\\""
--
2.20.1

View File

@@ -13,22 +13,16 @@ Upstream-Status: Pending
[1] https://src.fedoraproject.org/cgit/rpms/Maelstrom.git/tree/Maelstrom-3.0.6-setgid.patch [1] https://src.fedoraproject.org/cgit/rpms/Maelstrom.git/tree/Maelstrom-3.0.6-setgid.patch
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
main.cpp | 8 +++++
scores.cpp | 87 ++++++++++++++++++++++++++++++++++--------------------
scores.h | 1 +
3 files changed, 64 insertions(+), 32 deletions(-)
diff --git a/main.cpp b/main.cpp diff -Nurd Maelstrom-3.0.7/main.cpp Maelstrom-3.0.7/main.cpp
index 7728c0b..851cf01 100644 --- Maelstrom-3.0.7/main.cpp 2021-02-04 18:50:27.000000000 +0200
--- a/main.cpp +++ Maelstrom-3.0.7/main.cpp 2022-08-24 22:46:23.571071218 +0300
+++ b/main.cpp @@ -170,12 +170,20 @@
@@ -170,12 +170,20 @@ int main(int argc, char *argv[])
/* Command line flags */ /* Command line flags */
int doprinthigh = 0; int doprinthigh = 0;
int speedtest = 0; int speedtest = 0;
+ gid_t gid; + gid_t gid;
Uint32 video_flags = SDL_SWSURFACE; Uint32 video_flags = SDL_WINDOW_FULLSCREEN_DESKTOP;
/* Normal variables */ /* Normal variables */
SDL_Event event; SDL_Event event;
@@ -44,10 +38,9 @@ index 7728c0b..851cf01 100644
#ifndef __WIN95__ #ifndef __WIN95__
/* The first thing we do is calculate our checksum */ /* The first thing we do is calculate our checksum */
(void) checksum(); (void) checksum();
diff --git a/scores.cpp b/scores.cpp diff -Nurd Maelstrom-3.0.7/scores.cpp Maelstrom-3.0.7/scores.cpp
index 1633e8f..c8b53b5 100644 --- Maelstrom-3.0.7/scores.cpp 2021-02-06 07:35:46.000000000 +0200
--- a/scores.cpp +++ Maelstrom-3.0.7/scores.cpp 2022-08-24 22:53:05.896048770 +0300
+++ b/scores.cpp
@@ -4,6 +4,8 @@ @@ -4,6 +4,8 @@
*/ */
@@ -57,7 +50,7 @@ index 1633e8f..c8b53b5 100644
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#endif #endif
@@ -15,11 +17,11 @@ @@ -15,7 +17,7 @@
#include "load.h" #include "load.h"
#include "dialog.h" #include "dialog.h"
@@ -66,11 +59,6 @@ index 1633e8f..c8b53b5 100644
#define NUM_SCORES 10 // Do not change this! #define NUM_SCORES 10 // Do not change this!
/* Everyone can write to scores file if defined to 0 */ /* Everyone can write to scores file if defined to 0 */
-#define SCORES_PERMMASK 0
+#define SCORES_PERMMASK 002
#define CLR_DIALOG_WIDTH 281
#define CLR_DIALOG_HEIGHT 111
@@ -27,10 +29,31 @@ @@ -27,10 +29,31 @@
Bool gNetScores = 0; Bool gNetScores = 0;
Scores hScores[NUM_SCORES]; Scores hScores[NUM_SCORES];
@@ -100,12 +88,12 @@ index 1633e8f..c8b53b5 100644
+ +
void LoadScores(void) void LoadScores(void)
{ {
- LibPath path; - SavePath path;
- SDL_RWops *scores_src; - SDL_RWops *scores_src;
int i; int i;
/* Try to load network scores, if we can */ /* Try to load network scores, if we can */
@@ -44,50 +67,50 @@ void LoadScores(void) @@ -44,50 +67,50 @@
} }
memset(&hScores, 0, sizeof(hScores)); memset(&hScores, 0, sizeof(hScores));
@@ -135,7 +123,7 @@ index 1633e8f..c8b53b5 100644
void SaveScores(void) void SaveScores(void)
{ {
- LibPath path; - SavePath path;
- SDL_RWops *scores_src; - SDL_RWops *scores_src;
int i; int i;
-#ifdef unix -#ifdef unix
@@ -184,10 +172,9 @@ index 1633e8f..c8b53b5 100644
} }
/* Just show the high scores */ /* Just show the high scores */
diff --git a/scores.h b/scores.h diff -Nurd Maelstrom-3.0.7/scores.h Maelstrom-3.0.7/scores.h
index 4126260..4716751 100644 --- Maelstrom-3.0.7/scores.h 1998-07-14 04:50:17.000000000 +0300
--- a/scores.h +++ Maelstrom-3.0.7/scores.h 2022-08-24 22:44:34.517672737 +0300
+++ b/scores.h
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
// Functions from scores.cc // Functions from scores.cc
extern void LoadScores(void); extern void LoadScores(void);
@@ -196,6 +183,3 @@ index 4126260..4716751 100644
extern int ZapHighScores(void); extern int ZapHighScores(void);
extern int GetStartLevel(void); extern int GetStartLevel(void);
extern void PrintHighScores(void); extern void PrintHighScores(void);
--
2.20.1

View File

@@ -1,37 +0,0 @@
From da490238ae606cc4dcb704fb739d3e6f523b1976 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Tue, 27 Oct 2020 19:50:25 +0100
Subject: [PATCH] SDL_FrameBuf.cpp: Fix build for 64Bit targets
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Stolen from [1]
[1] https://src.fedoraproject.org/rpms/Maelstrom/blob/master/f/Maelstrom-3.0.6-64bit.patch
Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
screenlib/SDL_FrameBuf.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/screenlib/SDL_FrameBuf.cpp b/screenlib/SDL_FrameBuf.cpp
index d1e087f..430e903 100644
--- a/screenlib/SDL_FrameBuf.cpp
+++ b/screenlib/SDL_FrameBuf.cpp
@@ -848,8 +848,8 @@ FrameBuf:: AddDirtyRect(SDL_Rect *rect)
for ( i=0; i<dirtymaplen; ++i ) {
if ( dirtymap[i] != NULL ) {
dirtymap[i] = (SDL_Rect *)(
- ((int)dirtymap[i]-(int)updatelist) +
- (int)newlist
+ ((long)dirtymap[i]-(long)updatelist) +
+ (long)newlist
);
}
}
--
2.26.2

View File

@@ -1,32 +1,34 @@
SUMMARY = "Maelstrom is a GPL'd port of the shareware game for the Macintosh" SUMMARY = "Maelstrom is a GPL'd port of the shareware game for the Macintosh"
LICENSE = "GPL-2.0-only & CC-BY-3.0" LICENSE = "GPL-2.0-only & CC-BY-3.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=0642955deaee2fa53c36bc592dc1ef25" LIC_FILES_CHKSUM = "\
file://COPYING.GPL;md5=d368405f1c604912f51ba286eed9944a \
file://COPYING.txt;md5=1ade764d012d246f775dc01dc4f7c1af \
"
HOMEPAGE = "https://www.libsdl.org/projects/Maelstrom/" HOMEPAGE = "https://www.libsdl.org/projects/Maelstrom/"
inherit autotools-brokensep pkgconfig gettext gtk-icon-cache inherit autotools-brokensep pkgconfig gettext gtk-icon-cache
DEPENDS += " \ DEPENDS += " \
libsdl-net \ libsdl2-net \
" "
SRC_URI = " \ SRC_URI = " \
https://www.libsdl.org/projects/Maelstrom/src/Maelstrom-${PV}.tar.gz \ https://www.libsdl.org/projects/Maelstrom/src/Maelstrom-${PV}.tar.gz \
file://0001-Use-pkg-config-to-find-sdl.patch \ file://0001-Use-pkg-config-to-find-sdl.patch \
file://0002-buttonlist.h-Fix-build-with-recent-gcc-s.patch \ file://0002-buttonlist.h-Fix-build-with-recent-gcc-s.patch \
file://0003-Fix-install-dir.patch \
file://0004-Maelstrom-3.0.6-setgid.patch \ file://0004-Maelstrom-3.0.6-setgid.patch \
file://0005-SDL_FrameBuf.cpp-Fix-build-for-64Bit-targets.patch \
file://0006-scores.cpp-Fix-build-with-hardened-security-flags.patch \ file://0006-scores.cpp-Fix-build-with-hardened-security-flags.patch \
file://maelstrom.png \ file://maelstrom.png \
file://Maelstrom.desktop \ file://Maelstrom.desktop \
" "
SRC_URI[md5sum] = "96aa6359538a6bd60b4198a792de578b"
SRC_URI[sha256sum] = "e7983c2c7376cdcca1944db1706d92aedd529638cf13358c88a60df982ba7b46" SRC_URI[sha256sum] = "93680322f4b04d4727ea8e0b461f259b604dc69e7465cb91d2b9aad378a9a036"
S = "${WORKDIR}/Maelstrom-${PV}" S = "${WORKDIR}/Maelstrom-${PV}"
do_configure:prepend() { do_configure:prepend() {
touch ${S}/NEWS ${S}/AUTHORS ${S}/ChangeLog touch ${S}/NEWS ${S}/AUTHORS ${S}/ChangeLog ${S}/COPYING ${S}/README
} }
do_install() { do_install() {
@@ -39,7 +41,6 @@ do_install() {
install -m 644 ${WORKDIR}/maelstrom.png ${D}/${datadir}/icons/hicolor/48x48/apps install -m 644 ${WORKDIR}/maelstrom.png ${D}/${datadir}/icons/hicolor/48x48/apps
install -d ${D}/${localstatedir}/lib/games install -d ${D}/${localstatedir}/lib/games
mv ${D}${datadir}/Maelstrom/*Scores ${D}/${localstatedir}/lib/games
} }
FILES:${PN} += "${datadir}/Maelstrom" FILES:${PN} += "/usr/games/Maelstrom"