git: f2fb21df0796 - main - graphics/py-python-poppler-qt5: limit supported python verions

From: Dmitry Marakasov <amdmi3_at_FreeBSD.org>
Date: Wed, 03 Nov 2021 18:27:33 UTC
The branch main has been updated by amdmi3:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f2fb21df079685f9b03891cac56ea9c36ac11fca

commit f2fb21df079685f9b03891cac56ea9c36ac11fca
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2021-11-03 18:26:22 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2021-11-03 18:26:42 +0000

    graphics/py-python-poppler-qt5: limit supported python verions
    
    With python 3.6:
    
    /usr/local/lib/qt5/bin/qmake -query
    sip-build: An internal error occurred...
    Traceback (most recent call last):
      File "/usr/local/bin/sip-build", line 33, in <module>
        sys.exit(load_entry_point('sip==5.5.0', 'console_scripts', 'sip-build')())
      File "/usr/local/lib/python3.6/site-packages/sipbuild/tools/build.py", line 37, in main
        handle_exception(e)
      File "/usr/local/lib/python3.6/site-packages/sipbuild/exceptions.py", line 81, in handle_exception
        raise e
      File "/usr/local/lib/python3.6/site-packages/sipbuild/tools/build.py", line 33, in main
        "Build the project in-situ.")
      File "/usr/local/lib/python3.6/site-packages/sipbuild/abstract_project.py", line 83, in bootstrap
        project.setup(pyproject, tool, tool_description)
      File "/usr/local/lib/python3.6/site-packages/sipbuild/project.py", line 479, in setup
        self.apply_user_defaults(tool)
      File "/usr/local/lib/python3.6/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
        super().apply_user_defaults(tool)
      File "/usr/local/lib/python3.6/site-packages/sipbuild/project.py", line 228, in apply_user_defaults
        bindings.apply_user_defaults(tool)
      File "project.py", line 50, in apply_user_defaults
        cflags = self.run_pkg_config('--cflags-only-I').split()
      File "project.py", line 45, in run_pkg_config
        text=True)
      File "/usr/local/lib/python3.6/subprocess.py", line 356, in check_output
        **kwargs).stdout
      File "/usr/local/lib/python3.6/subprocess.py", line 423, in run
        with Popen(*popenargs, **kwargs) as process:
    TypeError: __init__() got an unexpected keyword argument 'text'
    *** Error code 1
    
    With python 3.10:
    
    /usr/local/lib/qt5/bin/qmake -query
    sip-build: Python v3.10 is not supported
    
    Also call sip-build by python versions to fix build with non-default python.
    
    Approved by:    portmgr blanket
---
 graphics/py-python-poppler-qt5/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/graphics/py-python-poppler-qt5/Makefile b/graphics/py-python-poppler-qt5/Makefile
index e6fc6bf40817..b0305a9e9d79 100644
--- a/graphics/py-python-poppler-qt5/Makefile
+++ b/graphics/py-python-poppler-qt5/Makefile
@@ -14,7 +14,7 @@ LICENSE_COMB=	dual
 BUILD_DEPENDS=	qmake-qt5:devel/qt5-qmake
 LIB_DEPENDS=	libpoppler-qt5.so:graphics/poppler-qt5
 
-USES=		compiler:c++11-lang gl pkgconfig pyqt:5 python:3.5+ qt:5
+USES=		compiler:c++11-lang gl pkgconfig pyqt:5 python:3.7-3.9 qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	frescobaldi
 USE_GL=		gl
@@ -32,7 +32,7 @@ _PY_SONAME=	${PYTHON_EXT_SUFFIX}
 .endif
 
 do-build:
-	(cd ${WRKSRC} ; sip-build --qmake ${QMAKE} --verbose --no-make --build-dir build ; ${MAKE} -C ./build )
+	(cd ${WRKSRC} ; sip-build-${PYTHON_VER} --qmake ${QMAKE} --verbose --no-make --build-dir build ; ${MAKE} -C ./build )
 
 do-install:
 	(cd ${WRKSRC} ; ${MAKE} -C ./build install INSTALL_ROOT=${STAGEDIR} )