summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Sokolov <sokolov@google.com>2020-10-03 13:49:03 +0100
committerJames Le Cuirot <chewi@gentoo.org>2020-10-03 14:14:07 +0100
commit5320229523ad830f0410b30a44475e32edb6a372 (patch)
treedc7733288923e4a56b1e3f858e972acbbd718145 /games-sports
parentmedia-libs/harfbuzz: stable 2.7.2 for hppa/sparc, bug #746155 (diff)
downloadgentoo-5320229523ad830f0410b30a44475e32edb6a372.tar.gz
gentoo-5320229523ad830f0410b30a44475e32edb6a372.tar.bz2
gentoo-5320229523ad830f0410b30a44475e32edb6a372.zip
games-sports/gracer: fix build with gcc10
Bug: https://bugs.gentoo.org/744745 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org> Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-sports')
-rw-r--r--games-sports/gracer/files/gracer-0.1.5-gcc10.patch14
-rw-r--r--games-sports/gracer/gracer-0.1.5-r2.ebuild51
2 files changed, 65 insertions, 0 deletions
diff --git a/games-sports/gracer/files/gracer-0.1.5-gcc10.patch b/games-sports/gracer/files/gracer-0.1.5-gcc10.patch
new file mode 100644
index 000000000000..a7539248e50d
--- /dev/null
+++ b/games-sports/gracer/files/gracer-0.1.5-gcc10.patch
@@ -0,0 +1,14 @@
+Fix -fno-common
+
+diff -r c259e312716e vehicle.h
+--- a/src/vehicle.h Sat Oct 03 12:42:08 2020 +0000
++++ b/src/vehicle.h Sat Oct 03 12:44:13 2020 +0000
+@@ -70,7 +70,7 @@
+
+ /* constants */
+ float mu[128]; /* friction factor */
+-} GrBreak;
++};
+
+ struct _GrTireData {
+ GrRef ref;
diff --git a/games-sports/gracer/gracer-0.1.5-r2.ebuild b/games-sports/gracer/gracer-0.1.5-r2.ebuild
new file mode 100644
index 000000000000..80f3d160674a
--- /dev/null
+++ b/games-sports/gracer/gracer-0.1.5-r2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="3D motor sports simulator"
+HOMEPAGE="http://gracer.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gracer/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="joystick"
+
+DEPEND="
+ dev-lang/tcl:0=
+ media-libs/freeglut
+ media-libs/giflib:=
+ media-libs/libpng:0=
+ media-libs/plib
+ virtual/glu
+ virtual/jpeg:0
+ virtual/opengl
+ x11-libs/libXi
+ x11-libs/libXmu
+"
+
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-gldefs.patch
+ "${FILESDIR}"/${PN}-gcc-3.4.patch
+ "${FILESDIR}/${P}"-gcc41.patch
+ "${FILESDIR}"/${P}-as-needed.patch
+ "${FILESDIR}"/${P}-libpng14.patch
+ "${FILESDIR}"/${P}-png15.patch
+ "${FILESDIR}"/${P}-giflib.patch
+ "${FILESDIR}"/${P}-warnings.patch
+ "${FILESDIR}"/${P}-gcc10.patch
+)
+
+src_configure() {
+ econf \
+ --enable-gif \
+ --enable-jpeg \
+ --enable-png \
+ $(use_enable joystick)
+ sed -i \
+ -e 's:-lplibsl:-lplibsl -lplibul:' \
+ $(find -name Makefile) || die
+}