2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2010-11-02 20:32:47 +01:00
|
|
|
#
|
|
|
|
# gpsd
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-02-26 00:16:09 +01:00
|
|
|
|
2013-04-30 23:08:54 +02:00
|
|
|
GPSD_VERSION = 3.9
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SITE = http://download-mirror.savannah.gnu.org/releases/gpsd/
|
|
|
|
GPSD_LICENSE = BSD-3c
|
|
|
|
GPSD_LICENSE_FILES = COPYING
|
2010-11-02 20:32:47 +01:00
|
|
|
GPSD_INSTALL_STAGING = YES
|
2012-07-23 21:29:36 +02:00
|
|
|
|
2012-10-22 17:47:52 +02:00
|
|
|
GPSD_DEPENDENCIES = host-scons host-pkgconf
|
2012-07-23 21:29:36 +02:00
|
|
|
|
|
|
|
GPSD_LDFLAGS = $(TARGET_LDFLAGS)
|
|
|
|
|
|
|
|
GPSD_SCONS_ENV = $(TARGET_CONFIGURE_OPTS)
|
|
|
|
|
|
|
|
GPSD_SCONS_OPTS = \
|
|
|
|
arch=$(ARCH)\
|
2012-07-25 00:01:55 +02:00
|
|
|
prefix=/usr\
|
2012-07-23 21:29:36 +02:00
|
|
|
chrpath=no\
|
2012-07-25 00:01:55 +02:00
|
|
|
sysroot=$(STAGING_DIR)\
|
2012-07-25 18:24:05 +02:00
|
|
|
strip=no\
|
|
|
|
python=no
|
2012-07-23 21:29:36 +02:00
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_NCURSES),y)
|
|
|
|
GPSD_DEPENDENCIES += ncurses
|
|
|
|
else
|
|
|
|
GPSD_SCONS_OPTS += ncurses=no
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Disable IPv6, if we don't support it
|
|
|
|
ifneq ($(BR2_INET_IPV6),y)
|
|
|
|
GPSD_SCONS_OPTS += ipv6=no
|
|
|
|
endif
|
2010-11-02 20:32:47 +01:00
|
|
|
|
|
|
|
# Build libgpsmm if we've got C++
|
|
|
|
ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_LDFLAGS += -lstdc++
|
|
|
|
GPSD_SCONS_OPTS += libgpsmm=yes
|
2010-11-02 20:32:47 +01:00
|
|
|
else
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += libgpsmm=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
|
2010-11-15 19:32:03 +01:00
|
|
|
# Enable or disable Qt binding
|
|
|
|
ifeq ($(BR2_PACKAGE_QT_NETWORK),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_ENV += QMAKE="$(QT_QMAKE)"
|
2012-10-22 17:47:52 +02:00
|
|
|
GPSD_DEPENDENCIES += qt host-pkgconf
|
2010-11-15 19:32:03 +01:00
|
|
|
else
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += libQgpsmm=no
|
2010-11-15 19:32:03 +01:00
|
|
|
endif
|
|
|
|
|
2010-11-02 20:32:47 +01:00
|
|
|
# If libusb is available build it before so the package can use it
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBUSB),y)
|
|
|
|
GPSD_DEPENDENCIES += libusb
|
2012-07-23 21:29:36 +02:00
|
|
|
else
|
|
|
|
GPSD_SCONS_OPTS += usb=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
|
2012-07-23 21:29:36 +02:00
|
|
|
# If bluetooth is available build it before so the package can use it
|
|
|
|
ifeq ($(BR2_PACKAGE_BLUEZ_UTILS),y)
|
|
|
|
GPSD_DEPENDENCIES += bluez_utils
|
|
|
|
else
|
|
|
|
GPSD_SCONS_OPTS += bluez=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
|
2012-07-23 21:29:36 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_DBUS_GLIB),y)
|
|
|
|
GPSD_SCONS_OPTS += dbus_export=yes
|
|
|
|
GPSD_DEPENDENCIES += dbus-glib
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Protocol support
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_ASHTECH),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += ashtech=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_AIVDM),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += aivdm=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_EARTHMATE),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += earthmate=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_EVERMORE),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += evermore=no
|
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_FURY),y)
|
|
|
|
GPSD_SCONS_OPTS += fury=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_FV18),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += fv18=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_GARMIN),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += garmin=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
2011-11-09 09:38:41 +01:00
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_GARMIN_SIMPLE_TXT),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += garmintxt=no
|
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_GEOSTAR),y)
|
|
|
|
GPSD_SCONS_OPTS += geostar=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_GPSCLOCK),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += gpsclock=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_ITRAX),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += itrax=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_MTK3301),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += mtk3301=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_NMEA),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += nmea=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_NTRIP),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += ntrip=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_NAVCOM),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += navcom=no
|
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_NMEA2000),y)
|
|
|
|
GPSD_SCONS_OPTS += nmea2000=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_OCEANSERVER),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += oceanserver=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_ONCORE),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += oncore=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_RTCM104V2),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += rtcm104v2=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_RTCM104V3),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += rtcm104v3=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_SIRF),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += sirf=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_SUPERSTAR2),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += superstar2=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_TRIMBLE_TSIP),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += tsip=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_TRIPMATE),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += tripmate=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
2012-07-23 21:29:36 +02:00
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_TRUE_NORTH),y)
|
|
|
|
GPSD_SCONS_OPTS += tnt=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_UBX),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += ubx=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Features
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_NTP_SHM),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += ntpshm=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_PPS),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += pps=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_GPSD_SQUELCH),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += squelch=yes
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_RECONFIGURE),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += reconfigure=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_CONTROLSEND),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += controlsend=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_OLDSTYLE),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += oldstyle=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_GPSD_PROFILING),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += profiling=yes
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_CLIENT_DEBUG),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += clientdebug=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_GPSD_USER),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += gpsd_user=$(BR2_PACKAGE_GPSD_USER_VALUE)
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_GPSD_GROUP),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += gpsd_group=$(BR2_PACKAGE_GPSD_GROUP_VALUE)
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_GPSD_FIXED_PORT_SPEED),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += fixed_port_speed=$(BR2_PACKAGE_GPSD_FIXED_PORT_SPEED_VALUE)
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_GPSD_MAX_CLIENT),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += limited_max_clients=$(BR2_PACKAGE_GPSD_MAX_CLIENT_VALUE)
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_GPSD_MAX_DEV),y)
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_OPTS += limited_max_devices=$(BR2_PACKAGE_GPSD_MAX_DEV_VALUE)
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_SCONS_ENV += LDFLAGS="$(GPSD_LDFLAGS)"
|
|
|
|
|
|
|
|
define GPSD_BUILD_CMDS
|
|
|
|
(cd $(@D); \
|
|
|
|
$(GPSD_SCONS_ENV) \
|
|
|
|
$(SCONS) \
|
|
|
|
$(GPSD_SCONS_OPTS))
|
2010-11-02 20:32:47 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define GPSD_INSTALL_TARGET_CMDS
|
2012-07-23 21:29:36 +02:00
|
|
|
(cd $(@D); \
|
|
|
|
$(GPSD_SCONS_ENV) \
|
2012-07-25 00:01:55 +02:00
|
|
|
DESTDIR=$(TARGET_DIR) \
|
2012-07-23 21:29:36 +02:00
|
|
|
$(SCONS) \
|
|
|
|
$(GPSD_SCONS_OPTS) \
|
|
|
|
install)
|
2010-11-02 20:32:47 +01:00
|
|
|
if [ ! -f $(TARGET_DIR)/etc/init.d/S50gpsd ]; then \
|
|
|
|
$(INSTALL) -m 0755 -D package/gpsd/S50gpsd $(TARGET_DIR)/etc/init.d/S50gpsd; \
|
|
|
|
$(SED) 's,^DEVICES=.*,DEVICES=$(BR2_PACKAGE_GPSD_DEVICES),' $(TARGET_DIR)/etc/init.d/S50gpsd; \
|
|
|
|
fi
|
|
|
|
endef
|
|
|
|
|
2012-07-23 21:29:36 +02:00
|
|
|
define GPSD_INSTALL_STAGING_CMDS
|
|
|
|
(cd $(@D); \
|
|
|
|
$(GPSD_SCONS_ENV) \
|
2012-07-25 00:01:55 +02:00
|
|
|
DESTDIR=$(STAGING_DIR) \
|
2012-07-23 21:29:36 +02:00
|
|
|
$(SCONS) \
|
|
|
|
$(GPSD_SCONS_OPTS) \
|
|
|
|
install)
|
2010-11-02 20:32:47 +01:00
|
|
|
endef
|
|
|
|
|
2013-06-12 19:52:35 +02:00
|
|
|
ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y)
|
|
|
|
define GPSD_INSTALL_UDEV_RULES
|
|
|
|
(cd $(@D); \
|
|
|
|
$(GPSD_SCONS_ENV) \
|
|
|
|
DESTDIR=$(TARGET_DIR) \
|
|
|
|
$(SCONS) \
|
|
|
|
$(GPSD_SCONS_OPTS) \
|
|
|
|
udev-install)
|
|
|
|
endef
|
|
|
|
|
|
|
|
GPSD_POST_INSTALL_TARGET_HOOKS += GPSD_INSTALL_UDEV_RULES
|
|
|
|
endif
|
|
|
|
|
2012-07-23 21:29:36 +02:00
|
|
|
$(eval $(generic-package))
|