#!/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" }