gnu: Add geoclue.
* gnu/packages/gnome.scm (geoclue): New variable. * gnu/packages/patches/geoclue-config.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
7ce597ff9e
commit
7b2abd0055
|
@ -413,6 +413,7 @@ dist_patch_DATA = \
|
||||||
gnu/packages/patches/flex-bison-tests.patch \
|
gnu/packages/patches/flex-bison-tests.patch \
|
||||||
gnu/packages/patches/gawk-shell.patch \
|
gnu/packages/patches/gawk-shell.patch \
|
||||||
gnu/packages/patches/gcc-cross-environment-variables.patch \
|
gnu/packages/patches/gcc-cross-environment-variables.patch \
|
||||||
|
gnu/packages/patches/geoclue-config.patch \
|
||||||
gnu/packages/patches/ghostscript-runpath.patch \
|
gnu/packages/patches/ghostscript-runpath.patch \
|
||||||
gnu/packages/patches/glib-tests-desktop.patch \
|
gnu/packages/patches/glib-tests-desktop.patch \
|
||||||
gnu/packages/patches/glib-tests-homedir.patch \
|
gnu/packages/patches/glib-tests-homedir.patch \
|
||||||
|
|
|
@ -1897,3 +1897,48 @@ keyboard shortcuts.")
|
||||||
install and generate color profiles to accurately color manage input and
|
install and generate color profiles to accurately color manage input and
|
||||||
output devices.")
|
output devices.")
|
||||||
(license license:gpl2+)))
|
(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+)))
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
Allow the configuration file to be specified via an environment variable.
|
||||||
|
|
||||||
|
--- geoclue-2.1.10/src/gclue-config.c 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");
|
||||||
|
+ 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) {
|
Loading…
Reference in New Issue