shockolate, recipe based on the PR from pgrobelniak (#4404)

This commit is contained in:
Schrijvers Luc
2019-11-25 19:35:18 +01:00
committed by GitHub
parent 25d617c49c
commit ac84311bce
2 changed files with 108 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
From 47061715f39c44da24d6a999a3c012e79b6ee8de Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 24 Nov 2019 18:16:39 +0000
Subject: use system SDL2/SDL2_mixer headers
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 52a0f25..b573ee0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,7 +41,7 @@ ENDIF(OPENGL_FOUND)
# set up SDL created by our build scripts
set(SDL2_DIR ${CMAKE_SOURCE_DIR}/build_ext/built_sdl)
-set(SDL2_INCLUDE_DIRS ${SDL2_DIR}/include/SDL2)
+#set(SDL2_INCLUDE_DIRS ${SDL2_DIR}/include/SDL2)
find_library(SDL2_LIBRARY SDL2 PATHS ${SDL2_DIR}/lib NO_DEFAULT_PATH)
find_library(SDL2MAIN_LIBRARY SDL2main PATHS ${SDL2_DIR}/lib NO_DEFAULT_PATH)
set(SDL2_LIBRARIES "${SDL2MAIN_LIBRARY};${SDL2_LIBRARY}")
@@ -49,7 +49,7 @@ set(SDL2_LIBRARIES "${SDL2MAIN_LIBRARY};${SDL2_LIBRARY}")
# and SDL mixer
-set(SDL2_MIXER_DIR ${CMAKE_SOURCE_DIR}/build_ext/built_sdl_mixer)
+#set(SDL2_MIXER_DIR ${CMAKE_SOURCE_DIR}/build_ext/built_sdl_mixer)
set(SDL2_MIXER_INCLUDE_DIRS ${SDL2_MIXER_DIR}/include/SDL2)
find_library(SDL2_MIXER_LIBRARY SDL2_mixer PATHS ${SDL2_MIXER_DIR}/lib NO_DEFAULT_PATH)
--
2.24.0

View File

@@ -0,0 +1,77 @@
SUMMARY="System Shock, but cross platform!"
DESCRIPTION="Based on the source code for PowerPC released by Night Dive \
Studios, Incorporated.
Shockolate is a cross platform source port of System Shock, using SDL2. \
This runs well on OSX, Linux, and Windows right now, with some missing \
features that need reviving due to not being included in the source code \
that was released.
The end goal for this project is something like what Chocolate Doom is for \
Doom: an experience that closely mimics the original, but portable and with \
some quality of life improvements including an OpenGL renderer and mod support!
You need contents of data folder from the original game copied into res/data \
folder."
HOMEPAGE="https://github.com/Interrupt/systemshock/"
COPYRIGHT="2019 Interrupt"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/Interrupt/systemshock/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="86bb909576c46c8bcf1ff12370bf3023083a1f19179727bcc6a36ec56c44a388"
SOURCE_FILENAME="systemshock-v$portVersion.tar.gz"
SOURCE_DIR="systemshock-$portVersion"
PATCHES="shockolate-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 ?x86 !x86_64"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
shockolate$secondaryArchSuffix = $portVersion
cmd:systemshock = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libfluidsynth$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libGLU$secondaryArchSuffix
lib:libSDL2_2.0$secondaryArchSuffix
lib:libSDL2_mixer_2.0$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libfluidsynth$secondaryArchSuffix >= 2
devel:libGL$secondaryArchSuffix
devel:libGLU$secondaryArchSuffix
devel:libSDL2_2.0$secondaryArchSuffix
devel:libSDL2_mixer_2.0$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
"
defineDebugInfoPackage shockolate$secondaryArchSuffix \
$prefix/bin/systemshock
BUILD()
{
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$prefix .. -L \
-DSDL2MAIN_LIBRARY=$(finddir B_SYSTEM_DEVELOP_DIRECTORY)/lib$secondaryArchSubDir/libSDL2.so \
-DSDL2_LIBRARY=$(finddir B_SYSTEM_DEVELOP_DIRECTORY)/lib$secondaryArchSubDir/libSDL2.so \
-DSDL2_MIXER_LIBRARY=$(finddir B_SYSTEM_DEVELOP_DIRECTORY)/lib$secondaryArchSubDir/libSDL2_mixer.so \
-DSDL2_INCLUDE_DIRS=$(finddir B_SYSTEM_HEADERS_DIRECTORY)$secondaryArchSubDir/SDL2 \
-DSDL2_MIXER_INCLUDE_DIRS=$(finddir B_SYSTEM_HEADERS_DIRECTORY)$secondaryArchSubDir/SDL2
make $jobArgs systemshock
}
INSTALL()
{
cd build
mkdir -p $prefix/bin
cp systemshock $prefix/bin
}