commit:     ddd0f32707c42ec68ba35206436f7d82e6043a0e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jul  1 08:59:32 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul  1 09:01:16 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddd0f327

games-simulation/corsix-th: add 0.66

Signed-off-by: Sam James <sam <AT> gentoo.org>

 games-simulation/corsix-th/Manifest                |  1 +
 games-simulation/corsix-th/corsix-th-0.66.ebuild   | 78 ++++++++++++++++++++++
 .../files/corsix-th-0.66-cmake_lua_detection.patch | 13 ++++
 3 files changed, 92 insertions(+)

diff --git a/games-simulation/corsix-th/Manifest 
b/games-simulation/corsix-th/Manifest
index 277c736b9d1e..962ac658fb26 100644
--- a/games-simulation/corsix-th/Manifest
+++ b/games-simulation/corsix-th/Manifest
@@ -1 +1,2 @@
 DIST corsix-th-0.65.1.tar.gz 4163922 BLAKE2B 
c1d9255e41521876716b377579642ed46b9fc54823816dc431f7b56ffa532af7091ae0b1e291bb1c4fb74165ca07786e0991a990c90bc3a13e234ba31c6fa706
 SHA512 
b7e964c22517b94cb1dafb0529368c87a2e58cf1f784062b9f2f72749ba69523b63d4f846ebd582c71cf5ca7e7c437a34717ca3877ad3737139ba2fd6a316577
+DIST corsix-th-0.66.tar.gz 4117046 BLAKE2B 
7bceb0d5893849ba906ccd9516ecd52f0a1c54f3a91bff932c0db053f66e71a3d38dfdb55979cb9bb2047c7338b3badbb32defa216a9867fb7166f4ca14bfa75
 SHA512 
a5cea74e7754132a7edbe188c63c08eb40ba8a8bbef6dc7441e41c5f46e96cacaa077d00bead4f8b3af3b8e07eadb4cfd08b1fb147e1397e2f9aa02642d29105

diff --git a/games-simulation/corsix-th/corsix-th-0.66.ebuild 
b/games-simulation/corsix-th/corsix-th-0.66.ebuild
new file mode 100644
index 000000000000..07f24a781502
--- /dev/null
+++ b/games-simulation/corsix-th/corsix-th-0.66.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} )
+
+inherit cmake lua-single xdg
+
+MY_PN="CorsixTH"
+
+DESCRIPTION="Open source clone of Theme Hospital"
+HOMEPAGE="https://corsixth.com";
+SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="doc +midi +sound +truetype +videos"
+
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+
+RDEPEND="${LUA_DEPS}
+       $(lua_gen_cond_dep '
+               >=dev-lua/luafilesystem-1.5[${LUA_USEDEP}]
+               >=dev-lua/lpeg-0.9[${LUA_USEDEP}]
+               >=dev-lua/luasocket-3.0_rc1-r4[${LUA_USEDEP}]
+       ')
+       media-libs/libsdl2[opengl,video]
+       sound? ( media-libs/sdl2-mixer[midi?] )
+       truetype? ( >=media-libs/freetype-2.5.3:2 )
+       videos? ( >=media-video/ffmpeg-2.2.3:0= )
+"
+
+DEPEND="${RDEPEND}"
+
+# Technically, build-time generation of documentation could use any version
+# of Lua (or to be precise: if in src_configure cmake has been told to use
+# LuaJIT documentation generation looks for LuaJIT, otherwise any
+# dev-lang/lua slot will do; see the first few lines of the bundled file
+# CMake/GenerateDoc.cmake for details) - but since dev-lang/lua conflicts
+# with the other slots of same, try to keep the deptree sane until we get
+# rid of unslotted Lua.
+BDEPEND="
+       virtual/pkgconfig
+       doc? (
+               app-doc/doxygen[dot]
+               ${LUA_DEPS}
+       )
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.66-cmake_lua_detection.patch
+)
+
+src_configure() {
+       local mycmakeargs=(
+               -DWITH_AUDIO=$(usex sound)
+               -DWITH_FREETYPE2=$(usex truetype)
+               -DWITH_MOVIES=$(usex videos)
+       )
+
+       cmake_src_configure
+}
+
+src_compile() {
+       cmake_src_compile
+       use doc && cmake_src_compile doc
+}
+
+src_install() {
+       cmake_src_install
+       dodoc changelog.txt CONTRIBUTING.md
+
+       docinto html
+       use doc && dodoc -r "${BUILD_DIR}"/doc/*
+}

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
new file mode 100644
index 000000000000..b201aa4877f8
--- /dev/null
+++ b/games-simulation/corsix-th/files/corsix-th-0.66-cmake_lua_detection.patch
@@ -0,0 +1,13 @@
+diff --git a/CorsixTH/CMakeLists.txt b/CorsixTH/CMakeLists.txt
+index 1544810..d9d3332 100644
+--- a/CorsixTH/CMakeLists.txt
++++ b/CorsixTH/CMakeLists.txt
+@@ -129,7 +129,7 @@ endif()
+ 
+ # Find Lua
+ if(MSVC AND USE_VCPKG_DEPS)
+-  find_package(Lua CONFIG REQUIRED)
++  find_package(Lua ${LUA_VERSION} EXACT REQUIRED)
+   target_link_libraries(CorsixTH_lib lua)
+   target_link_libraries(CorsixTH lua)
+ else()

Reply via email to