diff options
author | haarp <main.haarp@gmail.com> | 2021-12-15 23:49:59 +0100 |
---|---|---|
committer | haarp <main.haarp@gmail.com> | 2021-12-15 23:49:59 +0100 |
commit | b58efb92af8b5358a277debdc880626a726c1d38 (patch) | |
tree | 5ee9ce702cea063c51c44eaa37d1cf97be5fbc6f /games-fps | |
parent | Remove ddcutil, ddcui, both are in Gentoo repo now (diff) | |
download | haarp-b58efb92af8b5358a277debdc880626a726c1d38.tar.gz haarp-b58efb92af8b5358a277debdc880626a726c1d38.tar.bz2 haarp-b58efb92af8b5358a277debdc880626a726c1d38.zip |
Zandronum 3.1
Signed-off-by: haarp <main.haarp@gmail.com>
Diffstat (limited to 'games-fps')
-rw-r--r-- | games-fps/zandronum/Manifest | 2 | ||||
-rw-r--r-- | games-fps/zandronum/zandronum-3.1.ebuild | 139 |
2 files changed, 141 insertions, 0 deletions
diff --git a/games-fps/zandronum/Manifest b/games-fps/zandronum/Manifest index 672bff3..ec2c27c 100644 --- a/games-fps/zandronum/Manifest +++ b/games-fps/zandronum/Manifest @@ -1,4 +1,6 @@ AUX remove-revision-check.patch 703 BLAKE2B 1cc95c281fd6c1fd76425f24a899276e7bdad8919a4ba3dce15b9fb9c97dacaebbfb3f7df633583a37ff31854e6a9054398b12e28f8a1c8045f8aa0bf4bfb966 SHA512 8d5f22549a5cc994243c7adcc59376e57c52cac504fa4f5119e05f4286ca5c207856dff863b1f431e074db1ee5417f629d64e6bc352fe3e589dbac62a4f0eadb DIST zandronum-stable-10af17.tar.gz 6659250 BLAKE2B dbfb979830c06bf35ee5d4bbffd35c90acfb3e5d14351dc30dab4c36a46545a23720cfdd90b2367b84e91e7d36f9cc3377e6ab74b1dd5d2cea91419106752e57 SHA512 22c6cc2b23e5fda9b712c5783262be4f0914863b492294b66a5cffabc69d8fe74bb2813e2957b33b636014e58d8939ec20fe43eee3b7b73800e9dfd7dcd6211f +DIST zandronum-stable-417890.tar.gz 6791285 BLAKE2B a5046e001f500f12dd52e3a4800e307f0d7493abc491f09d748cb71d36374e77748cf5c493eb9406436dcc5d2043832b6d78992c95a18dfb4676c2edb31e48ee SHA512 3beed719e0383722024217b19ab1b8d4b6ff4bf5e8546e09593b645c2b87e6b45f298f2f0b853f6748ee4d1cb0bd8c49aa8e6c5b87e402d89b22ea44945ef998 EBUILD zandronum-3.0.1.ebuild 4211 BLAKE2B 6212aa58c0b41579df3a4108fef4f4fcf62c641fe6196c3f0ce4bccff280c46e71efbcb32a54fccbc326aae6b286d9c6c61c7f976f4bfc41fbdca75b6c3a0301 SHA512 9ec0c5dcb70933cc3c96865914eff9537ba89272b06f3edafbca62e8160f87c0f3a62e84bb8a63c8396d52198c72426677f69828448d4bebb6452984e585c265 +EBUILD zandronum-3.1.ebuild 4285 BLAKE2B d6eb34afa15ef4fcbad9d01fbcd797c2db1e7ee1063c943a026f63cbb5ab3b587e6541e6a0b369bf1cc5669d3425af8edb454cb957d8470b92e2b16888b84335 SHA512 83a7900cd111dc437ba5bf3b84fe7647b92b222df65886cc4e0fb311d31745f7bb026537a2d0599040dc64e378d430adef9a059ac1e4b485655bf3aadd0e85c5 MISC metadata.xml 315 BLAKE2B d774a34d761497e43beb2078fc93e107b12d591b05e2439e2caaa7d1b11831151b9be6a7acf745d38ab726a887a8a4793dce11de9ec6b435e5df1db4227e748d SHA512 0e1da3132a25e09577a6861dea211f8ae941b6f4d1adbdc4b9a16c9b5bb1f9c8c96f6272a304d1b0b0a80c85965e72511203296e4f4622d1c0ba1d687f9854d2 diff --git a/games-fps/zandronum/zandronum-3.1.ebuild b/games-fps/zandronum/zandronum-3.1.ebuild new file mode 100644 index 0000000..9e6fa95 --- /dev/null +++ b/games-fps/zandronum/zandronum-3.1.ebuild @@ -0,0 +1,139 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 # compiles broken unlinked binaries on EAPI=7?? + +inherit cmake-utils desktop + +# look for "changed the version string" tag/commit: https://osdn.net/projects/zandronum/scm/hg/zandronum-stable/ +MY_COMMIT="417890" +# timezone on website seems to be +0900 +MY_COMMIT_UTC_TIMESTAMP="1639258555" + +DESCRIPTION="OpenGL ZDoom port with Client/Server multiplayer" +HOMEPAGE="https://zandronum.com/" +SRC_URI="https://osdn.dl.osdn.net/scmarchive/g/${PN}/hg/${PN}-stable/${MY_COMMIT:0:2}/${MY_COMMIT:2}/${PN}-stable-${MY_COMMIT}.tar.gz" + +LICENSE="Sleepycat" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="cpu_flags_x86_mmx dedicated +gtk +opengl system-dumb system-geoip +system-sqlite timidity" + +REQUIRED_USE="|| ( dedicated opengl ) + gtk? ( opengl ) + timidity? ( opengl )" + +RDEPEND="gtk? ( x11-libs/gtk+:2 ) + timidity? ( media-sound/timidity++ ) + opengl? ( media-libs/fmod:1 + media-libs/game-music-emu + media-libs/libsdl[opengl] + virtual/glu + virtual/jpeg + virtual/opengl + ) + system-dumb? ( >=media-libs/dumb-2 ) + system-geoip? ( dev-libs/geoip ) + system-sqlite? ( dev-db/sqlite ) + app-arch/bzip2 + dev-libs/openssl:0 + media-sound/fluidsynth + sys-libs/zlib" + +DEPEND="${RDEPEND} + cpu_flags_x86_mmx? ( || ( dev-lang/nasm dev-lang/yasm ) )" + +S="${WORKDIR}/${PN}-stable-${MY_COMMIT}" + +src_prepare() { + # Normally Mercurial would generate gitinfo.h for NETGAMEVERSION + # let's do it without Mercurial + # NOTE: not currently used for 3.0.1 as compatibility with 3.0 is hardcoded + eapply "${FILESDIR}/remove-revision-check.patch" + echo "#define HG_REVISION_NUMBER ${MY_COMMIT_UTC_TIMESTAMP}" > src/gitinfo.h + echo "#define HG_REVISION_HASH_STRING \"0\"" >> src/gitinfo.h + echo "#define HG_TIME \"\"" >> src/gitinfo.h + + # Use system libs + # (lzma can't be system-libbed as the Gentoo ebuild provides no sources) + for lib in dumb geoip sqlite; do + use system-$lib && sed -i -e "/add_subdirectory( $lib )/Id" CMakeLists.txt + done + + # Use default data path + sed -i -e "s:/usr/local/share/:/usr/share/doom/:" src/sdl/i_system.h || die + + # Fix building with gcc-5 + use system-dumb || sed -i -e 's/ restrict/ _restrict/g' dumb/include/dumb.h dumb/src/it/*.c || die + + cmake-utils_src_prepare +} + +src_configure() { + mycmakeargs=( + -DFMOD_INCLUDE_DIR=/opt/fmodex/api/inc/ + -DFMOD_LIBRARY=/opt/fmodex/api/lib/libfmodex.so + -DFORCE_INTERNAL_GME="OFF" + -DNO_ASM="$(usex cpu_flags_x86_mmx OFF ON)" + -DNO_GTK="$(usex gtk OFF ON)" + ) + + # Can't build both client and server at once... so separate them + if use opengl; then + BUILD_DIR="${WORKDIR}/${P}_client" + cmake-utils_src_configure + fi + if use dedicated; then + BUILD_DIR="${WORKDIR}/${P}_server" + mycmakeargs+=(-DSERVERONLY=1) + cmake-utils_src_configure + fi +} + +src_compile() { + if use opengl; then + BUILD_DIR="${WORKDIR}/${P}_client" + cmake-utils_src_make + fi + if use dedicated; then + BUILD_DIR="${WORKDIR}/${P}_server" + cmake-utils_src_make + fi +} + +src_install() { + dodoc docs/{commands,zandronum*}.txt docs/console.{css,html} + + cd "${BUILD_DIR}" + insinto "/usr/share/doom" + doins *.pk3 + + if use opengl; then + dobin "${WORKDIR}/${P}_client/${PN}" + doicon "${S}/src/win32/zandronum.ico" + make_desktop_entry "${PN}" "Zandronum" "${PN}.ico" "Game;ActionGame;" + fi + if use dedicated; then + dobin "${WORKDIR}/${P}_server/${PN}-server" + fi + + # don't install this now + rm "${D}/usr/share/doom/brightmaps.pk3" +} +pkg_postinst() { + # install here to avoid collisions with games-fps/gzdoom + # hacky, i know. should've listened to juippis :) please don't hit me. + # note: brightmaps.pk3 NEEDS TO KEEP ITS NAME to not break online play + # on servers that mistakenly add it as a required pwad. + cp -n "${BUILD_DIR}/brightmaps.pk3" "${EPREFIX}/usr/share/doom/" || die + + ewarn "For parity with the gzdoom ebuild, the data path has been changed yet again!" + ewarn "It is ${EPREFIX}/usr/share/doom - copy/link wad files there or in \$HOME/.config/zandronum" + ewarn "If after an upgrade the game complains about not finding zandronum.pk3," + ewarn "edit the [*Search.Directories] sections in \$HOME/.config/zandronum/zandronum.ini." + + if use opengl; then + elog + elog "To play online, install games-util/doomseeker" + fi +} |