Skip to content

Commit 4adb93a

Browse files
committed
Remove deprecated geoclue 1 location provider
1 parent ee4ce47 commit 4adb93a

11 files changed

+60
-358
lines changed

.travis.yml

+37-14
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,38 @@
1-
dist: trusty
2-
sudo: required
1+
32
language: c
4-
before_install:
5-
- sed -i -e 's|AC_PREREQ(\[2.69\])|AC_PREREQ([2.68])|' configure.ac
6-
- sudo apt-get update -qq
7-
install:
8-
- sudo apt-get install -qq autopoint intltool
9-
- sudo apt-get install -qq libdrm-dev
10-
- sudo apt-get install -qq libxcb1-dev libxcb-randr0-dev
11-
- sudo apt-get install -qq libx11-dev libxxf86vm-dev
12-
- sudo apt-get install -qq libgeoclue-dev
13-
- sudo apt-get install -qq libglib2.0-dev
14-
- sudo apt-get install -qq python3
15-
script: ./bootstrap && ./configure --enable-drm --enable-vidmode --enable-randr --enable-geoclue --enable-geoclue2 --enable-gui && make -j2 distcheck
3+
4+
matrix:
5+
include:
6+
- os: linux
7+
compiler: gcc
8+
dist: trusty
9+
sudo: false
10+
# - os: osx
11+
# compiler: clang
12+
13+
addons:
14+
apt:
15+
packages:
16+
- autopoint
17+
- intltool
18+
# DRM
19+
- libdrm-dev
20+
# RANDR
21+
- libxcb1-dev
22+
- libxcb-randr0-dev
23+
# VidMode
24+
- libx11-dev
25+
- libxxf86vm-dev
26+
# GeoClue2
27+
- libglib2.0-dev
28+
# GUI
29+
- python3
30+
31+
install: |
32+
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
33+
brew install gettext
34+
brew install intltool
35+
fi
36+
37+
script: |
38+
./bootstrap && ./configure --enable-drm --enable-vidmode --enable-randr --enable-geoclue2 --enable-gui && make -j2 distcheck

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Dependencies
5252
* libdrm (Optional, for DRM support)
5353
* libxcb, libxcb-randr (Optional, for RandR support)
5454
* libX11, libXxf86vm (Optional, for VidMode support)
55-
* geoclue (Optional, for geoclue support)
55+
* Glib 2 (Optional, for GeoClue2 support)
5656

5757
* python3, pygobject, pyxdg (Optional, for GUI support)
5858
* appindicator (Optional, for Ubuntu-style GUI status icon)
@@ -158,8 +158,8 @@ Install MinGW and run `configure` using the following command line. Use
158158

159159
``` shell
160160
$ ./configure --disable-drm --disable-randr --disable-vidmode --enable-wingdi \
161-
--disable-geoclue --disable-gui --disable-ubuntu \
162-
--host=x86_64-w64-mingw32
161+
--disable-quartz --disable-geoclue2 --disable-corelocation --disable-gui \
162+
--disable-ubuntu --host=x86_64-w64-mingw32
163163
```
164164

165165

DESIGN

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ of gamma ramps, which is what Redshift uses to change the screen color
6464
temperature. There's also "wingdi" which is for the Windows version,
6565
and "drm" which allows manipulation of gamma ramps in a TTY in Linux.
6666

67-
Then there are location providers: "manual", "gnome-clock" and
68-
"geoclue". Some time ago there was only one way to specify the
67+
Then there are location providers: "manual", "geoclue2" and "corelocation".
68+
Some time ago there was only one way to specify the
6969
location which had to be done manually with the argument "-l LAT:LON".
7070
Then later, automatic "location providers" were added and the syntax
7171
had to be changed to "-l PROVIDER:OPTIONS" where OPTIONS are arguments

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ build_script:
1717
$env:MSYSTEM = "MINGW32"
1818
}
1919
20-
$env:CONFIGURE_FLAGS = "--disable-drm --disable-randr --disable-vidmode --enable-wingdi --disable-quartz --disable-geoclue --disable-geoclue2 --disable-corelocation --disable-gui --disable-ubuntu --disable-nls --host=$env:arch-w64-mingw32"
20+
$env:CONFIGURE_FLAGS = "--disable-drm --disable-randr --disable-vidmode --enable-wingdi --disable-quartz --disable-geoclue2 --disable-corelocation --disable-gui --disable-ubuntu --disable-nls --host=$env:arch-w64-mingw32"
2121
2222
- ps: md (Join-Path $env:APPVEYOR_BUILD_FOLDER root)
2323
- C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER && ./bootstrap"

configure.ac

+9-35
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
1313
# Checks for programs.
1414
AC_PROG_CC_C99
1515
AC_PROG_LIBTOOL
16-
AC_PROG_OBJC # For OSX support modules
16+
AC_PROG_OBJC # For macOS support modules
1717
AC_LANG([C])
1818

1919
AC_PROG_INTLTOOL([0.50])
@@ -69,10 +69,9 @@ PKG_CHECK_MODULES([XCB_RANDR], [xcb-randr],
6969
[have_xcb_randr=yes], [have_xcb_randr=no])
7070

7171
PKG_CHECK_MODULES([GLIB], [glib-2.0 gobject-2.0], [have_glib=yes], [have_glib=no])
72-
PKG_CHECK_MODULES([GEOCLUE], [geoclue], [have_geoclue=yes], [have_geoclue=no])
7372
PKG_CHECK_MODULES([GEOCLUE2], [glib-2.0 gio-2.0 >= 2.26], [have_geoclue2=yes], [have_geoclue2=no])
7473

75-
# OSX headers
74+
# macOS headers
7675
AC_CHECK_HEADER([ApplicationServices/ApplicationServices.h], [have_appserv_h=yes], [have_appserv_h=no])
7776

7877
# CoreLocation.h is an Objective C header. Only test if
@@ -173,10 +172,10 @@ AS_IF([test "x$enable_vidmode" != xno], [
173172
])
174173
AM_CONDITIONAL([ENABLE_VIDMODE], [test "x$enable_vidmode" = xyes])
175174

176-
# Check Quartz (OSX) method
175+
# Check Quartz (macOS) method
177176
AC_MSG_CHECKING([whether to enable Quartz method])
178177
AC_ARG_ENABLE([quartz], [AC_HELP_STRING([--enable-quartz],
179-
[enable Quartz (OSX) method])],
178+
[enable Quartz (macOS) method])],
180179
[enable_quartz=$enableval],[enable_quartz=maybe])
181180
AS_IF([test "x$enable_quartz" != xno], [
182181
AS_IF([test $have_appserv_h = yes], [
@@ -226,30 +225,6 @@ AS_IF([test "x$enable_wingdi" != xno], [
226225
AM_CONDITIONAL([ENABLE_WINGDI], [test "x$enable_wingdi" = xyes])
227226

228227

229-
# Check Geoclue location provider
230-
AC_MSG_CHECKING([whether to enable Geoclue location provider])
231-
AC_ARG_ENABLE([geoclue], [AC_HELP_STRING([--enable-geoclue],
232-
[enable Geoclue location provider])],
233-
[enable_geoclue=$enableval],[enable_geoclue=maybe])
234-
AS_IF([test "x$enable_geoclue" != xno], [
235-
AS_IF([test "x$have_geoclue" = xyes -a "x$have_glib" = xyes], [
236-
AC_DEFINE([ENABLE_GEOCLUE], 1,
237-
[Define to 1 to enable Geoclue location provider])
238-
AC_MSG_RESULT([yes])
239-
enable_geoclue=yes
240-
], [
241-
AC_MSG_RESULT([missing dependencies])
242-
AS_IF([test "x$enable_geoclue" = xyes], [
243-
AC_MSG_ERROR([missing dependencies for Geoclue location provider])
244-
])
245-
enable_geoclue=no
246-
])
247-
], [
248-
AC_MSG_RESULT([no])
249-
enable_geoclue=no
250-
])
251-
AM_CONDITIONAL([ENABLE_GEOCLUE], [test "x$enable_geoclue" = xyes])
252-
253228
# Check Geoclue2 location provider
254229
AC_MSG_CHECKING([whether to enable Geoclue2 location provider])
255230
AC_ARG_ENABLE([geoclue2], [AC_HELP_STRING([--enable-geoclue2],
@@ -274,10 +249,10 @@ AS_IF([test "x$enable_geoclue2" != xno], [
274249
])
275250
AM_CONDITIONAL([ENABLE_GEOCLUE2], [test "x$enable_geoclue2" = xyes])
276251

277-
# Check CoreLocation (OSX) provider
252+
# Check CoreLocation (macOS) provider
278253
AC_MSG_CHECKING([whether to enable CoreLocation method])
279254
AC_ARG_ENABLE([corelocation], [AC_HELP_STRING([--enable-corelocation],
280-
[enable CoreLocation (OSX) provider])],
255+
[enable CoreLocation (macOS) provider])],
281256
[enable_corelocation=$enableval],[enable_corelocation=maybe])
282257
AS_IF([test "x$enable_corelocation" != xno], [
283258
AS_IF([test "x$have_corelocation_h" = xyes], [
@@ -388,13 +363,12 @@ echo "
388363
DRM: ${enable_drm}
389364
RANDR: ${enable_randr}
390365
VidMode: ${enable_vidmode}
391-
Quartz (OSX): ${enable_quartz}
366+
Quartz (macOS): ${enable_quartz}
392367
WinGDI (Windows): ${enable_wingdi}
393368

394369
Location providers:
395-
Geoclue: ${enable_geoclue}
396-
Geoclue2: ${enable_geoclue2}
397-
CoreLocation (OSX) ${enable_corelocation}
370+
Geoclue2: ${enable_geoclue2}
371+
CoreLocation (macOS): ${enable_corelocation}
398372

399373
GUI: ${enable_gui}
400374
Ubuntu icons: ${enable_ubuntu}

po/POTFILES.in

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ src/gamma-quartz.c
1515
src/gamma-w32gdi.c
1616
src/gamma-dummy.c
1717

18-
src/location-geoclue.c
1918
src/location-geoclue2.c
2019
src/location-corelocation.m
2120
src/location-manual.c

redshift.conf.sample

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ gamma=0.8
2424
;gamma-day=0.8:0.7:0.8
2525
;gamma-night=0.6
2626

27-
; Set the location-provider: 'geoclue', 'geoclue2', 'manual'
27+
; Set the location-provider: 'geoclue2', 'manual'
2828
; type 'redshift -l list' to see possible values.
2929
; The location provider settings are in a different section.
3030
location-provider=manual

src/Makefile.am

+7-16
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,24 @@ AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
99
bin_PROGRAMS = redshift
1010

1111
redshift_SOURCES = \
12-
redshift.c redshift.h \
13-
signals.c signals.h \
1412
colorramp.c colorramp.h \
1513
config-ini.c config-ini.h \
14+
gamma-dummy.c gamma-dummy.h \
15+
hooks.c hooks.h \
1616
location-manual.c location-manual.h \
17+
redshift.c redshift.h \
18+
signals.c signals.h \
1719
solar.c solar.h \
18-
systemtime.c systemtime.h \
19-
hooks.c hooks.h \
20-
gamma-dummy.c gamma-dummy.h
20+
systemtime.c systemtime.h
2121

2222
EXTRA_redshift_SOURCES = \
2323
gamma-drm.c gamma-drm.h \
2424
gamma-randr.c gamma-randr.h \
2525
gamma-vidmode.c gamma-vidmode.h \
2626
gamma-quartz.c gamma-quartz.h \
2727
gamma-w32gdi.c gamma-w32gdi.h \
28-
location-geoclue.c location-geoclue.h \
28+
location-geoclue2.c location-geoclue2.h \
29+
location-corelocation.m location-corelocation.h \
2930
windows/appicon.rc \
3031
windows/versioninfo.rc
3132

@@ -69,16 +70,6 @@ redshift_LDADD += -lgdi32
6970
endif
7071

7172

72-
if ENABLE_GEOCLUE
73-
redshift_SOURCES += location-geoclue.c location-geoclue.h
74-
AM_CFLAGS += \
75-
$(GEOCLUE_CFLAGS) $(GEOCLUE_LIBS) \
76-
$(GLIB_CFLAGS) $(GLIB_LIBS)
77-
redshift_LDADD += \
78-
$(GEOCLUE_LIBS) $(GEOCLUE_CFLAGS)
79-
$(GLIB_LIBS) $(GLIB_CFLAGS)
80-
endif
81-
8273
if ENABLE_GEOCLUE2
8374
redshift_SOURCES += location-geoclue2.c location-geoclue2.h
8475
AM_CFLAGS += \

0 commit comments

Comments
 (0)