On Fri Nov 01, 2024 at 06:32:06PM +0100, Landry Breuil wrote:
> hi,
>
> i needed this to testbuild geo/qgis against qt6, and those two diffs
> add support for a qt6 FLAVOR, vastly inspired by what was present some
> years ago when those ports were qt4 by default and had a qt5 FLAVOR.
>
> the diffs are somewhat simple, with some vars i make the PLISTs
> FLAVOR-independent. I welcome eyes on the @pkgpath/@conflicts, as both
> FLAVORs are coinstallable without problems.
>
> feedback welcome.
Feedback below, otherwise it builds and can also be installed both.
>
> Landry
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/editors/py-qscintilla/Makefile,v
> diff -u -r1.37 Makefile
> --- Makefile 6 May 2024 12:23:33 -0000 1.37
> +++ Makefile 1 Nov 2024 17:20:07 -0000
> @@ -4,7 +4,7 @@
> MODPY_EGG_VERSION = ${VERSION}
> DISTNAME = QScintilla_src-${VERSION}
> PKGNAME = py-qscintilla-${VERSION}
> -REVISION = 0
> +REVISION = 1
Qt5 only REVISION bump? Othweise qt6 starts with p1.
>
> CATEGORIES = editors x11 devel
>
> @@ -15,23 +15,37 @@
>
> SITES = https://www.riverbankcomputing.com/static/Downloads/QScintilla/${VERSION}/
>
> -WANTLIB += ${COMPILER_LIBCXX} GL m Qt5Core Qt5Gui Qt5PrintSupport
> -WANTLIB += Qt5Widgets qscintilla2_qt5
> +WANTLIB += ${COMPILER_LIBCXX} GL m
>
> -MODULES = lang/python \
> - x11/qt5
> +MODULES = lang/python
> +
> +FLAVORS = python3 qt6
> +FLAVOR += python3
> +
> +.if ${FLAVOR:Mqt6}
> +FULLPKGNAME = py3-qscintilla-qt6-${VERSION}
> +MODULES += x11/qt6
> +QTVER = qt6
> +PYQTVER = PyQt6
> +PYQTMOD = qscimod6
> +PYQTPREFIX = PyQt6_
> +WANTLIB += Qt6Core Qt6Gui Qt6PrintSupport Qt6Widgets qscintilla2_qt6
> +LIB_DEPENDS = editors/qscintilla,qt6=${VERSION}
> +.else
> +MODULES += x11/qt5
> QTVER = qt5
> PYQTVER = PyQt5
> -
> -FLAVORS = python3
> -FLAVOR = python3
> +PYQTMOD = qscimod5
> +PYQTPREFIX =
> +WANTLIB += Qt5Core Qt5Gui Qt5PrintSupport Qt5Widgets qscintilla2_qt5
> +LIB_DEPENDS = editors/qscintilla=${VERSION}
> +.endif
>
> BUILD_DEPENDS = devel/py-qt-builder${MODPY_FLAVOR} \
> ${RUN_DEPENDS}
> RUN_DEPENDS = devel/py-sip${MODPY_FLAVOR} \
> x11/dbus-python${MODPY_FLAVOR} \
> - x11/py-qt5${MODPY_FLAVOR}
> -LIB_DEPENDS = editors/qscintilla=${VERSION}
> + x11/py-${QTVER}${MODPY_FLAVOR}
>
> COMPILER = base-clang ports-gcc base-gcc
Please move COMPILER above WANTLIB like you did it form qscintilla.
>
> @@ -52,11 +66,11 @@
>
> FAKE_FLAGS = INSTALL_ROOT=${DESTDIR}
>
> -SUBST_VARS += QTVER PYQTVER
> +SUBST_VARS += QTVER PYQTVER PYQTPREFIX PYQTMOD
>
> post-extract:
> # Needed to run sip-6.5+ sip-build
> - ln -sf ${MODQT5_QMAKE} ${WRKDIR}/bin/qmake
> - cp ${WRKSRC}/pyproject-qt5.toml ${WRKSRC}/pyproject.toml
> + ln -sf ${MODQT_QMAKE} ${WRKDIR}/bin/qmake
> + cp ${WRKSRC}/pyproject-${QTVER}.toml ${WRKSRC}/pyproject.toml
>
> .include <bsd.port.mk>
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/editors/py-qscintilla/pkg/PLIST,v
> diff -u -r1.11 PLIST
> --- pkg/PLIST 2 Sep 2023 10:58:56 -0000 1.11
> +++ pkg/PLIST 1 Nov 2024 17:20:07 -0000
> @@ -62,14 +62,14 @@
> lib/python${MODPY_VERSION}/site-packages/${PYQTVER}/bindings/Qsci/qscilexerxml.sip
> lib/python${MODPY_VERSION}/site-packages/${PYQTVER}/bindings/Qsci/qscilexeryaml.sip
> lib/python${MODPY_VERSION}/site-packages/${PYQTVER}/bindings/Qsci/qscimacro.sip
> -lib/python${MODPY_VERSION}/site-packages/${PYQTVER}/bindings/Qsci/qscimod5.sip
> +lib/python${MODPY_VERSION}/site-packages/${PYQTVER}/bindings/Qsci/${PYQTMOD}.sip
> lib/python${MODPY_VERSION}/site-packages/${PYQTVER}/bindings/Qsci/qscimodcommon.sip
> lib/python${MODPY_VERSION}/site-packages/${PYQTVER}/bindings/Qsci/qsciprinter.sip
> lib/python${MODPY_VERSION}/site-packages/${PYQTVER}/bindings/Qsci/qsciscintilla.sip
> lib/python${MODPY_VERSION}/site-packages/${PYQTVER}/bindings/Qsci/qsciscintillabase.sip
> lib/python${MODPY_VERSION}/site-packages/${PYQTVER}/bindings/Qsci/qscistyle.sip
> lib/python${MODPY_VERSION}/site-packages/${PYQTVER}/bindings/Qsci/qscistyledtext.sip
> -lib/python${MODPY_VERSION}/site-packages/QScintilla-${MODPY_EGG_VERSION}.dist-info/
> -lib/python${MODPY_VERSION}/site-packages/QScintilla-${MODPY_EGG_VERSION}.dist-info/INSTALLER
> -lib/python${MODPY_VERSION}/site-packages/QScintilla-${MODPY_EGG_VERSION}.dist-info/METADATA
> -lib/python${MODPY_VERSION}/site-packages/QScintilla-${MODPY_EGG_VERSION}.dist-info/RECORD
> +lib/python${MODPY_VERSION}/site-packages/${PYQTPREFIX}QScintilla-${MODPY_EGG_VERSION}.dist-info/
> +lib/python${MODPY_VERSION}/site-packages/${PYQTPREFIX}QScintilla-${MODPY_EGG_VERSION}.dist-info/INSTALLER
> +lib/python${MODPY_VERSION}/site-packages/${PYQTPREFIX}QScintilla-${MODPY_EGG_VERSION}.dist-info/METADATA
> +lib/python${MODPY_VERSION}/site-packages/${PYQTPREFIX}QScintilla-${MODPY_EGG_VERSION}.dist-info/RECORD
> ? build-i386.log
> ? build.log
> ? pkg/PLIST.ok
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/editors/qscintilla/Makefile,v
> diff -u -r1.35 Makefile
> --- Makefile 21 Sep 2023 12:22:34 -0000 1.35
> +++ Makefile 1 Nov 2024 17:19:52 -0000
> @@ -4,30 +4,47 @@
> VERSION = 2.14.1
> DISTNAME = QScintilla_src-${VERSION}
> PKGNAME = qscintilla-${VERSION}
> +REVISION = 0
Qt5 only REVISION bump? Othweise qt6 starts with p0
(qscintilla-qt6-2.14.1p0)
>
> CATEGORIES = editors x11
>
> -SHARED_LIBS += qscintilla2_qt5 2.0 # 15.0
> -
> HOMEPAGE = https://www.riverbankcomputing.com/software/qscintilla/
>
> # GPLv2/GPLv3
> PERMIT_PACKAGE = Yes
>
> -WANTLIB += ${COMPILER_LIBCXX} GL Qt5Core Qt5Gui Qt5PrintSupport
> -WANTLIB += Qt5Widgets m
> -
> SITES = https://www.riverbankcomputing.com/static/Downloads/QScintilla/${VERSION}/
>
> -MODULES = devel/qmake \
> - x11/qt5
> +MODULES = devel/qmake
>
> +SUBST_VARS += QTVER QTSUB
> SEPARATE_BUILD = No
>
> CONFIGURE_ENV = HOME=${WRKDIR}
>
> WRKSRC = ${WRKDIST}/src
>
> +FLAVORS = qt6
> +FLAVOR?=
> +
> +# C++17 (at least)
> +COMPILER= base-clang ports-clang ports-gcc
> +WANTLIB = ${COMPILER_LIBCXX} GL m
> +
> +.if ${FLAVOR} == "qt6"
> +FULLPKGNAME = qscintilla-qt6-${VERSION}
> +QTVER = qt6
> +QTSUB = share/qt6
> +MODULES += x11/qt6
> +SHARED_LIBS = qscintilla2_qt6 0.0 # 15.0
SHARED_LIBS should not be inside .if block. We don't do that in the
other ports.
> +WANTLIB += Qt6Core Qt6Gui Qt6PrintSupport Qt6Widgets
> +.else
> +QTVER = qt5
> +QTSUB = lib/qt5
> +MODULES += x11/qt5
> +SHARED_LIBS = qscintilla2_qt5 2.0 # 15.0
See above.
> +WANTLIB += Qt5Core Qt5Gui Qt5PrintSupport Qt5Widgets
> +.endif
> NO_TEST = Yes
>
> pre-configure:
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/editors/qscintilla/pkg/PLIST,v
> diff -u -r1.11 PLIST
> --- pkg/PLIST 2 Sep 2023 10:58:56 -0000 1.11
> +++ pkg/PLIST 1 Nov 2024 17:19:52 -0000
> @@ -1,89 +1,89 @@
> @conflict qscintilla-qt5-*
> @pkgpath editors/qscintilla,qt5
> -include/X11/qt5/Qsci/
> -include/X11/qt5/Qsci/qsciabstractapis.h
> -include/X11/qt5/Qsci/qsciapis.h
> -include/X11/qt5/Qsci/qscicommand.h
> -include/X11/qt5/Qsci/qscicommandset.h
> -include/X11/qt5/Qsci/qscidocument.h
> -include/X11/qt5/Qsci/qsciglobal.h
> -include/X11/qt5/Qsci/qscilexer.h
> -include/X11/qt5/Qsci/qscilexerasm.h
> -include/X11/qt5/Qsci/qscilexeravs.h
> -include/X11/qt5/Qsci/qscilexerbash.h
> -include/X11/qt5/Qsci/qscilexerbatch.h
> -include/X11/qt5/Qsci/qscilexercmake.h
> -include/X11/qt5/Qsci/qscilexercoffeescript.h
> -include/X11/qt5/Qsci/qscilexercpp.h
> -include/X11/qt5/Qsci/qscilexercsharp.h
> -include/X11/qt5/Qsci/qscilexercss.h
> -include/X11/qt5/Qsci/qscilexercustom.h
> -include/X11/qt5/Qsci/qscilexerd.h
> -include/X11/qt5/Qsci/qscilexerdiff.h
> -include/X11/qt5/Qsci/qscilexeredifact.h
> -include/X11/qt5/Qsci/qscilexerfortran.h
> -include/X11/qt5/Qsci/qscilexerfortran77.h
> -include/X11/qt5/Qsci/qscilexerhex.h
> -include/X11/qt5/Qsci/qscilexerhtml.h
> -include/X11/qt5/Qsci/qscilexeridl.h
> -include/X11/qt5/Qsci/qscilexerintelhex.h
> -include/X11/qt5/Qsci/qscilexerjava.h
> -include/X11/qt5/Qsci/qscilexerjavascript.h
> -include/X11/qt5/Qsci/qscilexerjson.h
> -include/X11/qt5/Qsci/qscilexerlua.h
> -include/X11/qt5/Qsci/qscilexermakefile.h
> -include/X11/qt5/Qsci/qscilexermarkdown.h
> -include/X11/qt5/Qsci/qscilexermasm.h
> -include/X11/qt5/Qsci/qscilexermatlab.h
> -include/X11/qt5/Qsci/qscilexernasm.h
> -include/X11/qt5/Qsci/qscilexeroctave.h
> -include/X11/qt5/Qsci/qscilexerpascal.h
> -include/X11/qt5/Qsci/qscilexerperl.h
> -include/X11/qt5/Qsci/qscilexerpo.h
> -include/X11/qt5/Qsci/qscilexerpostscript.h
> -include/X11/qt5/Qsci/qscilexerpov.h
> -include/X11/qt5/Qsci/qscilexerproperties.h
> -include/X11/qt5/Qsci/qscilexerpython.h
> -include/X11/qt5/Qsci/qscilexerruby.h
> -include/X11/qt5/Qsci/qscilexerspice.h
> -include/X11/qt5/Qsci/qscilexersql.h
> -include/X11/qt5/Qsci/qscilexersrec.h
> -include/X11/qt5/Qsci/qscilexertcl.h
> -include/X11/qt5/Qsci/qscilexertekhex.h
> -include/X11/qt5/Qsci/qscilexertex.h
> -include/X11/qt5/Qsci/qscilexerverilog.h
> -include/X11/qt5/Qsci/qscilexervhdl.h
> -include/X11/qt5/Qsci/qscilexerxml.h
> -include/X11/qt5/Qsci/qscilexeryaml.h
> -include/X11/qt5/Qsci/qscimacro.h
> -include/X11/qt5/Qsci/qsciprinter.h
> -include/X11/qt5/Qsci/qsciscintilla.h
> -include/X11/qt5/Qsci/qsciscintillabase.h
> -include/X11/qt5/Qsci/qscistyle.h
> -include/X11/qt5/Qsci/qscistyledtext.h
> -@lib lib/libqscintilla2_qt5.so.${LIBqscintilla2_qt5_VERSION}
> -lib/qt5/mkspecs/features/qscintilla2.prf
> -lib/qt5/qsci/
> -lib/qt5/qsci/api/
> -lib/qt5/qsci/api/python/
> -lib/qt5/qsci/api/python/Python-2.4.api
> -lib/qt5/qsci/api/python/Python-2.5.api
> -lib/qt5/qsci/api/python/Python-2.6.api
> -lib/qt5/qsci/api/python/Python-2.7.api
> -lib/qt5/qsci/api/python/Python-3.1.api
> -lib/qt5/qsci/api/python/Python-3.10.api
> -lib/qt5/qsci/api/python/Python-3.11.api
> -lib/qt5/qsci/api/python/Python-3.2.api
> -lib/qt5/qsci/api/python/Python-3.3.api
> -lib/qt5/qsci/api/python/Python-3.4.api
> -lib/qt5/qsci/api/python/Python-3.5.api
> -lib/qt5/qsci/api/python/Python-3.6.api
> -lib/qt5/qsci/api/python/Python-3.7.api
> -lib/qt5/qsci/api/python/Python-3.8.api
> -lib/qt5/qsci/api/python/Python-3.9.api
> -lib/qt5/translations/
> -lib/qt5/translations/qscintilla_cs.qm
> -lib/qt5/translations/qscintilla_de.qm
> -lib/qt5/translations/qscintilla_es.qm
> -lib/qt5/translations/qscintilla_fr.qm
> -lib/qt5/translations/qscintilla_pt_br.qm
> +include/X11/${QTVER}/Qsci/
> +include/X11/${QTVER}/Qsci/qsciabstractapis.h
> +include/X11/${QTVER}/Qsci/qsciapis.h
> +include/X11/${QTVER}/Qsci/qscicommand.h
> +include/X11/${QTVER}/Qsci/qscicommandset.h
> +include/X11/${QTVER}/Qsci/qscidocument.h
> +include/X11/${QTVER}/Qsci/qsciglobal.h
> +include/X11/${QTVER}/Qsci/qscilexer.h
> +include/X11/${QTVER}/Qsci/qscilexerasm.h
> +include/X11/${QTVER}/Qsci/qscilexeravs.h
> +include/X11/${QTVER}/Qsci/qscilexerbash.h
> +include/X11/${QTVER}/Qsci/qscilexerbatch.h
> +include/X11/${QTVER}/Qsci/qscilexercmake.h
> +include/X11/${QTVER}/Qsci/qscilexercoffeescript.h
> +include/X11/${QTVER}/Qsci/qscilexercpp.h
> +include/X11/${QTVER}/Qsci/qscilexercsharp.h
> +include/X11/${QTVER}/Qsci/qscilexercss.h
> +include/X11/${QTVER}/Qsci/qscilexercustom.h
> +include/X11/${QTVER}/Qsci/qscilexerd.h
> +include/X11/${QTVER}/Qsci/qscilexerdiff.h
> +include/X11/${QTVER}/Qsci/qscilexeredifact.h
> +include/X11/${QTVER}/Qsci/qscilexerfortran.h
> +include/X11/${QTVER}/Qsci/qscilexerfortran77.h
> +include/X11/${QTVER}/Qsci/qscilexerhex.h
> +include/X11/${QTVER}/Qsci/qscilexerhtml.h
> +include/X11/${QTVER}/Qsci/qscilexeridl.h
> +include/X11/${QTVER}/Qsci/qscilexerintelhex.h
> +include/X11/${QTVER}/Qsci/qscilexerjava.h
> +include/X11/${QTVER}/Qsci/qscilexerjavascript.h
> +include/X11/${QTVER}/Qsci/qscilexerjson.h
> +include/X11/${QTVER}/Qsci/qscilexerlua.h
> +include/X11/${QTVER}/Qsci/qscilexermakefile.h
> +include/X11/${QTVER}/Qsci/qscilexermarkdown.h
> +include/X11/${QTVER}/Qsci/qscilexermasm.h
> +include/X11/${QTVER}/Qsci/qscilexermatlab.h
> +include/X11/${QTVER}/Qsci/qscilexernasm.h
> +include/X11/${QTVER}/Qsci/qscilexeroctave.h
> +include/X11/${QTVER}/Qsci/qscilexerpascal.h
> +include/X11/${QTVER}/Qsci/qscilexerperl.h
> +include/X11/${QTVER}/Qsci/qscilexerpo.h
> +include/X11/${QTVER}/Qsci/qscilexerpostscript.h
> +include/X11/${QTVER}/Qsci/qscilexerpov.h
> +include/X11/${QTVER}/Qsci/qscilexerproperties.h
> +include/X11/${QTVER}/Qsci/qscilexerpython.h
> +include/X11/${QTVER}/Qsci/qscilexerruby.h
> +include/X11/${QTVER}/Qsci/qscilexerspice.h
> +include/X11/${QTVER}/Qsci/qscilexersql.h
> +include/X11/${QTVER}/Qsci/qscilexersrec.h
> +include/X11/${QTVER}/Qsci/qscilexertcl.h
> +include/X11/${QTVER}/Qsci/qscilexertekhex.h
> +include/X11/${QTVER}/Qsci/qscilexertex.h
> +include/X11/${QTVER}/Qsci/qscilexerverilog.h
> +include/X11/${QTVER}/Qsci/qscilexervhdl.h
> +include/X11/${QTVER}/Qsci/qscilexerxml.h
> +include/X11/${QTVER}/Qsci/qscilexeryaml.h
> +include/X11/${QTVER}/Qsci/qscimacro.h
> +include/X11/${QTVER}/Qsci/qsciprinter.h
> +include/X11/${QTVER}/Qsci/qsciscintilla.h
> +include/X11/${QTVER}/Qsci/qsciscintillabase.h
> +include/X11/${QTVER}/Qsci/qscistyle.h
> +include/X11/${QTVER}/Qsci/qscistyledtext.h
> +@lib lib/libqscintilla2_${QTVER}.so.${LIBqscintilla2_${QTVER}_VERSION}
> +lib/${QTVER}/mkspecs/features/qscintilla2.prf
> +${QTSUB}/qsci/
> +${QTSUB}/qsci/api/
> +${QTSUB}/qsci/api/python/
> +${QTSUB}/qsci/api/python/Python-2.4.api
> +${QTSUB}/qsci/api/python/Python-2.5.api
> +${QTSUB}/qsci/api/python/Python-2.6.api
> +${QTSUB}/qsci/api/python/Python-2.7.api
> +${QTSUB}/qsci/api/python/Python-3.1.api
> +${QTSUB}/qsci/api/python/Python-3.10.api
> +${QTSUB}/qsci/api/python/Python-3.11.api
> +${QTSUB}/qsci/api/python/Python-3.2.api
> +${QTSUB}/qsci/api/python/Python-3.3.api
> +${QTSUB}/qsci/api/python/Python-3.4.api
> +${QTSUB}/qsci/api/python/Python-3.5.api
> +${QTSUB}/qsci/api/python/Python-3.6.api
> +${QTSUB}/qsci/api/python/Python-3.7.api
> +${QTSUB}/qsci/api/python/Python-3.8.api
> +${QTSUB}/qsci/api/python/Python-3.9.api
> +${QTSUB}/translations/
> +${QTSUB}/translations/qscintilla_cs.qm
> +${QTSUB}/translations/qscintilla_de.qm
> +${QTSUB}/translations/qscintilla_es.qm
> +${QTSUB}/translations/qscintilla_fr.qm
> +${QTSUB}/translations/qscintilla_pt_br.qm
No comments:
Post a Comment