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>
This commit is contained in:
Ionen Wolkens 2021-10-18 21:16:45 -04:00
parent 2db21f4050
commit 1b0f8168ef
No known key found for this signature in database
GPG Key ID: B24406B0B0AC4334
3 changed files with 65 additions and 0 deletions

View File

@ -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

View File

@ -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
}

View File

@ -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()