mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-19 02:00:06 +02:00
90 lines
2.3 KiB
Plaintext
90 lines
2.3 KiB
Plaintext
From a7b2bc562fb3a4403fefc4061b8730f27bade615 Mon Sep 17 00:00:00 2001
|
|
From: Markus Himmel <markus@himmel-villmar.de>
|
|
Date: Mon, 12 Jan 2015 20:01:38 +0000
|
|
Subject: [PATCH 1/2] applying patch lgeneral-1.2.3.patch
|
|
|
|
---
|
|
configure | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/configure b/configure
|
|
index 846e301..e6073fd 100755
|
|
--- a/configure
|
|
+++ b/configure
|
|
@@ -5314,7 +5314,7 @@ if test "${ac_cv_lib_m_main+set}" = set; then
|
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
|
else
|
|
ac_check_lib_save_LIBS=$LIBS
|
|
-LIBS="-lm $LIBS"
|
|
+LIBS="$LIBS"
|
|
cat >conftest.$ac_ext <<_ACEOF
|
|
/* confdefs.h. */
|
|
_ACEOF
|
|
@@ -5368,7 +5368,7 @@ if test $ac_cv_lib_m_main = yes; then
|
|
#define HAVE_LIBM 1
|
|
_ACEOF
|
|
|
|
- LIBS="-lm $LIBS"
|
|
+ LIBS="$LIBS"
|
|
|
|
else
|
|
{ { echo "$as_me:$LINENO: error: maths library is needed" >&5
|
|
--
|
|
1.8.3.4
|
|
|
|
|
|
From b29a7822ee12df83585548077267afe2be0c78e1 Mon Sep 17 00:00:00 2001
|
|
From: Markus Himmel <markus@himmel-villmar.de>
|
|
Date: Wed, 14 Jan 2015 20:15:41 +0000
|
|
Subject: [PATCH 2/2] Move main config
|
|
|
|
---
|
|
src/config.c | 19 +++++++++++++++++--
|
|
1 file changed, 17 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/config.c b/src/config.c
|
|
index 5baa759..b44e162 100644
|
|
--- a/src/config.c
|
|
+++ b/src/config.c
|
|
@@ -22,6 +22,13 @@
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
#include <unistd.h>
|
|
+
|
|
+#ifdef __HAIKU__
|
|
+#include <SupportDefs.h>
|
|
+#include <FindDirectory.h>
|
|
+#include <fs_info.h>
|
|
+#endif
|
|
+
|
|
#include "sdl.h"
|
|
#include "config.h"
|
|
#include "parser.h"
|
|
@@ -32,13 +39,21 @@ Config config;
|
|
/* check if config directory exists; if not create it and set config_dir */
|
|
void check_config_dir_name()
|
|
{
|
|
+ size_t length;
|
|
struct stat info;
|
|
#ifndef INSTALLDIR
|
|
/* if no installation store config to current directory not home */
|
|
sprintf( config.dir_name, "." );
|
|
-#else
|
|
+#elif __HAIKU__
|
|
+ find_directory(B_USER_SETTINGS_DIRECTORY, dev_for_path("/boot"), false,
|
|
+ config.dir_name, sizeof(config.dir_name) - 1);
|
|
+ length = strlen(config.dir_name);
|
|
+ snprintf(config.dir_name + length, sizeof(config.dir_name) - (1 + length),
|
|
+ "/LGames");
|
|
+ fprintf( stderr, "HAIKU: Config path is %s\n", config.dir_name);
|
|
+#else
|
|
sprintf( config.dir_name, "%s/.lgames", getenv( "HOME" ) );
|
|
-#endif
|
|
+#endif
|
|
if ( stat( config.dir_name, &info ) != 0 ) {
|
|
int res;
|
|
|
|
--
|
|
1.8.3.4
|
|
|