|
| 1 | +# Copyright 1999-2020 Gentoo Authors |
| 2 | +# Distributed under the terms of the GNU General Public License v2 |
| 3 | + |
| 4 | +EAPI=7 |
| 5 | + |
| 6 | +inherit meson xdg vala virtualx |
| 7 | + |
| 8 | +MY_P="${PN}-v${PV}" |
| 9 | +DESCRIPTION="Library with GTK widgets for mobile phones" |
| 10 | +HOMEPAGE="https://source.puri.sm/Librem5/libhandy/" |
| 11 | +SRC_URI="https://source.puri.sm/Librem5/libhandy/-/archive/v${PV}/${MY_P}.tar.bz2" |
| 12 | +S="${WORKDIR}/${MY_P}" |
| 13 | + |
| 14 | +LICENSE="LGPL-2.1+" |
| 15 | +SLOT="0.0/0" # It may or may not break ABI in future versions at this point; if new |
| 16 | +# SLOT happens, it'll likely file conflict on gtk-doc and glade library and catalog |
| 17 | +KEYWORDS="~amd64 ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
| 18 | + |
| 19 | +IUSE="examples glade gtk-doc +introspection test +vala" |
| 20 | +REQUIRED_USE="vala? ( introspection )" |
| 21 | +RESTRICT="!test? ( test )" |
| 22 | + |
| 23 | +RDEPEND=" |
| 24 | + >=dev-libs/glib-2.44:2 |
| 25 | + >=x11-libs/gtk+-3.24.1:3[introspection?] |
| 26 | + glade? ( dev-util/glade:3.10= ) |
| 27 | + introspection? ( >=dev-libs/gobject-introspection-1.54:= ) |
| 28 | +" |
| 29 | +DEPEND="${RDEPEND}" |
| 30 | +BDEPEND=" |
| 31 | + vala? ( $(vala_depend) ) |
| 32 | + dev-libs/libxml2:2 |
| 33 | + dev-util/glib-utils |
| 34 | + >=sys-devel/gettext-0.19.8 |
| 35 | + virtual/pkgconfig |
| 36 | + gtk-doc? ( dev-util/gtk-doc |
| 37 | + app-text/docbook-xml-dtd:4.3 ) |
| 38 | +" |
| 39 | + |
| 40 | +src_prepare() { |
| 41 | + use vala && vala_src_prepare |
| 42 | + xdg_src_prepare |
| 43 | +} |
| 44 | + |
| 45 | +src_configure() { |
| 46 | + local emesonargs=( |
| 47 | + -Dprofiling=false # -pg passing |
| 48 | + -Dstatic=false |
| 49 | + $(meson_feature introspection) |
| 50 | + $(meson_use vala vapi) |
| 51 | + $(meson_use gtk-doc gtk_doc) |
| 52 | + $(meson_use test tests) |
| 53 | + $(meson_use examples) |
| 54 | + $(meson_feature glade glade_catalog) |
| 55 | + ) |
| 56 | + meson_src_configure |
| 57 | +} |
| 58 | + |
| 59 | +src_test() { |
| 60 | + virtx meson_src_test |
| 61 | +} |
0 commit comments