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
|
|
|
|
2015-06-04 17:05:49 +02:00
|
|
|
GPSD_VERSION = 3.15
|
2014-08-25 11:40:23 +02:00
|
|
|
GPSD_SITE = http://download-mirror.savannah.gnu.org/releases/gpsd
|
2012-07-23 21:29:36 +02:00
|
|
|
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)
|
2015-11-22 13:24:00 +01:00
|
|
|
GPSD_CFLAGS = $(TARGET_CFLAGS)
|
2012-07-23 21:29:36 +02:00
|
|
|
|
|
|
|
GPSD_SCONS_ENV = $(TARGET_CONFIGURE_OPTS)
|
|
|
|
|
|
|
|
GPSD_SCONS_OPTS = \
|
|
|
|
arch=$(ARCH)\
|
2012-07-25 00:01:55 +02:00
|
|
|
prefix=/usr\
|
|
|
|
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)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_DEPENDENCIES += ncurses
|
2012-07-23 21:29:36 +02:00
|
|
|
else
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += ncurses=no
|
2012-07-23 21:29:36 +02:00
|
|
|
endif
|
|
|
|
|
2010-11-02 20:32:47 +01:00
|
|
|
# Build libgpsmm if we've got C++
|
|
|
|
ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_LDFLAGS += -lstdc++
|
|
|
|
GPSD_SCONS_OPTS += libgpsmm=yes
|
2010-11-02 20:32:47 +01:00
|
|
|
else
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += libgpsmm=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
|
2015-11-22 13:24:00 +01:00
|
|
|
# prevents from triggering GCC ICE
|
2015-11-22 16:43:24 +01:00
|
|
|
# A bug was reported to the gcc bug tracker:
|
|
|
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485
|
2015-11-22 13:24:00 +01:00
|
|
|
ifeq ($(BR2_microblaze),y)
|
2015-11-22 16:43:24 +01:00
|
|
|
GPSD_CFLAGS += -fno-expensive-optimizations -fno-schedule-insns
|
2015-11-22 13:24:00 +01:00
|
|
|
endif
|
|
|
|
|
2010-11-15 19:32:03 +01:00
|
|
|
# Enable or disable Qt binding
|
|
|
|
ifeq ($(BR2_PACKAGE_QT_NETWORK),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_ENV += QMAKE="$(QT_QMAKE)"
|
|
|
|
GPSD_DEPENDENCIES += qt
|
2010-11-15 19:32:03 +01:00
|
|
|
else
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += qt=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)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_DEPENDENCIES += libusb
|
2012-07-23 21:29:36 +02:00
|
|
|
else
|
2015-03-31 09:21:57 +02:00
|
|
|
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)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_DEPENDENCIES += bluez_utils
|
2012-07-23 21:29:36 +02:00
|
|
|
else
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += bluez=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
|
2015-11-27 17:25:57 +01:00
|
|
|
# If pps-tools is available, build it before so the package can use it
|
|
|
|
# (HAVE_SYS_TIMEPPS_H).
|
|
|
|
ifeq ($(BR2_PACKAGE_PPS_TOOLS),y)
|
|
|
|
GPSD_DEPENDENCIES += pps-tools
|
|
|
|
endif
|
|
|
|
|
2012-07-23 21:29:36 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_DBUS_GLIB),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
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)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += ashtech=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_AIVDM),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += aivdm=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_EARTHMATE),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += earthmate=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_EVERMORE),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += evermore=no
|
2012-07-23 21:29:36 +02:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_FURY),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += fury=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_FV18),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += fv18=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_GARMIN),y)
|
2015-03-31 09:21:57 +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)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += garmintxt=no
|
2012-07-23 21:29:36 +02:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_GEOSTAR),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += geostar=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_GPSCLOCK),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += gpsclock=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_ITRAX),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += itrax=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_MTK3301),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += mtk3301=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_NMEA),y)
|
2015-11-05 19:41:52 +01:00
|
|
|
GPSD_SCONS_OPTS += nmea0183=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_NTRIP),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += ntrip=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_NAVCOM),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += navcom=no
|
2012-07-23 21:29:36 +02:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_NMEA2000),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += nmea2000=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_OCEANSERVER),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += oceanserver=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_ONCORE),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += oncore=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_RTCM104V2),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += rtcm104v2=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_RTCM104V3),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += rtcm104v3=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_SIRF),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += sirf=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_SUPERSTAR2),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += superstar2=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_TRIMBLE_TSIP),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += tsip=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_TRIPMATE),y)
|
2015-03-31 09:21:57 +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)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += tnt=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_UBX),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += ublox=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Features
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_NTP_SHM),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += ntpshm=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_PPS),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += pps=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_GPSD_SQUELCH),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += squelch=yes
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_RECONFIGURE),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += reconfigure=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_CONTROLSEND),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += controlsend=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_OLDSTYLE),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += oldstyle=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_GPSD_PROFILING),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += profiling=yes
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_CLIENT_DEBUG),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += clientdebug=no
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_GPSD_USER),y)
|
2015-03-31 09:21:57 +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)
|
2015-03-31 09:21:57 +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)
|
2015-03-31 09:21:57 +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)
|
2015-03-31 09:21:57 +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)
|
2015-03-31 09:21:57 +02:00
|
|
|
GPSD_SCONS_OPTS += limited_max_devices=$(BR2_PACKAGE_GPSD_MAX_DEV_VALUE)
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
|
2015-11-22 13:24:00 +01:00
|
|
|
GPSD_SCONS_ENV += LDFLAGS="$(GPSD_LDFLAGS)" CFLAGS="$(GPSD_CFLAGS)"
|
2012-07-23 21:29:36 +02:00
|
|
|
|
|
|
|
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)
|
2014-11-30 15:18:07 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define GPSD_INSTALL_INIT_SYSV
|
|
|
|
$(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
|
2010-11-02 20:32:47 +01:00
|
|
|
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
|
|
|
|
|
2015-11-05 19:41:53 +01:00
|
|
|
# After installing the udev rule, make it writable so that this
|
|
|
|
# package can be re-built/re-installed.
|
2014-02-07 14:21:33 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
|
2013-06-12 19:52:35 +02:00
|
|
|
define GPSD_INSTALL_UDEV_RULES
|
|
|
|
(cd $(@D); \
|
|
|
|
$(GPSD_SCONS_ENV) \
|
|
|
|
DESTDIR=$(TARGET_DIR) \
|
|
|
|
$(SCONS) \
|
|
|
|
$(GPSD_SCONS_OPTS) \
|
|
|
|
udev-install)
|
2015-11-05 19:41:53 +01:00
|
|
|
chmod u+w $(TARGET_DIR)/lib/udev/rules.d/25-gpsd.rules
|
2013-06-12 19:52:35 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
GPSD_POST_INSTALL_TARGET_HOOKS += GPSD_INSTALL_UDEV_RULES
|
|
|
|
endif
|
|
|
|
|
2012-07-23 21:29:36 +02:00
|
|
|
$(eval $(generic-package))
|