Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-sports/xmoto/, profiles/, games-sports/xmoto/files/
Date: Tue, 01 Dec 2020 13:23:21
Message-Id: 1606828984.bdf6beaf2fba3f2fecadbbd2efe6bff73271cc1c.marecki@gentoo
1 commit: bdf6beaf2fba3f2fecadbbd2efe6bff73271cc1c
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 1 11:19:14 2020 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 1 13:23:04 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bdf6beaf
7
8 games-sports/xmoto: migrate to lua-single.eclass
9
10 Closes: https://bugs.gentoo.org/752705
11 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
12
13 .../files/xmoto-0.6.1_cmake_lua_version.patch | 13 ++++
14 games-sports/xmoto/xmoto-0.6.1-r100.ebuild | 72 ++++++++++++++++++++++
15 profiles/package.mask | 1 +
16 3 files changed, 86 insertions(+)
17
18 diff --git a/games-sports/xmoto/files/xmoto-0.6.1_cmake_lua_version.patch b/games-sports/xmoto/files/xmoto-0.6.1_cmake_lua_version.patch
19 new file mode 100644
20 index 00000000000..53a29161a14
21 --- /dev/null
22 +++ b/games-sports/xmoto/files/xmoto-0.6.1_cmake_lua_version.patch
23 @@ -0,0 +1,13 @@
24 +--- a/src/CMakeLists.txt
25 ++++ b/src/CMakeLists.txt
26 +@@ -40,8 +40,8 @@
27 + endif()
28 + find_package(PNG REQUIRED)
29 +
30 +-find_package(Lua)
31 +-set(USE_SYSTEM_Lua $<AND:$<BOOL:${PREFER_SYSTEM_Lua}>,$<BOOL:${LUA51_FOUND}>,$<NOT:$<BOOL:${WIN32}>>>)
32 ++find_package(Lua ${LUA_VERSION} EXACT REQUIRED)
33 ++set(USE_SYSTEM_Lua $<AND:$<BOOL:${PREFER_SYSTEM_Lua}>,$<BOOL:${LUA_FOUND}>,$<NOT:$<BOOL:${WIN32}>>>)
34 + if (NOT LUA_VERSION_STRING VERSION_LESS 5.2 AND LUA_VERSION_STRING VERSION_LESS 5.3)
35 + add_definitions("-DLUA_COMPAT_ALL")
36 + elseif (LUA_VERSION_STRING VERSION_GREATER_EQUAL "5.3")
37
38 diff --git a/games-sports/xmoto/xmoto-0.6.1-r100.ebuild b/games-sports/xmoto/xmoto-0.6.1-r100.ebuild
39 new file mode 100644
40 index 00000000000..aa6635754fc
41 --- /dev/null
42 +++ b/games-sports/xmoto/xmoto-0.6.1-r100.ebuild
43 @@ -0,0 +1,72 @@
44 +# Copyright 1999-2020 Gentoo Authors
45 +# Distributed under the terms of the GNU General Public License v2
46 +
47 +EAPI=7
48 +
49 +LUA_COMPAT=( lua5-{1..3} )
50 +
51 +inherit cmake lua-single
52 +
53 +DESCRIPTION="A challenging 2D motocross platform game, where physics play an important role"
54 +HOMEPAGE="https://xmoto.tuxfamily.org"
55 +SRC_URI="https://github.com/xmoto/xmoto/archive/${PV}.tar.gz -> ${P}.tar.gz"
56 +
57 +LICENSE="GPL-2+"
58 +SLOT="0"
59 +KEYWORDS="~amd64 ~x86"
60 +IUSE="double-precision +nls"
61 +
62 +REQUIRED_USE="${LUA_REQUIRED_USE}"
63 +
64 +RDEPEND="app-arch/bzip2
65 + dev-db/sqlite:3
66 + dev-games/ode[double-precision=]
67 + ${LUA_DEPS}
68 + dev-libs/libxdg-basedir
69 + dev-libs/libxml2
70 + media-fonts/dejavu
71 + media-libs/libpng:0=
72 + media-libs/libsdl[joystick,opengl]
73 + media-libs/sdl-mixer[vorbis]
74 + media-libs/sdl-net
75 + media-libs/sdl-ttf
76 + net-misc/curl
77 + sys-libs/zlib:=
78 + virtual/jpeg:0
79 + virtual/glu
80 + virtual/opengl
81 + nls? ( virtual/libintl )"
82 +DEPEND="${RDEPEND}"
83 +BDEPEND="app-arch/xz-utils
84 + nls? ( sys-devel/gettext )"
85 +
86 +PATCHES=(
87 + "${FILESDIR}/${P}_lua_deprecated.patch"
88 + "${FILESDIR}/${PN}-0.6.1_cmake_lua_version.patch"
89 +)
90 +
91 +src_prepare() {
92 + sed -e "/^Icon/s/.xpm//" -i extra/xmoto.desktop || die
93 + sed -e "/add_subdirectory.*\(bzip2\|libccd\|lua\|ode\|xdgbasedir\)/d" -i src/CMakeLists.txt || die
94 + rm -rf vendor/{bzip2,lua,ode,xdgbasedir} || die
95 +
96 + cmake_src_prepare
97 +}
98 +
99 +src_configure() {
100 + local mycmakeargs=(
101 + -DUSE_GETTEXT=$(usex nls)
102 + -DOpenGL_GL_PREFERENCE=GLVND
103 + -DLUA_VERSION=$(lua_get_version)
104 + )
105 +
106 + cmake_src_configure
107 +}
108 +
109 +src_install() {
110 + cmake_src_install
111 +
112 + rm -f "${ED}/usr/share/xmoto"/Textures/Fonts/DejaVuSans{Mono,}.ttf || die
113 + dosym ../../../fonts/dejavu/DejaVuSans.ttf /usr/share/xmoto/Textures/Fonts/DejaVuSans.ttf
114 + dosym ../../../fonts/dejavu/DejaVuSansMono.ttf /usr/share/xmoto/Textures/Fonts/DejaVuSansMono.ttf
115 +}
116
117 diff --git a/profiles/package.mask b/profiles/package.mask
118 index 04c5357b1fe..64b96923cb5 100644
119 --- a/profiles/package.mask
120 +++ b/profiles/package.mask
121 @@ -582,6 +582,7 @@ dev-lua/luacrypto
122 >=games-rpg/kqlives-0.99-r100
123 >=games-rpg/sumwars-0.5.8-r100
124 >=games-simulation/corsix-th-0.64-r100
125 +>=games-sports/xmoto-0.6.1-r100
126 >=mail-filter/imapfilter-2.6.16-r100
127 >=media-gfx/geeqie-1.5.1-r1
128 >=media-sound/aqualung-1.1-r100