dev-games/tiled: version bump 1.2.4
[gentoo.git] / dev-games / tiled / tiled-1.2.4.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python3_6 )
7 inherit gnome2-utils multilib python-single-r1 qmake-utils xdg-utils
8
9 DESCRIPTION="A general purpose tile map editor"
10 HOMEPAGE="https://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.9:5
22         >=dev-qt/qtgui-5.9:5
23         >=dev-qt/qtnetwork-5.9:5
24         >=dev-qt/qtwidgets-5.9:5
25         sys-libs/zlib
26         python? ( ${PYTHON_DEPS} )
27 "
28 DEPEND="${RDEPEND}"
29 BDEPEND="dev-qt/linguist-tools:5"
30
31 DOCS=( AUTHORS COPYING NEWS.md README.md )
32
33 pkg_setup() {
34         use python && python-single-r1_pkg_setup
35 }
36
37 src_configure() {
38         eqmake5 LIBDIR="/usr/$(get_libdir)" PREFIX="/usr" DISABLE_PYTHON_PLUGIN="$(usex !python)"
39 }
40
41 src_install() {
42         emake INSTALL_ROOT="${D}" install
43
44         einstalldocs
45
46         if use examples ; then
47                 docompress -x /usr/share/doc/${PF}/examples
48                 dodoc -r examples
49         fi
50 }
51
52 pkg_postinst() {
53         xdg_icon_cache_update
54         xdg_desktop_database_update
55         xdg_mimeinfo_database_update
56 }
57
58 pkg_postrm() {
59         xdg_icon_cache_update
60         xdg_desktop_database_update
61         xdg_mimeinfo_database_update
62 }