mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
117 lines
4.2 KiB
Plaintext
117 lines
4.2 KiB
Plaintext
From a542fe52e1bb94857b95d9829e82be80850c8be7 Mon Sep 17 00:00:00 2001
|
|
From: Peppersawce <michaelpeppers89@yahoo.it>
|
|
Date: Sun, 13 Apr 2025 15:01:30 +0200
|
|
Subject: De-linuxify Makefile, remove need for X11 header, disable "No OpenGL"
|
|
startup error, setup Haiku config paths
|
|
|
|
|
|
diff --git a/source/src/Makefile b/source/src/Makefile
|
|
index bf06195..bd330fe 100644
|
|
--- a/source/src/Makefile
|
|
+++ b/source/src/Makefile
|
|
@@ -59,9 +59,10 @@ WINDRES= windres
|
|
CLIENT_INCLUDES= $(INCLUDES) -I../include
|
|
CLIENT_LIBS= -mwindows -L../lib -lSDL2 -lSDL2_image -lzdll -lopengl32 -lenet -lOpenAL32 -llibvorbisfile -lws2_32 -lwinmm
|
|
else
|
|
-USRLIB=$(shell if [ -e /usr/lib64 ]; then echo "/usr/lib64"; else echo "/usr/lib"; fi)
|
|
-CLIENT_INCLUDES= $(INCLUDES) -I/usr/include `sdl2-config --cflags` -idirafter ../include
|
|
-CLIENT_LIBS= -L../enet/.libs -lenet -L$(USRLIB) -lX11 `sdl2-config --libs` -lSDL2_image -lz -lGL -lopenal -lvorbisfile
|
|
+USRLIB=$(shell if [ -e /boot/system/lib/x86 ]; then echo "/boot/system/lib/x86"; else echo "/boot/system/lib"; fi)
|
|
+INCLUDEDIR=$(shell if [ -e /boot/system/develop/headers/x86 ]; then echo "/boot/system/develop/headers/x86/SDL2"; else echo "/boot/system/develop/headers/SDL2"; fi)
|
|
+CLIENT_INCLUDES= $(INCLUDES) -I$(INCLUDEDIR) `sdl2-config --cflags` -idirafter ../include
|
|
+CLIENT_LIBS= -L../enet/.libs -lenet -L$(USRLIB) -lbsd -lnetwork `sdl2-config --libs` -lSDL2_image -lz -lGL -lopenal -lvorbisfile
|
|
endif
|
|
|
|
CLIENT_OBJS= \
|
|
@@ -126,10 +127,7 @@ SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) -I../include
|
|
SERVER_LIBS= -L../lib -lzdll -lenet -lws2_32 -lwinmm
|
|
else
|
|
SERVER_INCLUDES= -DSTANDALONE $(INCLUDES)
|
|
-SERVER_LIBS= -L../enet/.libs -lenet -lz -lpthread
|
|
-ifeq (,$(findstring OpenBSD,$(PLATFORM)))
|
|
-SERVER_LIBS+= -lrt
|
|
-endif
|
|
+SERVER_LIBS= -L../enet/.libs -lbsd -lnetwork -lenet -lz -lpthread
|
|
endif
|
|
|
|
SERVER_OBJS= \
|
|
diff --git a/source/src/server.cpp b/source/src/server.cpp
|
|
index 42e9039..9eb38ca 100644
|
|
--- a/source/src/server.cpp
|
|
+++ b/source/src/server.cpp
|
|
@@ -2356,7 +2356,7 @@ void startdemoplayback(const char *newname)
|
|
|
|
void startgame(const char *newname, int newmode, int newtime, bool notify)
|
|
{
|
|
- if(!newname || !*newname || (newmode == GMODE_DEMO && isdedicated)) fatal("startgame() abused");
|
|
+ //if(!newname || !*newname || (newmode == GMODE_DEMO && isdedicated)) fatal("startgame() abused");
|
|
if(newmode == GMODE_DEMO)
|
|
{
|
|
startdemoplayback(newname);
|
|
diff --git a/source/src/stream.cpp b/source/src/stream.cpp
|
|
index 3a549c5..9b2164c 100644
|
|
--- a/source/src/stream.cpp
|
|
+++ b/source/src/stream.cpp
|
|
@@ -9,6 +9,11 @@
|
|
#include <dirent.h>
|
|
#endif
|
|
|
|
+#ifdef __HAIKU__
|
|
+#include <FindDirectory.h>
|
|
+#include <fs_info.h>
|
|
+#endif
|
|
+
|
|
string homedir = "";
|
|
vector<char *> packagedirs;
|
|
|
|
@@ -176,7 +181,10 @@ char *getregszvalue(HKEY root, const char *keystr, const char *query)
|
|
void sethomedir(const char *dir)
|
|
{
|
|
string tmpdir;
|
|
- copystring(tmpdir, dir);
|
|
+ //copystring(tmpdir, dir);
|
|
+ char buffer[B_PATH_NAME_LENGTH+10];
|
|
+ find_directory(B_USER_SETTINGS_DIRECTORY, dev_for_path("/boot"), false, buffer, B_PATH_NAME_LENGTH);
|
|
+ formatstring(tmpdir)("%s%s", buffer, "/assaultcube");
|
|
|
|
#ifdef WIN32
|
|
const char substitute[] = "?MYDOCUMENTS?";
|
|
diff --git a/source/src/tools.cpp b/source/src/tools.cpp
|
|
index 75a5128..fc9813a 100644
|
|
--- a/source/src/tools.cpp
|
|
+++ b/source/src/tools.cpp
|
|
@@ -716,7 +716,6 @@ bool glmatrixf::invert(const glmatrixf &m, float mindet)
|
|
#else
|
|
#include <pthread.h>
|
|
#include <semaphore.h>
|
|
- #include <sys/shm.h>
|
|
#endif
|
|
|
|
static int sl_sem_errorcountdummy = 0;
|
|
--
|
|
2.48.1
|
|
|
|
|
|
From a70b549b9b8aa947a23cf118368b56f82f7f0d00 Mon Sep 17 00:00:00 2001
|
|
From: Peppersawce <michaelpeppers89@yahoo.it>
|
|
Date: Tue, 22 Apr 2025 16:29:38 +0200
|
|
Subject: Fix build on buildmasters' Beta 5 (this can be reverted when buildmasters use a newer Haiku version)
|
|
|
|
|
|
diff --git a/source/src/tools.cpp b/source/src/tools.cpp
|
|
index fc9813a..13a9400 100644
|
|
--- a/source/src/tools.cpp
|
|
+++ b/source/src/tools.cpp
|
|
@@ -888,7 +888,7 @@ void *sl_createthread(int (*fn)(void *), void *data, const char *name)
|
|
ti->fn = fn;
|
|
ti->done = 0;
|
|
pthread_create(&(ti->handle), NULL, sl_thread_indir, ti);
|
|
- if(name) pthread_setname_np(ti->handle, name);
|
|
+ //if(name) pthread_setname_np(ti->handle, name);
|
|
return (void *) ti;
|
|
}
|
|
|
|
--
|
|
2.48.1
|
|
|