summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2021-10-18 21:16:45 -0400
committerIonen Wolkens <ionen@gentoo.org>2021-10-18 22:26:56 -0400
commit1b0f8168efc7052faef7bf9a78fbf08ca3257e00 (patch)
tree1491e216403d9245609ecd641743d38f662a84ec /games-arcade
parentdev-python/cov-core-1.15.0-r3: Strip *.pth files, fix pypy3 install (diff)
downloadgentoo-1b0f8168efc7052faef7bf9a78fbf08ca3257e00.tar.gz
gentoo-1b0f8168efc7052faef7bf9a78fbf08ca3257e00.tar.bz2
gentoo-1b0f8168efc7052faef7bf9a78fbf08ca3257e00.zip
games-arcade/cdogs-sdl: add 1.1.1
* moved protobuf-python to BDEPEND with python-any-r1 (bug #768321) * removed BUILD_EDITOR patch (upstreamed) * EAPI-8 and small cleanups Closes: https://bugs.gentoo.org/768321 Closes: https://bugs.gentoo.org/818862 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-arcade')
-rw-r--r--games-arcade/cdogs-sdl/Manifest1
-rw-r--r--games-arcade/cdogs-sdl/cdogs-sdl-1.1.1.ebuild50
-rw-r--r--games-arcade/cdogs-sdl/files/cdogs-sdl-1.1.1-cmake.patch14
3 files changed, 65 insertions, 0 deletions
diff --git a/games-arcade/cdogs-sdl/Manifest b/games-arcade/cdogs-sdl/Manifest
index cc2ba05abf1a..0c719c385c5f 100644
--- a/games-arcade/cdogs-sdl/Manifest
+++ b/games-arcade/cdogs-sdl/Manifest
@@ -1 +1,2 @@
DIST cdogs-sdl-0.10.1.tar.gz 25035447 BLAKE2B 7f1ab1c210daaa44080cfca335cbcf0cd3ae069ef0638bd34c437e7b08833dfecfdf010ccdf9d5a4d3ede66cb75fd6258d3e8b7d907425fc0b73a792568ed205 SHA512 97bc23848536e98207afeaf74c172fe138dd0425dde6bb888b5c64f244b3c6ecea16245630628ab7aa4277da16c25c623574e8d123993bc9e840a3c26c1edce7
+DIST cdogs-sdl-1.1.1.tar.gz 35073687 BLAKE2B e4bcdbcafd281cfe127fc8b90bda479055042bf541ea7be7eaf2d0959e6d596565c8fca16bc703ca8263281d18372d89fa8ffa787592f3c01c0b048504df10fa SHA512 2d1357ba4a9892a7309d60b98aacf242b6d2b76f07f9f0a13fe0d97713b97507d1f163dfc63c1ac73c06b52590cda93bc212731bf201d5221ade8fa8b2e64598
diff --git a/games-arcade/cdogs-sdl/cdogs-sdl-1.1.1.ebuild b/games-arcade/cdogs-sdl/cdogs-sdl-1.1.1.ebuild
new file mode 100644
index 000000000000..58afa1925c78
--- /dev/null
+++ b/games-arcade/cdogs-sdl/cdogs-sdl-1.1.1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit cmake python-any-r1 xdg
+
+DESCRIPTION="Classic overhead run-and-gun game"
+HOMEPAGE="https://cxong.github.io/cdogs-sdl/"
+SRC_URI="https://github.com/cxong/cdogs-sdl/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+ BSD-2 CC0-1.0 CC-BY-3.0 CC-BY-SA-3.0 XMAME"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ media-libs/libsdl2[haptic,opengl]
+ media-libs/sdl2-image[png]
+ media-libs/sdl2-mixer[vorbis,wav]
+ net-libs/enet:1.3="
+DEPEND="${RDEPEND}"
+BDEPEND="$(python_gen_any_dep 'dev-python/protobuf-python[${PYTHON_USEDEP}]')"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-cmake.patch
+)
+
+python_check_deps() {
+ has_version -b "dev-python/protobuf-python[${PYTHON_USEDEP}]"
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCDOGS_DATA_DIR="${EPREFIX}"/usr/share/${PN}/
+ -DBUILD_EDITOR=OFF
+ -DUSE_SHARED_ENET=ON
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ dodoc doc/{AUTHORS,original_readme.txt}
+
+ # CREDITS is used at runtime, rest is licenses or duplicates
+ find "${ED}"/usr/share/${PN}/doc -type f ! -name CREDITS -delete || die
+}
diff --git a/games-arcade/cdogs-sdl/files/cdogs-sdl-1.1.1-cmake.patch b/games-arcade/cdogs-sdl/files/cdogs-sdl-1.1.1-cmake.patch
new file mode 100644
index 000000000000..92ce17bcbc39
--- /dev/null
+++ b/games-arcade/cdogs-sdl/files/cdogs-sdl-1.1.1-cmake.patch
@@ -0,0 +1,14 @@
+Remove -Werror and install data to CDOGS_DATA_DIR rather
+than directly under CMAKE_INSTALL_PREFIX.
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -128,3 +128,3 @@
+ if(NOT BEOS AND NOT HAIKU)
+- add_definitions(-Winline -Werror)
++ add_definitions(-Winline)
+ set(EXTRA_LIBRARIES "m")
+@@ -195,3 +195,3 @@
+ set(LIB_EXTENSION ".so")
+- set(DATA_INSTALL_DIR ".")
++ set(DATA_INSTALL_DIR ${CDOGS_DATA_DIR})
+ endif()