diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-07-09 15:43:36 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-07-09 15:43:36 +0100 |
commit | 2719f73b6813d11d13a9650cdd2ab8ec6e69385d (patch) | |
tree | 8c816148bcbd22757d892089c989ae614eae4f5a /games-roguelike/dwarf-fortress | |
parent | 0f558761aa2dee1017b4751e4017205e015a9560 (diff) |
gentoo resync : 09.07.2022
Diffstat (limited to 'games-roguelike/dwarf-fortress')
6 files changed, 168 insertions, 86 deletions
diff --git a/games-roguelike/dwarf-fortress/Manifest b/games-roguelike/dwarf-fortress/Manifest index 8593a29dce34..609c88b78794 100644 --- a/games-roguelike/dwarf-fortress/Manifest +++ b/games-roguelike/dwarf-fortress/Manifest @@ -1,6 +1,10 @@ AUX Makefile.native 1016 BLAKE2B ea40a1f90bf52e52c7cf88e99c73c981c00506eddb4ad9c57200bd272ae37d5871793d5a0308cde8b4c3be9824b5549a23429d465f874e0ca018862f3072dc3b SHA512 d390c65f406cf8b43f3d493cd6513167c122a5811e3bc8614a66dc080eac21df9fc1d5f110503c8f6815f683eaeb5ddcdd833d310400ccc2426ae81c2b8159f8 AUX dwarf-fortress 516 BLAKE2B 9d2faffac265e99698fa1c481eec8598fbe66b4ab205b18c76d285cd16fe1b32d3bfa9bc415bceae6e1e350e955ac3b3cebd7d46943a06ff71715fd1cb5402df SHA512 1f1fada35e33cb99c28835d600f6567ecaaf7b2c6111a2e96b1a88c54e5d727f94ae1c0213327bc70a623dbdf19a8433e3c59edcab5a40e898b0124eb2eb9006 -DIST df_44_12_linux.tar.bz2 12081683 BLAKE2B 2410e8da6af6a8ced45d3e95dc06e2d0f4e31dbdcd6b8d9945a761d2278532bb24c1095418aa22639eedded256b3d485fa128984e6282a491d4dc7bd9af8671b SHA512 03cd7f6800d44873b573cc5bffb12c7a246c3aba0ee8535001372df689a5179dc02592670fd87f2fd5de82421605f34152f6241307c8f7b9fb4d7b8704aed70c -DIST df_44_12_linux32.tar.bz2 12686340 BLAKE2B bf1e1370930d91d2c9e72d3366bc79706092d1505853eb63c6160fea39822551d3276958ac6d2916b8f7825be0c054a037219210f0c2c18a731065a2dd1bb842 SHA512 5cd352acf310592c7e30442205b7fe590f421c5e3562959dcfd32a17d3d562347c2b32e3bc5835637c5550ce2c696c17b6dc910ee4cf766be07af306e83537db -EBUILD dwarf-fortress-0.44.12.ebuild 2344 BLAKE2B b6657167f0c9191e9cdc76b7ca4d149238b50b5526eb9f236c2f12166dce93e2ebc0c7ae692f70ac456b9b8cd50d2606a76859835b1db9d289cb67de90aef5af SHA512 b82d7d1782d70635cdcba237d5a847becef9eabe4f814cffc0c397a3a662a511848f49a783303707e6820e6bbf0b2cfb843edb5fc91c32eb87cd16ab7ad025f0 +AUX dwarf-fortress-0.47.05-missing-cmath.patch 202 BLAKE2B 2f735f4cc82d56015282acf2584678e3ded323c0740c5692752359f167b24f2c7439e6e75b82e65e48daa26eb8ab47e6072f6c0e76c259cd1d7f43595bdfb722 SHA512 548a4077ae40fc8edec75e655efe1c3032fcf49f59c1cd7477c1939e9a5313c4fa2a1589e4c43769290b4e3e27e5ca532faa9d153d0878919d2b3866f2e20f56 +AUX dwarf-fortress-0.47.05-ncurses6.patch 806 BLAKE2B 7c87d059476fafbbf7cca652574b41774e9a74c9b96852dc7a1743cca00280313864a585f7cd4892296d88d916c7f478f497006e94fe320989c5c4d591c77cb8 SHA512 febd94b0b1ec856f0b5cf57f7c68631435e3e369a72a0e692a6139d9068473ede37a647d51ff56e5fe8db28aafe95badd9af62c6913aa9fce92c91c93dda0e83 +AUX dwarf-fortress-0.47.05-segfault-fixes.patch 1542 BLAKE2B 97e0e460edcf96ed65d08f5dde98ef39a8d07300951545acaec36b577d81b5465b4f42f3d15db6d6be8a97d5d9a86149fbfb56cf0b283242ce24a178b86125af SHA512 82f710c6a10ca933fbbd4ef5a02b3c6f70012bef61665c0cf536996b57fbe8bbc6ddf3bf7e20430b82f9eda9503afcfc131e46b2956b6478b266861e12e3a7d1 +DIST df_47_05_linux.tar.bz2 12725420 BLAKE2B 80987f05de2db2796a53cc8767ee7aa5c78674dff725efc0dafe07dc4118e56c7814cbf92507fe9b76a385e182405c7d6759cb6bcc942385110df1dc1a3b3af4 SHA512 9ea46fa12a80266cd09363f1aea8cdd059a5ebeefb453c4a46ffbb1115486409003c3caca95a1b6010da4040d04b781182c59e57a6cc033cd7de4507299f7534 +DIST df_47_05_linux32.tar.bz2 13487455 BLAKE2B be604dd2fd480c5609da801013dfdae26964760c0a92c4b3d2d8369800eee7ca9c1b1c2313cc67357feee3c6d425bf7f9f67cab53d2e771ab59055bc4c3329d0 SHA512 e9b9cf6995c24b403347159a35cfe4b57603bdb777c78639beb2799d9bf31317edec54fb92b17dbb90df6001b905d43285a35e9446768d12a746492b2fd34fe7 +DIST dwarf-fortress.png 271 BLAKE2B cbc14917de1556b25d3817298215beedc4cb01075b8454e38b2d314bdf22f8c20c4bf2332f0d731c7e4c6d6a60056361565221ce3db2c7a15fdf934bff01df54 SHA512 08bdc0e084f861b6e6a8b12e3bc93b9703f2a4cbc133d62d1c2931daf81ccd70b728853d5c05bed19a1ef477cf4ad10fce263bbab7d9cad3b60658f17063acf6 +EBUILD dwarf-fortress-0.47.05.ebuild 2367 BLAKE2B a270f71327f763e06230d33f7f8218f76e4bbd777ff144f39e02c71ebb8b92c5d8d6e6cc9d008beed7d976db9cc30c6abd3d27fa5608acd2443e61c3d1418618 SHA512 ebd6469dbfffc8aaccfd794375a25fce7bb5dde7e4df11e6cf35c59b165560cd8dddd3aaf7a43c1deaf07decb74915abadf8fb87e486c84f85580d46f9143e3b MISC metadata.xml 254 BLAKE2B 4e6c8e1f126f76233a38aba6f5388488656795cb1d7d4767ccb1349772f5e78d59fc5663d4f1933dbe4633c2fbb90cd1d42d4b4d4f5ededc53653e7df13c7187 SHA512 2b82da849e3b0dec378f3fb497014f5d1dbc7aceb8a1f9d1638e83fe69448b1c5151eb4b1187154d828e4a296609ce5125b40977b2581d95b5588e353ca75135 diff --git a/games-roguelike/dwarf-fortress/dwarf-fortress-0.44.12.ebuild b/games-roguelike/dwarf-fortress/dwarf-fortress-0.44.12.ebuild deleted file mode 100644 index 7a4dab115c0c..000000000000 --- a/games-roguelike/dwarf-fortress/dwarf-fortress-0.44.12.ebuild +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit versionator toolchain-funcs - -MY_PV=$(replace_all_version_separators _ "$(get_version_component_range 2-)") -MY_PN=df -MY_P=${MY_PN}_${MY_PV} - -DESCRIPTION="A 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 )" -S="${WORKDIR}"/${MY_PN}_linux - -LICENSE="free-noncomm BSD BitstreamVera" -SLOT="0" -KEYWORDS="-* ~amd64 ~x86" -IUSE="debug" -RESTRICT="strip" - -RDEPEND="media-libs/glew:0 - media-libs/libsdl[joystick,video] - media-libs/sdl-image[png] - media-libs/sdl-ttf - sys-libs/zlib - virtual/glu - x11-libs/gtk+:2" -# Yup, libsndfile, openal and ncurses are only needed at compile-time; the code -# dlopens them at runtime if requested. -DEPEND="${RDEPEND} - media-libs/libsndfile - media-libs/openal - sys-libs/ncurses-compat:5[unicode] - virtual/pkgconfig" - -gamesdir="/opt/${PN}" -QA_PREBUILT="${gamesdir#/}/libs/Dwarf_Fortress" - -src_prepare() { - rm -f libs/*.so* || die - sed -i -e '1i#include <cmath>' g_src/ttf_manager.cpp || die - default -} - -src_configure() { - tc-export CXX PKG_CONFIG - CXXFLAGS+=" -D$(use debug || echo N)DEBUG" -} - -src_compile() { - emake -f "${FILESDIR}/Makefile.native" - sed -e "s:^gamesdir=.*:gamesdir=${gamesdir}:" "${FILESDIR}/dwarf-fortress" > dwarf-fortress || die -} - -src_install() { - # install data-files and libs - insinto "${gamesdir}" - doins -r raw data libs - - # install our wrapper - dobin dwarf-fortress - - # install docs - dodoc README.linux *.txt - - fperms 755 "${gamesdir}"/libs/Dwarf_Fortress -} - -pkg_postinst() { - elog "System-wide Dwarf Fortress has been installed to ${gamesdir}. This is" - elog "symlinked to ~/.dwarf-fortress when dwarf-fortress is run." - elog "For more information on what exactly is replaced, see /usr/bin/dwarf-fortress." - elog "Note: This means that the primary entry point is /usr/bin/dwarf-fortress." - elog "Do not run ${gamesdir}/libs/Dwarf_Fortress." - elog - elog "Optional runtime dependencies:" - elog "Install sys-libs/ncurses[unicode] for [PRINT_MODE:TEXT]" - elog "Install media-libs/openal and media-libs/libsndfile for audio output" - elog "Install media-libs/libsdl[opengl] for the OpenGL PRINT_MODE settings" -} diff --git a/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05.ebuild b/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05.ebuild new file mode 100644 index 000000000000..dac5c1c75c94 --- /dev/null +++ b/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05.ebuild @@ -0,0 +1,93 @@ +# 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" + +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 + 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}-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 +} + +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]" +} diff --git a/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-missing-cmath.patch b/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-missing-cmath.patch new file mode 100644 index 000000000000..a3028764afac --- /dev/null +++ b/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-missing-cmath.patch @@ -0,0 +1,8 @@ +Fixes compilation due to missing <cmath> header required in this file. + +--- a/g_src/ttf_manager.cpp ++++ b/g_src/ttf_manager.cpp +@@ -2,2 +2,3 @@ + #include "init.h" ++#include <cmath> + #include <iostream> diff --git a/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-ncurses6.patch b/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-ncurses6.patch new file mode 100644 index 000000000000..dda54296d06f --- /dev/null +++ b/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-ncurses6.patch @@ -0,0 +1,22 @@ +Gentoo does not have ncurses5 headers anymore, and this fails with 6 +when using wattrset that it currently expects to be a macro. +--- a/g_src/curses.h ++++ b/g_src/curses.h +@@ -9,2 +9,5 @@ + #else
++# ifndef NCURSES_WATTR_MACROS
++# define NCURSES_WATTR_MACROS 1
++# endif
+ # include <ncursesw/curses.h>
+--- a/g_src/renderer_curses.cpp ++++ b/g_src/renderer_curses.cpp +@@ -296,3 +296,3 @@ + // We prefer libncursesw, but we'll accept libncurses if we have to
+- handle = dlopen("libncursesw.so.5", RTLD_LAZY);
++ handle = dlopen("libncursesw.so.6", RTLD_LAZY);
+ if (handle) goto opened;
+@@ -304,3 +304,3 @@ + if (handle) goto opened;
+- handle = dlopen("libncurses.so.5", RTLD_LAZY);
++ handle = dlopen("libncurses.so.6", RTLD_LAZY);
+ if (handle) goto opened;
diff --git a/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-segfault-fixes.patch b/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-segfault-fixes.patch new file mode 100644 index 000000000000..24c43be41188 --- /dev/null +++ b/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-segfault-fixes.patch @@ -0,0 +1,38 @@ +Fixes segfault / infinite loop with OpenAL and anything higher +than -O1 mostly due to missing return values. + +https://bugs.gentoo.org/703384 +https://bugs.gentoo.org/703386 +https://bugs.gentoo.org/729002 +https://www.bay12games.com/dwarves/mantisbt/view.php?id=11564 +--- a/g_src/enabler.cpp ++++ b/g_src/enabler.cpp +@@ -591,4 +591,6 @@ + // Clean up graphical resources + delete renderer; ++ ++ return 0; + } + +--- a/g_src/music_and_sound_openal.cpp ++++ b/g_src/music_and_sound_openal.cpp +@@ -251,5 +251,4 @@ + }
+ // Deinit OpenAL
+- alcMakeContextCurrent(NULL);
+ alcDestroyContext(context);
+ alcCloseDevice(device);
+@@ -481,5 +480,5 @@ + void alEnable( ALenum capability ) { _alEnable(capability); }
+ void alDisable( ALenum capability ) { _alDisable(capability); }
+-ALboolean alIsEnabled( ALenum capability ) { _alIsEnabled(capability); }
++ALboolean alIsEnabled( ALenum capability ) { return _alIsEnabled(capability); }
+ const ALchar* alGetString( ALenum param ) { return _alGetString(param); }
+ void alGetBooleanv( ALenum param, ALboolean* data ) { _alGetBooleanv(param, data); }
+@@ -491,5 +490,5 @@ + ALfloat alGetFloat( ALenum param ) { return _alGetFloat(param); }
+ ALdouble alGetDouble( ALenum param ) { return _alGetDouble(param); }
+-ALenum alGetError( void ) { _alGetError(); }
++ALenum alGetError( void ) { return _alGetError(); }
+ ALboolean alIsExtensionPresent( const ALchar* extname ) { return _alIsExtensionPresent(extname); }
+ void* alGetProcAddress( const ALchar* fname ) { return _alGetProcAddress(fname); }
|