mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 16:49:10 -07:00
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>
This commit is contained in:
committed by
David Seifert
parent
0cd6ea0f6f
commit
a0780ba553
12
games-puzzle/rezerwar/files/rezerwar-0.4.2-gcc-CC.patch
Normal file
12
games-puzzle/rezerwar/files/rezerwar-0.4.2-gcc-CC.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff -r 4e0421547ae0 configure
|
||||
--- a/configure Sat Oct 03 14:28:50 2020 +0000
|
||||
+++ b/configure Sat Oct 03 14:41:42 2020 +0000
|
||||
@@ -58,7 +58,7 @@
|
||||
}
|
||||
EOF
|
||||
|
||||
- if ! gcc `sdl-config --cflags` test_sdl_mixer.c -o test_sdl_mixer; then
|
||||
+ if ! $CC `sdl-config --cflags` test_sdl_mixer.c -o test_sdl_mixer; then
|
||||
echo "SDL_mixer not found =/"
|
||||
rm -f test_sdl_mixer*
|
||||
exit
|
||||
12
games-puzzle/rezerwar/files/rezerwar-0.4.2-gcc10.patch
Normal file
12
games-puzzle/rezerwar/files/rezerwar-0.4.2-gcc10.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff -r 3f22f3a0051b src/events.c
|
||||
--- a/src/events.c Sat Oct 03 14:42:28 2020 +0000
|
||||
+++ b/src/events.c Sat Oct 03 14:42:42 2020 +0000
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
extern Board *board;
|
||||
extern Configuration *conf;
|
||||
-SDL_Surface *screen;
|
||||
+extern SDL_Surface *screen;
|
||||
Cube *speedy; // currently accelerated cube
|
||||
|
||||
|
||||
58
games-puzzle/rezerwar/rezerwar-0.4.2-r2.ebuild
Normal file
58
games-puzzle/rezerwar/rezerwar-0.4.2-r2.ebuild
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user