summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-roguelike/hengband/files/hengband-2.1.2-autoconf-ncurses.patch')
-rw-r--r--games-roguelike/hengband/files/hengband-2.1.2-autoconf-ncurses.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/games-roguelike/hengband/files/hengband-2.1.2-autoconf-ncurses.patch b/games-roguelike/hengband/files/hengband-2.1.2-autoconf-ncurses.patch
new file mode 100644
index 000000000000..4f695310d7b5
--- /dev/null
+++ b/games-roguelike/hengband/files/hengband-2.1.2-autoconf-ncurses.patch
@@ -0,0 +1,28 @@
+diff -Naur a/configure.ac b/configure.ac
+--- a/configure.ac 2018-03-19 11:04:42.000000000 +0000
++++ b/configure.ac 2022-05-31 22:18:52.959822579 +0100
+@@ -51,16 +51,14 @@
+
+ dnl Checks for libraries.
+ dnl Replace `main' with a function in -lncurses:
+-AC_CHECK_LIB(ncursesw, initscr, [AC_DEFINE(USE_GCU, 1, [Allow -mGCU environment]) AC_DEFINE(USE_NCURSES, 1, [Use ncurses]) LIBS="$LIBS -lncursesw"])
+-if test "$ac_cv_lib_ncursesw_initscr" != yes; then
+- AC_CHECK_LIB(ncurses, initscr, [AC_DEFINE(USE_GCU, 1, [Allow -mGCU environment]) AC_DEFINE(USE_NCURSES, 1, [Use ncurses]) LIBS="$LIBS -lncurses"])
+- if test "$ac_cv_lib_ncurses_initscr" != yes; then
+- AC_CHECK_LIB(curses, initscr, [AC_DEFINE(USE_GCU, 1, [Allow -mGCU environment]) LIBS="$LIBS -lcurses"])
+- if test "$ac_cv_lib_curses_initscr" != yes; then
+- AC_CHECK_LIB(termcap, tgetent, [AC_DEFINE(USE_CAP, 1, [Allow -mCAP environment]) LIBS="$LIBS -ltermcap"])
+- fi
+- fi
+-fi
++PKG_CHECK_MODULES(
++ [NCURSES],
++ [ncurses],
++ [AC_DEFINE(USE_GCU, 1, [Allow -mGCU environment])
++ AC_DEFINE(USE_NCURSES, 1, [Use ncurses])
++ [LIBS="${LIBS} ${NCURSES_LIBS}"]
++ ]
++)
+
+ AC_CHECK_LIB(iconv, iconv_open)
+