dev-libs/appstream: remove 0.12.3 and 0.12.4
[gentoo.git] / dev-libs / appstream / appstream-0.12.6.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 inherit meson xdg-utils
7
8 if [[ ${PV} = *9999* ]]; then
9         inherit git-r3
10         EGIT_REPO_URI="https://github.com/ximion/${PN}"
11 else
12         MY_PN="AppStream"
13         SRC_URI="https://www.freedesktop.org/software/appstream/releases/${MY_PN}-${PV}.tar.xz"
14         KEYWORDS="amd64 ~arm ~arm64 x86"
15         S="${WORKDIR}/${MY_PN}-${PV}"
16 fi
17
18 DESCRIPTION="Cross-distro effort for providing metadata for software in the Linux ecosystem"
19 HOMEPAGE="https://www.freedesktop.org/wiki/Distributions/AppStream/"
20
21 LICENSE="LGPL-2.1+ GPL-2+"
22 # check as_api_level
23 SLOT="0/4"
24 IUSE="apt +introspection qt5 test"
25
26 BDEPEND="
27         app-text/docbook-xml-dtd:4.5
28         dev-libs/appstream-glib
29         dev-util/itstool
30         >=dev-util/meson-0.42.0
31         >=sys-devel/gettext-0.19.8
32         test? (
33                 dev-qt/linguist-tools:5
34                 qt5? ( dev-qt/qttest:5 )
35         )
36 "
37 DEPEND="
38         >=dev-libs/glib-2.54:2
39         dev-libs/libxml2:2
40         dev-libs/libyaml
41         dev-libs/snowball-stemmer
42         introspection? ( >=dev-libs/gobject-introspection-1.56:= )
43         qt5? ( dev-qt/qtcore:5 )
44 "
45 RDEPEND="${DEPEND}"
46
47 src_prepare() {
48         default
49         sed -e "/^as_doc_target_dir/s/appstream/${PF}/" -i docs/meson.build || die
50         if ! use test; then
51                 sed -e "/^subdir.*tests/s/^/#DONT /" -i {,qt/}meson.build || die # bug 675944
52         fi
53 }
54
55 src_configure() {
56         xdg_environment_reset
57
58         local emesonargs=(
59                 -Dapidocs=false
60                 -Ddocs=false
61                 -Dmaintainer=false
62                 -Dstemming=true
63                 -Dvapi=false
64                 -Dapt-support=$(usex apt true false)
65                 -Dgir=$(usex introspection true false)
66                 -Dqt=$(usex qt5 true false)
67         )
68
69         meson_src_configure
70 }