summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreroen2014-08-07 19:30:49 +0200
committereroen2014-08-07 20:06:08 +0200
commit2ae007681c9564a38ccca983e9e4dfb1d130da23 (patch)
tree52af245466266f5b9d872fdba9c2998d9136f6bd
parentc2a39709e7d5458f7f8207145837865b2f0df62d (diff)
downloaderoen-overlay-2ae007681c9564a38ccca983e9e4dfb1d130da23.tar.gz
eroen-overlay-2ae007681c9564a38ccca983e9e4dfb1d130da23.tar.bz2
eroen-overlay-2ae007681c9564a38ccca983e9e4dfb1d130da23.tar.xz
dwarffortress-40.06 - allow system-libgraphics
Also added missing (hidden) dependencies.
-rw-r--r--[l---------]games-simulation/dwarffortress/dwarffortress-40.06.ebuild89
-rw-r--r--games-simulation/dwarffortress/metadata.xml1
2 files changed, 89 insertions, 1 deletions
diff --git a/games-simulation/dwarffortress/dwarffortress-40.06.ebuild b/games-simulation/dwarffortress/dwarffortress-40.06.ebuild
index ec53c634..d018b420 120000..100644
--- a/games-simulation/dwarffortress/dwarffortress-40.06.ebuild
+++ b/games-simulation/dwarffortress/dwarffortress-40.06.ebuild
@@ -1 +1,88 @@
-dwarffortress-40.03.ebuild \ No newline at end of file
+# By eroen, 2014
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# $Header: $
+
+EAPI=5
+
+inherit eutils games
+
+DESCRIPTION="Part roguelike, part city-building game set in a procedurally generated high fantasy universe."
+HOMEPAGE="http://www.bay12games.com/dwarves/"
+SRC_URI="http://www.bay12games.com/dwarves/df_${PV//./_}_linux.tar.bz2"
+
+S=${WORKDIR}/df_linux
+
+# DF: allows unmodified redistribution free of charge
+# libgraphics: BSD
+LICENSE="all-rights-reserved BSD"
+SLOT=${PV}
+KEYWORDS="-* ~amd64" # ~x86
+IUSE="+system-libgraphics"
+
+# libsndfile, openal, ncurses are dlopen()-ed.
+# zlib is missing from NEEDED.
+LIBGRAPHICS_RDEPEND="
+ dev-libs/glib[abi_x86_32]
+ virtual/glu[abi_x86_32]
+ =media-libs/libsdl-1*[abi_x86_32]
+ media-libs/libsndfile[abi_x86_32]
+ media-libs/openal[abi_x86_32]
+ media-libs/sdl-image[abi_x86_32]
+ media-libs/sdl-ttf[abi_x86_32]
+ sys-libs/ncurses[abi_x86_32]
+ sys-libs/zlib[abi_x86_32]
+ x11-libs/gtk+:2[abi_x86_32]
+ "
+RDEPEND="
+ system-libgraphics? ( >=dev-libs/libgraphics-40.05 )
+ !system-libgraphics? ( ${LIBGRAPHICS_RDEPEND} )
+ =media-libs/libsdl-1*[abi_x86_32]
+ >=sys-devel/gcc-4.5
+ "
+DEPEND=""
+
+MY_PREFIX=${GAMES_PREFIX_OPT}/${P}
+DF_DIR='${HOME}'/.${P}
+
+QA_PREBUILT="${MY_PREFIX#/}/libs/*"
+
+src_prepare() {
+ # libgcc: GLIBC_2.2.4 -> gcc-4.5 ?
+ # libstdc++: GLIBCXX_3.4.14 -> gcc-4.5 ?
+ rm -f libs/{libgcc_s.so.1,libstdc++.so.6} || die
+ use system-libgraphics && rm -f libs/libgraphics.so || die
+
+ cp "${FILESDIR}"/dwarffortress.sh "${T}"/${P}
+ sed -e "s:@@DF_DIR@@:${DF_DIR}:" \
+ -e "s:@@DATA_PREFIX@@:${MY_PREFIX}:" \
+ -e '/PRELOAD_LIBZ/s/false/true/' \
+ -i "${T}"/${P} || die
+
+ # For raws.
+ epatch_user
+}
+
+src_install() {
+ dodoc README.linux "command line.txt" "file changes.txt" readme.txt "release notes.txt"
+ insinto "${MY_PREFIX}"
+ doins -r data/ libs/ raw/
+ dogamesbin "${T}"/${P}
+ prepgamesdirs
+ fperms 755 "${MY_PREFIX}"/libs/Dwarf_Fortress
+}
+
+pkg_postinst() {
+ elog "The ${P} wrapper script will copy and symlink required"
+ elog "files to ${DF_DIR} before launching ${PN}."
+ elog "Before making modifications to the symlinked files, replace the links"
+ elog "with their targets."
+ elog
+ ewarn "${PN} versions from 40.03 are unable to import saves from"
+ ewarn "versions 40.01 and 40.02."
+ ewarn
+ games_pkg_postinst
+}
diff --git a/games-simulation/dwarffortress/metadata.xml b/games-simulation/dwarffortress/metadata.xml
index 47447ad6..091524fd 100644
--- a/games-simulation/dwarffortress/metadata.xml
+++ b/games-simulation/dwarffortress/metadata.xml
@@ -5,6 +5,7 @@
</longdescription>
<use>
<flag name="libgraphics">Install bundled, binary libgraphics.so</flag>
+ <flag name="system-libgraphics">Do not install and use bundled libgraphics.so</flag>
</use>
</pkgmetadata>