I've couldn't find an ebuild for this awesome game anywhere, so I created pretty much advanced ebuild for games-roguelike/dwarf-fortress myself njoy. Feel free to post bugs, or feature requests for this ebuild here. I've tweaked the installation so it should even work for multiuser, but I didn't test it actually. I also didn't test it on x86 gentoo, as I have only amd64 machines, but it should work. I've also added possibility to install DFG mod ( http://mayday.w.staszic.waw.pl/df.php ) with "dfg" use flag. But I couldn't find archive with only needed files and I don't have a place to store them myself, so it downloads full windows version of the game with the mod from homepage and rips needed files from it. This is my first "from scratch" ebuild, so It can contain stupid things, I'll be glad to read comments from ebuild gurus
Created attachment 208054 [details] ebuild for games-roguelike/dwarf-fortress
Created attachment 208059 [details] fixed some permissions game unfortunately needs write permissions for some files, so I doubt it's suitable for multiuser anyhow...
Created attachment 219583 [details] dwarf-fortress-9999.ebuild I've revised this ebuild quite a bit. I understand that mine is not eligable for going into the tree, but it does improve a great deal upon the other ebuild. It's not eligible for inclusion because of the following: - It's a live ebuild - On amd64, it depends on an ebuild having a multilib use flag which it doesn't have (my personal overlay has a modified fmod which has the multilib use flag) The improvements i've made are the following: - Build the bits which are open-source from source. - - Builds properly on amd64 machines - - Honors CFLAGS, CXXFLAGS, LDFLAGS, CC, and CXX - - Use all dynamic libraries instead of static ones - Use system libraries instead of bundled libraries where possible - Fixed the dependencies - Fixed some permissions problems You can see my overlay with the ebuild at http://github.com/eatnumber1/eatnumber1-overlay/tree/master/games-roguelike/dwarf-fortress/ If you are on amd64, it depends on a multilib fmod which can be found at http://github.com/eatnumber1/eatnumber1-overlay/blob/master/media-libs/fmod/fmod-4.26.00.ebuild I've also attached the dwarf-fortress ebuild and the patch it uses.
Created attachment 219585 [details, diff] dwarf-fortress-scm_gentoo.patch
Created attachment 219589 [details] dwarf-fortress-9999.ebuild Sorry, my last ebuild had a small bug.
The patch (In reply to comment #5) > Created an attachment (id=219589) [details] > dwarf-fortress-9999.ebuild > > Sorry, my last ebuild had a small bug. > Hi, The patch fails for me. I got the ebuild and patch from here. ***** dwarf-fortress-9999_gentoo.patch ***** ============================================ PATCH COMMAND: patch -p0 -g0 -E --no-backup-if-mismatch < '/usr/local/portage/games-roguelike/dwarf-fortress/files/dwarf-fortress-9999_gentoo.patch' ============================================ can't find file to patch at input line 5 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/g_src/SConscript b/g_src/SConscript |index b0e6bd1..edfc04b 100644 |--- a/g_src/SConscript |+++ b/g_src/SConscript -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored ============================================ PATCH COMMAND: patch -p1 -g0 -E --no-backup-if-mismatch < '/usr/local/portage/games-roguelike/dwarf-fortress/files/dwarf-fortress-9999_gentoo.patch' ============================================ patching file g_src/SConscript Hunk #1 succeeded at 1 with fuzz 2. Hunk #2 FAILED at 18. 1 out of 2 hunks FAILED -- saving rejects to file g_src/SConscript.rej ============================================ PATCH COMMAND: patch -p2 -g0 -E --no-backup-if-mismatch < '/usr/local/portage/games-roguelike/dwarf-fortress/files/dwarf-fortress-9999_gentoo.patch' ============================================ can't find file to patch at input line 5 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/g_src/SConscript b/g_src/SConscript |index b0e6bd1..edfc04b 100644 |--- a/g_src/SConscript |+++ b/g_src/SConscript -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored ============================================ PATCH COMMAND: patch -p3 -g0 -E --no-backup-if-mismatch < '/usr/local/portage/games-roguelike/dwarf-fortress/files/dwarf-fortress-9999_gentoo.patch' ============================================ missing header for unified diff at line 5 of patch can't find file to patch at input line 5 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/g_src/SConscript b/g_src/SConscript |index b0e6bd1..edfc04b 100644 |--- a/g_src/SConscript |+++ b/g_src/SConscript -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored ============================================ PATCH COMMAND: patch -p4 -g0 -E --no-backup-if-mismatch < '/usr/local/portage/games-roguelike/dwarf-fortress/files/dwarf-fortress-9999_gentoo.patch' ============================================ missing header for unified diff at line 5 of patch can't find file to patch at input line 5 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/g_src/SConscript b/g_src/SConscript |index b0e6bd1..edfc04b 100644 |--- a/g_src/SConscript |+++ b/g_src/SConscript -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored
The patch here won't work with the latest in the tree. I've pushed an ebuild that checks out the last commit before the one that breaks the patch. It's in my personal gentoo overlay. You can get it through layman (layman -a eatnumber1). I'll look into fixing the patch some when I have more time.
This ebuild is broken. The DFG21.zip download does not work. http://mayday.w.staszic.waw.pl/~mayday/upload/DFG21.zip
There is df-0.31.25 already. It works for me, but I have no sound and get an error.
Created attachment 305375 [details] dwarf-fortress-0.34.05.ebuild ebuild for the precompiled version 0.34.05 note that i changed "/var/games/dwarfort" to "/var/games/dwarf-fortress"
Created attachment 305377 [details] dwarf-fortress-0.34.05-wrapper
uploaded to sunrise-overlay will be available after svn review ( https://overlays.gentoo.org/svn/proj/sunrise/reviewed/games-rpg/dwarf-fortress/ )
Created attachment 305519 [details] dwarf-fortress-9999.ebuild working live-ebuild we need the new SConscript!
Created attachment 305521 [details] SConscript-gentoo another broken build system fixed...
live-ebuild also uploaded to sunrise-overlay
Created attachment 305523 [details] dwarf-fortress-wrapper fixy
Created attachment 305525 [details] dwarf-fortress-0.34.05.ebuild fixy
moved to the right category https://overlays.gentoo.org/svn/proj/sunrise/reviewed/games-roguelike/dwarf-fortress/
*** Bug 451390 has been marked as a duplicate of this bug. ***
Created attachment 381616 [details] dwarf-fortress-0.40.04.ebuild
Created attachment 381618 [details, diff] ttf_manager_width.patch
dwarf fortress as it is now would probably fit better in games-simulation/.
Created attachment 381738 [details] dwarf-fortress-0.40.05.ebuild rewrote the ebuild to use the arch method of cp -rsn /opt/dwarf-fortress ~/.dwarf-fortress.
unfortunately, recompiling the libgraphics.so seems to cause a bug with text rendering causing the assertion failure requiring the patch, which bypasses it, but causes misrendered text (e.g. when typing the game thinks the text is bigger than it is) also, I seem to be unable to attach the wrapper, so here it is: #!/bin/sh gamesdir=/opt/dwarf-fortress install="$HOME/.dwarf-fortress" do_install() { cp -rn "$gamesdir"/data "$install/" cp -rsn "$gamesdir"/* "$install/" } if [[ -d "$install" ]]; then do_install 2>/dev/null else mkdir "$install" || exit do_install || exit fi cd "$install" || exit exec ./libs/Dwarf_Fortress "$@"
Created attachment 381840 [details] dwarf-fortress-0.40.05.ebuild take 2
Hm, maybe it would be better to do the LD_PRELOAD hack and stay a little closer to upstream... Thoughts?
Created attachment 382018 [details] dwarf-fortress-0.40.05.ebuild take 3 rewrote the ebuild to use a custom makefile.
Created attachment 382020 [details] Makefile
Created attachment 382022 [details] cp dwarf-fortress wrapper as it turns out, firefox needs to be able to read a submitted file, and will raise no error if it cannot.
Created attachment 382114 [details] dwarf-fortress-0.40.07.ebuild moved around some commands to different phases for no particular reason, added epatch_user. considering moving ~/.dwarf-fortress to /var/games/dwarf-fortress/$USER, but I don't think that would be a good idea, since users are expected to modify the files manually. ulm gave OK on licenses via email (on the condition that my analysis is correct). feel free to do more searching; there might be stuff lurking in Dwarf_Fortress. untested: clean chroot (possibly missing deps), stable config (i.e. emul-linux-x86-*). otherwise, I think this is good to commit. going to ask for review on #-dev-help.
Created attachment 382116 [details] cp dwarf-fortress wrapper take 2 deletes dangling symlinks in case an update deletes a file. sorry for spam.
Comment on attachment 382114 [details] dwarf-fortress-0.40.07.ebuild version bump. upgrading properly may require deleting .dwarf-fortress/data/index. if anyone else can confirm, I'll add a rm data/index to the wrapper.
Created attachment 382586 [details] cp dwarf-fortress wrapper take 3 tested upgrade works fine.
Comment on attachment 382114 [details] dwarf-fortress-0.40.07.ebuild version bump. tested upgrade with new wrapper.
Created attachment 382650 [details] Makefile take 2 sort sources, remove unused ViewBase.cpp
Created attachment 382668 [details] dwarf-fortress-0.40.07.ebuild calls multilib_toolchain_setup unconditionally, might not work best on x86 or non-multilib machines
(In reply to Alex Xu (Hello71) from comment #36) > Created attachment 382668 [details] > dwarf-fortress-0.40.07.ebuild > LICENSE="BitstreamVera BSD free-noncomm" Can you rearrange this, so that the main license of the package is listed first: LICENSE="free-noncomm BitstreamVera BSD"
Created attachment 382736 [details] dwarf-fortress-0.40.09.ebuild rearranged as requested, also tested version bump.
Created attachment 383776 [details] dwarf-fortress-0.40.10.ebuild adjust deps.
QA_PREBUILT needs to use GAMES_PREFIX_OPT
Created attachment 383864 [details] dwarf-fortress-0.40.10.ebuild fix... stuff. add unsupported binary use flag for testing purposes.
Created attachment 384268 [details] dwarf-fortress-0.40.13.ebuild version bump, removed binary use flag as ordered
bugzilla sucks, how about sending a pull req to https://github.com/hasufell/hasufell-overlay last time I checked this game was so terribly buggy that I didn't want it in the tree yet, so working on it in an overlay seems reasonable
it's reasonably stable enough for packaging purposes (although gameplay is a different story entirely)
Created attachment 385210 [details] Makefile take 3 -Dlinux
Created attachment 389622 [details] dwarf-fortress-0.40.24.ebuild
Created attachment 389624 [details] Makefile take 4
Committed to tree.