commit:     1a6728700335798eb4e12dd988fc4685b0cd5c7e
Author:     Vadim A. Misbakh-Soloviov <git <AT> mva <DOT> name>
AuthorDate: Sun Jun 11 12:51:05 2017 +0000
Commit:     Vadim A. Misbakh-Soloviov <mva <AT> mva <DOT> name>
CommitDate: Sun Jun 11 12:51:05 2017 +0000
URL:        https://gitweb.gentoo.org/proj/gamerlay.git/commit/?id=1a672870

unepic: add

 games-rpg/unepic/unepic-1.50.05.ebuild | 94 ++++++++++++++++++++++++++++++++++
 1 file changed, 94 insertions(+)

diff --git a/games-rpg/unepic/unepic-1.50.05.ebuild 
b/games-rpg/unepic/unepic-1.50.05.ebuild
new file mode 100644
index 0000000..5eaab4b
--- /dev/null
+++ b/games-rpg/unepic/unepic-1.50.05.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+HB_VERSION="${PV//\.}"
+GOG_VERSION="2.1.0.4"
+
+DESCRIPTION="A combination of platformer and role playing game"
+HOMEPAGE="http://www.unepicgame.com/";
+SRC_URI="
+       hb? ( ${PN}-${HB_VERSION}.run )
+       gog? ( gog_${PN}_${GOG_VERSION}.sh )
+"
+
+RESTRICT="fetch strip"
+LICENSE="EULA"
+
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="hb gog"
+REQUIRED_USE="^^ ( hb gog )"
+
+DEPEND="app-arch/unzip"
+RDEPEND="
+       media-libs/libsdl2
+       media-libs/mesa
+       media-libs/sdl2-mixer
+       sys-libs/glibc
+       sys-libs/zlib
+"
+
+
+pkg_setup() {
+       ewarn "Just be noticed, that both variants (GOG and HumbleBundle)"
+       ewarn "have game binaries linked with relative path in DT_RPATH."
+       ewarn "That means that it is pretty easy to preload any badware"
+       ewarn "library to it by just putting in in current working dir,"
+       ewarn "where you run the game from"
+       ewarn ""
+       ewarn "Portage will trigger bold red warnings about that on install 
phase."
+}
+
+pkg_nofetch() {
+       einfo ""
+       einfo "Please buy and download \"${A}\" from corresponding shop 
(HumbleBundle or GOG)"
+       einfo "and move/link it to \"${DISTDIR}\""
+       einfo "You can get more info on ${HOMEPAGE}"
+       einfo ""
+}
+
+src_unpack() {
+       einfo "\nUnpacking files. This can take several minutes.\n"
+
+       mkdir "${WORKDIR}/tmp" || die "mkdir 'tmp' failed"
+       cd "${WORKDIR}/tmp" || die "cd 'tmp' failed"
+
+       unzip -q "${DISTDIR}/${A}"
+
+       local gpath;
+       use gog && gpath="data/noarch/game"
+       use hb  && gpath="data"
+
+       rm "${gpath}"/lib* -r
+       mv "${gpath}" "${S}"
+
+       cd "${S}" && rm -r "${WORKDIR}/tmp"
+}
+
+src_install() {
+       local dir="/usr/share/${PF}"
+       insinto "${dir}"
+       exeinto "${dir}"
+
+       doins -r .
+       doexe "${PN}"{32,64}* ${PN}.sh || die "Failed to install executables"
+
+       doicon "${PN}.png"
+       make_wrapper "${PN}" "./${PN}.sh" "${dir}"
+       make_desktop_entry "${PN}" "${PN^}" "${PN}" || die "make_desktop_entry 
failed"
+}
+
+pkg_postinst() {
+       einfo "Just in case: neither of these DRM-free versions sees Steam's 
savegames."
+       einfo "In case, if you played in Steam and moved to DRM-free version,"
+       einfo "consider copying files from:"
+       einfo "~/.local/share/Steam/userdata/[your_user_id]/233980/remote/save"
+       einfo "to:"
+       einfo "~/.local/share/Unepic/unepic/save"
+       einfo "and vice versa if you want to import DRM-free saves to Steam."
+       einfo "Although, it can cause sudden game freezes..."
+}

Reply via email to