diff --git a/.gitignore b/.gitignore
index 821b56a..4dcb744 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/nuvolaruntime-4.4.0.tar.gz
/nuvolaruntime-4.5.0.tar.gz
/nuvolaruntime-4.6.0.tar.gz
+/nuvolaruntime-4.7.0.tar.gz
diff --git a/nuvolaruntime-4.7.0-disable-VA-API_VDPAU-driver-check.patch b/nuvolaruntime-4.7.0-disable-VA-API_VDPAU-driver-check.patch
new file mode 100644
index 0000000..fe6c7a2
--- /dev/null
+++ b/nuvolaruntime-4.7.0-disable-VA-API_VDPAU-driver-check.patch
@@ -0,0 +1,318 @@
+diff -Naur nuvolaruntime-4.7.0/README.md nuvolaruntime-4.7.0.new/README.md
+--- nuvolaruntime-4.7.0/README.md 2017-09-01 18:52:34.000000000 +0200
++++ nuvolaruntime-4.7.0.new/README.md 2017-09-02 12:14:39.357095888 +0200
+@@ -117,8 +117,6 @@
+ * [javascriptcoregtk-4.0](http://webkitgtk.org/) >= 2.16.0 (2.16.1 recommended)
+ * [libnotify](https://git.gnome.org/browse/libnotify/) >= 0.7
+ * [gstreamer](https://gstreamer.freedesktop.org/) >= 1.8.3 (>= 1.12 for MSE)
+- * [libdri2](https://github.com/robclark/libdri2) >= 1.0.0
+- * [libdrm](https://dri.freedesktop.org/libdrm/) >= 2.2
+ * libuuid
+ * libsecret-1 >= 0.16
+ * g-ir-compiler
+diff -Naur nuvolaruntime-4.7.0/src/nuvolakit-runner/system/Graphics.vala nuvolaruntime-4.7.0.new/src/nuvolakit-runner/system/Graphics.vala
+--- nuvolaruntime-4.7.0/src/nuvolakit-runner/system/Graphics.vala 2017-09-01 18:52:34.000000000 +0200
++++ nuvolaruntime-4.7.0.new/src/nuvolakit-runner/system/Graphics.vala 2017-09-02 12:19:28.957113872 +0200
+@@ -69,109 +69,4 @@
+ }
+ #endif
+
+-const Dri2.EventOps DRI2_NO_OPS = {};
+-
+-public errordomain DriError
+-{
+- NO_X_DISPLAY,
+- INIT_DISPLAY,
+- EXTENSION_QUERY,
+- VERSION_QUERY,
+- CONNECT;
+-}
+-
+-/**
+- * Get the name of DRI2 driver
+- *
+- * @return driver name
+- * @throws DriError on failure
+- */
+-public string dri2_get_driver_name() throws DriError
+-{
+- var dpy = new X.Display(null);
+- if (dpy == null)
+- throw new DriError.NO_X_DISPLAY("Cannot connect to X display.");
+- int major, minor;
+- string driver;
+- dri2_connect(dpy, out major, out minor, out driver);
+- debug("DRI %d.%d; driver %s", major, minor, driver);
+- return driver;
+-}
+-
+-private void dri2_connect(X.Display dpy, out int major, out int minor, out string driver) throws DriError
+-{
+- major = 0;
+- minor = 0;
+- int driverType = Dri2.DriverDRI;
+- driver = null;
+- int eventBase, errorBase;
+- string? device = null;
+-
+- if (!Dri2.init_display(dpy, DRI2_NO_OPS))
+- throw new DriError.INIT_DISPLAY("DRI2InitDisplay failed.");
+-
+- if (!Dri2.query_extension(dpy, out eventBase, out errorBase))
+- throw new DriError.EXTENSION_QUERY("DRI2QueryExtension failed, %d, %d", eventBase, errorBase);
+-
+- if (!Dri2.query_version(dpy, out major, out minor))
+- throw new DriError.VERSION_QUERY("DRI2QueryVersion failed");
+-
+- if (!Dri2.connect(dpy, dpy.default_root_window(), driverType, out driver, out device))
+- throw new DriError.CONNECT("DRI2Connect failed");
+-}
+-
+-/**
+- * Check whether VDPAU driver is available
+- *
+- * @param name The driver name.
+- * @return `true` if the corresponding `libvdpau_XXX.so` has been found, false otherwise.
+- */
+-public bool have_vdpau_driver(string name)
+-{
+- var filename = "/usr/lib/vdpau/libvdpau_%s.so".printf(name);
+- if (FileUtils.test(filename, FileTest.EXISTS))
+- {
+- debug("VDPAU driver found: %s", filename);
+- return true;
+- }
+- var libdirs = Drt.String.split_strip(Environment.get_variable("LD_LIBRARY_PATH"), ":");
+- foreach (unowned string libdir in libdirs)
+- {
+- filename = "%s/vdpau/libvdpau_%s.so".printf(libdir, name);
+- if (FileUtils.test(filename, FileTest.EXISTS))
+- {
+- debug("VDPAU driver found: %s", filename);
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Check whether VA-API driver is available
+- *
+- * @param name The driver name.
+- * @return `true` if the corresponding `dri/XXX_dri_video.so` has been found, false otherwise.
+- */
+-public bool have_vaapi_driver(string name)
+-{
+- var filename = "/usr/lib/dri/%s_drv_video.so".printf(name);
+- if (FileUtils.test(filename, FileTest.EXISTS))
+- {
+- debug("VA-API driver found: %s", filename);
+- return true;
+- }
+- var libdirs = Drt.String.split_strip(Environment.get_variable("LIBVA_DRIVERS_PATH"), ":");
+- foreach (unowned string libdir in libdirs)
+- {
+- filename = "%s/%s_drv_video.so".printf(libdir, name);
+- if (FileUtils.test(filename, FileTest.EXISTS))
+- {
+- debug("VA-API driver found: %s", filename);
+- return true;
+- }
+- }
+- return false;
+-}
+-
+ } // namespace Nuvola.Graphics
+diff -Naur nuvolaruntime-4.7.0/src/nuvolakit-runner/system/StartupCheck.vala nuvolaruntime-4.7.0.new/src/nuvolakit-runner/system/StartupCheck.vala
+--- nuvolaruntime-4.7.0/src/nuvolakit-runner/system/StartupCheck.vala 2017-09-01 18:52:34.000000000 +0200
++++ nuvolaruntime-4.7.0.new/src/nuvolakit-runner/system/StartupCheck.vala 2017-09-02 12:23:11.980127723 +0200
+@@ -299,54 +299,6 @@
+ #else
+ opengl_driver_status = Status.NOT_APPLICABLE;
+ #endif
+- try
+- {
+- const string DRIVER_NOT_FOUND_TEMPLATE = (
+- "%s Driver for '%s' not found. Rendering performance of some web apps may suffer. "
+- #if !FLATPAK
+- + "Contact your distributor to get help with installation."
+- #else
+- + "Please report your issue"
+- +" so that the driver can be added to Nuvola Runtime flatpak."
+- #endif
+- );
+-
+- var dri2_driver = Graphics.dri2_get_driver_name();
+- if (!Graphics.have_vdpau_driver(dri2_driver))
+- {
+- vdpau_driver_message = Markup.printf_escaped(DRIVER_NOT_FOUND_TEMPLATE, "VDPAU", dri2_driver);
+- vdpau_driver_status = Status.WARNING;
+- }
+- else
+- {
+- vdpau_driver_status = Status.OK;
+- }
+- if (!Graphics.have_vaapi_driver(dri2_driver))
+- {
+- vaapi_driver_message = Markup.printf_escaped(DRIVER_NOT_FOUND_TEMPLATE, "VA-API", dri2_driver);
+- vaapi_driver_status = Status.WARNING;
+- }
+- else
+- {
+- vaapi_driver_status = Status.OK;
+- }
+- }
+- catch (Graphics.DriError e)
+- {
+- if (e is Graphics.DriError.NO_X_DISPLAY || e is Graphics.DriError.EXTENSION_QUERY)
+- {
+- vdpau_driver_status = Status.NOT_APPLICABLE;
+- vaapi_driver_status = Status.NOT_APPLICABLE;
+- }
+- else
+- {
+- var msg = Markup.printf_escaped("Failed to get DRI2 driver name. %s", e.message);
+- vdpau_driver_message = msg;
+- vdpau_driver_status = Status.WARNING;
+- vaapi_driver_message = (owned) msg;
+- vaapi_driver_status = Status.WARNING;
+- }
+- }
+ yield Drt.EventLoop.resume_later();
+ task_finished(NAME);
+ }
+diff -Naur nuvolaruntime-4.7.0/src/tests/GraphicsTest.vala nuvolaruntime-4.7.0.new/src/tests/GraphicsTest.vala
+--- nuvolaruntime-4.7.0/src/tests/GraphicsTest.vala 2017-09-01 18:52:34.000000000 +0200
++++ nuvolaruntime-4.7.0.new/src/tests/GraphicsTest.vala 1970-01-01 01:00:00.000000000 +0100
+@@ -1,76 +0,0 @@
+-/*
+- * Author: Jiří Janoušek
+- *
+- * To the extent possible under law, author has waived all
+- * copyright and related or neighboring rights to this file.
+- * http://creativecommons.org/publicdomain/zero/1.0/
+- *
+- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS "AS IS" AND
+- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+- * DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
+- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+- *
+- * Tests are under public domain because they might contain useful sample code.
+- */
+-
+-namespace Nuvola
+-{
+-
+-public class GraphicsTest: Drt.TestCase
+-{
+- public void test_dri2_get_driver_name()
+- {
+- try
+- {
+- var name = Graphics.dri2_get_driver_name();
+- expect_false(Drt.String.is_empty(name), "driver name not empty");
+- }
+- catch (Graphics.DriError e)
+- {
+- if (!(e is Graphics.DriError.NO_X_DISPLAY))
+- expectation_failed("Unexpected error: %s %d %s", e.domain.to_string(), e.code, e.message);
+- }
+- }
+-
+- public void test_have_vdpau_driver()
+- {
+- var name = "i965";
+- var result = Graphics.have_vdpau_driver(name);
+- var expected = FileUtils.test("/usr/lib/vdpau/libvdpau_i965.so", FileTest.EXISTS)
+- || FileUtils.test("/app/lib/vdpau/libvdpau_i965.so", FileTest.EXISTS);
+- expect_true(expected == result, "have vdpau driver");
+- }
+-
+- public void test_have_vaapi_driver()
+- {
+- var name = "i965";
+- var result = Graphics.have_vaapi_driver(name);
+- var expected = FileUtils.test("/usr/lib/drv/i965_drv_video.so", FileTest.EXISTS)
+- || FileUtils.test("/app/lib/dri/i965_drv_video.so", FileTest.EXISTS);
+- expect_true(expected == result, "have vaapi driver");
+- }
+-
+- #if FLATPAK
+- public void test_have_vdpau_drivers()
+- {
+- string[] names = {"i965", "i915", "r300", "r600", "radeon", "radeonsi", "nouveau"};
+- foreach (var name in names)
+- expect_true(Graphics.have_vdpau_driver(name), "VDPAU: %s", name);
+- }
+-
+- public void test_have_vaapi_drivers()
+- {
+- string[] names = {"i965", "i915", "r300", "r600", "radeon", "radeonsi", "nouveau"};
+- foreach (var name in names)
+- expect_true(Graphics.have_vaapi_driver(name), "VA-API: %s", name);
+- }
+- #endif
+-}
+-
+-} // namespace Nuvola
+diff -Naur nuvolaruntime-4.7.0/vapi/dri2.deps nuvolaruntime-4.7.0.new/vapi/dri2.deps
+--- nuvolaruntime-4.7.0/vapi/dri2.deps 2017-09-01 18:52:34.000000000 +0200
++++ nuvolaruntime-4.7.0.new/vapi/dri2.deps 1970-01-01 01:00:00.000000000 +0100
+@@ -1,2 +0,0 @@
+-x11
+-libdrm
+diff -Naur nuvolaruntime-4.7.0/vapi/dri2.vapi nuvolaruntime-4.7.0.new/vapi/dri2.vapi
+--- nuvolaruntime-4.7.0/vapi/dri2.vapi 2017-09-01 18:52:34.000000000 +0200
++++ nuvolaruntime-4.7.0.new/vapi/dri2.vapi 1970-01-01 01:00:00.000000000 +0100
+@@ -1,22 +0,0 @@
+-namespace Dri2
+-{
+- [CCode(cname="DRI2InitDisplay", cheader_filename="X11/extensions/dri2.h")]
+- public bool init_display(X.Display dpy, EventOps ops);
+-
+- [CCode(cname="DRI2QueryExtension", cheader_filename="X11/extensions/dri2.h")]
+- public bool query_extension(X.Display dpy, out int eventBase, out int errorBase);
+-
+- [CCode(cname="DRI2QueryVersion", cheader_filename="X11/extensions/dri2.h")]
+- public bool query_version(X.Display dpy, out int major, out int minor);
+-
+- [CCode(cname="DRI2Connect", cheader_filename="X11/extensions/dri2.h")]
+- public bool connect(X.Display dpy, X.Window root, int driverType, out string driver, out string device);
+-
+- [CCode(cname="DRI2DriverDRI", cheader_filename="X11/extensions/dri2.h")]
+- public const int DriverDRI;
+-
+- [CCode(cname="DRI2EventOps", cheader_filename="X11/extensions/dri2.h")]
+- public struct EventOps
+- {
+- }
+-}
+diff -Naur nuvolaruntime-4.7.0/wscript nuvolaruntime-4.7.0.new/wscript
+--- nuvolaruntime-4.7.0/wscript 2017-09-01 18:52:34.000000000 +0200
++++ nuvolaruntime-4.7.0.new/wscript 2017-09-02 12:30:36.802155347 +0200
+@@ -317,8 +317,6 @@
+ pkgconfig(ctx, 'javascriptcoregtk-4.0', 'JSCORE', MIN_WEBKIT)
+ pkgconfig(ctx, 'uuid', 'UUID', '0') # Engine.io
+ pkgconfig(ctx, 'libsoup-2.4', 'SOUP', '0') # Engine.io
+- pkgconfig(ctx, 'dri2', 'DRI2', '1.0')
+- pkgconfig(ctx, 'libdrm', 'DRM', '2.2')
+
+ # For tests
+ ctx.find_program("diorite-testgen{}".format(TARGET_DIORITE), var="DIORITE_TESTGEN")
+@@ -491,8 +489,8 @@
+ target = NUVOLAKIT_RUNNER,
+ gir = "NuvolaRunner-1.0",
+ source_dir = 'src/nuvolakit-runner',
+- packages = packages + ' webkit2gtk-4.0 javascriptcoregtk-4.0 gstreamer-1.0 libsecret-1 dri2 libdrm',
+- uselib = uselib + ' JSCORE WEBKIT GST SECRET DRI2 DRM',
++ packages = packages + ' webkit2gtk-4.0 javascriptcoregtk-4.0 gstreamer-1.0 libsecret-1',
++ uselib = uselib + ' JSCORE WEBKIT GST SECRET',
+ use = [NUVOLAKIT_BASE, ENGINEIO],
+ lib = ['m'],
+ includes = ["build"],
diff --git a/nuvolaruntime.spec b/nuvolaruntime.spec
index d3ee1c4..6fbbfdc 100644
--- a/nuvolaruntime.spec
+++ b/nuvolaruntime.spec
@@ -5,19 +5,20 @@
%global unique_name eu.tiliado.Nuvola
Name: nuvolaruntime
-Version: 4.6.0
+Version: 4.7.0
Release: 1%{?dist}
# Nuvola itself is BSD licensed, but the bundled engineio-soup content is MIT.
License: BSD and MIT
Summary: Tight integration of web apps with your desktop
URL: https://github.com/tiliado/nuvolaruntime/
-Source: https://github.com/tiliado/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
-Patch0: disable-VA-API_VDPAU-driver-check.patch
+Source0: https://github.com/tiliado/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
+Patch0: %{name}-4.7.0-disable-VA-API_VDPAU-driver-check.patch
BuildRequires: gcc
+BuildRequires: gobject-introspection-devel
BuildRequires: desktop-file-utils
BuildRequires: pkgconfig(gstreamer-1.0)
-BuildRequires: pkgconfig(dioriteglib4) >= 4.6.0
+BuildRequires: pkgconfig(dioriteglib4) >= 4.7.0
BuildRequires: pkgconfig(json-glib-1.0)
BuildRequires: pkgconfig(libnotify)
BuildRequires: pkgconfig(libsoup-2.4)
@@ -31,7 +32,7 @@ BuildRequires: libappstream-glib
BuildRequires: python3-pyparsing
# For directory ownership
Requires: dbus
-Requires: diorite >= 4.6.0
+Requires: diorite >= 4.7.0
Provides: bundled(engine.io) = 1.6.9
Recommends: gstreamer1-plugin-mpg123
@@ -144,6 +145,7 @@ fi
%{_datadir}/*/%{unique_name}.appdata.xml
%{_libdir}/lib%{name}-*.so
%{_libdir}/%{name}/
+%{_libdir}/girepository-1.0/*1.0.typelib
%dir %{_datadir}/dbus-1/services
%{_datadir}/dbus-1/services/eu.tiliado.NuvolaOse.service
@@ -157,9 +159,15 @@ fi
%{_datadir}/%{name}/web_apps/testmse/
%dir %{_datadir}/%{name}/web_apps
%{_libdir}/pkgconfig/%{name}-*.pc
+%{_datadir}/gir-1.0/*1.0.gir
%changelog
+* Sat Sep 02 2017 Martin Gansser - 4.7.0-1
+- Update to 4.7.0
+- Add BR gobject-introspection-devel
+- Add %%{name}-4.7.0-disable-VA-API_VDPAU-driver-check.patch
+
* Tue Aug 01 2017 Martin Gansser - 4.6.0-1
- Update to 4.6.0
- Dropped 0001-Revert-Check-whether-VA-API-driver-is-installed.patch
diff --git a/sources b/sources
index c7b2d61..8767034 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (nuvolaruntime-4.6.0.tar.gz) = bcfb008f94eb3420af6c52f3891c607e81c009f96dfec5c5dbda6ff78ba4e5ef1e9b0a1c82485e58c8732e7b1c7f0b8f369899e76b14f46072b3385591178bdb
+SHA512 (nuvolaruntime-4.7.0.tar.gz) = 602ff272860e3774883be96ccc586aa09e0ea98f5c3f962d80ded3b43a088003a5793016a39562f39c689737d8db17a1bcd69cb85a21422505171fba10f8f925