diff --git a/games-puzzle/lgeneral/lgeneral-1.2.3.recipe b/games-puzzle/lgeneral/lgeneral-1.2.3.recipe index a60248823..8520e06df 100644 --- a/games-puzzle/lgeneral/lgeneral-1.2.3.recipe +++ b/games-puzzle/lgeneral/lgeneral-1.2.3.recipe @@ -14,7 +14,7 @@ LICENSE="GNU GPL v2" COPYRIGHT="Michael Speck, Leo Savernik, Peter Ivanyi" ARCHITECTURES="x86_gcc2 ?x86 ?x86_64" -PATCHES="lgeneral-1.2.3.patch" +PATCHES="lgeneral-1.2.3.patchset" PROVIDES=" lgeneral = $portVersion @@ -60,6 +60,9 @@ BUILD() INSTALL() { make install + + rm -rf $dataDir/applications + rm -rf $dataDir/icons $binDir/lgc-pg -s ./pg-data addAppDeskbarSymlink $binDir/lgeneral LGeneral diff --git a/games-puzzle/lgeneral/patches/lgeneral-1.2.3.patch b/games-puzzle/lgeneral/patches/lgeneral-1.2.3.patch deleted file mode 100644 index 1719eb095..000000000 --- a/games-puzzle/lgeneral/patches/lgeneral-1.2.3.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- lgeneral-1.2.3/configure.org 2012-04-20 20:50:03.000000000 +0200 -+++ lgeneral-1.2.3/configure 2014-07-14 16:31:39.049283072 +0200 -@@ -5314,7 +5314,7 @@ - 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 @@ - #define HAVE_LIBM 1 - _ACEOF - -- LIBS="-lm $LIBS" -+ LIBS="$LIBS" - - else - { { echo "$as_me:$LINENO: error: maths library is needed" >&5 diff --git a/games-puzzle/lgeneral/patches/lgeneral-1.2.3.patchset b/games-puzzle/lgeneral/patches/lgeneral-1.2.3.patchset new file mode 100644 index 000000000..2f740fdbd --- /dev/null +++ b/games-puzzle/lgeneral/patches/lgeneral-1.2.3.patchset @@ -0,0 +1,89 @@ +From a7b2bc562fb3a4403fefc4061b8730f27bade615 Mon Sep 17 00:00:00 2001 +From: Markus Himmel +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 +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 + #include + #include ++ ++#ifdef __HAIKU__ ++#include ++#include ++#include ++#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 +