summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2023-07-29 13:50:09 +0200
committerPacho Ramos <pacho@gentoo.org>2023-07-29 13:50:11 +0200
commitbc4da903011348c12f5fc058b25dba3db6b69c71 (patch)
tree7ee11693653da2f74e18a8179bb3a2fc2a147d8d /net-misc
parentnet-libs/libqmi: Sync live ebuild (diff)
downloadgentoo-bc4da903011348c12f5fc058b25dba3db6b69c71.tar.gz
gentoo-bc4da903011348c12f5fc058b25dba3db6b69c71.tar.bz2
gentoo-bc4da903011348c12f5fc058b25dba3db6b69c71.zip
net-misc/modemmanager: add 1.20.6
Also stop using obsolete plugdev group and follow other distributions for polkit setups. Thanks-to: Matt Turner Closes: https://bugs.gentoo.org/694284 Closes: https://bugs.gentoo.org/899226 Signed-off-by: Pacho Ramos <pacho@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/modemmanager/Manifest1
-rw-r--r--net-misc/modemmanager/modemmanager-1.20.6.ebuild122
2 files changed, 123 insertions, 0 deletions
diff --git a/net-misc/modemmanager/Manifest b/net-misc/modemmanager/Manifest
index cc11caaca071..6ae0b2c209c0 100644
--- a/net-misc/modemmanager/Manifest
+++ b/net-misc/modemmanager/Manifest
@@ -1 +1,2 @@
DIST ModemManager-1.18.12.tar.xz 2589020 BLAKE2B e82db0a62d29753e22b9f9c09e60d8f5dca070cbac27b6df54ff8cd166cbb837dca3b162ac06afea0e75abdc8d407253a28cee58dacd739d4b485fa9f5485acb SHA512 7ee3b091ca2350a1d52f1ff0c0657c9f279594ffbff5ea57be59ca024331cafbac34901ca9ed4ef2b71e8c51b594526f921d3aeee6e8748cd0532a16218c5d6c
+DIST ModemManager-1.20.6.tar.bz2 1467367 BLAKE2B 6fc6e678fac966ccd6697e469152e3b0fa93d868d16985828e01b4890ba35beacc8f1c5a47a74bf8586035088c6f61124d12214d022e30dbc3b9196b0dd6f28e SHA512 2c5c121d6a74a7dc0922231a88ba64e350e947a57dae25ce7e8c58b6041b60fd5c4ff395e641beef3447b0239e1e60c15c2752e47e77a648a1bea9ef5f3ac577
diff --git a/net-misc/modemmanager/modemmanager-1.20.6.ebuild b/net-misc/modemmanager/modemmanager-1.20.6.ebuild
new file mode 100644
index 000000000000..105550bab53c
--- /dev/null
+++ b/net-misc/modemmanager/modemmanager-1.20.6.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{9..12} )
+inherit bash-completion-r1 meson python-any-r1 optfeature systemd udev vala xdg
+
+DESCRIPTION="Modem and mobile broadband management libraries"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/ModemManager/ https://gitlab.freedesktop.org/mobile-broadband/ModemManager"
+SRC_URI="https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/archive/${PV}/ModemManager-${PV}.tar.bz2"
+
+LICENSE="GPL-2+"
+SLOT="0/1" # subslot = dbus interface version, i.e. N in org.freedesktop.ModemManager${N}
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+IUSE="elogind gtk-doc +introspection +mbim policykit +qmi +qrtr selinux systemd test +udev vala"
+REQUIRED_USE="
+ ?? ( elogind systemd )
+ qrtr? ( qmi )
+ vala? ( introspection )
+"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ >=dev-libs/glib-2.56.0:2
+ udev? ( >=dev-libs/libgudev-232:= )
+ introspection? ( >=dev-libs/gobject-introspection-1.38:= )
+ mbim? ( >=net-libs/libmbim-1.28.0 )
+ policykit? ( >=sys-auth/polkit-0.106[introspection?] )
+ qmi? ( >=net-libs/libqmi-1.32.0:=[qrtr?] )
+ qrtr? ( >=net-libs/libqrtr-glib-1.0.0:= )
+ elogind? ( sys-auth/elogind )
+ systemd? ( >=sys-apps/systemd-209 )
+"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-modemmanager )
+"
+BDEPEND="
+ dev-util/gdbus-codegen
+ dev-util/glib-utils
+ >=sys-devel/gettext-0.19.8
+ virtual/pkgconfig
+ gtk-doc? ( dev-util/gtk-doc )
+ test? (
+ ${PYTHON_DEPS}
+ $(python_gen_any_dep '
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ ')
+ )
+ vala? ( $(vala_depend) )
+"
+
+S="${WORKDIR}/ModemManager-${PV}"
+
+python_check_deps() {
+ python_has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
+ python_has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ use vala && vala_setup
+ default
+}
+
+src_configure() {
+ # Let's avoid BuildRequiring bash-completion, install it manually
+ local emesonargs=(
+ -Dbash_completion=false
+ $(meson_use gtk-doc gtk_doc)
+ $(meson_use introspection)
+
+ $(meson_use udev)
+ -Dudevdir="$(get_udevdir)"
+
+ $(meson_use systemd systemd_journal)
+
+ -Dpolkit=$(usex policykit permissive no)
+
+ $(meson_use mbim)
+ $(meson_use qmi)
+ $(meson_use qrtr)
+
+ $(meson_use vala vapi)
+ )
+ if use systemd || use elogind; then
+ emesonargs+=(-Dsystemd_suspend_resume=true)
+ else
+ emesonargs+=(-Dsystemd_suspend_resume=false)
+ fi
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install
+ newinitd "${FILESDIR}/modemmanager.initd" modemmanager
+ newbashcomp cli/mmcli-completion mmcli
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ if ! use udev; then
+ ewarn "You have built ModemManager without udev support. You may have to teach it"
+ ewarn "about your modem port manually."
+ fi
+
+ use udev && udev_reload
+
+ systemd_reenable ModemManager.service
+
+ optfeature "the case your modem shows up as a storage drive" sys-apps/usb_modeswitch
+}
+
+pkg_postrm() {
+ xdg_pkg_postrm
+ use udev && udev_reload
+}