Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2021 Gentoo Authors |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
4 |
EAPI=7 |
5 |
inherit autotools xdg-utils |
6 |
|
7 |
MY_PV="${PV/_/-}" |
8 |
MY_P_LONG="${PN}-${MY_PV}" |
9 |
MY_P_SHORT="${PN}-${PV%%_*}" |
10 |
DESCRIPTION="Puzzle game similar to Oxyd" |
11 |
HOMEPAGE="http://www.nongnu.org/enigma/" |
12 |
SRC_URI="https://github.com/Enigma-Game/Enigma/releases/download/${MY_PV}/${MY_P_LONG}.tar.gz" |
13 |
|
14 |
LICENSE="GPL-2+" |
15 |
SLOT="0" |
16 |
KEYWORDS="~amd64 ~x86" |
17 |
IUSE="nls" |
18 |
|
19 |
COMMON_DEPS=" |
20 |
media-libs/sdl2-ttf |
21 |
media-libs/libsdl2[video] |
22 |
media-libs/sdl2-mixer |
23 |
media-libs/sdl2-image[jpeg,png] |
24 |
media-libs/libpng:0= |
25 |
sys-libs/zlib |
26 |
net-misc/curl |
27 |
|| ( >=dev-libs/xerces-c-3[icu] >=dev-libs/xerces-c-3[-icu,-iconv] ) |
28 |
net-libs/enet:= |
29 |
nls? ( virtual/libintl ) |
30 |
" |
31 |
DEPEND="${COMMON_DEPS} |
32 |
sys-devel/gettext |
33 |
" |
34 |
RDEPEND="${COMMON_DEPS} |
35 |
media-fonts/dejavu |
36 |
x11-misc/xdg-utils |
37 |
" |
38 |
|
39 |
S="${WORKDIR}/${MY_P_SHORT}" |
40 |
|
41 |
PATCHES=( |
42 |
"${FILESDIR}/${PN}-1.30_alpha-build.patch" |
43 |
) |
44 |
|
45 |
src_prepare() { |
46 |
default |
47 |
cp /usr/share/gettext/config.rpath . |
48 |
sed -i \ |
49 |
-e "s:DOCDIR:\"/usr/share/doc/${MY_P_SHORT}/html\":" \ |
50 |
src/main.cc || die |
51 |
eautoreconf |
52 |
} |
53 |
|
54 |
src_configure() { |
55 |
econf \ |
56 |
--with-system-enet \ |
57 |
$(use_enable nls) |
58 |
} |
59 |
|
60 |
src_install() { |
61 |
HTML_DOCS="doc/*" DOCS="ACKNOWLEDGEMENTS AUTHORS CHANGES README doc/HACKING" \ |
62 |
default |
63 |
dosym \ |
64 |
../../fonts/dejavu/DejaVuSansCondensed.ttf \ |
65 |
/usr/share/${PN}/fonts/DejaVuSansCondensed.ttf |
66 |
dosym \ |
67 |
../../fonts/dejavu/DejaVuSans.ttf \ |
68 |
/usr/share/${PN}/fonts/vera_sans.ttf |
69 |
doman doc/enigma.6 |
70 |
} |
71 |
|
72 |
pkg_postinst() { |
73 |
xdg_icon_cache_update |
74 |
} |
75 |
|
76 |
pkg_postrm() { |
77 |
xdg_icon_cache_update |
78 |
} |