sdllopan, fix reference to libSDL, cleanup (#4328)

This commit is contained in:
Schrijvers Luc
2019-11-11 10:32:14 +01:00
committed by GitHub
parent 5e07dbf4e6
commit f92f337346
2 changed files with 47 additions and 30 deletions

View File

@@ -1,11 +1,8 @@
From 213275e0a82538697cadc569a30a9e2516596708 Mon Sep 17 00:00:00 2001
From a2f2423ce56841b39badee043c0416e203756812 Mon Sep 17 00:00:00 2001
From: Scott McCreary <scottmc2@gmail.com>
Date: Wed, 1 Feb 2017 21:23:54 -0800
Subject: [PATCH] Add Window title
Subject: Add Window title
---
gfx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gfx.c b/gfx.c
index 4a5e1bc..81935d1 100644
@@ -17,13 +14,13 @@ index 4a5e1bc..81935d1 100644
videomem=(void *)thescreen->pixels;
+ SDL_WM_SetCaption("SDL Lopan", "SDL Lopan");
// SDL_ShowCursor(0);
for(i=0;i<65536;++i)
--
2.7.0
--
2.23.0
From 6aaf58f76675bf2ad86b72206aceffd825b26778 Mon Sep 17 00:00:00 2001
From 958f5393c18e0b3891e6778247438dc72c072811 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Thu, 28 Nov 2013 20:44:31 +0100
Subject: Search data in app directory.
@@ -41,16 +38,12 @@ index d653914..a597b9f 100644
@@ -543,6 +544,8 @@ int code;
unsigned char redraw;
int backup;
+ chdir(dirname(argv[0]));
+
bgsetnumber=tilesetnumber=-1;
randomize();
opendisplay(640,400);
--
1.8.3.4
diff --git a/lopan.rdef b/lopan.rdef
new file mode 100644
index 0000000..78d07c4
@@ -88,7 +81,33 @@ index 0000000..78d07c4
+ $"8400040A010101000A020102000A030103000A0501052021210A050106100117"
+ $"830004"
+};
--
1.8.3.4
--
2.23.0
From d26493aefb5049ef5afb473fb81d2381043aadfc Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Tue, 5 Nov 2019 13:43:02 +0100
Subject: Fix launch from DeskbarMenu
diff --git a/lopan.c b/lopan.c
index a597b9f..6d18c68 100644
--- a/lopan.c
+++ b/lopan.c
@@ -544,7 +544,11 @@ int code;
unsigned char redraw;
int backup;
- chdir(dirname(argv[0]));
+char *binpath = realpath(argv[0], NULL);
+if (binpath != NULL) {
+ chdir(dirname(binpath));
+ free(binpath);
+}
bgsetnumber=tilesetnumber=-1;
randomize();
--
2.23.0

View File

@@ -1,7 +1,6 @@
SUMMARY="An SDL version of the Lopan (Mah Jongg solitaire) game"
DESCRIPTION="
The well known Lopan (Mah Jongg solitaire) game. Click on matching pairs and \
try to remove all 144 tiles.
DESCRIPTION="The well known Lopan (Mah Jong solitaire) game. Click on \
matching pairs and try to remove all 144 tiles.
Within the game, the ESC key exits, and RETURN reshuffles the board.
The arrow keys work as undo/redo.
@@ -12,10 +11,10 @@ In both cases, number files beginnging with 0."
HOMEPAGE="http://www.linuxmotors.com/sdllopan/"
COPYRIGHT="1999-2008 Dave Ashley"
LICENSE="GNU GPL v2"
REVISION="5"
SOURCE_URI="http://www.linuxmotors.com/sdllopan/downloads/sdllopan-10.tgz"
REVISION="6"
SOURCE_URI="http://www.linuxmotors.com/sdllopan/downloads/sdllopan-$portVersion.tgz"
CHECKSUM_SHA256="386de065bc8c3449c3b0b5e5651cb035cb1bdc242b425c865dd387c54ce708c3"
PATCHES="sdllopan-10.patchset"
PATCHES="sdllopan-$portVersion.patchset"
ADDITIONAL_FILES="
Lopan-icon
tiles0.pcx
@@ -26,21 +25,20 @@ ARCHITECTURES="x86_gcc2 x86_64"
PROVIDES="
sdllopan = $portVersion
app:lopan = $portVersion
app:Lopan = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libsdl$secondaryArchSuffix
haiku
lib:libSDL_1.2
"
BUILD_REQUIRES="
devel:libsdl$secondaryArchSuffix
haiku_devel
devel:libSDL
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
haiku_devel
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:gcc
cmd:ld
cmd:make
"