summaryrefslogtreecommitdiff
blob: 85d304fb10e6d1315e685ef3cc95e96eee8b670c (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
66
67
68
69
70
71
72
73
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5
inherit autotools eutils gnome2-utils games

DESCRIPTION="puzzle game similar to Oxyd"
HOMEPAGE="http://www.nongnu.org/enigma/"
SRC_URI="mirror://sourceforge/enigma-game/${P}.tar.gz"

LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="amd64 ppc x86"
IUSE="nls"

COMMON_DEPS="media-libs/sdl-ttf
	media-libs/libsdl[video]
	media-libs/sdl-mixer
	media-libs/sdl-image[jpeg,png]
	media-libs/libpng:0=
	sys-libs/zlib
	net-misc/curl
	|| ( >=dev-libs/xerces-c-3[icu] >=dev-libs/xerces-c-3[-icu,-iconv] )
	net-libs/enet:=
	nls? ( virtual/libintl )"
DEPEND="${COMMON_DEPS}
	sys-devel/gettext"
RDEPEND="${COMMON_DEPS}
	media-fonts/dejavu
	x11-misc/xdg-utils"

src_prepare() {
	cp /usr/share/gettext/config.rpath .
	epatch "${FILESDIR}"/${P}-build.patch
	sed -i \
		-e "s:DOCDIR:\"/usr/share/doc/${P}/html\":" \
		src/main.cc || die
	eautoreconf
}

src_configure() {
	egamesconf \
		--with-system-enet \
		$(use_enable nls)
}

src_install() {
	DOCS="ACKNOWLEDGEMENTS AUTHORS CHANGES README doc/HACKING" \
		default
	dosym \
		/usr/share/fonts/dejavu/DejaVuSansCondensed.ttf \
		"${GAMES_DATADIR}"/${PN}/fonts/DejaVuSansCondensed.ttf
	dosym \
		/usr/share/fonts/dejavu/DejaVuSans.ttf \
		"${GAMES_DATADIR}"/${PN}/fonts/vera_sans.ttf
	dohtml -r doc/*
	doman doc/enigma.6
	prepgamesdirs
}

pkg_preinst() {
	games_pkg_preinst
	gnome2_icon_savelist
}

pkg_postinst() {
	games_pkg_postinst
	gnome2_icon_cache_update
}

pkg_postrm() {
	gnome2_icon_cache_update
}