Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 290294 - games-roguelike/dwarf-fortress - a single-player fantasy game
Summary: games-roguelike/dwarf-fortress - a single-player fantasy game
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High enhancement with 1 vote (vote)
Assignee: Gentoo Games
URL: http://www.bay12games.com/forum/index...
Whiteboard: [sunrise-overlay]
Keywords: EBUILD, InOverlay
: 451390 (view as bug list)
Depends on: 305033
Blocks:
  Show dependency tree
 
Reported: 2009-10-23 20:13 UTC by Art Win
Modified: 2019-04-26 02:25 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild for games-roguelike/dwarf-fortress (dwarf-fortress-0.28.181.40d-r16.ebuild,3.34 KB, text/plain)
2009-10-23 20:15 UTC, Art Win
Details
fixed some permissions (dwarf-fortress-0.28.181.40d-r16.ebuild,3.34 KB, text/plain)
2009-10-23 20:44 UTC, Art Win
Details
dwarf-fortress-9999.ebuild (dwarf-fortress-9999.ebuild,2.75 KB, text/plain)
2010-02-14 07:08 UTC, Russell Harmon
Details
dwarf-fortress-scm_gentoo.patch (dwarf-fortress-scm_gentoo.patch,2.63 KB, patch)
2010-02-14 07:09 UTC, Russell Harmon
Details | Diff
dwarf-fortress-9999.ebuild (dwarf-fortress-9999.ebuild,2.73 KB, text/plain)
2010-02-14 07:34 UTC, Russell Harmon
Details
dwarf-fortress-0.34.05.ebuild (dwarf-fortress-0.34.05.ebuild,2.48 KB, text/plain)
2012-03-14 22:09 UTC, Julian Ospald
Details
dwarf-fortress-0.34.05-wrapper (dwarf-fortress-0.34.05-wrapper,279 bytes, text/plain)
2012-03-14 22:10 UTC, Julian Ospald
Details
dwarf-fortress-9999.ebuild (dwarf-fortress-9999.ebuild,2.99 KB, text/plain)
2012-03-15 16:23 UTC, Julian Ospald
Details
SConscript-gentoo (SConscript-gentoo,1.79 KB, text/plain)
2012-03-15 16:24 UTC, Julian Ospald
Details
dwarf-fortress-wrapper (dwarf-fortress-wrapper,281 bytes, text/plain)
2012-03-15 16:28 UTC, Julian Ospald
Details
dwarf-fortress-0.34.05.ebuild (dwarf-fortress-0.34.05.ebuild,2.34 KB, text/plain)
2012-03-15 16:28 UTC, Julian Ospald
Details
dwarf-fortress-0.40.04.ebuild (dwarf-fortress-0.40.04.ebuild,3.37 KB, text/plain)
2014-07-26 21:42 UTC, Alex Xu (Hello71)
Details
ttf_manager_width.patch (ttf_manager_width.patch,753 bytes, patch)
2014-07-26 21:42 UTC, Alex Xu (Hello71)
Details | Diff
dwarf-fortress-0.40.05.ebuild (dwarf-fortress-0.40.05.ebuild,2.88 KB, text/plain)
2014-07-28 18:43 UTC, Alex Xu (Hello71)
Details
dwarf-fortress-0.40.05.ebuild take 2 (dwarf-fortress-0.40.05.ebuild,2.96 KB, text/plain)
2014-07-29 21:15 UTC, Alex Xu (Hello71)
Details
dwarf-fortress-0.40.05.ebuild take 3 (dwarf-fortress-0.40.05.ebuild,2.60 KB, text/plain)
2014-08-01 17:30 UTC, Alex Xu (Hello71)
Details
Makefile (Makefile,1.04 KB, text/plain)
2014-08-01 17:30 UTC, Alex Xu (Hello71)
Details
cp dwarf-fortress wrapper (dwarf-fortress,325 bytes, text/plain)
2014-08-01 17:31 UTC, Alex Xu (Hello71)
Details
dwarf-fortress-0.40.07.ebuild (dwarf-fortress-0.40.07.ebuild,2.82 KB, text/plain)
2014-08-02 23:24 UTC, Alex Xu (Hello71)
Details
cp dwarf-fortress wrapper take 2 (dwarf-fortress,427 bytes, application/x-shellscript)
2014-08-02 23:25 UTC, Alex Xu (Hello71)
Details
cp dwarf-fortress wrapper take 3 (dwarf-fortress,518 bytes, text/plain)
2014-08-09 12:50 UTC, Alex Xu (Hello71)
Details
Makefile take 2 (Makefile,1.07 KB, text/plain)
2014-08-11 01:22 UTC, Alex Xu (Hello71)
Details
dwarf-fortress-0.40.07.ebuild (dwarf-fortress-0.40.07.ebuild,2.61 KB, text/plain)
2014-08-11 12:16 UTC, Alex Xu (Hello71)
Details
dwarf-fortress-0.40.09.ebuild (dwarf-fortress-0.40.09.ebuild,2.61 KB, text/plain)
2014-08-12 11:40 UTC, Alex Xu (Hello71)
Details
dwarf-fortress-0.40.10.ebuild (dwarf-fortress-0.40.10.ebuild,2.76 KB, text/plain)
2014-08-27 00:47 UTC, Alex Xu (Hello71)
Details
dwarf-fortress-0.40.10.ebuild (dwarf-fortress-0.40.10.ebuild,3.22 KB, text/plain)
2014-08-28 14:23 UTC, Alex Xu (Hello71)
Details
dwarf-fortress-0.40.13.ebuild (dwarf-fortress-0.40.13.ebuild,2.37 KB, text/plain)
2014-09-06 00:27 UTC, Alex Xu (Hello71)
Details
Makefile take 3 (Makefile,1.08 KB, text/plain)
2014-09-21 02:50 UTC, Alex Xu (Hello71)
Details
dwarf-fortress-0.40.24.ebuild (dwarf-fortress-0.40.24.ebuild,2.40 KB, text/plain)
2014-11-18 13:52 UTC, Alex Xu (Hello71)
Details
Makefile take 4 (Makefile,1.09 KB, text/plain)
2014-11-18 13:52 UTC, Alex Xu (Hello71)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Art Win 2009-10-23 20:13:51 UTC
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
Comment 1 Art Win 2009-10-23 20:15:29 UTC
Created attachment 208054 [details]
ebuild for games-roguelike/dwarf-fortress
Comment 2 Art Win 2009-10-23 20:44:27 UTC
Created attachment 208059 [details]
fixed some permissions

game unfortunately needs write permissions for some files, so I doubt it's suitable for multiuser anyhow...
Comment 3 Russell Harmon 2010-02-14 07:08:31 UTC
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.
Comment 4 Russell Harmon 2010-02-14 07:09:11 UTC
Created attachment 219585 [details, diff]
dwarf-fortress-scm_gentoo.patch
Comment 5 Russell Harmon 2010-02-14 07:34:31 UTC
Created attachment 219589 [details]
dwarf-fortress-9999.ebuild

Sorry, my last ebuild had a small bug.
Comment 6 mcfiredrill 2010-04-14 20:48:42 UTC
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
Comment 7 Russell Harmon 2010-04-19 16:16:29 UTC
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.
Comment 8 Richard 2011-03-01 02:28:12 UTC
This ebuild is broken. The DFG21.zip download does not work.

http://mayday.w.staszic.waw.pl/~mayday/upload/DFG21.zip
Comment 9 neko259 2011-07-04 08:51:13 UTC
There is df-0.31.25 already. It works for me, but I have no sound and get an error.
Comment 10 Julian Ospald 2012-03-14 22:09:59 UTC
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"
Comment 11 Julian Ospald 2012-03-14 22:10:29 UTC
Created attachment 305377 [details]
dwarf-fortress-0.34.05-wrapper
Comment 12 Julian Ospald 2012-03-14 22:22:10 UTC
uploaded to sunrise-overlay

will be available after svn review

( https://overlays.gentoo.org/svn/proj/sunrise/reviewed/games-rpg/dwarf-fortress/ )
Comment 13 Julian Ospald 2012-03-15 16:23:44 UTC
Created attachment 305519 [details]
dwarf-fortress-9999.ebuild

working live-ebuild

we need the new SConscript!
Comment 14 Julian Ospald 2012-03-15 16:24:19 UTC
Created attachment 305521 [details]
SConscript-gentoo

another broken build system fixed...
Comment 15 Julian Ospald 2012-03-15 16:25:31 UTC
live-ebuild also uploaded to sunrise-overlay
Comment 16 Julian Ospald 2012-03-15 16:28:16 UTC
Created attachment 305523 [details]
dwarf-fortress-wrapper

fixy
Comment 17 Julian Ospald 2012-03-15 16:28:47 UTC
Created attachment 305525 [details]
dwarf-fortress-0.34.05.ebuild

fixy
Comment 18 Julian Ospald 2012-03-22 23:12:33 UTC
moved to the right category

https://overlays.gentoo.org/svn/proj/sunrise/reviewed/games-roguelike/dwarf-fortress/
Comment 19 Tim Harder gentoo-dev 2013-01-11 18:19:49 UTC
*** Bug 451390 has been marked as a duplicate of this bug. ***
Comment 20 Alex Xu (Hello71) 2014-07-26 21:42:32 UTC
Created attachment 381616 [details]
dwarf-fortress-0.40.04.ebuild
Comment 21 Alex Xu (Hello71) 2014-07-26 21:42:51 UTC
Created attachment 381618 [details, diff]
ttf_manager_width.patch
Comment 22 Alex Xu (Hello71) 2014-07-26 21:50:58 UTC
dwarf fortress as it is now would probably fit better in games-simulation/.
Comment 23 Alex Xu (Hello71) 2014-07-28 18:43:47 UTC
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.
Comment 24 Alex Xu (Hello71) 2014-07-29 21:14:30 UTC
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 "$@"
Comment 25 Alex Xu (Hello71) 2014-07-29 21:15:30 UTC
Created attachment 381840 [details]
dwarf-fortress-0.40.05.ebuild take 2
Comment 26 Alex Xu (Hello71) 2014-07-31 21:19:15 UTC
Hm, maybe it would be better to do the LD_PRELOAD hack and stay a little closer to upstream... Thoughts?
Comment 27 Alex Xu (Hello71) 2014-08-01 17:30:33 UTC
Created attachment 382018 [details]
dwarf-fortress-0.40.05.ebuild take 3

rewrote the ebuild to use a custom makefile.
Comment 28 Alex Xu (Hello71) 2014-08-01 17:30:51 UTC
Created attachment 382020 [details]
Makefile
Comment 29 Alex Xu (Hello71) 2014-08-01 17:31:41 UTC
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.
Comment 30 Alex Xu (Hello71) 2014-08-02 23:24:15 UTC
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.
Comment 31 Alex Xu (Hello71) 2014-08-02 23:25:23 UTC
Created attachment 382116 [details]
cp dwarf-fortress wrapper take 2

deletes dangling symlinks in case an update deletes a file.

sorry for spam.
Comment 32 Alex Xu (Hello71) 2014-08-03 21:29:45 UTC
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.
Comment 33 Alex Xu (Hello71) 2014-08-09 12:50:40 UTC
Created attachment 382586 [details]
cp dwarf-fortress wrapper take 3

tested upgrade works fine.
Comment 34 Alex Xu (Hello71) 2014-08-11 01:22:04 UTC
Comment on attachment 382114 [details]
dwarf-fortress-0.40.07.ebuild

version bump. tested upgrade with new wrapper.
Comment 35 Alex Xu (Hello71) 2014-08-11 01:22:33 UTC
Created attachment 382650 [details]
Makefile take 2

sort sources, remove unused ViewBase.cpp
Comment 36 Alex Xu (Hello71) 2014-08-11 12:16:34 UTC
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
Comment 37 Ulrich Müller gentoo-dev 2014-08-12 07:12:50 UTC
(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"
Comment 38 Alex Xu (Hello71) 2014-08-12 11:40:31 UTC
Created attachment 382736 [details]
dwarf-fortress-0.40.09.ebuild

rearranged as requested, also tested version bump.
Comment 39 Alex Xu (Hello71) 2014-08-27 00:47:27 UTC
Created attachment 383776 [details]
dwarf-fortress-0.40.10.ebuild

adjust deps.
Comment 40 Mr. Bones. (RETIRED) gentoo-dev 2014-08-27 03:30:56 UTC
QA_PREBUILT needs to use GAMES_PREFIX_OPT
Comment 41 Alex Xu (Hello71) 2014-08-28 14:23:50 UTC
Created attachment 383864 [details]
dwarf-fortress-0.40.10.ebuild

fix... stuff. add unsupported binary use flag for testing purposes.
Comment 42 Alex Xu (Hello71) 2014-09-06 00:27:22 UTC
Created attachment 384268 [details]
dwarf-fortress-0.40.13.ebuild

version bump, removed binary use flag as ordered
Comment 43 Julian Ospald 2014-09-12 16:55:13 UTC
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
Comment 44 Alex Xu (Hello71) 2014-09-12 17:37:37 UTC
it's reasonably stable enough for packaging purposes (although gameplay is a different story entirely)
Comment 45 Alex Xu (Hello71) 2014-09-21 02:50:00 UTC
Created attachment 385210 [details]
Makefile take 3

-Dlinux
Comment 46 Alex Xu (Hello71) 2014-11-18 13:52:36 UTC
Created attachment 389622 [details]
dwarf-fortress-0.40.24.ebuild
Comment 47 Alex Xu (Hello71) 2014-11-18 13:52:57 UTC
Created attachment 389624 [details]
Makefile take 4
Comment 48 Chris Reffett (RETIRED) gentoo-dev Security 2015-04-19 01:41:06 UTC
Committed to tree.