From 46fbec041af844636c09cbf685817f6733adc6e9 Mon Sep 17 00:00:00 2001 From: haarp Date: Tue, 11 Feb 2020 11:29:35 +0100 Subject: Update Doom 3 to modern systems. Segfaults on start tho :( Patches welcome. Signed-off-by: haarp --- games-fps/doom3-gpl/Manifest | 6 +- games-fps/doom3-gpl/doom3-gpl-9999-r1.ebuild | 109 --------------------- games-fps/doom3-gpl/doom3-gpl-9999-r2.ebuild | 101 +++++++++++++++++++ games-fps/doom3-gpl/files/d3_carmacksreverse.patch | 4 +- games-fps/doom3-gpl/files/d3_nokeycheck.patch | 4 +- 5 files changed, 108 insertions(+), 116 deletions(-) delete mode 100644 games-fps/doom3-gpl/doom3-gpl-9999-r1.ebuild create mode 100644 games-fps/doom3-gpl/doom3-gpl-9999-r2.ebuild (limited to 'games-fps') diff --git a/games-fps/doom3-gpl/Manifest b/games-fps/doom3-gpl/Manifest index 2c0fa9b..a319b98 100644 --- a/games-fps/doom3-gpl/Manifest +++ b/games-fps/doom3-gpl/Manifest @@ -1,3 +1,3 @@ -AUX d3_carmacksreverse.patch 1416 SHA256 c187643e2cf257030384c6595dde29616a1fd3e703124a200d37d07ae9ceb325 SHA512 81a64afd01893be795e127bfa4f03a51e9099cd462a89d5c0bd85416e0f5444820df6a37ec03e6af98a1c75366c3663efcc46cbe7ec04915e45f3f12aecf1872 WHIRLPOOL b18df274db734d94d7579ede3e81b5daeb2581f6fbba7facbc7a80ecb1aaf0c261cf23a401ff0016473107fa8e87e3b36f99f020405038e67dde5a1ffbfa11e9 -AUX d3_nokeycheck.patch 466 SHA256 c94f8c85810cf9f6504298045851abd014d07587dcdb3de5a9b284b29f3b0d77 SHA512 f5d9781492939910ae5b6031fe0e98f55956a0b0becc94ceaf8db5f11030a6d495c914eeb2d8a91125cd2f02836566fda4a4db759d44e6925fc0d3c359b0807d WHIRLPOOL 6d6e9e05725def3963357c5445376f3c503765fa02c2ec9162e2428f8dd82373af048a74059348136e052d61389e51d99379b58a6f760806f1f4a6a33737e914 -EBUILD doom3-gpl-9999-r1.ebuild 2490 SHA256 2956a7e0400c5c75fd25d8559f3e5a20477bc74203a505a68095641379228e6f SHA512 2a454e7e1401f38f5a5dc8568581a258d524be9fd91336cec13660fc93451e0abe84b67027517277b6790b0fe6016f59a60288f47d22cd819d43c971fb91d498 WHIRLPOOL 517584798301c12216e1874119d99ba69efa4634147fe394a476de151804cb9315c494a3c02bc3f9bd7ed047d8bcd9bb7fd2fdaf9d5b34d9ce29710a60f34b5c +AUX d3_carmacksreverse.patch 1416 BLAKE2B 242363639ea4595d5f2621b560769ef214f772ad307db0e60a000f04ec00dc159a7ffb328f94a671e6e59bf53100101bf52a668ab4813015d750a4c3423fa269 SHA512 78756fa8fbd818086640651238510ccb8c50cdbca2f0582d1a5281ff46318a19ba83c94130eeda8ba5b276370f61c8c343cdab0cec1cada9eef5bdfd220e60d2 +AUX d3_nokeycheck.patch 466 BLAKE2B b12e10f68006919dd0739773819285d3847047f51a8abb726fbdc8190584f52b43204a430fe008543510241af6a2ce41a1b5f5785a9382bac30aea5b090e005f SHA512 4d2b4c9abc020159cfc0d8b89abc82a52be45de1211a69facf9564b382a33473bfc86cac9d892a8658ed2291965bfac8ba2b7625d5f4b521b21ea0de089e171a +EBUILD doom3-gpl-9999-r2.ebuild 2666 BLAKE2B 678f5a9d770e2055957380c13b226fe066cc4d2a1fb896065ff137a1cb1f9215ba6535cb36e7c22da8a94c7e4f24ae58e9ae1177e4dc8102c1b798f411530425 SHA512 e3c9f7b3be2d8be4b67194c6149c7fee84d494b15152a2f529a32bd993ba3e9062c8388bcead1377c773d1267dbee1b8ef02e67e0f834bc8b4de460d0409b2b5 diff --git a/games-fps/doom3-gpl/doom3-gpl-9999-r1.ebuild b/games-fps/doom3-gpl/doom3-gpl-9999-r1.ebuild deleted file mode 100644 index 6369da2..0000000 --- a/games-fps/doom3-gpl/doom3-gpl-9999-r1.ebuild +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit scons-utils toolchain-funcs games git-2 - -DESCRIPTION="3rd installment of the classic iD 3D first-person shooter" -HOMEPAGE="https://github.com/TTimo/doom3.gpl" -EGIT_REPO_URI="git://github.com/TTimo/doom3.gpl.git" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="debug dedicated opengl" - -REQUIRED_USE="|| ( dedicated opengl )" - -RDEPEND="sys-libs/glibc - amd64? ( sys-libs/glibc[multilib] ) - opengl? ( >=virtual/opengl-7.0-r1[abi_x86_32(-)] - >=x11-libs/libX11-1.6.2[abi_x86_32(-)] - >=x11-libs/libXext-1.3.2[abi_x86_32(-)] - >=media-libs/alsa-lib-1.0.27.2[abi_x86_32(-)] - )" -DEPEND="${RDEPEND} - sys-devel/m4" - -dir=$(games_get_libdir)/${PN} - -src_prepare() { - # do we really need Wall spam? - sed -i -e "/BASECPPFLAGS.append( '-Wall' )/d" neo/SConstruct - - # we supply our own CFLAGS - sed -i -e "/OPTCPPFLAGS = \[ '-O3'/d" neo/SConstruct - sed -i -e "s/BASEFLAGS = ''/BASEFLAGS = \[ '${CXXFLAGS//[${IFS}]/', '}' \]/" neo/SConstruct - sed -i -e "s/BASELINKFLAGS = \[ \]/BASELINKFLAGS = \[ '${LDFLAGS//[${IFS}]/', '}' \]/" neo/SConstruct - - epatch "${FILESDIR}/d3_nokeycheck.patch" - epatch "${FILESDIR}/d3_carmacksreverse.patch" -} - -src_configure() { - S="${WORKDIR}/${P}/neo" - - myesconsargs=( - CC="$(tc-getCC)" - CXX="$(tc-getCXX)" - ) - - if use debug; then - myesconsargs+=( BUILD="debug" ) - else - myesconsargs+=( BUILD="release" ) - fi - - if use dedicated; then - if use opengl; then - myesconsargs+=( DEDICATED="2" ) - else - myesconsargs+=( DEDICATED="1" ) - fi - else - myesconsargs+=( DEDICATED="0" ) - fi - - # FIXME: needs 32-bit libz.a - what is curl even needed for?? - myesconsargs+=( NOCURL="1" ) -} - -src_compile() { - escons -} - -src_install() { - exeinto "${dir}" - doexe gamex86-base.so - doexe gamex86-d3xp.so - - if use opengl; then - doexe doom.x86 - doexe sys/linux/setup/image/openurl.sh - games_make_wrapper ${PN} ./doom.x86 "${dir}" "${dir}" - newicon sys/linux/setup/image/doom3.png ${PN}.png - make_desktop_entry ${PN} "Doom III" - fi - - if use dedicated; then - doexe doomded.x86 - games_make_wrapper ${PN}-dedicated ./doomded.x86 "${dir}" "${dir}" - fi - - prepgamesdirs - - dodoc sys/linux/setup/image/README -} - -pkg_postinst() { - games_pkg_postinst - - elog "You need to copy 'base' directory" - elog "from either your installation media or your hard drive to" - elog "${dir}/ before running the game." - echo - elog "To play the game, run:" - elog " ${PN}" - echo -} diff --git a/games-fps/doom3-gpl/doom3-gpl-9999-r2.ebuild b/games-fps/doom3-gpl/doom3-gpl-9999-r2.ebuild new file mode 100644 index 0000000..6144e24 --- /dev/null +++ b/games-fps/doom3-gpl/doom3-gpl-9999-r2.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# FIXME: Patch neo/SConstruct to Python3 +PYTHON_COMPAT=( python2_7 ) +inherit desktop git-r3 python-any-r1 scons-utils toolchain-funcs + +DESCRIPTION="3rd installment of the classic iD 3D first-person shooter" +HOMEPAGE="https://github.com/TTimo/doom3.gpl" +EGIT_REPO_URI="https://github.com/TTimo/doom3.gpl.git" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug dedicated opengl" + +REQUIRED_USE="|| ( dedicated opengl )" + +RDEPEND="sys-libs/glibc + amd64? ( sys-libs/glibc[multilib] ) + opengl? ( >=virtual/opengl-7.0-r1[abi_x86_32(-)] + >=x11-libs/libX11-1.6.2[abi_x86_32(-)] + >=x11-libs/libXext-1.3.2[abi_x86_32(-)] + >=media-libs/alsa-lib-1.0.27.2[abi_x86_32(-)] + )" +DEPEND="${RDEPEND} + sys-devel/m4" + +src_prepare() { + # do we really need Wall spam? + sed -i -e "/BASECPPFLAGS.append( '-Wall' )/d" neo/SConstruct + + # we supply our own CFLAGS instead of what the release build uses: + # -O3 -ffast-math -fno-unsafe-math-optimizations -fomit-frame-pointer + sed -i -e "/OPTCPPFLAGS = \[ '-O3'/d" neo/SConstruct + sed -i -e "s/BASEFLAGS = ''/BASEFLAGS = \[ '${CXXFLAGS//[${IFS}]/', '}' \]/" neo/SConstruct + sed -i -e "s/BASELINKFLAGS = \[ \]/BASELINKFLAGS = \[ '${LDFLAGS//[${IFS}]/', '}' \]/" neo/SConstruct + + # fix compilation errors on modern systems + sed -i -e "s/m_speed - PRIMARYFREQ/(double)(m_speed - PRIMARYFREQ)/" neo/sys/linux/sound.cpp + sed -i -e "s/HUGE/100000000/" neo/tools/compilers/roqvq/codec.cpp + + eapply "${FILESDIR}/d3_carmacksreverse.patch" + eapply "${FILESDIR}/d3_nokeycheck.patch" + + eapply_user +} + +src_configure() { + S="${WORKDIR}/${P}/neo" + + # FIXME: disabled curl due to needing 32-bit libz.a + MYSCONS=( + CC="$(tc-getCC)" + CXX="$(tc-getCXX)" + BUILD="$(usex debug debug release)" + NOCURL="1" + ) + + if use dedicated; then + if use opengl; then + MYSCONS+=( DEDICATED="2" ) + else + MYSCONS+=( DEDICATED="1" ) + fi + else + MYSCONS+=( DEDICATED="0" ) + fi +} + +src_compile() { + escons "${MYSCONS[@]}" +} + +src_install() { + exeinto "/usr/share/doom3" + newexe gamex86-base.so gamex86.so + doexe gamex86-d3xp.so + + if use opengl; then + doexe doom.x86 + doexe sys/linux/setup/image/openurl.sh + dosym /usr/share/doom3/doom.x86 /usr/bin/doom3 + doicon sys/linux/setup/image/doom3.png + make_desktop_entry doom3 "Doom III" "doom3" "Game;ActionGame" + fi + + if use dedicated; then + doexe doomded.x86 + dosym doomded.x86 doom3-dedicated + fi + + dodoc README.txt sys/linux/setup/image/README +} + +pkg_postinst() { + elog "You need to copy the 'base' directory of a fully patched game to" + elog "/usr/share/doom3/ before running the game." +} diff --git a/games-fps/doom3-gpl/files/d3_carmacksreverse.patch b/games-fps/doom3-gpl/files/d3_carmacksreverse.patch index 10430c5..35693d3 100644 --- a/games-fps/doom3-gpl/files/d3_carmacksreverse.patch +++ b/games-fps/doom3-gpl/files/d3_carmacksreverse.patch @@ -1,7 +1,7 @@ Re-implement Carmack's Reverse which had been removed due to patent bs ---- neo/renderer/draw_common.cpp.old 2014-05-22 12:55:36.403044927 +0200 -+++ neo/renderer/draw_common.cpp 2014-05-22 15:27:23.299742373 +0200 +--- a/neo/renderer/draw_common.cpp 2014-05-22 12:55:36.403044927 +0200 ++++ b/neo/renderer/draw_common.cpp 2014-05-22 15:27:23.299742373 +0200 @@ -1143,18 +1143,26 @@ return; } diff --git a/games-fps/doom3-gpl/files/d3_nokeycheck.patch b/games-fps/doom3-gpl/files/d3_nokeycheck.patch index 5e827cf..09b0734 100644 --- a/games-fps/doom3-gpl/files/d3_nokeycheck.patch +++ b/games-fps/doom3-gpl/files/d3_nokeycheck.patch @@ -1,5 +1,5 @@ ---- neo/framework/BuildDefines.h.old 2013-11-12 15:20:49.702300031 +0100 -+++ neo/framework/BuildDefines.h 2013-11-12 15:21:10.852810329 +0100 +--- a/neo/framework/BuildDefines.h 2013-11-12 15:20:49.702300031 +0100 ++++ b/neo/framework/BuildDefines.h 2013-11-12 15:21:10.852810329 +0100 @@ -109,13 +109,7 @@ #endif #endif -- cgit v1.2.3-65-gdbad