1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-12 07:27:57 +00:00

- Update to 3.0

Submitted by:	glebius@ (maintainer via private email)
Reworked by:	myself
This commit is contained in:
Dmitry Marakasov 2011-08-24 13:00:42 +00:00
parent 5a9b380865
commit 2f77a31a81
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=280349
6 changed files with 307 additions and 160 deletions

View File

@ -6,10 +6,9 @@
#
PORTNAME= gpsd
PORTVERSION= 2.96
PORTVERSION= 3.0
CATEGORIES= astro geography
MASTER_SITES= ${MASTER_SITE_BERLIOS}
MASTER_SITE_SUBDIR= ${PORTNAME}
MASTER_SITES= BERLIOS
MAINTAINER= glebius@FreeBSD.org
COMMENT= Daemon that monitors one or more GPSes attached to a host computer
@ -17,169 +16,272 @@ COMMENT= Daemon that monitors one or more GPSes attached to a host computer
BUILD_DEPENDS= docbook-xsl>=0:${PORTSDIR}/textproc/docbook-xsl \
xsltproc:${PORTSDIR}/textproc/libxslt
USE_GNOME= pkgconfig
USE_SCONS= yes
USE_RC_SUBR= gpsd
USE_AUTOTOOLS= libtool
GNU_CONFIGURE= yes
USE_GNOME= gnomehack pkgconfig
USE_LDCONFIG= yes
CONFIGURE_ENV= CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" \
LDFLAGS="${LDFLAGS} ${PTHREAD_LIBS}"
CONFIGURE_ARGS= --disable-libQgpsmm
USE_PYTHON= yes
INSTALLS_EGGINFO= yes
PYDISTUTILS_PKGNAME= gps
PYDISTUTILS_EGGINFO= gps-${PORTVERSION}.egg-info
MAKE_JOBS_UNSAFE=yes
MAN1= cgps.1 gps.1 gpscat.1 gpsctl.1 gpsfake.1 \
gpspipe.1 gpsprof.1 xgps.1 xgpsspeed.1 gpsmon.1 \
lcdgps.1
MAN3= libgps.3 libgpsd.3 libgpsmm.3
MAN5= srec.5
MAN8= gpsd.8
SCONS_BUILDENV= ${SCONS_ENV}
SCONS_ARGS= prefix="${PREFIX}" mandir="/man"
MAN1= cgps.1 gegps.1 gps.1 gpscat.1 gpsctl.1 gpsdecode.1 \
gpsfake.1 gpspipe.1 gpsprof.1 xgps.1 xgpsspeed.1 \
gpsmon.1 lcdgps.1
MAN3= libgps.3 libgpsd.3 libgpsmm.3 libQgpsmm.3
MAN5= srec.5 gpsd_json.5
MAN8= gpsd.8 gpsdctl.8
MANCOMPRESSED= no
SUB_FILES= pkg-message
OPTIONS= GTK2 "Install py-gtk2 (required for xgps & xgpsspeed)" off \
NMEA "NMEA support" on \
SIRF "SiRF chipset support" on \
SUPERSTARII "SuperStarII support" off \
TSIP "Trimble TSIP support" on \
FV18 "San Jose Navigation FV-18 support" on \
TRIPMATE "DeLorme TripMate support" on \
EARTHMATE "DeLorme EarthMate Zodiac support" on \
ITRAX "iTrax support" on \
OPTIONS= AIVDM "Aivdm support" on \
ASHTECH "Ashtech support" on \
NAVCOM "Navcom support" on \
GARMIN "Garmin kernel driver support" on \
GARMINTXT "Garmin Simple Text support" off \
TNT "True North Technologies support" off \
OCEANSERVER "Oceanserver support" off \
UBX "UBX protocol support" on \
CPPBIND "Build C++ bindings" on \
EARTHMATE "DeLorme EarthMate Zodiac support" on \
EVERMORE "Evermore binary support" on \
FV18 "San Jose Navigation FV-18 support" on \
GARMIN "Garmin kernel driver support" on \
GARMINTXT "Garmin Simple Text support" on \
GEOSTAR "Geostar Protocol support" on \
GPSCLOCK "GPSclock support" on \
GTK2 "Install py-gtk2 (required for xgps & xgpsspeed)" off \
IP6 "IPv6 support" on \
ITRAX "iTrax support" on \
MTK "MTK-3301 support" on \
NAVCOM "Navcom support" on \
NCURSES "Build with ncurses(3)" off \
NMEA "NMEA support" on \
NTPSHM "NTP time hinting support" on \
NTRIP "NTRIP support" on \
OCEANSERVER "Oceanserver support" on \
OLDPROTO "Old (pre-JSON) protocol support in client lib" on \
ONCORE "Motorola OnCore chipset support" on \
PASSTHROUGH "Build support for passing through JSON" on \
PPS "PPS time syncing support" on \
PPSONCTS "PPS pulse on CTS rather than DCD" off \
PROFILING "Profiling support" off \
RTCM104V2 "rtcm104v2 support" on \
RTCM104V3 "rtcm104v3 support" on \
AIVDM "Aivdm support" on \
NTRIP "NTRIP support" on \
PROFILING "Profiling support" off \
NTPSHM "NTP time hinting support" on \
PPS "PPS time syncing support" off \
DBUS "DBUS support" off
SHMEXPORT "Enable export via shared memory" on \
SIRF "SiRF chipset support" on \
SUPERSTARII "SuperStarII support" on \
TIMING "Build latency timing support" on \
TNT "True North Technologies support" on \
TRIPMATE "DeLorme TripMate support" on \
TSIP "Trimble TSIP support" on \
QTBIND "build QT bindings" off \
UBX "UBX protocol support" on \
USB "libusb support for USB devices" on
# Doesn't build
# DBUS "DBUS support" off \
# Doesn't build when toggled
# NETFEED "Build support for handling TCP/IP data sources" on \
# SOCKEXPORT "Enable export over sockets" on \
# RECONFIGURE "Allow gpsd to change device settings" on \
.include <bsd.port.options.mk>
.if defined(WITH_GTK2)
USE_GNOME+= pygtk2
.endif
# This is only temporary for my tinderbox not to try these options
# Options related to GPS protocols
.if defined(WITHOUT_NMEA)
CONFIGURE_ARGS+=--disable-nmea
.endif
.if defined(WITHOUT_SIRF)
CONFIGURE_ARGS+=--disable-sirf
.endif
.if defined(WITH_SUPERSTARII)
CONFIGURE_ARGS+= --enable-superstar2
.endif
.if defined(WITHOUT_TSIP)
CONFIGURE_ARGS+=--disable-tsip
.endif
.if defined(WITHOUT_FV18)
CONFIGURE_ARGS+=--disable-fv18
.endif
.if defined(WITHOUT_TRIPMATE)
CONFIGURE_ARGS+=--disable-tripmate
.endif
.if defined(WITHOUT_EARTHMATE)
CONFIGURE_ARGS+=--disable-earthmate
.endif
.if defined(WITHOUT_ITRAX)
CONFIGURE_ARGS+=--disable-itrax
SCONS_ARGS+= nmea=no
.endif
.if defined(WITHOUT_ASHTECH)
CONFIGURE_ARGS+=--disable-ashtech
SCONS_ARGS+= ashtech=no
.endif
.if defined(WITHOUT_NAVCOM)
CONFIGURE_ARGS+=--disable-navcom
.endif
.if defined(WITHOUT_GARMIN)
CONFIGURE_ARGS+=--disable-garmin
.endif
.if defined(WITH_GARMINTXT)
CONFIGURE_ARGS+=--enable-garmintxt
.endif
.if defined(WITH_TNT)
CONFIGURE_ARGS+=--enable-tnt
.endif
.if defined(WITH_OCEANSERVER)
CONFIGURE_ARGS+=--enable-oceanserver
.endif
.if defined(WITHOUT_UBX)
CONFIGURE_ARGS+=--disable-ubx
.if defined(WITHOUT_EARTHMATE)
SCONS_ARGS+= earthmate=no
.endif
.if defined(WITHOUT_EVERMORE)
CONFIGURE_ARGS+=--disable-evermore
SCONS_ARGS+= evermore=no
.endif
.if defined(WITHOUT_FV18)
SCONS_ARGS+= fv18=no
.endif
.if defined(WITHOUT_GARMIN)
SCONS_ARGS+= garmin=no
.endif
.if defined(WITHOUT_GARMINTXT)
SCONS_ARGS+= garmintxt=no
.endif
.if defined(WITHOUT_GEOSTAR)
SCONS_ARGS+= geostar=no
.endif
.if defined(WITHOUT_ITRAX)
SCONS_ARGS+= itrax=no
.endif
.if defined(WITHOUT_MTK)
SCONS_ARGS+= mtk3301=no
.endif
.if defined(WITHOUT_NAVCOM)
SCONS_ARGS+= navcom=no
.endif
.if defined(WITHOUT_ONCORE)
SCONS_ARGS+= oncore=no
.endif
.if defined(WITHOUT_SIRF)
SCONS_ARGS+= sirf=no
.endif
.if defined(WITHOUT_SUPERSTARII)
SCONS_ARGS+= superstar2=no
.endif
.if defined(WITHOUT_TNT)
SCONS_ARGS+= tnt=no
.endif
.if defined(WITHOUT_TRIPMATE)
SCONS_ARGS+= tripmate=no
.endif
.if defined(WITHOUT_TSIP)
SCONS_ARGS+= tsip=no
.endif
.if defined(WITHOUT_UBX)
SCONS_ARGS+= ubx=no
.endif
# Options related to Non-GPS protocols
.if defined(WITHOUT_AIVDM)
SCONS_ARGS+= aivdm=no
.endif
.if defined(WITHOUT_GPSCLOCK)
CONFIGURE_ARGS+=--disable-gpscloclk
.endif
.if defined(WITHOUT_AIVDM)
CONFIGURE_ARGS+=--disable-aivdm
.endif
.if defined(WITH_RTCM104V2) && defined(WITH_RTCM104V3) && defined(WITH_AIVDM)
PLIST_SUB+= DECODE=""
MAN1+= gpsdecode.1
.else
PLIST_SUB+= DECODE="@comment "
.endif
.if defined(WITHOUT_RTCM104V2)
CONFIGURE_ARGS+=--disable-rtcm104v2
.endif
.if defined(WITHOUT_RTCM104V3)
CONFIGURE_ARGS+=--disable-rtcm104v3
SCONS_ARGS+= gpsclock=no
.endif
.if defined(WITHOUT_NTRIP)
CONFIGURE_ARGS+=--disable-ntrip
SCONS_ARGS+= ntrip=no
.endif
.if defined(WITH_PROFILING)
CONFIGURE_ARGS+=--enable-profiling
.if defined(WITHOUT_OCEANSERVER)
SCONS_ARGS+= oceanserver=no
.endif
.if defined(WITHOUT_RTCM104V2)
SCONS_ARGS+= rtcm104v2=no
.endif
.if defined(WITHOUT_RTCM104V3)
SCONS_ARGS+= rtcm104v3=no
.endif
# Time service
.if defined(WITHOUT_NTPSHM)
CONFIGURE_ARGS+=--disable-ntpshm
SCONS_ARGS+= ntpshm=no
.endif
.if defined(WITH_PPS)
CONFIGURE_ARGS+=--enable-pps
.if defined(WITHOUT_PPS)
SCONS_ARGS+= pps=no
.endif
.if defined(WITH_DBUS)
CONFIGURE_ARGS+=--enable-dbus
.if defined(WITH_PPSONCTS)
SCONS_ARGS+= pps_on_cts=yes
.endif
# Export methods
# Won't build
#.if defined(WITHOUT_SOCKEXPORT)
#SCONS_ARGS+= socket_export=no
#.endif
# doesn't build; too many unsolvable problems with lib detection,
# include paths etc.
#.if defined(WITH_DBUS)
#LIB_DEPENDS+= dbus:${PORTSDIR}/devel/dbus \
# dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib
#SCONS_ARGS+= dbus_export=yes
#.endif
.if defined(WITHOUT_SHMEXPORT)
SCONS_ARGS+= shm_export=no
.endif
# Communication
.if defined(WITHOUT_USB)
SCONS_ARGS+= usb=no
.endif
.if defined(WITHOUT_IPV6)
SCONS_ARGS+= ipv6=no
.endif
# Won't build
#.if defined(WITHOUT_NETFEED)
#SCONS_ARGS+= netfeed=no
#.endif
.if defined(WITHOUT_PASSTHROUGH)
SCONS_ARGS+= passthrough=no
.endif
# Other daemon options
.if defined(WITHOUT_TIMING)
SCONS_ARGS+= timing=no
.endif
# Client-side options
.if defined(WITHOUT_OLDPROTO)
SCONS_ARGS+= oldstyle=no
.endif
.if defined(WITH_QTBIND)
USE_QT_VER= 4
QT_COMPONENTS= network
SCONS_ARGS+= libQgpsmm=yes
PLIST_SUB+= QTBIND=""
.else
SCONS_ARGS+= libQgpsmm=no
PLIST_SUB+= QTBIND="@comment "
.endif
# Won't build
#.if defined(WITHOUT_RECONFIGURE)
#SCONS_ARGS+= reconfigure=no
#.endif
.if defined(WITHOUT_CPPBIND)
SCONS_ARGS+= libgpsmm=no
.endif
.if defined(WITHOUT_NCURSES)
SCONS_ARGS+= ncurses=no
PLIST_SUB+= CURSES="@comment "
.else
PLIST_SUB+= CURSES=""
.endif
# Build control
.if defined(WITH_PROFILING)
SCONS_ARGS+= profiling=yes
.endif
# generates .py[co] files for installed modules
# if that's not done, ${PYTHON_SITELIBDIR}/gps will be polluted
# with these files when module is imported from root user
post-install:
@${CAT} ${PKGMESSAGE}
@${FIND} ${PYTHON_SITELIBDIR}/gps -name "*.py" -exec \
${PYTHON_CMD} ${PYTHON_LIBDIR}/py_compile.py {} \;
@${SETENV} PYTHONOPTIMIZE=yes \
${FIND} ${PYTHON_SITELIBDIR}/gps -name "*.py" -exec \
${PYTHON_CMD} ${PYTHON_LIBDIR}/py_compile.py {} \;
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (gpsd-2.96.tar.gz) = 054772152d2e3299913fa2470d6fc5c05af9ba1ea63a2f0db711e0aabb96f139
SIZE (gpsd-2.96.tar.gz) = 1554607
SHA256 (gpsd-3.0.tar.gz) = 542ed7a5885205604eb60e2d0895b9d6cdefb30fc2028d2ba4ebfe5ba01d95e7
SIZE (gpsd-3.0.tar.gz) = 2133361

View File

@ -0,0 +1,58 @@
--- SConstruct.orig 2011-08-19 09:36:28.000000000 +0400
+++ SConstruct 2011-08-24 14:13:54.000000000 +0400
@@ -155,7 +155,10 @@
j = i
if i == "LD":
i = "SHLINK"
- env[j]=os.getenv(i)
+ if i == "CFLAGS" or i == "CCFLAGS":
+ env.Replace(**{j: Split(os.getenv(i))})
+ else:
+ env.Replace(**{j: os.getenv(i)})
for flags in ["LDFLAGS", "CPPFLAGS"]:
if os.environ.has_key(flags):
env.MergeFlags([os.getenv(flags)])
@@ -173,7 +176,7 @@
else:
pkg_config = lambda pkg: ['!pkg-config --cflags --libs --static %s' %(pkg, )]
-if env['CC'] == 'gcc':
+if env['CC'] == 'gcc' or env['CC'] == 'cc':
# Enable all GCC warnings except uninitialized and
# missing-field-initializers, which we can't help triggering because
# of the way some of the JSON-parsing code is generated.
@@ -326,22 +329,12 @@
confdefs.append("/* #undef HAVE_%s */\n" % f.upper())
if env['ncurses']:
- if config.CheckPKG('ncurses'):
- ncurseslibs = pkg_config('ncurses')
- elif config.CheckExecutable('ncurses5-config --version', 'ncurses5-config'):
- ncurseslibs = ['!ncurses5-config --libs --cflags']
- else:
- ncurseslibs= []
+ ncurseslibs= [ '/usr/lib/libncurses.so' ]
else:
ncurseslibs= []
-if env['usb'] and config.CheckPKG('libusb-1.0'):
- confdefs.append("#define HAVE_LIBUSB 1\n")
- try:
- usblibs = pkg_config('libusb-1.0')
- except OSError:
- print "pkg_config is confused about the state of libusb-1.0."
- usblibs = []
+if env['usb']:
+ usblibs = [ "-lusb" ]
else:
confdefs.append("/* #undef HAVE_LIBUSB */\n")
usblibs = []
@@ -950,7 +943,7 @@
python_progs_install,
python_egg_info_install]
-pkgconfigdir = os.path.join(installdir('libdir'), 'pkgconfig')
+pkgconfigdir = os.path.join(env['prefix'], 'libdata', 'pkgconfig')
pc_install = [ env.Install(pkgconfigdir, x) for x in ("libgps.pc", "libgpsd.pc") ]
maninstall = []

View File

@ -1,11 +0,0 @@
--- libgps_json.c.orig
+++ libgps_json.c
@@ -203,7 +203,7 @@ static int json_sky_read(const char *buf, struct gps_data_t *gpsdata,
.len = sizeof(gpsdata->tag)},
{"time", t_string, .addr.string = tbuf,
.len = sizeof(tbuf)},
- {"time", t_real, .addr.real = &gpsdata->fix.time,
+ {"time", t_real, .addr.real = &gpsdata->skyview_time,
.dflt.real = NAN},
{"hdop", t_real, .addr.real = &gpsdata->dop.hdop,
.dflt.real = NAN},

View File

@ -1,9 +0,0 @@
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
* NOTE:
%%PREFIX%%/bin/gpsfake and %%PREFIX%%/bin/gpsprof
are Python script text executables.
To use them, please ensure you have appropriate
Python install.
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=

View File

@ -1,42 +1,49 @@
bin/cgps
bin/gegps
bin/gpscat
bin/gpsctl
%%DECODE%%bin/gpsdecode
bin/gpsdecode
bin/gpsfake
bin/gpsmon
bin/gpspipe
bin/gpsprof
bin/gpxlogger
bin/lcdgps
bin/xgps
bin/xgpsspeed
%%CURSES%%bin/cgps
%%CURSES%%bin/gpsmon
include/gps.h
include/gpsd.h
include/libgpsmm.h
lib/libgps.a
lib/libgps.la
%%QTBIND%%lib/libQgpsmm.so
%%QTBIND%%lib/libQgpsmm.so.20
%%QTBIND%%lib/libQgpsmm.so.20.0
%%QTBIND%%lib/libQgpsmm.so.20.0.0
lib/libgps.so
lib/libgps.so.20
lib/libgpsd.a
lib/libgpsd.la
lib/libgps.so.20.0
lib/libgps.so.20.0.0
lib/libgpsd.so
lib/libgpsd.so.0
lib/libgpsd.so.20
lib/libgpsd.so.20.0
lib/libgpsd.so.20.0.0
%%PYTHON_SITELIBDIR%%/gps/__init__.py
%%PYTHON_SITELIBDIR%%/gps/__init__.pyc
%%PYTHON_SITELIBDIR%%/gps/__init__.pyo
%%PYTHON_SITELIBDIR%%/gps/client.py
%%PYTHON_SITELIBDIR%%/gps/client.pyc
%%PYTHON_SITELIBDIR%%/gps/client.pyo
%%PYTHON_SITELIBDIR%%/gps/clienthelpers.so
%%PYTHON_SITELIBDIR%%/gps/fake.py
%%PYTHON_SITELIBDIR%%/gps/fake.pyc
%%PYTHON_SITELIBDIR%%/gps/fake.pyo
%%PYTHON_SITELIBDIR%%/gps/gps.py
%%PYTHON_SITELIBDIR%%/gps/gps.pyc
%%PYTHON_SITELIBDIR%%/gps/gps.pyo
%%PYTHON_SITELIBDIR%%/gps/misc.py
%%PYTHON_SITELIBDIR%%/gps/misc.pyc
%%PYTHON_SITELIBDIR%%/gps/misc.pyo
%%PYTHON_SITELIBDIR%%/gps/packet.so
%%PYTHON_SITELIBDIR%%/gpscap.py
%%PYTHON_SITELIBDIR%%/gpscap.pyc
%%PYTHON_SITELIBDIR%%/gpscap.pyo
@dirrm %%PYTHON_SITELIBDIR%%/gps
libdata/pkgconfig/libgps.pc
libdata/pkgconfig/libgpsd.pc
sbin/gpsd
@dirrm %%PYTHON_SITELIBDIR%%/gps
sbin/gpsdctl