# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Source: =games-simulation/simutrans-124.2.1 from default Gentoo overlay EAPI=8 inherit autotools desktop flag-o-matic toolchain-funcs xdg subversion MY_PV=${PV//./-} DESCRIPTION="A free Transport Tycoon clone" HOMEPAGE="https://www.simutrans.com/" # If you want to version bump the ebuild, get the SVN revision of the release # you want from the release announcement: # ESVN_REPO_URI="svn://servers.simutrans.org/simutrans/trunk@11671" LICENSE="Artistic" SLOT="0" KEYWORDS="~amd64 ~arm64 ~x86" IUSE="+midi fontconfig upnp zstd" DEPEND=" app-arch/bzip2 media-libs/freetype media-libs/libpng:0= media-libs/libsdl2[sound,video] sys-libs/zlib midi? ( media-sound/fluidsynth:=[sdl] ) fontconfig? ( media-libs/fontconfig ) upnp? ( net-libs/miniupnpc:= ) zstd? ( app-arch/zstd ) " RDEPEND=" ${DEPEND} midi? ( media-sound/fluid-soundfont ) ! config.default <<-EOF || die BACKEND=sdl2 OSTYPE=linux OPTIMISE=0 STATIC=0 WITH_REVISION=${ESVN_WC_REVISION} MULTI_THREAD=1 USE_UPNP=$(usex upnp 1 '') USE_FREETYPE=1 USE_ZSTD=$(usex zstd 1 '') USE_FONTCONFIG=$(usex fontconfig 1 '') USE_FLUIDSYNTH_MIDI=$(usex midi 1 '') VERBOSE=1 HOSTCC = $(tc-getCC) HOSTCXX = $(tc-getCXX) EOF } src_install() { newbin build/default/sim ${PN} insinto usr/share/${PN} doins -r simutrans/* doicon src/simutrans/${PN}.svg domenu src/linux/simutrans.desktop } pkg_postinst() { xdg_pkg_postinst elog "New versions of Simutrans can download paksets (game data) on their own." elog "This ebuild makes no attempt to install any fallback pakset." }