|
| 1 | +# Copyright 1999-2020 Gentoo Authors |
| 2 | +# Distributed under the terms of the GNU General Public License v2 |
| 3 | + |
| 4 | +EAPI=7 |
| 5 | +PYTHON_COMPAT=( python3_{6,7,8} ) |
| 6 | + |
| 7 | +inherit gnome.org gnome2-utils meson python-single-r1 xdg |
| 8 | + |
| 9 | +DESCRIPTION="Music management for Gnome" |
| 10 | +HOMEPAGE="https://wiki.gnome.org/Apps/Music" |
| 11 | + |
| 12 | +LICENSE="GPL-2+" |
| 13 | +SLOT="0" |
| 14 | +IUSE="" |
| 15 | +REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
| 16 | + |
| 17 | +KEYWORDS="~amd64 ~arm64 ~x86" |
| 18 | + |
| 19 | +DEPEND="${PYTHON_DEPS} |
| 20 | + >=dev-libs/glib-2.50:2 |
| 21 | + net-libs/gnome-online-accounts[introspection] |
| 22 | + >=dev-libs/gobject-introspection-1.54:= |
| 23 | + >=x11-libs/gtk+-3.24.7:3[introspection] |
| 24 | + >=dev-libs/libdazzle-3.28.0[introspection] |
| 25 | + >=media-libs/libmediaart-1.9.1:2.0[introspection] |
| 26 | + net-libs/libsoup:2.4[introspection] |
| 27 | + >=app-misc/tracker-2.2.0:=[introspection(+)] |
| 28 | + $(python_gen_cond_dep ' |
| 29 | + >=dev-python/pygobject-3.29.1:3[cairo,${PYTHON_MULTI_USEDEP}] |
| 30 | + >=dev-python/pycairo-1.14.0[${PYTHON_MULTI_USEDEP}] |
| 31 | + ') |
| 32 | + >=media-libs/grilo-0.3.9:0.3[introspection] |
| 33 | + >=media-plugins/grilo-plugins-0.3.9:0.3 |
| 34 | +" |
| 35 | +# xdg-user-dirs-update needs to be there to create needed dirs |
| 36 | +# https://bugzilla.gnome.org/show_bug.cgi?id=731613 |
| 37 | +RDEPEND="${DEPEND} |
| 38 | + || ( |
| 39 | + >=app-misc/tracker-miners-2.2.0[gstreamer] |
| 40 | + >=app-misc/tracker-miners-2.2.0[ffmpeg] |
| 41 | + ) |
| 42 | + x11-libs/libnotify[introspection] |
| 43 | + media-libs/gstreamer:1.0[introspection] |
| 44 | + media-libs/gst-plugins-base:1.0[introspection] |
| 45 | + media-plugins/gst-plugins-meta:1.0 |
| 46 | + media-plugins/grilo-plugins:0.3[tracker] |
| 47 | + x11-misc/xdg-user-dirs |
| 48 | +" |
| 49 | +BDEPEND=" |
| 50 | + dev-libs/libxml2:2 |
| 51 | + dev-util/itstool |
| 52 | + >=sys-devel/gettext-0.19.8 |
| 53 | + virtual/pkgconfig |
| 54 | +" |
| 55 | + |
| 56 | +RESTRICT="test" # only does desktop and appdata validation, and latter needs network to validate screenshot from https |
| 57 | + |
| 58 | +pkg_setup() { |
| 59 | + python_setup |
| 60 | +} |
| 61 | + |
| 62 | +src_prepare() { |
| 63 | + sed -e '/sys.path.insert/d' -i "${S}"/gnome-music.in || die "python fixup sed failed" |
| 64 | + xdg_src_prepare |
| 65 | +} |
| 66 | + |
| 67 | +src_install() { |
| 68 | + meson_src_install |
| 69 | + python_fix_shebang "${D}"/usr/bin/gnome-music |
| 70 | + python_optimize |
| 71 | +} |
| 72 | + |
| 73 | +pkg_postinst() { |
| 74 | + xdg_pkg_postinst |
| 75 | + gnome2_schemas_update |
| 76 | +} |
| 77 | + |
| 78 | +pkg_postrm() { |
| 79 | + xdg_pkg_postrm |
| 80 | + gnome2_schemas_update |
| 81 | +} |
0 commit comments