summaryrefslogtreecommitdiff
path: root/games-arcade/cdogs-sdl
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-12-14 13:26:14 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-12-14 13:26:14 +0000
commit6abbf81ef2f298e3221ff5e67a1f3c5f23958212 (patch)
tree25413d1cb3a0cbfe36029db32398c0f333609215 /games-arcade/cdogs-sdl
parent9c417bacd51da6d8b57fa9f37425161d30d4b95b (diff)
gentoo resync : 14.12.2020
Diffstat (limited to 'games-arcade/cdogs-sdl')
-rw-r--r--games-arcade/cdogs-sdl/Manifest10
-rw-r--r--games-arcade/cdogs-sdl/cdogs-sdl-0.10.1.ebuild42
-rw-r--r--games-arcade/cdogs-sdl/cdogs-sdl-0.4-r1.ebuild55
-rw-r--r--games-arcade/cdogs-sdl/files/cdogs-sdl-0.10.1-Add-BUILD_EDITOR-option.patch89
-rw-r--r--games-arcade/cdogs-sdl/files/cdogs-sdl-0.10.1-Remove-Winline-and-Werror-definitions.patch24
-rw-r--r--games-arcade/cdogs-sdl/files/cdogs-sdl-0.4-64bit.patch48
-rw-r--r--games-arcade/cdogs-sdl/metadata.xml13
7 files changed, 169 insertions, 112 deletions
diff --git a/games-arcade/cdogs-sdl/Manifest b/games-arcade/cdogs-sdl/Manifest
index 237864c149df..da114c49cd85 100644
--- a/games-arcade/cdogs-sdl/Manifest
+++ b/games-arcade/cdogs-sdl/Manifest
@@ -1,5 +1,5 @@
-AUX cdogs-sdl-0.4-64bit.patch 1047 BLAKE2B daf0cd53da4acfde31a1a26f5f2a676dafe1d4caa9d8ff7929a18c207f9b67406058bfa25a2d96fc2d72a87ff44c3b856bfbe1931b18031e8b0e7e8d3a2f2b29 SHA512 6a0c474d1bac65400cf1078a3b49cb2ea147fa460d6f361482a3a340bdedec9816976e235b57facabb7327be770796be8cf45b9a5a1891ecd44f1a090a4bcf54
-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
-EBUILD cdogs-sdl-0.4-r1.ebuild 1261 BLAKE2B 0bdc892706823e514c7bfa9a6ad2113ef8505986960550eaba76d3997c2fc5a3943bffe93db1b825b5b4bf76be6e43608572d2729bf48ee093b578b70dd16d70 SHA512 e90e30c1079458c48bef0927e78e891356ef56ab4168931ac319ccb86f09d29604f4464a666cb21a3d52ce47c4a29e9457c901c004d96dd6a1a228e6a9a35053
-MISC metadata.xml 559 BLAKE2B e0c0e67efaa3883d573482c8ae9e0eefd8a2315c8e021b32fa7f92cb01518ba75212e8b25cdc9464fd6c98af855eb2f658003ec180355eab57d5c0bf17654e78 SHA512 c3a7ca1efeffa6465e89a8bd1c8460a6345406c52281190ae4d63cad3896f08cab7808732658bb26425850032888010f6c5abc6ce2833bd14c5ef80c25a1b29c
+AUX cdogs-sdl-0.10.1-Add-BUILD_EDITOR-option.patch 2734 BLAKE2B baea5a27e417584630dd6254356aeaa77c79b8bdb743c37ca0473782c60fdb4ef892d012849504411c3f81e414b316f9f2ca923a625407d988310cea27bc2969 SHA512 f8143d41ce1ff16aee12d26989d5c6a9b3db146d720053331842eaac16b3b68661cf27e626b95a9ca6acf75e40262b864c546a061e78e61c6b8a91d34d04c488
+AUX cdogs-sdl-0.10.1-Remove-Winline-and-Werror-definitions.patch 571 BLAKE2B 644258160cbef3bb76e90f53e737a44482e73ba94a53e95704dbf683c6ce34c2ef51863580d7b0b274772e3f2a49c2cabf5d9b8c844aa4e5f71e2641c1cdc490 SHA512 db814155c0dc25132fd92c0ffb18390b824bc6ca914ae888511777b5183738463c59f42294a04732c97b1d6c7b8802687216e5ad0a2b55c310483ade1cfe4af2
+DIST cdogs-sdl-0.10.1.tar.gz 25035447 BLAKE2B 7f1ab1c210daaa44080cfca335cbcf0cd3ae069ef0638bd34c437e7b08833dfecfdf010ccdf9d5a4d3ede66cb75fd6258d3e8b7d907425fc0b73a792568ed205 SHA512 97bc23848536e98207afeaf74c172fe138dd0425dde6bb888b5c64f244b3c6ecea16245630628ab7aa4277da16c25c623574e8d123993bc9e840a3c26c1edce7
+EBUILD cdogs-sdl-0.10.1.ebuild 1006 BLAKE2B b6bbfb721eb0fa72c70a1208ed319667007a72573d44dd55c44cc8ea792428039fd0d28fc77ded5d7682414d671f19203a892d94d8282351c19e8c9bab59a701 SHA512 f577adca8646759ea0a7e9609d82ebb8e047b1e8e88a31fde45194afdd3e7b3cdd3589d7a8222b4139fe63f8a0239bc571192d2e4e4bc71de979e5ae1ac3ad15
+MISC metadata.xml 737 BLAKE2B 955df1dee31c62d38cc48fea5c5f99307516c501eef4eaa5c78a86da14d8e12b797c16762bc64c707870b535ffc34a7f019c74200aec025089831685e7d027f1 SHA512 97b8283727dd181fe938a75909c3961e4ce28db2c01c6708a54c7bfcc68d8b28200d7dfadf6183011c8689715d83337f55265fe1f7d7b7441fde9fd83a65689f
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..f5fb5dcdeb1c
--- /dev/null
+++ b/games-arcade/cdogs-sdl/cdogs-sdl-0.10.1.ebuild
@@ -0,0 +1,42 @@
+# 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"
+ "${FILESDIR}/${P}-Remove-Winline-and-Werror-definitions.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.10.1-Remove-Winline-and-Werror-definitions.patch b/games-arcade/cdogs-sdl/files/cdogs-sdl-0.10.1-Remove-Winline-and-Werror-definitions.patch
new file mode 100644
index 000000000000..acd9a4e85769
--- /dev/null
+++ b/games-arcade/cdogs-sdl/files/cdogs-sdl-0.10.1-Remove-Winline-and-Werror-definitions.patch
@@ -0,0 +1,24 @@
+From 2b55a76518e0492d7003af9af798bd9769f0b586 Mon Sep 17 00:00:00 2001
+From: William Breathitt Gray <vilhelm.gray@gmail.com>
+Date: Thu, 10 Dec 2020 07:07:33 -0500
+Subject: [PATCH] Remove -Winline and -Werror definitions
+
+---
+ CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 510e4802..ed2872b5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -123,7 +123,6 @@ else()
+ endif()
+ endif()
+ if(NOT BEOS AND NOT HAIKU)
+- add_definitions(-Winline -Werror)
+ set(EXTRA_LIBRARIES "m")
+ endif()
+ endif()
+--
+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>