summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2021-06-14 20:25:38 -0400
committerIonen Wolkens <ionen@gentoo.org>2021-06-15 16:00:21 -0400
commitdb4d082f8af014d25ef97f6de6d1390d91341933 (patch)
treea51e4009c246b5e321e620bfa5ddde4bf0b87b3b /games-arcade
parentgames-arcade/abe: tidy ebuild and add missing EPREFIX (diff)
downloadgentoo-db4d082f8af014d25ef97f6de6d1390d91341933.tar.gz
gentoo-db4d082f8af014d25ef97f6de6d1390d91341933.tar.bz2
gentoo-db4d082f8af014d25ef97f6de6d1390d91341933.zip
games-arcade/kajaani-kombat: gcc11 and clang fix, tidy
Using -std=c++14 to avoid a rather large patch, but still need a patch due to pointer misuse (also fixes build with clang). Revbump due to minor RDEPEND updates and new .desktop entry. Also, added a missing a EPREFIX. Closes: https://bugs.gentoo.org/739086 Closes: https://bugs.gentoo.org/790743 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-arcade')
-rw-r--r--games-arcade/kajaani-kombat/files/kajaani-kombat-0.7-gcc11.patch31
-rw-r--r--games-arcade/kajaani-kombat/kajaani-kombat-0.7-r2.ebuild (renamed from games-arcade/kajaani-kombat/kajaani-kombat-0.7-r1.ebuild)36
2 files changed, 51 insertions, 16 deletions
diff --git a/games-arcade/kajaani-kombat/files/kajaani-kombat-0.7-gcc11.patch b/games-arcade/kajaani-kombat/files/kajaani-kombat-0.7-gcc11.patch
new file mode 100644
index 000000000000..9a3968fcf83f
--- /dev/null
+++ b/games-arcade/kajaani-kombat/files/kajaani-kombat-0.7-gcc11.patch
@@ -0,0 +1,31 @@
+These SDL_* return NULL on error, and gcc11/clang won't allow this.
+https://bugs.gentoo.org/739086
+--- a/client_net.cpp
++++ b/client_net.cpp
+@@ -33,3 +33,3 @@
+ cond = SDL_CreateCond();
+- if (cond <0)
++ if (!cond)
+ {
+@@ -39,3 +39,3 @@
+ mutex = SDL_CreateMutex();
+- if (mutex < 0)
++ if (!mutex)
+ {
+@@ -47,3 +47,3 @@
+ trans_th = SDL_CreateThread (&client_tcpnet::transf_func, (void *) this);
+- if (trans_th < 0)
++ if (!trans_th)
+ {
+@@ -53,3 +53,3 @@
+ input_th = SDL_CreateThread (&client_tcpnet::input_func, (void *) this);
+- if (input_th < 0)
++ if (!input_th)
+ {
+--- a/game_server.cpp
++++ b/game_server.cpp
+@@ -66,3 +66,3 @@
+ con_th = SDL_CreateThread (&game_server::connection_accepter, (void *) this);
+- if (con_th < 0)
++ if (!con_th)
+ {
diff --git a/games-arcade/kajaani-kombat/kajaani-kombat-0.7-r1.ebuild b/games-arcade/kajaani-kombat/kajaani-kombat-0.7-r2.ebuild
index 7e5f18065544..6c34c9d2c9d8 100644
--- a/games-arcade/kajaani-kombat/kajaani-kombat-0.7-r1.ebuild
+++ b/games-arcade/kajaani-kombat/kajaani-kombat-0.7-r2.ebuild
@@ -3,45 +3,49 @@
EAPI=7
-inherit toolchain-funcs
+inherit desktop flag-o-matic toolchain-funcs
DESCRIPTION="Rampart-like game set in space"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
SRC_URI="mirror://gentoo/${P}.tar.gz"
-LICENSE="GPL-2"
+LICENSE="BitstreamVera GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-DEPEND="media-libs/libsdl[sound,video]
- media-libs/sdl-net
+RDEPEND="
+ media-libs/libsdl[sound,video]
media-libs/sdl-image[png]
- media-libs/sdl-ttf
media-libs/sdl-mixer[vorbis]
- sys-libs/ncurses:0
- sys-libs/readline:0
-"
-RDEPEND="${DEPEND}"
+ media-libs/sdl-net
+ media-libs/sdl-ttf
+ sys-libs/ncurses:=
+ sys-libs/readline:="
+DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/${PV}-makefile.patch
"${FILESDIR}"/${P}-ldflags.patch
+ "${FILESDIR}"/${P}-gcc11.patch
)
src_prepare() {
default
- sed -i \
- -e "s:GENTOODIR:/usr/share/${PN}/:" \
- Makefile || die
+ sed -i "s|GENTOODIR|${EPREFIX}/usr/share/${PN}/|" Makefile || die
tc-export CXX
+ append-cxxflags -std=c++14 #790743
}
src_install() {
- dobin kajaani-kombat
- insinto "/usr/share/${PN}"
- doins *.{png,ttf,ogg}
+ dobin ${PN}
+ doman ${PN}.6
+
+ insinto /usr/share/${PN}
+ doins *.{ogg,png,ttf}
+
+ make_desktop_entry ${PN} "Kajaani Kombat" applications-games
+
einstalldocs
- doman kajaani-kombat.6
}