Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-action/supertuxkart/files/, games-action/supertuxkart/
Date: Sat, 28 Mar 2020 20:38:01
Message-Id: 1585427847.c7ada27ef73e5e8b7fc46762ad8ff903a207409e.chewi@gentoo
1 commit: c7ada27ef73e5e8b7fc46762ad8ff903a207409e
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 28 20:32:11 2020 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 28 20:37:27 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7ada27e
7
8 games-action/supertuxkart: Version bump to 1.1
9
10 Many thanks to Kevin O'Shea for the patches.
11
12 Closes: https://bugs.gentoo.org/706088
13 Package-Manager: Portage-2.3.96, Repoman-2.3.20
14 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
15
16 games-action/supertuxkart/Manifest | 1 +
17 .../files/supertuxkart-1.1-fix-buildsystem.patch | 20 +++++
18 .../supertuxkart-1.1-irrlicht-arch-support.patch | 47 +++++++++++
19 games-action/supertuxkart/supertuxkart-1.1.ebuild | 91 ++++++++++++++++++++++
20 4 files changed, 159 insertions(+)
21
22 diff --git a/games-action/supertuxkart/Manifest b/games-action/supertuxkart/Manifest
23 index 5a0e070b25a..fd603cfb6c9 100644
24 --- a/games-action/supertuxkart/Manifest
25 +++ b/games-action/supertuxkart/Manifest
26 @@ -1,2 +1,3 @@
27 DIST supertuxkart-1.0-src.tar.xz 597012504 BLAKE2B ed1b851bad8696b4593c54f215b115528afc29bde237f67627e2918c4a9fab09eddc204d0c879fa85c6b10b5544dba5fa5fc1b437cb83e6d884ac717e3369c28 SHA512 182754610abd09545630fa1f7fda858ba1731bbacb078bc71597e143f9cb2a1cfcedd3038720760d0471a89b79cc3bb1eb292d38fcd53be05aad7cb17c474ca9
28 +DIST supertuxkart-1.1-src.tar.xz 616739152 BLAKE2B a4dd9ec0a8ee158306dc902d3de363b68e7a317800df1b36339843521019df91c0713b74bdef8dc06b40bee57285237408a17b539c7bd7298cd3ef3deaf99fda SHA512 81d5ff59bb33eba8a00547239d54cacfde25eed0c56c857712a00a62032e4cf371cdd367159eaa4bfec6d4dd5781b705e41b58a26b864aa43678cfe9926bb804
29 DIST supertuxkart.png 4435 BLAKE2B b48b95e1cdebe930837cc784c4c5e9a089a69077e2fcfed15fe5e8c4d649a0f8024769b2f2102bbaea3a94eb21f4b58b5d291b97493266c3c5c8d7335cf69a80 SHA512 a180332f79220431922fa8b351cb476ebc5d9d1df09f20707eb3bdd7002fd264cb027b8190c73c5221050e6e8601beb6758a5809d05aedfb18f0bdb426f47eda
30
31 diff --git a/games-action/supertuxkart/files/supertuxkart-1.1-fix-buildsystem.patch b/games-action/supertuxkart/files/supertuxkart-1.1-fix-buildsystem.patch
32 new file mode 100644
33 index 00000000000..394a1963199
34 --- /dev/null
35 +++ b/games-action/supertuxkart/files/supertuxkart-1.1-fix-buildsystem.patch
36 @@ -0,0 +1,20 @@
37 +diff --git a/lib/irrlicht/CMakeLists.txt b/lib/irrlicht/CMakeLists.txt
38 +index 92a881c81..1371fdf11 100644
39 +--- a/lib/irrlicht/CMakeLists.txt
40 ++++ b/lib/irrlicht/CMakeLists.txt
41 +@@ -94,15 +94,6 @@
42 + if(WIN32)
43 + add_definitions(-D_IRR_STATIC_LIB_)
44 + add_definitions(-D_CRT_SECURE_NO_WARNINGS) # Shut up about unsafe stuff
45 +-else()
46 +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fstrict-aliasing")
47 +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pipe -O3 -fstrict-aliasing")
48 +- if(CMAKE_COMPILER_IS_GNUCC)
49 +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexpensive-optimizations")
50 +- endif()
51 +- if(CMAKE_COMPILER_IS_GNUCXX)
52 +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexpensive-optimizations")
53 +- endif()
54 + endif()
55 +
56 + if(USE_GLES2)
57
58 diff --git a/games-action/supertuxkart/files/supertuxkart-1.1-irrlicht-arch-support.patch b/games-action/supertuxkart/files/supertuxkart-1.1-irrlicht-arch-support.patch
59 new file mode 100644
60 index 00000000000..ad9638ff3dc
61 --- /dev/null
62 +++ b/games-action/supertuxkart/files/supertuxkart-1.1-irrlicht-arch-support.patch
63 @@ -0,0 +1,47 @@
64 +From: Christoph Egger <debian@×××××××××××××××.org>
65 +Subject: [PATCH] debian/arch-support
66 +
67 +Building on non-linux architectures currently fails with unpatched
68 +irrlicht because irrlicht tries to create Joystick support using
69 +linux-specific headers. However there's infrastructure to disable
70 +Joystick support, we just need to activate that on non-linux
71 +architectures.
72 +
73 +Additionally if built on a sparc machine irrlicht assumes wrongly it's
74 +a solaris system. We fix this wrong assumption as our sparc builds are
75 +all on linux.
76 +
77 +Finally irrlicht exceeds the size constraights for -fpic requiering to
78 +build with -fPIC. As upstream doesn't do that we need to fix this for
79 +sparc and s390 builds (powerPC?).
80 +
81 +Signed-off-by: Christoph Egger <debian@×××××××××××××××.org>
82 +
83 +---
84 + lib/irrlicht/include/IrrCompileConfig.h | 10 +++++-----
85 + 1 files changed, 5 insertions(+), 5 deletions(-)
86 +
87 +--- a/lib/irrlicht/include/IrrCompileConfig.h
88 ++++ b/lib/irrlicht/include/IrrCompileConfig.h
89 +@@ -110,4 +110,8 @@
90 + #ifndef _IRR_SOLARIS_PLATFORM_
91 + #define _IRR_LINUX_PLATFORM_
92 ++#include <endian.h>
93 ++ #if __BYTE_ORDER == __BIG_ENDIAN
94 ++ #define __BIG_ENDIAN__
95 ++ #endif
96 + #endif
97 + #define _IRR_POSIX_API_
98 +@@ -465,11 +465,7 @@
99 + #undef _IRR_WCHAR_FILESYSTEM
100 + #endif
101 +
102 +-#if defined(__sparc__) || defined(__sun__)
103 +-#define __BIG_ENDIAN__
104 +-#endif
105 +-
106 +-#if defined(_IRR_SOLARIS_PLATFORM_)
107 ++#if defined(_IRR_SOLARIS_PLATFORM_) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__)
108 + #undef _IRR_COMPILE_WITH_JOYSTICK_EVENTS_
109 + #endif
110 +
111
112 diff --git a/games-action/supertuxkart/supertuxkart-1.1.ebuild b/games-action/supertuxkart/supertuxkart-1.1.ebuild
113 new file mode 100644
114 index 00000000000..5701c73bab7
115 --- /dev/null
116 +++ b/games-action/supertuxkart/supertuxkart-1.1.ebuild
117 @@ -0,0 +1,91 @@
118 +# Copyright 1999-2020 Gentoo Authors
119 +# Distributed under the terms of the GNU General Public License v2
120 +
121 +EAPI=7
122 +
123 +inherit cmake desktop xdg
124 +
125 +DESCRIPTION="A kart racing game starring Tux, the linux penguin (TuxKart fork)"
126 +HOMEPAGE="https://supertuxkart.net/"
127 +SRC_URI="mirror://sourceforge/${PN}/SuperTuxKart/${PV}/${P}-src.tar.xz
128 + mirror://gentoo/${PN}.png"
129 +
130 +LICENSE="GPL-2 GPL-3 CC-BY-SA-3.0 CC-BY-SA-4.0 CC0-1.0 public-domain ZLIB"
131 +SLOT="0"
132 +KEYWORDS="~amd64 ~x86"
133 +IUSE="debug fribidi libressl nettle recorder wiimote"
134 +
135 +# don't unbundle irrlicht and bullet
136 +# both are modified and system versions will break the game
137 +# https://sourceforge.net/p/irrlicht/feature-requests/138/
138 +
139 +RDEPEND="
140 + dev-libs/angelscript:=
141 + dev-libs/fribidi
142 + media-libs/freetype:2
143 + media-libs/glew:0=
144 + media-libs/libpng:0=
145 + media-libs/libvorbis
146 + media-libs/openal
147 + net-libs/enet:1.3=
148 + net-misc/curl
149 + sys-libs/zlib
150 + virtual/glu
151 + virtual/jpeg:0
152 + virtual/libintl
153 + virtual/opengl
154 + x11-libs/libX11
155 + x11-libs/libXxf86vm
156 + nettle? ( dev-libs/nettle:= )
157 + !nettle? (
158 + libressl? ( dev-libs/libressl:= )
159 + !libressl? ( >=dev-libs/openssl-1.0.1d:0= )
160 + )
161 + recorder? ( media-libs/libopenglrecorder )
162 + wiimote? ( net-wireless/bluez )"
163 +DEPEND="${RDEPEND}"
164 +BDEPEND="
165 + sys-devel/gettext
166 + virtual/pkgconfig"
167 +
168 +S="${WORKDIR}/${P}-src"
169 +
170 +PATCHES=(
171 + "${FILESDIR}"/${PN}-1.1-irrlicht-arch-support.patch
172 + "${FILESDIR}"/${PN}-0.9.3-irrlicht-system-libs.patch
173 + "${FILESDIR}"/${PN}-1.1-fix-buildsystem.patch
174 +)
175 +
176 +src_prepare() {
177 + cmake_src_prepare
178 +
179 + # remove bundled libraries, just to be sure
180 + rm -r lib/{angelscript,enet,glew,jpeglib,libpng,zlib} || die
181 +}
182 +
183 +src_configure() {
184 + local mycmakeargs=(
185 + -DUSE_SYSTEM_ANGELSCRIPT=ON
186 + -DUSE_SYSTEM_ENET=ON
187 + -DUSE_SYSTEM_GLEW=ON
188 + -DUSE_SYSTEM_SQUISH=OFF
189 + -DUSE_SYSTEM_WIIUSE=OFF
190 + -DUSE_IPV6=OFF # not supported by system enet
191 + -DOpenGL_GL_PREFERENCE=GLVND
192 + -DUSE_CRYPTO_OPENSSL=$(usex nettle no yes)
193 + -DENABLE_WAYLAND_DEVICE=OFF
194 + -DBUILD_RECORDER=$(usex recorder)
195 + -DUSE_WIIUSE=$(usex wiimote)
196 + -DSTK_INSTALL_BINARY_DIR=bin
197 + -DSTK_INSTALL_DATA_DIR=share/${PN}
198 + -DBUILD_SHARED_LIBS=OFF # build bundled libsquish as static library
199 + )
200 + cmake_src_configure
201 +}
202 +
203 +src_install() {
204 + cmake_src_install
205 + dodoc CHANGELOG.md
206 +
207 + doicon -s 64 "${DISTDIR}"/${PN}.png
208 +}