From: yaydn@protonmail.com Subject: Re: KDE Plasma: fix WeatherEngine To: Rafael Sadowski Cc: "ports@openbsd.org" Date: Sat, 02 Aug 2025 06:00:02 +0000 På fredag 1. august 2025 kl. 18:50, Rafael Sadowski skrev: > QNetworkInformation::Reachability is not available on OpenBSD, > stop using it and fallback to the default one. Tested on amd64. > OK? > > Cheers Rafael > Tested on current/amd64: cd /usr/ports/x11/kde-plasma/plasma-workspace && patch -l -p0 -E < /tmp/plasma-workspace-6.3.0p0.diff cd /usr/ports/x11/kde-plasma/plasma-workspace && make update clean && make distclean Built fine. Sorry it so long to compile. Thanks, well wishes, and have a good one. Felicitous porting! > Index: Makefile > =================================================================== > RCS file: /cvs/ports/x11/kde-plasma/plasma-workspace/Makefile,v > diff -u -p -u -p -r1.24 Makefile > --- Makefile 16 Jul 2025 18:41:20 -0000 1.24 > +++ Makefile 1 Aug 2025 16:47:39 -0000 > @@ -1,5 +1,6 @@ > COMMENT = various components needed to run a Plasma-based environment > DISTNAME = plasma-workspace-${VERSION} > +REVISION = 0 > > SHARED_LIBS += colorcorrect 1.0 # 0.0 > SHARED_LIBS += kfontinst 1.0 # 0.0 > Index: patches/patch-dataengines_weather_weatherengine_cpp > =================================================================== > RCS file: patches/patch-dataengines_weather_weatherengine_cpp > diff -N patches/patch-dataengines_weather_weatherengine_cpp > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-dataengines_weather_weatherengine_cpp 1 Aug 2025 16:47:39 -0000 > @@ -0,0 +1,18 @@ > +QNetworkInformation::Reachability is not available on OpenBSD, stop using it > +and fallback to the default one. > + > +Index: dataengines/weather/weatherengine.cpp > +--- dataengines/weather/weatherengine.cpp.orig > ++++ dataengines/weather/weatherengine.cpp > +@@ -25,7 +25,10 @@ WeatherEngine::WeatherEngine(QObject *parent) > + // Globally notify all plugins to remove their sources (and unload plugin) > + connect(this, &Plasma5Support::DataEngine::sourceRemoved, this, &WeatherEngine::removeIonSource); > + > +- QNetworkInformation::load(QNetworkInformation::Feature::Reachability); > ++ if (!QNetworkInformation::load(QNetworkInformation::Feature::Reachability)) { > ++ // Fallback > ++ QNetworkInformation::loadDefaultBackend(); > ++ } > + connect(QNetworkInformation::instance(), &QNetworkInformation::reachabilityChanged, this, &WeatherEngine::onOnlineStateChanged); > + > + // Get the list of available plugins but don't load them