1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{6,7} )
8 inherit meson python-single-r1 vala xdg-utils
10 DESCRIPTION="Aims to make updating firmware on Linux automatic, safe and reliable"
11 HOMEPAGE="https://fwupd.org"
12 SRC_URI="https://github.com/hughsie/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
16 KEYWORDS="amd64 ~arm x86"
17 IUSE="agent colorhug consolekit dell doc elogind +gpg +man nvme pkcs7 redfish systemd test thunderbolt uefi"
18 RESTRICT="!test? ( test )"
20 REQUIRED_USE="${PYTHON_REQUIRED_USE}
21 ^^ ( consolekit elogind systemd )
25 RDEPEND="${PYTHON_DEPS}
29 >=dev-libs/glib-2.45.8:2
33 >=dev-libs/libgusb-0.2.9[introspection]
34 >=dev-libs/libxmlb-0.1.7
35 dev-python/pillow[${PYTHON_USEDEP}]
36 dev-python/pycairo[${PYTHON_USEDEP}]
37 dev-python/pygobject:3[cairo,${PYTHON_USEDEP}]
38 >=net-libs/libsoup-2.51.92:2.4[introspection]
39 >=sys-auth/polkit-0.103
41 colorhug? ( >=x11-misc/colord-1.2.12:0= )
42 consolekit? ( >=sys-auth/consolekit-1.0.0 )
45 >=sys-libs/libsmbios-2.4.0
47 elogind? ( sys-auth/elogind )
52 nvme? ( sys-libs/efivar )
53 pkcs7? ( >=net-libs/gnutls-3.4.4.1:= )
54 redfish? ( sys-libs/efivar )
55 systemd? ( >=sys-apps/systemd-211 )
56 thunderbolt? ( sys-apps/thunderbolt-software-user-space )
67 x11-libs/pango[introspection]
68 nvme? ( >=sys-kernel/linux-headers-4.4 )
69 test? ( net-libs/gnutls[tools] )
72 >=dev-util/meson-0.47.0
74 doc? ( dev-util/gtk-doc )
76 app-text/docbook-sgml-utils
81 # required for fwupd daemon to run.
82 # NOT a build time dependency. The build system does not check for dbus.
83 PDEPEND="sys-apps/dbus"
87 sed -e "s/'--create'/'--absolute-name', '--create'/" \
88 -i data/tests/builder/meson.build || die
89 sed -e "/'-Werror',/d" \
90 -i plugins/uefi/efi/meson.build || die
97 --localstatedir "${EPREFIX}"/var
98 -Dagent="$(usex agent true false)"
99 -Dconsolekit="$(usex consolekit true false)"
100 -Dgtkdoc="$(usex doc true false)"
101 -Delogind="$(usex elogind true false)"
102 -Dgpg="$(usex gpg true false)"
103 -Dman="$(usex man true false)"
104 -Dpkcs7="$(usex pkcs7 true false)"
105 -Dplugin_dell="$(usex dell true false)"
106 # Requires libflashrom which our sys-apps/flashrom
107 # package does not provide
108 -Dplugin_flashrom="false"
109 # Dependencies are not available (yet?)
110 -Dplugin_modem_manager="false"
111 -Dplugin_nvme="$(usex nvme true false)"
112 -Dplugin_redfish="$(usex redfish true false)"
113 -Dplugin_synaptics="$(usex dell true false)"
114 -Dplugin_thunderbolt="$(usex thunderbolt true false)"
115 -Dplugin_uefi="$(usex uefi true false)"
116 -Dsystemd="$(usex systemd true false)"
117 -Dtests="$(usex test true false)"
126 sed "s@%SEAT_MANAGER%@$(usex elogind elogind consolekit)@" \
127 "${FILESDIR}"/${PN}-r1 \
128 > "${T}"/${PN} || die
131 if ! use systemd ; then
132 # Don't timeout when fwupd is running (#673140)
133 sed '/^IdleTimeout=/s@=[[:digit:]]\+@=0@' \
134 -i "${ED}"/etc/${PN}/daemon.conf || die
139 elog "In case you are using openrc as init system"
140 elog "and you're upgrading from <fwupd-1.1.0, you"
141 elog "need to start the fwupd daemon via the openrc"
142 elog "init script that comes with this package."