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
|
|
|
|
2020-11-01 12:47:11 +01:00
|
|
|
GPSD_VERSION = 3.21
|
2014-08-25 11:40:23 +02:00
|
|
|
GPSD_SITE = http://download-mirror.savannah.gnu.org/releases/gpsd
|
2019-08-04 15:44:31 +02:00
|
|
|
GPSD_LICENSE = BSD-2-Clause
|
2012-07-23 21:29:36 +02:00
|
|
|
GPSD_LICENSE_FILES = COPYING
|
2021-03-21 10:15:37 +01:00
|
|
|
GPSD_CPE_ID_VENDOR = gpsd_project
|
2021-07-26 10:34:23 +02:00
|
|
|
GPSD_SELINUX_MODULES = gpsd
|
2010-11-02 20:32:47 +01:00
|
|
|
GPSD_INSTALL_STAGING = YES
|
2012-07-23 21:29:36 +02:00
|
|
|
|
2019-10-27 15:35:00 +01:00
|
|
|
GPSD_DEPENDENCIES = host-python3 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)
|
2021-08-03 14:07:14 +02:00
|
|
|
GPSD_CXXFLAGS = $(TARGET_CXXFLAGS)
|
2012-07-23 21:29:36 +02:00
|
|
|
|
|
|
|
GPSD_SCONS_ENV = $(TARGET_CONFIGURE_OPTS)
|
|
|
|
|
|
|
|
GPSD_SCONS_OPTS = \
|
2019-08-06 07:19:19 +02:00
|
|
|
arch=$(ARCH) \
|
2018-10-27 22:54:15 +02:00
|
|
|
manbuild=no \
|
2019-08-06 07:19:19 +02:00
|
|
|
prefix=/usr \
|
|
|
|
sysroot=$(STAGING_DIR) \
|
|
|
|
strip=no \
|
2019-08-06 07:19:20 +02:00
|
|
|
qt=no \
|
2019-05-30 01:02:41 +02:00
|
|
|
systemd=$(if $(BR2_INIT_SYSTEMD),yes,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++
|
2016-11-25 12:00:42 +01:00
|
|
|
GPSD_CFLAGS += -std=gnu++98
|
|
|
|
GPSD_CXXFLAGS += -std=gnu++98
|
2015-03-31 09:21:57 +02:00
|
|
|
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
|
|
|
|
|
2019-06-14 23:03:33 +02:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
|
2017-08-13 10:59:26 +02:00
|
|
|
GPSD_CFLAGS += -O0
|
2021-08-03 14:07:14 +02:00
|
|
|
GPSD_CXXFLAGS += -O0
|
2015-11-22 13:24:00 +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
|
2020-01-12 23:08:39 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS),y)
|
2020-01-11 10:18:32 +01:00
|
|
|
GPSD_DEPENDENCIES += bluez5_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
|
2018-10-07 21:29:45 +02:00
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_GREIS),y)
|
|
|
|
GPSD_SCONS_OPTS += greis=no
|
|
|
|
endif
|
2018-02-03 22:40:53 +01:00
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_ISYNC),y)
|
|
|
|
GPSD_SCONS_OPTS += isync=no
|
|
|
|
endif
|
2010-11-02 20:32:47 +01:00
|
|
|
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
|
2019-05-25 16:17:26 +02:00
|
|
|
ifneq ($(BR2_PACKAGE_GPSD_SKYTRAQ),y)
|
|
|
|
GPSD_SCONS_OPTS += skytraq=no
|
|
|
|
endif
|
2010-11-02 20:32:47 +01:00
|
|
|
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
|
|
|
|
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_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_MAX_CLIENT),y)
|
2019-05-25 15:52:41 +02:00
|
|
|
GPSD_SCONS_OPTS += max_clients=$(BR2_PACKAGE_GPSD_MAX_CLIENT_VALUE)
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_GPSD_MAX_DEV),y)
|
2019-05-25 15:52:41 +02:00
|
|
|
GPSD_SCONS_OPTS += max_devices=$(BR2_PACKAGE_GPSD_MAX_DEV_VALUE)
|
2010-11-02 20:32:47 +01:00
|
|
|
endif
|
|
|
|
|
2020-11-01 12:47:12 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
|
|
|
GPSD_SCONS_OPTS += \
|
|
|
|
python=yes \
|
|
|
|
python_libdir="/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages"
|
|
|
|
else ifeq ($(BR2_PACKAGE_PYTHON),y)
|
|
|
|
GPSD_SCONS_OPTS += \
|
|
|
|
python=yes \
|
|
|
|
python_libdir="/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages"
|
|
|
|
else
|
|
|
|
GPSD_SCONS_OPTS += python=no
|
|
|
|
endif
|
|
|
|
|
2020-06-21 22:41:32 +02:00
|
|
|
GPSD_SCONS_ENV += \
|
|
|
|
LDFLAGS="$(GPSD_LDFLAGS)" \
|
|
|
|
CFLAGS="$(GPSD_CFLAGS)" \
|
2021-08-03 14:07:14 +02:00
|
|
|
CCFLAGS="$(GPSD_CFLAGS)" \
|
|
|
|
CXXFLAGS="$(GPSD_CXXFLAGS)"
|
2012-07-23 21:29:36 +02:00
|
|
|
|
|
|
|
define GPSD_BUILD_CMDS
|
|
|
|
(cd $(@D); \
|
|
|
|
$(GPSD_SCONS_ENV) \
|
2019-10-27 15:35:00 +01:00
|
|
|
$(HOST_DIR)/bin/python3 $(SCONS) \
|
2012-07-23 21:29:36 +02:00
|
|
|
$(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) \
|
2019-10-27 15:35:00 +01:00
|
|
|
$(HOST_DIR)/bin/python3 $(SCONS) \
|
2012-07-23 21:29:36 +02:00
|
|
|
$(GPSD_SCONS_OPTS) \
|
2019-05-30 01:02:41 +02:00
|
|
|
$(if $(BR2_PACKAGE_HAS_UDEV),udev-install,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
|
|
|
|
|
2019-05-30 01:02:41 +02:00
|
|
|
# systemd unit files are installed automatically, but need to update the
|
|
|
|
# /usr/local path references in the provided files to /usr.
|
|
|
|
define GPSD_INSTALL_INIT_SYSTEMD
|
|
|
|
$(SED) 's%/usr/local%/usr%' \
|
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/gpsd.service \
|
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/gpsdctl@.service
|
|
|
|
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) \
|
2019-10-27 15:35:00 +01:00
|
|
|
$(HOST_DIR)/bin/python3 $(SCONS) \
|
2012-07-23 21:29:36 +02:00
|
|
|
$(GPSD_SCONS_OPTS) \
|
|
|
|
install)
|
2010-11-02 20:32:47 +01:00
|
|
|
endef
|
|
|
|
|
2019-05-30 01:02:41 +02:00
|
|
|
# After the udev rule is installed, make it writable so that this
|
2015-11-05 19:41:53 +01:00
|
|
|
# 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
|
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))
|