[gnome-network-displays] Update flatpak manifest from flathub



commit 8b13d28776aa2152cbc8b85363d79b4bf25696de
Author: Naheem <naheemzaffar gmail com>
Date:   Thu Jul 7 16:34:03 2022 +0000

    Update flatpak manifest from flathub

 .../flatpak/intltool-perl5.26-regex-fixes.patch    |  59 ++++
 build-aux/flatpak/org.gnome.NetworkDisplays.json   | 375 +++++++++++----------
 ...build-Add-option-to-build-without-polkitd.patch | 125 ++++---
 3 files changed, 336 insertions(+), 223 deletions(-)
---
diff --git a/build-aux/flatpak/intltool-perl5.26-regex-fixes.patch 
b/build-aux/flatpak/intltool-perl5.26-regex-fixes.patch
new file mode 100644
index 0000000..26c5e7b
--- /dev/null
+++ b/build-aux/flatpak/intltool-perl5.26-regex-fixes.patch
@@ -0,0 +1,59 @@
+Description: Escape "{", to prevent complaints from perl 5.22 and 5.26
+Author: Roderich Schupp <roderich schupp gmail com>
+Author: gregor herrmann <gregoa debian org>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788705
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826471
+Bug-Upstream: https://bugs.launchpad.net/intltool/+bug/1490906
+
+Index: intltool-0.51.0/intltool-update.in
+===================================================================
+--- intltool-0.51.0.orig/intltool-update.in    2017-07-23 17:24:35.113169465 +0200
++++ intltool-0.51.0/intltool-update.in 2017-07-23 17:24:35.109169052 +0200
+@@ -1062,13 +1062,13 @@
+       }
+     }
+
+-    if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/)
++    if ($str =~ /^(.*)\$\{?([A-Z_]+)}?(.*)$/)
+     {
+       my $rest = $3;
+       my $untouched = $1;
+       my $sub = "";
+         # Ignore recursive definitions of variables
+-        $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/;
++        $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\$\{?$2}?/;
+
+       return SubstituteVariable ("$untouched$sub$rest");
+     }
+@@ -1190,10 +1190,10 @@
+       $name    =~ s/\(+$//g;
+       $version =~ s/\(+$//g;
+
+-      $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
+-      $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
+-      $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
+-      $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
++      $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
++      $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
++      $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
++      $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
+     }
+
+     if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)[,]?([^,\)]+)?/m)
+@@ -1219,11 +1219,11 @@
+       $version =~ s/\(+$//g;
+         $bugurl  =~ s/\(+$//g if (defined $bugurl);
+
+-      $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
+-      $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
+-      $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
+-      $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
+-        $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\${?\w+}?/);
++      $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
++      $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
++      $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
++      $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
++        $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\$\{?\w+}?/);
+     }
+
+     # \s makes this not work, why?
diff --git a/build-aux/flatpak/org.gnome.NetworkDisplays.json 
b/build-aux/flatpak/org.gnome.NetworkDisplays.json
index bed55f7..f7b2431 100644
--- a/build-aux/flatpak/org.gnome.NetworkDisplays.json
+++ b/build-aux/flatpak/org.gnome.NetworkDisplays.json
@@ -1,241 +1,264 @@
 {
-    "app-id" : "org.gnome.NetworkDisplays",
-    "runtime" : "org.gnome.Platform",
-    "runtime-version" : "3.32",
-    "sdk" : "org.gnome.Sdk",
-    "command" : "gnome-network-displays",
-    "finish-args" : [
+    "app-id": "org.gnome.NetworkDisplays",
+    "runtime": "org.gnome.Platform",
+    "runtime-version": "42",
+    "sdk": "org.gnome.Sdk",
+    "command": "gnome-network-displays",
+    "finish-args": [
         "--share=ipc",
         "--share=network",
-        "--socket=x11",
         "--socket=pulseaudio",
-        "--socket=session-bus",
-        "--socket=system-bus",
         "--socket=wayland",
-        "--device=all"
+        "--socket=fallback-x11",
+        "--filesystem=xdg-run/gvfs",
+        "--filesystem=xdg-run/gvfsd",
+        "--talk-name=org.gtk.vfs",
+        "--talk-name=org.gtk.vfs.*",
+        "--system-talk-name=org.freedesktop.NetworkManager",
+        "--system-talk-name=org.fedoraproject.FirewallD1"
     ],
-    "modules" : [
+    "modules": [
+       {
+         "name": "intltool",
+         "cleanup": [ "*" ],
+         "sources": [
+           {
+             "type": "archive",
+             "url": "https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz";,
+             "sha256": "67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd"
+           },
+           {
+             "type": "patch",
+             "path": "intltool-perl5.26-regex-fixes.patch"
+           }
+         ]
+       },
         {
-            "name" : "gstreamer",
-            "buildsystem" : "meson",
-            "builddir" : true,
-            "config-opts" : [
-                "-Ddisable_gtkdoc=true"
-            ],
-            "sources" : [
-                {
-                    "type" : "git",
-                    "branch" : "1.14.2",
-                    "url" : "git://anongit.freedesktop.org/gstreamer/gstreamer",
-                    "commit" : "afb3d1b3e0d02da8b0eb5bb501356650b38e5644"
-                }
-            ]
-        },
-        {
-            "name" : "gst-plugins-base",
-            "buildsystem" : "meson",
-            "config-opts" : [
-                "-Ddisable_gtkdoc=true"
-            ],
-            "builddir" : true,
-            "sources" : [
-                {
-                    "type" : "git",
-                    "branch" : "1.14.2",
-                    "url" : "git://anongit.freedesktop.org/gstreamer/gst-plugins-base",
-                    "commit" : "24f097564657bd630e68931c932ec9fd992a3785"
-                }
-            ]
-        },
-        {
-            "name" : "gst-plugins-good",
-            "buildsystem" : "meson",
-            "builddir" : true,
-            "config-opts" : [
-                "-Ddisable_gtkdoc=true"
+            "name": "gst-rtsp-server",
+            "buildsystem": "meson",
+            "builddir": true,
+            "config-opts": [
+                "-Dexamples=disabled",
+                "-Dtests=disabled",
+                "-Dintrospection=disabled"
             ],
-            "sources" : [
-                {
-                    "type" : "git",
-                    "branch" : "1.14.2",
-                    "url" : "git://anongit.freedesktop.org/gstreamer/gst-plugins-good",
-                    "commit" : "4733e9715675d2dc52ed00e58d52388c56411cd2"
-                }
-            ]
-        },
-        {
-            "name" : "gst-plugins-ugly",
-            "buildsystem" : "meson",
-            "builddir" : true,
-            "config-opts" : [
-                "-Ddisable_gtkdoc=true"
+            "cleanup": [
+                "/include",
+                "/lib/pkgconfig"
             ],
-            "sources" : [
+            "sources": [
                 {
-                    "type" : "git",
-                    "branch" : "1.14.2",
-                    "url" : "git://anongit.freedesktop.org/gstreamer/gst-plugins-ugly",
-                    "commit" : "df1bcfa0ba57859eb39610ef53f1eb744ca57465"
+                    "type": "archive",
+                    "url": 
"https://gstreamer.freedesktop.org/src/gst-rtsp-server/gst-rtsp-server-1.18.6.tar.xz";,
+                    "sha256": "826f32afbcf94b823541efcac4a0dacdb62f6145ef58f363095749f440262be9",
+                    "x-checker-data": {
+                        "type": "json",
+                        "url": 
"https://gitlab.freedesktop.org/api/v4/projects/1362/repository/tags?search=^1.18.";,
+                        "version-query": ".[0].name",
+                        "url-query": 
"\"https://gstreamer.freedesktop.org/src/gst-rtsp-server/gst-rtsp-server-\"; + $version + \".tar.xz\""
+                    }
                 }
             ]
         },
         {
-           "name" : "gst-plugins-bad",
-           "buildsystem" : "meson",
-           "builddir" : true,
-           "config-opts" : [
-                "-Ddisable_gtkdoc=true"
+            "name": "eudev",
+            "cleanup": [
+                "/bin",
+                "/sbin",
+                "/include",
+                "/lib*/udev",
+                "/share/pkgconfig"
             ],
-            "sources" : [
-                {
-                    "type" : "git",
-                    "branch" : "1.14.5",
-                    "url" : "git://anongit.freedesktop.org/gstreamer/gst-plugins-bad.git",
-                    "commit" : "dc1b94a15290172ffcc57c57f2b7ff6ee9322a5d"
-                }
-            ]
-        },
-        {
-            "name" : "gst-rtsp-server",
-            "buildsystem" : "meson",
-            "builddir" : true,
-            "config-opts" : [
-                "-Ddisable_gtkdoc=true"
+            "post-install": [
+                "udevadm hwdb --update"
             ],
-            "sources" : [
+            "sources": [
                 {
-                    "type" : "git",
-                    "branch" : "1.14.5",
-                    "url" : "https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server.git";,
-                    "commit" : "1ad54eecfdf634ab6eb672c81df1602d004d75b8"
+                    "type": "archive",
+                    "url": 
"https://github.com/eudev-project/eudev/releases/download/v3.2.11/eudev-3.2.11.tar.gz";,
+                    "sha256": "19847cafec67897da855fde56f9dc7d92e21c50e450aa79068a7e704ed44558b",
+                    "x-checker-data": {
+                        "type": "anitya",
+                        "project-id": 13466,
+                        "stable-only": true,
+                        "url-template": 
"https://github.com/eudev-project/eudev/releases/download/v$version/eudev-$version.tar.gz";
+                    }
                 }
             ]
         },
         {
-            "name" : "udev",
-            "config-opts" : [
-                "--disable-hwdb",
-                "--disable-logging",
-                "--disable-gudev",
-                "--disable-introspection",
-                "--disable-keymap",
-                "--disable-mtd_probe"
-            ],
-            "cleanup" : [
+            "name": "libndp",
+            "buildsystem": "autotools",
+            "cleanup": [
+                "/bin",
                 "/include",
-                "/etc",
-                "/libexec",
-                "/sbin",
                 "/lib/pkgconfig",
-                "/man",
-                "/share/aclocal",
-                "/share/doc",
-                "/share/gtk-doc",
-                "/share/man",
-                "/share/pkgconfig",
-                "*.la",
-                "*.a"
+                "/share/man"
             ],
-            "sources" : [
+            "sources": [
                 {
-                    "type" : "git",
-                    "url" : "git://github.com/gentoo/eudev.git"
+                    "type": "archive",
+                    "url": "https://github.com/jpirko/libndp/archive/v1.8.tar.gz";,
+                    "sha256": "c3ea76e253def89869651686a827da75b56896fe94fabd87d8c14b1d4588fd05",
+                    "x-checker-data": {
+                        "type": "anitya",
+                        "project-id": 14944,
+                        "stable-only": true,
+                        "url-template": "https://github.com/jpirko/libndp/archive/v$version.tar.gz";
+                    }
                 }
             ]
         },
         {
-            "name" : "libndp",
-            "buildsystem" : "autotools",
-            "sources" : [
-                {
-                    "type" : "git",
-                    "branch" : "v1.6",
-                    "url" : "https://github.com/jpirko/libndp.git";,
-                    "commit" : "2f721c4ff519f38f46695a60d9f9d88f35bf3c1d"
-                }
-            ]
-        },
-        {
-            "name" : "polkit",
-            "config-opts" : [
+            "name": "polkit",
+            "config-opts": [
                 "--disable-polkitd",
                 "--disable-man-pages",
                 "--disable-introspection",
-                "--enable-libsystemd-login=no",
-                "--with-systemdsystemunitdir=no"
+                "--disable-examples",
+                "--disable-gtk-doc",
+                "--disable-libelogind",
+                "--disable-libsystemd-login",
+                "--with-systemdsystemunitdir=no",
+                "--with-authdb=dummy",
+                "--with-authfw=none"
             ],
-            "rm-configure" : true,
-            "cleanup" : [
+            "rm-configure": true,
+            "cleanup": [
                 "/bin/*",
                 "/etc/pam.d",
                 "/etc/dbus-1",
                 "/share/dbus-1/system-services/*",
                 "/share/polkit-1",
-                "/lib/polkit-1"
+                "/lib/polkit-1",
+                "/include"
             ],
-            "sources" : [
+            "sources": [
                 {
-                    "type" : "archive",
-                    "url" : "http://www.freedesktop.org/software/polkit/releases/polkit-0.113.tar.gz";,
-                    "sha256" : "e1c095093c654951f78f8618d427faf91cf62abdefed98de40ff65eca6413c81"
+                    "type": "archive",
+                    "url": "https://www.freedesktop.org/software/polkit/releases/polkit-0.120.tar.gz";,
+                    "sha256": "ee7a599a853117bf273548725719fa92fabd2f136915c7a4906cee98567aee03",
+                    "x-checker-data": {
+                        "type": "anitya",
+                        "project-id": 3682,
+                        "stable-only": true,
+                        "url-template": 
"https://www.freedesktop.org/software/polkit/releases/polkit-$version.tar.gz";
+                    }
                 },
                 {
-                    "type" : "patch",
-                    "path" : "polkit-build-Add-option-to-build-without-polkitd.patch"
+                    "type": "patch",
+                    "path": "polkit-build-Add-option-to-build-without-polkitd.patch"
                 },
                 {
-                    "type" : "file",
-                    "path" : "polkit-autogen",
-                    "dest-filename" : "autogen.sh"
+                    "type": "file",
+                    "path": "polkit-autogen",
+                    "dest-filename": "autogen.sh"
+                }
+            ]
+        },
+        {
+            "name": "firewalld",
+            "config-opts": [
+                "--disable-schemas-compile",
+                "--disable-docs",
+                "--disable-systemd",
+                "--disable-nls",
+                "--without-iptables",
+                "--without-iptables-restore",
+                "--without-ip6tables",
+                "--without-ip6tables-restore",
+                "--without-ebtables",
+                "--without-ebtables-restore",
+                "--without-ipset",
+                "--with-python_prefix=/app",
+                "--with-python_exec_prefix=/app"
+            ],
+            "cleanup": [
+                "/bin",
+                "/etc",
+                "/include",
+                "/lib/pkgconfig",
+                "/share",
+                "/sbin"
+            ],
+            "sources": [
+                {
+                    "type": "archive",
+                    "url": 
"https://github.com/firewalld/firewalld/releases/download/v1.1.1/firewalld-1.1.1.tar.gz";,
+                    "sha256": "1dcd314ff836b2ce69f15f60fc7d50bd77ed359d784f9b3c07f2d394ea570e4c",
+                    "x-checker-data": {
+                        "type": "anitya",
+                        "project-id": 9989,
+                        "stable-only": true,
+                        "url-template": 
"https://github.com/firewalld/firewalld/releases/download/v$version/firewalld-$version.tar.gz";
+                    }
                 }
             ]
         },
         {
-            "name" : "NetworkManager",
-            "buildsystem" : "meson",
-            "build-options" : {
-                "cflags" : "-ltinfo",
-                "cxxflags" : "-ltinfo"
+            "name": "NetworkManager",
+            "buildsystem": "meson",
+            "build-options": {
+                "cflags": "-ltinfo",
+                "cxxflags": "-ltinfo"
             },
-            "config-opts" : [
-                "-Dlibaudit=no",
+            "config-opts": [
+                "-Dsystemdsystemunitdir=no",
                 "-Ddbus_conf_dir=/app/etc/dbus-1/system.d",
-                "-Ddbus_ifaces_dir=/app/share/dbus-1/interfaces",
-                "-Ddbus_sys_dir=/app/share/dbus-1/system.d",
-                "-Ddnsmasq=/usr/bin/true",
-                "-Ddocs=false",
-                "-Dintrospection=false",
                 "-Diptables=/usr/bin/true",
-                "-Djson_validation=false",
-                "-Dlibnm_glib=false",
-                "-Dlibpsl=false",
-                "-Dmodem_manager=false",
-                "-Dnmtui=false",
-                "-Dovs=false",
-                "-Dppp=false",
-                "-Dqt=false",
-                "-Dselinux=false",
+                "-Ddnsmasq=/usr/bin/true",
                 "-Dsession_tracking=no",
-                "-Dsystemdsystemunitdir='no'",
+                "-Dselinux=false",
                 "-Dsystemd_journal=false",
-                "-Dtests=no",
+                "-Dlibaudit=no",
+                "-Dwext=false",
+                "-Dwifi=true",
+                "-Dppp=false",
+                "-Dmodem_manager=false",
+                "-Dovs=false",
+                "-Dnmcli=false",
+                "-Dnmtui=false",
+                "-Dintrospection=false",
                 "-Dvapi=false",
-                "-Dwifi=true"
+                "-Ddocs=false",
+                "-Dtests=no",
+                "-Dfirewalld_zone=false",
+                "-Dlibpsl=false",
+                "-Dqt=false"
             ],
-            "sources" : [
+            "cleanup": [
+                "/bin",
+                "/etc",
+                "/include",
+                "/lib/pkgconfig",
+                "/libexec",
+                "/sbin",
+                "/var"
+            ],
+            "sources": [
                 {
-                    "type" : "git",
-                    "url" : "https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git";
+                    "type": "git",
+                    "url": "https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git";,
+                    "tag": "1.38.2",
+                    "commit": "abfd2d6ea729926bff0ddafa1367a54f6d6f4230",
+                    "x-checker-data": {
+                        "type": "git",
+                        "tag-pattern": "^([\\d.]+)$"
+                    }
                 }
             ]
         },
         {
-            "name" : "gnome-network-displays",
+            "name": "gnome-network-displays",
             "buildsystem": "meson",
-            "sources" : [
+            "config-opts": [
+                "-Dfirewalld_zone=false"
+            ],
+            "sources": [
                 {
-                    "type" : "git",
-                    "url" : "https://github.com/benzea/gnome-network-displays.git";
+                    "type": "git",
+                    "url": "https://gitlab.gnome.org/GNOME/gnome-network-displays.git";,
+                    "branch": "master"
                 }
             ]
         }
diff --git a/build-aux/flatpak/polkit-build-Add-option-to-build-without-polkitd.patch 
b/build-aux/flatpak/polkit-build-Add-option-to-build-without-polkitd.patch
index f201c20..624d24e 100644
--- a/build-aux/flatpak/polkit-build-Add-option-to-build-without-polkitd.patch
+++ b/build-aux/flatpak/polkit-build-Add-option-to-build-without-polkitd.patch
@@ -1,62 +1,56 @@
-From dab179770380918462d0d76e08b11e4abe55c933 Mon Sep 17 00:00:00 2001
-From: Patrick Griffis <tingping tingping se>
-Date: Thu, 8 Sep 2016 16:15:54 -0400
-Subject: [PATCH] build: Add option to build without polkitd
+From 1073a44277316348d40d86ecec908f1d4812f360 Mon Sep 17 00:00:00 2001
+From: Christian Hergert <chergert redhat com>
+Date: Mon, 27 May 2019 11:49:09 -0700
+Subject: [PATCH] flatpak: make polkit suitable for use within flatpak
 
-This is for any consumer that needs libpolkit but does
-not need polkitd. For example an application running in
-flatpak.
+This is based on patches from Patrick Griffis with additional fixes
+to allow us to disable use of PAM within Flaptak.
 ---
- configure.ac     | 29 ++++++++++++++++++++---------
- src/Makefile.am  |  6 +++++-
- test/Makefile.am |  6 +++++-
- 3 files changed, 30 insertions(+), 11 deletions(-)
+ configure.ac                | 20 ++++++++++++++++----
+ src/Makefile.am             |  6 +++++-
+ src/polkitagent/Makefile.am |  5 +++++
+ test/Makefile.am            |  6 +++++-
+ 4 files changed, 31 insertions(+), 6 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 97d4222..a08785c 100644
+index 5cedb4e..729d78d 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -129,20 +129,30 @@ AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_30],
- AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [G_ENCODE_VERSION(2,34)],
-         [Notify us when we'll need to transition away from g_type_init()])
+@@ -79,11 +79,13 @@ PKG_CHECK_MODULES(GLIB, [gmodule-2.0 gio-unix-2.0 >= 2.30.0])
+ AC_SUBST(GLIB_CFLAGS)
+ AC_SUBST(GLIB_LIBS)
  
-+
-+AC_ARG_ENABLE([polkitd],
-+              [AS_HELP_STRING([--disable-polkitd], [Do not build polkitd])],
-+              [enable_polkitd=$enableval], [enable_polkitd=yes])
-+AM_CONDITIONAL(BUILD_POLKITD, [test x${enable_polkitd} = yes])
-+
-+
- AC_ARG_WITH(mozjs, AS_HELP_STRING([--with-mozjs=@<:@mozjs185/mozjs-17.0|auto@:>@],
-                                 [Specify version of Spidermonkey to use]),,
-             with_mozjs=auto)
--AS_IF([test x${with_mozjs} != xauto], [
--  PKG_CHECK_MODULES(LIBJS, ${with_mozjs})
--], [
--  PKG_CHECK_MODULES(LIBJS, [mozjs185], have_mozjs185=yes, have_mozjs185=no)
--  AS_IF([test x${have_mozjs185} = xno], [
--  PKG_CHECK_MODULES(LIBJS, [mozjs-17.0], have_mozjs17=yes,
--   [AC_MSG_ERROR([Could not find mozjs185 or mozjs-17.0; see http://ftp.mozilla.org/pub/mozilla.org/js/])])
-+
+-PKG_CHECK_MODULES(LIBJS, [mozjs-78])
 +AS_IF([test x${enable_polkitd} = yes], [
-+  AS_IF([test x${with_mozjs} != xauto], [
-+    PKG_CHECK_MODULES(LIBJS, ${with_mozjs})
-+  ], [
-+    PKG_CHECK_MODULES(LIBJS, [mozjs185], have_mozjs185=yes, have_mozjs185=no)
-+    AS_IF([test x${have_mozjs185} = xno], [
-+    PKG_CHECK_MODULES(LIBJS, [mozjs-17.0], have_mozjs17=yes,
-+     [AC_MSG_ERROR([Could not find mozjs185 or mozjs-17.0; see 
http://ftp.mozilla.org/pub/mozilla.org/js/])])
-+    ])
-   ])
-+  AC_SUBST(LIBJS_CFLAGS)
-+  AC_SUBST(LIBJS_LIBS)
- ])
++  PKG_CHECK_MODULES(LIBJS, [mozjs-78])
+
 -AC_SUBST(LIBJS_CFLAGS)
+-AC_SUBST(LIBJS_CXXFLAGS)
 -AC_SUBST(LIBJS_LIBS)
++  AC_SUBST(LIBJS_CFLAGS)
++  AC_SUBST(LIBJS_CXXFLAGS)
++  AC_SUBST(LIBJS_LIBS)
++])
  
  EXPAT_LIB=""
  AC_ARG_WITH(expat, [  --with-expat=<dir>      Use expat from here],
-@@ -605,6 +615,7 @@ echo "
+@@ -236,6 +238,15 @@ if test "x$with_systemdsystemunitdir" != "xno"; then
+ fi
+ AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$systemdsystemunitdir"])
+
++dnl ---------------------------------------------------------------------------
++dnl - Disable polkitd when using library alone
++dnl ---------------------------------------------------------------------------
++
++AC_ARG_ENABLE([polkitd],
++              [AS_HELP_STRING([--disable-polkitd], [Do not build polkitd])],
++              [enable_polkitd=$enableval], [enable_polkitd=yes])
++AM_CONDITIONAL(BUILD_POLKITD, [test x${enable_polkitd} = yes])
++
+ dnl ---------------------------------------------------------------------------
+ dnl - User for running polkitd
+ dnl ---------------------------------------------------------------------------
+@@ -579,6 +590,7 @@ echo "
          Session tracking:           ${SESSION_TRACKING}
          PAM support:                ${have_pam}
          systemdsystemunitdir:       ${systemdsystemunitdir}
@@ -79,6 +73,43 @@ index 09fc7b3..c6fe91b 100644
  
  if BUILD_EXAMPLES
  SUBDIRS += examples
+diff --git a/src/polkitagent/Makefile.am b/src/polkitagent/Makefile.am
+index 49720db..633f9d4 100644
+--- a/src/polkitagent/Makefile.am
++++ b/src/polkitagent/Makefile.am
+@@ -79,6 +79,7 @@ libpolkit_agent_1_la_LIBADD =                                        \
+
+ libpolkit_agent_1_la_LDFLAGS = -export-symbols-regex '(^polkit_.*)'
+
++if !POLKIT_AUTHFW_NONE
+ libprivdir = $(prefix)/lib/polkit-1
+ libpriv_PROGRAMS = polkit-agent-helper-1
+
+@@ -113,6 +114,8 @@ polkit_agent_helper_1_LDFLAGS =                                    \
+       $(AM_LDFLAGS)                                                   \
+       $(NULL)
+
++endif # !POLKIT_AUTHFW_NONE
++
+ if HAVE_INTROSPECTION
+
+ girdir = $(INTROSPECTION_GIRDIR)
+@@ -142,6 +145,7 @@ include $(INTROSPECTION_MAKEFILE)
+
+ endif # HAVE_INTROSPECTION
+
++if !POLKIT_AUTHFW_NONE
+ # polkit-agent-helper-1 need to be setuid root because it's used to
+ # authenticate not only the invoking user, but possibly also root
+ # and/or other users.
+@@ -149,6 +153,7 @@ endif # HAVE_INTROSPECTION
+ install-data-hook:
+       -chown root $(DESTDIR)$(libprivdir)/polkit-agent-helper-1
+       -chmod 4755 $(DESTDIR)$(libprivdir)/polkit-agent-helper-1
++endif # !POLKIT_AUTHFW_NONE
+
+ EXTRA_DIST = polkitagentmarshal.list polkitagentenumtypes.h.template polkitagentenumtypes.c.template
+ CLEANFILES = $(gir_DATA) $(typelibs_DATA)
 diff --git a/test/Makefile.am b/test/Makefile.am
 index 59d0680..d43b0fe 100644
 --- a/test/Makefile.am
@@ -97,5 +128,5 @@ index 59d0680..d43b0fe 100644
  libpolkit_test_helper_la_SOURCES = polkittesthelper.c polkittesthelper.h
  libpolkit_test_helper_la_LIBADD = $(GLIB_LIBS)
 -- 
-2.9.3
+2.21.0
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]