fix detection of liblocation...
authorRodrigo Linfati <rodrigo@linfati.cl>
Mon, 4 Jan 2010 12:35:20 +0000 (13:35 +0100)
committerRodrigo Linfati <rodrigo@linfati.cl>
Mon, 4 Jan 2010 12:35:20 +0000 (13:35 +0100)
debian/control
googlelatitude.pro
src/gps.cpp
src/gps.h
src/gpsfake.h

index d5c9782..b551d78 100644 (file)
@@ -2,7 +2,8 @@ Source: googlelatitude
 Section: user/navigation
 Priority: optional
 Maintainer: Rodrigo Linfati <rodrigo@linfati.cl>
 Section: user/navigation
 Priority: optional
 Maintainer: Rodrigo Linfati <rodrigo@linfati.cl>
-Build-Depends: debhelper (>= 5), libqt4-maemo5-dev, liblocation-dev, libgconf2-dev
+Build-Depends: debhelper (>= 5), libqt4-maemo5-dev, libgconf2-dev, liblocation-dev
+#Build-Depends: debhelper (>= 5), libqt4-dev, libqt4-phonon, libsqlite3-0, liblocation-dev, libgconf2-dev
 #Build-Depends: debhelper (>= 5), libqt4-dev 
 Standards-Version: 3.7.2
 Homepage: http://googlelatitude.garage.maemo.org/
 #Build-Depends: debhelper (>= 5), libqt4-dev 
 Standards-Version: 3.7.2
 Homepage: http://googlelatitude.garage.maemo.org/
@@ -10,6 +11,8 @@ Homepage: http://googlelatitude.garage.maemo.org/
 Package: googlelatitude
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Package: googlelatitude
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
+#Depends: ${shlibs:Depends}, ${misc:Depends}, libqt4-phonon, libsqlite3-0
+#Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: Google Latitude Updater
  A Google Latitude Updater in QT4.
  Features:
 Description: Google Latitude Updater
  A Google Latitude Updater in QT4.
  Features:
index a667d92..e8f8bd5 100644 (file)
@@ -15,7 +15,10 @@ LIBS        +=
 DEFINES     +=
 CONFIG      += link_pkgconfig
 PKGCONFIG   += glib-2.0 liblocation
 DEFINES     +=
 CONFIG      += link_pkgconfig
 PKGCONFIG   += glib-2.0 liblocation
-
+exists(/usr/lib/liblocation.so) {
+    DEFINES += LIBLOCATION
+    message(liblocation found)
+}
 install_app.commands = $(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)/usr/bin/$(QMAKE_TARGET)
 install_dsk.commands = $(INSTALL_FILE) data/$(QMAKE_TARGET).desktop $(DESTDIR)/usr/share/applications/hildon/$(QMAKE_TARGET).desktop
 install.depends = $(TARGET) install_app install_dsk
 install_app.commands = $(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)/usr/bin/$(QMAKE_TARGET)
 install_dsk.commands = $(INSTALL_FILE) data/$(QMAKE_TARGET).desktop $(DESTDIR)/usr/share/applications/hildon/$(QMAKE_TARGET).desktop
 install.depends = $(TARGET) install_app install_dsk
index 5c52eb9..cf55ed0 100644 (file)
@@ -1,6 +1,6 @@
 #include "gps.h"
 
 #include "gps.h"
 
-#ifdef Q_WS_MAEMO_5
+#ifdef LIBLOCATION
 
 GpsMaemo5::GpsMaemo5(QObject *parent) : QObject(parent) {
     latitude = 0;
 
 GpsMaemo5::GpsMaemo5(QObject *parent) : QObject(parent) {
     latitude = 0;
index 3f9dde0..45c9cbb 100644 (file)
--- a/src/gps.h
+++ b/src/gps.h
@@ -1,9 +1,9 @@
 #ifndef GPS_H
 #define GPS_H
 
 #ifndef GPS_H
 #define GPS_H
 
-#include <QObject>
+#ifdef LIBLOCATION
 
 
-#ifdef Q_WS_MAEMO_5
+#include <QObject>
 
 extern "C" {
 #include <location/location-gps-device.h>
 
 extern "C" {
 #include <location/location-gps-device.h>
index 9d98a53..0a8cdad 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef GPSFAKE_H
 #define GPSFAKE_H
 
 #ifndef GPSFAKE_H
 #define GPSFAKE_H
 
-#include <QObject>
+#ifndef LIBLOCATION
 
 
-#ifndef Q_WS_MAEMO_5
+#include <QObject>
 
 class GpsMaemo5 : public QObject {
     Q_OBJECT
 
 class GpsMaemo5 : public QObject {
     Q_OBJECT