summaryrefslogtreecommitdiff
blob: 39b08af052a57ab9b171e9d95f7c46a98a4c5fb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit autotools multilib

DESCRIPTION="An enhanced version of the Roguelike game Angband"
HOMEPAGE="http://www.zangband.org/"
SRC_URI="ftp://ftp.sunet.se/pub/games/Angband/Variant/ZAngband/${P}.tar.gz"

LICENSE="Moria"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="tk"

RDEPEND="
	tk? (
		dev-lang/tcl:0=
		dev-lang/tk:0=
		)
	x11-libs/libXaw"
DEPEND="${RDEPEND}
	x11-base/xorg-proto"

S=${WORKDIR}/${PN}

PATCHES=( "${FILESDIR}"/${P}-tk85.patch
	"${FILESDIR}"/${P}-rng.patch
	"${FILESDIR}"/${P}-tinfo.patch
	"${FILESDIR}"/${P}-configure.patch
	"${FILESDIR}"/${P}-makefile.patch )

src_prepare() {
	default

	mv configure.in configure.ac || die
	eautoreconf
}

src_configure() {
	local myconf=(
		--libdir="${EPREFIX}"/$(get_libdir)/${PN}
		--with-setgid="nobody"
		--without-gtk
		$(use_with tk tcltk)
	)

	econf "${myconf[@]}"
}

DOCS=( readme
	z_faq.txt
	z_update.txt )

src_install() {
	# Install the basic files but remove unneeded crap
	emake DESTDIR="${D}/" installbase
	rm "${D}"/{angdos.cfg,readme,z_faq.txt,z_update.txt}

	# Install everything else and fix the permissions
	dobin zangband

	einstalldocs
}