summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Sokolov <sokolov@google.com>2020-11-15 21:02:38 +0100
committerDavid Seifert <soap@gentoo.org>2020-11-15 21:02:38 +0100
commita0780ba5533643aba22dce01b8af5ea580425c6e (patch)
tree367b211eb7315cae3faeb9b5d666c684685126ac /games-puzzle/rezerwar/rezerwar-0.4.2-r2.ebuild
parentgames-mud/tf: drop old (or, rather, too new) (diff)
downloadgentoo-a0780ba5533643aba22dce01b8af5ea580425c6e.tar.gz
gentoo-a0780ba5533643aba22dce01b8af5ea580425c6e.tar.bz2
gentoo-a0780ba5533643aba22dce01b8af5ea580425c6e.zip
games-puzzle/rezerwar: fix build with gcc10
Use correct compiler and fix build on prefix Closes: https://bugs.gentoo.org/708238 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org> Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'games-puzzle/rezerwar/rezerwar-0.4.2-r2.ebuild')
-rw-r--r--games-puzzle/rezerwar/rezerwar-0.4.2-r2.ebuild58
1 files changed, 58 insertions, 0 deletions
diff --git a/games-puzzle/rezerwar/rezerwar-0.4.2-r2.ebuild b/games-puzzle/rezerwar/rezerwar-0.4.2-r2.ebuild
new file mode 100644
index 000000000000..bead5c2cecc7
--- /dev/null
+++ b/games-puzzle/rezerwar/rezerwar-0.4.2-r2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop toolchain-funcs
+
+DESCRIPTION="Puzzle game like the known tetromino and the average pipe games"
+HOMEPAGE="https://tamentis.com/projects/rezerwar/"
+SRC_URI="https://tamentis.com/projects/rezerwar/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+ media-libs/libsdl[sound,joystick,video]
+ media-libs/sdl-mixer[vorbis]"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc-CC.patch
+ "${FILESDIR}"/${P}-gcc10.patch
+)
+
+src_prepare() {
+ default
+ sed -i \
+ -e '/check_sdl$/d' \
+ -e 's/-O2 //' \
+ configure \
+ || die 'sed failed'
+ sed -i \
+ -e '/CC.*OBJECTS/s:$(CC):$(CC) $(LDFLAGS):' \
+ mkfiles/Makefile.src \
+ || die "sed failed"
+}
+
+src_configure() {
+ tc-export CC
+
+ SDLCONFIG=sdl-config \
+ TARGET_BIN="${EPREFIX}/usr/bin" \
+ TARGET_DOC="${EPREFIX}/usr/share/doc/${PF}" \
+ TARGET_DATA="${EPREFIX}/usr/share/${PN}" \
+ ./configure || die "configure failed"
+ sed -i \
+ -e '/TARGET_DOC/d' \
+ Makefile \
+ || die "sed failed"
+}
+
+src_install() {
+ dodir /usr/bin
+ default
+ dodoc doc/{CHANGES,README,TODO}
+ make_desktop_entry rezerwar Rezerwar
+}