Merge github#758: media-sound/mpd: fix the systemd user service
[gentoo.git] / dev-games / tiled / tiled-0.12.3.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python2_7 )
8 inherit fdo-mime multilib python-single-r1 qt4-r2
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-2 GPL-2+"
15 SLOT="0"
16 KEYWORDS="~amd64"
17 IUSE="examples python"
18
19 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
20
21 DEPEND=">=dev-qt/qtcore-4.7:4
22         >=dev-qt/qtgui-4.7:4
23         >=dev-qt/qtopengl-4.7:4
24         sys-libs/zlib
25         python? ( ${PYTHON_DEPS} )"
26 RDEPEND="${DEPEND}"
27
28 DOCS=( AUTHORS COPYING NEWS README.md )
29
30 pkg_setup() {
31         use python && python-single-r1_pkg_setup
32 }
33
34 src_prepare() {
35         rm -r src/zlib || die
36 }
37
38 src_configure() {
39         eqmake4 LIBDIR="/usr/$(get_libdir)" PREFIX="/usr" DISABLE_PYTHON_PLUGIN="$(usex !python)"
40 }
41
42 src_install() {
43         qt4-r2_src_install
44
45         if use examples ; then
46                 docompress -x /usr/share/doc/${PF}/examples
47                 dodoc -r examples
48         fi
49 }
50
51 pkg_postinst() {
52         fdo-mime_desktop_database_update
53         fdo-mime_mime_database_update
54 }
55
56 pkg_postrm() {
57         fdo-mime_desktop_database_update
58         fdo-mime_mime_database_update
59 }