summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreroen <eroen@occam.eroen.eu>2014-08-12 23:51:27 +0200
committereroen <eroen@occam.eroen.eu>2014-08-14 11:15:39 +0200
commitfee1cd5727847b7c967d757066e1e58ba8627630 (patch)
tree1e4294a95405c877268bb89b6815266d561c64fa /games-util
parentdfhack - drop keywords on live version (diff)
downloaderoen-fee1cd5727847b7c967d757066e1e58ba8627630.tar.gz
eroen-fee1cd5727847b7c967d757066e1e58ba8627630.tar.bz2
eroen-fee1cd5727847b7c967d757066e1e58ba8627630.zip
dfhack - drop old live ebuild
Diffstat (limited to 'games-util')
-rw-r--r--games-util/dfhack/dfhack-9999.ebuild254
-rw-r--r--[l---------]games-util/dfhack/files/dfhack-0.40.06_pre20140808/01-compile-static-libraries-as.patch66
-rw-r--r--[l---------]games-util/dfhack/files/dfhack-0.40.06_pre20140808/03-configurable-install-paths.patch97
-rw-r--r--[l---------]games-util/dfhack/files/dfhack-0.40.06_pre20140808/04-compile-time-configurable.patch143
4 files changed, 303 insertions, 257 deletions
diff --git a/games-util/dfhack/dfhack-9999.ebuild b/games-util/dfhack/dfhack-9999.ebuild
deleted file mode 100644
index 3388e33..0000000
--- a/games-util/dfhack/dfhack-9999.ebuild
+++ /dev/null
@@ -1,254 +0,0 @@
-# By eroen, 2012-2013
-# Distributed under the terms of the ISC licence
-# $Header: $
-
-EAPI=5
-inherit base eutils versionator multilib git-2 cmake-utils games
-
-if [[ ${PV} == 9999 ]]; then
- MY_PV="0.34.11-r3"
-else
- MY_PV="$(replace_version_separator 3 '-r' \
- $(get_version_component_range -4))"
-fi
-MY_P=${PN}-${MY_PV}
-df_PV="34.11"
-
-DESCRIPTION="Memory hacking library for Dwarf Fortress and a set of tools that
-use it"
-HOMEPAGE="https://github.com/peterix/dfhack"
-EGIT_REPO_URI="git://github.com/peterix/dfhack.git"
-EGIT_HAS_SUBMODULES=yes
-
-if [[ ${PV} == 9999 ]]; then
- KEYWORDS=
-else
- if [[ $(get_version_component_count) -le 4 ]]; then
- EGIT_COMMIT=${MY_PV}
- else
- :
- fi
- KEYWORDS="~amd64"
-fi
-
-CMAKE_MIN_VERSION=2.8.9
-CMAKE_REMOVE_MODULES_LIST="FindCurses FindDoxygen CMakeVS10FindMake"
-
-LICENSE="ZLIB MIT BSD-2"
-SLOT="0"
-IUSE="api dfusion doc egg isoworld minimal ssense"
-
-HDEPEND="
- dev-perl/XML-LibXML
- dev-perl/XML-LibXSLT
- doc? ( app-doc/doxygen )"
-LIBRARY_DEPEND="
- sys-libs/zlib[abi_x86_32]
- ssense? ( media-libs/fontconfig[abi_x86_32]
- app-emulation/emul-linux-x86-baselibs[development]
- media-libs/freetype[abi_x86_32]
- x11-libs/libICE[abi_x86_32]
- x11-libs/libSM[abi_x86_32]
- x11-libs/libX11[abi_x86_32]
- x11-libs/libXcursor[abi_x86_32]
- x11-libs/libXext[abi_x86_32]
- x11-libs/libXinerama[abi_x86_32]
- x11-libs/libXrandr[abi_x86_32] )"
-DEPEND="${LIBRARY_DEPEND}
- ${HDEPEND}"
-RDEPEND="${LIBRARY_DEPEND}
- games-simulation/dwarffortress
- ssense? ( app-emulation/emul-linux-x86-opengl
- app-emulation/emul-linux-x86-xlibs )"
-
-## missing multilib
-#dev-lang/lua - binary bundled
-#dev-libs/protobuf - bundled
-## ssense
-#allegro - binary bundled
-# dev-libs/atk (libatk-1.0.so.0) - gtklibs
-# dev-libs/glib (libgthread-2.0.so.0,libglib-2.0.so.0,libgobject-2.0.so.0,libgmodule-2.0.so.0,libgio-2.0.so.0) - baselibs
-# media-libs/fontconfig (libfontconfig.so.1)
-# media-libs/freetype (libfreetype.so.6)
-# media-libs/jpeg:62 (libjpeg.so.62) - baselibs
-# virtual/glu (libGLU.so.1) - opengl
-# media-libs/libpng:1.2 (libpng12.so.0) - baselibs
-# virtual/opengl (libGL.so.1)
-# sys-libs/zlib (libz.so.1) - baselibs
-# x11-libs/cairo (libcairo.so.2) - gtklibs
-# x11-libs/gdk-pixbuf (libgdk_pixbuf) - gtklibs
-# x11-libs/gtk+ (libgdk-x11-2.0.so.0,libgtk-x11-2.0.so.0) - gtklibs
-# x11-libs/libICE (libICE.so.6)
-# x11-libs/libSM (libSM.so.6)
-# x11-libs/libX11 (libX11.so.6)
-# x11-libs/libXcursor (libXcursor.so.1)
-# x11-libs/libXext (libXext.so.6)
-# x11-libs/libXinerama (libXinerama.so.1)
-# x11-libs/libXrandr (libXrandr.so.2)
-# x11-libs/pango (libpangocairo-1.0.so.0,libpango-1.0.so.0,libpangoft2-1.0.so.0) - gtklibs
-
-multilib_toolchain_setup x86
-if use egg; then
- dfhack_libdir="$(games_get_libdir)"
-else
- dfhack_libdir="$(games_get_libdir)/${P}"
-fi
-QA_PREBUILT+="${dfhack_libdir}"/libruby.so
-
-pkg_setup() {
- df_executable="df-${df_PV}"
- dfhack_datadir="${GAMES_DATADIR}/${P}"
- dfhack_docdir="/usr/share/doc/${P}"
- dfhack_statedir="${GAMES_STATEDIR}/${P}"
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/${P}/01-compile-static-libraries-as.patch
- epatch "${FILESDIR}"/${P}/02-drop-strange-build-options.patch
- epatch "${FILESDIR}"/${P}/03-configurable-install-paths.patch
- epatch "${FILESDIR}"/${P}/04-compile-time-configurable.patch
- epatch "${FILESDIR}"/${P}/05-compile-time-configurable-0.patch
- epatch "${FILESDIR}"/${P}/06-compile-time-configurable-1.patch
- epatch "${FILESDIR}"/${P}/07-startup-scripts-configurable.patch
- epatch "${FILESDIR}"/${P}/08-ruby-plugin-configurable-paths.patch
- epatch "${FILESDIR}"/${P}/09-eggy-remove-annoying-banner.patch
-
- pushd "${S}"/depends/clsocket
- epatch "${FILESDIR}"/clsocket/0001-Compile-static-library-as-PIC.patch
- popd
-
- if use ssense; then
- pushd "${S}"/plugins/stonesense
- epatch "${FILESDIR}"/stonesense-${PV}/01-null-isn-t-an-int32.patch
- epatch "${FILESDIR}"/stonesense-${PV}/02-configurable-install-paths.patch
- epatch "${FILESDIR}"/stonesense-${PV}/03-don-t-segfault-if-logfile-is.patch
- epatch "${FILESDIR}"/stonesense-${PV}/04-compile-time-configuration-of.patch
- epatch "${FILESDIR}"/stonesense-${PV}/05-compile-time-configurable-log.patch
- epatch "${FILESDIR}"/stonesense-${PV}/06-fix-b0rked-xml-file.patch
- epatch "${FILESDIR}"/stonesense-${PV}/07-compile-time-configurable-dump.patch
- epatch "${FILESDIR}"/stonesense-${PV}/08-compile-time-configurable.patch
- # Patches that no longer fit upstream, not updated yet.
- #epatch "${FILESDIR}"/stonesense/0003-screenshots-in-home-dir.patch
- popd
- fi
- if use isoworld; then
- pushd "${S}"/plugins/isoworld
- epatch "${FILESDIR}"/isoworld-${PV}/01-missing-include-dir.patch
- popd
- ewarn "The isoworld plugin requires agui, and will probably fail to build"
- fi
-
- # Fix other scripts
-# if use dfusion; then
-# sed -f - -i plugins/Dfusion/luafiles/{init.lua,friendship/{init.lua,plugin.lua,install.lua},triggers/{plugin.lua,functions_menu.lua},friendship_civ/init.lua,common.lua,embark/{init.lua,plugin.lua},migrants/{init.lua,plugin.lua},xml_struct.lua,xml_types.lua} <<- EOF || die
-# s:("dfusion/:("${datadir}/dfusion/:
-# s:('dfusion/:('${datadir}/dfusion/:
-# EOF
-# sed -i "s:libs/Dwarf_Fortress:Dwarf_Fortress:" plugins/Dfusion/luafiles/common.lua
-# fi
-
- ##Issues:
- # - df version
- # - dfusion is strange. It's always been that, though.
- # - prebuilt ruby
- # - prebuilt lua
- # - isoworld requires agui
- # - prebuilt allegro for stonesense.
- # - stonesense conf file: /usr/share/games/dfhack-9999/stonesense/init.txt
- # Set in ./Config.cpp, installed together with the rest of the directory.
- # - output files
- # - - Make symlinks to (unversioned) /var
-}
-
-src_configure() {
- mycmakeargs=(
- "$(cmake-utils_use api BUILD_DEVEL)"
- "$(cmake-utils_use dfusion BUILD_DFUSION)"
- "$(cmake-utils_use doc BUILD_DOXYGEN)"
- "$(cmake-utils_use egg BUILD_EGGY)"
- "$(cmake-utils_use isoworld BUILD_ISOWORLD)"
- "-DBUILD_LIBRARY=ON"
- "-DBUILD_PLUGINS=ON"
- "-DBUILD_RUBY=ON"
- "-DBUILD_SKELETON=OFF"
- "$(cmake-utils_use ssense BUILD_STONESENSE)"
- "-DCMAKE_INSTALL_PREFIX=${GAMES_DATADIR}"
- "-DCONSOLE_NO_CATCH=OFF"
- "-DDL_RUBY=ON"
-
- "-DDF_EXECUTABLE=${df_executable}"
- "-DDFHACK_STATEDIR=${GAMES_STATEDIR}/${P}"
- "-DDFHACK_BINARY_DESTINATION=${GAMES_BINDIR}"
- "-DDFHACK_LIBRARY_DESTINATION=${dfhack_libdir}"
- "-DDFHACK_EGGY_DESTINATION=${dfhack_libdir}"
- "-DDFHACK_DATA_DESTINATION=${dfhack_datadir}"
- "-DDFHACK_PLUGIN_DESTINATION=${dfhack_datadir}/plugins"
- "-DDFHACK_LUA_DESTINATION=${dfhack_datadir}/lua"
- "-DDFHACK_RUBY_DESTINATION=${dfhack_datadir}/ruby"
- "-DDFHACK_INCLUDES_DESTINATION=/usr/games/include"
- "-DDFHACK_DEVLIB_DESTINATION=${dfhack_datadir}/devlib"
- "-DDFHACK_USERDOC_DESTINATION=${dfhack_docdir}"
- "-DDFHACK_DEVDOC_DESTINATION=${dfhack_docdir}/dev"
- "-DSSENSE_ALLEGRO_DESTINATION=${dfhack_libdir}"
- "-DSSENSE_RES_DESTINATION=${dfhack_datadir}/stonesense"
- "-DSSENSE_DOC_DESTINATION=${dfhack_docdir}/stonesense"
- )
- if use minimal; then
- mycmakeargs+=(
- "-DBUILD_DEV_PLUGINS=OFF"
- "-DBUILD_DWARFEXPORT=OFF"
- "-DBUILD_MAPEXPORT=OFF"
- "-DBUILD_SUPPORTED=OFF"
- )
- else
- mycmakeargs+=(
- "-DBUILD_DEV_PLUGINS=ON"
- "-DBUILD_DWARFEXPORT=ON"
- "-DBUILD_MAPEXPORT=ON"
- "-DBUILD_SUPPORTED=ON"
- )
- fi
-
- cmake-utils_src_configure
-}
-
-src_compile() {
- cmake-utils_src_compile
-}
-
-src_install() {
- cmake-utils_src_install
- mv "${D}/${GAMES_BINDIR}/dfhack" \
- "${D}/${GAMES_BINDIR}/dfhack-${PV}" || die
- mv "${D}/${GAMES_BINDIR}/dfhack-run" \
- "${D}/${GAMES_BINDIR}/dfhack-run-${PV}" || die
- dodir "${dfhack_statedir}"
- if use ssense; then
- dodir "${GAMES_SYSCONFDIR#/}/${P}/stonesense"
- mv "${D}/${dfhack_datadir#/}/stonesense/init.txt" \
- "${D}/${GAMES_SYSCONFDIR#/}/${P}/stonesense/init.txt" || die
- dosym "${ROOT}${GAMES_SYSCONFDIR#/}/${P}/stonesense/init.txt" \
- "${dfhack_datadir#/}/stonesense/init.txt"
- elog
- elog "The Stonesense configuration file can be found at"
- elog "${GAMES_SYSCONFDIR#/}/${P}/stonesense/init.txt"
- fi
- prepgamesdirs
- fperms g+w "${dfhack_statedir}" || die
- # portage user needs to be able to link:
- ( ! use egg || fperms o+rx "$(games_get_libdir)"/libegg.so ) || die
-}
-
-pkg_postinst() {
- games_pkg_postinst
- elog
- elog "Due to Dwarf Fortress' special needs regarding working directory,"
- elog "specifying relative paths to DFHack plugins can give unintended"
- elog "results."
- elog
- elog "DFHack installs custom raw files for dwarffortress in"
- elog "${dfhack_datadir}/raw"
- elog "To use them, copy them into your raw folder and apply the diffs."
- elog
- elog "To start DFHack, please run dfhack-${PV}"
-}
diff --git a/games-util/dfhack/files/dfhack-0.40.06_pre20140808/01-compile-static-libraries-as.patch b/games-util/dfhack/files/dfhack-0.40.06_pre20140808/01-compile-static-libraries-as.patch
index 5efdd5d..2166a50 120000..100644
--- a/games-util/dfhack/files/dfhack-0.40.06_pre20140808/01-compile-static-libraries-as.patch
+++ b/games-util/dfhack/files/dfhack-0.40.06_pre20140808/01-compile-static-libraries-as.patch
@@ -1 +1,65 @@
-../dfhack-9999/01-compile-static-libraries-as.patch \ No newline at end of file
+Compile static libraries as PIC.
+
+From: eroen <eroen@occam.eroen.eu>
+
+Otherwise, we get position dependent textrels in the shared libraries
+that link against them, which is slightly bad for performance (and very
+bad for portability).
+
+Cross-platform support for handling this was added in cmake 2.8.9.
+---
+ CMakeLists.txt | 2 +-
+ depends/md5/CMakeLists.txt | 3 ++-
+ depends/tinyxml/CMakeLists.txt | 3 ++-
+ depends/tthread/CMakeLists.txt | 3 ++-
+ 4 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c7c84e8..abff6a8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -11,7 +11,7 @@ else(CMAKE_CONFIGURATION_TYPES)
+ endif(CMAKE_CONFIGURATION_TYPES)
+
+ ## some generic CMake magic
+-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
++cmake_minimum_required(VERSION 2.8.9 FATAL_ERROR)
+ project(dfhack)
+
+ if(MSVC)
+diff --git a/depends/md5/CMakeLists.txt b/depends/md5/CMakeLists.txt
+index 69e0cf0..df14e3c 100644
+--- a/depends/md5/CMakeLists.txt
++++ b/depends/md5/CMakeLists.txt
+@@ -1,3 +1,4 @@
+ project(dfhack-md5)
+ ADD_LIBRARY(dfhack-md5 STATIC EXCLUDE_FROM_ALL md5.cpp md5wrapper.cpp)
+-IDE_FOLDER(dfhack-md5 "Depends")
+\ No newline at end of file
++set_target_properties(dfhack-md5 PROPERTIES POSITION_INDEPENDENT_CODE True)
++IDE_FOLDER(dfhack-md5 "Depends")
+diff --git a/depends/tinyxml/CMakeLists.txt b/depends/tinyxml/CMakeLists.txt
+index 7d92492..f97f4bc 100644
+--- a/depends/tinyxml/CMakeLists.txt
++++ b/depends/tinyxml/CMakeLists.txt
+@@ -1,3 +1,4 @@
+ project(dfhack-tinyxml)
+ ADD_LIBRARY(dfhack-tinyxml STATIC EXCLUDE_FROM_ALL tinystr.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp)
+-IDE_FOLDER(dfhack-tinyxml "Depends")
+\ No newline at end of file
++set_target_properties(dfhack-tinyxml PROPERTIES POSITION_INDEPENDENT_CODE True)
++IDE_FOLDER(dfhack-tinyxml "Depends")
+diff --git a/depends/tthread/CMakeLists.txt b/depends/tthread/CMakeLists.txt
+index d34c19c..2757a6e 100644
+--- a/depends/tthread/CMakeLists.txt
++++ b/depends/tthread/CMakeLists.txt
+@@ -1,6 +1,7 @@
+ PROJECT(dfhack-tinythread)
+ ADD_LIBRARY(dfhack-tinythread STATIC EXCLUDE_FROM_ALL tinythread.cpp)
++set_target_properties(dfhack-tinythread PROPERTIES POSITION_INDEPENDENT_CODE True)
+ if(UNIX)
+ target_link_libraries(dfhack-tinythread pthread)
+ endif()
+-IDE_FOLDER(dfhack-tinythread "Depends")
+\ No newline at end of file
++IDE_FOLDER(dfhack-tinythread "Depends")
diff --git a/games-util/dfhack/files/dfhack-0.40.06_pre20140808/03-configurable-install-paths.patch b/games-util/dfhack/files/dfhack-0.40.06_pre20140808/03-configurable-install-paths.patch
index 05196d3..35c957e 120000..100644
--- a/games-util/dfhack/files/dfhack-0.40.06_pre20140808/03-configurable-install-paths.patch
+++ b/games-util/dfhack/files/dfhack-0.40.06_pre20140808/03-configurable-install-paths.patch
@@ -1 +1,96 @@
-../dfhack-9999/03-configurable-install-paths.patch \ No newline at end of file
+configurable install paths
+
+From: eroen <eroen@occam.eroen.eu>
+
+
+---
+ CMakeLists.txt | 20 +++++++++++---------
+ library/CMakeLists.txt | 6 +++---
+ plugins/ruby/CMakeLists.txt | 4 ++--
+ 3 files changed, 16 insertions(+), 14 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 194eec7..4f196c9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -68,30 +68,32 @@ add_definitions(-DDFHACK_VERSION="${DFHACK_VERSION}")
+ # the dfhack libraries will be installed here:
+ IF(UNIX)
+ # put the lib into DF/hack
+- SET(DFHACK_LIBRARY_DESTINATION hack)
+- SET(DFHACK_EGGY_DESTINATION libs)
++ SET(DFHACK_LIBRARY_DESTINATION hack CACHE PATH "DFHACK_LIBRARY_DESTINATION")
++ SET(DFHACK_EGGY_DESTINATION libs CACHE PATH "DFHACK_EGGY_DESTINATION")
+ ELSE()
+ # windows is crap, therefore we can't do nice things with it. leave the libs on a nasty pile...
+ SET(DFHACK_LIBRARY_DESTINATION .)
+ SET(DFHACK_EGGY_DESTINATION .)
+ ENDIF()
+ # external tools will be installed here:
+-SET(DFHACK_BINARY_DESTINATION .)
++SET(DFHACK_BINARY_DESTINATION . CACHE PATH "DFHACK_BINARY_DESTINATION")
+ # dfhack data goes here:
+-SET(DFHACK_DATA_DESTINATION hack)
++SET(DFHACK_DATA_DESTINATION hack CACHE PATH "DFHACK_DATA_DESTINATION")
+ # plugin libs go here:
+-SET(DFHACK_PLUGIN_DESTINATION hack/plugins)
++SET(DFHACK_PLUGIN_DESTINATION hack/plugins CACHE PATH "DFHACK_PLUGIN_DESTINATION")
+ # dfhack header files go here:
+-SET(DFHACK_INCLUDES_DESTINATION hack/include)
++SET(DFHACK_INCLUDES_DESTINATION hack/include CACHE PATH "DFHACK_INCLUDES_DESTINATION")
+ # dfhack lua files go here:
+-SET(DFHACK_LUA_DESTINATION hack/lua)
++SET(DFHACK_LUA_DESTINATION hack/lua CACHE PATH "DFHACK_LUA_DESTINATION")
++# dfhack ruby files go here:
++SET(DFHACK_RUBY_DESTINATION hack/ruby CACHE PATH "DFHACK_RUBY_DESTINATION")
+ # the windows .lib file goes here:
+ SET(DFHACK_DEVLIB_DESTINATION hack)
+
+ # user documentation goes here:
+-SET(DFHACK_USERDOC_DESTINATION hack)
++SET(DFHACK_USERDOC_DESTINATION hack CACHE PATH "DFHACK_USERDOC_DESTINATION")
+ # developer documentation goes here:
+-SET(DFHACK_DEVDOC_DESTINATION hack)
++SET(DFHACK_DEVDOC_DESTINATION hack CACHE PATH "DFHACK_DEVDOC_DESTINATION")
+
+ ## some options for the user/developer to play with
+ OPTION(BUILD_LIBRARY "Build the library that goes into DF." ON)
+diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
+index 2538360..18635ed 100644
+--- a/library/CMakeLists.txt
++++ b/library/CMakeLists.txt
+@@ -302,9 +302,9 @@ IF(UNIX)
+ else()
+ # On linux, copy our version of the df launch script which sets LD_PRELOAD
+ install(PROGRAMS ${dfhack_SOURCE_DIR}/package/linux/dfhack
+- DESTINATION .)
++ DESTINATION ${DFHACK_BINARY_DESTINATION})
+ install(PROGRAMS ${dfhack_SOURCE_DIR}/package/linux/dfhack-run
+- DESTINATION .)
++ DESTINATION ${DFHACK_BINARY_DESTINATION})
+ endif()
+ ELSE()
+ if(NOT BUILD_EGGY)
+@@ -330,7 +330,7 @@ install(FILES xml/symbols.xml
+ DESTINATION ${DFHACK_DATA_DESTINATION}) #linux: share/dfhack
+ #install the example autoexec file
+ install(FILES ../dfhack.init-example
+- DESTINATION ${DFHACK_BINARY_DESTINATION})
++ DESTINATION ${DFHACK_USERDOC_DESTINATION})
+
+ install(TARGETS dfhack-run dfhack-client binpatch
+ LIBRARY DESTINATION ${DFHACK_LIBRARY_DESTINATION}
+diff --git a/plugins/ruby/CMakeLists.txt b/plugins/ruby/CMakeLists.txt
+index 9d821f9..e6d3eff 100644
+--- a/plugins/ruby/CMakeLists.txt
++++ b/plugins/ruby/CMakeLists.txt
+@@ -35,7 +35,7 @@ ADD_DEPENDENCIES(ruby ruby-autogen-rb)
+ INSTALL(FILES ${RUBYLIB} DESTINATION ${DFHACK_LIBRARY_DESTINATION})
+
+ INSTALL(DIRECTORY .
+- DESTINATION hack/ruby
++ DESTINATION ${DFHACK_RUBY_DESTINATION}
+ FILES_MATCHING PATTERN "*.rb")
+
+-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ruby-autogen.rb DESTINATION hack/ruby)
++INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ruby-autogen.rb DESTINATION ${DFHACK_RUBY_DESTINATION})
diff --git a/games-util/dfhack/files/dfhack-0.40.06_pre20140808/04-compile-time-configurable.patch b/games-util/dfhack/files/dfhack-0.40.06_pre20140808/04-compile-time-configurable.patch
index aba03a3..1c12d3b 120000..100644
--- a/games-util/dfhack/files/dfhack-0.40.06_pre20140808/04-compile-time-configurable.patch
+++ b/games-util/dfhack/files/dfhack-0.40.06_pre20140808/04-compile-time-configurable.patch
@@ -1 +1,142 @@
-../dfhack-9999/04-compile-time-configurable.patch \ No newline at end of file
+compile-time configurable paths
+
+From: eroen <eroen@occam.eroen.eu>
+
+./hack/symbols.xml
+- Breaks startup
+
+./hack/lua
+./hack/ruby
+- Make noise on startup
+---
+ CMakeLists.txt | 4 ++++
+ depends/lua/include/luaconf.h | 8 ++++++++
+ library/Core.cpp | 6 +++++-
+ plugins/ruby/ruby.cpp | 8 ++++++++
+ plugins/sort.cpp | 8 ++++++++
+ 5 files changed, 33 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4f196c9..77a8d97 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -69,6 +69,7 @@ add_definitions(-DDFHACK_VERSION="${DFHACK_VERSION}")
+ IF(UNIX)
+ # put the lib into DF/hack
+ SET(DFHACK_LIBRARY_DESTINATION hack CACHE PATH "DFHACK_LIBRARY_DESTINATION")
++ ADD_DEFINITIONS(-DDFHACK_LIBRARY_DESTINATION="${DFHACK_LIBRARY_DESTINATION}")
+ SET(DFHACK_EGGY_DESTINATION libs CACHE PATH "DFHACK_EGGY_DESTINATION")
+ ELSE()
+ # windows is crap, therefore we can't do nice things with it. leave the libs on a nasty pile...
+@@ -79,14 +80,17 @@ ENDIF()
+ SET(DFHACK_BINARY_DESTINATION . CACHE PATH "DFHACK_BINARY_DESTINATION")
+ # dfhack data goes here:
+ SET(DFHACK_DATA_DESTINATION hack CACHE PATH "DFHACK_DATA_DESTINATION")
++ADD_DEFINITIONS(-DDFHACK_DATA_DESTINATION="${DFHACK_DATA_DESTINATION}")
+ # plugin libs go here:
+ SET(DFHACK_PLUGIN_DESTINATION hack/plugins CACHE PATH "DFHACK_PLUGIN_DESTINATION")
+ # dfhack header files go here:
+ SET(DFHACK_INCLUDES_DESTINATION hack/include CACHE PATH "DFHACK_INCLUDES_DESTINATION")
+ # dfhack lua files go here:
+ SET(DFHACK_LUA_DESTINATION hack/lua CACHE PATH "DFHACK_LUA_DESTINATION")
++ADD_DEFINITIONS(-DDFHACK_LUA_DESTINATION="${DFHACK_LUA_DESTINATION}")
+ # dfhack ruby files go here:
+ SET(DFHACK_RUBY_DESTINATION hack/ruby CACHE PATH "DFHACK_RUBY_DESTINATION")
++ADD_DEFINITIONS(-DDFHACK_RUBY_DESTINATION="${DFHACK_RUBY_DESTINATION}")
+ # the windows .lib file goes here:
+ SET(DFHACK_DEVLIB_DESTINATION hack)
+
+diff --git a/depends/lua/include/luaconf.h b/depends/lua/include/luaconf.h
+index 766752f..c73e094 100644
+--- a/depends/lua/include/luaconf.h
++++ b/depends/lua/include/luaconf.h
+@@ -98,8 +98,16 @@
+
+ #else /* }{ */
+
++#ifdef DFHACK_LUA_DESTINATION
++#define LUA_LDIR DFHACK_LUA_DESTINATION "/"
++#else
+ #define LUA_LDIR "./hack/lua/"
++#endif
++#ifdef DFHACK_DATA_DESTINATION
++#define LUA_CDIR DFHACK_DATA_DESTINATION "/"
++#else
+ #define LUA_CDIR "./hack/"
++#endif
+ #define LUA_PATH_DEFAULT \
+ LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" "./?.lua"
+ #define LUA_CPATH_DEFAULT \
+diff --git a/library/Core.cpp b/library/Core.cpp
+index 2021a8b..e72decd 100644
+--- a/library/Core.cpp
++++ b/library/Core.cpp
+@@ -879,7 +879,11 @@ bool Core::Init()
+
+ // find out what we are...
+ #ifdef LINUX_BUILD
+- const char * path = "hack/symbols.xml";
++ #ifdef DFHACK_DATA_DESTINATION
++ const char * path = DFHACK_DATA_DESTINATION "/symbols.xml";
++ #else
++ const char * path = "hack/symbols.xml";
++ #endif
+ #else
+ const char * path = "hack\\symbols.xml";
+ #endif
+diff --git a/plugins/ruby/ruby.cpp b/plugins/ruby/ruby.cpp
+index 69b9b15..534ad9f 100644
+--- a/plugins/ruby/ruby.cpp
++++ b/plugins/ruby/ruby.cpp
+@@ -315,7 +315,11 @@ static int df_loadruby(void)
+ #elif defined(__APPLE__)
+ "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby.1.dylib";
+ #else
++ #ifdef DFHACK_LIBRARY_DESTINATION
++ DFHACK_LIBRARY_DESTINATION "/libruby.so";
++ #else
+ "hack/libruby.so";
++ #endif
+ #endif
+
+ libruby_handle = OpenPlugin(libpath);
+@@ -418,7 +422,11 @@ static void df_rubythread(void *p)
+
+ // load the default ruby-level definitions in the background
+ state=0;
++ #ifdef DFHACK_RUBY_DESTINATION
++ rb_eval_string_protect("require '" DFHACK_RUBY_DESTINATION "/ruby'", &state);
++ #else
+ rb_eval_string_protect("require './hack/ruby/ruby'", &state);
++ #endif
+ if (state)
+ dump_rb_error();
+
+diff --git a/plugins/sort.cpp b/plugins/sort.cpp
+index 95ae109..510e288 100644
+--- a/plugins/sort.cpp
++++ b/plugins/sort.cpp
+@@ -64,7 +64,11 @@ DFhackCExport command_result plugin_init (color_ostream &out, std::vector <Plugi
+ " The '>' prefix reverses the sort order for defined values.\n"
+ " Unit order examples:\n"
+ " name, age, arrival, squad, squad_position, profession\n"
++ #ifdef DFHACK_LUA_DESTINATION
++ "The orderings are defined in " DFHACK_LUA_DESTINATION "/plugins/sort/*.lua\n"
++ #else
+ "The orderings are defined in hack/lua/plugins/sort/*.lua\n"
++ #endif
+ ));
+ commands.push_back(PluginCommand(
+ "sort-items", "Sort the visible item list.", sort_items, item_list_hotkey,
+@@ -74,7 +78,11 @@ DFhackCExport command_result plugin_init (color_ostream &out, std::vector <Plugi
+ " The '>' prefix reverses the sort order for defined values.\n"
+ " Item order examples:\n"
+ " description, material, wear, type, quality\n"
++ #ifdef DFHACK_LUA_DESTINATION
++ "The orderings are defined in " DFHACK_LUA_DESTINATION "/plugins/sort/*.lua\n"
++ #else
+ "The orderings are defined in hack/lua/plugins/sort/*.lua\n"
++ #endif
+ ));
+ return CR_OK;
+ }