diff options
Diffstat (limited to 'app-misc/geoclue')
-rw-r--r-- | app-misc/geoclue/Manifest | 9 | ||||
-rw-r--r-- | app-misc/geoclue/files/geoclue-0.12.0_p20110307-use-fallback-mac.patch | 16 | ||||
-rw-r--r-- | app-misc/geoclue/files/geoclue-0.12.0_p20110307-use-flag.patch | 79 | ||||
-rw-r--r-- | app-misc/geoclue/files/geoclue-0.12.99-gpsd.patch | 73 | ||||
-rw-r--r-- | app-misc/geoclue/files/geoclue-2.4.1-fix-GLIBC-features.patch | 44 | ||||
-rw-r--r-- | app-misc/geoclue/geoclue-0.12.99.ebuild | 71 | ||||
-rw-r--r-- | app-misc/geoclue/geoclue-2.4.8.ebuild | 59 | ||||
-rw-r--r-- | app-misc/geoclue/metadata.xml | 21 |
8 files changed, 372 insertions, 0 deletions
diff --git a/app-misc/geoclue/Manifest b/app-misc/geoclue/Manifest new file mode 100644 index 000000000000..9d46166b4bb9 --- /dev/null +++ b/app-misc/geoclue/Manifest @@ -0,0 +1,9 @@ +AUX geoclue-0.12.0_p20110307-use-fallback-mac.patch 511 BLAKE2B eae5d5fce3b87d6d34141f0438676d862816443d0d808fe1a1e28cbc7535c59fcc54f414890107fcb5896e1e566e746dd0f03a6f478502862d45abd2aed6c2c1 SHA512 e2845272cca268c4658c3e836efd7b49bc53e7690125bc48a7d1d9d0b82b46ea88fff427ee73fa2045c74c2dfe21d45497341032363713a6401a735110bcd1e0 +AUX geoclue-0.12.0_p20110307-use-flag.patch 2571 BLAKE2B 17c6d6009bc8bc089c2fa882f5e270186f32990cc804d7172f719ec50fad97331d72d88f93c6b829b54bf106fa0ff58fb008c6ad7c2ee7f6d1433488c4cf7c47 SHA512 9558635f1c520f26c30edcd2512934a6f3238c0fabf88e2e5b345aa8521575faad2e734d84e99071b827cc81724fab27299f2b838a48993e3110d2fa6ba82eef +AUX geoclue-0.12.99-gpsd.patch 2073 BLAKE2B 499774d91864ada9ef29a2154e17bed7e143f0e13fb30a6e9d8231f6f6e7fac9b35f99b042aa05aade1ad139dd9d393951b16dee10c3bb104aa325fa418cf24c SHA512 9a5280af319cea99567fbbaf8174f11de71f9dbbeb146c4ad42a19df1d84f7573c9cd72560b7185065e5b8507770f77fa3cc06b3e45e0a56fdf3d3e5b717f0bc +AUX geoclue-2.4.1-fix-GLIBC-features.patch 1449 BLAKE2B d3411ef1d35b7dc902d2d18aefce2f72144cdb779ae11bdfe7370fcb9b14a9e53e9314d69c7e35e8eb541c5db3b61ae7a94fc99bf1c2aa2a0beeff1584928f05 SHA512 27d2d750d2cc52714276d5b4431444c31e0ff59fc1fabf659efe77d427dad67de376e6bf4aa55882ced21c56ef1d4dff05aeac62372a5174acf7e5f40d5f061b +DIST geoclue-0.12.99.tar.gz 608074 BLAKE2B af0c8141ade57791159f87ee7725134f18ba07cfdf9207c26c1ce77fd46a41aabfec4ba37882816bd70341964db2a89c2bc327292c097ea2e413dcb4bd7385c8 SHA512 32f946c9ee66cff2a6564b275d5f7bdf0d42832166c9fbeccb0aa55f3c3370fd8de114ad26477df6a2ee9d22250a5b104ec384032b28c3a62c356baea05d1bc2 +DIST geoclue-2.4.8.tar.xz 368404 BLAKE2B 244aaa01ebbac57839eb8e5a19f543f3940217de9ad076b55c6054ff818e3c2948d3419e7391e05ccc17a5234a76980dee0470ae806d437db95db4a9e128a678 SHA512 1741962b4bdce925af090961bd50f4d0d934f7b81e53968d5d8ea7957e8593c4c9a8084bbd149c454d76f2af35be036748f212c99506b475567384a43f579f3d +EBUILD geoclue-0.12.99.ebuild 1976 BLAKE2B ed7a3e5561e9437c99fdd802496f8a88e9346bbe4c37cd5c58bb59ccbd9424483bb6faa24ccb15bbd66c7512fd2fe7bc7c9f761f3e7bcbaf674825953a9fefbf SHA512 ded60d1f1045cf6d05963fcb49eba167445526833651c095874c01b5dba837075b0ae4a0e4586f31a3dcaf56dcd4b2ee6019e926608f4e5218d0bea7db9eddc8 +EBUILD geoclue-2.4.8.ebuild 1577 BLAKE2B 2a1c4e4dbc825798a172a90cc1ed1ecea0b92b130bf03587a3b24564cb514df2289516420d9924def46322041849ef7fc1e6a28f7df3813cf88d7550d9b5f873 SHA512 3ac7765ba17df00d3864eb0c8fab5d21c43a9974d85e238789c461a7f267a2e65757d5469c59cb3f593aaacc6ab4907c92e60d63765e4b73237832d09d990658 +MISC metadata.xml 1062 BLAKE2B 11f3d019f7c014387f5b3faece7dd7f165e106dd27132cf56bf59b35be2fe2ac0dd02751eb87e4e8bfa77fdecf076217eb76e6e5b37acb33c26d2f26cf1ca942 SHA512 3747063a944f72bed17f4948a0c8041746cf61fe85f2b4886cf6b8f88c01dd4cbab37a94447c3a900416bf1a374d88deb812f89789e74f4465654b26fe18899d diff --git a/app-misc/geoclue/files/geoclue-0.12.0_p20110307-use-fallback-mac.patch b/app-misc/geoclue/files/geoclue-0.12.0_p20110307-use-fallback-mac.patch new file mode 100644 index 000000000000..9c9115a284ef --- /dev/null +++ b/app-misc/geoclue/files/geoclue-0.12.0_p20110307-use-fallback-mac.patch @@ -0,0 +1,16 @@ +Force geoclue to use the "fallback" mac address fetching code. +The NM-based code does not seem to work. + +Patch by Kevin McCarthy <signals@gentoo.org> + +--- src/connectivity.c ++++ src/connectivity.c +@@ -218,7 +218,7 @@ + geoclue_connectivity_get_router_mac (GeoclueConnectivity *self) + { + if (self == NULL || +- GEOCLUE_CONNECTIVITY_GET_INTERFACE (self)->get_router_mac == NULL) { ++ GEOCLUE_CONNECTIVITY_GET_INTERFACE (self)->get_router_mac == NULL || 1) { + char *mac = NULL; + guint i; + int ret_val; diff --git a/app-misc/geoclue/files/geoclue-0.12.0_p20110307-use-flag.patch b/app-misc/geoclue/files/geoclue-0.12.0_p20110307-use-flag.patch new file mode 100644 index 000000000000..236c98928ba7 --- /dev/null +++ b/app-misc/geoclue/files/geoclue-0.12.0_p20110307-use-flag.patch @@ -0,0 +1,79 @@ +Add configure options for all providers except localnet. + +Patch by Kevin McCarthy <signals@gentoo.org> + +--- configure.ac ++++ configure.ac +@@ -158,7 +158,71 @@ + AC_SUBST(CONNECTIVITY_LIBS) + AC_SUBST(CONNECTIVITY_CFLAGS) + +-PROVIDER_SUBDIRS="example hostip geonames nominatim manual plazes localnet yahoo gsmloc" ++PROVIDER_SUBDIRS="localnet" ++ ++AC_ARG_ENABLE(hostip, ++ AS_HELP_STRING([--enable-hostip=@<:@no/yes/auto@:>@], ++ [build with hostip support]), , ++ enable_hostip=auto) ++ ++if test "x$enable_hostip" != "xno"; then ++ PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS hostip" ++fi ++ ++AC_ARG_ENABLE(geonames, ++ AS_HELP_STRING([--enable-geonames=@<:@no/yes/auto@:>@], ++ [build with geonames support]), , ++ enable_geonames=auto) ++ ++if test "x$enable_geonames" != "xno"; then ++ PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS geonames" ++fi ++ ++AC_ARG_ENABLE(nominatim, ++ AS_HELP_STRING([--enable-nominatim=@<:@no/yes/auto@:>@], ++ [build with nominatim support]), , ++ enable_nominatim=auto) ++ ++if test "x$enable_nominatim" != "xno"; then ++ PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS nominatim" ++fi ++ ++AC_ARG_ENABLE(manual, ++ AS_HELP_STRING([--enable-manual=@<:@no/yes/auto@:>@], ++ [build with manual support]), , ++ enable_manual=auto) ++ ++if test "x$enable_manual" != "xno"; then ++ PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS manual" ++fi ++ ++AC_ARG_ENABLE(plazes, ++ AS_HELP_STRING([--enable-plazes=@<:@no/yes/auto@:>@], ++ [build with plazes support]), , ++ enable_plazes=auto) ++ ++if test "x$enable_plazes" != "xno"; then ++ PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS plazes" ++fi ++ ++AC_ARG_ENABLE(yahoo, ++ AS_HELP_STRING([--enable-yahoo=@<:@no/yes/auto@:>@], ++ [build with yahoo support]), , ++ enable_yahoo=auto) ++ ++if test "x$enable_yahoo" != "xno"; then ++ PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS yahoo" ++fi ++ ++AC_ARG_ENABLE(gsmloc, ++ AS_HELP_STRING([--enable-gsmloc=@<:@no/yes/auto@:>@], ++ [build with gsmloc support]), , ++ enable_gsmloc=auto) ++ ++if test "x$enable_gsmloc" != "xno"; then ++ PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS gsmloc" ++fi ++ + + # ----------------------------------------------------------- + # gypsy / gpsd / skyhook diff --git a/app-misc/geoclue/files/geoclue-0.12.99-gpsd.patch b/app-misc/geoclue/files/geoclue-0.12.99-gpsd.patch new file mode 100644 index 000000000000..51160d6296e0 --- /dev/null +++ b/app-misc/geoclue/files/geoclue-0.12.99-gpsd.patch @@ -0,0 +1,73 @@ +Description: Refactoring to support new libgps API +Author: James Page <james.page@ubuntu.com> +Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40996 +Forwarded: no + +--- providers/gpsd/geoclue-gpsd.c ++++ providers/gpsd/geoclue-gpsd.c +@@ -40,7 +40,12 @@ + #include <geoclue/gc-iface-position.h> + #include <geoclue/gc-iface-velocity.h> + ++#if GPSD_API_MAJOR_VERSION >= 5 ++/* gps_data conflicts with gps_data function */ ++typedef struct gps_data_t gps_data_l; ++#else + typedef struct gps_data_t gps_data; ++#endif + typedef struct gps_fix_t gps_fix; + + /* only listing used tags */ +@@ -59,7 +64,11 @@ + char *host; + char *port; + ++#if GPSD_API_MAJOR_VERSION >= 5 ++ gps_data_l *gpsdata; ++#else + gps_data *gpsdata; ++#endif + + gps_fix *last_fix; + +@@ -394,10 +403,16 @@ + static gboolean + geoclue_gpsd_start_gpsd (GeoclueGpsd *self) + { ++#if GPSD_API_MAJOR_VERSION >= 5 ++ int status = gps_open (self->host, self->port, self->gpsdata); ++ if (status == 0) { ++ gps_stream(self->gpsdata, WATCH_ENABLE | WATCH_NMEA, NULL); ++#else + self->gpsdata = gps_open (self->host, self->port); + if (self->gpsdata) { + gps_stream(self->gpsdata, WATCH_ENABLE | WATCH_NMEA | POLL_NONBLOCK, NULL); + gps_set_raw_hook (self->gpsdata, gpsd_raw_hook); ++#endif + return TRUE; + } else { + g_warning ("gps_open() failed, is gpsd running (host=%s,port=%s)?", self->host, self->port); +@@ -410,10 +425,23 @@ + { + GeoclueGpsd *self = (GeoclueGpsd*)data; + if (self->gpsdata) { ++#if GPSD_API_MAJOR_VERSION >= 5 ++ /* gps_poll and gps_set_raw_hook no longer present in this API version */ ++ if (gps_waiting(self->gpsdata, 500)) { ++ if (gps_read(self->gpsdata) == -1) { ++ geoclue_gpsd_set_status (self, GEOCLUE_STATUS_ERROR); ++ geoclue_gpsd_stop_gpsd(self); ++ return FALSE; ++ } else { ++ /* Call existing raw_hook to process the data */ ++ gpsd_raw_hook(self->gpsdata, NULL, 0); ++ } ++#else + if (gps_poll(self->gpsdata) < 0) { + geoclue_gpsd_set_status (self, GEOCLUE_STATUS_ERROR); + geoclue_gpsd_stop_gpsd(self); + return FALSE; ++#endif + } + } + return TRUE; diff --git a/app-misc/geoclue/files/geoclue-2.4.1-fix-GLIBC-features.patch b/app-misc/geoclue/files/geoclue-2.4.1-fix-GLIBC-features.patch new file mode 100644 index 000000000000..b27bf5d44c01 --- /dev/null +++ b/app-misc/geoclue/files/geoclue-2.4.1-fix-GLIBC-features.patch @@ -0,0 +1,44 @@ +This has been edited to fit geoclue that import the code from geocode-glib. +--Anthony G. Basile + +From 3ce317a218c255b8a8025f8f2a6010ce500dc0ee Mon Sep 17 00:00:00 2001 +From: "Anthony G. Basile" <blueness@gentoo.org> +Date: Tue, 22 Mar 2016 09:48:00 +0000 +Subject: [PATCH] Use __UCLIBC__ when checking for GLIBC features + +Commit f0f85d8d introduces __GLIBC__ to check for glibc only features. +However this is not sufficient for uClibc because it shares code with +glibc. To select for features in glibc but not uClibc, we need +defined(__GLIBC__) && !defined(__UCLIBC__). + +https://bugzilla.gnome.org/show_bug.cgi?id=764021 +--- + geocode-glib/geocode-glib.c | 4 ++-- + geocode-glib/test-gcglib.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/geocode-glib/geocode-glib.c b/src/geocode-glib/geocode-glib.c +index 4e3b3fd..6215fd1 100644 +--- a/src/geocode-glib/geocode-glib.c ++++ b/src/geocode-glib/geocode-glib.c +@@ -213,7 +213,7 @@ _geocode_object_get_lang (void) + return geocode_object_get_lang_for_locale (setlocale (LC_MESSAGES, NULL)); + } + +-#ifdef __GLIBC__ ++#if defined(__GLIBC__) && !defined(__UCLIBC__) + static gpointer + is_number_after_street (gpointer data) + { +@@ -246,7 +246,7 @@ is_number_after_street (gpointer data) + gboolean + _geocode_object_is_number_after_street (void) + { +-#ifndef __GLIBC__ ++#if !defined(__GLIBC__) || defined(__UCLIBC__) + return FALSE; + #else + static GOnce once = G_ONCE_INIT; +-- +2.7.3 + diff --git a/app-misc/geoclue/geoclue-0.12.99.ebuild b/app-misc/geoclue/geoclue-0.12.99.ebuild new file mode 100644 index 000000000000..2e7e56b9b28f --- /dev/null +++ b/app-misc/geoclue/geoclue-0.12.99.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 +inherit autotools eutils + +DESCRIPTION="A geoinformation D-Bus service" +HOMEPAGE="https://freedesktop.org/wiki/Software/GeoClue" +SRC_URI="https://freedesktop.org/~hadess/${P}.tar.gz" + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd" +IUSE="connman geonames gps gsmloc gtk hostip manual networkmanager nominatim plazes skyhook static-libs yahoo-geo" + +REQUIRED_USE="skyhook? ( networkmanager )" + +RDEPEND=">=dev-libs/dbus-glib-0.100 + >=dev-libs/glib-2 + dev-libs/libxml2 + sys-apps/dbus + gps? ( sci-geosciences/gpsd ) + gtk? ( x11-libs/gtk+:2 ) + networkmanager? ( net-misc/networkmanager ) + skyhook? ( net-libs/libsoup )" +DEPEND="${RDEPEND} + dev-util/gtk-doc-am + virtual/pkgconfig" + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-0.12.0_p20110307-use-flag.patch \ + "${FILESDIR}"/${PN}-0.12.0_p20110307-use-fallback-mac.patch \ + "${FILESDIR}"/${P}-gpsd.patch + + sed -i -e '/CFLAGS/s:-g ::' configure.ac || die #399177 + sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.ac || die + eautoreconf +} + +src_configure() { + # Conic is only for Maemo. Don't enable. + # Gypsy has multiple vulnerabilities: + # https://bugs.freedesktop.org/show_bug.cgi?id=33431 + econf \ + --disable-silent-rules \ + $(use_enable static-libs static) \ + --disable-schemas-compile \ + $(use_enable gtk tests) \ + $(use_enable gtk) \ + --disable-conic \ + $(use_enable connman) \ + $(use_enable networkmanager) \ + --disable-gypsy \ + $(use_enable gps gpsd) \ + $(use_enable skyhook) \ + $(use_enable geonames) \ + $(use_enable gsmloc) \ + $(use_enable hostip) \ + $(use_enable manual) \ + $(use_enable nominatim) \ + $(use_enable plazes) \ + $(use_enable yahoo-geo yahoo) \ + --with-html-dir=/usr/share/doc/${PF}/html +} + +src_install() { + emake DESTDIR="${D}" install + use gtk && dobin test/.libs/geoclue-test-gui + prune_libtool_files +} diff --git a/app-misc/geoclue/geoclue-2.4.8.ebuild b/app-misc/geoclue/geoclue-2.4.8.ebuild new file mode 100644 index 000000000000..ba3294f255e4 --- /dev/null +++ b/app-misc/geoclue/geoclue-2.4.8.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit gnome2 systemd user versionator + +MY_PV=$(get_version_component_range 1-2) +DESCRIPTION="A geoinformation D-Bus service" +HOMEPAGE="https://freedesktop.org/wiki/Software/GeoClue" +SRC_URI="https://www.freedesktop.org/software/${PN}/releases/${MY_PV}/${P}.tar.xz" + +LICENSE="LGPL-2" +SLOT="2.0" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc x86 ~amd64-fbsd" +IUSE="+introspection +modemmanager zeroconf" + +RDEPEND=" + >=dev-libs/glib-2.34:2 + >=dev-libs/json-glib-0.14 + >=net-libs/libsoup-2.42:2.4 + sys-apps/dbus + introspection? ( >=dev-libs/gobject-introspection-0.9.6:= ) + modemmanager? ( >=net-misc/modemmanager-1.6 ) + zeroconf? ( >=net-dns/avahi-0.6.10[dbus] ) + !<sci-geosciences/geocode-glib-3.10.0 +" +DEPEND="${RDEPEND} + dev-util/gdbus-codegen + >=dev-util/gtk-doc-am-1 + >=dev-util/intltool-0.40 + sys-devel/gettext + virtual/pkgconfig +" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.4.1-fix-GLIBC-features.patch + + gnome2_src_prepare +} + +src_configure() { + # debug only affects CFLAGS + gnome2_src_configure \ + --enable-backend \ + --with-dbus-service-user=geoclue \ + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ + $(use_enable introspection) \ + $(use_enable modemmanager 3g-source) \ + $(use_enable modemmanager cdma-source) \ + $(use_enable modemmanager modem-gps-source) \ + $(use_enable zeroconf nmea-source) +} + +pkg_preinst() { + enewgroup geoclue + enewuser geoclue -1 -1 /var/lib/geoclue geoclue + gnome2_pkg_preinst +} diff --git a/app-misc/geoclue/metadata.xml b/app-misc/geoclue/metadata.xml new file mode 100644 index 000000000000..bd2c408ce28f --- /dev/null +++ b/app-misc/geoclue/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>gnome@gentoo.org</email> + <name>Gentoo GNOME Desktop</name> +</maintainer> +<use> + <flag name="geonames">Install geonames.org provider</flag> + <flag name="gsmloc">Install GSM location provider</flag> + <flag name="gtk">Install gtk-based geoclue-test-gui</flag> + <flag name="hostip">Install hostip.info provder</flag> + <flag name="manual">Install manual provider</flag> + <flag name="modemmanager">Enable geolocation through 3G or GPS enabled hardware through <pkg>net-misc/modemmanager</pkg>.</flag> + <flag name="nominatim">Install openstreetmap.org provider</flag> + <flag name="plazes">Install plazes.com provider</flag> + <flag name="skyhook">Install skyhookwireless.com provider</flag> + <flag name="yahoo-geo">Install Yahoo geolocation provider</flag> + <flag name="zeroconf">Enable retrieval of GPS location from Android devices with https://wiki.gnome.org/Apps/GeoclueShare</flag> +</use> +</pkgmetadata> |