summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2021-04-05 00:28:44 +0200
committerDavid Seifert <soap@gentoo.org>2021-04-05 00:28:44 +0200
commitf8ca5cec3197b86edcd3df72896f567844d74796 (patch)
tree3a01351fc936d6ba5c331a7331efce4ffc377247 /games-roguelike
parentapp-misc/tek: Port to EAPI 7 (diff)
downloadgentoo-f8ca5cec3197b86edcd3df72896f567844d74796.tar.gz
gentoo-f8ca5cec3197b86edcd3df72896f567844d74796.tar.bz2
gentoo-f8ca5cec3197b86edcd3df72896f567844d74796.zip
games-roguelike/scourge: Port to EAPI 7
* Fix building against Clang Closes: https://bugs.gentoo.org/739330 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'games-roguelike')
-rw-r--r--games-roguelike/scourge/files/scourge-0.21.1-Wc++11-narrowing.patch18
-rw-r--r--games-roguelike/scourge/scourge-0.21.1-r1.ebuild32
2 files changed, 35 insertions, 15 deletions
diff --git a/games-roguelike/scourge/files/scourge-0.21.1-Wc++11-narrowing.patch b/games-roguelike/scourge/files/scourge-0.21.1-Wc++11-narrowing.patch
new file mode 100644
index 000000000000..a852248c9fc2
--- /dev/null
+++ b/games-roguelike/scourge/files/scourge-0.21.1-Wc++11-narrowing.patch
@@ -0,0 +1,18 @@
+Allow compiling with Clang
+https://bugs.gentoo.org/739330
+
+--- a/src/sdlhandler.cpp
++++ b/src/sdlhandler.cpp
+@@ -1034,10 +1034,10 @@
+ bool SDLHandler::intersects( int x, int y, int w, int h,
+ int x2, int y2, int w2, int h2 ) {
+ SDL_Rect ra = {
+- x, y, w, h
++ static_cast<Sint16>(x), static_cast<Sint16>(y), static_cast<Uint16>(w), static_cast<Uint16>(h)
+ };
+ SDL_Rect rb = {
+- x2, y2, w2, h2
++ static_cast<Sint16>(x2), static_cast<Sint16>(y2), static_cast<Uint16>(w2), static_cast<Uint16>(h2)
+ };
+ return intersects( &ra, &rb );
+ }
diff --git a/games-roguelike/scourge/scourge-0.21.1-r1.ebuild b/games-roguelike/scourge/scourge-0.21.1-r1.ebuild
index 5eeec7c52315..1a0a0a952bf2 100644
--- a/games-roguelike/scourge/scourge-0.21.1-r1.ebuild
+++ b/games-roguelike/scourge/scourge-0.21.1-r1.ebuild
@@ -1,18 +1,20 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-inherit autotools desktop wxwidgets
+EAPI=7
+
+inherit autotools desktop
DESCRIPTION="A graphical rogue-like adventure game"
HOMEPAGE="https://sourceforge.net/projects/scourge/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.src.tar.gz
+SRC_URI="
+ mirror://sourceforge/${PN}/${P}.src.tar.gz
mirror://sourceforge/${PN}/${P}.data.tar.gz"
+S="${WORKDIR}/${PN}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
RDEPEND="
media-libs/freetype:2
@@ -24,17 +26,17 @@ RDEPEND="
virtual/libintl
virtual/opengl
virtual/glu"
-DEPEND="${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
sys-devel/gettext
virtual/pkgconfig"
-S="${WORKDIR}/${PN}"
-
PATCHES=(
"${FILESDIR}"/${P}-gcc47.patch
"${FILESDIR}"/${P}-gcc6.patch
"${FILESDIR}"/${P}-automake-1.13.patch
"${FILESDIR}"/${P}-freetype_pkgconfig.patch
+ "${FILESDIR}"/${P}-Wc++11-narrowing.patch
)
src_prepare() {
@@ -52,17 +54,17 @@ src_prepare() {
}
src_configure() {
- local myeconfargs=(
- --with-data-dir=/usr/share/${PN}
- --localedir=/usr/share/locale
- )
- econf "${myeconfargs[@]}"
+ econf \
+ --disable-rpath \
+ --with-data-dir="${EPREFIX}"/usr/share/${PN}
}
src_install() {
default
- insinto /usr/share/${PN}
- doins -r ../scourge_data/*
+
+ insinto /usr/share/scourge
+ doins -r ../scourge_data/.
+
doicon assets/scourge.png
make_desktop_entry scourge S.C.O.U.R.G.E.
}