On Thu, July 25, 2019 08:50, Landry Breuil wrote:
> On Wed, Jul 24, 2019 at 11:48:13PM +0300, Kirill Bychkov wrote:
>> On Thu, June 20, 2019 10:08, Kirill Bychkov wrote:
>> > Hi!
>> > Long time ago I've started update of gpsd from 2.x to 3.x.
>> > Upstream moved from auto crap to scons so it gave me some
>> > headache.
>> > Before switching to new gpsd we need to prepare some ports
>> > which are linking against libgps because API has changed.
>> > Here are the diffs for foxtrotgps, geoclue and qlandkaretegt.
>>
>> Hi!
>> foxtrotgps and viking are both updatetd to latest upstream releases
>> which brings compatibility with gpsd-3.x.
>> geoclue and qlandkartegt should be the last ports incompatible with
>> new gpsd API.
>> Pathces for fixing them are attached.
>> OKs, objections?
>>
>> P.S. gpsd patch is also attached for review.
>
> Ugh the scons madness. As for gpsd, i dont really understand the qt=no +
> qt_versioned=4, nor the use of the qt4 module. Is qt needed or not ? It
Missed mixing both flags, thanks.
> appears in LIB_DEPENDS/WANTLIB because of the module ... but that seems
> extra:
> gpsd-x11-3.19(misc/gpsd,-x11):
> Extra: QtCore.10
It is needed for Qt-bindings. We can skip it now and add in future if we
need it.
>
> As far as i understand it, if needed it should be possible to build
> against qt5 (that's what debian did in
> https://github.com/bzed/pkg-gpsd/commit/cbbe97a4181af81761efe6649f20d65454d4a8e4
> for 3.17.4) so that should be preferred to qt4..
>
> you removed the COMPILER line, was it on purpose ?
> same thing for the no_x11 pseudo flavor, if you remove it maybe some
> ports need to be amended.
Ooops. COMPILER line restored. no_x11 flavor not connected to the
build so no influence on other ports. And I see no reason to keep it.
>
> port-lib-depends-check also complains about
> LIB_DEPENDS devel/py-serial not needed for misc/gpsd,-main ?
>
Should go to RUN_DEPENDS.
> other than that, it seems gpsd is still able to read/access data from my
> usb gps, so that part looks good :)
>
> Thanks for working on it!
>
> Landry
>
>
Updated diff attached.
Index: Makefile
===================================================================
RCS file: /cvs/ports/misc/gpsd/Makefile,v
retrieving revision 1.72
diff -u -p -u -p -r1.72 Makefile
--- Makefile 12 Jul 2019 20:47:50 -0000 1.72
+++ Makefile 25 Jul 2019 07:56:08 -0000
@@ -1,82 +1,100 @@
-# $OpenBSD: Makefile,v 1.72 2019/07/12 20:47:50 sthen Exp $
+# $OpenBSD: Makefile,v 1.47 2012/04/01 19:38:57 sthen Exp $
COMMENT-main= service daemon that monitors one or more GPSes
COMMENT-x11= GUI test apps using gpsd
COMMENT-php= web-based gpsd monitor in php
-VERSION= 2.95
+VERSION= 3.19
DISTNAME= gpsd-${VERSION}
PKGNAME-main= gpsd-${VERSION}
PKGNAME-x11= gpsd-x11-${VERSION}
PKGNAME-php= gpsd-php-${VERSION}
-SHARED_LIBS= gps 19.0 \
- gpsd 0.0
-CATEGORIES= misc geo
-REVISION-main= 11
-REVISION-php= 12
-REVISION-x11= 6
+SHARED_LIBS += gps 20.0 # 25.0
+CATEGORIES= misc geo
-HOMEPAGE= http://www.catb.org/gpsd/
+HOMEPAGE = https://gpsd.gitlab.io/gpsd/index.html
# BSD
-PERMIT_PACKAGE= Yes
+PERMIT_PACKAGE= Yes
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gpsd.berlios/} \
- ${MASTER_SITE_SAVANNAH:=gpsd/}
+MASTER_SITES = ${MASTER_SITE_SAVANNAH:=gpsd/}
-COMPILER = base-clang ports-gcc base-gcc
+# C++11
+COMPILER = base-clang ports-gcc
+WANTLIB-main += c dbus-1 m curses pthread usb-1.0 ${COMPILER_LIBCXX}
+WANTLIB-php =
-MODULES += lang/python lang/php
+MODULES += devel/scons lang/python lang/php
MODPHP_BUILDDEP= No
-CONFIGURE_STYLE= gnu
-CONFIGURE_ARGS+= --disable-ntpshm \
- --enable-gpsd-user=_gpsd \
- --enable-tnt \
- --enable-oceanserver
-
-PSEUDO_FLAVORS = no_x11
-FLAVOR?=
-
-MULTI_PACKAGES= -main -php -x11
-
-BUILD_DEPENDS= textproc/docbook-xsl
-
-RUN_DEPENDS-main= ${MODPY_RUN_DEPENDS}
-LIB_DEPENDS-main= ${LIB_DEPENDS} \
- devel/libusb1
-
-RUN_DEPENDS-x11 = ${BASE_PKGPATH} \
+MODSCONS_FLAGS += gpsd_user=_gpsd \
+ qt=no \
+ mandir=man \
+ pps=no \
+ prefix=${PREFIX} \
+ shared=yes \
+ target_python=${MODPY_BIN} \
+ python_libdir=${DESTDIR}/${MODPY_SITEPKG}
+
+MULTI_PACKAGES = -main -php -x11
+
+BUILD_DEPENDS= devel/py-gobject3 \
+ textproc/libxslt \
+ textproc/docbook \
+ textproc/docbook-xsl
+TEST_DEPENDS= misc/gpsd,-main \
+ x11/dbus
+
+LIB_DEPENDS-main = devel/libusb1 \
+ x11/dbus
+RUN_DEPENDS-main= ${MODPY_RUN_DEPENDS} \
+ devel/py-serial
+
+RUN_DEPENDS-x11 = ${BASE_PKGPATH} \
+ devel/py-gobject3 \
+ devel/desktop-file-utils \
x11/py-gtk2
-.include <bsd.port.arch.mk>
-
-.if ${BUILD_PACKAGES:M-x11}
-CONFIGURE_ENV+= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
- LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib -lm -pthread -lutil"
-.else
-CONFIGURE_ARGS+= --without-x
-CONFIGURE_ENV += LDFLAGS="-lm -pthread -lutil"
-.endif
-
-WANTLIB-main= m curses c pthread ${COMPILER_LIBCXX} usb-1.0 util ${MODPY_WANTLIB}
-
# the php display script doesn't depend on having any of gpsd around,
# it just sits there and looks pretty.
PKG_ARCH-php= *
RUN_DEPENDS-php= lang/php/${MODPHP_VERSION},-gd
-PREFIX-php= ${VARBASE}/www/
+PREFIX-php= /var/www/
+
+SUBST_VARS += VERSION
-PYTHON_SCRIPTS= gpsprof gps/gps.py gpsfake gpscat xgps gpsspeed
+MODPY_ADJ_FILES = gegps gpsprof gps/gps.py gpsfake gpscat xgps xgpsspeed \
+ leapsecond.py test_maidenhead.py test_misc.py ubxtool zerk
pre-configure:
-.for file in ${PYTHON_SCRIPTS}
- perl -pi -e 's,/usr/bin/env python,${MODPY_BIN},g' ${WRKSRC}/${file}
-.endfor
+ @perl -pi -e "s,/usr/share/gpsd/,," ${WRKSRC}/packaging/X11/*.desktop
+ @perl -pi -e "s,http://docbook.sourceforge.net/release/xsl/current/,\
+ ${LOCALBASE}/share/xsl/docbook/," \
+ ${WRKSRC}/SConstruct
+ @perl -pi -e "s,python2,${MODPY_BIN}," ${WRKSRC}/regress-driver
+ ${SUBST_CMD} ${WRKSRC}/SConstruct
post-install:
${INSTALL_DATA_DIR} ${WRKINST}/var/www/gpsd
${INSTALL_SCRIPT} ${WRKSRC}/gpsd.php ${WRKINST}/var/www/gpsd
${INSTALL_DATA} ${WRKSRC}/gpsd_config.h ${PREFIX}/include
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/applications/
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/pixmaps/
+ ${INSTALL_DATA} ${WRKSRC}/packaging/X11/*.desktop \
+ ${PREFIX}/share/applications/
+ ${INSTALL_DATA} ${WRKSRC}/packaging/X11/gpsd-logo.png \
+ ${PREFIX}/share/pixmaps/
+
+ @find ${DESTDIR}/${MODPY_SITEPKG}/gps -name "*.py" -exec \
+ ${MODPY_BIN} ${MODPY_LIBDIR}/py_compile.py {} \;
+ @find ${DESTDIR}/${MODPY_SITEPKG}/gps -name "*.py" -exec \
+ ${MODPY_BIN} -O ${MODPY_LIBDIR}/py_compile.py {} \;
+
+# Needs running messagebus daemon
+TEST_IS_INTERACTIVE= Yes
+
+do-test:
+ @${SETENV} ${MAKE_ENV} ${MODSCONS_BIN} -C ${WRKSRC} \
+ ${MODSCONS_ENV} ${MODSCONS_FLAGS} check
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/misc/gpsd/distinfo,v
retrieving revision 1.9
diff -u -p -u -p -r1.9 distinfo
--- distinfo 9 Jul 2014 09:24:47 -0000 1.9
+++ distinfo 25 Jul 2019 07:56:08 -0000
@@ -1,2 +1,2 @@
-SHA256 (gpsd-2.95.tar.gz) = gyNDpTkhqDce+lQLpXyR2t7dpEXlccG+uXwGU570UK4=
-SIZE (gpsd-2.95.tar.gz) = 1385681
+SHA256 (gpsd-3.19.tar.gz) = J90k1Fsqxpuqt5M9or9q5fsL6QEw9n51PBEKNHcVXzk=
+SIZE (gpsd-3.19.tar.gz) = 10581777
Index: patches/patch-SConstruct
===================================================================
RCS file: patches/patch-SConstruct
diff -N patches/patch-SConstruct
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-SConstruct 25 Jul 2019 07:56:08 -0000
@@ -0,0 +1,45 @@
+$OpenBSD$
+Index: SConstruct
+--- SConstruct.orig
++++ SConstruct
+@@ -72,8 +72,7 @@ gpsd_version = "3.19"
+ libgps_version_current = 25
+ libgps_version_revision = 0
+ libgps_version_age = 0
+-libgps_version = "%d.%d.%d" % (libgps_version_current, libgps_version_age,
+- libgps_version_revision)
++libgps_version = "%s" % ('${LIBgps_VERSION}')
+ #
+ # Release identification ends here
+
+@@ -546,7 +545,7 @@ def CheckPKG(context, name):
+
+
+ # Stylesheet URLs for making HTML and man pages from DocBook XML.
+-docbook_url_stem = 'http://docbook.sourceforge.net/release/xsl/current/'
++docbook_url_stem = '${LOCALBASE}/share/xsl/docbook/'
+ docbook_man_uri = docbook_url_stem + 'manpages/docbook.xsl'
+ docbook_html_uri = docbook_url_stem + 'html/docbook.xsl'
+
+@@ -1090,6 +1089,10 @@ else:
+ # if not, force qt to off
+ if config.env["qt"]:
+ qt_net_name = 'Qt%sNetwork' % config.env["qt_versioned"]
++ if env["qt_versioned"] == "5":
++ qt_net_name = 'Qt5Network'
++ elif env["qt_versioned"] == "4":
++ qt_net_name = 'QtNetwork'
+ qt_network = config.CheckPKG(qt_net_name)
+ if not qt_network:
+ config.env["qt"] = False
+@@ -1685,9 +1688,7 @@ else:
+ python_objects[ext].append(
+ python_env.NoCache(
+ python_env.SharedObject(
+- src.split(".")[0] + '-py_' +
+- '_'.join(['%s' % (x) for x in sys.version_info]) +
+- python_config['SO'], src
++ src.split(".")[0] + python_config['SO'], src
+ )
+ )
+ )
Index: patches/patch-configure
===================================================================
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- patches/patch-configure 23 Aug 2012 17:51:22 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,28 +0,0 @@
-$OpenBSD: patch-configure,v 1.3 2012/08/23 17:51:22 ajacoutot Exp $
---- configure.orig Wed Jul 14 00:48:24 2010
-+++ configure Wed Nov 3 12:20:34 2010
-@@ -4875,6 +4875,16 @@ $as_echo "$am_cv_python_pyexecdir" >&6; }
- fi
-
-
-+# Check whether --enable-python was given.
-+if test "${enable_python+set}" = set; then
-+ enableval=$enable_python; try_python="$enableval"
-+else
-+ try_python="yes"
-+fi
-+
-+if test x"$try_python" = xyes ; then
-+
-+
- ac_python=yes
- if test "x$PYTHON" = "x"; then
- # Extract the first word of "python", so it can be a program name with args.
-@@ -4953,6 +4963,7 @@ $as_echo "$PYTHON, $PYTHON_VERSION, $PYTHON_PREFIX" >&
- CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
- CXXFLAGS="$CXXFLAGS $PYTHON_CFLAGS"
-
-+fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/misc/gpsd/pkg/PLIST-main,v
retrieving revision 1.9
diff -u -p -u -p -r1.9 PLIST-main
--- pkg/PLIST-main 20 Mar 2015 22:47:41 -0000 1.9
+++ pkg/PLIST-main 25 Jul 2019 07:56:08 -0000
@@ -1,8 +1,10 @@
-@comment $OpenBSD: PLIST-main,v 1.9 2015/03/20 22:47:41 naddy Exp $
+@comment $OpenBSD: PLIST-main,v 1.8 2012/01/26 08:03:57 ajacoutot Exp $
@conflict gpsd-python-<=2.38p3
@pkgpath misc/gpsd,-python
@newuser _gpsd:551:dialer:daemon:GPS server:/nonexistent:/sbin/nologin
@bin bin/cgps
+bin/gegps
+@bin bin/gps2udp
bin/gpscat
@bin bin/gpsctl
@bin bin/gpsdecode
@@ -10,39 +12,42 @@ bin/gpsfake
@bin bin/gpsmon
@bin bin/gpspipe
bin/gpsprof
+@bin bin/gpsrinex
@bin bin/gpxlogger
@bin bin/lcdgps
+bin/ubxtool
+bin/zerk
include/gps.h
-include/gpsd.h
include/gpsd_config.h
include/libgpsmm.h
-lib/libgps.a
-lib/libgps.la
@lib lib/libgps.so.${LIBgps_VERSION}
-lib/libgpsd.a
-lib/libgpsd.la
-@lib lib/libgpsd.so.${LIBgpsd_VERSION}
lib/pkgconfig/libgps.pc
-lib/pkgconfig/libgpsd.pc
lib/python${MODPY_VERSION}/site-packages/gps/
-lib/python${MODPY_VERSION}/site-packages/gps-2.95-py${MODPY_VERSION}.egg-info
+lib/python${MODPY_VERSION}/site-packages/gps-${VERSION}.egg-info
lib/python${MODPY_VERSION}/site-packages/gps/__init__.py
lib/python${MODPY_VERSION}/site-packages/gps/__init__.pyc
+lib/python${MODPY_VERSION}/site-packages/gps/__init__.${MODPY_PYOEXTENSION}
lib/python${MODPY_VERSION}/site-packages/gps/client.py
lib/python${MODPY_VERSION}/site-packages/gps/client.pyc
+lib/python${MODPY_VERSION}/site-packages/gps/client.${MODPY_PYOEXTENSION}
lib/python${MODPY_VERSION}/site-packages/gps/clienthelpers.so
lib/python${MODPY_VERSION}/site-packages/gps/fake.py
lib/python${MODPY_VERSION}/site-packages/gps/fake.pyc
+lib/python${MODPY_VERSION}/site-packages/gps/fake.${MODPY_PYOEXTENSION}
lib/python${MODPY_VERSION}/site-packages/gps/gps.py
lib/python${MODPY_VERSION}/site-packages/gps/gps.pyc
+lib/python${MODPY_VERSION}/site-packages/gps/gps.${MODPY_PYOEXTENSION}
lib/python${MODPY_VERSION}/site-packages/gps/misc.py
lib/python${MODPY_VERSION}/site-packages/gps/misc.pyc
+lib/python${MODPY_VERSION}/site-packages/gps/misc.${MODPY_PYOEXTENSION}
lib/python${MODPY_VERSION}/site-packages/gps/packet.so
-lib/python${MODPY_VERSION}/site-packages/gpscap.py
-lib/python${MODPY_VERSION}/site-packages/gpscap.pyc
-lib/python${MODPY_VERSION}/site-packages/gpscap.pyo
+lib/python${MODPY_VERSION}/site-packages/gps/watch_options.py
+lib/python${MODPY_VERSION}/site-packages/gps/watch_options.pyc
+lib/python${MODPY_VERSION}/site-packages/gps/watch_options.${MODPY_PYOEXTENSION}
@man man/man1/cgps.1
+@man man/man1/gegps.1
@man man/man1/gps.1
+@man man/man1/gps2udp.1
@man man/man1/gpscat.1
@man man/man1/gpsctl.1
@man man/man1/gpsdecode.1
@@ -50,11 +55,18 @@ lib/python${MODPY_VERSION}/site-packages
@man man/man1/gpsmon.1
@man man/man1/gpspipe.1
@man man/man1/gpsprof.1
+@man man/man1/gpsrinex.1
+@man man/man1/gpxlogger.1
@man man/man1/lcdgps.1
+@man man/man1/ubxtool.1
+@man man/man1/zerk.1
+@man man/man3/libQgpsmm.3
@man man/man3/libgps.3
-@man man/man3/libgpsd.3
@man man/man3/libgpsmm.3
-@man man/man5/rtcm-104.5
+@man man/man5/gpsd_json.5
@man man/man5/srec.5
@man man/man8/gpsd.8
+@man man/man8/gpsdctl.8
+@man man/man8/gpsinit.8
@bin sbin/gpsd
+@bin sbin/gpsdctl
Index: pkg/PLIST-php
===================================================================
RCS file: /cvs/ports/misc/gpsd/pkg/PLIST-php,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 PLIST-php
--- pkg/PLIST-php 8 Feb 2007 23:03:38 -0000 1.1
+++ pkg/PLIST-php 25 Jul 2019 07:56:08 -0000
@@ -1,3 +1,4 @@
@comment $OpenBSD: PLIST-php,v 1.1 2007/02/08 23:03:38 ckuethe Exp $
+@cwd /var/www
gpsd/
gpsd/gpsd.php
Index: pkg/PLIST-x11
===================================================================
RCS file: /cvs/ports/misc/gpsd/pkg/PLIST-x11,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 PLIST-x11
--- pkg/PLIST-x11 25 Nov 2010 08:55:24 -0000 1.1
+++ pkg/PLIST-x11 25 Jul 2019 07:56:08 -0000
@@ -5,3 +5,8 @@ bin/xgps
bin/xgpsspeed
@man man/man1/xgps.1
@man man/man1/xgpsspeed.1
+share/applications/xgps.desktop
+share/applications/xgpsspeed.desktop
+share/pixmaps/
+share/pixmaps/gpsd-logo.png
+@tag update-desktop-database