summaryrefslogtreecommitdiff
path: root/community/redshift
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-06-04 00:27:56 -0700
committerroot <root@rshg054.dnsready.net>2013-06-04 00:27:56 -0700
commitcc57cb201ddb179d2bb481c13dd4f286ae643b12 (patch)
tree7932470d6b8a193c032f1012a7996cc78ea52201 /community/redshift
parent1f86bf1b08cb980cea57c1d4d3187e2251f5a63b (diff)
Tue Jun 4 00:27:56 PDT 2013
Diffstat (limited to 'community/redshift')
-rw-r--r--community/redshift/165_164.diff55
-rw-r--r--community/redshift/PKGBUILD19
2 files changed, 69 insertions, 5 deletions
diff --git a/community/redshift/165_164.diff b/community/redshift/165_164.diff
new file mode 100644
index 000000000..663b5663b
--- /dev/null
+++ b/community/redshift/165_164.diff
@@ -0,0 +1,55 @@
+=== modified file 'src/location-geoclue.c'
+--- src/location-geoclue.c 2011-03-27 22:14:58 +0000
++++ src/location-geoclue.c 2011-07-12 20:30:30 +0000
+@@ -50,14 +50,20 @@
+ int
+ location_geoclue_start(location_geoclue_state_t *state)
+ {
+- GeoclueMaster *master = NULL;
+- GeoclueMasterClient *client = NULL;
+- GError *error = NULL;
+- gchar *name = NULL;
++ if (state->provider && state->provider_path) {
++ state->position = geoclue_position_new(state->provider,
++ state->provider_path);
++ } else {
++ GeoclueMaster *master = geoclue_master_get_default();
++ GeoclueMasterClient *client = geoclue_master_create_client(master,
++ NULL, NULL);
++ GError *error = NULL;
+
+- if (!(state->provider && state->provider_path)) {
+- master = geoclue_master_get_default();
+- client = geoclue_master_create_client(master, NULL, NULL);
++ if (client == NULL) {
++ g_printerr(_("Unable to obtain master client.\n"));
++ g_object_unref(master);
++ return -1;
++ }
+
+ if (!geoclue_master_client_set_requirements(client,
+ GEOCLUE_ACCURACY_LEVEL_REGION,
+@@ -68,15 +74,18 @@
+ error->message);
+ g_error_free(error);
+ g_object_unref(client);
++ g_object_unref(master);
+
+ return -1;
+ }
+
+ state->position = geoclue_master_client_create_position(client, NULL);
+- } else {
+- state->position = geoclue_position_new(state->provider,
+- state->provider_path);
+- }
++
++ g_object_unref(client);
++ g_object_unref(master);
++ }
++
++ gchar *name = NULL;
+
+ if (geoclue_provider_get_provider_info(GEOCLUE_PROVIDER(state->position),
+ &name, NULL, NULL)) {
+
diff --git a/community/redshift/PKGBUILD b/community/redshift/PKGBUILD
index 8212eb57a..b03f4e1dd 100644
--- a/community/redshift/PKGBUILD
+++ b/community/redshift/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 80160 2012-11-17 01:18:35Z lfleischer $
+# $Id: PKGBUILD 92311 2013-06-03 21:26:54Z lfleischer $
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Geoffrey Teale <tealeg@stop-squark>
# Contributor: Mark, Huo Mian <markhuomian[at]gmail[dot]com>
@@ -6,7 +6,7 @@
pkgname=redshift
pkgver=1.7
-pkgrel=5
+pkgrel=6
pkgdesc='Adjusts the color temperature of your screen according to your surroundings.'
arch=('i686' 'x86_64')
url='http://jonls.dk/redshift/'
@@ -17,14 +17,23 @@ optdepends=('pygtk: for gtk-redshift'
'librsvg: for gtk-redshift')
makedepends=('python2')
install='redshift.install'
-source=("http://launchpad.net/${pkgname}/trunk/${pkgver}/+download/${pkgname}-${pkgver}.tar.bz2")
-md5sums=('c56512afa292b5a94b715ed4a1841d4c')
+source=("http://launchpad.net/${pkgname}/trunk/${pkgver}/+download/${pkgname}-${pkgver}.tar.bz2"
+ '165_164.diff')
+md5sums=('c56512afa292b5a94b715ed4a1841d4c'
+ 'eaafcdc62a47d725c256cd5473f4efa1')
-build() {
+prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
sed -i 's/python/python2/' src/gtk-redshift/gtk-redshift
+ # fix GTK UI segmentation fault (fixes FS#33412)
+ patch -p0 -i ../165_164.diff
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
PYTHON=/usr/bin/python2 ./configure --prefix=/usr
make
}