diff --git a/recipes/wip/games/fps/openspades-free-pak/recipe.toml b/recipes/wip/games/fps/openspades-free-pak/recipe.toml new file mode 100644 index 000000000..a987d7cc9 --- /dev/null +++ b/recipes/wip/games/fps/openspades-free-pak/recipe.toml @@ -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/ +""" \ No newline at end of file diff --git a/recipes/wip/games/fps/zerospades-free/recipe.toml b/recipes/wip/games/fps/zerospades-free/recipe.toml index df45e30a0..b8f2b486c 100644 --- a/recipes/wip/games/fps/zerospades-free/recipe.toml +++ b/recipes/wip/games/fps/zerospades-free/recipe.toml @@ -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" +] diff --git a/recipes/wip/games/fps/zerospades-free/redox.patch b/recipes/wip/games/fps/zerospades-free/redox.patch new file mode 100644 index 000000000..615fe3571 --- /dev/null +++ b/recipes/wip/games/fps/zerospades-free/redox.patch @@ -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 @@ diff --git a/recipes/wip/libs/other/freealut/recipe.toml b/recipes/wip/libs/other/freealut/recipe.toml index a8f6b267c..bf2d29a7f 100644 --- a/recipes/wip/libs/other/freealut/recipe.toml +++ b/recipes/wip/libs/other/freealut/recipe.toml @@ -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" +]