1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-30 00:27:34 +00:00

Ports: Add Duke Nukem 3D

This adds 'JonoF's Duke Nukem 3D Port'.

Parts of the network-related stuff has been patched out.
See patch: patches/0002-mmulti.c-ifdef-out-network-related-stuff-we-currentl.patch

Notes:
- Some sound work seems to be needed. During the title screen and
  gameplay SFX works, but music does not play. At the ending screen of
  Hollywood Holocaust music does play.
- GTK has been disabled, by default it will start in fullscreen, to get
  back to windowed mode can be done through the Video Settings.
- OpenGL support has been disabled, as far as I can tell it will need
  OpenGL 2.0 support which we do not currently have.
- True 3D renderer has been turned on.
This commit is contained in:
Kenneth Myhra 2023-05-02 18:21:28 +02:00 committed by Jelle Raaijmakers
parent 9c3e36e72c
commit 368c255368
5 changed files with 181 additions and 0 deletions

44
Ports/jfduke3d/package.sh Executable file
View file

@ -0,0 +1,44 @@
#!/usr/bin/env -S bash ../.port_include.sh
port='jfduke3d'
version='41cd46bc00633e7457d07d88c8add9f99a7d9d41'
workdir="jfduke3d-${version}"
launcher_name='Duke Nukem 3D'
launcher_category='Games'
launcher_command='duke3d'
auth_type='sha256'
depends=(
'SDL2'
)
jfaudiolib_commit='d72aa171a6fad72d4f19e689f4be989fe472e763'
jfbuild_commit='d3f86131e1eb5fb1397c3e7d477caef675c359d2'
jfmact_commit='1f0746a3b9704906669d8aaed2bbb982053a393e'
files="https://github.com/jonof/jfduke3d/archive/${version}.tar.gz jfduke3d-${version}.tar.gz cef20187b9e9b69b48007e9aaf0c41996aa227abccc5e2fd4ecece2cb503934d
https://github.com/jonof/jfaudiolib/archive/${jfaudiolib_commit}.tar.gz jfaudiolib-${jfaudiolib_commit}.tar.gz 520204c06d6be41838b5a6575a9cbb5dc8889345624c74ff8b9bacee005bd819
https://github.com/jonof/jfbuild/archive/${jfbuild_commit}.tar.gz jfbuild-${jfbuild_commit}.tar.gz 8917f91f10d595fffd3e79e2c816c9130448d8480fb804eba4a880fb0676b0b5
https://github.com/jonof/jfmact/archive/${jfmact_commit}.tar.gz jfmact-${jfmact_commit}.tar.gz 173d978cbeec1b387aac458f77d831d64aa56bb30164939ba75885cea04c777d"
makeopts=(
'USE_OPENGL=0'
'WITHOUT_GTK=1'
'USE_POLYMOST=1'
"SDL2CONFIG=${SERENITY_BUILD_DIR}/Root/usr/local/bin/sdl2-config"
)
pre_patch() {
pushd "${workdir}"
# Initialize submodules from tarballs
rm -rf jfaudiolib
cp -r ../jfaudiolib-${jfaudiolib_commit} jfaudiolib
rm -rf jfbuild
cp -r ../jfbuild-${jfbuild_commit} jfbuild
rm -rf jfmact
cp -r ../jfmact-${jfmact_commit} jfmact
popd
}
install() {
run mkdir -p "${SERENITY_INSTALL_ROOT}/usr/local/bin"
run cp build "${SERENITY_INSTALL_ROOT}/usr/local/bin"
run cp duke3d "${SERENITY_INSTALL_ROOT}/usr/local/bin"
}