mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
lmarbles: Add icon, move config file to B_USER_SETTINGS_DIRECTORY
This commit is contained in:
35
games-puzzle/lmarbles/additional-files/lmarbles.rdef
Normal file
35
games-puzzle/lmarbles/additional-files/lmarbles.rdef
Normal file
@@ -0,0 +1,35 @@
|
||||
resource app_signature "application/x-vnd.lgames.lmarbles";
|
||||
|
||||
resource vector_icon array {
|
||||
$"6E63696604020106023D1D3F341202B40EF83D18AC49111A48F914FF00008200"
|
||||
$"0097FF020116023D20000000000000003D2000494000496000FF4700DD044A82"
|
||||
$"05010402044030C34530BC3A30304030BC3A30C3454050BC3A50C34550504050"
|
||||
$"C34550BC3A0204C35CBC8C4BBDE0C295BB37BEBEBC03C084BAFABCF7BD0CBCEF"
|
||||
$"C04BBC29BEF7BDB6C1A0C18DC0D4BFC7C1DDC354BFCB06033E414F3B48414939"
|
||||
$"4540463D454649060EEEBFFB0F304E224724512142253F2333203A2530302F28"
|
||||
$"2D312B3A27342740274331432E43344038433F443AC08DC14E4046434B434745"
|
||||
$"4A504F4C48C7E4C8D24C5C4D5B4B5D3E55BFD5CC153359110A020100023D6148"
|
||||
$"2CE9C7B814483D76EE4A84FB4A8D970A020100023C8D1ABC8FEE3CA8493CA55A"
|
||||
$"48DD5F4A66B20A03010330242001178400040A010100023E6000000000000000"
|
||||
$"3E6000C380004850000A02010220141A0A030100123E60000000000000003E60"
|
||||
$"0046A00049300001178300040A000100023E60000000000000003E600046A000"
|
||||
$"4930000A0201022024200A030100123E60000000000000003E60004910004A08"
|
||||
$"0001178300040A010100023E60000000000000003E60004910004A08000A0301"
|
||||
$"00123E60000000000000003E6000C3800044400001178300040A000100023E60"
|
||||
$"000000000000003E6000C380004440000A030100123E60000000000000003E60"
|
||||
$"0046A00046E00001178300040A010100023E60000000000000003E600046A000"
|
||||
$"46E0000A0201022023130A030100123E60000000000000003E600046A000C280"
|
||||
$"0001178300040A000100023E60000000000000003E600046A000C28000"
|
||||
};
|
||||
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 0,
|
||||
minor = 8,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "LMarbles",
|
||||
long_info = "LMarbles ©2000 Michael Speck"
|
||||
};
|
||||
@@ -9,17 +9,16 @@ and not a time limit. This way you have as much time as you need to think."
|
||||
HOMEPAGE="http://lgames.sourceforge.net/"
|
||||
SRC_URI="http://sourceforge.net/projects/lgames/files/lmarbles/lmarbles-1.0.8.tar.gz"
|
||||
CHECKSUM_SHA256="0e5a16a0116d325589b28f3555ced6a0b486f0fd7632cd3d98bee5cddf213e83"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
LICENSE="GNU GPL v2"
|
||||
COPYRIGHT="2000 Michael Speck"
|
||||
ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
|
||||
|
||||
PATCHES="lmarbles-1.0.8.patch"
|
||||
GLOBAL_WRITABLE_FILES="var/lmarbles.prfs keep-old"
|
||||
PATCHES="lmarbles-1.0.8.patchset"
|
||||
|
||||
PROVIDES="
|
||||
lmarbles = $portVersion
|
||||
cmd:lmarbles = $portVersion
|
||||
app:LMarbles = $portVersion
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
@@ -39,6 +38,7 @@ BUILD_PREREQUIRES="
|
||||
cmd:gcc
|
||||
cmd:ld
|
||||
cmd:libtoolize
|
||||
cmd:xres
|
||||
"
|
||||
|
||||
BUILD()
|
||||
@@ -46,10 +46,15 @@ BUILD()
|
||||
libtoolize --force --copy --install
|
||||
runConfigure ./configure
|
||||
make $jobArgs
|
||||
|
||||
addResourcesToBinaries $portDir/additional-files/lmarbles.rdef src/lmarbles
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
addAppDeskbarSymlink $binDir/lmarbles LMarbles
|
||||
mkdir -p $appsDir
|
||||
mv $binDir/lmarbles $appsDir/LMarbles
|
||||
addAppDeskbarSymlink $appsDir/LMarbles LMarbles
|
||||
mimeset -f $appsDir/LMarbles
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
--- lmarbles-1.0.8/configure.org 2009-10-26 20:56:13.000000000 +0100
|
||||
+++ lmarbles-1.0.8/configure 2014-07-14 18:31:02.527958016 +0200
|
||||
@@ -5154,7 +5154,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
|
||||
@@ -5208,7 +5208,7 @@
|
||||
#define HAVE_LIBM 1
|
||||
_ACEOF
|
||||
|
||||
- LIBS="-lm $LIBS"
|
||||
+ LIBS="$LIBS"
|
||||
|
||||
else
|
||||
{ { echo "$as_me:$LINENO: error: lib math is needed" >&5
|
||||
105
games-puzzle/lmarbles/patches/lmarbles-1.0.8.patchset
Normal file
105
games-puzzle/lmarbles/patches/lmarbles-1.0.8.patchset
Normal file
@@ -0,0 +1,105 @@
|
||||
From 6b5f57906db0f0fd8a15fc60da2a791d9ea2bc36 Mon Sep 17 00:00:00 2001
|
||||
From: Puck Meerburg <puck@puckipedia.nl>
|
||||
Date: Mon, 5 Jan 2015 17:41:59 +0100
|
||||
Subject: Apply original lmarbles patch
|
||||
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 543fb95..b012313 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5154,7 +5154,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
|
||||
@@ -5208,7 +5208,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: lib math is needed" >&5
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From f837403562b62f6aa17a967597fe61e54499a7bb Mon Sep 17 00:00:00 2001
|
||||
From: Puck Meerburg <puck@puckipedia.nl>
|
||||
Date: Mon, 5 Jan 2015 17:54:53 +0100
|
||||
Subject: Have lmarbles use find_directory for config
|
||||
|
||||
|
||||
diff --git a/src/cfg.c b/src/cfg.c
|
||||
index 2831c1b..4d713f5 100644
|
||||
--- a/src/cfg.c
|
||||
+++ b/src/cfg.c
|
||||
@@ -25,6 +25,10 @@
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#include <FindDirectory.h>
|
||||
+#endif
|
||||
+
|
||||
#ifdef _WIN32
|
||||
#define MKDIR(d, p) mkdir(d)
|
||||
#else
|
||||
@@ -40,14 +44,16 @@ Cfg cfg;
|
||||
void C_StPth()
|
||||
{
|
||||
DIR *dir;
|
||||
-#ifdef _WIN32
|
||||
+#if defined(__HAIKU__)
|
||||
+ find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, c_pth, sizeof(c_pth) - 1);
|
||||
+#elif defined(_WIN32)
|
||||
snprintf( c_pth, sizeof(c_pth)-1, "%s/lgames", (getenv( "HOME" )?getenv( "HOME" ):".") );
|
||||
#else
|
||||
snprintf( c_pth, sizeof(c_pth)-1, "%s/.lgames", getenv( "HOME" ) );
|
||||
#endif
|
||||
/* create .lgames directory if not found */
|
||||
if ( (dir = opendir( c_pth )) == 0 ) {
|
||||
- fprintf( stderr, "Config directory ~/.lgames not found. Creating it.\n" );
|
||||
+ fprintf( stderr, "Config directory %s not found. Creating it.\n", c_pth );
|
||||
MKDIR( c_pth, S_IRWXU );
|
||||
}
|
||||
else
|
||||
diff --git a/src/profile.c b/src/profile.c
|
||||
index 218c856..9ebf47b 100644
|
||||
--- a/src/profile.c
|
||||
+++ b/src/profile.c
|
||||
@@ -22,6 +22,10 @@
|
||||
#include "cfg.h"
|
||||
#include "file.h"
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#include <FindDirectory.h>
|
||||
+#endif
|
||||
+
|
||||
// profiles //
|
||||
DLst prfs;
|
||||
// string list for the menu //
|
||||
@@ -38,8 +42,13 @@ void Prf_Ini()
|
||||
DL_Ini(&prfs);
|
||||
prfs.flgs = DL_AUTODEL;
|
||||
prfs.cb = Prf_Del;
|
||||
-
|
||||
+#ifdef __HAIKU__
|
||||
+ find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, prf_pth,
|
||||
+ sizeof(prf_pth) - 1);
|
||||
+ strcat(prf_pth, "/lmarbles.prfs");
|
||||
+#else
|
||||
sprintf(prf_pth, "%s/lmarbles.prfs", PRF_DIR);
|
||||
+#endif
|
||||
}
|
||||
|
||||
/* terminate profiles; must be saved first */
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
Reference in New Issue
Block a user