lpairs-1.0.5.patchset revision 7b06903a
1From 84be8e3b3ba9af85e494098603c66252f8fccc6f Mon Sep 17 00:00:00 2001
2From: Markus Himmel <markus@himmel-villmar.de>
3Date: Wed, 14 Jan 2015 19:36:34 +0000
4Subject: Move config to LGames folder in user settings
5
6
7diff --git a/lpairs/cfg.c b/lpairs/cfg.c
8index 301878a..a786e39 100644
9--- a/lpairs/cfg.c
10+++ b/lpairs/cfg.c
11@@ -15,6 +15,11 @@
12  *                                                                         *
13  ***************************************************************************/
14 
15+#ifdef __HAIKU__
16+#include <FindDirectory.h>
17+#include <fs_info.h>
18+#endif
19+
20 #include <SDL/SDL.h>
21 #include <stdio.h>
22 #include <stdlib.h>
23@@ -32,10 +37,18 @@ Cfg cfg;
24 */
25 void C_StPth(char *p)
26 {
27+    size_t length;
28     memset( c_pth, 0, sizeof( c_pth ) );
29     if (p[0] == '~') {
30+#ifdef __HAIKU__
31+        find_directory(B_USER_SETTINGS_DIRECTORY, dev_for_path("/boot"), false,
32+            c_pth, sizeof(c_pth) - 1);
33+        length = strlen(c_pth);
34+        snprintf(c_pth+length, sizeof(c_pth)-(1+length), "/LGames%s", p+1);
35+#else
36         snprintf(c_pth, sizeof(c_pth)-1, "%s%s",
37             home_dir, p+1);
38+#endif
39     }
40     else
41         strncpy(c_pth, p, sizeof(c_pth)-1);
42-- 
432.21.0
44
45
46From db68fe85f9006e1872df2d64adbabf15950173be Mon Sep 17 00:00:00 2001
47From: Markus Himmel <markus@himmel-villmar.de>
48Date: Wed, 14 Jan 2015 19:19:28 +0000
49Subject: Don't use subfolder games in $dataDir
50
51
52diff --git a/configure.in b/configure.in
53index f412594..f6cb17d 100644
54--- a/configure.in
55+++ b/configure.in
56@@ -32,7 +32,7 @@ localedir=$datadir/locale
57 locdir_flag="-DLOCALEDIR=\\\"$localedir\\\""
58 
59 dnl installation path
60-inst_dir=$datadir/games/lpairs
61+inst_dir=$datadir/lpairs
62 inst_flag="-DSRC_DIR=\\\"$inst_dir/\\\""
63 
64 AC_ARG_ENABLE( install,
65-- 
662.21.0
67
68
69From 0ca3eb5832a49036f72ec14a12dc16fc22828647 Mon Sep 17 00:00:00 2001
70From: begasus <begasus@gmail.com>
71Date: Sat, 20 Apr 2019 09:58:05 +0200
72Subject: gcc2 doesn't like -Wno-unused-result
73
74
75diff --git a/configure.in b/configure.in
76index f6cb17d..61a432d 100644
77--- a/configure.in
78+++ b/configure.in
79@@ -17,7 +17,7 @@ AC_CHECK_LIB(m, main,, AC_MSG_ERROR(lib math is needed))
80 
81 dnl check SDL version
82 AM_PATH_SDL(1.0.0,, AC_MSG_ERROR(lib SDL is needed))
83-CFLAGS="$CFLAGS $SDL_CFLAGS -Wno-unused-result"
84+CFLAGS="$CFLAGS $SDL_CFLAGS"
85 LIBS="$LIBS $SDL_LIBS"
86 AM_PATH_SDL(1.1.5, CFLAGS="$CFLAGS -DSDL_1_1_5",)
87 
88-- 
892.21.0
90
91