Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/modemmanager/
Date: Fri, 08 Jan 2021 02:34:13
Message-Id: 1610073225.b2f5ba9201f774be75f6c3b7ef20ebbe5162dd39.mattst88@gentoo
1 commit: b2f5ba9201f774be75f6c3b7ef20ebbe5162dd39
2 Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 7 17:50:26 2021 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 8 02:33:45 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2f5ba92
7
8 net-misc/modemmanager: 1.14.8 version bump, EAPI=7
9
10 Closes: https://bugs.gentoo.org/710400
11 Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
12 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
13
14 net-misc/modemmanager/Manifest | 1 +
15 net-misc/modemmanager/modemmanager-1.14.8.ebuild | 130 +++++++++++++++++++++++
16 2 files changed, 131 insertions(+)
17
18 diff --git a/net-misc/modemmanager/Manifest b/net-misc/modemmanager/Manifest
19 index d30a9df75e4..0af0f040209 100644
20 --- a/net-misc/modemmanager/Manifest
21 +++ b/net-misc/modemmanager/Manifest
22 @@ -1,2 +1,3 @@
23 DIST ModemManager-1.10.0.tar.xz 2201468 BLAKE2B 4a572feba7d62269ed9d6066565e1b7d41db3bece5d450796ee18f43a9a91a886f76dfe0db4887c9ca13643f72f4460c93b3dd2ae7643eb4c37b01905a3ff3c4 SHA512 676b11892b284c2da587895e71903f80ec96978c66eafae5e2d90e5c0f1dae18e50efc68b704c7907f01f208d585f5a8140316cf83e093df3f782c80949c33bc
24 +DIST ModemManager-1.14.8.tar.xz 2255964 BLAKE2B 8f0e4e4747b3603795b533c41949ef7180922e92b7b26348145e18ffaa38f23cccbcb6662ac912216d33b4aef805c5f7ad10aef8029ffd16eb30b331fc2ca88e SHA512 2457214fecd7d4d9fef291f756ef19973b98a05d07721cd57bdaee704cd6b9e96d27f6741bd8d245a0495f1d338e65db12f19b2d9a8dd6a5cddfb050614381c6
25 DIST ModemManager-1.8.2.tar.xz 2088248 BLAKE2B e53ec3dacac2b1d57191de0eba130ea575a40047e5faa1c813543f1ca17164d71a18478ec6c0392adabea94d2455ee510ceceefc16798fec6f26ec834ebbf84c SHA512 fb00ce6f3dc9795468e81ba295ad82e9586add2d7118661ea5f287a99afca97dc3aea64488393792bb1198e7abf2605bbc5ded2517980d67f8819931effdeea5
26
27 diff --git a/net-misc/modemmanager/modemmanager-1.14.8.ebuild b/net-misc/modemmanager/modemmanager-1.14.8.ebuild
28 new file mode 100644
29 index 00000000000..926d0eeec65
30 --- /dev/null
31 +++ b/net-misc/modemmanager/modemmanager-1.14.8.ebuild
32 @@ -0,0 +1,130 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +VALA_USE_DEPEND="vapigen"
38 +
39 +inherit gnome2 readme.gentoo-r1 systemd toolchain-funcs udev vala
40 +
41 +DESCRIPTION="Modem and mobile broadband management libraries"
42 +HOMEPAGE="https://www.freedesktop.org/wiki/Software/ModemManager/"
43 +SRC_URI="https://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz"
44 +
45 +LICENSE="GPL-2+"
46 +SLOT="0/1" # subslot = dbus interface version, i.e. N in org.freedesktop.ModemManager${N}
47 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
48 +
49 +IUSE="elogind +introspection mbim policykit +qmi systemd +udev vala"
50 +REQUIRED_USE="
51 + ?? ( elogind systemd )
52 + vala? ( introspection )
53 +"
54 +
55 +DEPEND="
56 + >=dev-libs/glib-2.48.0:2
57 + udev? ( >=dev-libs/libgudev-230:= )
58 + introspection? ( >=dev-libs/gobject-introspection-0.9.6:= )
59 + mbim? ( >=net-libs/libmbim-1.24.0 )
60 + policykit? ( >=sys-auth/polkit-0.106[introspection] )
61 + qmi? ( >=net-libs/libqmi-1.26.0:= )
62 + elogind? ( sys-auth/elogind )
63 + systemd? ( >=sys-apps/systemd-209 )
64 +"
65 +RDEPEND="${DEPEND}
66 + policykit? ( acct-group/plugdev )
67 +"
68 +BDEPEND="
69 + dev-util/gdbus-codegen
70 + dev-util/glib-utils
71 + >=dev-util/gtk-doc-am-1
72 + >=sys-devel/gettext-0.19.8
73 + virtual/pkgconfig
74 + vala? ( $(vala_depend) )
75 +"
76 +
77 +S="${WORKDIR}/ModemManager-${PV}"
78 +
79 +src_prepare() {
80 + DOC_CONTENTS="
81 + If your USB modem shows up only as a storage device when you plug it in,
82 + then you should install sys-apps/usb_modeswitch, which will automatically
83 + switch it over to USB modem mode whenever you plug it in.\n"
84 +
85 + if use policykit; then
86 + DOC_CONTENTS+="\nTo control your modem without needing to enter the root password,
87 + add your user account to the 'plugdev' group."
88 + fi
89 +
90 + use vala && vala_src_prepare
91 + gnome2_src_prepare
92 +}
93 +
94 +src_configure() {
95 + local myconf=(
96 + --disable-Werror
97 + --disable-static
98 + --with-dist-version=${PVR}
99 + --with-udev-base-dir="$(get_udevdir)"
100 + $(use_with udev)
101 + $(use_enable introspection)
102 + $(use_with mbim)
103 + $(use_with policykit polkit)
104 + $(use_with systemd systemd-suspend-resume)
105 + $(use_with systemd systemd-journal)
106 + $(use_with qmi)
107 + $(use_enable vala)
108 + )
109 + if use elogind; then
110 + local pkgconfig="$(tc-getPKG_CONFIG)"
111 + myconf+=(
112 + --with-systemd-suspend-resume
113 + LIBSYSTEMD_LOGIN_CFLAGS="$(${pkgconfig} --cflags "libelogind")"
114 + LIBSYSTEMD_LOGIN_LIBS="$(${pkgconfig} --libs "libelogind")"
115 + )
116 + fi
117 + gnome2_src_configure "${myconf[@]}"
118 +}
119 +
120 +src_install() {
121 + gnome2_src_install
122 +
123 + # Allow users in plugdev group full control over their modem
124 + if use policykit; then
125 + insinto /usr/share/polkit-1/rules.d/
126 + doins "${FILESDIR}"/01-org.freedesktop.ModemManager1.rules
127 + fi
128 +
129 + readme.gentoo_create_doc
130 +}
131 +
132 +pkg_postinst() {
133 + gnome2_pkg_postinst
134 +
135 + # The polkit rules file moved to /usr/share
136 + old_rules="${EROOT}/etc/polkit-1/rules.d/01-org.freedesktop.ModemManager.rules"
137 + if [[ -f "${old_rules}" ]]; then
138 + case "$(md5sum ${old_rules})" in
139 + c5ff02532cb1da2c7545c3069e5d0992* | 5c50f0dc603c0a56e2851a5ce9389335* )
140 + # Automatically delete the old rules.d file if the user did not change it
141 + elog
142 + elog "Removing old ${old_rules} ..."
143 + rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
144 + ;;
145 + * )
146 + elog "The ${old_rules}"
147 + elog "file moved to /usr/share/polkit-1/rules.d/ in >=modemmanager-0.5.2.0-r2"
148 + elog "If you edited ${old_rules}"
149 + elog "without changing its behavior, you may want to remove it."
150 + ;;
151 + esac
152 + fi
153 +
154 + if ! use udev; then
155 + ewarn "You have built ModemManager without udev support. You may have to teach it"
156 + ewarn "about your modem port manually."
157 + fi
158 +
159 + systemd_reenable ModemManager.service
160 +
161 + readme.gentoo_print_elog
162 +}