From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 390F015808B for ; Sun, 10 Apr 2022 13:24:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 64AFCE0919; Sun, 10 Apr 2022 13:24:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A6A74E0919 for ; Sun, 10 Apr 2022 13:24:03 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 79E3E34140A for ; Sun, 10 Apr 2022 13:24:02 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B8A50396 for ; Sun, 10 Apr 2022 13:24:00 +0000 (UTC) From: "Conrad Kostecki" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Conrad Kostecki" Message-ID: <1649597023.6f6d5ac7441e6449230909e5ad6c2db1e48557fb.conikost@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-simulation/openttd/, games-simulation/openttd/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-simulation/openttd/Manifest games-simulation/openttd/files/openttd.confd games-simulation/openttd/files/openttd.initd-r2 games-simulation/openttd/openttd-12.2.ebuild X-VCS-Directories: games-simulation/openttd/files/ games-simulation/openttd/ X-VCS-Committer: conikost X-VCS-Committer-Name: Conrad Kostecki X-VCS-Revision: 6f6d5ac7441e6449230909e5ad6c2db1e48557fb X-VCS-Branch: master Date: Sun, 10 Apr 2022 13:24:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4cef43f4-cb61-4e34-a2b4-a723cf305ca9 X-Archives-Hash: c88bed0131842531562551315499a221 commit: 6f6d5ac7441e6449230909e5ad6c2db1e48557fb Author: Conrad Kostecki gentoo org> AuthorDate: Sun Apr 10 13:08:15 2022 +0000 Commit: Conrad Kostecki gentoo org> CommitDate: Sun Apr 10 13:23:43 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f6d5ac7 games-simulation/openttd: add 12.2 Signed-off-by: Conrad Kostecki gentoo.org> games-simulation/openttd/Manifest | 1 + games-simulation/openttd/files/openttd.confd | 5 + games-simulation/openttd/files/openttd.initd-r2 | 16 ++++ games-simulation/openttd/openttd-12.2.ebuild | 120 ++++++++++++++++++++++++ 4 files changed, 142 insertions(+) diff --git a/games-simulation/openttd/Manifest b/games-simulation/openttd/Manifest index 1cc2aec45707..47bd27323260 100644 --- a/games-simulation/openttd/Manifest +++ b/games-simulation/openttd/Manifest @@ -1,2 +1,3 @@ DIST openttd-12.0-source.tar.xz 7307832 BLAKE2B 12ffd0978e1f735f4a1d9eb63876a6f4a38867f11e5cbfbb7386f34564ef8b79f394b782c99f28e8a65196b7311aee28427d0485abd2e16dd69f36beb40fa3b1 SHA512 a1042fe52892cf301d3a2c7e972d9c091829638119d2ca9b55165a6b5568660f178e808db4b0bf2d3e4538dbdaea7b0683d4de9333defbcd95e109d591c05a78 DIST openttd-12.1-source.tar.xz 7357316 BLAKE2B 653a511416b0d75af696eae96cf730e95747b476f9b1957759a6d3941eff2d6194dfb4bdb8e5e6cb645b81278ac4d48cf886daaa5796d1f995da490bcd046514 SHA512 bf58dbe308c64736973b92d66c3973081867e93f02e3b345556f5e74aea00fe0bbbb8b826f4bb59440b593d2a2d3be4f36321fb8a44be89bfa390fe6afe40bfc +DIST openttd-12.2-source.tar.xz 7377496 BLAKE2B a2c0192a2d4ed149f7c6584032b46483eb74d2d7d2ced16f1d0d3e638c4acef184cd8b013b855a01750dbb570d37bb6ed95f04d16c1580e4b3777ea3b90cfee1 SHA512 577792faee1d5e0c19fbfe31501dab3359f8e1327caa87e6378bb3e616ab6b2c64d02044c6ac99f7c40397df7bc6847a6b432852a5318a2db574203ddebfaef6 diff --git a/games-simulation/openttd/files/openttd.confd b/games-simulation/openttd/files/openttd.confd new file mode 100644 index 000000000000..399ab5d984c6 --- /dev/null +++ b/games-simulation/openttd/files/openttd.confd @@ -0,0 +1,5 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Options for your started OpenTTD server +openttd_opts="" diff --git a/games-simulation/openttd/files/openttd.initd-r2 b/games-simulation/openttd/files/openttd.initd-r2 new file mode 100644 index 000000000000..6a24bbc25072 --- /dev/null +++ b/games-simulation/openttd/files/openttd.initd-r2 @@ -0,0 +1,16 @@ +#!/sbin/openrc-run +# Copyright 1999-2022 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +description="OpenTTD dedicated game server" +pidfile="/run/${SVCNAME}.pid" + +command="/usr/bin/openttd" +command_args="-D ${openttd_opts}" +command_background="true" +command_group="openttd" +command_user="openttd" + +depend() { + need net +} diff --git a/games-simulation/openttd/openttd-12.2.ebuild b/games-simulation/openttd/openttd-12.2.ebuild new file mode 100644 index 000000000000..9b284346f0a3 --- /dev/null +++ b/games-simulation/openttd/openttd-12.2.ebuild @@ -0,0 +1,120 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake xdg-utils + +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" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" + +IUSE="allegro cpu_flags_x86_sse dedicated +fluidsynth icu +lzma lzo +openmedia +png +sdl timidity +truetype +zlib" +REQUIRED_USE="!dedicated? ( || ( allegro sdl ) )" + +RESTRICT="test" # needs a graphics set in order to test + +RDEPEND=" + dedicated? ( + acct-group/openttd + acct-user/openttd + ) + !dedicated? ( + allegro? ( media-libs/allegro:5 ) + fluidsynth? ( media-sound/fluidsynth ) + icu? ( + dev-libs/icu-layoutex:= + dev-libs/icu-le-hb + >=dev-libs/icu-58.1:= + ) + 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:0= ) + 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_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_BINDIR=bin + -DCMAKE_INSTALL_DATADIR=share + -DOPTION_DEDICATED=$(usex dedicated) + -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_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 openttd + newinitd "${FILESDIR}"/openttd.initd-r1 openttd + fi +} + +pkg_postinst() { + xdg_icon_cache_update + + 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 /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 +} + +pkg_postrm() { + xdg_icon_cache_update +}