diff options
Diffstat (limited to 'games-simulation')
14 files changed, 277 insertions, 57 deletions
diff --git a/games-simulation/corsix-th/Manifest b/games-simulation/corsix-th/Manifest index d6025c582c40..dda33dc681cd 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.0.tar.gz 4240659 BLAKE2B 9823e90927a63591384de49dde3cdcaced9fd1221931dacad0a5d115d0fcee2c9616b1a6785e91170c23a653f4bccbf6438fe352afdda9777078cdbfd84f0fda SHA512 087c20d79d249cff77e037561fb978290af75ff13c02e24c52699fd7b4e8a542e23806b7fde93cfff7d47bd98ee1eda4878cd0d4585e12775a2e6337655a5bbf diff --git a/games-simulation/corsix-th/corsix-th-0.68.0.ebuild b/games-simulation/corsix-th/corsix-th-0.68.0.ebuild new file mode 100644 index 000000000000..32f0eab26d9f --- /dev/null +++ b/games-simulation/corsix-th/corsix-th-0.68.0.ebuild @@ -0,0 +1,85 @@ +# 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/_/-}" +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) + -DWITH_UPDATE_CHECK=OFF + ) + + 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/crashtest/crashtest-1.1-r2.ebuild b/games-simulation/crashtest/crashtest-1.1-r3.ebuild index 4f9ff6d8d1b2..9157646d6f34 100644 --- a/games-simulation/crashtest/crashtest-1.1-r2.ebuild +++ b/games-simulation/crashtest/crashtest-1.1-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -20,7 +20,7 @@ RDEPEND=" media-libs/plib virtual/glu virtual/opengl - x11-libs/fltk:1[opengl]" + x11-libs/fltk:1=[opengl]" DEPEND="${RDEPEND}" PATCHES=( diff --git a/games-simulation/openrct2/Manifest b/games-simulation/openrct2/Manifest index b7d31b84610f..945efd9bf68c 100644 --- a/games-simulation/openrct2/Manifest +++ b/games-simulation/openrct2/Manifest @@ -1,13 +1,10 @@ -DIST openrct2-0.4.14.tar.gz 21917635 BLAKE2B 0fc5a105a416a1a9634ca90542c5234e19da534f07554c1f278b75a1209158d3783cfd69fad1e492140788f9cf3716f5e943391c7787015ae038ccaf7da8765d SHA512 11eaec800aee9667d1a9d5f255f556572221b5f2190740d16c847e23bb1feb75fcb3876c4078ca069517eda72a27fb22f5c6fb91458bdf66dfe1f8ab51bd4e07 -DIST openrct2-0.4.15.tar.gz 22045224 BLAKE2B dd0faca7bc4a8d2b5b7b82a087520c6b2a2351481b04c7a2f69e65546428772757df7fd241e8c42adf75eed5f2f94e50d57bbffa6a96e6b50268c1d6fd93045e SHA512 c9dd483993e53addb40097bab87e040bca4f87b8708118ccf4f9aa91a645ee9805f3ceed0cedc4f08b2ea7eb172a3ceac63a1df5f123b40a44cca548b86269af DIST openrct2-0.4.16.tar.gz 22266650 BLAKE2B 19efa7f08d2f1b82dc3643d6627a1e4758dd679c44d6f49992969b1e75dd5edfe2ab4fce7652dfebcc2e1574a6a404fa2abbf4dc281fb36a26c25ec40024ccc5 SHA512 523ecb6c1358b7d2ee51e862b96fd72215ba5151b888af2878baec099492e097c3d7a99525041e803c5f647eb97c9082751ccf97a468fb7e071d050a9c5fa4c7 +DIST openrct2-0.4.17.tar.gz 22624136 BLAKE2B 6b38ec8fa4f6bdedc047c8e70792b17242b68f92f4a084bf1c3ee93a3990d47750c5867339c497ddb2ee3686be0b2fb92b464373ae2304d719ec35d573e948cc SHA512 b376304693209039845b439a594c5d403f5696854f086a0340c328bdae7e2fb0e54c4cb1af599d59cc128985e9f281b073bea22017b0d5cfcccfecfacfc5ddcd +DIST openrct2-0.4.18.tar.gz 22955683 BLAKE2B 5e19ebbf021753e402bb00bf33f79eda254bb2b0c4d22113ab7cdc802cbee2f4a37a5142b238b5eeb0a3d6fce919f60dc0ab2b9c73c628cf273137aa88902878 SHA512 236fa52b9136e6ac329c9c7e4bf415a6c50588e8c30d8973b9da44ab83da3a75177092f8d7492535ea9f82ffa710d8484245c662531d7e3230e2daf69d56c4a2 DIST openrct2-objects-1.4.10.zip 7495378 BLAKE2B d59f17a419abc935c781075d526ba5e8d6c90d5a524fd314a8c9da3cbd211f87340d615f3a9fe292e2b28cc260734ed344cf2da1e8c76e7310076c2ad163adb0 SHA512 a137a81f6c627ac5d7222c34009d92a24e65bea9b8e0108e59fdf393f1000caee99b9dc9947f824241c055796112d11609b1bcae50ddc33f419723a06b708f64 -DIST openrct2-objects-1.4.7.zip 5411765 BLAKE2B 0ac59fbee6d22f832f52f03ad6e4e15bd60ba1955fc7a8f9deaf8fd114483cfdf20cd8ced42494716bf7a1d8dbeb7969cb1fa3852ae11e9afb0819c90ae6d389 SHA512 54f6872502333dc4063d0eca6d9e2cb6f7e6c7593be014a3c17df3b9a6dfa354b50c995953fb56973db8cef3733eedb3b64e680fe136724328156c1c590d9ae7 -DIST openrct2-objects-1.4.8.zip 5415469 BLAKE2B 685b2c0493fb367c0eb2087b486cc76b3ff86d6a6400812f13041b2298d63f881760aa6fe538ceea775b7a72b8997a1fbd2611152436057b9d749105e539cae1 SHA512 b25fbb751a8b0ee63aa76fc8559192bc32531019c4c03a27c638cf35be54b5f491c45372b1db94187b6865d0adbf0e29248d43d6b26fde7b829a7138d01d09c6 -DIST openrct2-openmusic-1.5.zip 40548101 BLAKE2B 11cf46a54716097038e134ae11aeb23823097ca96189dabeb0e43d7050d5e776aa309c38de247da15b1eec7ed6be6299d5673a92df1323cc3a4a5bbc4f48d567 SHA512 55d4afb854eaa5a69c42e7f0b26669c8fb58b2eba3e2892c655e76d8fab82e2734f39981d7f5ac69e11dc87d06c89795da2468feac3bc53ef6cfdd992e3924f3 +DIST openrct2-objects-1.4.12.zip 7599482 BLAKE2B 896c54e873a7cc143335e8b73dd3115def8fb5205de0028120dee63589db1644b9ba37e390d15cea0cac31014682ac8901e88b519684a03c686b93a702ada579 SHA512 b37984ec5578f4d7f9a43359ade30a621a22474ddbf46614de98e505ed16a62e8621d8c58a6470d66d0e0876db03a4181b259f7fc9468b883422d094c4a8af91 DIST openrct2-openmusic-1.6.zip 42921141 BLAKE2B fff3ac6d944ed2021645c064de3daf88c11930bf8817e9c8620cfa73f2da076745dd5b5da36b616c8ee7b2ee0272228a88e264bf1ce948509dc90d77a7a87d5d SHA512 88e3242da45f372e06de04e58d03fc3d256b1485467a25a3f8878c03eb2570eea2c787a9e0416c1b040c15886723ced1379d762f941a23e4bd2fce81416123b0 DIST openrct2-opensound-1.0.5.zip 4012384 BLAKE2B 7ddb1437d7e68373f05bd60d77f03971b8a1d6f4280d008d5bf3e86b5d2cb46001a04edddeeb04a06a37801c3afbd35926beb54fe5a72c7fa88b50d0a0b18535 SHA512 fc46ffb3f6243b3d783a280481ce373a8ddc8cf1fd28bfeceecf6223b72b38f1d49d0c95eea3376308a61a77c50c7a06252b6d72248cfecc493b63b65bd6512a -DIST openrct2-replays-0.0.79.zip 1934633 BLAKE2B 4b5c4d96be91055ceff8f5f5f1a894cc2544659983e61ac2f42d655229357b6a368553c1ee45d147cb360c8d54bb0ca78b61a9716efa8d1d7f37cd7c5ba50fa7 SHA512 04acde4d60c8fa949b298dd15e38fe0421659357fa214dffb0577574e0b0ac218a01ce998f4e12e3ab13a88fbbba8096392462fda29c68a6215bc0875aaae9b2 -DIST openrct2-replays-0.0.80.zip 1830711 BLAKE2B b21d658e9e3423fc4cce4a688205660530b576243cb4fefdcbeaa6312e5979052182a51ed9418339c6fcacb6e4c78dfdb617db1934ca51950ea4f89927220f8e SHA512 a6019773e0178d3fa6968f04a5880c27e92cdd270355ddb5b9616b7a9f793a0cb09c246a82d3dd2f6bbf9f2f354a903a9bc4344fafb68532d695513ace7c6922 DIST openrct2-replays-0.0.83.zip 1829681 BLAKE2B fd3a6ff457d45b0b429b667173c95753bdbf9ecd136a7ce16b516c701d88e436e1796c32d1aa5dc7837dd35ea8db5a89a2c42a99dcd5744b826ab32f98030f98 SHA512 43877cd8452049d4519f0d3fd49d9234195a3d3e38af9a880d43509f0a578e1fef0d428673fea1a9a8307d9917be3e3c4ca9d9e466584b6abd5193a366d5f569 +DIST openrct2-replays-0.0.84.zip 1825660 BLAKE2B 7f28f3d5e07e2aa8dc966dafe3fc3ad7e76961c84558d3cdd7fd494ba63dc2f4dfc0a79154d196b9b9139dfa304e745b03546e4087b67538efcf6dc428c69bad SHA512 5ce969de28691a285f2ef2ef0c3b3bc7b094f072be36a89095aa4104bda690c0fe2710db204ce7b95bb891d9a95b8b8d20326236d1386538cfcdb8d36d4c011b DIST openrct2-title-sequences-0.4.14.zip 7791573 BLAKE2B e0bc547b26ba0032c54be0661a1e26bf63a73e3bf0183e3e3d972cbff80e95dd4fa2584852f0da6a597849d822b6d89c3154cbe5ecc99b7eb456560810ed8d17 SHA512 27a1f5e87063ed9baf5faeca15a914e1a57584da6ab0d06d2b9e1f08e801c53f2ea9826381bf5e3dd8e220ff2da601a98841a08f9bcad1e0280b04746512bfb1 diff --git a/games-simulation/openrct2/files/openrct2-0.4.0-include-additional-paths.patch b/games-simulation/openrct2/files/openrct2-0.4.0-include-additional-paths.patch deleted file mode 100644 index b90d48c63c33..000000000000 --- a/games-simulation/openrct2/files/openrct2-0.4.0-include-additional-paths.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/src/openrct2/config/Config.cpp -+++ b/src/openrct2/config/Config.cpp -@@ -638,6 +638,7 @@ - log_verbose("config_find_rct1_path(...)"); - - static constexpr u8string_view searchLocations[] = { -+ R"(/usr/share/openrct2/rct1_data)", - R"(C:\Program Files\Steam\steamapps\common\Rollercoaster Tycoon Deluxe)", - R"(C:\Program Files (x86)\Steam\steamapps\common\Rollercoaster Tycoon Deluxe)", - R"(C:\GOG Games\RollerCoaster Tycoon Deluxe)", -@@ -683,6 +684,7 @@ - log_verbose("config_find_rct2_path(...)"); - - static constexpr u8string_view searchLocations[] = { -+ R"(/usr/share/openrct2/rct2_data)", - R"(C:\Program Files\Steam\steamapps\common\Rollercoaster Tycoon 2)", - R"(C:\Program Files (x86)\Steam\steamapps\common\Rollercoaster Tycoon 2)", - R"(C:\GOG Games\RollerCoaster Tycoon 2 Triple Thrill Pack)", diff --git a/games-simulation/openrct2/files/openrct2-0.4.15-include-additional-paths.patch b/games-simulation/openrct2/files/openrct2-0.4.15-include-additional-paths.patch deleted file mode 100644 index 16d306260e67..000000000000 --- a/games-simulation/openrct2/files/openrct2-0.4.15-include-additional-paths.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/src/openrct2/platform/Platform.Linux.cpp -+++ b/src/openrct2/platform/Platform.Linux.cpp -@@ -335,12 +335,12 @@ - - std::vector<std::string_view> GetSearchablePathsRCT1() - { -- return {}; -+ return { "/usr/share/openrct2/rct1_data" }; - } - - std::vector<std::string_view> GetSearchablePathsRCT2() - { -- return {}; -+ return { "/usr/share/openrct2/rct2_data" }; - } - - # ifndef NO_TTF diff --git a/games-simulation/openrct2/files/openrct2-0.4.16-tileelement.patch b/games-simulation/openrct2/files/openrct2-0.4.16-tileelement.patch new file mode 100644 index 000000000000..431a0660524d --- /dev/null +++ b/games-simulation/openrct2/files/openrct2-0.4.16-tileelement.patch @@ -0,0 +1,10 @@ +--- OpenRCT2-0.4.16/src/openrct2/ride/RideRatings.cpp.orig 2024-11-10 09:48:55.356964603 +0100 ++++ OpenRCT2-0.4.16/src/openrct2/ride/RideRatings.cpp 2024-11-10 09:50:34.049333283 +0100 +@@ -23,6 +23,7 @@ + #include "../world/tile_element/PathElement.h" + #include "../world/tile_element/SurfaceElement.h" ++#include "../world/tile_element/TileElement.h" + #include "../world/tile_element/TrackElement.h" + #include "Ride.h" + #include "RideData.h" + #include "Station.h" diff --git a/games-simulation/openrct2/openrct2-0.4.16.ebuild b/games-simulation/openrct2/openrct2-0.4.16.ebuild index c15629877f5a..ddfec5874f74 100644 --- a/games-simulation/openrct2/openrct2-0.4.16.ebuild +++ b/games-simulation/openrct2/openrct2-0.4.16.ebuild @@ -31,7 +31,7 @@ S="${WORKDIR}/${MY_PN}-${PV}" LICENSE="GPL-3" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" +KEYWORDS="amd64 ~arm arm64 ppc64 x86" IUSE="dedicated +flac +opengl scripting test +truetype +vorbis" RESTRICT="!test? ( test )" @@ -79,6 +79,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}/${PN}-0.4.1-gtest-1.10.patch" "${FILESDIR}/${PN}-0.4.16-include-additional-paths.patch" + "${FILESDIR}/${PN}-0.4.16-tileelement.patch" ) src_unpack() { diff --git a/games-simulation/openrct2/openrct2-0.4.14.ebuild b/games-simulation/openrct2/openrct2-0.4.17.ebuild index 267f84e957ac..936003861248 100644 --- a/games-simulation/openrct2/openrct2-0.4.14.ebuild +++ b/games-simulation/openrct2/openrct2-0.4.17.ebuild @@ -11,9 +11,9 @@ MY_PN_OBJ="objects" MY_PN_RPL="replays" MY_PN_SFX="opensound" MY_PN_TS="title-sequences" -MY_PV_MSX="1.5" -MY_PV_OBJ="1.4.7" -MY_PV_RPL="0.0.79" +MY_PV_MSX="1.6" +MY_PV_OBJ="1.4.10" +MY_PV_RPL="0.0.84" MY_PV_SFX="1.0.5" MY_PV_TS="0.4.14" @@ -31,7 +31,7 @@ S="${WORKDIR}/${MY_PN}-${PV}" LICENSE="GPL-3" SLOT="0" -KEYWORDS="amd64 ~arm arm64 ppc64 x86" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 x86" IUSE="dedicated +flac +opengl scripting test +truetype +vorbis" RESTRICT="!test? ( test )" @@ -77,8 +77,9 @@ BDEPEND=" " PATCHES=( - "${FILESDIR}/${PN}-0.4.0-include-additional-paths.patch" "${FILESDIR}/${PN}-0.4.1-gtest-1.10.patch" + "${FILESDIR}/${PN}-0.4.16-include-additional-paths.patch" + "${FILESDIR}/${PN}-0.4.16-tileelement.patch" ) src_unpack() { diff --git a/games-simulation/openrct2/openrct2-0.4.15.ebuild b/games-simulation/openrct2/openrct2-0.4.18.ebuild index efb5b081135e..ec8cfa5ba64b 100644 --- a/games-simulation/openrct2/openrct2-0.4.15.ebuild +++ b/games-simulation/openrct2/openrct2-0.4.18.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -12,8 +12,8 @@ MY_PN_RPL="replays" MY_PN_SFX="opensound" MY_PN_TS="title-sequences" MY_PV_MSX="1.6" -MY_PV_OBJ="1.4.8" -MY_PV_RPL="0.0.80" +MY_PV_OBJ="1.4.12" +MY_PV_RPL="0.0.84" MY_PV_SFX="1.0.5" MY_PV_TS="0.4.14" @@ -78,7 +78,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}/${PN}-0.4.1-gtest-1.10.patch" - "${FILESDIR}/${PN}-0.4.15-include-additional-paths.patch" + "${FILESDIR}/${PN}-0.4.16-include-additional-paths.patch" ) src_unpack() { diff --git a/games-simulation/openrct2/openrct2-9999.ebuild b/games-simulation/openrct2/openrct2-9999.ebuild index 17e2738c612e..1e3b549e339b 100644 --- a/games-simulation/openrct2/openrct2-9999.ebuild +++ b/games-simulation/openrct2/openrct2-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -15,8 +15,8 @@ MY_PN_RPL="replays" MY_PN_SFX="opensound" MY_PN_TS="title-sequences" MY_PV_MSX="1.6" -MY_PV_OBJ="1.4.10" -MY_PV_RPL="0.0.83" +MY_PV_OBJ="1.4.12" +MY_PV_RPL="0.0.84" MY_PV_SFX="1.0.5" MY_PV_TS="0.4.14" diff --git a/games-simulation/pmars-sdl/files/pmars-sdl-0.9.2e-c23.patch b/games-simulation/pmars-sdl/files/pmars-sdl-0.9.2e-c23.patch new file mode 100644 index 000000000000..b9a61a24a452 --- /dev/null +++ b/games-simulation/pmars-sdl/files/pmars-sdl-0.9.2e-c23.patch @@ -0,0 +1,11 @@ +sort_by_score appeared twice. +--- a/src/global.h ++++ b/src/global.h +@@ -411,7 +411,6 @@ extern int score(int warnum); + extern void sort_by_score(int *idxV, int *scrV); + extern int deaths(int warnum); + extern void results(FILE * outp); +-extern void sort_by_score(); + extern void Exit(int code); + extern void reset_regs(void); + extern void set_reg(char regChr, long val); diff --git a/games-simulation/pmars-sdl/files/pmars-sdl-0.9.2e-ncurses-opaque.patch b/games-simulation/pmars-sdl/files/pmars-sdl-0.9.2e-ncurses-opaque.patch new file mode 100644 index 000000000000..543ece1d6ce5 --- /dev/null +++ b/games-simulation/pmars-sdl/files/pmars-sdl-0.9.2e-ncurses-opaque.patch @@ -0,0 +1,45 @@ +https://bugs.gentoo.org/932139 +https://github.com/mbarbon/pMARS/commit/a39970c724591c3c8625819cab7ca298ae71e12d +--- a/src/curdisp.c ++++ b/src/curdisp.c +@@ -428,18 +428,18 @@ agets5(str, maxchar, attr) + str--; + maxchar++; + leaveok(curwin, TRUE); +- if (ox = curwin->_curx) { ++ if (ox = getcurx(curwin)) { + #if 0 + #ifdef ATTRIBUTE +- mvwaddch(curwin, curwin->_cury, --ox, ' ' | attr); ++ mvwaddch(curwin, getcury(curwin), --ox, ' ' | attr); + #else +- mvwaddch(curwin, curwin->_cury, --ox, ' '); ++ mvwaddch(curwin, getcury(curwin), --ox, ' '); + #endif + #endif /* 0 */ +- mvwaddch(curwin, curwin->_cury, --ox, ' '); +- wmove(curwin, curwin->_cury, ox); ++ mvwaddch(curwin, getcury(curwin), --ox, ' '); ++ wmove(curwin, getcury(curwin), ox); + } else { +- oy = curwin->_cury - 1; ++ oy = getcury(curwin) - 1; + #if 0 + #ifdef ATTRIBUTE + mvwaddch(curwin, oy, COLS - 1, ' ' | attr); +@@ -470,12 +470,12 @@ agets5(str, maxchar, attr) + if (ox--) + #if 0 + #ifdef ATTRIBUTE +- mvwaddch(curwin, curwin->_cury, ox, ' ' | attr); ++ mvwaddch(curwin, getcury(curwin), ox, ' ' | attr); + #else +- mvwaddch(curwin, curwin->_cury, ox, ' '); ++ mvwaddch(curwin, getcury(curwin), ox, ' '); + #endif + #endif /* 0 */ +- mvwaddch(curwin, curwin->_cury, ox, ' '); ++ mvwaddch(curwin, getcury(curwin), ox, ' '); + else + #if 0 + #ifdef ATTRIBUTE diff --git a/games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r2.ebuild b/games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r2.ebuild new file mode 100644 index 000000000000..ee9eb60c147c --- /dev/null +++ b/games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r2.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs readme.gentoo-r1 + +MY_PN="${PN/-sdl/}" +MY_PV="${PV/e/-5}" +MY_P="${MY_PN}-${MY_PV}" + +DESCRIPTION="Portable redcode simulator's sdl port for core war" +HOMEPAGE="https://corewar.co.uk/pihlaja/pmars-sdl/" +SRC_URI="https://corewar.co.uk/pihlaja/pmars-sdl/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="sdl X" + +RDEPEND=" + sdl? ( x11-libs/libX11 media-libs/libsdl[video] ) + X? ( x11-libs/libX11 ) + !sdl? ( !X? ( sys-libs/ncurses:0= ) ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${P}-format.patch + "${FILESDIR}"/${P}-ncurses-opaque.patch + "${FILESDIR}"/${P}-c23.patch +) + +DOC_CONTENTS=" + There are some macros in /usr/share/pmars/macros + which you should make accessible to pmars by typing + export PMARSHOME=/usr/share/pmars/macros\n +" + +src_compile() { + local LIB="" + export LFLAGS="-x" + + append-cppflags -DEXT94 -DPERMUTATE + + if use sdl ; then + append-cflags $(sdl-config --cflags) + append-cppflags -DSDLGRAPHX + + LIB="$(sdl-config --libs)" + elif use X ; then + append-cppflags -DXWINGRAPHX + + LIB="$($(tc-getPKG_CONFIG) --libs x11)" + else + append-cppflags -DCURSESGRAPHX + + LIB="$($(tc-getPKG_CONFIG) --libs ncurses)" + fi + + cd src || die + + local programs=( + asm.c + cdb.c + clparse.c + disasm.c + eval.c + global.c + pmars.c + sim.c + pos.c + str_eng.c + token.c + ) + + for program in "${programs[@]}" ; do + einfo "Compiling ${program}" + $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${program} -c || die + done + + einfo "Linking with LIB: ${LIB}" + $(tc-getCC) ${LDFLAGS} *.o ${LIB} -o ${MY_PN} || die +} + +src_install() { + dobin src/${MY_PN} + doman doc/${MY_PN}.6 + + dodoc AUTHORS CONTRIB ChangeLog README doc/redcode.ref + readme.gentoo_create_doc + + insinto /usr/share/${MY_PN}/warriors + doins warriors/* + + insinto /usr/share/${MY_PN}/macros + doins config/*.mac +} + +pkg_postinst() { + readme.gentoo_print_elog +} |