commit: af65308a9698959de46f96fbc394edc809d11064 Author: Ian Jordan <immoloism <AT> gmail <DOT> com> AuthorDate: Fri Dec 27 04:50:49 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Dec 27 06:59:14 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af65308a
games-simulation/corsix-th: add 0.68 Signed-off-by: Ian Jordan <immoloism <AT> gmail.com> Closes: https://github.com/gentoo/gentoo/pull/39858 Signed-off-by: Sam James <sam <AT> gentoo.org> games-simulation/corsix-th/Manifest | 1 + games-simulation/corsix-th/corsix-th-0.68.ebuild | 84 ++++++++++++++++++++++++ 2 files changed, 85 insertions(+) diff --git a/games-simulation/corsix-th/Manifest b/games-simulation/corsix-th/Manifest index d6025c582c40..1f59d00c8814 100644 --- a/games-simulation/corsix-th/Manifest +++ b/games-simulation/corsix-th/Manifest @@ -1 +1,2 @@ DIST corsix-th-0.67.tar.gz 4127698 BLAKE2B 3b95b2439b779eab88a680fc3543fc4695cab7eac09ec2b20f892e95faaaf176c4d6c4862a9cd716958283922a7a6d8d1011346f1ef7c7a2f43ccca0c0b076c6 SHA512 b0e245a8aed9ad36e1040f88bbf8bf031bddf8dead0c59bc99a3c7f19cd6957c52e8185b2b737e78d57c73a58e460360428c81d5df1f6660aa17c7ec91ac62ba +DIST corsix-th-0.68.tar.gz 4240659 BLAKE2B 9823e90927a63591384de49dde3cdcaced9fd1221931dacad0a5d115d0fcee2c9616b1a6785e91170c23a653f4bccbf6438fe352afdda9777078cdbfd84f0fda SHA512 087c20d79d249cff77e037561fb978290af75ff13c02e24c52699fd7b4e8a542e23806b7fde93cfff7d47bd98ee1eda4878cd0d4585e12775a2e6337655a5bbf diff --git a/games-simulation/corsix-th/corsix-th-0.68.ebuild b/games-simulation/corsix-th/corsix-th-0.68.ebuild new file mode 100644 index 000000000000..7029e083c5dd --- /dev/null +++ b/games-simulation/corsix-th/corsix-th-0.68.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2024 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" +MY_PV="${PV/_/-}.0" +MY_P="${MY_PN}-${MY_PV}" + +DESCRIPTION="Open source clone of Theme Hospital" +HOMEPAGE="https://corsixth.com" +SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="MIT" +SLOT="0" +if [[ ${PV} != *_beta* && ${PV} != *_rc* ]] ; then + KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" +fi +IUSE="doc +midi +sound tools +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}" + +# Although the docs could potentially be built with nearly any Lua version, +# we need to ensure the necessary Lua modules are installed, so pin to the +# same single version as runtime. +BDEPEND=" + virtual/pkgconfig + doc? ( + app-text/doxygen[dot] + ${LUA_DEPS} + $(lua_gen_cond_dep ' + >=dev-lua/luafilesystem-1.5[${LUA_USEDEP}] + >=dev-lua/lpeg-0.9[${LUA_USEDEP}] + ') + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-0.67-cmake_lua_detection.patch +) + +src_configure() { + local mycmakeargs=( + -DLUA_VERSION=$(lua_get_version) + -DBUILD_TOOLS=$(usex tools) + -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/* +}