commit:     a701a8362069e5c09a1de7c0a7e161ba1d12e7b6
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 29 16:05:21 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Aug 29 19:44:06 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a701a836

sci-geosciences/gpsd: Switch IUSE qt5 to qt6

See also: https://gitlab.com/gpsd/gpsd/-/issues/340

Bug: https://bugs.gentoo.org/962118
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 sci-geosciences/gpsd/files/gpsd-3.26.1-qt6.patch        | 14 ++++++++++++++
 .../gpsd/{gpsd-9999.ebuild => gpsd-3.26.1-r1.ebuild}    | 17 ++++++++---------
 sci-geosciences/gpsd/gpsd-9999.ebuild                   | 17 ++++++++---------
 3 files changed, 30 insertions(+), 18 deletions(-)

diff --git a/sci-geosciences/gpsd/files/gpsd-3.26.1-qt6.patch 
b/sci-geosciences/gpsd/files/gpsd-3.26.1-qt6.patch
new file mode 100644
index 000000000000..1290a5514adb
--- /dev/null
+++ b/sci-geosciences/gpsd/files/gpsd-3.26.1-qt6.patch
@@ -0,0 +1,14 @@
+Source: https://gitlab.com/gpsd/gpsd/-/issues/340
+Thanks-to: James Browning
+
+--- a/libgps/gpsutils.c
++++ b/libgps/gpsutils.c
+@@ -833,7 +833,7 @@ timespec_t iso8601_to_timespec(const char *isotime)
+     if (1 < sl.size()) {
+         usec = sl[1].toInt() / pow(10., (double)sl[1].size());
+     }
+-    ret.tv_sec = d.toTime_t();
++    ret.tv_sec = d.toSecsSinceEpoch();
+     ret.tv_nsec = usec * 1e9;
+ #else  // USE_QT
+     double usec = 0;

diff --git a/sci-geosciences/gpsd/gpsd-9999.ebuild 
b/sci-geosciences/gpsd/gpsd-3.26.1-r1.ebuild
similarity index 95%
copy from sci-geosciences/gpsd/gpsd-9999.ebuild
copy to sci-geosciences/gpsd/gpsd-3.26.1-r1.ebuild
index 03166bee051e..302812a06e61 100644
--- a/sci-geosciences/gpsd/gpsd-9999.ebuild
+++ b/sci-geosciences/gpsd/gpsd-3.26.1-r1.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 DISTUTILS_OPTIONAL=1
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..13} )
+PYTHON_COMPAT=( python3_{11..13} )
 SCONS_MIN_VERSION="2.3.0"
 
 inherit distutils-r1 scons-utils systemd toolchain-funcs udev
@@ -30,11 +30,11 @@ GPSD_PROTOCOLS=(
        sirf skytraq superstar2 tnt tripmate tsip
 )
 IUSE_GPSD_PROTOCOLS=${GPSD_PROTOCOLS[@]/#/+gpsd_protocols_}
-IUSE="${IUSE_GPSD_PROTOCOLS} bluetooth +cxx dbus debug ipv6 latency-timing 
ncurses ntp qt5 selinux +shm static systemd test udev usb X"
+IUSE="${IUSE_GPSD_PROTOCOLS} bluetooth +cxx dbus debug ipv6 latency-timing 
ncurses ntp qt6 selinux +shm static systemd test udev usb X"
 REQUIRED_USE="
        gpsd_protocols_nmea2000? ( gpsd_protocols_aivdm )
        ${PYTHON_REQUIRED_USE}
-       qt5? ( cxx )
+       qt6? ( cxx )
 "
 RESTRICT="!test? ( test )"
 
@@ -53,10 +53,7 @@ RDEPEND="
                net-misc/ntpsec
                net-misc/chrony
        ) )
-       qt5? (
-               dev-qt/qtcore:5
-               dev-qt/qtnetwork:5
-       )
+       qt6? ( dev-qt/qtbase:6[network] )
        ${PYTHON_DEPS}
        dev-python/pyserial[${PYTHON_USEDEP}]
        usb? ( virtual/libusb:1 )
@@ -73,6 +70,8 @@ if [[ ${PV} == *9999* ]] ; then
        BDEPEND+=" dev-ruby/asciidoctor"
 fi
 
+PATCHES=( "${FILESDIR}/${P}-qt6.patch" ) # bug 962118
+
 python_check_deps() {
        python_has_version -b "dev-build/scons[${PYTHON_USEDEP}]" || return 1
 }
@@ -166,7 +165,7 @@ src_configure() {
                # force a predictable python libdir because lib vs. lib64 usage 
differs
                # from 3.5 to 3.6+
                python_libdir="${EPREFIX}"/python-discard
-               qt=$(usex qt5)
+               qt=$(usex qt6)
                shm_export=$(usex shm)
                socket_export=True # Required, see bug #900891
                usb=$(usex usb)
@@ -177,7 +176,7 @@ src_configure() {
        fi
 
        use X && scons_opts+=( xgps=1 xgpsspeed=1 )
-       use qt5 && scons_opts+=( qt_versioned=5 )
+       use qt6 && scons_opts+=( qt_versioned=6 )
 
        # enable specified protocols
        local protocol

diff --git a/sci-geosciences/gpsd/gpsd-9999.ebuild 
b/sci-geosciences/gpsd/gpsd-9999.ebuild
index 03166bee051e..9cc38e827afb 100644
--- a/sci-geosciences/gpsd/gpsd-9999.ebuild
+++ b/sci-geosciences/gpsd/gpsd-9999.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 DISTUTILS_OPTIONAL=1
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..13} )
+PYTHON_COMPAT=( python3_{11..13} )
 SCONS_MIN_VERSION="2.3.0"
 
 inherit distutils-r1 scons-utils systemd toolchain-funcs udev
@@ -30,11 +30,11 @@ GPSD_PROTOCOLS=(
        sirf skytraq superstar2 tnt tripmate tsip
 )
 IUSE_GPSD_PROTOCOLS=${GPSD_PROTOCOLS[@]/#/+gpsd_protocols_}
-IUSE="${IUSE_GPSD_PROTOCOLS} bluetooth +cxx dbus debug ipv6 latency-timing 
ncurses ntp qt5 selinux +shm static systemd test udev usb X"
+IUSE="${IUSE_GPSD_PROTOCOLS} bluetooth +cxx dbus debug ipv6 latency-timing 
ncurses ntp qt6 selinux +shm static systemd test udev usb X"
 REQUIRED_USE="
        gpsd_protocols_nmea2000? ( gpsd_protocols_aivdm )
        ${PYTHON_REQUIRED_USE}
-       qt5? ( cxx )
+       qt6? ( cxx )
 "
 RESTRICT="!test? ( test )"
 
@@ -53,10 +53,7 @@ RDEPEND="
                net-misc/ntpsec
                net-misc/chrony
        ) )
-       qt5? (
-               dev-qt/qtcore:5
-               dev-qt/qtnetwork:5
-       )
+       qt6? ( dev-qt/qtbase:6[network] )
        ${PYTHON_DEPS}
        dev-python/pyserial[${PYTHON_USEDEP}]
        usb? ( virtual/libusb:1 )
@@ -73,6 +70,8 @@ if [[ ${PV} == *9999* ]] ; then
        BDEPEND+=" dev-ruby/asciidoctor"
 fi
 
+PATCHES=( "${FILESDIR}/${PN}-3.26.1-qt6.patch" ) # bug 962118
+
 python_check_deps() {
        python_has_version -b "dev-build/scons[${PYTHON_USEDEP}]" || return 1
 }
@@ -166,7 +165,7 @@ src_configure() {
                # force a predictable python libdir because lib vs. lib64 usage 
differs
                # from 3.5 to 3.6+
                python_libdir="${EPREFIX}"/python-discard
-               qt=$(usex qt5)
+               qt=$(usex qt6)
                shm_export=$(usex shm)
                socket_export=True # Required, see bug #900891
                usb=$(usex usb)
@@ -177,7 +176,7 @@ src_configure() {
        fi
 
        use X && scons_opts+=( xgps=1 xgpsspeed=1 )
-       use qt5 && scons_opts+=( qt_versioned=5 )
+       use qt6 && scons_opts+=( qt_versioned=6 )
 
        # enable specified protocols
        local protocol

Reply via email to