Merge branch 'zeropades' into 'master'

Partially port openspades

See merge request redox-os/redox!2007
This commit is contained in:
Jeremy Soller 2026-03-14 07:10:31 -06:00
commit ab2d15510c
4 changed files with 90 additions and 17 deletions

View File

@ -0,0 +1,11 @@
[source]
git = "https://github.com/DeathByDenim/openspades-free-pak"
shallow_clone = true
[build]
template = "custom"
script = """
zip -r pak001-Free.pak "${COOKBOOK_SOURCE}"/*
mkdir -p ${COOKBOOK_STAGE}/usr/share/openspades/Resources
cp pak001-Free.pak ${COOKBOOK_STAGE}/usr/share/openspades/Resources/
"""

View File

@ -1,31 +1,43 @@
#TODO not compiled or tested
#TODO dependency conflict. Glew wants GLX but mesa uses orbital backend.
# build instructions: https://github.com/yvt/openspades#on-unixes-from-source
[source]
git = "https://github.com/siecvi/zerospades"
shallow_clone = true
patches = [
"redox.patch"
]
[build]
template = "custom"
dependencies = [
"glew",
"openssl3",
"sdl2",
"sdl2-image",
"freealut",
"freetype2",
"opus",
"opusfile",
"libjpeg",
"openal",
"glew",
"openssl3",
"sdl2",
"sdl2-image",
"freealut",
"freetype2",
"libopus",
"opusfile",
"libjpeg",
"openal",
"curl",
"libxinerama",
"libxft",
# "libxinerama",
# "libxft",
]
dev-dependencies = [
"libstdcxx",
]
script = """
DYNAMIC_INIT
export LDFLAGS+=" $("${PKG_CONFIG}" --libs osmesa)"
COOKBOOK_CMAKE_FLAGS+=(
-DOPENSPADES_NONFREE_RESOURCES=OFF
-DUSE_INTERNAL_OPENAL=OFF
)
cookbook_cmake
wget https://github.com/DeathByDenim/openspades-free-pak/releases/download/latest/pak001-Free.pak \
"${COOKBOOK_STAGE}"/usr/share/openspades/Resources
"""
[package]
dependencies = [
"openspades-free-pak"
]

View File

@ -0,0 +1,46 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f59b92..9f98ab9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -145,7 +145,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_BUILD_TYPE MATCHES "Release")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
- set(CMAKE_EXE_LINKER_FLAGS "-s")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s")
endif()
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
diff --git a/Sources/Audio/ALFuncs.cpp b/Sources/Audio/ALFuncs.cpp
index 92c63f5..1eff792 100644
--- a/Sources/Audio/ALFuncs.cpp
+++ b/Sources/Audio/ALFuncs.cpp
@@ -271,7 +271,8 @@ namespace al {
}
void Link(void) {
-#ifdef OPENAL_SOFT
+// redox: weak link errors
+#ifndef OPENAL_SOFT
SPLog("Using OpenAL Soft - direct linking, initializing function pointers.");
// Directly assign function pointers to OpenAL Soft functions
qalEnable = alEnable;
diff --git a/Sources/CMakeLists.txt b/Sources/CMakeLists.txt
index 4438506..46ace0a 100644
--- a/Sources/CMakeLists.txt
+++ b/Sources/CMakeLists.txt
@@ -181,8 +181,8 @@ endif()
if(WIN32)
target_link_libraries(OpenSpades ws2_32.lib winmm.lib)
-elseif(UNIX AND NOT APPLE)
- target_link_libraries(OpenSpades Xext)
+#elseif(UNIX AND NOT APPLE)
+# target_link_libraries(OpenSpades Xext)
endif()
if(UNIX)
diff --git a/openal-soft b/openal-soft
--- a/openal-soft
+++ b/openal-soft
@@ -1 +1 @@

View File

@ -1,6 +1,10 @@
#TODO not compiled or tested
# build instructions: https://github.com/vancegroup/freealut#building-freealut
[source]
git = "https://github.com/vancegroup/freealut"
[build]
template = "cmake"
dependencies = [
"openal"
]
dev-dependencies = [
"libstdcxx"
]