hasufell-repository/packages/games-rpg/wasteland2/wasteland2-2.9.0.14.exheres-0

92 lines
2.0 KiB
Bash
Raw Permalink Normal View History

2016-02-19 17:31:47 +00:00
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
# Distributed under the terms of the GNU General Public License v2
2016-05-26 02:05:57 +00:00
require desktop-utils gtk-icon-cache
2016-02-19 17:31:47 +00:00
SUMMARY="Direct sequel to 1988's Wasteland, the first-ever post-apocalyptic computer RPG and the inspiration behind the Fallout series"
HOMEPAGE="https://wasteland.inxile-entertainment.com/"
2016-05-26 02:05:57 +00:00
GOG_SH="gog_wasteland_2_2.9.0.14.sh"
DOWNLOADS="manual: ${GOG_SH}"
2016-02-19 17:31:47 +00:00
LICENCES="all-rights-reserved GOG-EULA"
2016-02-19 17:31:47 +00:00
SLOT="0"
PLATFORMS="-* ~x86"
MYOPTIONS=""
RESTRICT="fetch"
2016-02-19 17:31:47 +00:00
DEPENDENCIES="
2016-02-28 23:05:15 +00:00
build:
virtual/unzip
2016-02-19 17:31:47 +00:00
run:
dev-libs/atk
dev-libs/glib:2
media-libs/fontconfig
media-libs/freetype:2
x11-dri/glu
x11-dri/mesa
x11-libs/cairo
x11-libs/gdk-pixbuf:2.0
x11-libs/gtk+:2
x11-libs/pango
x11-libs/libX11
x11-libs/libXcursor
x11-libs/libXext
x11-libs/libXrandr
"
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 Wasteland 2"
einfo "from https://www.gog.com/ and"
2016-05-26 02:05:57 +00:00
einfo "download \"${GOG_SH}\""
2016-02-19 17:31:47 +00:00
einfo "and move/link it to \"${FETCHEDDIR}\""
einfo
einfo "This exheres was tested with the CLASSICAL edition."
einfo "If it works with the deluxe edition too, please"
2016-05-26 02:05:57 +00:00
einfo "open a PR."
2016-02-19 17:31:47 +00:00
einfo
}
pkg_setup() {
exdirectory --allow /opt
}
src_unpack() {
2016-05-26 02:05:57 +00:00
unzip -qo "${FETCHEDDIR}/${GOG_SH}"
[[ $? -le 1 ]] || die "unpacking ${GOG_SH} failed!"
2016-02-19 17:31:47 +00:00
}
src_install() {
local dir=/opt/${PN}
2016-05-26 02:05:57 +00:00
insinto "${dir}"
doins -r game/WL2_Data
2016-02-19 17:31:47 +00:00
exeinto "${dir}"
doexe game/WL2
insinto /usr/share/icons/hicolor/256x256/apps
newins support/icon.png ${PN}.png
herebin ${PN} <<EOF
#!/bin/sh
2016-05-26 02:05:57 +00:00
cd "${dir}"
exec "./WL2" "\$@"
2016-02-19 17:31:47 +00:00
EOF
2016-05-26 02:05:57 +00:00
install_desktop_entry
2016-02-19 17:31:47 +00:00
dodoc docs/*.pdf
# empty, but let's just keep it
keepdir /opt/wasteland2/WL2_Data/Localization
}