mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
91 lines
3.1 KiB
Plaintext
91 lines
3.1 KiB
Plaintext
From 45cd547e8044406f517b87f1145389dc64f836b4 Mon Sep 17 00:00:00 2001
|
|
From: Peppersawce <michaelpeppers89@yahoo.it>
|
|
Date: Sat, 26 Apr 2025 10:36:10 +0200
|
|
Subject: De-linuxify Makefile, set up default config path
|
|
|
|
|
|
diff --git a/src/Makefile b/src/Makefile
|
|
index a2e23ab..01b50ec 100644
|
|
--- a/src/Makefile
|
|
+++ b/src/Makefile
|
|
@@ -56,8 +56,10 @@ CLIENT_LIBS= -F../sauerbraten.app/Contents/Frameworks/ -framework SDL2 -framewor
|
|
CLIENT_LIBS+= -framework SDL2_mixer -framework CoreAudio -framework AudioToolbox
|
|
CLIENT_LIBS+= -framework AudioUnit -framework OpenGL -framework Cocoa -lz -Lenet -lenet
|
|
else
|
|
-CLIENT_INCLUDES= $(INCLUDES) -I/usr/X11R6/include `sdl2-config --cflags`
|
|
-CLIENT_LIBS= -Lenet -lenet -L/usr/X11R6/lib -lX11 `sdl2-config --libs` -lSDL2_image -lSDL2_mixer -lz -lGL
|
|
+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"; else echo "/boot/system/develop/headers"; fi)
|
|
+CLIENT_INCLUDES= $(INCLUDES) -I$(INCLUDEDIR)/SDL2 `sdl2-config --cflags`
|
|
+CLIENT_LIBS= -Lenet -lenet -L$(USRLIB) -lbsd -lnetwork `sdl2-config --libs` -lSDL2_image -lSDL2_mixer -lz -lGL
|
|
endif
|
|
endif
|
|
ifeq ($(PLATFORM),LINUX)
|
|
@@ -129,7 +131,7 @@ SERVER_INCLUDES+= -Iinclude
|
|
SERVER_LIBS= -mwindows $(STD_LIBS) -L$(WINBIN) -L$(WINLIB) -lzlib1 -lenet -lws2_32 -lwinmm
|
|
MASTER_LIBS= $(STD_LIBS) -L$(WINBIN) -L$(WINLIB) -lzlib1 -lenet -lws2_32 -lwinmm
|
|
else
|
|
-SERVER_LIBS= -Lenet -lenet -lz
|
|
+SERVER_LIBS= -Lenet -lenet -lbsd -lnetwork -lz
|
|
MASTER_LIBS= $(SERVER_LIBS)
|
|
endif
|
|
|
|
diff --git a/src/engine/main.cpp b/src/engine/main.cpp
|
|
index 0eeaea1..2ec7ab8 100644
|
|
--- a/src/engine/main.cpp
|
|
+++ b/src/engine/main.cpp
|
|
@@ -6,6 +6,11 @@
|
|
#include "SDL_syswm.h"
|
|
#endif
|
|
|
|
+#ifdef __HAIKU__
|
|
+#include <FindDirectory.h>
|
|
+#include <fs_info.h>
|
|
+#endif
|
|
+
|
|
extern void cleargamma();
|
|
|
|
void cleanup()
|
|
@@ -1104,6 +1109,15 @@ int main(int argc, char **argv)
|
|
initing = INIT_RESET;
|
|
// set home dir first
|
|
for(int i = 1; i<argc; i++) if(argv[i][0]=='-' && argv[i][1] == 'u') { sethomedir(&argv[i][2]); break; }
|
|
+ #ifdef __HAIKU__
|
|
+ if(!homedir[0])
|
|
+ {
|
|
+ char buffer[B_PATH_NAME_LENGTH+10];
|
|
+ find_directory(B_USER_SETTINGS_DIRECTORY, dev_for_path("/boot"), false, buffer, B_PATH_NAME_LENGTH);
|
|
+ strcat(buffer, "/cube2tesseract");
|
|
+ sethomedir(buffer);
|
|
+ }
|
|
+ #endif
|
|
// set log after home dir, but before anything else
|
|
for(int i = 1; i<argc; i++) if(argv[i][0]=='-' && argv[i][1] == 'g')
|
|
{
|
|
--
|
|
2.48.1
|
|
|
|
|
|
From ad2d0d5c959c6dab89a9ae3bc170e2159ea47702 Mon Sep 17 00:00:00 2001
|
|
From: Peppersawce <michaelpeppers89@yahoo.it>
|
|
Date: Sat, 26 Apr 2025 11:13:10 +0200
|
|
Subject: Disable socklen_t definition
|
|
|
|
|
|
diff --git a/src/enet/unix.c b/src/enet/unix.c
|
|
index 6669216..1a15fa5 100644
|
|
--- a/src/enet/unix.c
|
|
+++ b/src/enet/unix.c
|
|
@@ -54,7 +54,7 @@
|
|
#endif
|
|
|
|
#if !defined(HAS_SOCKLEN_T) && !defined(__socklen_t_defined)
|
|
-typedef int socklen_t;
|
|
+//typedef int socklen_t;
|
|
#endif
|
|
|
|
#ifndef MSG_NOSIGNAL
|
|
--
|
|
2.48.1
|
|
|