diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-10-09 19:32:31 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-10-09 19:32:31 +0100 |
commit | 861ffe012c63c48053fb77b5110cbe900f651dfd (patch) | |
tree | 3c59644581a43a1bcde4f45d912b96b4dd44f446 /games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05-r1.ebuild | |
parent | 759ce88b1b7c5011b611ddefc6c5ce8513210e46 (diff) |
gentoo auto-resync : 09:10:2022 - 19:32:30
Diffstat (limited to 'games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05-r1.ebuild')
-rw-r--r-- | games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05-r1.ebuild | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05-r1.ebuild b/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05-r1.ebuild new file mode 100644 index 000000000000..09f1a0c25b24 --- /dev/null +++ b/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05-r1.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop flag-o-matic optfeature prefix readme.gentoo-r1 toolchain-funcs + +MY_P="df_$(ver_rs 1- _ $(ver_cut 2-))" + +DESCRIPTION="Single-player fantasy game" +HOMEPAGE="https://www.bay12games.com/dwarves/" +SRC_URI=" + amd64? ( https://www.bay12games.com/dwarves/${MY_P}_linux.tar.bz2 ) + x86? ( https://www.bay12games.com/dwarves/${MY_P}_linux32.tar.bz2 ) + https://dev.gentoo.org/~ionen/distfiles/${PN}.png" +S="${WORKDIR}/df_linux" + +LICENSE="free-noncomm BSD BitstreamVera" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" +IUSE="debug gui" + +RDEPEND=" + dev-libs/glib:2 + media-libs/glew:0= + media-libs/libglvnd[X] + media-libs/libsdl[joystick,opengl,video] + media-libs/sdl-image[png] + media-libs/sdl-ttf + sys-libs/zlib:= + virtual/glu + gui? ( x11-libs/gtk+:2 )" +# libsndfile, openal and ncurses are only needed at compile-time, +# optfeature through dlopen() at runtime if requested +DEPEND=" + ${RDEPEND} + media-libs/libsndfile + media-libs/openal + sys-libs/ncurses" +BDEPEND="virtual/pkgconfig" + +QA_PREBUILT="opt/${PN}/libs/Dwarf_Fortress" + +PATCHES=( + "${FILESDIR}"/${P}-missing-cmath.patch + "${FILESDIR}"/${P}-ncurses6.patch + "${FILESDIR}"/${P}-nogtk.patch + "${FILESDIR}"/${P}-segfault-fixes.patch +) + +src_prepare() { + default + + # remove prebuilt libraries that are provided by the system + rm libs/*.so* || die +} + +src_compile() { + tc-export CXX PKG_CONFIG + + # -DDEBUG is recognized to give additional debug output + append-cppflags -D$(usev !debug N)DEBUG + + emake -f "${FILESDIR}"/Makefile.native HAVE_GTK=$(usex gui 1 0) +} + +src_install() { + insinto /opt/${PN} + doins -r data libs raw + + fperms +x /opt/${PN}/libs/Dwarf_Fortress + + dobin "$(prefixify_ro "${FILESDIR}"/dwarf-fortress)" + + doicon "${DISTDIR}"/${PN}.png + make_desktop_entry dwarf-fortress "Dwarf Fortress" + + dodoc README.linux *.txt + + local DOC_CONTENTS=" + Dwarf Fortress has been installed to ${EPREFIX}/opt/${PN}. This is + symlinked to ~/.${PN} when ${PN} is run. For more information on what + exactly is replaced, see ${EPREFIX}/usr/bin/${PN}. Note: This means + that the primary entry point is ${EPREFIX}/usr/bin/${PN}, do not run + ${EPREFIX}/opt/${PN}/libs/Dwarf_Fortress." + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + + optfeature "text PRINT_MODE" sys-libs/ncurses + optfeature "audio output" "media-libs/openal media-libs/libsndfile[-minimal]" +} |