From 4f5e9472760f51121b7beb89f4046a6c1508ab52 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 17 Oct 2015 18:15:21 +0200 Subject: [PATCH] upower: update to 0.99.3 (sobump). --- common/shlibs | 1 + srcpkgs/{libupower-glib2 => libupower-glib3} | 0 .../upower-0.99.0-create-dir-runtime.patch | 34 --------- .../patches/upower-0.99.0-fix-segfault.patch | 24 ------ .../upower-0.99.0-fix-shutdown-on-boot.patch | 75 ------------------- .../upower-0.99.0-fix-typing-error.patch | 22 ------ srcpkgs/upower/template | 13 ++-- 7 files changed, 7 insertions(+), 162 deletions(-) rename srcpkgs/{libupower-glib2 => libupower-glib3} (100%) delete mode 100644 srcpkgs/upower/patches/upower-0.99.0-create-dir-runtime.patch delete mode 100644 srcpkgs/upower/patches/upower-0.99.0-fix-segfault.patch delete mode 100644 srcpkgs/upower/patches/upower-0.99.0-fix-shutdown-on-boot.patch delete mode 100644 srcpkgs/upower/patches/upower-0.99.0-fix-typing-error.patch diff --git a/common/shlibs b/common/shlibs index 95ce9095d85..a311661f870 100644 --- a/common/shlibs +++ b/common/shlibs @@ -544,6 +544,7 @@ libverto-k5ev.so.0 mit-krb5-libs-1.8_1 libmenu-cache.so.3 menu-cache-1.0.0_1 libupower-glib.so.1 libupower-glib1-0.9.23_4 libupower-glib.so.2 libupower-glib2-0.99.0_2 +libupower-glib.so.3 libupower-glib3-0.99.3_1 libcanberra.so.0 libcanberra-0.23_1 libcanberra-gtk.so.0 libcanberra-gtk-0.30_6 libcanberra-gtk3.so.0 libcanberra-gtk3-0.30_6 diff --git a/srcpkgs/libupower-glib2 b/srcpkgs/libupower-glib3 similarity index 100% rename from srcpkgs/libupower-glib2 rename to srcpkgs/libupower-glib3 diff --git a/srcpkgs/upower/patches/upower-0.99.0-create-dir-runtime.patch b/srcpkgs/upower/patches/upower-0.99.0-create-dir-runtime.patch deleted file mode 100644 index 34340d44ec3..00000000000 --- a/srcpkgs/upower/patches/upower-0.99.0-create-dir-runtime.patch +++ /dev/null @@ -1,34 +0,0 @@ -From b9cff29978113aefe3ad18521f383f12ab099a34 Mon Sep 17 00:00:00 2001 -From: Cosimo Cecchi -Date: Tue, 25 Feb 2014 09:43:04 +0000 -Subject: Create the history directory at runtime - -In addition to build time - this increases compatibilty with OSTree, -which starts out with an empty /var. - -Signed-off-by: Richard Hughes ---- -diff --git a/src/up-history.c b/src/up-history.c -index f9d0fdf..795b093 100644 ---- a/src/up-history.c -+++ b/src/up-history.c -@@ -414,6 +414,7 @@ up_history_set_directory (UpHistory *history, const gchar *dir) - { - g_free (history->priv->dir); - history->priv->dir = g_strdup (dir); -+ g_mkdir_with_parents (dir, 0755); - } - - /** -@@ -887,7 +888,8 @@ up_history_init (UpHistory *history) - history->priv->data_time_full = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); - history->priv->data_time_empty = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); - history->priv->max_data_age = UP_HISTORY_DEFAULT_MAX_DATA_AGE; -- history->priv->dir = g_build_filename (HISTORY_DIR, NULL); -+ -+ up_history_set_directory (history, HISTORY_DIR); - } - - /** --- -cgit v0.9.0.2-2-gbebe diff --git a/srcpkgs/upower/patches/upower-0.99.0-fix-segfault.patch b/srcpkgs/upower/patches/upower-0.99.0-fix-segfault.patch deleted file mode 100644 index 3e897632077..00000000000 --- a/srcpkgs/upower/patches/upower-0.99.0-fix-segfault.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0d64bbddaa0078ef148d609a3cfad854cf00d7de Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Fri, 08 Nov 2013 13:59:50 +0000 -Subject: lib: Fix segfault on getting property when daemon is not running - -This fixes "upower --version" when the daemon is not running, and thus the -client proxy is NULL. ---- -diff --git a/libupower-glib/up-client.c b/libupower-glib/up-client.c -index 35d7b5d..17fb02d 100644 ---- a/libupower-glib/up-client.c -+++ b/libupower-glib/up-client.c -@@ -322,6 +322,9 @@ up_client_get_property (GObject *object, - UpClient *client; - client = UP_CLIENT (object); - -+ if (client->priv->proxy == NULL) -+ return; -+ - switch (prop_id) { - case PROP_DAEMON_VERSION: - g_value_set_string (value, up_client_glue_get_daemon_version (client->priv->proxy)); --- -cgit v0.9.0.2-2-gbebe diff --git a/srcpkgs/upower/patches/upower-0.99.0-fix-shutdown-on-boot.patch b/srcpkgs/upower/patches/upower-0.99.0-fix-shutdown-on-boot.patch deleted file mode 100644 index 76fdcc876a2..00000000000 --- a/srcpkgs/upower/patches/upower-0.99.0-fix-shutdown-on-boot.patch +++ /dev/null @@ -1,75 +0,0 @@ -From dbf7eb7e557674a9b888a088f1cae4f36b77e14d Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Wed, 23 Apr 2014 13:34:24 +0000 -Subject: daemon: Fix shutdown on boot on some machines - -On the Lenovo A600 all-in-one, there's a HCI/HID dual-mode Broadcom -device which will try to get the battery level of the supplied -mouse and keyboard, but will usually fail to do so. - -So we have a battery of type "battery" (it's not either a mouse or -a keyboard, as it's supposed to handle both) but our display device -battery code doesn't check whether those batteries are power supplies -or not, using this "empty" (0% after the check timed out) battery in -the shutdown policy. - -Check better for power supply devices, not all the "battery" types -are power supply batteries, they might be non-power supply ones -from unknown device types. ---- -diff --git a/src/up-daemon.c b/src/up-daemon.c -index df0a7b7..ef90be4 100644 ---- a/src/up-daemon.c -+++ b/src/up-daemon.c -@@ -208,6 +208,7 @@ up_daemon_update_display_battery (UpDaemon *daemon) - gdouble energy_rate = 0.0; - gint64 time_to_empty = 0; - gint64 time_to_full = 0; -+ gboolean power_supply = FALSE; - - device = g_ptr_array_index (array, i); - g_object_get (device, -@@ -219,6 +220,7 @@ up_daemon_update_display_battery (UpDaemon *daemon) - "energy-rate", &energy_rate, - "time-to-empty", &time_to_empty, - "time-to-full", &time_to_full, -+ "power-supply", &power_supply, - NULL); - - /* When we have a UPS, it's either a desktop, and -@@ -236,7 +238,8 @@ up_daemon_update_display_battery (UpDaemon *daemon) - is_present_total = TRUE; - break; - } -- if (kind != UP_DEVICE_KIND_BATTERY) -+ if (kind != UP_DEVICE_KIND_BATTERY || -+ power_supply == FALSE) - continue; - - /* If one battery is charging, then the composite is charging -@@ -389,17 +392,21 @@ up_daemon_refresh_battery_devices (UpDaemon *daemon) - guint i; - GPtrArray *array; - UpDevice *device; -- UpDeviceKind type; - - /* refresh all devices in array */ - array = up_device_list_get_array (daemon->priv->power_devices); - for (i=0; ilen; i++) { -+ UpDeviceKind type; -+ gboolean power_supply; -+ - device = (UpDevice *) g_ptr_array_index (array, i); - /* only refresh battery devices */ - g_object_get (device, - "type", &type, -+ "power-supply", &power_supply, - NULL); -- if (type == UP_DEVICE_KIND_BATTERY) -+ if (type == UP_DEVICE_KIND_BATTERY && -+ power_supply) - up_device_refresh_internal (device); - } - g_ptr_array_unref (array); --- -cgit v0.9.0.2-2-gbebe diff --git a/srcpkgs/upower/patches/upower-0.99.0-fix-typing-error.patch b/srcpkgs/upower/patches/upower-0.99.0-fix-typing-error.patch deleted file mode 100644 index d972e96a051..00000000000 --- a/srcpkgs/upower/patches/upower-0.99.0-fix-typing-error.patch +++ /dev/null @@ -1,22 +0,0 @@ -From d650df8af80b734f6c44a0acb2080493330b8836 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Wed, 23 Apr 2014 13:20:37 +0000 -Subject: lib: Fix typo in g-i annotation - -Missing colon. ---- -diff --git a/libupower-glib/up-client.c b/libupower-glib/up-client.c -index 17fb02d..582fac9 100644 ---- a/libupower-glib/up-client.c -+++ b/libupower-glib/up-client.c -@@ -131,7 +131,7 @@ up_client_get_devices (UpClient *client) - * @client: a #UpClient instance. - * - * Get the composite display device. -- * Return value: (transfer full) a #UpClient object, or %NULL on error. -+ * Return value: (transfer full): a #UpClient object, or %NULL on error. - * - * Since: 1.0 - **/ --- -cgit v0.9.0.2-2-gbebe diff --git a/srcpkgs/upower/template b/srcpkgs/upower/template index fbead7e5795..5d43806f42a 100644 --- a/srcpkgs/upower/template +++ b/srcpkgs/upower/template @@ -1,8 +1,8 @@ # Template file for 'upower' pkgname=upower -version=0.99.0 -revision=8 -patch_args="-Np1" +version=0.99.3 +revision=1 +build_pie=yes build_style=gnu-configure configure_args="--disable-static --with-backend=linux" hostmakedepends="pkg-config intltool libxslt docbook-xsl $(vopt_if gir gobject-introspection)" @@ -13,7 +13,7 @@ maintainer="Juan RP " license="GPL-2" homepage="http://upower.freedesktop.org" distfiles="${homepage}/releases/${pkgname}-${version}.tar.xz" -checksum=5f354b9949108cb21180224ef3dba33b41c9221a79f71a8f76c47f56246a39a1 +checksum=697199bcc113bb069e6fb6bf4135536a702ba9847e46c5fc6df87d19624ddd38 # Package build options build_options="gir" @@ -22,15 +22,14 @@ if [ -z "$CROSS_BUILD" ]; then build_options_default="gir" fi -libupower-glib2_package() { - replaces="upower>=0.99<0.99.0_2" +libupower-glib3_package() { short_desc+=" - runtime library" pkg_install() { vmove usr/lib/*.so.* } } upower-devel_package() { - depends="dbus-glib-devel libupower-glib2>=${version}_${revision}" + depends="dbus-glib-devel libupower-glib3>=${version}_${revision}" short_desc+=" - development files" pkg_install() { vmove usr/include