From f06f83cb924d179cff6a857d27abbb202c42dd30ba4772dbe2c561da46f4cd24 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Tue, 28 Feb 2017 21:57:41 +0000 Subject: [PATCH] Accepting request 461130 from GNOME:Next 1 OBS-URL: https://build.opensuse.org/request/show/461130 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-weather?expand=0&rev=61 --- gnome-weather-work-with-new-gjs.patch | 34 +++++++++++++++++++++++++++ gnome-weather.changes | 6 +++++ gnome-weather.spec | 5 +++- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 gnome-weather-work-with-new-gjs.patch diff --git a/gnome-weather-work-with-new-gjs.patch b/gnome-weather-work-with-new-gjs.patch new file mode 100644 index 0000000..89b3d86 --- /dev/null +++ b/gnome-weather-work-with-new-gjs.patch @@ -0,0 +1,34 @@ +From 39c65724bef050561fb605f29019bc60669710ec Mon Sep 17 00:00:00 2001 +From: Philip Chimento +Date: Tue, 14 Feb 2017 17:11:54 -0800 +Subject: Avoid double declaration with 'let' + +The following is a syntax error in ES6: + + let a = 'something'; + let a = 'other thing'; + +Previously GJS would silently accept this, but in GJS 1.48.0 it will be +a syntax error. This fixes the one instance where it happens. + +https://bugzilla.gnome.org/show_bug.cgi?id=778641 +--- + src/app/window.js | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/app/window.js b/src/app/window.js +index aaf27f5..8eb0499 100644 +--- a/src/app/window.js ++++ b/src/app/window.js +@@ -218,7 +218,7 @@ const MainWindow = new Lang.Class({ + + let copyright = 'Copyright 2013-2015 The Weather Developers'; + let attribution = this._cityView.info ? this._cityView.info.get_attribution() : ''; +- let copyright = copyright + (attribution ? '\n' + attribution : ''); ++ copyright += attribution ? '\n' + attribution : ''; + let aboutDialog = new Gtk.AboutDialog( + { artists: artists, + authors: [ 'Giovanni Campagna ' ], +-- +cgit v0.12 + diff --git a/gnome-weather.changes b/gnome-weather.changes index 71acced..eec3686 100644 --- a/gnome-weather.changes +++ b/gnome-weather.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 27 17:31:42 UTC 2017 - zaitor@opensuse.org + +- Add gnome-weather-work-with-new-gjs.patch: No longer crash on + launch when using gjs 1.48 or newer (bgo#778641). + ------------------------------------------------------------------- Tue Aug 16 15:48:09 UTC 2016 - zaitor@opensuse.org diff --git a/gnome-weather.spec b/gnome-weather.spec index c288329..c028a1e 100644 --- a/gnome-weather.spec +++ b/gnome-weather.spec @@ -1,7 +1,7 @@ # # spec file for package gnome-weather # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,6 +25,8 @@ License: GPL-2.0+ Group: Productivity/Other Url: https://live.gnome.org/Design/Apps/Weather Source: http://download.gnome.org/sources/gnome-weather/3.20/%{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM gnome-weather-work-with-new-gjs.patch bgo#778641 zaitor@opensuse.org -- No longer crash with gjs 1.48 +Patch0: gnome-weather-work-with-new-gjs.patch BuildRequires: gjs BuildRequires: intltool >= 0.26 BuildRequires: update-desktop-files @@ -63,6 +65,7 @@ search results from GNOME Weather. %lang_package %prep %setup -q +%patch0 -p1 %build %configure