summaryrefslogtreecommitdiff
path: root/games-simulation/train-valley/train-valley-1.3.31403.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-08-18 18:16:17 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-08-18 18:16:17 +0100
commitfc637fb28da700da71ec2064d65ca5a7a31b9c6c (patch)
tree326613a08f25851c388715e205576a2e7d25dc4f /games-simulation/train-valley/train-valley-1.3.31403.ebuild
parentb24bd25253fe093f722ab576d29fdc41d04cb1ee (diff)
gentoo resync : 18.08.2019
Diffstat (limited to 'games-simulation/train-valley/train-valley-1.3.31403.ebuild')
-rw-r--r--games-simulation/train-valley/train-valley-1.3.31403.ebuild61
1 files changed, 61 insertions, 0 deletions
diff --git a/games-simulation/train-valley/train-valley-1.3.31403.ebuild b/games-simulation/train-valley/train-valley-1.3.31403.ebuild
new file mode 100644
index 000000000000..eeda5d017b72
--- /dev/null
+++ b/games-simulation/train-valley/train-valley-1.3.31403.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eutils desktop unpacker xdg-utils
+
+DESCRIPTION="Build railroads in order to connect cities, tunnels, and bridges"
+HOMEPAGE="http://train-valley.com/tv1.html"
+SRC_URI="${P//[-.]/_}.sh"
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="+gui"
+RESTRICT="bindist fetch splitdebug"
+
+RDEPEND="
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXrandr
+ gui? (
+ dev-libs/glib:2
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:2
+ )
+"
+
+S="${WORKDIR}/data/noarch/game"
+
+DIR="/opt/${PN}"
+QA_PREBUILT="${DIR}/*"
+
+pkg_nofetch() {
+ einfo "Please buy and download ${SRC_URI} from:"
+ einfo " https://www.gog.com/game/${PN//-/_}"
+ einfo "and move it to your distfiles directory."
+}
+
+src_unpack() {
+ unpack_zip ${A}
+}
+
+src_install() {
+ exeinto "${DIR}"
+ newexe ${PN}.$(usex amd64 x86_64 x86) ${PN}
+ make_wrapper ${PN} "${DIR}"/${PN}
+
+ insinto "${DIR}"
+ doins -r ${PN}_Data/
+ rm -r "${ED}/${DIR}"/${PN}_Data/*/$(usex amd64 x86 x86_64) || die
+
+ if ! use gui; then
+ rm "${ED}/${DIR}"/${PN}_Data/Plugins/*/ScreenSelector.so || die
+ fi
+
+ newicon -s 128 ${PN}_Data/Resources/UnityPlayer.png ${PN}.png
+ make_desktop_entry ${PN} "Train Valley"
+}
+
+pkg_postinst() { xdg_icon_cache_update; }
+pkg_postrm() { xdg_icon_cache_update; }