Hi Loïc,

Am 19.06.21 um 21:10 schrieb Loïc Bartoletti:
> Hi Rainer,
> 
> Le 19/06/2021 à 15:52, Rainer Hurling a écrit :
>> Hi Loïc,
>>
>> Today I recognized a breakage with newest master of QGIS on FreeBSD,
>> which I reported as an Issue on the QGIS Github repo [1].
>>
>> [1] https://github.com/qgis/QGIS/issues/43791
>>
>> This happens right after the release of 3.20.0, puhh ;)
> Yes... but it's our fault :p
>>
>> The more I think about the new breakage, the more I think the cause is
>> probably FreeBSD. Obviously something is missing in connection with the
>> ports for qt5-core and py-qt5 to be able to use qt5-positioning similar
>> to the functionality for qt5-location as well ...
>>
>> I would be interested in your opinion on this. Are some additions under
>> Mk/Uses/ in qt.mk, qt-dist.mk and/or pyqt.mk necessary, in order to be
>> able to use QtPositioning and thus also the missing SIP file?
> 
> Yes, QtPositioning is in qt5-location.
> 
> However, py-qt5-location does not have the QtPositioningmod.sip

Riverbankcomputing listed qtpositioning as a module belonging to PyQt5:

https://www.riverbankcomputing.com/static/Docs/PyQt5/introduction.html#pyqt5-components

https://www.riverbankcomputing.com/static/Docs/PyQt5/api/qtpositioning/qtpositioning-module.html

> 
> Moreover, our qt5-location have only QtPositioning. I think we are
> missing the QtPositioningQuick part as I saw on openbsd [1] [2]
> 
> Maybe we should try to add Qml modules too in our qt5-location [3]

I do not think that we need Qml modules linked into qt5-location for that.

Our port devel/py-qt5-core indeed has the needed files like
sip/QtPositioning/QtPositioningmod.sip inside, but for some reason they
are not installed :(

Something like done for the port print/py-qt5-printsupport should to the
trick with QtPosition, shouldn't it?


I prepared a patch, which seems to be sufficient to get the needed
functionality. At least qgis-devel aka v3.21.0 builds again :)

Could you please try (and test) the attached patch, if it works for you?

If the patch is ok, we could put it in a Phabricator for the kde folks ;)

Best wishes,
Rainer

> 
> cc kde team ;)
> 
> [1] https://github.com/openbsd/ports/blob/master/x11/py-qt5/pkg/PLIST#L562
> 
> [2]
> https://github.com/openbsd/ports/blob/305480aec88293c3cee34d2d9ffd7ae096ed1bbf/x11/qt5/qtlocation/Makefile#L13
> 
> 
> [3]
> https://github.com/freebsd/freebsd-ports-kde/blob/main/devel/qt5-location/Makefile#L11
> 
> 
>> I have no experience with patching these parts of the port system and
>> find the rules quite complicated.
> I'll try some stuff on Monday.
>>
>> Many thanks for any answer. I am looking forward to hear from you :)
>>
>> Best wishes,
>> Rainer
> 
> All the best,
> 
> Loïc
> 

commit 0f79d7d36afa757d26799cc8826c06ed62f5fa3b
Author: Rainer Hurling <rhur...@freebsd.org>
Date:   Sat Jun 19 22:37:54 2021 +0200

    devel/py-qt5-positioning: New port - Provide PyQt5 QtPositioning module
    
    This PyQt5 module is needed for the next release of graphics/QGIS.

diff --git a/Mk/Uses/pyqt.mk b/Mk/Uses/pyqt.mk
index 0c5c2b4775e0..d926c157da67 100644
--- a/Mk/Uses/pyqt.mk
+++ b/Mk/Uses/pyqt.mk
@@ -87,6 +87,7 @@ _USE_PYQT_LANG=		qml
 _USE_PYQT_MISC=		demo
 _USE_PYQT_MULTIMEDIA=	multimedia multimediawidgets
 _USE_PYQT_NET=		network networkauth
+_USE_PYQT_POSITIONING=	positioning
 _USE_PYQT_PRINT=	printsupport
 _USE_PYQT_TEXTPROC=	xml xmlpatterns
 _USE_PYQT_WWW=		webchannel webengine webkit webkitwidgets websockets
@@ -103,6 +104,7 @@ _USE_PYQT_ALL=		${_USE_PYQT_COMMS} \
 			${_USE_PYQT_MISC} \
 			${_USE_PYQT_MULTIMEDIA} \
 			${_USE_PYQT_NET} \
+			${_USE_PYQT_POSITIONING} \
 			${_USE_PYQT_PRINT} \
 			${_USE_PYQT_TEXTPROC} \
 			${_USE_PYQT_WWW} \
@@ -159,6 +161,7 @@ py-multimediawidgets_DESC=	Python bindings for QtMultimediaWidgets module
 py-network_DESC=		Python bindings for QtNetwork module
 py-networkauth_DESC=		Python bindings for QtNetworkAuth module
 py-opengl_DESC=			Python bindings for QtOpenGL module
+py-positioning_DESC=		Python bindings for QtPositioning module
 py-printsupport_DESC=		Python bindings for Printsupport module
 py-qml_DESC=			Python bindings for Qml module
 py-qscintilla2_DESC=		Python bindings for QScintilla2
diff --git a/Mk/Uses/qt.mk b/Mk/Uses/qt.mk
index 8479ed2b0c13..6591859f5e69 100644
--- a/Mk/Uses/qt.mk
+++ b/Mk/Uses/qt.mk
@@ -136,8 +136,8 @@ _USE_QT_ALL+=	sql-ibase
 
 _USE_QT5_ONLY=		3d buildtools charts concurrent connectivity \
 			core datavis3d diag examples gamepad \
-			graphicaleffects location networkauth paths phonon4 plugininfo printsupport \
-			qdbus qdoc qdoc-data qev quick3d quickcontrols quickcontrols2 \
+			graphicaleffects location networkauth paths phonon4 plugininfo positioning \
+			printsupport qdbus qdoc qdoc-data qev quick3d quickcontrols quickcontrols2 \
 			quicktimeline remoteobjects scxml sensors serialbus serialport speech \
 			sql-tds uiplugin uitools virtualkeyboard wayland webchannel webglplugin \
 			webengine websockets websockets-qml webview widgets x11extras
@@ -237,6 +237,9 @@ qt-phonon4_LIB=		libphonon4${_QT_RELNAME}.so
 qt-plugininfo_PORT=	sysutils/${_QT_RELNAME}-qtplugininfo
 qt-plugininfo_PATH=	${LOCALBASE}/${QT_BINDIR_REL}/qtplugininfo
 
+qt-positioning_PORT=	devel/${_QT_RELNAME}-positioning
+qt-positioning_LIB=	libQt${_QT_LIBVER}Positioning.so
+
 qt-printsupport_PORT=	print/${_QT_RELNAME}-printsupport
 qt-printsupport_LIB=	libQt${_QT_LIBVER}PrintSupport.so
 
diff --git a/devel/py-qt5-positioning/Makefile b/devel/py-qt5-positioning/Makefile
new file mode 100644
index 000000000000..272e8a877b32
--- /dev/null
+++ b/devel/py-qt5-positioning/Makefile
@@ -0,0 +1,28 @@
+PORTNAME=	positioning
+CATEGORIES=	devel python
+
+MAINTAINER=	k...@freebsd.org
+COMMENT=	Python bindings for the Qt5 toolkit, QtPositioning module
+
+CONFIGURE_ARGS=	--enable QtPositioning
+PYQT_DIST=	yes
+
+USES=		gl python:3.5+ pyqt:5 qt:5
+USE_GL=		gl
+USE_PYQT=	sip_build core_run widgets_run
+USE_PYTHON=	concurrent flavors py3kplist
+USE_QT=		core gui positioning widgets qmake_build
+
+OPTIONS_DEFINE=	API DEBUG
+OPTIONS_DEFAULT=API
+OPTIONS_SUB=	yes
+
+API_DESC=		Install QtPositioning API for QScintilla2
+API_CONFIGURE_ON=	--qsci-api --qsci-api-destdir=${PYQT_APIDIR}
+API_CONFIGURE_OFF=	--no-qsci-api
+API_LIB_DEPENDS=	libqscintilla2_qt5.so:devel/qscintilla2-qt5
+DEBUG_CONFIGURE_ON=	--debug --trace
+
+post-install:
+	${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/PyQt5/QtPositioning.so
+.include <bsd.port.mk>
diff --git a/devel/py-qt5-positioning/pkg-descr b/devel/py-qt5-positioning/pkg-descr
new file mode 100644
index 000000000000..c0fac6e59c27
--- /dev/null
+++ b/devel/py-qt5-positioning/pkg-descr
@@ -0,0 +1,4 @@
+PyQt5 is a set of Python bindings for Digia's Qt5 application framework.
+This package provides the QtPositioning module.
+
+WWW: https://riverbankcomputing.com/software/pyqt
diff --git a/devel/py-qt5-positioning/pkg-plist b/devel/py-qt5-positioning/pkg-plist
new file mode 100644
index 000000000000..0fee6b624147
--- /dev/null
+++ b/devel/py-qt5-positioning/pkg-plist
@@ -0,0 +1,19 @@
+%%PYTHON_SITELIBDIR%%/PyQt5/QtPositioning.pyi
+%%PYTHON_SITELIBDIR%%/PyQt5/QtPositioning.so
+%%PYQT_SIPDIR%%/QtPositioning/QtPositioningmod.sip
+%%PYQT_SIPDIR%%/QtPositioning/qgeoaddress.sip
+%%PYQT_SIPDIR%%/QtPositioning/qgeoareamonitorinfo.sip
+%%PYQT_SIPDIR%%/QtPositioning/qgeoareamonitorsource.sip
+%%PYQT_SIPDIR%%/QtPositioning/qgeocircle.sip
+%%PYQT_SIPDIR%%/QtPositioning/qgeocoordinate.sip
+%%PYQT_SIPDIR%%/QtPositioning/qgeolocation.sip
+%%PYQT_SIPDIR%%/QtPositioning/qgeopath.sip
+%%PYQT_SIPDIR%%/QtPositioning/qgeopolygon.sip
+%%PYQT_SIPDIR%%/QtPositioning/qgeopositioninfo.sip
+%%PYQT_SIPDIR%%/QtPositioning/qgeopositioninfosource.sip
+%%PYQT_SIPDIR%%/QtPositioning/qgeorectangle.sip
+%%PYQT_SIPDIR%%/QtPositioning/qgeosatelliteinfo.sip
+%%PYQT_SIPDIR%%/QtPositioning/qgeosatelliteinfosource.sip
+%%PYQT_SIPDIR%%/QtPositioning/qgeoshape.sip
+%%PYQT_SIPDIR%%/QtPositioning/qnmeapositioninfosource.sip
+%%API%%%%PYQT_APIDIR%%/api/python/QtPositioning.api
diff --git a/devel/py-qt5/Makefile b/devel/py-qt5/Makefile
index 43f4fe2819c8..1d3427a6b6f5 100644
--- a/devel/py-qt5/Makefile
+++ b/devel/py-qt5/Makefile
@@ -13,7 +13,7 @@ USE_PYTHON=	concurrent flavors py3kplist
 # portedit merge -i -e "OPTIONS_DEFINE=$(make -V _USE_PYQT_ALL:tu | tr '\n' ' ')" .
 OPTIONS_DEFINE=		CORE CHART DBUS DBUSSUPPORT DEMO DESIGNER DESIGNERPLUGIN \
 			GUI HELP MULTIMEDIA MULTIMEDIAWIDGETS NETWORK NETWORKAUTH \
-			OPENGL PRINTSUPPORT QML QSCINTILLA2 QUICK QUICKWIDGETS \
+			OPENGL POSITIONING PRINTSUPPORT QML QSCINTILLA2 QUICK QUICKWIDGETS \
 			SENSORS SERIALPORT SQL SVG TEST WEBCHANNEL WEBENGINE \
 			WEBKIT WEBKITWIDGETS WIDGETS WEBSOCKETS XML XMLPATTERNS \
 			SIP

Reply via email to