diff options
author | 2019-08-28 09:01:44 +0200 | |
---|---|---|
committer | 2019-08-28 09:01:44 +0200 | |
commit | 325562e7c235e31b8176a0b4dd77bac87d99e5cc (patch) | |
tree | a4d6285b5a140d91bd289179017ce2543c4b0ce7 | |
parent | termite-15 - bump (diff) | |
download | eroen-325562e7c235e31b8176a0b4dd77bac87d99e5cc.tar.gz eroen-325562e7c235e31b8176a0b4dd77bac87d99e5cc.tar.bz2 eroen-325562e7c235e31b8176a0b4dd77bac87d99e5cc.zip |
dfhack-0.44.12.2_p20190826 - enable ruby
Signed-off-by: Erik Moen <eroen-overlay@occam.eroen.eu>
-rw-r--r-- | games-util/dfhack/Manifest | 1 | ||||
-rw-r--r-- | games-util/dfhack/dfhack-0.44.12.2_p20190826.ebuild | 130 | ||||
l--------- | games-util/dfhack/files/dfhack-0.44.12.2_p20190826 | 1 |
3 files changed, 132 insertions, 0 deletions
diff --git a/games-util/dfhack/Manifest b/games-util/dfhack/Manifest index 845de3b..6becd7a 100644 --- a/games-util/dfhack/Manifest +++ b/games-util/dfhack/Manifest @@ -1 +1,2 @@ DIST libruby187.tar.gz 382504 SHA256 5b8c7ff0462e44fa39ce510084cd663443e05def63f33d3ecf5b4b3b80d112ad SHA512 dfaedd36c953a2cde6e1252ba9b91ba113523fc99faf47186aa02afe479d9f97d26abfa72e26d3aa32d26ae27f9c495c8888a355d86103571842acb32ae831a6 WHIRLPOOL a40ebd31907b13de1d054863e628320bf4bd2d175a5a3b5e5bb92bcb7d511f9dc9f240929c1de93356834ff60bb992b8782b88503e4b32077079d467b2742695 +DIST linux64-libruby187.so.gz 438052 BLAKE2B fb765937e1041d12be0d828cb3f6f5a8b0cb3e301323fc6bae1f570f1c7b461a162d559d69df998bf0f441a53cae38aaaae05154b22434f693318eb83859b398 SHA512 0fc0dfc2314b487b36c78f331e68104252a7370534e1ed8343551f831f1ce25dad5065ebe79e3f680f7c70fd3f6a569a3b532ead45772d89f40cd1d62bbc0e74 diff --git a/games-util/dfhack/dfhack-0.44.12.2_p20190826.ebuild b/games-util/dfhack/dfhack-0.44.12.2_p20190826.ebuild new file mode 100644 index 0000000..be242ba --- /dev/null +++ b/games-util/dfhack/dfhack-0.44.12.2_p20190826.ebuild @@ -0,0 +1,130 @@ +# By eroen <eroen-overlay@occam.eroen.eu>, 2012 - 2017 +# 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. + +EAPI=6 + +inherit versionator git-r3 cmake-utils + +df_PV=$(get_version_component_range 1-3) + +DESCRIPTION="Memory hacking library for Dwarf Fortress and a set of tools that use it" +HOMEPAGE="http://github.com/DFHack/dfhack" +EGIT_REPO_URI="https://github.com/DFHack/dfhack.git" +if [[ $PV == *.9999 ]]; then + EGIT_BRANCH="develop" +elif [[ $PV == *_alpha* || $PV == *_beta* ]]; then + EGIT_MIN_CLONE="single" + EGIT_COMMIT="${PV/_alpha/-alpha}" + EGIT_COMMIT="${EGIT_COMMIT/_beta/-beta}" +else + EGIT_MIN_CLONE_TYPE=mirror + EGIT_COMMIT="7a5902418e10aed3b15cdc2edc2d45c0491bdea2" + # xml_EGIT_COMMIT="X" +fi + +SRC_URI="https://github.com/DFHack/dfhack-bin/releases/download/0.44.09/linux64-libruby187.so.gz" + +KEYWORDS="-* ~amd64" # ~x86 + +CMAKE_MIN_VERSION=2.8.0 +CMAKE_REMOVE_MODULES_LIST="FindCurses FindDoxygen CMakeVS10FindMake" + +LICENSE="ZLIB MIT BSD-2 BSD CC-BY-SA-3.0" +SLOT="0" +IUSE="" + +# dfhack bundles lua (5.3 as of 0.43.05-alpha1) +HDEPEND=" + >=sys-devel/gcc-4.5 + dev-lang/perl + dev-perl/XML-LibXML + dev-perl/XML-LibXSLT + " +LIBRARY_DEPEND=" + sys-libs/zlib + " +DEPEND="${LIBRARY_DEPEND} + ${HDEPEND}" +RDEPEND="${LIBRARY_DEPEND} + ~games-roguelike/dwarf-fortress-$df_PV" + +PATCHES=( "$FILESDIR"/dfhack-$PV ) + +QA_PREBUILT="opt/dfhack/hack/libruby.so" + +src_unpack() { + git-r3_src_unpack + if [[ -n $xml_EGIT_COMMIT ]]; then + cd "$S/library/xml" || die + git checkout "$xml_EGIT_COMMIT" || die + fi + + default + #mv "$WORKDIR/linux64-libruby187.so" "$S/plugins/ruby/linux64/" || die + + #cp "$A" "$S/plugins/ruby/linux64/libruby.so.gz" +} + +src_prepare() { + cmake-utils_src_prepare + local install="\${HOME}/.dwarf-fortress-${df_PV}_dfhack" exe="./libs/Dwarf_Fortress" + sed -e "s:^install=.*:install=${install}:" \ + -e "s:^exe=.*:exe=\"${exe}\":" \ + "$FILESDIR"/dfhack > "$T"/dfhack || die + cp "$FILESDIR"/dfhack-run "$T" || die + + # No idea how this is supposed to work + sed -e 's/@.*@/gentoo/' \ + -e 's/#cmakedefine/#define/' \ + < library/include/git-describe.h.in \ + > library/include/git-describe.h || die + + # missing -lpthread + sed -e 's/${CMAKE_THREAD_LIBS_INIT}/& pthread/' \ + -i plugins/devel/CMakeLists.txt || die +} + +src_configure() { + local mycmakeargs=( + -DDFHACK_BUILD_ARCH=$(usex amd64 64 "")$(usex x86 32 "") + -DEXTERNAL_TINYXML=NO # https://bugs.gentoo.org/show_bug.cgi?id=592696 + -DCMAKE_INSTALL_PREFIX=/opt/dfhack + -DDFHACK_DATA_DESTINATION=/opt/dfhack/hack + -DDFHACK_LUA_DESTINATION=/opt/dfhack/hack/lua + -DDFHACK_PLUGIN_DESTINATION=/opt/dfhack/hack/plugins + -DDFHACK_LIBRARY_DESTINATION=/opt/dfhack/hack + -DDFHACK_RUBY_DESTINATION=/opt/dfhack/hack/ruby + -DBUILD_RUBY=ON + -DDOWNLOAD_RUBY=OFF + -DBUILD_DEV_PLUGINS=ON + -DBUILD_SKELETON=ON + ) + + cmake-utils_src_configure +} + +DOCS="" +src_install() { + cmake-utils_src_install + + dobin "$T"/dfhack{,-run} + + insinto /opt/dfhack/hack + insopts -m0755 + newins $WORKDIR/linux64-libruby187.so libruby.so +} + +pkg_postinst() { + elog "Due to Dwarf Fortress' special needs regarding working directory," + elog "specifying relative paths to DFHack plugins can give unintended results." + elog + elog "Your dfhack.init should be placed in \${HOME}/.dwarf-fortress-${df_PV}_dfhack/ ," + elog "otherwise the example configuration will be used." + elog + elog "To start DFHack, please run dfhack" + elog + elog "If you experience segfaults on launch, please try rebuilding dwarf-fortress" + elog "with compiler optimizations disabled (CXXFLAGS=\"-O0\"" +} diff --git a/games-util/dfhack/files/dfhack-0.44.12.2_p20190826 b/games-util/dfhack/files/dfhack-0.44.12.2_p20190826 new file mode 120000 index 0000000..b21aa70 --- /dev/null +++ b/games-util/dfhack/files/dfhack-0.44.12.2_p20190826 @@ -0,0 +1 @@ +dfhack-0.44.12.2_p20190721
\ No newline at end of file |