summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-04-25 11:39:45 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-04-25 11:39:45 -0300
commit8d54504060b20bae0153f85154bb5179c022dc20 (patch)
treeb96b693b9605afeb9172a55527ac52e34c64d3d9
parent73fdb047b37297dc6d6082c190807b5310524713 (diff)
downloadabslibre-8d54504060b20bae0153f85154bb5179c022dc20.tar.gz
abslibre-8d54504060b20bae0153f85154bb5179c022dc20.tar.bz2
abslibre-8d54504060b20bae0153f85154bb5179c022dc20.zip
gnome-weather: add new package to [nonprism]
-rw-r--r--nonprism/gnome-weather/PKGBUILD35
-rw-r--r--nonprism/gnome-weather/gnome-weather.install12
-rw-r--r--nonprism/gnome-weather/nonprism.patch208
3 files changed, 255 insertions, 0 deletions
diff --git a/nonprism/gnome-weather/PKGBUILD b/nonprism/gnome-weather/PKGBUILD
new file mode 100644
index 000000000..7104a6a98
--- /dev/null
+++ b/nonprism/gnome-weather/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 262422 2016-03-22 20:28:28Z jgc $
+# Maintainer (Arch): Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+# Maintainer: André Silva <emulatorman@parabola.nu>
+
+pkgname=gnome-weather
+pkgver=3.20.0
+pkgrel=1.nonprism1
+pkgdesc="Access current weather conditions and forecasts, without geoclue2 support"
+arch=(any)
+url="https://www.gnome.org/"
+license=(GPL)
+depends=(gtk3 gjs libgweather)
+makedepends=(intltool gobject-introspection)
+groups=(gnome-extra)
+install=gnome-weather.install
+source=(http://ftp.gnome.org/pub/GNOME/sources/${pkgname}/${pkgver:0:4}/${pkgname}-${pkgver}.tar.xz
+ nonprism.patch)
+sha256sums=('3d56c59715656c9031b42f4803ee22776a954cd0587f465590ea0f43cec5b46a'
+ '67daef24d0aaf285d1f2960d5f3b976e71e5150233468a738cdd7557ee730fa4')
+
+prepare() {
+ cd $pkgname-$pkgver
+ patch -p1 -i $srcdir/nonprism.patch
+}
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+}
diff --git a/nonprism/gnome-weather/gnome-weather.install b/nonprism/gnome-weather/gnome-weather.install
new file mode 100644
index 000000000..f7e8c46ac
--- /dev/null
+++ b/nonprism/gnome-weather/gnome-weather.install
@@ -0,0 +1,12 @@
+post_install() {
+ glib-compile-schemas /usr/share/glib-2.0/schemas
+ gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/nonprism/gnome-weather/nonprism.patch b/nonprism/gnome-weather/nonprism.patch
new file mode 100644
index 000000000..d5b728322
--- /dev/null
+++ b/nonprism/gnome-weather/nonprism.patch
@@ -0,0 +1,208 @@
+diff --git a/configure b/configure
+index 8265089..75512ce 100755
+--- a/configure
++++ b/configure
+@@ -4989,7 +4989,6 @@ if test -n "$DEPS_CFLAGS"; then
+ glib-2.0
+ gobject-2.0
+ gtk+-3.0 >= 3.11.4
+- libgeoclue-2.0 >= 2.3.1
+ gjs-1.0 >= \$GJS_MIN_VERSION
+ gweather-3.0 >= 3.17.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gdk-3.0
+@@ -4998,7 +4997,6 @@ if test -n "$DEPS_CFLAGS"; then
+ glib-2.0
+ gobject-2.0
+ gtk+-3.0 >= 3.11.4
+- libgeoclue-2.0 >= 2.3.1
+ gjs-1.0 >= $GJS_MIN_VERSION
+ gweather-3.0 >= 3.17.2") 2>&5
+ ac_status=$?
+@@ -5010,7 +5008,6 @@ if test -n "$DEPS_CFLAGS"; then
+ glib-2.0
+ gobject-2.0
+ gtk+-3.0 >= 3.11.4
+- libgeoclue-2.0 >= 2.3.1
+ gjs-1.0 >= $GJS_MIN_VERSION
+ gweather-3.0 >= 3.17.2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+@@ -5030,7 +5027,6 @@ if test -n "$DEPS_LIBS"; then
+ glib-2.0
+ gobject-2.0
+ gtk+-3.0 >= 3.11.4
+- libgeoclue-2.0 >= 2.3.1
+ gjs-1.0 >= \$GJS_MIN_VERSION
+ gweather-3.0 >= 3.17.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gdk-3.0
+@@ -5039,7 +5035,6 @@ if test -n "$DEPS_LIBS"; then
+ glib-2.0
+ gobject-2.0
+ gtk+-3.0 >= 3.11.4
+- libgeoclue-2.0 >= 2.3.1
+ gjs-1.0 >= $GJS_MIN_VERSION
+ gweather-3.0 >= 3.17.2") 2>&5
+ ac_status=$?
+@@ -5051,7 +5046,6 @@ if test -n "$DEPS_LIBS"; then
+ glib-2.0
+ gobject-2.0
+ gtk+-3.0 >= 3.11.4
+- libgeoclue-2.0 >= 2.3.1
+ gjs-1.0 >= $GJS_MIN_VERSION
+ gweather-3.0 >= 3.17.2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+@@ -5080,7 +5074,6 @@ fi
+ glib-2.0
+ gobject-2.0
+ gtk+-3.0 >= 3.11.4
+- libgeoclue-2.0 >= 2.3.1
+ gjs-1.0 >= $GJS_MIN_VERSION
+ gweather-3.0 >= 3.17.2" 2>&1`
+ else
+@@ -5090,7 +5083,6 @@ fi
+ glib-2.0
+ gobject-2.0
+ gtk+-3.0 >= 3.11.4
+- libgeoclue-2.0 >= 2.3.1
+ gjs-1.0 >= $GJS_MIN_VERSION
+ gweather-3.0 >= 3.17.2" 2>&1`
+ fi
+@@ -5103,7 +5095,6 @@ fi
+ glib-2.0
+ gobject-2.0
+ gtk+-3.0 >= 3.11.4
+- libgeoclue-2.0 >= 2.3.1
+ gjs-1.0 >= $GJS_MIN_VERSION
+ gweather-3.0 >= 3.17.2) were not met:
+
+diff --git a/configure.ac b/configure.ac
+index 84c17e3..c905302 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -33,7 +33,6 @@ PKG_CHECK_MODULES([DEPS], [gdk-3.0
+ glib-2.0
+ gobject-2.0
+ gtk+-3.0 >= 3.11.4
+- libgeoclue-2.0 >= 2.3.1
+ gjs-1.0 >= $GJS_MIN_VERSION
+ gweather-3.0 >= 3.17.2])
+
+diff --git a/data/org.gnome.Weather.Application.desktop.in b/data/org.gnome.Weather.Application.desktop.in
+index a0cf3b5..cc3b5af 100644
+--- a/data/org.gnome.Weather.Application.desktop.in
++++ b/data/org.gnome.Weather.Application.desktop.in
+@@ -8,4 +8,3 @@ DBusActivatable=true
+ StartupNotify=true
+ Categories=GNOME;GTK;Utility;Core;
+ _Keywords=Weather;Forecast;
+-_X-Geoclue-Reason=Allows weather information to be displayed for your location.
+diff --git a/src/app/currentLocationController.js b/src/app/currentLocationController.js
+index c070598..10b436d 100644
+--- a/src/app/currentLocationController.js
++++ b/src/app/currentLocationController.js
+@@ -20,16 +20,9 @@ const GLib = imports.gi.GLib;
+ const Gio = imports.gi.Gio;
+ const Lang = imports.lang;
+ const GWeather = imports.gi.GWeather;
+-const Geoclue = imports.gi.Geoclue;
+
+ const Util = imports.misc.util;
+
+-const AutoLocation = {
+- DISABLED: 0,
+- ENABLED: 1,
+- NOT_AVAILABLE: 2
+-};
+-
+ const CurrentLocationController = new Lang.Class({
+ Name: 'CurrentLocationController',
+
+@@ -37,89 +30,6 @@ const CurrentLocationController = new Lang.Class({
+ this._world = world;
+ this._processStarted = false;
+ this._settings = Util.getSettings('org.gnome.Weather.Application');
+- let autoLocation = this._settings.get_value('automatic-location').deep_unpack();
+- this._syncAutoLocation(autoLocation);
+- if (this.autoLocation == AutoLocation.ENABLED)
+- this._startGeolocationService();
+ this.currentLocation = null;
+ },
+-
+- _startGeolocationService: function() {
+- this._processStarted = true;
+- Geoclue.Simple.new(pkg.name,
+- Geoclue.AccuracyLevel.CITY,
+- null,
+- Lang.bind (this, this._onSimpleReady));
+- },
+-
+- _geoLocationFailed: function(e) {
+- log ("Failed to connect to GeoClue2 service: " + e.message);
+- this.autoLocation = AutoLocation.NOT_AVAILABLE;
+- GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, function() {
+- this._world.currentLocationChanged(null);
+- }));
+- },
+-
+- _onSimpleReady: function(object, result) {
+- try {
+- this._simple = Geoclue.Simple.new_finish(result);
+- }
+- catch (e) {
+- this._geoLocationFailed(e);
+- return;
+- }
+-
+- let client = this._simple.get_client();
+- client.distance_threshold = 100;
+-
+- this._findLocation();
+- },
+-
+- _findLocation: function() {
+- this._locationUpdatedId =
+- this._simple.connect("notify::location",
+- this._onLocationUpdated.bind(this));
+-
+- this._onLocationUpdated(this._simple);
+- },
+-
+- _onLocationUpdated: function(simple) {
+- let geoclueLocation = simple.get_location();
+-
+- this.currentLocation = GWeather.Location.new_detached(geoclueLocation.description,
+- null,
+- geoclueLocation.latitude,
+- geoclueLocation.longitude);
+- this._world.currentLocationChanged(this.currentLocation);
+- },
+-
+- setAutoLocation: function(active) {
+- this._settings.set_value('automatic-location', new GLib.Variant('b', active));
+-
+- if (this.autoLocation == AutoLocation.NOT_AVAILABLE)
+- return;
+- this._autoLocationChanged(active);
+- this._syncAutoLocation(active);
+- },
+-
+- _syncAutoLocation: function(autoLocation) {
+- if (autoLocation)
+- this.autoLocation = AutoLocation.ENABLED;
+- else
+- this.autoLocation = AutoLocation.DISABLED;
+- },
+-
+- _autoLocationChanged: function(active) {
+- if (active) {
+- if (!this._processStarted) {
+- this._startGeolocationService();
+- } else {
+- this._locationUpdatedId =
+- this._simple.connect("notify::location",
+- this._onLocationUpdated.bind(this));
+- }
+- } else {
+- this._simple.disconnect(this._locationUpdatedId);
+- }
+- }
+ });