summaryrefslogtreecommitdiff
path: root/user/modemmanager
diff options
context:
space:
mode:
Diffstat (limited to 'user/modemmanager')
-rw-r--r--user/modemmanager/01-org.freedesktop.ModemManager.rules8
-rw-r--r--user/modemmanager/APKBUILD48
-rw-r--r--user/modemmanager/no-translit.patch92
3 files changed, 148 insertions, 0 deletions
diff --git a/user/modemmanager/01-org.freedesktop.ModemManager.rules b/user/modemmanager/01-org.freedesktop.ModemManager.rules
new file mode 100644
index 000000000..c57f4c55c
--- /dev/null
+++ b/user/modemmanager/01-org.freedesktop.ModemManager.rules
@@ -0,0 +1,8 @@
+// Let users in either 'plugdev' or 'dialout' control ModemManager
+polkit.addRule(function(action, subject) {
+ if (/^org\.freedesktop\.ModemManager1\.(Device\.Control|Contacts|Messaging|Location)$/.test(action.id) &&
+ (subject.isInGroup("plugdev") || subject.isInGroup("dialout")) && subject.active) {
+ return "yes";
+ }
+});
+
diff --git a/user/modemmanager/APKBUILD b/user/modemmanager/APKBUILD
new file mode 100644
index 000000000..a6ad0524d
--- /dev/null
+++ b/user/modemmanager/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=modemmanager
+pkgver=1.10.0
+pkgrel=0
+pkgdesc="Software to control mobile broadband modems"
+url="https://www.freedesktop.org/wiki/Software/ModemManager/"
+arch="all"
+license="GPL-2.0+ AND LGPL-2.1+"
+depends=""
+checkdepends="dbus-x11"
+makedepends="glib-dev gobject-introspection-dev libgudev-dev libmbim-dev
+ libqmi-dev polkit-dev vala-dev"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
+source="https://www.freedesktop.org/software/ModemManager/ModemManager-$pkgver.tar.xz
+ no-translit.patch
+
+ 01-org.freedesktop.ModemManager.rules
+ "
+builddir="$srcdir/ModemManager-$pkgver"
+
+build() {
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ --disable-more-warnings \
+ --enable-introspection \
+ --enable-vala
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+ install -D -m644 -t "$pkgdir"/usr/share/polkit-1/rules.d/ \
+ "$srcdir"/01-org.freedesktop.ModemManager.rules
+}
+
+sha512sums="676b11892b284c2da587895e71903f80ec96978c66eafae5e2d90e5c0f1dae18e50efc68b704c7907f01f208d585f5a8140316cf83e093df3f782c80949c33bc ModemManager-1.10.0.tar.xz
+78e1c2ef604fb8b204618b9ecdc741ed7087fcc46ee563dbaaf6c9c0185165be58abfc3bf8ba89129fce7570c172cd1ac1e191e6d1200e3029c14a585ff40b83 no-translit.patch
+31ded548acc8ccfcca5cd54384819b73ad9ac83556b754fa03a1a9c08aed7f913c7f066000abef0e52310721ef8c00ca8f48f1f762faaa5792420f62b5201881 01-org.freedesktop.ModemManager.rules"
diff --git a/user/modemmanager/no-translit.patch b/user/modemmanager/no-translit.patch
new file mode 100644
index 000000000..8f6d4b5f7
--- /dev/null
+++ b/user/modemmanager/no-translit.patch
@@ -0,0 +1,92 @@
+--- ModemManager-1.10.0/src/mm-broadband-modem.c.old 2019-01-15 14:57:35.000000000 +0000
++++ ModemManager-1.10.0/src/mm-broadband-modem.c 2019-05-10 05:17:07.329881242 +0000
+@@ -7014,7 +7014,7 @@
+ /* The raw SMS data can only be GSM, UCS2, or unknown (8-bit), so we
+ * need to convert to UCS2 here.
+ */
+- ucs2_text = g_convert (text, -1, "UCS-2BE//TRANSLIT", "UTF-8", NULL, &ucs2_len, NULL);
++ ucs2_text = g_convert (text, -1, "UCS-2BE", "UTF-8", NULL, &ucs2_len, NULL);
+ g_assert (ucs2_text);
+ raw = g_byte_array_sized_new (ucs2_len);
+ g_byte_array_append (raw, (const guint8 *) ucs2_text, ucs2_len);
+--- ModemManager-1.10.0/src/mm-charsets.c.old 2019-05-10 05:09:21.350652258 +0000
++++ ModemManager-1.10.0/src/mm-charsets.c 2019-05-10 05:16:41.752668021 +0000
+@@ -35,15 +35,15 @@
+ } CharsetEntry;
+
+ static CharsetEntry charset_map[] = {
+- { "UTF-8", "UTF8", "UTF-8", "UTF-8//TRANSLIT", MM_MODEM_CHARSET_UTF8 },
+- { "UCS2", NULL, "UCS-2BE", "UCS-2BE//TRANSLIT", MM_MODEM_CHARSET_UCS2 },
+- { "IRA", "ASCII", "ASCII", "ASCII//TRANSLIT", MM_MODEM_CHARSET_IRA },
+- { "GSM", NULL, NULL, NULL, MM_MODEM_CHARSET_GSM },
+- { "8859-1", NULL, "ISO8859-1", "ISO8859-1//TRANSLIT", MM_MODEM_CHARSET_8859_1 },
+- { "PCCP437", "CP437", "CP437", "CP437//TRANSLIT", MM_MODEM_CHARSET_PCCP437 },
+- { "PCDN", "CP850", "CP850", "CP850//TRANSLIT", MM_MODEM_CHARSET_PCDN },
+- { "HEX", NULL, NULL, NULL, MM_MODEM_CHARSET_HEX },
+- { NULL, NULL, NULL, NULL, MM_MODEM_CHARSET_UNKNOWN }
++ { "UTF-8", "UTF8", "UTF-8", "UTF-8", MM_MODEM_CHARSET_UTF8 },
++ { "UCS2", NULL, "UCS-2BE", "UCS-2BE", MM_MODEM_CHARSET_UCS2 },
++ { "IRA", "ASCII", "ASCII", "ASCII", MM_MODEM_CHARSET_IRA },
++ { "GSM", NULL, NULL, NULL, MM_MODEM_CHARSET_GSM },
++ { "8859-1", NULL, "ISO8859-1", "ISO8859-1", MM_MODEM_CHARSET_8859_1 },
++ { "PCCP437", "CP437", "CP437", "CP437", MM_MODEM_CHARSET_PCCP437 },
++ { "PCDN", "CP850", "CP850", "CP850", MM_MODEM_CHARSET_PCDN },
++ { "HEX", NULL, NULL, NULL, MM_MODEM_CHARSET_HEX },
++ { NULL, NULL, NULL, NULL, MM_MODEM_CHARSET_UNKNOWN }
+ };
+
+ const char *
+@@ -163,7 +163,7 @@
+ g_return_val_if_fail (iconv_from != NULL, FALSE);
+
+ converted = g_convert ((const gchar *)array->data, array->len,
+- "UTF-8//TRANSLIT", iconv_from,
++ "UTF-8", iconv_from,
+ NULL, NULL, &error);
+ if (!converted || error) {
+ g_clear_error (&error);
+@@ -195,7 +195,7 @@
+ return unconverted;
+
+ converted = g_convert (unconverted, unconverted_len,
+- "UTF-8//TRANSLIT", iconv_from,
++ "UTF-8", iconv_from,
+ NULL, NULL, &error);
+ if (!converted || error) {
+ g_clear_error (&error);
+@@ -226,7 +226,7 @@
+ return g_strdup (src);
+
+ converted = g_convert (src, strlen (src),
+- iconv_to, "UTF-8//TRANSLIT",
++ iconv_to, "UTF-8",
+ NULL, &converted_len, &error);
+ if (!converted || error) {
+ g_clear_error (&error);
+@@ -747,7 +747,7 @@
+
+ iconv_from = charset_iconv_from (charset);
+ utf8 = g_convert (str, strlen (str),
+- "UTF-8//TRANSLIT", iconv_from,
++ "UTF-8", iconv_from,
+ NULL, NULL, &error);
+ if (!utf8 || error) {
+ g_clear_error (&error);
+@@ -790,7 +790,7 @@
+ * that is UTF-8, if any.
+ */
+ utf8 = g_convert (str, strlen (str),
+- "UTF-8//TRANSLIT", "UTF-8//TRANSLIT",
++ "UTF-8", "UTF-8",
+ &bread, &bwritten, NULL);
+
+ /* Valid conversion, or we didn't get enough valid UTF-8 */
+@@ -804,7 +804,7 @@
+ */
+ str[bread] = '\0';
+ utf8 = g_convert (str, strlen (str),
+- "UTF-8//TRANSLIT", "UTF-8//TRANSLIT",
++ "UTF-8", "UTF-8",
+ NULL, NULL, NULL);
+ g_free (str);
+ break;