aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuje Mihanović <duje.mihanovic@skole.hr>2022-07-04 12:35:56 +0200
committerDuje Mihanović <duje.mihanovic@skole.hr>2022-07-04 13:04:01 +0200
commite7e1101521f6a739357c6d46e61a3c9e21444412 (patch)
treecd3e4df2feafc0a21b2f7ae003781f980cfeabb7 /games-fps
parentdev-R/webfakes: release -r1 and fix failing tests (diff)
downloadguru-e7e1101521f6a739357c6d46e61a3c9e21444412.tar.gz
guru-e7e1101521f6a739357c6d46e61a3c9e21444412.tar.bz2
guru-e7e1101521f6a739357c6d46e61a3c9e21444412.zip
games-fps/openspades: Initial import
Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
Diffstat (limited to 'games-fps')
-rw-r--r--games-fps/openspades/Manifest2
-rw-r--r--games-fps/openspades/files/openspades-0.1.3-dont-compress-docs.patch35
-rw-r--r--games-fps/openspades/metadata.xml14
-rw-r--r--games-fps/openspades/openspades-0.1.3.ebuild76
4 files changed, 127 insertions, 0 deletions
diff --git a/games-fps/openspades/Manifest b/games-fps/openspades/Manifest
new file mode 100644
index 000000000..d67408cf5
--- /dev/null
+++ b/games-fps/openspades/Manifest
@@ -0,0 +1,2 @@
+DIST OpenSpadesDevPackage-r33.zip 4036321 BLAKE2B 7f2caaa6fd52961fc8221e7d7c2bb4312a444e26ad4edf2865d815e5cbadb354592bd5186f0e460a354bd0cf11419e8481b20f9fcba33a1544b74883a1d98ec3 SHA512 eb16dee8adfdd93388eac6309908811af02afdcdd6d009e2ab30b87a6b9bb495e77d3de750af18a3209dcf01ddb8400a6b03c1d570f1b77f8a1d2e5f26eb329e
+DIST openspades-0.1.3.tar.gz 7507842 BLAKE2B c9b4d1df2383b35f674d4274703079ca6cda3a5a8d7b3808889411c35e3e5a8d47e0d487ad869d194967a7058f59ffbebb04cf726548cc93d89998e16101bde1 SHA512 227f83980ecd87290a9ccbc625dd59f49b1ac92d9d50a077b5f2660eee7d76a14ff7c2d693ba53873e59ffa57a529078a3c2cc16c311829b76c927792564dcec
diff --git a/games-fps/openspades/files/openspades-0.1.3-dont-compress-docs.patch b/games-fps/openspades/files/openspades-0.1.3-dont-compress-docs.patch
new file mode 100644
index 000000000..24cc986ff
--- /dev/null
+++ b/games-fps/openspades/files/openspades-0.1.3-dont-compress-docs.patch
@@ -0,0 +1,35 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a582acd..f66b8e3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -215,10 +215,10 @@ if(UNIX AND NOT APPLE)
+ INSTALL(FILES Resources/Unix/Menu/openspades DESTINATION ${OPENSPADES_INSTALL_MENU}/)
+
+ # man file
+- INSTALL(FILES ${CMAKE_BINARY_DIR}/Resources/Unix/Man/openspades.6.gz DESTINATION ${OPENSPADES_INSTALL_MAN}/)
++ INSTALL(FILES ${CMAKE_BINARY_DIR}/Resources/Unix/Man/openspades.6 DESTINATION ${OPENSPADES_INSTALL_MAN}/)
+
+ # changelog file
+- INSTALL(FILES ${CMAKE_BINARY_DIR}/Resources/Unix/Debian/changelog.gz DESTINATION ${OPENSPADES_INSTALL_DOC}/)
++ INSTALL(FILES ${CMAKE_BINARY_DIR}/Resources/Unix/Debian/changelog DESTINATION ${OPENSPADES_INSTALL_DOC}/)
+
+ # copyright file
+ INSTALL(FILES ${CMAKE_BINARY_DIR}/Resources/Unix/Debian/copyright DESTINATION ${OPENSPADES_INSTALL_DOC}/)
+diff --git a/Resources/CMakeLists.txt b/Resources/CMakeLists.txt
+index 1f9b514..ce892da 100644
+--- a/Resources/CMakeLists.txt
++++ b/Resources/CMakeLists.txt
+@@ -69,12 +69,7 @@ if(UNIX AND NOT APPLE)
+
+ add_custom_command(
+ TARGET OpenSpades_Unix
+- COMMAND sh -c \"gzip -9 -c ${CMAKE_CURRENT_SOURCE_DIR}/Unix/Debian/changelog > changelog.gz\"
++ COMMAND sh -c \"cp ${CMAKE_CURRENT_SOURCE_DIR}/Unix/Debian/changelog changelog\"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Unix/Debian
+ )
+- add_custom_command(
+- TARGET OpenSpades_Unix
+- COMMAND sh -c \"gzip -9 -c ${CMAKE_CURRENT_BINARY_DIR}/Unix/Man/openspades.6 > openspades.6.gz\"
+- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Unix/Man
+- )
+ endif(UNIX AND NOT APPLE)
diff --git a/games-fps/openspades/metadata.xml b/games-fps/openspades/metadata.xml
new file mode 100644
index 000000000..af0c3ee82
--- /dev/null
+++ b/games-fps/openspades/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>duje.mihanovic@skole.hr</email>
+ <name>Duje Mihanović</name>
+ </maintainer>
+ <longdescription>
+ OpenSpades is a clone of Ace of Spades 0.75, which is a free online
+ first-person shooter created by Ben Aksoy, featuring fully destructible
+ terrain and plenty of game modes (including the well-known Capture the Flag)
+ created by the community.
+ </longdescription>
+</pkgmetadata>
diff --git a/games-fps/openspades/openspades-0.1.3.ebuild b/games-fps/openspades/openspades-0.1.3.ebuild
new file mode 100644
index 000000000..350555864
--- /dev/null
+++ b/games-fps/openspades/openspades-0.1.3.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake xdg
+
+PAK_REV=33
+
+DESCRIPTION="Open-source voxel FPS"
+HOMEPAGE="https://openspades.yvt.jp/"
+SRC_URI="
+https://github.com/yvt/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+https://github.com/yvt/${PN}-paks/releases/download/r${PAK_REV}/OpenSpadesDevPackage-r${PAK_REV}.zip
+"
+# GPL-2 refers to the bundled Unifont.
+LICENSE="GPL-3 GPL-2-with-font-exception OFL openspades-pak"
+SLOT="0"
+KEYWORDS="~amd64"
+RESTRICT="mirror"
+RDEPEND="
+media-libs/libsdl2
+media-libs/sdl2-image[jpeg,png]
+media-libs/glew
+net-misc/curl
+media-libs/freetype
+media-libs/opus
+media-libs/opusfile
+x11-misc/xdg-utils
+x11-themes/hicolor-icon-theme
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+virtual/pkgconfig
+app-arch/unzip
+media-gfx/imagemagick[jpeg,png]
+"
+PATCHES=(
+ "${FILESDIR}/${PN}-0.1.3-dont-compress-docs.patch"
+)
+CMAKE_BUILD_TYPE=release
+
+src_prepare() {
+ cmake_src_prepare
+
+ mkdir -p "${BUILD_DIR}/Resources"
+ mv "${WORKDIR}/Nonfree/pak000-Nonfree.pak" "${BUILD_DIR}/Resources/"
+ mv "${WORKDIR}/Nonfree/LICENSE.md" "${BUILD_DIR}/Resources/LICENSE.pak000.md"
+ mv "${WORKDIR}/OfficialMods/font-unifont.pak" "${BUILD_DIR}/Resources/"
+ mv "${WORKDIR}/OfficialMods/LICENSE" "${BUILD_DIR}/Resources/LICENSE.unifont.txt"
+
+ # Without this, CMake will error out because it will try to download the zip
+ # during building.
+ touch "${BUILD_DIR}/Resources/OpenSpadesDevPackage-r${PAK_REV}.zip"
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DOPENSPADES_INSTALL_DOC=share/doc/"${PF}"
+ -DOPENSPADES_INSTALL_BINARY=bin
+ -DOPENSPADES_INSTALL_RESOURCES=share/"${PN}"/Resources
+ # This arg is currently unused, but I'll set it anyway just in case it's
+ # needed in a later version.
+ -DOPENSPADES_INSTALL_LIBS=$(get_libdir)
+ )
+
+ cmake_src_configure
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+}
+
+pkg_postrm() {
+ xdg_pkg_postrm
+}