Skip to content

Commit

Permalink
Remove deprecated geoclue 1 location provider
Browse files Browse the repository at this point in the history
  • Loading branch information
jonls committed Aug 17, 2017
1 parent ee4ce47 commit 4adb93a
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 358 deletions.
51 changes: 37 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,38 @@
dist: trusty
sudo: required

language: c
before_install:
- sed -i -e 's|AC_PREREQ(\[2.69\])|AC_PREREQ([2.68])|' configure.ac
- sudo apt-get update -qq
install:
- sudo apt-get install -qq autopoint intltool
- sudo apt-get install -qq libdrm-dev
- sudo apt-get install -qq libxcb1-dev libxcb-randr0-dev
- sudo apt-get install -qq libx11-dev libxxf86vm-dev
- sudo apt-get install -qq libgeoclue-dev
- sudo apt-get install -qq libglib2.0-dev
- sudo apt-get install -qq python3
script: ./bootstrap && ./configure --enable-drm --enable-vidmode --enable-randr --enable-geoclue --enable-geoclue2 --enable-gui && make -j2 distcheck

matrix:
include:
- os: linux
compiler: gcc
dist: trusty
sudo: false
# - os: osx
# compiler: clang

addons:
apt:
packages:
- autopoint
- intltool
# DRM
- libdrm-dev
# RANDR
- libxcb1-dev
- libxcb-randr0-dev
# VidMode
- libx11-dev
- libxxf86vm-dev
# GeoClue2
- libglib2.0-dev
# GUI
- python3

install: |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew install gettext
brew install intltool
fi
script: |
./bootstrap && ./configure --enable-drm --enable-vidmode --enable-randr --enable-geoclue2 --enable-gui && make -j2 distcheck
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Dependencies
* libdrm (Optional, for DRM support)
* libxcb, libxcb-randr (Optional, for RandR support)
* libX11, libXxf86vm (Optional, for VidMode support)
* geoclue (Optional, for geoclue support)
* Glib 2 (Optional, for GeoClue2 support)

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

``` shell
$ ./configure --disable-drm --disable-randr --disable-vidmode --enable-wingdi \
--disable-geoclue --disable-gui --disable-ubuntu \
--host=x86_64-w64-mingw32
--disable-quartz --disable-geoclue2 --disable-corelocation --disable-gui \
--disable-ubuntu --host=x86_64-w64-mingw32
```


Expand Down
4 changes: 2 additions & 2 deletions DESIGN
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ of gamma ramps, which is what Redshift uses to change the screen color
temperature. There's also "wingdi" which is for the Windows version,
and "drm" which allows manipulation of gamma ramps in a TTY in Linux.

Then there are location providers: "manual", "gnome-clock" and
"geoclue". Some time ago there was only one way to specify the
Then there are location providers: "manual", "geoclue2" and "corelocation".
Some time ago there was only one way to specify the
location which had to be done manually with the argument "-l LAT:LON".
Then later, automatic "location providers" were added and the syntax
had to be changed to "-l PROVIDER:OPTIONS" where OPTIONS are arguments
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ build_script:
$env:MSYSTEM = "MINGW32"
}
$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"
$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"
- ps: md (Join-Path $env:APPVEYOR_BUILD_FOLDER root)
- C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER && ./bootstrap"
Expand Down
44 changes: 9 additions & 35 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# Checks for programs.
AC_PROG_CC_C99
AC_PROG_LIBTOOL
AC_PROG_OBJC # For OSX support modules
AC_PROG_OBJC # For macOS support modules
AC_LANG([C])

AC_PROG_INTLTOOL([0.50])
Expand Down Expand Up @@ -69,10 +69,9 @@ PKG_CHECK_MODULES([XCB_RANDR], [xcb-randr],
[have_xcb_randr=yes], [have_xcb_randr=no])

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

# OSX headers
# macOS headers
AC_CHECK_HEADER([ApplicationServices/ApplicationServices.h], [have_appserv_h=yes], [have_appserv_h=no])

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

# Check Quartz (OSX) method
# Check Quartz (macOS) method
AC_MSG_CHECKING([whether to enable Quartz method])
AC_ARG_ENABLE([quartz], [AC_HELP_STRING([--enable-quartz],
[enable Quartz (OSX) method])],
[enable Quartz (macOS) method])],
[enable_quartz=$enableval],[enable_quartz=maybe])
AS_IF([test "x$enable_quartz" != xno], [
AS_IF([test $have_appserv_h = yes], [
Expand Down Expand Up @@ -226,30 +225,6 @@ AS_IF([test "x$enable_wingdi" != xno], [
AM_CONDITIONAL([ENABLE_WINGDI], [test "x$enable_wingdi" = xyes])


# Check Geoclue location provider
AC_MSG_CHECKING([whether to enable Geoclue location provider])
AC_ARG_ENABLE([geoclue], [AC_HELP_STRING([--enable-geoclue],
[enable Geoclue location provider])],
[enable_geoclue=$enableval],[enable_geoclue=maybe])
AS_IF([test "x$enable_geoclue" != xno], [
AS_IF([test "x$have_geoclue" = xyes -a "x$have_glib" = xyes], [
AC_DEFINE([ENABLE_GEOCLUE], 1,
[Define to 1 to enable Geoclue location provider])
AC_MSG_RESULT([yes])
enable_geoclue=yes
], [
AC_MSG_RESULT([missing dependencies])
AS_IF([test "x$enable_geoclue" = xyes], [
AC_MSG_ERROR([missing dependencies for Geoclue location provider])
])
enable_geoclue=no
])
], [
AC_MSG_RESULT([no])
enable_geoclue=no
])
AM_CONDITIONAL([ENABLE_GEOCLUE], [test "x$enable_geoclue" = xyes])

# Check Geoclue2 location provider
AC_MSG_CHECKING([whether to enable Geoclue2 location provider])
AC_ARG_ENABLE([geoclue2], [AC_HELP_STRING([--enable-geoclue2],
Expand All @@ -274,10 +249,10 @@ AS_IF([test "x$enable_geoclue2" != xno], [
])
AM_CONDITIONAL([ENABLE_GEOCLUE2], [test "x$enable_geoclue2" = xyes])

# Check CoreLocation (OSX) provider
# Check CoreLocation (macOS) provider
AC_MSG_CHECKING([whether to enable CoreLocation method])
AC_ARG_ENABLE([corelocation], [AC_HELP_STRING([--enable-corelocation],
[enable CoreLocation (OSX) provider])],
[enable CoreLocation (macOS) provider])],
[enable_corelocation=$enableval],[enable_corelocation=maybe])
AS_IF([test "x$enable_corelocation" != xno], [
AS_IF([test "x$have_corelocation_h" = xyes], [
Expand Down Expand Up @@ -388,13 +363,12 @@ echo "
DRM: ${enable_drm}
RANDR: ${enable_randr}
VidMode: ${enable_vidmode}
Quartz (OSX): ${enable_quartz}
Quartz (macOS): ${enable_quartz}
WinGDI (Windows): ${enable_wingdi}

Location providers:
Geoclue: ${enable_geoclue}
Geoclue2: ${enable_geoclue2}
CoreLocation (OSX) ${enable_corelocation}
Geoclue2: ${enable_geoclue2}
CoreLocation (macOS): ${enable_corelocation}

GUI: ${enable_gui}
Ubuntu icons: ${enable_ubuntu}
Expand Down
1 change: 0 additions & 1 deletion po/POTFILES.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ src/gamma-quartz.c
src/gamma-w32gdi.c
src/gamma-dummy.c

src/location-geoclue.c
src/location-geoclue2.c
src/location-corelocation.m
src/location-manual.c
Expand Down
2 changes: 1 addition & 1 deletion redshift.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ gamma=0.8
;gamma-day=0.8:0.7:0.8
;gamma-night=0.6

; Set the location-provider: 'geoclue', 'geoclue2', 'manual'
; Set the location-provider: 'geoclue2', 'manual'
; type 'redshift -l list' to see possible values.
; The location provider settings are in a different section.
location-provider=manual
Expand Down
23 changes: 7 additions & 16 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,24 @@ AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
bin_PROGRAMS = redshift

redshift_SOURCES = \
redshift.c redshift.h \
signals.c signals.h \
colorramp.c colorramp.h \
config-ini.c config-ini.h \
gamma-dummy.c gamma-dummy.h \
hooks.c hooks.h \
location-manual.c location-manual.h \
redshift.c redshift.h \
signals.c signals.h \
solar.c solar.h \
systemtime.c systemtime.h \
hooks.c hooks.h \
gamma-dummy.c gamma-dummy.h
systemtime.c systemtime.h

EXTRA_redshift_SOURCES = \
gamma-drm.c gamma-drm.h \
gamma-randr.c gamma-randr.h \
gamma-vidmode.c gamma-vidmode.h \
gamma-quartz.c gamma-quartz.h \
gamma-w32gdi.c gamma-w32gdi.h \
location-geoclue.c location-geoclue.h \
location-geoclue2.c location-geoclue2.h \
location-corelocation.m location-corelocation.h \
windows/appicon.rc \
windows/versioninfo.rc

Expand Down Expand Up @@ -69,16 +70,6 @@ redshift_LDADD += -lgdi32
endif


if ENABLE_GEOCLUE
redshift_SOURCES += location-geoclue.c location-geoclue.h
AM_CFLAGS += \
$(GEOCLUE_CFLAGS) $(GEOCLUE_LIBS) \
$(GLIB_CFLAGS) $(GLIB_LIBS)
redshift_LDADD += \
$(GEOCLUE_LIBS) $(GEOCLUE_CFLAGS)
$(GLIB_LIBS) $(GLIB_CFLAGS)
endif

if ENABLE_GEOCLUE2
redshift_SOURCES += location-geoclue2.c location-geoclue2.h
AM_CFLAGS += \
Expand Down
Loading

0 comments on commit 4adb93a

Please sign in to comment.