summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games-simulation/hearthlands/Manifest1
-rw-r--r--games-simulation/hearthlands/hearthlands-0.6.5.ebuild90
-rw-r--r--games-simulation/hearthlands/metadata.xml4
3 files changed, 95 insertions, 0 deletions
diff --git a/games-simulation/hearthlands/Manifest b/games-simulation/hearthlands/Manifest
new file mode 100644
index 00000000..a5c389be
--- /dev/null
+++ b/games-simulation/hearthlands/Manifest
@@ -0,0 +1 @@
+DIST hearthlands_0_6_5.tar.gz 120293387 SHA256 dcc763d07442edaf6bdab226289bc031c5572f94817fbd9b2425703df56dc79b SHA512 d1f104f59c4966dbafb21ec2e8683c23740b1e4b37f53307b7060ab5692a2d13a20bdfd682c7000acfa1e6018ef1097f4a96f79cc9b4e97cff5856bb0d81a6e8 WHIRLPOOL ec1166dd1d41dba481775bc6a8066266cfb5984a730b2cec223f0b8534b00100ed846d04f5784a58a0f84e8eb622a4d201b39078b4f0ceffaf6241fa1d0be73a
diff --git a/games-simulation/hearthlands/hearthlands-0.6.5.ebuild b/games-simulation/hearthlands/hearthlands-0.6.5.ebuild
new file mode 100644
index 00000000..9fc9a18b
--- /dev/null
+++ b/games-simulation/hearthlands/hearthlands-0.6.5.ebuild
@@ -0,0 +1,90 @@
+# By eroen, 2015
+# Distributed under the terms of the ISC licence
+# $Header: $
+
+EAPI=5
+
+inherit eutils java-pkg-2 games
+
+MY_PV=${PV//./_}
+
+DESCRIPTION="Medieval/fantasy real time city building/strategy game"
+HOMEPAGE="http://hearthlands.com"
+SRC_URI="hearthlands_${MY_PV}.tar.gz"
+S=$WORKDIR
+
+LICENSE="all-rights-reserved" # eula and others in tarball
+RESTRICT="bindist fetch mirror"
+SLOT="0"
+KEYWORDS="-* ~amd64" # ~x86
+IUSE=""
+
+HDEPEND=""
+LIBDEPEND=""
+DEPEND="${LIBDEPEND}"
+RDEPEND="${LIBDEPEND}
+ >=virtual/jre-1.6
+ media-libs/openal
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXcursor
+ x11-libs/libXrandr
+ x11-libs/libXxf86vm
+ x11-apps/xrandr
+ "
+[[ ${EAPI} == *-hdepend ]] || DEPEND+=" ${HDEPEND}"
+
+QA_PRESTRIPPED="${GAMES_PREFIX_OPT#/}/$PN/lib/.*\\.so"
+
+pkg_nofetch() {
+ einfo "Please obtain"
+ einfo " $A"
+ einfo "from"
+ einfo " $HOMEPAGE or http://www.humblebundle.com"
+ einfo "and place it in"
+ einfo " $DISTDIR"
+}
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+ games_pkg_setup
+}
+
+src_prepare() {
+ rm -f bin/natives/{libopenal64.so,libopenal.so} || die
+ if ! use amd64; then
+ rm -f bin/natives/{libjinput-linux64.so,liblwjgl64.so} || die
+ fi
+ #if ! use x86; then
+ rm -f bin/natives/{libjinput-linux.so,liblwjgl.so} || die
+ #fi
+
+ echo "[ -d \"\${HOME}\"/.$PN ] || mkdir -p \"\${HOME}\"/.$PN" >> "$T"/prelaunch.sh
+ echo "cd \"\${HOME}\"/.$PN" >> "$T"/prelaunch.sh
+ echo "[ -e config.txt ] || cp \"$GAMES_DATADIR\"/$PN/config.txt config.txt" >> "$T"/prelaunch.sh
+ echo "[ -e en.tsv ] || ln -s \"$GAMES_DATADIR\"/$PN/en.tsv en.tsv" >> "$T"/prelaunch.sh
+
+ java-pkg-2_src_prepare
+}
+
+src_install() {
+ java-pkg_jarinto "$GAMES_PREFIX_OPT"/$PN/lib
+ java-pkg_dojar bin/*.jar
+ java-pkg_sointo "$GAMES_PREFIX_OPT"/$PN/lib
+ java-pkg_doso bin/natives/*.so
+ java-pkg_dolauncher $PN \
+ --main com.hearthlands.game.GameMain \
+ --jar Hearthlands.jar \
+ -into "$GAMES_PREFIX" \
+ -pre "$T"/prelaunch.sh
+
+ insinto "$GAMES_DATADIR"/$PN
+ doins config.txt en.tsv
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ java-pkg-2_pkg_preinst
+}
diff --git a/games-simulation/hearthlands/metadata.xml b/games-simulation/hearthlands/metadata.xml
new file mode 100644
index 00000000..097975e3
--- /dev/null
+++ b/games-simulation/hearthlands/metadata.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+</pkgmetadata>