1 ################################################################################
5 ################################################################################
8 GPSD_SITE
= http
://download-mirror.savannah.gnu.org
/releases
/gpsd
10 GPSD_LICENSE_FILES
= COPYING
11 GPSD_INSTALL_STAGING
= YES
13 GPSD_DEPENDENCIES
= host-scons host-pkgconf
15 GPSD_LDFLAGS
= $(TARGET_LDFLAGS
)
16 GPSD_CFLAGS
= $(TARGET_CFLAGS
)
18 GPSD_SCONS_ENV
= $(TARGET_CONFIGURE_OPTS
)
23 sysroot
=$(STAGING_DIR
)\
27 ifeq ($(BR2_PACKAGE_NCURSES
),y
)
28 GPSD_DEPENDENCIES
+= ncurses
30 GPSD_SCONS_OPTS
+= ncurses
=no
33 # Build libgpsmm if we've got C++
34 ifeq ($(BR2_INSTALL_LIBSTDCPP
),y
)
35 GPSD_LDFLAGS
+= -lstdc
++
36 GPSD_CFLAGS
+= -std
=gnu
++98
37 GPSD_CXXFLAGS
+= -std
=gnu
++98
38 GPSD_SCONS_OPTS
+= libgpsmm
=yes
40 GPSD_SCONS_OPTS
+= libgpsmm
=no
43 # prevents from triggering GCC ICE
44 # A bug was reported to the gcc bug tracker:
45 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485
46 ifeq ($(BR2_microblaze
),y
)
47 GPSD_CFLAGS
+= -fno-expensive-optimizations
-fno-schedule-insns
50 # Enable or disable Qt binding
51 ifeq ($(BR2_PACKAGE_QT_NETWORK
),y
)
52 GPSD_SCONS_ENV
+= QMAKE
="$(QT_QMAKE)"
53 GPSD_DEPENDENCIES
+= qt
55 GPSD_SCONS_OPTS
+= qt
=no
58 # If libusb is available build it before so the package can use it
59 ifeq ($(BR2_PACKAGE_LIBUSB
),y
)
60 GPSD_DEPENDENCIES
+= libusb
62 GPSD_SCONS_OPTS
+= usb
=no
65 # If bluetooth is available build it before so the package can use it
66 ifeq ($(BR2_PACKAGE_BLUEZ_UTILS
),y
)
67 GPSD_DEPENDENCIES
+= bluez_utils
69 GPSD_SCONS_OPTS
+= bluez
=no
72 # If pps-tools is available, build it before so the package can use it
73 # (HAVE_SYS_TIMEPPS_H).
74 ifeq ($(BR2_PACKAGE_PPS_TOOLS
),y
)
75 GPSD_DEPENDENCIES
+= pps-tools
78 ifeq ($(BR2_PACKAGE_DBUS_GLIB
),y
)
79 GPSD_SCONS_OPTS
+= dbus_export
=yes
80 GPSD_DEPENDENCIES
+= dbus-glib
84 ifneq ($(BR2_PACKAGE_GPSD_ASHTECH
),y
)
85 GPSD_SCONS_OPTS
+= ashtech
=no
87 ifneq ($(BR2_PACKAGE_GPSD_AIVDM
),y
)
88 GPSD_SCONS_OPTS
+= aivdm
=no
90 ifneq ($(BR2_PACKAGE_GPSD_EARTHMATE
),y
)
91 GPSD_SCONS_OPTS
+= earthmate
=no
93 ifneq ($(BR2_PACKAGE_GPSD_EVERMORE
),y
)
94 GPSD_SCONS_OPTS
+= evermore
=no
96 ifneq ($(BR2_PACKAGE_GPSD_FURY
),y
)
97 GPSD_SCONS_OPTS
+= fury
=no
99 ifneq ($(BR2_PACKAGE_GPSD_FV18
),y
)
100 GPSD_SCONS_OPTS
+= fv18
=no
102 ifneq ($(BR2_PACKAGE_GPSD_GARMIN
),y
)
103 GPSD_SCONS_OPTS
+= garmin
=no
105 ifneq ($(BR2_PACKAGE_GPSD_GARMIN_SIMPLE_TXT
),y
)
106 GPSD_SCONS_OPTS
+= garmintxt
=no
108 ifneq ($(BR2_PACKAGE_GPSD_GEOSTAR
),y
)
109 GPSD_SCONS_OPTS
+= geostar
=no
111 ifneq ($(BR2_PACKAGE_GPSD_GPSCLOCK
),y
)
112 GPSD_SCONS_OPTS
+= gpsclock
=no
114 ifneq ($(BR2_PACKAGE_GPSD_ITRAX
),y
)
115 GPSD_SCONS_OPTS
+= itrax
=no
117 ifneq ($(BR2_PACKAGE_GPSD_MTK3301
),y
)
118 GPSD_SCONS_OPTS
+= mtk3301
=no
120 ifneq ($(BR2_PACKAGE_GPSD_NMEA
),y
)
121 GPSD_SCONS_OPTS
+= nmea0183
=no
123 ifneq ($(BR2_PACKAGE_GPSD_NTRIP
),y
)
124 GPSD_SCONS_OPTS
+= ntrip
=no
126 ifneq ($(BR2_PACKAGE_GPSD_NAVCOM
),y
)
127 GPSD_SCONS_OPTS
+= navcom
=no
129 ifneq ($(BR2_PACKAGE_GPSD_NMEA2000
),y
)
130 GPSD_SCONS_OPTS
+= nmea2000
=no
132 ifneq ($(BR2_PACKAGE_GPSD_OCEANSERVER
),y
)
133 GPSD_SCONS_OPTS
+= oceanserver
=no
135 ifneq ($(BR2_PACKAGE_GPSD_ONCORE
),y
)
136 GPSD_SCONS_OPTS
+= oncore
=no
138 ifneq ($(BR2_PACKAGE_GPSD_RTCM104V2
),y
)
139 GPSD_SCONS_OPTS
+= rtcm104v2
=no
141 ifneq ($(BR2_PACKAGE_GPSD_RTCM104V3
),y
)
142 GPSD_SCONS_OPTS
+= rtcm104v3
=no
144 ifneq ($(BR2_PACKAGE_GPSD_SIRF
),y
)
145 GPSD_SCONS_OPTS
+= sirf
=no
147 ifneq ($(BR2_PACKAGE_GPSD_SUPERSTAR2
),y
)
148 GPSD_SCONS_OPTS
+= superstar2
=no
150 ifneq ($(BR2_PACKAGE_GPSD_TRIMBLE_TSIP
),y
)
151 GPSD_SCONS_OPTS
+= tsip
=no
153 ifneq ($(BR2_PACKAGE_GPSD_TRIPMATE
),y
)
154 GPSD_SCONS_OPTS
+= tripmate
=no
156 ifneq ($(BR2_PACKAGE_GPSD_TRUE_NORTH
),y
)
157 GPSD_SCONS_OPTS
+= tnt
=no
159 ifneq ($(BR2_PACKAGE_GPSD_UBX
),y
)
160 GPSD_SCONS_OPTS
+= ublox
=no
164 ifneq ($(BR2_PACKAGE_GPSD_NTP_SHM
),y
)
165 GPSD_SCONS_OPTS
+= ntpshm
=no
167 ifneq ($(BR2_PACKAGE_GPSD_PPS
),y
)
168 GPSD_SCONS_OPTS
+= pps
=no
170 ifeq ($(BR2_PACKAGE_GPSD_SQUELCH
),y
)
171 GPSD_SCONS_OPTS
+= squelch
=yes
173 ifneq ($(BR2_PACKAGE_GPSD_RECONFIGURE
),y
)
174 GPSD_SCONS_OPTS
+= reconfigure
=no
176 ifneq ($(BR2_PACKAGE_GPSD_CONTROLSEND
),y
)
177 GPSD_SCONS_OPTS
+= controlsend
=no
179 ifneq ($(BR2_PACKAGE_GPSD_OLDSTYLE
),y
)
180 GPSD_SCONS_OPTS
+= oldstyle
=no
182 ifeq ($(BR2_PACKAGE_GPSD_PROFILING
),y
)
183 GPSD_SCONS_OPTS
+= profiling
=yes
185 ifneq ($(BR2_PACKAGE_GPSD_CLIENT_DEBUG
),y
)
186 GPSD_SCONS_OPTS
+= clientdebug
=no
188 ifeq ($(BR2_PACKAGE_GPSD_USER
),y
)
189 GPSD_SCONS_OPTS
+= gpsd_user
=$(BR2_PACKAGE_GPSD_USER_VALUE
)
191 ifeq ($(BR2_PACKAGE_GPSD_GROUP
),y
)
192 GPSD_SCONS_OPTS
+= gpsd_group
=$(BR2_PACKAGE_GPSD_GROUP_VALUE
)
194 ifeq ($(BR2_PACKAGE_GPSD_FIXED_PORT_SPEED
),y
)
195 GPSD_SCONS_OPTS
+= fixed_port_speed
=$(BR2_PACKAGE_GPSD_FIXED_PORT_SPEED_VALUE
)
197 ifeq ($(BR2_PACKAGE_GPSD_MAX_CLIENT
),y
)
198 GPSD_SCONS_OPTS
+= limited_max_clients
=$(BR2_PACKAGE_GPSD_MAX_CLIENT_VALUE
)
200 ifeq ($(BR2_PACKAGE_GPSD_MAX_DEV
),y
)
201 GPSD_SCONS_OPTS
+= limited_max_devices
=$(BR2_PACKAGE_GPSD_MAX_DEV_VALUE
)
204 GPSD_SCONS_ENV
+= LDFLAGS
="$(GPSD_LDFLAGS)" CFLAGS
="$(GPSD_CFLAGS)"
206 define GPSD_BUILD_CMDS
213 define GPSD_INSTALL_TARGET_CMDS
216 DESTDIR
=$(TARGET_DIR
) \
222 define GPSD_INSTALL_INIT_SYSV
223 $(INSTALL
) -m
0755 -D package
/gpsd
/S50gpsd
$(TARGET_DIR
)/etc
/init.d
/S50gpsd
224 $(SED
) 's,^DEVICES=.*,DEVICES=$(BR2_PACKAGE_GPSD_DEVICES),' $(TARGET_DIR
)/etc
/init.d
/S50gpsd
227 define GPSD_INSTALL_STAGING_CMDS
230 DESTDIR
=$(STAGING_DIR
) \
236 # After installing the udev rule, make it writable so that this
237 # package can be re-built/re-installed.
238 ifeq ($(BR2_PACKAGE_HAS_UDEV
),y
)
239 define GPSD_INSTALL_UDEV_RULES
242 DESTDIR
=$(TARGET_DIR
) \
246 chmod u
+w
$(TARGET_DIR
)/lib
/udev
/rules.d
/25-gpsd.rules
249 GPSD_POST_INSTALL_TARGET_HOOKS
+= GPSD_INSTALL_UDEV_RULES
252 $(eval
$(generic-package
))