dev-games/tiled: version bump
[gentoo.git] / dev-games / tiled / tiled-0.16.0.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=6
6
7 PYTHON_COMPAT=( python2_7 )
8 inherit fdo-mime gnome2-utils multilib python-single-r1 qmake-utils
9
10 DESCRIPTION="A general purpose tile map editor"
11 HOMEPAGE="http://www.mapeditor.org/"
12 SRC_URI="https://github.com/bjorn/tiled/archive/v${PV}/${P}.tar.gz"
13
14 LICENSE="BSD BSD-2 GPL-2+"
15 SLOT="0"
16 KEYWORDS="~amd64"
17 IUSE="examples python"
18
19 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
20
21 RDEPEND="
22         dev-qt/qtcore:5
23         dev-qt/qtgui:5
24         dev-qt/qtnetwork:5
25         dev-qt/qtopengl:5
26         dev-qt/qtwidgets:5
27         sys-libs/zlib
28         python? ( ${PYTHON_DEPS} )
29 "
30 DEPEND="${RDEPEND}
31         dev-qt/linguist-tools:5
32 "
33
34 pkg_setup() {
35         use python && python-single-r1_pkg_setup
36 }
37
38 src_configure() {
39         eqmake5 LIBDIR="/usr/$(get_libdir)" PREFIX="/usr" DISABLE_PYTHON_PLUGIN="$(usex !python)"
40 }
41
42 src_install() {
43         emake INSTALL_ROOT="${D}" install
44
45         dodoc AUTHORS COPYING NEWS README.md
46
47         if use examples ; then
48                 docompress -x /usr/share/doc/${PF}/examples
49                 dodoc -r examples
50         fi
51 }
52
53 pkg_preinst() {
54         gnome2_icon_savelist
55 }
56
57 pkg_postinst() {
58         gnome2_icon_cache_update
59         fdo-mime_desktop_database_update
60         fdo-mime_mime_database_update
61 }
62
63 pkg_postrm() {
64         gnome2_icon_cache_update
65         fdo-mime_desktop_database_update
66         fdo-mime_mime_database_update
67 }