diff options
Diffstat (limited to 'games-simulation')
-rw-r--r-- | games-simulation/Manifest.gz | bin | 3774 -> 3774 bytes | |||
-rw-r--r-- | games-simulation/corsix-th/Manifest | 3 | ||||
-rw-r--r-- | games-simulation/corsix-th/corsix-th-0.68.0.ebuild | 39 | ||||
-rw-r--r-- | games-simulation/corsix-th/corsix-th-9999.ebuild | 106 |
4 files changed, 138 insertions, 10 deletions
diff --git a/games-simulation/Manifest.gz b/games-simulation/Manifest.gz Binary files differindex d8a40f099053..c99185693e74 100644 --- a/games-simulation/Manifest.gz +++ b/games-simulation/Manifest.gz diff --git a/games-simulation/corsix-th/Manifest b/games-simulation/corsix-th/Manifest index f30ed773ba15..80a74a562c7c 100644 --- a/games-simulation/corsix-th/Manifest +++ b/games-simulation/corsix-th/Manifest @@ -2,5 +2,6 @@ AUX corsix-th-0.67-cmake_lua_detection.patch 965 BLAKE2B 3b1ec0a795793efd3a6765b DIST corsix-th-0.67.tar.gz 4127698 BLAKE2B 3b95b2439b779eab88a680fc3543fc4695cab7eac09ec2b20f892e95faaaf176c4d6c4862a9cd716958283922a7a6d8d1011346f1ef7c7a2f43ccca0c0b076c6 SHA512 b0e245a8aed9ad36e1040f88bbf8bf031bddf8dead0c59bc99a3c7f19cd6957c52e8185b2b737e78d57c73a58e460360428c81d5df1f6660aa17c7ec91ac62ba DIST corsix-th-0.68.0.tar.gz 4240659 BLAKE2B 9823e90927a63591384de49dde3cdcaced9fd1221931dacad0a5d115d0fcee2c9616b1a6785e91170c23a653f4bccbf6438fe352afdda9777078cdbfd84f0fda SHA512 087c20d79d249cff77e037561fb978290af75ff13c02e24c52699fd7b4e8a542e23806b7fde93cfff7d47bd98ee1eda4878cd0d4585e12775a2e6337655a5bbf EBUILD corsix-th-0.67.ebuild 1866 BLAKE2B 46f4986acbebb7186747f9ad25126b7cbc104aa150b06ab48a49c13b7ff1362f95aa8b1d51720929dad14cdb39eb1d2b3c96e2466862583d3cf08a73ca3415a9 SHA512 2fd0e83c7e78048857918876a1796df32b55283fa66c0e324a2c5932a9633f1de818e5e276974ff7e0461d56133e8757beaec8d6da2759cb712b12ca715c95aa -EBUILD corsix-th-0.68.0.ebuild 1892 BLAKE2B cc87e2022d5fc924721680997d00ea58a57c6ac9580a07c5531ebb79ea247c5754606a48055d550ffe357a66a690cbe651d7fd598d08a2661b0aaddff940e7df SHA512 18f2b09cc38018c2d736757afb9dfae9632fb7f3a926a1de86ea03a6cd8e7f602e615ce46127984189f3b21cc687d81e9684e457a4a0006b8e4f342bcab8ec3b +EBUILD corsix-th-0.68.0.ebuild 2394 BLAKE2B 7bebc89754b95e99b816bbf9311213a0906cbdd76eb8d5459c2390895e979ae8f10d0cac1c974e5a3acf25d106346a2cb55bf0fcc35f428366f5842570f155af SHA512 2fe1e5bb707e2a19ac7527db6968c77a38c060cae23cfce1d69d8b7dd80e9f196850dc5296897a50014b8f0042adb1c3ea0eb3a1a7fa1a1d1e4a5d6e8b047bd4 +EBUILD corsix-th-9999.ebuild 2394 BLAKE2B 7bebc89754b95e99b816bbf9311213a0906cbdd76eb8d5459c2390895e979ae8f10d0cac1c974e5a3acf25d106346a2cb55bf0fcc35f428366f5842570f155af SHA512 2fe1e5bb707e2a19ac7527db6968c77a38c060cae23cfce1d69d8b7dd80e9f196850dc5296897a50014b8f0042adb1c3ea0eb3a1a7fa1a1d1e4a5d6e8b047bd4 MISC metadata.xml 780 BLAKE2B 604dff99fbb107226d6edf80a3648ebb5b7d5793745d4275ed106d8e313cbb2319510490279071807bc5bb293458c96a4f5f7a5e6442e397f2331d62f518d2ae SHA512 38586db6e150a9f87988c32e7e69afef5f079e1b49803452b4655a407bdc810b9d829be2406c278f81e315c11033d43e51afabef1a91c2c84638b6afab706c92 diff --git a/games-simulation/corsix-th/corsix-th-0.68.0.ebuild b/games-simulation/corsix-th/corsix-th-0.68.0.ebuild index 32f0eab26d9f..75849743f032 100644 --- a/games-simulation/corsix-th/corsix-th-0.68.0.ebuild +++ b/games-simulation/corsix-th/corsix-th-0.68.0.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 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 +inherit cmake edo lua-single xdg MY_PN="CorsixTH" MY_PV="${PV/_/-}" @@ -13,16 +13,22 @@ 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}" +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}" + inherit git-r3 +else + SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${MY_P}" + + if [[ ${PV} != *_beta* && ${PV} != *_rc* ]] ; then + KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" + fi +fi LICENSE="MIT" SLOT="0" -if [[ ${PV} != *_beta* && ${PV} != *_rc* ]] ; then - KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" -fi -IUSE="doc +midi +sound tools +truetype +videos" - +IUSE="doc +midi +sound test tools +truetype +videos" +RESTRICT="!test? ( test )" REQUIRED_USE="${LUA_REQUIRED_USE}" RDEPEND="${LUA_DEPS} @@ -52,16 +58,22 @@ BDEPEND=" >=dev-lua/lpeg-0.9[${LUA_USEDEP}] ') ) + test? ( + >=dev-cpp/catch-3:0 + ) " PATCHES=( "${FILESDIR}"/${PN}-0.67-cmake_lua_detection.patch ) +lua_enable_tests busted + src_configure() { local mycmakeargs=( -DLUA_VERSION=$(lua_get_version) -DBUILD_TOOLS=$(usex tools) + -DENABLE_UNIT_TESTS=$(usex test) -DWITH_AUDIO=$(usex sound) -DWITH_FREETYPE2=$(usex truetype) -DWITH_MOVIES=$(usex videos) @@ -76,6 +88,15 @@ src_compile() { use doc && cmake_src_compile doc } +src_test() { + # https://github.com/CorsixTH/CorsixTH/blob/master/.github/workflows/Linux.yml#L88 + # C++ tests + BUILD_DIR="${BUILD_DIR}"/CorsixTH cmake_src_test + + # Lua tests + edo busted --lua="${ELUA}" --output="TAP" --verbose --directory=CorsixTH/Luatest +} + src_install() { cmake_src_install dodoc changelog.txt CONTRIBUTING.md diff --git a/games-simulation/corsix-th/corsix-th-9999.ebuild b/games-simulation/corsix-th/corsix-th-9999.ebuild new file mode 100644 index 000000000000..75849743f032 --- /dev/null +++ b/games-simulation/corsix-th/corsix-th-9999.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1..4} ) + +inherit cmake edo lua-single xdg + +MY_PN="CorsixTH" +MY_PV="${PV/_/-}" +MY_P="${MY_PN}-${MY_PV}" + +DESCRIPTION="Open source clone of Theme Hospital" +HOMEPAGE="https://corsixth.com" +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}" + inherit git-r3 +else + SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${MY_P}" + + if [[ ${PV} != *_beta* && ${PV} != *_rc* ]] ; then + KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" + fi +fi + +LICENSE="MIT" +SLOT="0" +IUSE="doc +midi +sound test tools +truetype +videos" +RESTRICT="!test? ( test )" +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}] + ') + ) + test? ( + >=dev-cpp/catch-3:0 + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-0.67-cmake_lua_detection.patch +) + +lua_enable_tests busted + +src_configure() { + local mycmakeargs=( + -DLUA_VERSION=$(lua_get_version) + -DBUILD_TOOLS=$(usex tools) + -DENABLE_UNIT_TESTS=$(usex test) + -DWITH_AUDIO=$(usex sound) + -DWITH_FREETYPE2=$(usex truetype) + -DWITH_MOVIES=$(usex videos) + -DWITH_UPDATE_CHECK=OFF + ) + + cmake_src_configure +} + +src_compile() { + cmake_src_compile + use doc && cmake_src_compile doc +} + +src_test() { + # https://github.com/CorsixTH/CorsixTH/blob/master/.github/workflows/Linux.yml#L88 + # C++ tests + BUILD_DIR="${BUILD_DIR}"/CorsixTH cmake_src_test + + # Lua tests + edo busted --lua="${ELUA}" --output="TAP" --verbose --directory=CorsixTH/Luatest +} + +src_install() { + cmake_src_install + dodoc changelog.txt CONTRIBUTING.md + + docinto html + use doc && dodoc -r "${BUILD_DIR}"/doc/* +} |