DreamChess: add secondary arch

* fix settings dir
This commit is contained in:
Gerasim Troeglazov
2019-09-25 22:57:19 +10:00
parent 3ad49e508b
commit 92b3f14724
2 changed files with 55 additions and 27 deletions

View File

@@ -19,42 +19,43 @@ Walter van Niftrik, Rogier van Schaijk, Lawrence Sebald, Matthew P. Smith
1991-1993 The Regents of the University of California
1998-2005 Gilles Vollant"
LICENSE="GNU GPL v3"
REVISION="1"
REVISION="2"
SOURCE_URI="https://github.com/dreamchess/dreamchess/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="b070a34acf69ed92e523902683d104abb295d78b6f37663f4668e929b9e90470"
PATCHES="dreamchess-$portVersion.patchset"
ADDITIONAL_FILES="dreamchess.rdef.in"
ARCHITECTURES="x86_gcc2 x86_64"
ARCHITECTURES="!x86_gcc2 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
dreamchess
app:DreamChess
dreamchess$secondaryArchSuffix = $portVersion
app:DreamChess$secondaryArchSuffix
"
REQUIRES="
haiku
lib:libexpat
lib:libGL
lib:libGLU
lib:libglew
lib:libmxml
lib:libSDL2_2.0
lib:libSDL2_image_2.0
lib:libSDL2_mixer_2.0
lib:libz
haiku$secondaryArchSuffix
lib:libexpat$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libGLU$secondaryArchSuffix
lib:libglew$secondaryArchSuffix
lib:libmxml$secondaryArchSuffix
lib:libSDL2_2.0$secondaryArchSuffix
lib:libSDL2_image_2.0$secondaryArchSuffix
lib:libSDL2_mixer_2.0$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku_devel
devel:libexpat
devel:libGL
devel:libGLU
devel:libglew
devel:libmxml
devel:libSDL2
devel:libSDL2_image
devel:libSDL2_mixer
devel:libz
haiku${secondaryArchSuffix}_devel
devel:libexpat$secondaryArchSuffix
devel:libGL$secondaryArchSuffix
devel:libGLU$secondaryArchSuffix
devel:libglew$secondaryArchSuffix
devel:libmxml$secondaryArchSuffix
devel:libSDL2$secondaryArchSuffix
devel:libSDL2_image$secondaryArchSuffix
devel:libSDL2_mixer$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk
@@ -62,7 +63,8 @@ BUILD_PREREQUIRES="
cmd:cmake
cmd:find
cmd:flex
cmd:gcc
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"

View File

@@ -1,4 +1,4 @@
From f80a1228c81a2c2f421b5513c91c723eb49669cd Mon Sep 17 00:00:00 2001
From 226c52a48e4464a7ab1da23c92a3aa05f76cca81 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 25 Sep 2019 19:41:56 +1000
Subject: Fix for Haiku
@@ -31,7 +31,7 @@ index ea6cee7..efff2fe 100644
2.23.0
From cceab1e6cc82e0fb4ace524100a353070bb715b5 Mon Sep 17 00:00:00 2001
From b431dde2b3d2d4c78b9305b0ed0e2ba198f3ed8a Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 25 Sep 2019 21:05:23 +1000
Subject: Kill process on quit
@@ -91,3 +91,29 @@ index 161aadb..e002c2f 100644
--
2.23.0
From 8705399062c9b2f9de3345420578485332229011 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 25 Sep 2019 22:51:33 +1000
Subject: Fix settings dir
diff --git a/dreamchess/src/dir.c b/dreamchess/src/dir.c
index 57ce5b1..dfbaaa7 100644
--- a/dreamchess/src/dir.c
+++ b/dreamchess/src/dir.c
@@ -107,7 +107,11 @@ int ch_userdir(void) {
#else /* !_WIN32 */
+#ifdef __HAIKU__
+#define USERDIR "./config/settings/dreamchess"
+#else
#define USERDIR ".dreamchess"
+#endif
#include <stdlib.h>
#include <sys/stat.h>
--
2.23.0