From 1dbadd50401da78ba4f801ad12960412dc411f2b Mon Sep 17 00:00:00 2001 From: eroen Date: Wed, 21 Jun 2017 00:27:37 +0200 Subject: dfhack - hackily enable ruby22 --- games-util/dfhack/dfhack-0.43.05.1-r1.ebuild | 110 +++++++++++++++++++++++++++ games-util/dfhack/dfhack-0.43.05.1.ebuild | 107 -------------------------- 2 files changed, 110 insertions(+), 107 deletions(-) create mode 100644 games-util/dfhack/dfhack-0.43.05.1-r1.ebuild delete mode 100644 games-util/dfhack/dfhack-0.43.05.1.ebuild diff --git a/games-util/dfhack/dfhack-0.43.05.1-r1.ebuild b/games-util/dfhack/dfhack-0.43.05.1-r1.ebuild new file mode 100644 index 0000000..da37c78 --- /dev/null +++ b/games-util/dfhack/dfhack-0.43.05.1-r1.ebuild @@ -0,0 +1,110 @@ +# By eroen , 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}" +elif [[ $PV == *_pre* ]]; then + EGIT_MIN_CLONE_TYPE=mirror + EGIT_COMMIT="X" + xml_EGIT_COMMIT="X" +else + EGIT_COMMIT="${PV%.*}-r${PV##*.}" +fi + +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="ruby" + +# 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} + ruby? ( dev-lang/ruby:2.2 ) + ~games-roguelike/dwarf-fortress-$df_PV" + +PATCHES=( "$FILESDIR"/dfhack-$PV ) + +src_unpack() { + git-r3_src_unpack + if [[ -n $xml_EGIT_COMMIT ]]; then + cd "$S/library/xml" || die + git checkout "$xml_EGIT_COMMIT" || die + fi +} + +src_prepare() { + default + sed -e "s:libruby\.so:libruby22.so:" \ + -i plugins/ruby/ruby.cpp || die + + 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 +} + +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=$(usex ruby) + -DDOWNLOAD_RUBY=OFF + -DBUILD_DEV_PLUGINS=ON + -DBUILD_SKELETON=OFF + ) + + cmake-utils_src_configure +} + +DOCS=( ) +src_install() { + cmake-utils_src_install + + dobin "$T"/dfhack{,-run} +} + +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" +} diff --git a/games-util/dfhack/dfhack-0.43.05.1.ebuild b/games-util/dfhack/dfhack-0.43.05.1.ebuild deleted file mode 100644 index b2df8b8..0000000 --- a/games-util/dfhack/dfhack-0.43.05.1.ebuild +++ /dev/null @@ -1,107 +0,0 @@ -# By eroen , 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}" -elif [[ $PV == *_pre* ]]; then - EGIT_MIN_CLONE_TYPE=mirror - EGIT_COMMIT="X" - xml_EGIT_COMMIT="X" -else - EGIT_COMMIT="${PV%.*}-r${PV##*.}" -fi - -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 -} - -src_prepare() { - default - 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 -} - -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=OFF # TODO: downloads libruby.so - -DBUILD_DEV_PLUGINS=ON - -DBUILD_SKELETON=ON - ) - - cmake-utils_src_configure -} - -DOCS=( ) -src_install() { - cmake-utils_src_install - - dobin "$T"/dfhack{,-run} -} - -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" -} -- cgit v1.2.3-65-gdbad