diff options
Diffstat (limited to 'games-roguelike')
-rw-r--r-- | games-roguelike/Manifest.gz | bin | 3054 -> 3052 bytes | |||
-rw-r--r-- | games-roguelike/dwarf-fortress/Manifest | 7 | ||||
-rw-r--r-- | games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05-r1.ebuild (renamed from games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05.ebuild) | 7 | ||||
-rw-r--r-- | games-roguelike/dwarf-fortress/files/Makefile.native | 9 | ||||
-rw-r--r-- | games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-nogtk.patch | 119 | ||||
-rw-r--r-- | games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-segfault-fixes.patch | 16 |
6 files changed, 147 insertions, 11 deletions
diff --git a/games-roguelike/Manifest.gz b/games-roguelike/Manifest.gz Binary files differindex d2fe54c0f786..669f936a5afc 100644 --- a/games-roguelike/Manifest.gz +++ b/games-roguelike/Manifest.gz diff --git a/games-roguelike/dwarf-fortress/Manifest b/games-roguelike/dwarf-fortress/Manifest index 609c88b78794..b149822e929d 100644 --- a/games-roguelike/dwarf-fortress/Manifest +++ b/games-roguelike/dwarf-fortress/Manifest @@ -1,10 +1,11 @@ -AUX Makefile.native 1016 BLAKE2B ea40a1f90bf52e52c7cf88e99c73c981c00506eddb4ad9c57200bd272ae37d5871793d5a0308cde8b4c3be9824b5549a23429d465f874e0ca018862f3072dc3b SHA512 d390c65f406cf8b43f3d493cd6513167c122a5811e3bc8614a66dc080eac21df9fc1d5f110503c8f6815f683eaeb5ddcdd833d310400ccc2426ae81c2b8159f8 +AUX Makefile.native 1068 BLAKE2B c256a0ca3ea704b841d09c6f94f2e7bd1c6e45248c3c835af15675a3f5859325cacd5488030c71a1e62839c3d4f92bdc5d53cb2f8af3c0fe87a8d3432c0eab98 SHA512 a25d7628ff50a74df5fd9c8456c88114290a449ab894c78c28e2c28ab0f340846e2324d9d249972c122638bab7cffff5cd597204fde47c4762a70c1b948df06d AUX dwarf-fortress 516 BLAKE2B 9d2faffac265e99698fa1c481eec8598fbe66b4ab205b18c76d285cd16fe1b32d3bfa9bc415bceae6e1e350e955ac3b3cebd7d46943a06ff71715fd1cb5402df SHA512 1f1fada35e33cb99c28835d600f6567ecaaf7b2c6111a2e96b1a88c54e5d727f94ae1c0213327bc70a623dbdf19a8433e3c59edcab5a40e898b0124eb2eb9006 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 +AUX dwarf-fortress-0.47.05-nogtk.patch 3239 BLAKE2B 1fb0bd61b2e95e3eab9f0e774d6df32b0412a037461b7311ae88fc73f885d1aa2565f1ddc68b7a239e7c15fc4de683a2590c030d66be39dd9347914268c7e6fb SHA512 475d66742ef71b1f52563c170a5b73b557fcdee5a2af9360041e76ef4798f56bd98a23a8e71ff9fb9aff7c4364a8935571d6d36c9c4939a4b4a3a508946c5f95 +AUX dwarf-fortress-0.47.05-segfault-fixes.patch 2045 BLAKE2B bb00cc01a60cf982806d4824e8533d1668f994b604742c83bde85a210b9f1526065899430c9457fb681000c1667e1e70112c3ef72a1753c73249e310e417b503 SHA512 afb17503a030e106ef60e8849a24a6e4d158923e8680c39b73239c87515eb45aee975fabb2bf483922ee4427e01d89d6effddeefbf5125527ff364504de57dc8 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 +EBUILD dwarf-fortress-0.47.05-r1.ebuild 2437 BLAKE2B 9c5e8a472e61a3c60d4e092fcfe3c13670751a1028a799e9a5ff63d7fba9497800194c97285f64f2241eace6cf380ff0dbf3a7f9a21c5e5b3fa57d7a735968b1 SHA512 900b704bb0855f9539161378cb07dfd625ec5853a30a63ccb59be002b527f2d05ee0c1ecae7825b7fb7f15d7d93ee3fcc02d93bceb895956cd38eb05be6b6a1b MISC metadata.xml 254 BLAKE2B 4e6c8e1f126f76233a38aba6f5388488656795cb1d7d4767ccb1349772f5e78d59fc5663d4f1933dbe4633c2fbb90cd1d42d4b4d4f5ededc53653e7df13c7187 SHA512 2b82da849e3b0dec378f3fb497014f5d1dbc7aceb8a1f9d1638e83fe69448b1c5151eb4b1187154d828e4a296609ce5125b40977b2581d95b5588e353ca75135 diff --git a/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05.ebuild b/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05-r1.ebuild index dac5c1c75c94..09f1a0c25b24 100644 --- a/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05.ebuild +++ b/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05-r1.ebuild @@ -18,7 +18,7 @@ S="${WORKDIR}/df_linux" LICENSE="free-noncomm BSD BitstreamVera" SLOT="0" KEYWORDS="-* ~amd64 ~x86" -IUSE="debug" +IUSE="debug gui" RDEPEND=" dev-libs/glib:2 @@ -29,7 +29,7 @@ RDEPEND=" media-libs/sdl-ttf sys-libs/zlib:= virtual/glu - x11-libs/gtk+:2" + gui? ( x11-libs/gtk+:2 )" # libsndfile, openal and ncurses are only needed at compile-time, # optfeature through dlopen() at runtime if requested DEPEND=" @@ -44,6 +44,7 @@ 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 ) @@ -60,7 +61,7 @@ src_compile() { # -DDEBUG is recognized to give additional debug output append-cppflags -D$(usev !debug N)DEBUG - emake -f "${FILESDIR}"/Makefile.native + emake -f "${FILESDIR}"/Makefile.native HAVE_GTK=$(usex gui 1 0) } src_install() { diff --git a/games-roguelike/dwarf-fortress/files/Makefile.native b/games-roguelike/dwarf-fortress/files/Makefile.native index 85383e5e2f1d..d22fb03f4694 100644 --- a/games-roguelike/dwarf-fortress/files/Makefile.native +++ b/games-roguelike/dwarf-fortress/files/Makefile.native @@ -1,6 +1,8 @@ # Copyright 2014-2016 Alex Xu (Hello71) # Distributed under the terms of the GNU General Public License v2 +HAVE_GTK ?= 1 + SRCS := g_src/basics.cpp g_src/command_line.cpp g_src/enabler.cpp \ g_src/files.cpp g_src/find_files_posix.cpp g_src/graphics.cpp \ g_src/init.cpp g_src/interface.cpp g_src/keybindings.cpp \ @@ -11,7 +13,12 @@ SRCS := g_src/basics.cpp g_src/command_line.cpp g_src/enabler.cpp \ OBJS := $(SRCS:.cpp=.o) BLIBS := ncursesw openal sndfile -LIBS := glew glu gtk+-2.0 sdl SDL_image SDL_ttf zlib + +LIBS := glew glu sdl SDL_image SDL_ttf zlib +ifeq ($(HAVE_GTK),1) +LIBS += gtk+-2.0 +endif + CXXFLAGS ?= -O2 -pipe -Wall -Wextra CXXFLAGS += $(shell $(PKG_CONFIG) --cflags $(BLIBS) $(LIBS)) -Dunix -Dlinux -fPIC -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 LDLIBS := $(shell $(PKG_CONFIG) --libs $(LIBS)) diff --git a/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-nogtk.patch b/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-nogtk.patch new file mode 100644 index 000000000000..7702362b4a69 --- /dev/null +++ b/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-nogtk.patch @@ -0,0 +1,119 @@ +Removes hard dependency on GTK in favour of stdin calls. + +--- a/g_src/KeybindingScreen.cpp ++++ b/g_src/KeybindingScreen.cpp +@@ -1,7 +1,9 @@ + #ifdef __APPLE__
+ # include "osx_messagebox.h"
+ #elif defined(unix)
+-# include <gtk/gtk.h>
++# ifdef HAVE_GTK
++# include <gtk/gtk.h>
++# endif
+ #endif
+
+ #include "GL/glew.h"
+--- a/g_src/enabler.cpp ++++ b/g_src/enabler.cpp +@@ -1,7 +1,9 @@ + #ifdef __APPLE__ + # include "osx_messagebox.h" + #elif defined(unix) +-# include <gtk/gtk.h> ++# ifdef HAVE_GTK ++# include <gtk/gtk.h> ++# endif + #endif + + #include <cassert> +@@ -713,7 +715,7 @@ int main (int argc, char* argv[]) { + #ifdef unix + setlocale(LC_ALL, ""); + #endif +-#if !defined(__APPLE__) && defined(unix) ++#if !defined(__APPLE__) && defined(unix) && defined(HAVE_GTK) + bool gtk_ok = false; + if (getenv("DISPLAY")) + gtk_ok = gtk_init_check(&argc, &argv); +@@ -734,6 +736,7 @@ int main (int argc, char* argv[]) { + init.begin(); // Load init.txt settings + + #if !defined(__APPLE__) && defined(unix) ++ #if defined(HAVE_GTK) + if (!gtk_ok && !init.display.flag.has_flag(INIT_DISPLAY_FLAG_TEXT)) { + puts("Display not found and PRINT_MODE not set to TEXT, aborting."); + exit(EXIT_FAILURE); +@@ -743,6 +746,7 @@ int main (int argc, char* argv[]) { + puts("Graphical tiles are not compatible with text output, sorry"); + exit(EXIT_FAILURE); + } ++ #endif + #endif + + // Initialize video, if we /use/ video +--- a/g_src/renderer_curses.cpp ++++ b/g_src/renderer_curses.cpp +@@ -1,3 +1,7 @@ ++#if defined(__APPLE__) || defined(unix)
++# include <unistd.h>
++#endif
++
+ static bool curses_initialized = false;
+
+ static void endwin_void() {
+--- a/g_src/win32_compat.cpp ++++ b/g_src/win32_compat.cpp +@@ -13,7 +13,11 @@ + # ifdef __APPLE__ + # include "osx_messagebox.h" + # elif defined(unix) +-# include <gtk/gtk.h> ++# ifdef HAVE_GTK ++# include <gtk/gtk.h> ++# else ++# include <unistd.h> ++# endif + # endif + #endif + +@@ -112,6 +116,7 @@ int MessageBox(HWND *dummy, const char *text, const char *caption, UINT type) + } + # else // GTK code + if (getenv("DISPLAY")) { ++ #ifdef HAVE_GTK + // Have X, will dialog + GtkWidget *dialog = gtk_message_dialog_new(NULL, + GTK_DIALOG_DESTROY_WITH_PARENT, +@@ -141,6 +146,23 @@ int MessageBox(HWND *dummy, const char *text, const char *caption, UINT type) + break; + } + } ++ #else ++ if (isatty(fileno(stdin))) { ++ dprintf(2, "Alert %s:\n%s\n", caption ? caption : "", text ? text : ""); ++ if (type & MB_YESNO) { ++ while(ret == IDOK) { ++ dprintf(2, "please answer with 'yes' or 'no'\n"); ++ char buf[16]; ++ fgets(buf, sizeof buf, stdin); ++ if(!strncmp(buf, "yes", 3)) ret = IDYES; ++ else if(!strncmp(buf, "no", 2)) ret = IDNO; ++ } ++ } ++ } else { ++ /* just assume windowed if no TTY is available to ask */ ++ ret = IDNO; ++ } ++ #endif /* HAVE_GTK */ + } else { + // Use curses + init_curses(); +@@ -173,7 +195,7 @@ int MessageBox(HWND *dummy, const char *text, const char *caption, UINT type) + } + nodelay(*stdscr_p, -1); + } +-# endif ++ #endif + + if (toggle_screen) { + enabler.toggle_fullscreen(); 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 index 24c43be41188..11a820ac97df 100644 --- 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 @@ -7,32 +7,40 @@ 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 @@ +@@ -592,6 +592,8 @@ int enablerst::loop(string cmdline) { + // Clean up graphical resources delete renderer; + + return 0; } + void enablerst::override_grid_size(int x, int y) { --- a/g_src/music_and_sound_openal.cpp +++ b/g_src/music_and_sound_openal.cpp -@@ -251,5 +251,4 @@ +@@ -250,7 +250,6 @@ void musicsoundst::deinitsound() { + alDeleteBuffers(1, &buffer);
}
// Deinit OpenAL
- alcMakeContextCurrent(NULL);
alcDestroyContext(context);
alcCloseDevice(device);
-@@ -481,5 +480,5 @@ +
+@@ -480,7 +479,7 @@ 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); }
-@@ -491,5 +490,5 @@ + void alGetIntegerv( ALenum param, ALint* data ) { _alGetIntegerv(param, data); }
+@@ -490,7 +489,7 @@ 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); }
|