diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-01-26 06:49:21 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-01-26 06:49:21 +0000 |
commit | 3e90fd411cb5f48da3f2487a4ea0efcbee2bfa08 (patch) | |
tree | 7c9660a764d1acdb90fea6ec5c4f6807eaebaf4c /games-simulation/openttd | |
parent | 4dec849539ecb0ceab14d66af84960f01b9a284c (diff) |
gentoo auto-resync : 26:01:2025 - 06:49:21
Diffstat (limited to 'games-simulation/openttd')
-rw-r--r-- | games-simulation/openttd/Manifest | 3 | ||||
-rw-r--r-- | games-simulation/openttd/openttd-14.1.ebuild | 13 | ||||
-rw-r--r-- | games-simulation/openttd/openttd-9999.ebuild | 139 |
3 files changed, 151 insertions, 4 deletions
diff --git a/games-simulation/openttd/Manifest b/games-simulation/openttd/Manifest index d0b1ff306acb..3f1cec8511b5 100644 --- a/games-simulation/openttd/Manifest +++ b/games-simulation/openttd/Manifest @@ -7,5 +7,6 @@ AUX openttd.initd-r3 1052 BLAKE2B b4f57691ef749e8aae4be2fb3cf1826b00fa609afbd1f0 DIST openttd-13.4-source.tar.xz 7428012 BLAKE2B 0ef635e40fe47185168bd13e4b8ce24a8ff9c4afe3eced6197298986127ee196a6dcb379643bbb1de9bb552e71cda5df5b5b35006ed2b43d6e33e8513b1cd550 SHA512 84f57a39c0dade44f0e6153dff7a40eec0da8e2f892ce870d5f9e037f80daa5c7c46ff786fa51c3671366dd5056504cd7ccbc1c4e5bce8b2c5575533b454c001 DIST openttd-14.1-source.tar.xz 8015032 BLAKE2B d107cd41a04f1a0bcfd41730e57628787443e8fe6d90dd59b0211b115b462a8e57e68a30e4b1c72d5f9db2121650f1c4035303e64f7e2e71fdedb23665f445da SHA512 194135cc01457d9ed069c09d8961ad3de681bc9936533ca81ff23099f394bb9a83ef84a0852e85525e258f6149e14fd41cfc5f8e683c0643515005c42fb77e3b EBUILD openttd-13.4.ebuild 3978 BLAKE2B 0e5da7ce67f10ab1d8fbb580f25fd321e2fe82d6c5638b7b7b9de640838c4221cedb4425c287ed0cd7d6c0bf94d43ad003583dace6264f95a4583ae3be92f1df SHA512 f46264f23f2be36e9949165935c8ced9981bd3b00b456d014014c9ee2f5aae806460e5d1125124151ad117ac9b0cf678225d248746e326093030210d72c78d56 -EBUILD openttd-14.1.ebuild 3788 BLAKE2B 50d1c1ee1c1094159f36f5b4dd594567c0189445f4667c723c0fabd658c736896706afec412eb697bc8a471d5fb624c442718100cd1dd398328c0248db867dab SHA512 8a203b5718fff3bf97a2c358dfc18aa077927e08fe7aef978eeb7c57551e3faf07e7d013f611aebed4d47936d238a065e595476410759bc73863cd8279a07920 +EBUILD openttd-14.1.ebuild 3898 BLAKE2B 164f0d113f5842ee3559b072f59a544ccf2dbe3909a3a15122131af61337666d55d5a1b694b86b9b9e6cdc9f21113c02d47c6f48bf129e3861c8088bc1ada174 SHA512 2205f31ac72ed46a4480fa4aec7b507996e0a18303bcebd2f4dd9dd3b7701c5623122ed633372e65b4a7a414eb87d21c1fd51b7b59d356a41614782a79aa0037 +EBUILD openttd-9999.ebuild 3819 BLAKE2B f273a640f55a086b720e7fbff7da1b58c615a7db9d634e64ed9224e242b9da23a4019045be48843d25d0c26ba164464be0a6922ab93b295dac13a9868ef5bd5f SHA512 710c67e5bb75cb5247b4dc8c0c8d534f8999762feb1d3918b73eef8562d5d2a781044826961699db48475be4b6fb755966200706f545ccd91dda03c8f2297cd7 MISC metadata.xml 857 BLAKE2B e65bf683a6d5beb3c99ae8d83771e5312e00cf40dbbd2dbf9545d7f7134b5df25d58057f23f5afd101a9f2e13396c57bfda59b427896455205ed6e272574f643 SHA512 fa13b5059202687ded428b6670b6a84f1187e767da4a51ef4fca435e8b0c10f900cc60ba7207d690888e442cbc27b03f8ea142e93138fa1b4da4411c13d1b6bf diff --git a/games-simulation/openttd/openttd-14.1.ebuild b/games-simulation/openttd/openttd-14.1.ebuild index dcc100476de9..8c7c890c78f4 100644 --- a/games-simulation/openttd/openttd-14.1.ebuild +++ b/games-simulation/openttd/openttd-14.1.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 @@ -7,11 +7,18 @@ inherit cmake xdg DESCRIPTION="A clone of Transport Tycoon Deluxe" HOMEPAGE="https://www.openttd.org/" -SRC_URI="https://cdn.openttd.org/openttd-releases/${PV}/${P}-source.tar.xz" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/OpenTTD/OpenTTD" + inherit git-r3 +else + SRC_URI="https://cdn.openttd.org/openttd-releases/${PV}/${P}-source.tar.xz" + + KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +fi LICENSE="GPL-2" SLOT="0" -KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" IUSE="allegro cpu_flags_x86_sse debug dedicated +fluidsynth icu +lzma lzo +openmedia +png +sdl timidity +truetype +zlib" REQUIRED_USE="!dedicated? ( || ( allegro sdl ) )" diff --git a/games-simulation/openttd/openttd-9999.ebuild b/games-simulation/openttd/openttd-9999.ebuild new file mode 100644 index 000000000000..938874ec597c --- /dev/null +++ b/games-simulation/openttd/openttd-9999.ebuild @@ -0,0 +1,139 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake xdg + +DESCRIPTION="A clone of Transport Tycoon Deluxe" +HOMEPAGE="https://www.openttd.org/" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/OpenTTD/OpenTTD" + inherit git-r3 +else + SRC_URI="https://cdn.openttd.org/openttd-releases/${PV}/${P}-source.tar.xz" + + KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="allegro cpu_flags_x86_sse debug dedicated +fluidsynth icu +lzma lzo +openmedia +png +sdl timidity +truetype +zlib" +REQUIRED_USE="!dedicated? ( || ( allegro sdl ) )" + +RDEPEND=" + net-misc/curl + dedicated? ( + acct-group/openttd + acct-user/openttd + app-misc/dtach + ) + !dedicated? ( + allegro? ( media-libs/allegro:5 ) + fluidsynth? ( media-sound/fluidsynth ) + icu? ( + >=dev-libs/icu-58.1:= + media-libs/harfbuzz + ) + sdl? ( media-libs/libsdl2[sound,video] ) + truetype? ( + media-libs/fontconfig + media-libs/freetype:2 + sys-libs/zlib:= + ) + ) + lzma? ( app-arch/xz-utils ) + lzo? ( dev-libs/lzo:2 ) + png? ( media-libs/libpng:= ) + zlib? ( sys-libs/zlib:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + >=games-util/grfcodec-6.0.6_p20210310 + virtual/pkgconfig +" +PDEPEND=" + !dedicated? ( + openmedia? ( + >=games-misc/openmsx-0.4.0 + >=games-misc/opensfx-1.0.1 + ) + ) + openmedia? ( >=games-misc/opengfx-0.6.1 ) + timidity? ( media-sound/timidity++ ) +" + +DOCS=( docs/directory_structure.md ) + +PATCHES=( + "${FILESDIR}/${PN}-1.11.2_dont_compress_man.patch" +) + +src_prepare() { + # Drop automagic LTO usage + sed -i -e '/check_ipo_supported(RESULT IPO_FOUND)/d' CMakeLists.txt || die + + # Don't force _FORTIFY_SOURCE via CMake + # (we already set it in the toolchain by default with a minimum level + # of _FORTIFY_SOURCE=2) + sed -i -e '/-D_FORTIFY_SOURCE/d' cmake/CompileFlags.cmake || die + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_BINDIR=bin + -DCMAKE_INSTALL_DATADIR=share + -DOPTION_DEDICATED=$(usex dedicated) + -DOPTION_USE_ASSERTS=$(usex debug) + -DCMAKE_DISABLE_FIND_PACKAGE_Allegro=$(usex !allegro) + -DCMAKE_DISABLE_FIND_PACKAGE_Freetype=$(usex !truetype) + -DCMAKE_DISABLE_FIND_PACKAGE_Fontconfig=$(usex !truetype) + -DCMAKE_DISABLE_FIND_PACKAGE_Fluidsynth=$(usex !fluidsynth) + -DCMAKE_DISABLE_FIND_PACKAGE_ICU=$(usex !icu) + -DCMAKE_DISABLE_FIND_PACKAGE_Harfbuzz=$(usex !icu) + -DCMAKE_DISABLE_FIND_PACKAGE_LibLZMA=$(usex !lzma) + -DCMAKE_DISABLE_FIND_PACKAGE_LZO=$(usex !lzo) + -DCMAKE_DISABLE_FIND_PACKAGE_PNG=$(usex !png) + # N.B. regarding #807364 and #828984: CMAKE_DISABLE_FIND_PACKAGE_SDL is used only + # with USE="allegro -sdl" combination flags. There no other way to + # completely disable SDL1 support. + -DCMAKE_DISABLE_FIND_PACKAGE_SDL=ON + -DCMAKE_DISABLE_FIND_PACKAGE_SDL2=$(usex !sdl) + -DCMAKE_DISABLE_FIND_PACKAGE_SSE=$(usex !cpu_flags_x86_sse) + -DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=$(usex !zlib) + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + if use dedicated ; then + newconfd "${FILESDIR}"/openttd.confd-r1 openttd + newinitd "${FILESDIR}"/openttd.initd-r3 openttd + fi +} + +pkg_postinst() { + xdg_pkg_postinst + + if ! use openmedia ; then + elog + elog "OpenTTD was compiled without the 'openmedia' USE flag." + elog + elog "In order to play, you must at least install" + elog "games-misc/opengfx, and games-misc/opensfx, or copy the " + elog "following 6 files from a version of Transport Tycoon Deluxe" + elog "(Windows or DOS) to shared or personal location." + elog "See ${EROOT}/usr/share/doc/${PF}/directory_structure.md for more info." + elog + elog "From the Windows version you need: " + elog "sample.cat trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf" + elog "OR from the DOS version you need: " + elog "SAMPLE.CAT TRG1.GRF TRGC.GRF TRGH.GRF TRGI.GRF TRGT.GRF" + fi +} |