mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
foobillardplus: fix build and add data directory workaround (#8920)
fixes #8891
This commit is contained in:
@@ -9,10 +9,11 @@ glasses), a free view mode and an animated cue."
|
||||
HOMEPAGE="https://foobillardplus.sourceforge.net/"
|
||||
COPYRIGHT="Florian Berger"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="2"
|
||||
REVISION="3"
|
||||
SOURCE_URI="https://github.com/threedeyes/FooBillardPlus/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="e7ccb5f100e82f139ee80edd4c3093a0b879727e67675383e4ef5d0c5bb38a0e"
|
||||
SOURCE_DIR="FooBillardPlus-$portVersion"
|
||||
PATCHES="foobillardplus-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="foobillardplus.rdef.in"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
From 53fbbe79a47d1bca994c953d885ff6f69b738f40 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Roberts <cpr420@gmail.com>
|
||||
Date: Sat, 1 Jul 2023 22:48:54 -0600
|
||||
Subject: Haiku uses pkg-config for freetype flags
|
||||
|
||||
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 55b7a49..1d88d2e 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -127,8 +127,8 @@ SDL_CFLAGS = `sdl-config --cflags`
|
||||
SDL_LIBS = `sdl-config --libs`
|
||||
endif
|
||||
|
||||
-FREETYPE_CFLAGS = `freetype-config --cflags`
|
||||
-FREETYPE_LIBS = `freetype-config --libs`
|
||||
+FREETYPE_CFLAGS = `pkg-config --cflags freetype2`
|
||||
+FREETYPE_LIBS = `pkg-config --libs freetype2`
|
||||
|
||||
if USE_MATHSINGLE
|
||||
MATH_CFLAGS = -DVMATH_SINGLE_PRECISION
|
||||
--
|
||||
2.39.2
|
||||
|
||||
|
||||
From 8a5920a85f0f4650d932b4a3aaccd945ff202cfd Mon Sep 17 00:00:00 2001
|
||||
From: Chris Roberts <cpr420@gmail.com>
|
||||
Date: Sat, 1 Jul 2023 22:50:08 -0600
|
||||
Subject: call enter_data_dir() a second time
|
||||
|
||||
When SDL is initialized it changes the working directory to the executable path. The game expects
|
||||
the working directory to be the data directory, so we call enter_data_dir() a second time.
|
||||
|
||||
diff --git a/src/billard3d.c b/src/billard3d.c
|
||||
index 4d44f0f..ca389c7 100644
|
||||
--- a/src/billard3d.c
|
||||
+++ b/src/billard3d.c
|
||||
@@ -7636,6 +7636,10 @@ int main( int argc, char *argv[] )
|
||||
}
|
||||
|
||||
sys_create_display(win_width, win_height);
|
||||
+
|
||||
+ /* chdir into data directory */
|
||||
+ enter_data_dir();
|
||||
+
|
||||
/* initialize random seed */
|
||||
srand(SDL_GetTicks());
|
||||
#ifdef __MINGW32__ //RB
|
||||
--
|
||||
2.39.2
|
||||
|
||||
Reference in New Issue
Block a user