summaryrefslogtreecommitdiff
path: root/games-roguelike/hengband
diff options
context:
space:
mode:
Diffstat (limited to 'games-roguelike/hengband')
-rw-r--r--games-roguelike/hengband/Manifest5
-rw-r--r--games-roguelike/hengband/files/hengband-1.6.2-autoconf-ncurses.patch26
-rw-r--r--games-roguelike/hengband/files/hengband-1.6.2-ovflfix.patch8
-rw-r--r--games-roguelike/hengband/hengband-1.6.2-r1.ebuild70
4 files changed, 73 insertions, 36 deletions
diff --git a/games-roguelike/hengband/Manifest b/games-roguelike/hengband/Manifest
index 6f008ca9f427..59cbe0fd2c89 100644
--- a/games-roguelike/hengband/Manifest
+++ b/games-roguelike/hengband/Manifest
@@ -1,6 +1,7 @@
AUX hengband-1.6.2-added_faq.patch 6371 BLAKE2B 322267980e2b9ddc75245528a1a29fae0936e6cb3a6d87287e4e4d475090c37c47b9d8268fbe52cc5e6725f6a2d034d28c4fdecba57a23137384340a5e5c3fcb SHA512 254283e117f6bf7d050ec152d7bb04cdcbd23235f56da8ed8aa587e23ef21de0a556cac4027e8a3b0fa32d66448c96ac18e9e76d242b9d1a921befcaf78195a1
-AUX hengband-1.6.2-ovflfix.patch 236 BLAKE2B 7a2fc1e76fb1d4755cb4d45ddd0f7f48ecf38e21b769196ccfeabe7cadaacd278c7e3c25e64711f7d362e310247773fb1e907e402a0b1f11a7ac0065325415ad SHA512 0e51671bce72cd0ab1109111556bfda71ef043475c033548ffd5873d9329597e705b9e6459d5e95369df5f5501e2553f9109622d522534ea43f787087160e3cf
+AUX hengband-1.6.2-autoconf-ncurses.patch 939 BLAKE2B 434adedaf4e301ba504ef4af113e8466634f468e29572a0dbc08f7cfe3a4c1c108df9e2cf2ccc5c15e784ff6fe291d285331f9741a231da66b52ad27763988a6 SHA512 509d50cb3e9080d2e060da3efdc0a8b96e921b0668389f797ec23657a8617932f245ed0da9eb0a9cf1ec97c4f5adfc45d05c8ae4fa45677ed10e02226aabee6b
+AUX hengband-1.6.2-ovflfix.patch 308 BLAKE2B 9ba098376a067d919a569d3fc104f5deff57524e22609871842c244aaf816db076456af16917ec0b6c03b6f42e9e07e0b69d51d60f18b8cd62f86483632a243e SHA512 f50e4d247dfac9df2b0f292f15488179b490db57f2ef919173325e8fd4c0dcd47be1b6a96313940aec06790cefe4c26ce1a26029182691981d2927e58e7ef00d
DIST hengband-1.6.2-mispellings.patch.gz 11964 BLAKE2B a409161c70d655078396c8774b251cbb467802eaa9d6c96322a49ba1956fb3c9a5ba24d8de74907afea96c1df62fdfee3fe581a45e19b77e51f917e862c63531 SHA512 73838981616e09deca7afc3911386e665ac38fafcdcea42d87bc41e4bc187551278efeaa608a772a444e0c178c3f990e16dd302b6a8dc6dfdd8625d463b9b3b5
DIST hengband-1.6.2.tar.bz2 2029169 BLAKE2B 3a25a829f3fba8bd265d0b13fc81becbbf505dcb4efd78010d6cc8db29bb4be22911d18bf7c4496e4b408c3742aa12c36060bacd62bb79de0be4fa5c36191afa SHA512 24c67f00556d7899b4f18f3071c4bd50bc754566c4c4736c18248ced243b1332e6c84381250c1a59358e7a914e5d62db05c47ab0921bcf40fbd6cfe4b6717520
-EBUILD hengband-1.6.2-r1.ebuild 1440 BLAKE2B a84f8c11cf8a6ad051544d7b6411d65ca86d1210b684cc886211fbca1e389d2999d6b46d245d3d12daf592ef02b7ef25975a8b4ccef8f1bfbb25a66746566d55 SHA512 09297b3a37a705d0cf247ec5811d6e9c8ef680e083700f6dafb520f7916f6d4dc08a30e05b67e27d169f68dd590976645a67fb40d427d5dff2d86f37a3be2734
+EBUILD hengband-1.6.2-r1.ebuild 1446 BLAKE2B 46baa4715f6e4e074170c3083efcf883ef068a75618579ce2daf7f734f373689bc7d547fe9370ff73a5215297b18421e23c6ef1cb1c77f162c59576cdd67ceed SHA512 58fc37dbbd377fc40f481c1d30bfe35a4303dc9d9856a8298606236cf21db90ac5e207817bd7a19f02d4f0b12f218e1290e6faa4abd82ba71d5caf434a193198
MISC metadata.xml 334 BLAKE2B 26c821bfd5ecfb9e843418084ffc417e2b22f3c371b442e9473a85ad45aed5861259194c1c1d48dac929d60019d4b040f751afb32caced1aa094086d07d098b6 SHA512 ec8a4116d1ad2f15b2dad0148f912da9123d937cd724eaac00ff20541d64b7ac37190f617b8e82376c571a47cb6b886fc269a477c2c6b4aaa0859204f716add9
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 000000000000..3fabd8e1891e
--- /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/files/hengband-1.6.2-ovflfix.patch b/games-roguelike/hengband/files/hengband-1.6.2-ovflfix.patch
index 47bb53cf771a..ec8e1273893f 100644
--- a/games-roguelike/hengband/files/hengband-1.6.2-ovflfix.patch
+++ b/games-roguelike/hengband/files/hengband-1.6.2-ovflfix.patch
@@ -1,6 +1,8 @@
---- src/effects.c.old 2010-10-28 11:51:31.000000000 +0200
-+++ src/effects.c 2010-10-28 11:51:59.000000000 +0200
-@@ -5191,7 +5191,7 @@
+diff --git a/src/effects.c b/src/effects.c
+index a97a2ec..3988b04 100644
+--- a/src/effects.c
++++ b/src/effects.c
+@@ -5191,7 +5191,7 @@ int take_hit(int damage_type, int damage, cptr hit_from, int monspell)
}
else
{
diff --git a/games-roguelike/hengband/hengband-1.6.2-r1.ebuild b/games-roguelike/hengband/hengband-1.6.2-r1.ebuild
index 97f4b9bd3cb7..e6fb57c68472 100644
--- a/games-roguelike/hengband/hengband-1.6.2-r1.ebuild
+++ b/games-roguelike/hengband/hengband-1.6.2-r1.ebuild
@@ -1,62 +1,70 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-inherit eutils autotools games
+EAPI=7
+
+inherit autotools
DESCRIPTION="An Angband variant, with a Japanese/fantasy theme"
HOMEPAGE="http://hengband.sourceforge.jp/en/"
SRC_URI="mirror://sourceforge.jp/hengband/10331/${P}.tar.bz2
mirror://gentoo/${P}-mispellings.patch.gz"
-KEYWORDS="~x86"
LICENSE="Moria"
SLOT="0"
+KEYWORDS="~x86"
IUSE="X l10n_ja"
-RDEPEND=">=sys-libs/ncurses-5:0
- X? ( x11-libs/libX11 )"
-DEPEND="${RDEPEND}
- X? ( x11-libs/libXt )"
+RDEPEND="
+ >=sys-libs/ncurses-5:0=
+ X? ( x11-libs/libX11 )
+"
+DEPEND="
+ ${RDEPEND}
+ X? ( x11-libs/libXt )
+"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.6.2-added_faq.patch"
+ "${FILESDIR}/${PN}-1.6.2-autoconf-ncurses.patch"
+ "${FILESDIR}/${PN}-1.6.2-ovflfix.patch"
+)
src_prepare() {
# Removing Xaw dependency as is not used
- sed -i \
- -e '/Xaw/d' src/main-xaw.c \
- || die
- sed -i \
- -e 's|root\.|root:|' lib/*/Makefile.in \
- || die
- sed -i \
- -e 's:/games/:/:g' configure.in \
- || die
- epatch \
- "../${P}"-mispellings.patch \
- "${FILESDIR}/${P}"-added_faq.patch \
- "${FILESDIR}"/${P}-ovflfix.patch
+ sed -i -e '/Xaw/d' src/main-xaw.c || die
+ # Fix syntax for chown
+ sed -i -e 's|root\.|root:|' lib/*/Makefile.in || die
+ # Don't target the games sub-dir, since we're not using games.eclass any
+ # more
+ sed -i -e 's:/games/:/:g' configure.in || die
+
+ default
+
mv configure.in configure.ac || die
+
eautoreconf
}
src_configure() {
- local myconf
- use l10n_ja || myconf="--disable-japanese"
+ local myconf=(
+ --bindir="${EPREFIX}"/usr/bin
+ --with-setgid="nobody"
+ $(use_with X x)
+ )
+ use l10n_ja || myconf+=( --disable-japanese )
- egamesconf \
- --with-setgid=${GAMES_GROUP} \
- $(use_with X x) \
- ${myconf}
+ 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}
}