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