games-rpg/manaplus: Marked version 1.7.5.14 stable for amd64 and x86.
[gentoo.git] / games-rpg / manaplus / manaplus-1.7.5.14.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 [[ ${PV} == 9999 ]] && inherit autotools git-r3
6
7 DESCRIPTION="OpenSource 2D MMORPG client for Evol Online and The Mana World"
8 HOMEPAGE="http://manaplus.evolonline.org"
9 if [[ ${PV} == 9999 ]] ; then
10         EGIT_REPO_URI="https://github.com/ManaPlus/ManaPlus.git"
11 else
12         SRC_URI="http://download.evolonline.org/manaplus/download/${PV}/${P}.tar.xz"
13         KEYWORDS="amd64 x86"
14 fi
15
16 LICENSE="GPL-2+"
17 SLOT="0"
18 IUSE="mumble nls opengl pugixml +sdl2 test"
19
20 RDEPEND="
21         >=dev-games/physfs-1.0.0
22         media-fonts/dejavu
23         media-fonts/liberation-fonts
24         media-fonts/mplus-outline-fonts
25         media-fonts/wqy-microhei
26         media-libs/libpng:0=
27         net-misc/curl
28         sys-libs/zlib
29         x11-apps/xmessage
30         x11-libs/libX11
31         x11-misc/xdg-utils
32         mumble? ( media-sound/mumble )
33         nls? ( virtual/libintl )
34         opengl? ( virtual/opengl )
35         pugixml? ( dev-libs/pugixml )
36         !pugixml? ( dev-libs/libxml2 )
37         sdl2? (
38                 media-libs/libsdl2[X,opengl?,video]
39                 media-libs/sdl2-gfx
40                 media-libs/sdl2-image[png]
41                 media-libs/sdl2-mixer[vorbis]
42                 media-libs/sdl2-net
43                 media-libs/sdl2-ttf
44         )
45         !sdl2? (
46                 media-libs/libsdl[X,opengl?,video]
47                 media-libs/sdl-gfx
48                 media-libs/sdl-image[png]
49                 media-libs/sdl-mixer[vorbis]
50                 media-libs/sdl-net
51                 media-libs/sdl-ttf
52         )"
53 DEPEND="${RDEPEND}
54         virtual/pkgconfig
55         nls? ( sys-devel/gettext )"
56
57 src_prepare() {
58         default
59         if [[ ${PV} == 9999 ]] ; then
60                 eautoreconf
61         fi
62 }
63
64 src_configure() {
65         CONFIG_SHELL=/bin/bash \
66         econf \
67                 --localedir=/usr/share/locale \
68                 --without-internalsdlgfx \
69                 $(use_with mumble) \
70                 $(use_enable nls) \
71                 $(use_with opengl) \
72                 --enable-libxml=$(usex pugixml pugixml libxml) \
73                 $(use_with sdl2) \
74                 $(use_enable test unittests)
75 }
76
77 src_install() {
78         default
79
80         local destpath="/usr/share/${PN}"
81         dosym /usr/share/fonts/dejavu/DejaVuSans-Bold.ttf "${destpath}"/data/fonts/dejavusans-bold.ttf
82         dosym /usr/share/fonts/dejavu/DejaVuSans.ttf "${destpath}"/data/fonts/dejavusans.ttf
83         dosym /usr/share/fonts/dejavu/DejaVuSansMono-Bold.ttf "${destpath}"/data/fonts/dejavusansmono-bold.ttf
84         dosym /usr/share/fonts/dejavu/DejaVuSansMono.ttf "${destpath}"/data/fonts/dejavusansmono.ttf
85         dosym /usr/share/fonts/dejavu/DejaVuSerifCondensed-Bold.ttf "${destpath}"/data/fonts/dejavuserifcondensed-bold.ttf
86         dosym /usr/share/fonts/dejavu/DejaVuSerifCondensed.ttf "${destpath}"/data/fonts/dejavuserifcondensed.ttf
87         dosym /usr/share/fonts/liberation-fonts/LiberationMono-Bold.ttf "${destpath}"/data/fonts/liberationsansmono-bold.ttf
88         dosym /usr/share/fonts/liberation-fonts/LiberationMono-Regular.ttf "${destpath}"/data/fonts/liberationsansmono.ttf
89         dosym /usr/share/fonts/liberation-fonts/LiberationSans-Bold.ttf "${destpath}"/data/fonts/liberationsans-bold.ttf
90         dosym /usr/share/fonts/liberation-fonts/LiberationSans-Regular.ttf "${destpath}"/data/fonts/liberationsans.ttf
91         dosym /usr/share/fonts/mplus-outline-fonts/mplus-1p-bold.ttf "${destpath}"/data/fonts/mplus-1p-bold.ttf
92         dosym /usr/share/fonts/mplus-outline-fonts/mplus-1p-regular.ttf "${destpath}"/data/fonts/mplus-1p-regular.ttf
93         dosym /usr/share/fonts/wqy-microhei/wqy-microhei.ttc "${destpath}"/data/fonts/wqy-microhei.ttf
94 }
95
96 src_test() {
97         make check
98 }