commit:     3deea32a6485c3bf92baafd7ffb6a8e93cc99537
Author:     Wolfgang E. Sanyer <ezzieyguywuf <AT> gmail <DOT> com>
AuthorDate: Sun Mar  7 19:19:37 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Apr  5 17:45:42 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3deea32a

games-roguelike/hengband: add missing tinfo link

Signed-off-by: Wolfgang E. Sanyer <ezzieyguywuf <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/hengband-1.6.2-autoconf-ncurses.patch    | 26 +++++++++++++++++++++
 games-roguelike/hengband/hengband-1.6.2-r1.ebuild  | 27 +++++++++++-----------
 2 files changed, 40 insertions(+), 13 deletions(-)

diff --git 
a/games-roguelike/hengband/files/hengband-1.6.2-autoconf-ncurses.patch 
b/games-roguelike/hengband/files/hengband-1.6.2-autoconf-ncurses.patch
new file mode 100644
index 00000000000..3fabd8e1891
--- /dev/null
+++ b/games-roguelike/hengband/files/hengband-1.6.2-autoconf-ncurses.patch
@@ -0,0 +1,26 @@
+diff --git a/configure.in b/configure.in
+index 0df0e76..d8ea587 100644
+--- a/configure.in
++++ b/configure.in
+@@ -56,13 +56,14 @@ fi
+ 
+ dnl Checks for libraries.
+ dnl Replace `main' with a function in -lncurses:
+-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
++PKG_CHECK_MODULES(
++    [NCURSES],
++    [ncurses],
++    [AC_DEFINE(USE_GCU, 1, [Allow -mGCU environment])
++     AC_DEFINE(USE_NCURSES, 1, [Use ncurses])
++     [LIBS="${LIBS} ${NCURSES_LIBS}"]
++    ]
++)
+ 
+ dnl Checks for header files.
+ AC_PATH_XTRA

diff --git a/games-roguelike/hengband/hengband-1.6.2-r1.ebuild 
b/games-roguelike/hengband/hengband-1.6.2-r1.ebuild
index 97f4b9bd3cb..15fcc021007 100644
--- a/games-roguelike/hengband/hengband-1.6.2-r1.ebuild
+++ b/games-roguelike/hengband/hengband-1.6.2-r1.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
-inherit eutils autotools games
+inherit eutils autotools
 
 DESCRIPTION="An Angband variant, with a Japanese/fantasy theme"
 HOMEPAGE="http://hengband.sourceforge.jp/en/";
@@ -18,6 +18,7 @@ RDEPEND=">=sys-libs/ncurses-5:0
        X? ( x11-libs/libX11 )"
 DEPEND="${RDEPEND}
        X? ( x11-libs/libXt )"
+BDEPEND="virtual/pkgconfig"
 
 src_prepare() {
        # Removing Xaw dependency as is not used
@@ -33,30 +34,30 @@ src_prepare() {
        epatch \
                "../${P}"-mispellings.patch     \
                "${FILESDIR}/${P}"-added_faq.patch \
-               "${FILESDIR}"/${P}-ovflfix.patch
+               "${FILESDIR}"/${P}-ovflfix.patch \
+               "${FILESDIR}/${P}-autoconf-ncurses.patch"
        mv configure.in configure.ac || die
        eautoreconf
 }
 
 src_configure() {
-       local myconf
-       use l10n_ja || myconf="--disable-japanese"
-
-       egamesconf \
-               --with-setgid=${GAMES_GROUP} \
-               $(use_with X x) \
-               ${myconf}
+       local myconf=(
+               --bindir="${EPREFIX}"/usr/bin
+               --with-setgid="nobody"
+               $(use_with X x)
+       )
+       use l10n_ja || myconf+=( --disable-japanese )
+
+       econf "${myconf[@]}"
 }
 
 src_install() {
-       make DESTDIR="${D}" install || die "make install failed"
+       default
+
        if use l10n_ja ; then
                dodoc readme.txt autopick.txt readme_eng.txt autopick_eng.txt
        else
                newdoc readme_eng.txt readme.txt
                newdoc autopick_eng.txt autopick.txt
        fi
-       prepgamesdirs
-       # FIXME: we need to patch around this BS
-       fperms g+w "${GAMES_DATADIR}"/${PN}/lib/{apex,data,save,user}
 }

Reply via email to