diff options
author | William Breathitt Gray <vilhelm.gray@gmail.com> | 2020-07-01 14:29:22 -0400 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2020-12-09 22:49:34 +0000 |
commit | 757d074721f7f503d239f348638102dcaeff3a21 (patch) | |
tree | 29f7f482bfe4eea80a10495def7d8449efba0053 /games-arcade | |
parent | games-strategy/julius: Add xdg eclass to handle icon cache (diff) | |
download | gentoo-757d074721f7f503d239f348638102dcaeff3a21.tar.gz gentoo-757d074721f7f503d239f348638102dcaeff3a21.tar.bz2 gentoo-757d074721f7f503d239f348638102dcaeff3a21.zip |
games-arcade/cdogs-sdl: Version bump to 0.9.1
Closes: https://bugs.gentoo.org/730402
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/16539
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-arcade')
-rw-r--r-- | games-arcade/cdogs-sdl/Manifest | 3 | ||||
-rw-r--r-- | games-arcade/cdogs-sdl/cdogs-sdl-0.10.1.ebuild | 41 | ||||
-rw-r--r-- | games-arcade/cdogs-sdl/cdogs-sdl-0.4-r1.ebuild | 55 | ||||
-rw-r--r-- | games-arcade/cdogs-sdl/files/cdogs-sdl-0.10.1-Add-BUILD_EDITOR-option.patch | 89 | ||||
-rw-r--r-- | games-arcade/cdogs-sdl/files/cdogs-sdl-0.4-64bit.patch | 48 | ||||
-rw-r--r-- | games-arcade/cdogs-sdl/metadata.xml | 13 |
6 files changed, 140 insertions, 109 deletions
diff --git a/games-arcade/cdogs-sdl/Manifest b/games-arcade/cdogs-sdl/Manifest index 42dd2833ce2a..cc2ba05abf1a 100644 --- a/games-arcade/cdogs-sdl/Manifest +++ b/games-arcade/cdogs-sdl/Manifest @@ -1,2 +1 @@ -DIST cdogs-data-2007-07-06.tar.bz2 218810 BLAKE2B fb788ed11ef220b4f244a74be838536281a87a5c8055cb9674b4269f0a63cb07120b31af113fab63f820c1b293c97b310e91d3638bc41d5d3ef4a12472481aaa SHA512 9e645d64bcc0b99df9fb113f7103590eb8045ca9439700279c8ea55a6277d10fc38aff38bb1137887bc5697c505fe18e15d6c62eaf2790c065b1261fa7418a84 -DIST cdogs-sdl-0.4.tar.bz2 164804 BLAKE2B 91498d981b2318d4f1d68112fe8d574b447290f9cad7b232a56cd6d516ca2fd3983b01789c87914f81eaa6d1c593dac95fe88ec1cd2823e6769d9f5980c6c2d5 SHA512 69fbac533207e38c85cf0f71db47df50405a5ff220a6662f7e186d1f54c4181ee56e1ff8049a427acec7fcf0529b8df66db36a693978bb0aa04eb0594a8b5adc +DIST cdogs-sdl-0.10.1.tar.gz 25035447 BLAKE2B 7f1ab1c210daaa44080cfca335cbcf0cd3ae069ef0638bd34c437e7b08833dfecfdf010ccdf9d5a4d3ede66cb75fd6258d3e8b7d907425fc0b73a792568ed205 SHA512 97bc23848536e98207afeaf74c172fe138dd0425dde6bb888b5c64f244b3c6ecea16245630628ab7aa4277da16c25c623574e8d123993bc9e840a3c26c1edce7 diff --git a/games-arcade/cdogs-sdl/cdogs-sdl-0.10.1.ebuild b/games-arcade/cdogs-sdl/cdogs-sdl-0.10.1.ebuild new file mode 100644 index 000000000000..63957cdb3af6 --- /dev/null +++ b/games-arcade/cdogs-sdl/cdogs-sdl-0.10.1.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake xdg + +DESCRIPTION="Classic overhead run-and-gun game" +HOMEPAGE="https://cxong.github.io/cdogs-sdl/" +SRC_URI="https://github.com/cxong/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2+ BSD-2 CC0-1.0 CC-BY-3.0 CC-BY-SA-3.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=" + dev-python/protobuf-python + media-libs/libsdl2[haptic,opengl] + media-libs/sdl2-image[png] + media-libs/sdl2-mixer[vorbis,wav] + net-libs/enet:1.3=" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${P}-Add-BUILD_EDITOR-option.patch" +) + +src_prepare() { + rm -f doc/{COPYING.,LICENSE.,license.,README_DATA.md}* || die + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DCDOGS_DATA_DIR="${EPREFIX}/usr/share/${PN}/" + -DCDOGS_DOC_DIR="${EPREFIX}/usr/share/doc/${PF}/" + -DBUILD_EDITOR=OFF + -DUSE_SHARED_ENET=ON + ) + cmake_src_configure +} diff --git a/games-arcade/cdogs-sdl/cdogs-sdl-0.4-r1.ebuild b/games-arcade/cdogs-sdl/cdogs-sdl-0.4-r1.ebuild deleted file mode 100644 index 04c64376691c..000000000000 --- a/games-arcade/cdogs-sdl/cdogs-sdl-0.4-r1.ebuild +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -inherit eutils flag-o-matic games - -CDOGS_DATA="cdogs-data-2007-07-06" -DESCRIPTION="A port of the old DOS arcade game C-Dogs" -HOMEPAGE="http://lumaki.com/code/cdogs" -SRC_URI="http://icculus.org/cdogs-sdl/files/src/${P}.tar.bz2 - http://icculus.org/cdogs-sdl/files/data/${CDOGS_DATA}.tar.bz2" - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -DEPEND="media-libs/libsdl[video] - media-libs/sdl-mixer" -RDEPEND=${DEPEND} - -S=${WORKDIR}/${P}/src - -src_unpack() { - unpack ${A} - mv ${CDOGS_DATA} ${P}/data || die -} - -src_prepare() { - sed -i \ - -e "/^CF_OPT/d" \ - -e "/^CC/d" \ - Makefile || die - sed -i -e "/\bopen(/s/)/, 0666)/" files.c || die - epatch "${FILESDIR}"/${P}-64bit.patch - append-cflags -std=gnu89 # build with gcc5 (bug #571112) -} - -src_compile() { - emake I_AM_CONFIGURED=yes \ - SYSTEM="\"linux\"" \ - STRIP=true \ - DATADIR="${GAMES_DATADIR}/${PN}" \ - cdogs -} - -src_install() { - dogamesbin cdogs - insinto "${GAMES_DATADIR}/${PN}" - doins -r ../data/* - newicon ../data/cdogs_icon.png ${PN}.png - dodoc ../doc/{README,AUTHORS,ChangeLog,README_DATA,TODO,original_readme.txt} - make_desktop_entry "cdogs -fullscreen" C-Dogs - prepgamesdirs -} diff --git a/games-arcade/cdogs-sdl/files/cdogs-sdl-0.10.1-Add-BUILD_EDITOR-option.patch b/games-arcade/cdogs-sdl/files/cdogs-sdl-0.10.1-Add-BUILD_EDITOR-option.patch new file mode 100644 index 000000000000..5a5912e9b3af --- /dev/null +++ b/games-arcade/cdogs-sdl/files/cdogs-sdl-0.10.1-Add-BUILD_EDITOR-option.patch @@ -0,0 +1,89 @@ +From f8adfb66ea686366edddc89e92c9a5537b8dfbef Mon Sep 17 00:00:00 2001 +From: William Breathitt Gray <vilhelm.gray@gmail.com> +Date: Wed, 9 Dec 2020 07:45:54 -0500 +Subject: [PATCH] Add BUILD_EDITOR option to control cdogs-sdl-editor build + +--- + CMakeLists.txt | 10 +++++++--- + src/CMakeLists.txt | 6 +++--- + 2 files changed, 10 insertions(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 169a17ca..510e4802 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -29,12 +29,14 @@ SET(WEBSITE "http://cxong.github.io/cdogs-sdl/") + option(DEBUG "Enable debug build" OFF) + option(DEBUG_PROFILE "Enable debug profile build" OFF) + option(USE_SHARED_ENET "Use system installed copy of enet" OFF) ++option(BUILD_EDITOR "Build cdogs-sdl-editor" ON) + + # check for crosscompiling (defined when using a toolchain file) + if(CMAKE_CROSSCOMPILING) + # check for gcw0 + if(CMAKE_C_COMPILER MATCHES ".*gcw0-linux.*") + set(GCW0 1) ++ set(BUILD_EDITOR OFF) + endif() + endif() + +@@ -65,7 +67,9 @@ find_package(Nanopb REQUIRED) + find_package(SDL2 REQUIRED) + find_package(SDL2_image REQUIRED) + find_package(SDL2_mixer REQUIRED) +-find_package(OpenGL REQUIRED) ++if(BUILD_EDITOR) ++ find_package(OpenGL REQUIRED) ++endif() + find_package(CCache) + link_directories(${SDL2_LIBRARY_DIRS} ${SDL2_IMAGE_LIBRARY_DIRS} ${SDL2_MIXER_LIBRARY_DIRS}) + +@@ -165,7 +169,7 @@ set_target_properties(cdogs-sdl PROPERTIES + RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/src + RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/src + ) +-if(NOT "${GCW0}") ++if(BUILD_EDITOR) + set_target_properties(cdogs-sdl-editor PROPERTIES + RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/src + RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/src +@@ -200,7 +204,7 @@ install( + PROGRAMS + ${CMAKE_CURRENT_BINARY_DIR}/src/cdogs-sdl${EXE_EXTENSION} + DESTINATION ${CDOGS_BIN_DIR}) +-if(NOT "${GCW0}") ++if(BUILD_EDITOR) + install( + PROGRAMS + ${CMAKE_CURRENT_BINARY_DIR}/src/cdogs-sdl-editor${EXE_EXTENSION} +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 8fb82667..564cbf3f 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -4,12 +4,12 @@ include_directories( + ${SDL2_INCLUDE_DIRS} + ${SDL2_IMAGE_INCLUDE_DIRS} + ${SDL2_MIXER_INCLUDE_DIRS}) +-if(NOT "${GCW0}") ++if(BUILD_EDITOR) + include_directories(${OPENGL_INCLUDE_DIRS}) + endif() + + add_subdirectory(cdogs) +-if(NOT "${GCW0}") ++if(BUILD_EDITOR) + add_subdirectory(cdogsed) + endif() + add_subdirectory(json) +@@ -82,7 +82,7 @@ if(GCW0) + ) + endif() + +-if(NOT "${GCW0}") ++if(BUILD_EDITOR) + add_executable(cdogs-sdl-editor cdogsed/cdogsed.c ${CDOGS_SDL_EXTRA}) + if(APPLE) + set_target_properties(cdogs-sdl-editor PROPERTIES +-- +2.29.2 + diff --git a/games-arcade/cdogs-sdl/files/cdogs-sdl-0.4-64bit.patch b/games-arcade/cdogs-sdl/files/cdogs-sdl-0.4-64bit.patch deleted file mode 100644 index bcab13c0ebfd..000000000000 --- a/games-arcade/cdogs-sdl/files/cdogs-sdl-0.4-64bit.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- src/grafx.c -+++ src/grafx.c -@@ -216,12 +216,6 @@ - SDL_VideoQuit(); - } - --typedef struct _Pic { -- short int w; -- short int h; -- char *data; --} Pic; -- - int ReadPics(const char *filename, void **pics, int maxPics, - color * palette) - { -@@ -241,12 +235,12 @@ - fread(&size, sizeof(size), 1, f); - swap16(&size); - if (size) { -- Pic *p = sys_mem_alloc(size); -+ unsigned char *p = sys_mem_alloc(size); - -- f_read16(f, &p->w, 2); -- f_read16(f, &p->h, 2); -+ f_read16(f, &p[0], 2); // w -+ f_read16(f, &p[2], 2); // h - -- f_read(f, &p->data, size - 4); -+ f_read(f, &p[4], size - 4); // data - - pics[i] = p; - -@@ -278,11 +272,11 @@ - fread(&size, sizeof(size), 1, f); - swap16(&size); - if (size) { -- Pic *p = sys_mem_alloc(size); -+ unsigned char *p = sys_mem_alloc(size); - -- f_read16(f, &p->w, 2); -- f_read16(f, &p->h, 2); -- f_read(f, &p->data, size - 4); -+ f_read16(f, &p[0], 2); // w -+ f_read16(f, &p[2], 2); // h -+ f_read(f, &p[4], size - 4); // data - - pics[i] = p; - diff --git a/games-arcade/cdogs-sdl/metadata.xml b/games-arcade/cdogs-sdl/metadata.xml index 8332a46990b6..5aa3a5b285bb 100644 --- a/games-arcade/cdogs-sdl/metadata.xml +++ b/games-arcade/cdogs-sdl/metadata.xml @@ -6,9 +6,14 @@ <name>Gentoo Games Project</name> </maintainer> <longdescription lang="en"> -C-Dogs is an arcade shoot-em-up which lets players work alone and -cooperatively during missions or fight against each other in the "dogfight" -deathmatch mode. The DOS version of C-Dogs came with severla built in missions -and dogfight maps. This version does too. +C-Dogs SDL is a classic overhead run-and-gun game, supporting up to 4 players in +co-op and deathmatch modes. Customize your player, choose from many weapons, and +blast, slide and slash your way through over 100 user-created campaigns. Have +fun! </longdescription> +<upstream> + <bugs-to>https://github.com/cxong/cdogs-sdl/issues</bugs-to> + <doc lang="en">https://cxong.github.io/cdogs-sdl/</doc> + <remote-id type="github">cxong/cdogs-sdl</remote-id> +</upstream> </pkgmetadata> |