1 |
commit: 076b3ec1fa47159e7addff734dd752f536f654e2 |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 6 07:19:08 2022 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 6 08:37:54 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=076b3ec1 |
7 |
|
8 |
games-roguelike/dwarf-fortress: fix text mode, use ncurses-6 |
9 |
|
10 |
ncurses-compat doesn't work in DEPEND given it installs no headers, |
11 |
and then it went and built against ncurses-6 then tried to load |
12 |
ncurses-5 which unsurprisingly fails. |
13 |
|
14 |
Seems to work with 6, but haven't tested much (better than entirely |
15 |
broken either way). |
16 |
|
17 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
18 |
|
19 |
.../dwarf-fortress/dwarf-fortress-0.47.05.ebuild | 5 +++-- |
20 |
.../files/dwarf-fortress-0.47.05-ncurses6.patch | 22 ++++++++++++++++++++++ |
21 |
2 files changed, 25 insertions(+), 2 deletions(-) |
22 |
|
23 |
diff --git a/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05.ebuild b/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05.ebuild |
24 |
index e94ca7db6dd6..dac5c1c75c94 100644 |
25 |
--- a/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05.ebuild |
26 |
+++ b/games-roguelike/dwarf-fortress/dwarf-fortress-0.47.05.ebuild |
27 |
@@ -36,13 +36,14 @@ DEPEND=" |
28 |
${RDEPEND} |
29 |
media-libs/libsndfile |
30 |
media-libs/openal |
31 |
- sys-libs/ncurses-compat:5[unicode]" |
32 |
+ sys-libs/ncurses" |
33 |
BDEPEND="virtual/pkgconfig" |
34 |
|
35 |
QA_PREBUILT="opt/${PN}/libs/Dwarf_Fortress" |
36 |
|
37 |
PATCHES=( |
38 |
"${FILESDIR}"/${P}-missing-cmath.patch |
39 |
+ "${FILESDIR}"/${P}-ncurses6.patch |
40 |
"${FILESDIR}"/${P}-segfault-fixes.patch |
41 |
) |
42 |
|
43 |
@@ -87,6 +88,6 @@ src_install() { |
44 |
pkg_postinst() { |
45 |
readme.gentoo_print_elog |
46 |
|
47 |
- optfeature "text PRINT_MODE" sys-libs/ncurses-compat:5[unicode] |
48 |
+ optfeature "text PRINT_MODE" sys-libs/ncurses |
49 |
optfeature "audio output" "media-libs/openal media-libs/libsndfile[-minimal]" |
50 |
} |
51 |
|
52 |
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 |
53 |
new file mode 100644 |
54 |
index 000000000000..dda54296d06f |
55 |
--- /dev/null |
56 |
+++ b/games-roguelike/dwarf-fortress/files/dwarf-fortress-0.47.05-ncurses6.patch |
57 |
@@ -0,0 +1,22 @@ |
58 |
+Gentoo does not have ncurses5 headers anymore, and this fails with 6 |
59 |
+when using wattrset that it currently expects to be a macro. |
60 |
+--- a/g_src/curses.h |
61 |
++++ b/g_src/curses.h |
62 |
+@@ -9,2 +9,5 @@ |
63 |
+ #else |
64 |
++# ifndef NCURSES_WATTR_MACROS |
65 |
++# define NCURSES_WATTR_MACROS 1 |
66 |
++# endif |
67 |
+ # include <ncursesw/curses.h> |
68 |
+--- a/g_src/renderer_curses.cpp |
69 |
++++ b/g_src/renderer_curses.cpp |
70 |
+@@ -296,3 +296,3 @@ |
71 |
+ // We prefer libncursesw, but we'll accept libncurses if we have to |
72 |
+- handle = dlopen("libncursesw.so.5", RTLD_LAZY); |
73 |
++ handle = dlopen("libncursesw.so.6", RTLD_LAZY); |
74 |
+ if (handle) goto opened; |
75 |
+@@ -304,3 +304,3 @@ |
76 |
+ if (handle) goto opened; |
77 |
+- handle = dlopen("libncurses.so.5", RTLD_LAZY); |
78 |
++ handle = dlopen("libncurses.so.6", RTLD_LAZY); |
79 |
+ if (handle) goto opened; |