From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Wingo Subject: [PATCH 3/9] gnu: Add geoclue. Date: Tue, 7 Apr 2015 09:42:36 +0200 Message-ID: <1428413318.320191.18257@badger> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfTYW-00072w-5V for guix-devel@gnu.org; Tue, 07 Apr 2015 09:28:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YfTYV-0005Kj-2V for guix-devel@gnu.org; Tue, 07 Apr 2015 09:28:40 -0400 Received: from pb-sasl1.int.icgroup.com ([208.72.237.25]:63399 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfTYU-0005KW-TQ for guix-devel@gnu.org; Tue, 07 Apr 2015 09:28:38 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id B18E8436DB for ; Tue, 7 Apr 2015 09:28:38 -0400 (EDT) Received: from pb-sasl1.int.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id AB5B0436DA for ; Tue, 7 Apr 2015 09:28:38 -0400 (EDT) Received: from badger (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id E67BC436D8 for ; Tue, 7 Apr 2015 09:28:37 -0400 (EDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org * gnu/packages/gnome.scm (geoclue): New variable. * gnu/packages/patches/geoclue-config.patch: New file. --- gnu/packages/gnome.scm | 45 +++++++++++++++++++++++++++++++ gnu/packages/patches/geoclue-config.patch | 23 ++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 gnu/packages/patches/geoclue-config.patch diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 3721c12..7f3f9e3 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -1949,3 +1949,48 @@ service via the system message bus.") install and generate color profiles to accurately color manage input and output devices.") (license license:gpl2+))) + +(define-public geoclue + (package + (name "geoclue") + (version "2.1.10") + (source + (origin + (method url-fetch) + (uri (string-append "http://www.freedesktop.org/software/" name + "/releases/" (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "0s0ws2bx5g1cbjamxmm448r4n4crha2fwpzm8zbx6cq6qslygmzi")) + (patches (list (search-patch "geoclue-config.patch"))))) + (build-system glib-or-gtk-build-system) + (arguments + '(;; The tests want to run the system bus. + #:tests? #f + #:configure-flags (list ;; Disable bits requiring ModemManager. + "--disable-3g-source" + "--disable-cdma-source" + "--disable-modem-gps-source" + "--with-dbus-service-user=geoclue") + #:phases + (modify-phases %standard-phases + (add-before configure patch-/bin/true + (lambda _ + (substitute* "configure" + (("/bin/true") (which "true")))))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("intltool" ,intltool))) + (inputs + `(("glib" ,glib) + ("json-glib" ,json-glib) + ("libsoup" ,libsoup))) + (home-page "http://freedesktop.org/wiki/Software/GeoClue/") + (synopsis "Geolocation service") + (description "Geoclue is a D-Bus service that provides location +information. The primary goal of the Geoclue project is to make creating +location-aware applications as simple as possible, while the secondary goal is +to ensure that no application can access location information without explicit +permission from user. ") + (license license:gpl2+))) diff --git a/gnu/packages/patches/geoclue-config.patch b/gnu/packages/patches/geoclue-config.patch new file mode 100644 index 0000000..fa631ce --- /dev/null +++ b/gnu/packages/patches/geoclue-config.patch @@ -0,0 +1,23 @@ +--- geoclue-2.1.10/src/gclue-config.c.orig 2015-04-07 09:50:07.721074380 +0200 ++++ geoclue-2.1.10/src/gclue-config.c 2015-04-07 10:27:26.613171960 +0200 +@@ -235,6 +235,11 @@ + gclue_config_init (GClueConfig *config) + { + GError *error = NULL; ++ const char *config_file_path; ++ ++ config_file_path = g_getenv ("GEOCLUE_CONFIG_FILE_PATH"); ++ if (config_file_path == NULL) ++ config_file_path = CONFIG_FILE_PATH; + + config->priv = + G_TYPE_INSTANCE_GET_PRIVATE (config, +@@ -242,7 +247,7 @@ + GClueConfigPrivate); + config->priv->key_file = g_key_file_new (); + g_key_file_load_from_file (config->priv->key_file, +- CONFIG_FILE_PATH, ++ config_file_path, + 0, + &error); + if (error != NULL) { -- 2.2.1