From dbb3f70ff027e78aeba6ea3187e7fe2694d9f28b Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Fri, 19 Feb 2016 17:48:31 +0100 Subject: [PATCH] games-rpg/baldurs-gate-2-ee: initial import --- .../baldurs-gate-2-ee-1.3.2064.exheres-0 | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 packages/games-rpg/baldurs-gate-2-ee/baldurs-gate-2-ee-1.3.2064.exheres-0 diff --git a/packages/games-rpg/baldurs-gate-2-ee/baldurs-gate-2-ee-1.3.2064.exheres-0 b/packages/games-rpg/baldurs-gate-2-ee/baldurs-gate-2-ee-1.3.2064.exheres-0 new file mode 100644 index 00000000..8d1f7a73 --- /dev/null +++ b/packages/games-rpg/baldurs-gate-2-ee/baldurs-gate-2-ee-1.3.2064.exheres-0 @@ -0,0 +1,97 @@ +# Copyright 2016 Julian Ospald +# Distributed under the terms of the GNU General Public License v2 + +require gtk-icon-cache + +SUMMARY="Baldur's Gate2: Enhanced Edition" +HOMEPAGE="http://www.gog.com/game/baldurs_gate_2_enhanced_edition" +DOWNLOADS="gog_baldur_s_gate_2_enhanced_edition_2.0.0.3.sh" + +LICENCES="all-rights-reserved" +SLOT="0" +PLATFORMS="-* ~x86" +MYOPTIONS="" +RESTRICT="fetch bindist" + +DEPENDENCIES=" + build: + virtual/unzip +" + +WORK="${WORKBASE}/data/noarch" + +pkg_pretend() { + if [[ $(exhost --target) != i686-* ]];then + die "${CATEGORY}/${PNVR} is i686 only, you'll have to cross compile it :(" + fi +} + +pkg_nofetch() { + einfo + einfo "Please buy & download \"${DOWNLOADS}\" from:" + einfo " ${HOMEPAGE}" + einfo "and move/link it to \"${FETCHEDDIR}\"" + einfo +} + +pkg_setup() { + exdirectory --allow /opt +} + +src_unpack() { + unzip -qo "${FETCHEDDIR}/${DOWNLOADS}" + [[ $? -le 1 ]] || die "unpacking ${DOWNLOADS} failed!" +} + +src_install() { + local dir=/opt/${PN} + local f + + insinto "${dir}" + doins -r game + edo chmod +x "${IMAGE}${dir}"/game/BaldursGateII + + dodir "${dir}/lib" + + edo pushd "${WORK}"/lib + exeinto "${dir}/lib" + for f in * ; do + if [[ -L ${f} ]] ; then + dosym "$(readlink ${f})" "${dir}"/lib/${f} + else + doexe ${f} + fi + done + unset f + edo popd + + insinto /usr/share/icons/hicolor/256x256/apps + newins support/icon.png ${PN}.png + + local LD_PATH="/usr/$(exhost --target)/lib/ld-linux.so.2"; + herebin ${PN} <