Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-simulation/corsix-th/files/, games-simulation/corsix-th/
Date: Fri, 01 Jul 2022 09:01:25
Message-Id: 1656666076.ddd0f32707c42ec68ba35206436f7d82e6043a0e.sam@gentoo
1 commit: ddd0f32707c42ec68ba35206436f7d82e6043a0e
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 1 08:59:32 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 1 09:01:16 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddd0f327
7
8 games-simulation/corsix-th: add 0.66
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 games-simulation/corsix-th/Manifest | 1 +
13 games-simulation/corsix-th/corsix-th-0.66.ebuild | 78 ++++++++++++++++++++++
14 .../files/corsix-th-0.66-cmake_lua_detection.patch | 13 ++++
15 3 files changed, 92 insertions(+)
16
17 diff --git a/games-simulation/corsix-th/Manifest b/games-simulation/corsix-th/Manifest
18 index 277c736b9d1e..962ac658fb26 100644
19 --- a/games-simulation/corsix-th/Manifest
20 +++ b/games-simulation/corsix-th/Manifest
21 @@ -1 +1,2 @@
22 DIST corsix-th-0.65.1.tar.gz 4163922 BLAKE2B c1d9255e41521876716b377579642ed46b9fc54823816dc431f7b56ffa532af7091ae0b1e291bb1c4fb74165ca07786e0991a990c90bc3a13e234ba31c6fa706 SHA512 b7e964c22517b94cb1dafb0529368c87a2e58cf1f784062b9f2f72749ba69523b63d4f846ebd582c71cf5ca7e7c437a34717ca3877ad3737139ba2fd6a316577
23 +DIST corsix-th-0.66.tar.gz 4117046 BLAKE2B 7bceb0d5893849ba906ccd9516ecd52f0a1c54f3a91bff932c0db053f66e71a3d38dfdb55979cb9bb2047c7338b3badbb32defa216a9867fb7166f4ca14bfa75 SHA512 a5cea74e7754132a7edbe188c63c08eb40ba8a8bbef6dc7441e41c5f46e96cacaa077d00bead4f8b3af3b8e07eadb4cfd08b1fb147e1397e2f9aa02642d29105
24
25 diff --git a/games-simulation/corsix-th/corsix-th-0.66.ebuild b/games-simulation/corsix-th/corsix-th-0.66.ebuild
26 new file mode 100644
27 index 000000000000..07f24a781502
28 --- /dev/null
29 +++ b/games-simulation/corsix-th/corsix-th-0.66.ebuild
30 @@ -0,0 +1,78 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +LUA_COMPAT=( lua5-{1..4} )
37 +
38 +inherit cmake lua-single xdg
39 +
40 +MY_PN="CorsixTH"
41 +
42 +DESCRIPTION="Open source clone of Theme Hospital"
43 +HOMEPAGE="https://corsixth.com"
44 +SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
45 +S="${WORKDIR}/${MY_PN}-${PV}"
46 +
47 +LICENSE="MIT"
48 +SLOT="0"
49 +KEYWORDS="~amd64 ~arm ~arm64 ~x86"
50 +IUSE="doc +midi +sound +truetype +videos"
51 +
52 +REQUIRED_USE="${LUA_REQUIRED_USE}"
53 +
54 +RDEPEND="${LUA_DEPS}
55 + $(lua_gen_cond_dep '
56 + >=dev-lua/luafilesystem-1.5[${LUA_USEDEP}]
57 + >=dev-lua/lpeg-0.9[${LUA_USEDEP}]
58 + >=dev-lua/luasocket-3.0_rc1-r4[${LUA_USEDEP}]
59 + ')
60 + media-libs/libsdl2[opengl,video]
61 + sound? ( media-libs/sdl2-mixer[midi?] )
62 + truetype? ( >=media-libs/freetype-2.5.3:2 )
63 + videos? ( >=media-video/ffmpeg-2.2.3:0= )
64 +"
65 +
66 +DEPEND="${RDEPEND}"
67 +
68 +# Technically, build-time generation of documentation could use any version
69 +# of Lua (or to be precise: if in src_configure cmake has been told to use
70 +# LuaJIT documentation generation looks for LuaJIT, otherwise any
71 +# dev-lang/lua slot will do; see the first few lines of the bundled file
72 +# CMake/GenerateDoc.cmake for details) - but since dev-lang/lua conflicts
73 +# with the other slots of same, try to keep the deptree sane until we get
74 +# rid of unslotted Lua.
75 +BDEPEND="
76 + virtual/pkgconfig
77 + doc? (
78 + app-doc/doxygen[dot]
79 + ${LUA_DEPS}
80 + )
81 +"
82 +
83 +PATCHES=(
84 + "${FILESDIR}"/${PN}-0.66-cmake_lua_detection.patch
85 +)
86 +
87 +src_configure() {
88 + local mycmakeargs=(
89 + -DWITH_AUDIO=$(usex sound)
90 + -DWITH_FREETYPE2=$(usex truetype)
91 + -DWITH_MOVIES=$(usex videos)
92 + )
93 +
94 + cmake_src_configure
95 +}
96 +
97 +src_compile() {
98 + cmake_src_compile
99 + use doc && cmake_src_compile doc
100 +}
101 +
102 +src_install() {
103 + cmake_src_install
104 + dodoc changelog.txt CONTRIBUTING.md
105 +
106 + docinto html
107 + use doc && dodoc -r "${BUILD_DIR}"/doc/*
108 +}
109
110 diff --git a/games-simulation/corsix-th/files/corsix-th-0.66-cmake_lua_detection.patch b/games-simulation/corsix-th/files/corsix-th-0.66-cmake_lua_detection.patch
111 new file mode 100644
112 index 000000000000..b201aa4877f8
113 --- /dev/null
114 +++ b/games-simulation/corsix-th/files/corsix-th-0.66-cmake_lua_detection.patch
115 @@ -0,0 +1,13 @@
116 +diff --git a/CorsixTH/CMakeLists.txt b/CorsixTH/CMakeLists.txt
117 +index 1544810..d9d3332 100644
118 +--- a/CorsixTH/CMakeLists.txt
119 ++++ b/CorsixTH/CMakeLists.txt
120 +@@ -129,7 +129,7 @@ endif()
121 +
122 + # Find Lua
123 + if(MSVC AND USE_VCPKG_DEPS)
124 +- find_package(Lua CONFIG REQUIRED)
125 ++ find_package(Lua ${LUA_VERSION} EXACT REQUIRED)
126 + target_link_libraries(CorsixTH_lib lua)
127 + target_link_libraries(CorsixTH lua)
128 + else()