From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 58F34158096 for ; Wed, 6 Jul 2022 08:39:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 63728E0995; Wed, 6 Jul 2022 08:39:10 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 249B4E07D1 for ; Wed, 6 Jul 2022 08:39:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CD95F3419D8 for ; Wed, 6 Jul 2022 08:39:08 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3209B4ED for ; Wed, 6 Jul 2022 08:39:07 +0000 (UTC) From: "Ionen Wolkens" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ionen Wolkens" Message-ID: <1657096673.97a24df3591ca7bebd0fcd189e1da5f16240715c.ionen@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-roguelike/dwarf-fortress/files/, games-roguelike/dwarf-fortress/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-roguelike/dwarf-fortress/Manifest games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05.ebuild games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-fix-cmath.patch games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-segfault-fix-729002.patch X-VCS-Directories: games-roguelike/dwarf-fortress/files/ games-roguelike/dwarf-fortress/ X-VCS-Committer: ionen X-VCS-Committer-Name: Ionen Wolkens X-VCS-Revision: 97a24df3591ca7bebd0fcd189e1da5f16240715c X-VCS-Branch: master Date: Wed, 6 Jul 2022 08:39:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9adddbee-5b4b-4efb-b6b5-9b5fb9f59b24 X-Archives-Hash: f560f188136cd8d93a441cf628c91c1d commit: 97a24df3591ca7bebd0fcd189e1da5f16240715c Author: Joshua Goins redstrate com> AuthorDate: Tue Jun 28 23:57:28 2022 +0000 Commit: Ionen Wolkens gentoo org> CommitDate: Wed Jul 6 08:37:53 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97a24df3 games-roguelike/dwarf-fortress: add 0.47.05 Signed-off-by: Joshua Goins redstrate.com> Co-authored-by: Sven Eusewig yahoo.de> Co-authored-by: Wolfgang E. Sanyer gmail.com> Closes: https://bugs.gentoo.org/703384 Closes: https://bugs.gentoo.org/703386 Closes: https://bugs.gentoo.org/717752 Closes: https://bugs.gentoo.org/729002 Signed-off-by: Ionen Wolkens gentoo.org> games-roguelike/dwarf-fortress/Manifest | 2 + .../dwarf-fortress/dwarf-fortress-0.47.05.ebuild | 97 ++++++++++++++++++++++ .../files/dwarf-fortress-0.47.05-fix-cmath.patch | 11 +++ ...warf-fortress-0.47.05-segfault-fix-729002.patch | 49 +++++++++++ 4 files changed, 159 insertions(+) diff --git a/games-roguelike/dwarf-fortress/Manifest b/games-roguelike/dwarf-fortress/Manifest index c42a144cfc72..f7f5a8d0f1fa 100644 --- a/games-roguelike/dwarf-fortress/Manifest +++ b/games-roguelike/dwarf-fortress/Manifest @@ -1,2 +1,4 @@ DIST df_44_12_linux.tar.bz2 12081683 BLAKE2B 2410e8da6af6a8ced45d3e95dc06e2d0f4e31dbdcd6b8d9945a761d2278532bb24c1095418aa22639eedded256b3d485fa128984e6282a491d4dc7bd9af8671b SHA512 03cd7f6800d44873b573cc5bffb12c7a246c3aba0ee8535001372df689a5179dc02592670fd87f2fd5de82421605f34152f6241307c8f7b9fb4d7b8704aed70c DIST df_44_12_linux32.tar.bz2 12686340 BLAKE2B bf1e1370930d91d2c9e72d3366bc79706092d1505853eb63c6160fea39822551d3276958ac6d2916b8f7825be0c054a037219210f0c2c18a731065a2dd1bb842 SHA512 5cd352acf310592c7e30442205b7fe590f421c5e3562959dcfd32a17d3d562347c2b32e3bc5835637c5550ce2c696c17b6dc910ee4cf766be07af306e83537db +DIST df_47_05_linux.tar.bz2 12725420 BLAKE2B 80987f05de2db2796a53cc8767ee7aa5c78674dff725efc0dafe07dc4118e56c7814cbf92507fe9b76a385e182405c7d6759cb6bcc942385110df1dc1a3b3af4 SHA512 9ea46fa12a80266cd09363f1aea8cdd059a5ebeefb453c4a46ffbb1115486409003c3caca95a1b6010da4040d04b781182c59e57a6cc033cd7de4507299f7534 +DIST df_47_05_linux32.tar.bz2 13487455 BLAKE2B be604dd2fd480c5609da801013dfdae26964760c0a92c4b3d2d8369800eee7ca9c1b1c2313cc67357feee3c6d425bf7f9f67cab53d2e771ab59055bc4c3329d0 SHA512 e9b9cf6995c24b403347159a35cfe4b57603bdb777c78639beb2799d9bf31317edec54fb92b17dbb90df6001b905d43285a35e9446768d12a746492b2fd34fe7 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..8df73a95939f --- /dev/null +++ b/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit prefix optfeature toolchain-funcs desktop readme.gentoo-r1 + +MY_PV=$(ver_rs 1- _ "$(ver_cut 2-)") +MY_P=df_${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}"/df_linux + +PATCHES=( + "${FILESDIR}/${P}-fix-cmath.patch" + "${FILESDIR}/${P}-segfault-fix-729002.patch" +) + +LICENSE="free-noncomm BSD BitstreamVera" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" +IUSE="debug" + +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" +BDEPEND="virtual/pkgconfig" + +QA_PREBUILT="/opt/${PN}/libs/Dwarf_Fortress" + +DOC_CONTENTS="Dwarf Fortress has been installed to /opt/${PN}. This is + symlinked to ~/.dwarf-fortress when dwarf-fortress is run. + For more information on what exactly is replaced, see ${EROOT}/usr/bin/dwarf-fortress. + Note: This means that the primary entry point is ${EROOT}/usr/bin/dwarf-fortress. + Do not run /opt/${PN}/libs/Dwarf_Fortress." + +src_prepare() { + # fix line endings so the patches can apply properly + sed -i \ + -e 's/\r$//' \ + g_src/ttf_manager.cpp \ + g_src/music_and_sound_openal.cpp \ + || die + + default + + # dwarf fortress includes prebuilt libraries such as libstdc++ we won't use + rm -f libs/*.so* || die +} + +src_configure() { + hprefixify "${WORKDIR}/dwarf-fortress" + + CXXFLAGS+=" -D$(use debug || echo N)DEBUG" +} + +src_compile() { + tc-export CXX PKG_CONFIG + + emake -f "${FILESDIR}/Makefile.native" +} + +src_install() { + insinto /opt/${PN} + doins -r raw data libs + + dobin ${FILESDIR}/dwarf-fortress + + readme.gentoo_create_doc + dodoc README.linux *.txt + + fperms 755 /opt/${PN}/libs/Dwarf_Fortress + + make_desktop_entry dwarf-fortress "Dwarf Fortress" "dwarf-fortress" Game +} + +pkg_postinst() { + readme.gentoo_print_elog + + optfeature "text PRINT_MODE" sys-libs/ncurses-compat:5[unicode] + optfeature "audio output" "media-libs/openal media-libs/libsndfile" + optfeature "OpenGL PRINT_MODE" media-libs/libsdl[opengl] +} diff --git a/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-fix-cmath.patch b/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-fix-cmath.patch new file mode 100644 index 000000000000..21017f6b41b1 --- /dev/null +++ b/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-fix-cmath.patch @@ -0,0 +1,11 @@ +Fixes compilation due to missing header required in this file. + +diff --git a/g_src/ttf_manager.cpp b/g_src/ttf_manager.cpp +@@ -1,6 +1,7 @@ + #include "ttf_manager.hpp" + #include "init.h" + #include ++#include + + using namespace std; + diff --git a/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-segfault-fix-729002.patch b/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-segfault-fix-729002.patch new file mode 100644 index 000000000000..0f0a9a672874 --- /dev/null +++ b/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-segfault-fix-729002.patch @@ -0,0 +1,49 @@ +Fixes a bug due to OpenAL soft crashing the game on startup: https://www.bay12games.com/dwarves/mantisbt/view.php?id=11564 +Fixes a bug regarding an infinite loop on anything higher than -O1: https://www.bay12games.com/dwarves/mantisbt/view.php?id=11564 + +https://bugs.gentoo.org/729002 + +diff --git a/g_src/enabler.cpp b/g_src/enabler.cpp +--- a/g_src/enabler.cpp ++++ b/g_src/enabler.cpp +@@ -590,6 +590,10 @@ int enablerst::loop(string cmdline) { + + // Clean up graphical resources + delete renderer; ++ ++ return 0; + } + + void enablerst::override_grid_size(int x, int y) { +diff --git a/g_src/music_and_sound_openal.cpp b/g_src/music_and_sound_openal.cpp +--- a/g_src/music_and_sound_openal.cpp ++++ b/g_src/music_and_sound_openal.cpp +@@ -250,7 +250,11 @@ void musicsoundst::deinitsound() { + alDeleteBuffers(1, &buffer); + } + // Deinit OpenAL +- alcMakeContextCurrent(NULL); ++ ++ //alcMakeContextCurrent(NULL); ++ + alcDestroyContext(context); + alcCloseDevice(device); + +@@ -480,7 +484,9 @@ static bool init_openal() { + + 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); } + void alGetIntegerv( ALenum param, ALint* data ) { _alGetIntegerv(param, data); } +@@ -490,7 +496,9 @@ ALboolean alGetBoolean( ALenum param ) { return _alGetBoolean(param); } + ALint alGetInteger( ALenum param ) { return _alGetInteger(param); } + 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); } + ALenum alGetEnumValue( const ALchar* ename ) { return _alGetEnumValue(ename); }