summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-07-06 03:19:08 -0400
committerIonen Wolkens <ionen@gentoo.org>2022-07-06 04:37:54 -0400
commit076b3ec1fa47159e7addff734dd752f536f654e2 (patch)
tree905c6bcb21c2a5cea737ad75d623655d0b2c2242 /games-roguelike
parentgames-roguelike/dwarf-fortress: misc ebuild adjustments (diff)
downloadgentoo-076b3ec1fa47159e7addff734dd752f536f654e2.tar.gz
gentoo-076b3ec1fa47159e7addff734dd752f536f654e2.tar.bz2
gentoo-076b3ec1fa47159e7addff734dd752f536f654e2.zip
games-roguelike/dwarf-fortress: fix text mode, use ncurses-6
ncurses-compat doesn't work in DEPEND given it installs no headers, and then it went and built against ncurses-6 then tried to load ncurses-5 which unsurprisingly fails. Seems to work with 6, but haven't tested much (better than entirely broken either way). Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-roguelike')
-rw-r--r--games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05.ebuild5
-rw-r--r--games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-ncurses6.patch22
2 files changed, 25 insertions, 2 deletions
diff --git a/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05.ebuild b/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05.ebuild
index e94ca7db6dd6..dac5c1c75c94 100644
--- a/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05.ebuild
+++ b/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05.ebuild
@@ -36,13 +36,14 @@ DEPEND="
${RDEPEND}
media-libs/libsndfile
media-libs/openal
- sys-libs/ncurses-compat:5[unicode]"
+ 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
)
@@ -87,6 +88,6 @@ src_install() {
pkg_postinst() {
readme.gentoo_print_elog
- optfeature "text PRINT_MODE" sys-libs/ncurses-compat:5[unicode]
+ 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-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;