gentoo-ebuilds/games-roguelike/dwarf-fortress/dwarf-fortress-51.13.ebuild
James Le Cuirot ba3b4d7713
games-roguelike/dwarf-fortress: Version bump to 51.13, now binary-only
Upstream still ships the source code for the graphical component, but it
has frequently been unusable or has at least required heavy patching. We
are no longer interested in trying to fix code that is so blatantly
broken. There is little need to build this from source when the rest is
proprietary anyway.

The game writes its save data among the rest of the game files. This was
previously worked around using copies and symlinks, but this was messy,
and went against upstream's advice of not extracting newer versions over
the top of older versions. We now set up an overlay with bubblewrap
instead.

The user data directory has moved from ~/.dwarf-fortress to
~/.local/share/dwarf-fortress. No old save data is migrated because
version 50.01 broke compatibility anyway.

32-bit x86 is no longer supported by upstream.

Closes: https://bugs.gentoo.org/702918
Closes: https://bugs.gentoo.org/739328
Closes: https://bugs.gentoo.org/831875
Closes: https://bugs.gentoo.org/906145
Closes: https://bugs.gentoo.org/937581
Closes: https://bugs.gentoo.org/952854
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
2025-07-20 09:14:42 +01:00

62 lines
1.4 KiB
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop prefix xdg
MY_P="df_${PV//./_}"
DESCRIPTION="Single-player fantasy game"
HOMEPAGE="https://www.bay12games.com/dwarves/"
SRC_URI="https://www.bay12games.com/dwarves/${MY_P}_linux.tar.bz2
https://dev.gentoo.org/~ionen/distfiles/${PN}.png"
S="${WORKDIR}"
LICENSE="free-noncomm BSD BitstreamVera"
SLOT="0"
KEYWORDS="-* ~amd64"
RDEPEND="
media-libs/libsdl2[joystick,opengl,video]
media-libs/sdl2-image[png]
sys-apps/bubblewrap
"
BDEPEND="
dev-util/patchelf
"
DIR="/opt/${PN}"
QA_PREBUILT="${DIR#/}/*"
src_compile() {
patchelf --set-rpath "${EPREFIX}${DIR}" dwarfort *.so* || die
}
src_install() {
insinto "${DIR}"
exeinto "${DIR}"
doins -r data/
# libsdl_mixer_plugin.so seems unused. It is referenced in
# music_and_sound.cpp but not in any binaries.
doexe dwarfort libfmod_plugin.so libfmod.so.* libg_src_lib.so
dobin "$(prefixify_ro "${FILESDIR}"/dwarf-fortress)"
doicon -s 128 "${DISTDIR}"/${PN}.png
make_desktop_entry dwarf-fortress "Dwarf Fortress"
dodoc *.txt
}
pkg_postinst() {
xdg_pkg_postinst
local pv
for pv in ${REPLACING_VERSIONS}; do
# Check https://dwarffortresswiki.org/Release_information when bumping.
ver_test ${pv%%.*} -lt 50.01 && ewarn "Save data from ${pv} is not compatible with this new major version."
done
}