chore: fix build on FreeBSD (#4412)

* chore: build on FreeBSD

* docs

* older helio
This commit is contained in:
Shahar Mike 2025-01-07 15:05:50 +02:00 committed by GitHub
parent e8f43d6858
commit ec6ac23ebc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 3 deletions

View file

@ -34,6 +34,12 @@ sudo zypper install automake boost-devel gcc-c++ git cmake libtool ninja libzstd
libboost_context-devel libboost_system-devel
```
On FreeBSD:
```bash
pkg install -y git bash cmake ninja libunwind boost-libs autoconf automake libtool gmake bison
```
## Step 2 - clone the project
```bash

2
helio

@ -1 +1 @@
Subproject commit b508ad51624c4470292f132de945449ddf2da998
Subproject commit 51f9c8b913b44cff65c7bebe0da19a5257f5070b

View file

@ -45,7 +45,7 @@ function(gen_bison name)
set_source_files_properties(${name}.cc ${name}_base.h PROPERTIES GENERATED TRUE)
endfunction()
if (APPLE)
if (APPLE OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
set(SED_REPL sed "-i" '')
else()
set(SED_REPL sed "-i")

View file

@ -62,8 +62,10 @@ void _serverPanic(const char *file, int line, const char *msg, ...) {
serverLog(LL_WARNING, "!!! Software Failure. Press left mouse button to continue");
serverLog(LL_WARNING, "Guru Meditation: %s #%s:%d", fmtmsg,file,line);
#ifndef NDEBUG
#ifdef __APPLE__
#if defined(__APPLE__)
__assert_rtn(msg, file, line, "");
#elif defined(__FreeBSD__)
__assert("", file, line, msg);
#else
__assert_fail(msg, file, line, "");
#endif