So, below I have some patches to py-qt5 and the packages that depend on it. I added ${PYVERSSUFFIX} to bin/pylupdate5-${PYVERSSUFFIX} bin/pyrcc5-${PYVERSSUFFIX} bin/pyuic5-${PYVERSSUFFIX} qt5/plugins/PyQt5-${PYVERSSUFFIX}/libpyqt5qmlplugin.so qt5/plugins/designer${PYVERSSUFFIX}/libpyqt5.so qt5/qsci${PYVERSSUFFIX}/api/python/PyQt5.api and actually fewer packages cared than I expected. In particular, PyQt5.api and libpyqt5qmlplugin.so never seem to be used. I did however run into some broken packages that already seemed to be broken before my changes. I had to do the same thing basically for py-qt5-scintilla, since you also get that once per python version. With this I can finally install both misc/calibre and emulators/fs-uae-launcher at the same time (which both use py-qt5 but with completely incompatible python versions). Possibly the same python-versioning needs to be done for py-qt4, but there I didn't personally run into any conflicts yet. I am considering whether the ALTERNATIVES for pyrcc5 etc are even necessary. I don't want the optional presence of alternative names to hide the fact that a package's build is broken. Is there anything that I've missed? Summary of my findings (and below the diff): OK WITHOUT CHANGE: ./emulators/fs-uae-arcade/Makefile:DEPENDS+= ${PYPKGPREFIX}-qt5>=5.4:../../x11/py-qt5 ./emulators/fs-uae-launcher/Makefile:DEPENDS+= ${PYPKGPREFIX}-qt5>=5.4:../../x11/py-qt5 ./misc/calibre/Makefile:.include "../../x11/py-qt5/buildlink3.mk" ./games/kajongg/Makefile:.include "../../x11/py-qt5/buildlink3.mk" ./emulators/gns3-gui/Makefile:DEPENDS+= ${PYPKGPREFIX}-qt5-[0-9]*:../../x11/py-qt5 OK WITH CHANGE: ./x11/py-qt5-qscintilla/Makefile:.include "../../x11/py-qt5/buildlink3.mk" somewhat surprisingly has no references to PyQt5.api versioned qt5/qsci${PYVERSSUFFIX}/api/python/QScintilla2.api ./geography/qgis/options.mk:.include "../../x11/py-qt5-qscintilla/buildlink3.mk" I don't know how to test this but it seemed ok. FAILS FOR OTHER REASONS ./sysutils/dupeguru/Makefile:DEPENDS+= ${PYPKGPREFIX}-qt5-[0-9]*:../../x11/py-qt5 uses pyrcc5, patched to pyrcc5-${PYVERSSUFFIX} fails to build anyway (lupdate? => pylupdate5-3.7? /usr/pkg/qt5/bin/lupdate?). ./finance/moneyguru/Makefile:DEPENDS+= ${PYPKGPREFIX}-qt5-[0-9]*:../../x11/py-qt5 uses pyrcc5, patched to pyrcc5-${PYVERSSUFFIX} fails to build anyway, same as sysutils/dupeguru ./editors/retext/Makefile:.include "../../x11/py-qt5/buildlink3.mk" running build_translations Failed to build translations: [Errno 2] No such file or directory: 'lrelease': 'lrelease' Maybe /usr/pkg/qt5/bin needs to be in $PATH. ./devel/py-tortoisehg/Makefile:.include "../../x11/py-qt5-qscintilla/buildlink3.mk" builds but fails at runtime: "This version of TortoiseHg requires Mercurial version 4.9.n to 5.1.n, but found 5.2" ./print/hplip/options.mk:.include "../../x11/py-qt5/buildlink3.mk" need to set "PKG_OPTIONS.hplip+=qt5". Build broken because PLIST.qt5 contains files related to qt4 (which don't get built). ./graphics/veusz/Makefile:.include "../../x11/py-qt5/buildlink3.mk" builds but fails at runtime: VO table import: astropy module not available SAMP: sampy module not available Segmentation fault (core dumped) cvs diff: Diffing x11/py-qt5 Index: x11/py-qt5/ALTERNATIVES =================================================================== RCS file: x11/py-qt5/ALTERNATIVES diff -N x11/py-qt5/ALTERNATIVES --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ x11/py-qt5/ALTERNATIVES 22 Jan 2020 19:32:57 -0000 @@ -0,0 +1,3 @@ +bin/pylupdate5 @PREFIX@/bin/pylupdate5-${PYVERSSUFFIX} +bin/pyrcc5 @PREFIX@/bin/pyrcc5-${PYVERSSUFFIX} +bin/pyuic5 @PREFIX@/bin/pyuic5-${PYVERSSUFFIX} Index: x11/py-qt5/Makefile =================================================================== RCS file: /cvsroot/pkgsrc/x11/py-qt5/Makefile,v retrieving revision 1.49 diff -u -r1.49 Makefile --- x11/py-qt5/Makefile 18 Nov 2019 19:44:51 -0000 1.49 +++ x11/py-qt5/Makefile 22 Jan 2020 19:32:57 -0000 @@ -1,6 +1,7 @@ # $NetBSD: Makefile,v 1.49 2019/11/18 19:44:51 adam Exp $ DISTNAME= PyQt5-5.13.2 +PKGREVISION= 1 PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/PyQt5/qt5/} CATEGORIES= x11 python MASTER_SITES= https://www.riverbankcomputing.com/static/Downloads/PyQt5/${PKGVERSION_NOREV}/ @@ -21,9 +22,12 @@ CONFIGURE_ARGS+= -b ${PREFIX}/bin CONFIGURE_ARGS+= -d ${PREFIX}/${PYSITELIB} CONFIGURE_ARGS+= --sipdir ${PREFIX}/share/sip${PYVERSSUFFIX}/PyQt5 +CONFIGURE_ARGS+= --qml-plugindir ${PREFIX}/qt5/plugins/PyQt5-${PYVERSSUFFIX}/ +CONFIGURE_ARGS+= --designer-plugindir ${PREFIX}/qt5/plugins/designer${PYVERSSUFFIX}/ CONFIGURE_ARGS+= -q ${QTDIR}/bin/qmake CONFIGURE_ARGS+= --confirm-license CONFIGURE_ARGS+= --qsci-api +CONFIGURE_ARGS+= --qsci-api-destdir ${PREFIX}/qt5/qsci${PYVERSSUFFIX} CONFIGURE_ARGS+= --sip ${BUILDLINK_PREFIX.py-sip}/bin/sip${PYVERSSUFFIX} CONFIGURE_ARGS+= --verbose @@ -60,6 +64,13 @@ .else PLIST.x11= yes .endif +post-install: fix-alternatives + +fix-alternatives: + cd ${DESTDIR}${PREFIX}/bin && \ + ${MV} pylupdate5 pylupdate5-${PYVERSSUFFIX} && \ + ${MV} pyrcc5 pyrcc5-${PYVERSSUFFIX} && \ + ${MV} pyuic5 pyuic5-${PYVERSSUFFIX} || ${TRUE} .include "../../lang/python/extension.mk" .include "../../sysutils/dbus-python-common/buildlink3.mk" Index: x11/py-qt5/PLIST =================================================================== RCS file: /cvsroot/pkgsrc/x11/py-qt5/PLIST,v retrieving revision 1.13 diff -u -r1.13 PLIST --- x11/py-qt5/PLIST 29 Oct 2019 19:17:09 -0000 1.13 +++ x11/py-qt5/PLIST 22 Jan 2020 19:32:57 -0000 @@ -1,7 +1,7 @@ @comment $NetBSD: PLIST,v 1.13 2019/10/29 19:17:09 bouyer Exp $ -bin/pylupdate5 -bin/pyrcc5 -bin/pyuic5 +bin/pylupdate5-${PYVERSSUFFIX} +bin/pyrcc5-${PYVERSSUFFIX} +bin/pyuic5-${PYVERSSUFFIX} ${PYSITELIB}/PyQt5-${PKGVERSION}.dist-info/INSTALLER ${PYSITELIB}/PyQt5-${PKGVERSION}.dist-info/METADATA ${PYSITELIB}/PyQt5-${PKGVERSION}.dist-info/RECORD @@ -106,9 +106,9 @@ ${PYSITELIB}/PyQt5/uic/widget-plugins/qtwebenginewidgets.py ${PYSITELIB}/PyQt5/uic/widget-plugins/qtwebkit.py ${PYSITELIB}/dbus/mainloop/pyqt5.so -qt5/plugins/PyQt5/libpyqt5qmlplugin.so -qt5/plugins/designer/libpyqt5.so -qt5/qsci/api/python/PyQt5.api +qt5/plugins/PyQt5-${PYVERSSUFFIX}/libpyqt5qmlplugin.so +qt5/plugins/designer${PYVERSSUFFIX}/libpyqt5.so +qt5/qsci${PYVERSSUFFIX}/api/python/PyQt5.api share/sip${PYVERSSUFFIX}/PyQt5/Enginio/Enginiomod.sip share/sip${PYVERSSUFFIX}/PyQt5/Enginio/enginio.sip share/sip${PYVERSSUFFIX}/PyQt5/Enginio/enginioclient.sip cvs diff: Diffing x11/py-qt5/patches cvs diff: Diffing x11/py-qt5-qscintilla Index: x11/py-qt5-qscintilla/Makefile =================================================================== RCS file: /cvsroot/pkgsrc/x11/py-qt5-qscintilla/Makefile,v retrieving revision 1.2 diff -u -r1.2 Makefile --- x11/py-qt5-qscintilla/Makefile 29 Oct 2019 19:17:09 -0000 1.2 +++ x11/py-qt5-qscintilla/Makefile 22 Jan 2020 19:32:57 -0000 @@ -5,7 +5,7 @@ PKGNAME= ${PYPKGPREFIX}-qt5-${DISTNAME:tl:S/_gpl-/-/} COMMENT= QScintilla -- Python bindings -PKGREVISION= 1 +PKGREVISION= 2 WRKSRC= ${WRKDIR}/${DISTNAME}/Python @@ -22,7 +22,8 @@ --qmake=${QTDIR}/bin/qmake --sip=${PREFIX}/bin/sip${PYVERSSUFFIX} \ --pyqt-sipdir=${PREFIX}/share/sip${PYVERSSUFFIX}/PyQt5 \ --qsci-sipdir=${PREFIX}/share/sip${PYVERSSUFFIX}/PyQt5 \ - --qsci-libdir=${QTDIR}/lib + --qsci-libdir=${QTDIR}/lib \ + --apidir=${QTDIR}/qsci${PYVERSSUFFIX} .include "../../lang/python/extension.mk" .include "../../x11/py-sip/buildlink3.mk" Index: x11/py-qt5-qscintilla/PLIST =================================================================== RCS file: /cvsroot/pkgsrc/x11/py-qt5-qscintilla/PLIST,v retrieving revision 1.2 diff -u -r1.2 PLIST --- x11/py-qt5-qscintilla/PLIST 29 Oct 2019 19:17:09 -0000 1.2 +++ x11/py-qt5-qscintilla/PLIST 22 Jan 2020 19:32:57 -0000 @@ -4,7 +4,7 @@ ${PYSITELIB}/QScintilla-${PKGVERSION}.dist-info/INSTALLER ${PYSITELIB}/QScintilla-${PKGVERSION}.dist-info/METADATA ${PYSITELIB}/QScintilla-${PKGVERSION}.dist-info/RECORD -qt5/qsci/api/python/QScintilla2.api +qt5/qsci${PYVERSSUFFIX}/api/python/QScintilla2.api share/sip${PYVERSSUFFIX}/PyQt5/Qsci/qsciabstractapis.sip share/sip${PYVERSSUFFIX}/PyQt5/Qsci/qsciapis.sip share/sip${PYVERSSUFFIX}/PyQt5/Qsci/qscicommand.sip cvs diff: Diffing sysutils/dupeguru Index: sysutils/dupeguru/Makefile =================================================================== RCS file: /cvsroot/pkgsrc/sysutils/dupeguru/Makefile,v retrieving revision 1.7 diff -u -r1.7 Makefile --- sysutils/dupeguru/Makefile 4 Nov 2019 21:28:44 -0000 1.7 +++ sysutils/dupeguru/Makefile 22 Jan 2020 19:32:57 -0000 @@ -2,7 +2,7 @@ DISTNAME= dupeguru-src-4.0.3 PKGNAME= ${DISTNAME:S/-src//} -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= sysutils MASTER_SITES= https://download.hardcoded.net/ @@ -29,10 +29,12 @@ PYTHON_VERSIONS_INCOMPATIBLE= 27 REPLACE_PYTHON+= qt/run_template.py +MAKE_ENV+= PYVERSSUFFIX=${PYVERSSUFFIX} + INSTALLATION_DIRS= bin share/applications share/dupeguru do-build: - cd ${WRKSRC} && ${PYTHONBIN} build.py + cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ${PYTHONBIN} build.py ${CHMOD} +x ${WRKSRC}/run.py do-install: Index: sysutils/dupeguru/distinfo =================================================================== RCS file: /cvsroot/pkgsrc/sysutils/dupeguru/distinfo,v retrieving revision 1.2 diff -u -r1.2 distinfo --- sysutils/dupeguru/distinfo 14 Mar 2018 17:11:26 -0000 1.2 +++ sysutils/dupeguru/distinfo 22 Jan 2020 19:32:57 -0000 @@ -4,5 +4,7 @@ RMD160 (dupeguru-src-4.0.3.tar.gz) = 5cd2b7f93276fcd8f09b699cfec5246f7dc5abed SHA512 (dupeguru-src-4.0.3.tar.gz) = dc8a5a122ad1d3d235825a498fb75b192566d3b5a33382ebb0002a361428af5cc453b143002ea3f57a9cb6ee30ce49f0b9f5a54bce2a90364fb1b92e102a289a Size (dupeguru-src-4.0.3.tar.gz) = 686580 bytes +SHA1 (patch-Makefile) = 809ee7de40622a0e348df60b1251f2bed3c49b97 +SHA1 (patch-build.py) = 074a9adb4e48c07b637abe9183d49ece7d5520dc SHA1 (patch-hscommon_sphinxgen.py) = cd558d14733d394e7adf2b6b0c826dda5eed689f SHA1 (patch-qt_platform.py) = e97e226b53f57f8c4e9bf21f4726e024bb0b2d67 cvs diff: Diffing sysutils/dupeguru/patches Index: sysutils/dupeguru/patches/patch-Makefile =================================================================== RCS file: sysutils/dupeguru/patches/patch-Makefile diff -N sysutils/dupeguru/patches/patch-Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sysutils/dupeguru/patches/patch-Makefile 22 Jan 2020 19:32:57 -0000 @@ -0,0 +1,15 @@ +$NetBSD$ + +pyrcc5 is python-version-specific. + +--- Makefile.orig 2016-11-25 01:04:31.000000000 +0000 ++++ Makefile +@@ -54,7 +54,7 @@ build/help : | env + ./env/bin/python build.py --doc + + qt/dg_rc.py : qt/dg.qrc +- pyrcc5 qt/dg.qrc > qt/dg_rc.py ++ pyrcc5-${PYVERSSUFFIX} qt/dg.qrc > qt/dg_rc.py + + i18n: $(mofiles) + Index: sysutils/dupeguru/patches/patch-build.py =================================================================== RCS file: sysutils/dupeguru/patches/patch-build.py diff -N sysutils/dupeguru/patches/patch-build.py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sysutils/dupeguru/patches/patch-build.py 22 Jan 2020 19:32:57 -0000 @@ -0,0 +1,16 @@ +$NetBSD$ + +pyrcc5 is python-version-specific. + +--- build.py.orig 2016-11-25 01:04:31.000000000 +0000 ++++ build.py +@@ -164,7 +164,8 @@ def build_qt(dev): + print("Building localizations") + build_localizations('qt') + print("Building Qt stuff") +- print_and_do("pyrcc5 {0} > {1}".format(op.join('qt', 'dg.qrc'), op.join('qt', 'dg_rc.py'))) ++ pyrcc5 = "pyrcc5-" + os.environ["PYVERSSUFFIX"] ++ print_and_do(pyrcc5 +" {0} > {1}".format(op.join('qt', 'dg.qrc'), op.join('qt', 'dg_rc.py'))) + fix_qt_resource_file(op.join('qt', 'dg_rc.py')) + build_help() + print("Creating the run.py file") cvs diff: Diffing finance/moneyguru Index: finance/moneyguru/Makefile =================================================================== RCS file: /cvsroot/pkgsrc/finance/moneyguru/Makefile,v retrieving revision 1.24 diff -u -r1.24 Makefile --- finance/moneyguru/Makefile 2 Nov 2019 16:08:47 -0000 1.24 +++ finance/moneyguru/Makefile 22 Jan 2020 19:32:57 -0000 @@ -2,7 +2,7 @@ DISTNAME= moneyguru-src-2.11.0 PKGNAME= ${DISTNAME:S/-src//} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= finance MASTER_SITES= https://download.hardcoded.net/ @@ -40,8 +40,10 @@ PLIST_SUBST+= BASE_ARCH=${BASE_ARCH:Q} +MAKE_ENV+= PYVERSSUFFIX=${PYVERSSUFFIX} + do-build: - cd ${WRKSRC} && ${PYTHONBIN} build.py + cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ${PYTHONBIN} build.py ${CHMOD} +x ${WRKSRC}/run.py do-install: Index: finance/moneyguru/distinfo =================================================================== RCS file: /cvsroot/pkgsrc/finance/moneyguru/distinfo,v retrieving revision 1.10 diff -u -r1.10 distinfo --- finance/moneyguru/distinfo 4 Sep 2017 14:45:43 -0000 1.10 +++ finance/moneyguru/distinfo 22 Jan 2020 19:32:57 -0000 @@ -4,3 +4,5 @@ RMD160 (moneyguru-src-2.11.0.tar.gz) = 8e04b57bd3100ce28fb003c528000463f9d0eb87 SHA512 (moneyguru-src-2.11.0.tar.gz) = fae1c8140ed36f3bd33a7533938ba59bffeda898932c005c5a5e115d6108dc43a6f53cc65608340fd5501945b13604d136b8ac083d2daa3876bdc070d619c022 Size (moneyguru-src-2.11.0.tar.gz) = 2658749 bytes +SHA1 (patch-Makefile) = 1dced1ca961e74e5adcb2f7013dee04efd78d44e +SHA1 (patch-build.py) = e7084efd4ba8543c4fd5f93cddde7a840bf19d27 cvs diff: Diffing finance/moneyguru/patches Index: finance/moneyguru/patches/patch-Makefile =================================================================== RCS file: finance/moneyguru/patches/patch-Makefile diff -N finance/moneyguru/patches/patch-Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ finance/moneyguru/patches/patch-Makefile 22 Jan 2020 19:32:57 -0000 @@ -0,0 +1,15 @@ +$NetBSD$ + +pyrcc5 is python-version-specific. + +--- Makefile.orig 2017-08-23 23:26:50.000000000 +0000 ++++ Makefile +@@ -71,7 +71,7 @@ endif + $(VENV_PYTHON) build.py --doc + + qt/mg_rc.py : qt/mg.qrc +- pyrcc5 qt/mg.qrc > qt/mg_rc.py ++ pyrcc5-${PYVERSSUFFIX} qt/mg.qrc > qt/mg_rc.py + + i18n: $(mofiles) + Index: finance/moneyguru/patches/patch-build.py =================================================================== RCS file: finance/moneyguru/patches/patch-build.py diff -N finance/moneyguru/patches/patch-build.py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ finance/moneyguru/patches/patch-build.py 22 Jan 2020 19:32:57 -0000 @@ -0,0 +1,19 @@ +$NetBSD$ + +pyrcc5 is python-version-specific. + +--- build.py.orig 2017-08-23 23:26:50.000000000 +0000 ++++ build.py +@@ -81,9 +81,10 @@ def clean(): + def build_qt(dev): + qrc_path = op.join('qt', 'mg.qrc') + pyrc_path = op.join('qt', 'mg_rc.py') +- ret = print_and_do("pyrcc5 {} > {}".format(qrc_path, pyrc_path)) ++ pyrcc5 = "pyrcc5-" + os.environ["PYVERSSUFFIX"] ++ ret = print_and_do(pyrcc5 +" {} > {}".format(qrc_path, pyrc_path)) + if ret != 0: +- raise RuntimeError("pyrcc5 call failed with code {}. Aborting build".format(ret)) ++ raise RuntimeError(pyrcc5 + " call failed with code {}. Aborting build".format(ret)) + build_help() + + def build_help(): cvs diff: Diffing editors/retext cvs diff: Diffing devel/py-tortoisehg cvs diff: Diffing devel/py-tortoisehg/patches cvs diff: Diffing geography/qgis Index: geography/qgis/Makefile =================================================================== RCS file: /cvsroot/pkgsrc/geography/qgis/Makefile,v retrieving revision 1.80 diff -u -r1.80 Makefile --- geography/qgis/Makefile 3 Nov 2019 19:30:34 -0000 1.80 +++ geography/qgis/Makefile 22 Jan 2020 19:32:57 -0000 @@ -1,6 +1,7 @@ # $NetBSD: Makefile,v 1.80 2019/11/03 19:30:34 rillig Exp $ DISTNAME= qgis-3.8.3 +PKGREVISION= 1 CATEGORIES= geography MASTER_SITES= https://qgis.org/downloads/ EXTRACT_SUFX= .tar.bz2 @@ -40,6 +41,13 @@ SUBST_SED.xapple+= -e 's,APPLE,XAPPLE,' SUBST_SED.xapple+= -e 's,MACOSX_BUNDLE ,,' +SUBST_CLASSES+= pyqt +SUBST_STAGE.pyqt= pre-configure +SUBST_MESSAGE.pyqt= Use correct python version for PyQt5 programs +SUBST_FILES.pyqt= cmake/PyQtMacros.cmake +SUBST_SED.pyqt+= -e '/^SET/s,pyuic5,&-${PYVERSSUFFIX},' +SUBST_SED.pyqt+= -e '/^SET/s,pyrcc5,&-${PYVERSSUFFIX},' + CMAKE_ARGS+= -DWITH_QTWEBKIT=FALSE CMAKE_ARGS+= -DQWT_DIR=${QWT_DIR} # Useful for package development: cvs diff: Diffing geography/qgis/patches cvs diff: Diffing print/hplip cvs diff: Diffing print/hplip/patches
Attachment:
signature.asc
Description: PGP signature