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 D0327158089 for ; Wed, 11 Oct 2023 11:03:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 19C322BC050; Wed, 11 Oct 2023 11:03:47 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E74082BC050 for ; Wed, 11 Oct 2023 11:03:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 0B314335C5D for ; Wed, 11 Oct 2023 11:03:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5BC01EC5 for ; Wed, 11 Oct 2023 11:03:44 +0000 (UTC) From: "Viorel Munteanu" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Viorel Munteanu" Message-ID: <1697022123.5d4c53037902a82343636ebca2c00a37152f1e6e.ceamac@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-simulation/simutrans/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-simulation/simutrans/metadata.xml games-simulation/simutrans/simutrans-123.0.1-r2.ebuild X-VCS-Directories: games-simulation/simutrans/ X-VCS-Committer: ceamac X-VCS-Committer-Name: Viorel Munteanu X-VCS-Revision: 5d4c53037902a82343636ebca2c00a37152f1e6e X-VCS-Branch: master Date: Wed, 11 Oct 2023 11:03:44 +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: accf416f-566e-4577-95ef-db51fce23bcc X-Archives-Hash: dd326619f4897ffec263c2e2e67def88 commit: 5d4c53037902a82343636ebca2c00a37152f1e6e Author: tastytea tastytea de> AuthorDate: Fri Sep 8 20:26:28 2023 +0000 Commit: Viorel Munteanu gentoo org> CommitDate: Wed Oct 11 11:02:03 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d4c5303 games-simulation/simutrans: make midi support optional Closes: https://bugs.gentoo.org/913715 Signed-off-by: tastytea tastytea.de> Closes: https://github.com/gentoo/gentoo/pull/32693 Signed-off-by: Viorel Munteanu gentoo.org> games-simulation/simutrans/metadata.xml | 1 + .../simutrans/simutrans-123.0.1-r2.ebuild | 109 +++++++++++++++++++++ 2 files changed, 110 insertions(+) diff --git a/games-simulation/simutrans/metadata.xml b/games-simulation/simutrans/metadata.xml index bdfc12b3f89d..e4089ed1e978 100644 --- a/games-simulation/simutrans/metadata.xml +++ b/games-simulation/simutrans/metadata.xml @@ -15,5 +15,6 @@ Don't install any PakSets (scenario data) + support for background MIDI music via media-sound/fluidsynth diff --git a/games-simulation/simutrans/simutrans-123.0.1-r2.ebuild b/games-simulation/simutrans/simutrans-123.0.1-r2.ebuild new file mode 100644 index 000000000000..0fafadd3255d --- /dev/null +++ b/games-simulation/simutrans/simutrans-123.0.1-r2.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools desktop flag-o-matic optfeature toolchain-funcs xdg + +MY_PV=${PV//./-} +MY_PAK_64="simupak64-123-0.zip" +# Required for network games, published in release announcement. +MY_SVN_REVISION="10421" + +DESCRIPTION="A free Transport Tycoon clone" +HOMEPAGE="https://www.simutrans.com/" +SRC_URI=" + mirror://sourceforge/simutrans/simutrans-src-${MY_PV}.zip + !minimal? ( mirror://sourceforge/simutrans/${MY_PAK_64} -> simutrans_${MY_PAK_64} ) + https://tastytea.de/files/simutrans_language_pack-Base+texts-${PV}.zip + https://github.com/aburch/simutrans/raw/9c84822/simutrans.svg +" +S=${WORKDIR} + +# NOTE: Get the latest language pack from: +# https://simutrans-germany.com/translator/data/tab/language_pack-Base+texts.zip + +LICENSE="Artistic" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="minimal +midi truetype upnp zstd" + +DEPEND=" + app-arch/bzip2 + media-libs/libpng:0= + media-libs/libsdl2[sound,video] + sys-libs/zlib + midi? ( media-sound/fluidsynth:=[sdl] ) + truetype? ( media-libs/freetype ) + upnp? ( net-libs/miniupnpc:= ) + zstd? ( app-arch/zstd ) +" +RDEPEND=" + ${DEPEND} + midi? ( media-sound/fluid-soundfont ) +" +BDEPEND=" + app-arch/unzip + virtual/pkgconfig +" +RESTRICT="test" # Opens the program and doesn't close it. + +PATCHES=( "${FILESDIR}"/${PN}-123.0.1-silence-svn-and-git-errors.patch ) + +src_unpack() { + unpack "simutrans-src-${MY_PV}.zip" + use minimal || unpack "simutrans_${MY_PAK_64}" + + # Bundled text files are incomplete, bug #580948 + cd "${S}/simutrans/text" || die + unpack "simutrans_language_pack-Base+texts-${PV}.zip" +} + +src_prepare() { + default + xdg_environment_reset + + strip-flags # bug #293927 + append-flags -fno-strict-aliasing # bug #859229 + + eautoreconf + + # Make it look for the data in the right directory. + sed -i -e "s:argv\[0\]:\"/usr/share/${PN}/\":" simmain.cc || die +} + +src_configure() { + default + + cat > config.default <<-EOF || die + BACKEND=sdl2 + OSTYPE=linux + OPTIMISE=0 + STATIC=0 + MULTI_THREAD=1 + USE_UPNP=$(usex upnp 1 0) + USE_FREETYPE=$(usex truetype 1 0) + USE_ZSTD=$(usex zstd 1 0) + USE_FLUIDSYNTH_MIDI=$(usex midi 1 0) + VERBOSE=1 + FLAGS := -DREVISION="${MY_SVN_REVISION}" + + HOSTCC = $(tc-getCC) + HOSTCXX = $(tc-getCXX) + EOF +} + +src_install() { + newbin build/default/sim ${PN} + insinto usr/share/${PN} + doins -r simutrans/* + doicon "${DISTDIR}"/${PN}.svg + domenu "${FILESDIR}"/${PN}.desktop +} + +pkg_postinst() { + xdg_pkg_postinst + + optfeature_header "Since 123.0 this ebuild only installs the Pak64 PakSet. You can install" + optfeature "other PakSets" games-simulation/simutrans-paksets +}