mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 06:28:55 +02:00
move lgeneral to the correct place according to gentoo packages, added new recipe for 1.3.1 (#744)
This commit is contained in:
89
games-strategy/lgeneral/patches/lgeneral-1.2.3.patchset
Normal file
89
games-strategy/lgeneral/patches/lgeneral-1.2.3.patchset
Normal file
@@ -0,0 +1,89 @@
|
||||
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
|
||||
|
||||
73
games-strategy/lgeneral/patches/lgeneral-1.3.1.patchset
Normal file
73
games-strategy/lgeneral/patches/lgeneral-1.3.1.patchset
Normal file
@@ -0,0 +1,73 @@
|
||||
From b7ed76706d82e32bfb3f748dadffafa622eb3968 Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Thu, 28 Jul 2016 11:46:18 +0200
|
||||
Subject: applying patch lgeneral 1.3.1
|
||||
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 39e357b..fa13fe3 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5472,7 +5472,7 @@ if ${ac_cv_lib_m_main+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
-LIBS="-lm $LIBS"
|
||||
+LIBS="$LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
@@ -5501,7 +5501,7 @@ if test "x$ac_cv_lib_m_main" = xyes; then :
|
||||
#define HAVE_LIBM 1
|
||||
_ACEOF
|
||||
|
||||
- LIBS="-lm $LIBS"
|
||||
+ LIBS="$LIBS"
|
||||
|
||||
else
|
||||
as_fn_error $? "maths library is needed" "$LINENO" 5
|
||||
diff --git a/src/config.c b/src/config.c
|
||||
index 3b1dfef..fb495c0 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 "lg-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;
|
||||
|
||||
--
|
||||
2.7.0
|
||||
|
||||
Reference in New Issue
Block a user