removed requirement for obsoleted python-glib and specfile review [release 2.7.1-3mamba;Fri Apr 26 2024]

This commit is contained in:
Silvan Calarco 2024-04-27 00:49:27 +02:00
parent 68052b9752
commit 3fa9f37c6a
5 changed files with 8 additions and 148 deletions

View File

@ -1,7 +1,7 @@
%define majver %(echo %version | cut -d. -f1-2)
Name: geoclue
Version: 2.7.1
Release: 1mamba
Release: 3mamba
Summary: A modular geoinformation service
Group: System/Libraries
Vendor: openmamba
@ -9,11 +9,6 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://www.freedesktop.org/wiki/Software/GeoClue/
Source0: https://gitlab.freedesktop.org/geoclue/geoclue/-/archive/%{version}/geoclue-%{version}.tar.bz2
#Source0: http://www.freedesktop.org/software/geoclue/releases/%{majver}/geoclue-%{version}.tar.xz
Patch0: libgeoclue-0.11.1.1-nm08.patch
Patch1: libgeoclue-0.12.0-NMCrash.patch
Patch2: libgeoclue-0.12.0-gcc-4.7.patch
Patch3: libgeoclue-0.12.99-gpsd-3.7.patch
License: LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -25,7 +20,7 @@ BuildRequires: libmm-devel
BuildRequires: libnotify-devel
BuildRequires: libsoup-devel
## AUTOBUILDREQ-END
BuildRequires: python-glib
BuildRequires: glib-tools
Requires: dbus
%description
@ -135,6 +130,12 @@ This package includes the %{name} API documentation.
%{_datadir}/gtk-doc/html/libgeoclue/*
%changelog
* Fri Apr 26 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 2.7.1-3mamba
- removed requirement for obsoleted python-glib and specfile review
* Fri Apr 26 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 2.7.1-2mamba
- removed requirement for obsoleted python-glib and specfile review
* Wed Sep 13 2023 Automatic Build System <autodist@mambasoft.it> 2.7.1-1mamba
- automatic version update by autodist

View File

@ -1,11 +0,0 @@
--- geoclue-0.11.1.1/configure.ac.orig 2009-10-26 10:49:36.000000000 +0000
+++ geoclue-0.11.1.1/configure.ac 2009-10-26 10:50:03.000000000 +0000
@@ -123,7 +123,7 @@
if test "x$enable_networkmanager" != "xno"; then
PKG_CHECK_MODULES(NETWORK_MANAGER,
[
- NetworkManager libnm_glib
+ NetworkManager libnm-glib
], have_networkmanager="yes", have_networkmanager="no")
if test "x$have_networkmanager" = "xyes"; then

View File

@ -1,31 +0,0 @@
From bcf9ee4f44625eddad4c267fedc507d9eeeaf3f4 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Tue, 29 Jun 2010 18:47:21 +0000
Subject: Fix crasher when NetworkManager has no devices
https://bugs.freedesktop.org/show_bug.cgi?id=28066
---
diff --git a/src/connectivity-networkmanager.c b/src/connectivity-networkmanager.c
index 1061201..a7b8971 100644
--- a/src/connectivity-networkmanager.c
+++ b/src/connectivity-networkmanager.c
@@ -248,16 +248,12 @@ cache_ap_mac (GeoclueNetworkManager *self)
guint i;
devices = nm_client_get_devices (self->client);
- if (devices == NULL) {
- g_free (self->cache_ap_mac);
- self->cache_ap_mac = NULL;
- }
g_free (self->cache_ap_mac);
self->cache_ap_mac = NULL;
self->ap_strength = 0;
- for (i = 0; i < devices->len; i++) {
+ for (i = 0; devices != NULL && i < devices->len; i++) {
NMDevice *device = g_ptr_array_index (devices, i);
if (NM_IS_DEVICE_WIFI (device)) {
get_best_ap (self, device);
--
cgit v0.8.3-6-g21f6

View File

@ -1,23 +0,0 @@
From 90669619d1d621080ef00dcb8db1c3d206ee0bfe Mon Sep 17 00:00:00 2001
From: Dan Williams <dcbw@redhat.com>
Date: Mon, 07 Mar 2011 23:46:15 +0000
Subject: master: Fix warning with GCC 4.6
---
diff --git a/src/master-provider.c b/src/master-provider.c
index 790c043..e4ea053 100644
--- a/src/master-provider.c
+++ b/src/master-provider.c
@@ -846,10 +846,6 @@ gc_master_provider_initialize_interfaces (GcMasterProvider *provider)
static gboolean
gc_master_provider_initialize (GcMasterProvider *provider)
{
- GcMasterProviderPrivate *priv;
-
- priv = GET_PRIVATE (provider);
-
if (!gc_master_provider_initialize_interfaces (provider)) {
return FALSE;
}
--
cgit v0.9.0.2-2-gbebe

View File

@ -1,76 +0,0 @@
Submitted By: Randy McMurchy <randy_at_linuxfromscratch_dot_org>
Date: 2013-01-19
Initial Package Version: 0.12.0
Upstream Status: Unsure
Origin: https://bugs.freedesktop.org/attachment.cgi?id=54418
Description: Fixes building against GPSD-3.7
--- geoclue-0.12.0.orig/providers/gpsd/geoclue-gpsd.c 2011-12-14 10:57:44.000000000 +0000
+++ geoclue-0.12.0/providers/gpsd/geoclue-gpsd.c 2011-12-14 11:03:11.271878045 +0000
@@ -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;