aboutsummaryrefslogtreecommitdiff
path: root/science/py-veusz
diff options
context:
space:
mode:
authorLoïc Bartoletti <lbartoletti@FreeBSD.org>2020-12-08 20:03:07 +0000
committerLoïc Bartoletti <lbartoletti@FreeBSD.org>2020-12-08 20:03:07 +0000
commit47b26d9293f196d71c39ba4d82df23d179884405 (patch)
tree3984ac0366432e29f9e1ac47cbac9b18032f7c04 /science/py-veusz
parent96fd51619a1ebc0b215ab75ccc37ce7ab300ed8b (diff)
downloadports-47b26d9293f196d71c39ba4d82df23d179884405.tar.gz
ports-47b26d9293f196d71c39ba4d82df23d179884405.zip
Update Qt/PySide2 to 5.15.2 / PyQt to 5.15.1 / SIP to 5.4.0
This commit combines several updates. - Update Qt to 5.12.2 - Update PyQt to 5.15.1 - Since PySide 5.15.1 is broken with Qt 5.15.2, so PySide and Shiboken are also updated to 5.15.2. - Update sip to 5.4.0 SIP is a collection of tools to create Python bindings for C and C++ libraries and used by PyQt and wxPython. There are some changes with sip5 [1]: - python 3.5+ is required - sip drops support of old deprecated methods as sipdistutils & cie. - this version breaks also PyQt5 extension ABI. SIP files will be installed in ${PYTHON_SITELIBDIR}/PyQt${_PYQT_VERSION}/bindings - some ports will use the new pyqtbuilder package with the pyproject.toml setup. Instead if the project have a setup.py, you should use sip-build to build it. - if a port needs sip, it should also needs pysip. BTW, py-qt5-core requires pysip, so that should be enough for PyQt packages. List of ports impacted by this change. Most of the patches have been integrated or are in the process of being integrated upstream: - devel/libsavitar - graphics/py-python-poppler-qt5 - net-im/scudcloud - net/libarcus - print/py-frescobaldi - science/py-veusz - graphics/qgis and graphics/qgis-ltr - deskutils/calibre A special note regarding calibre. New versions require sip>=5, we update it to the latest version (thanks to madpilot@) science/scidavis will remove the PyQt binding soon and there is no patch planned, so we remove the python option (ok makc@) While here, convert some ports to USE_PYQT (cad/cura, cad/uranium, devel/eric6, ...) Thanks to tcberner and adridg! [1] https://www.riverbankcomputing.com/static/Docs/sip/ PR: 250853 Exp-run by: antoine
Notes
Notes: svn path=/head/; revision=557300
Diffstat (limited to 'science/py-veusz')
-rw-r--r--science/py-veusz/Makefile2
-rw-r--r--science/py-veusz/files/patch-pyqtdistutils.py82
2 files changed, 78 insertions, 6 deletions
diff --git a/science/py-veusz/Makefile b/science/py-veusz/Makefile
index 0f934e3ba836..6e1e63aa5c43 100644
--- a/science/py-veusz/Makefile
+++ b/science/py-veusz/Makefile
@@ -4,7 +4,7 @@
PORTNAME= veusz
DISTVERSIONPREFIX= ${PORTNAME}-
DISTVERSION= 3.2.1
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= science
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
diff --git a/science/py-veusz/files/patch-pyqtdistutils.py b/science/py-veusz/files/patch-pyqtdistutils.py
index 7e512cfa5a7d..792e4d24cbd5 100644
--- a/science/py-veusz/files/patch-pyqtdistutils.py
+++ b/science/py-veusz/files/patch-pyqtdistutils.py
@@ -1,11 +1,83 @@
---- pyqtdistutils.py.orig 2019-03-17 19:30:42 UTC
+Patch from https://github.com/veusz/veusz/pull/433
+
+--- pyqtdistutils.py.orig 2020-10-11 07:18:07 UTC
+++ pyqtdistutils.py
-@@ -272,7 +272,7 @@ class build_ext(distutils.command.build_
+@@ -10,9 +10,8 @@ import sys
+ import sysconfig
+ import subprocess
+
+-from distutils.sysconfig import customize_compiler
++from distutils.sysconfig import customize_compiler, get_python_lib
+ import distutils.command.build_ext
+-from distutils.dep_util import newer, newer_group
+
+ import PyQt5.QtCore
+
+@@ -97,20 +96,6 @@ class build_ext(distutils.command.build_ext.build_ext)
+ self.qt_library_dir = None
+ self.qt_libinfix = None
+
+- def _get_sip_output_list(self, sbf):
+- '''
+- Parse the sbf file specified to extract the name of the generated source
+- files. Make them absolute assuming they reside in the temp directory.
+- '''
+- for line in open(sbf):
+- key, value = line.split('=', 1)
+- if key.strip() == 'sources':
+- out = []
+- for o in value.split():
+- out.append(os.path.join(self.build_temp, o))
+- return out
+- raise RuntimeError('cannot parse SIP-generated "%s"' % sbf)
+-
+ def _get_sip_exe(self, build_cmd):
+ """Get exe for sip. Sources are:
+ --sip-exe option, environment, DEF_SIP_BIN, search on path."""
+@@ -289,26 +274,35 @@ class build_ext(distutils.command.build_ext.build_ext)
+ generated_sources = []
+
+ for sip in sip_sources:
+- # Use the sbf file as dependency check
+- sipbasename = os.path.basename(sip)
+- sbf = os.path.join(self.build_temp,
+- replace_suffix(sipbasename, '.sbf'))
+- if newer_group([sip]+depends, sbf) or self.force:
+- self._sip_compile(sip_exe, sip_dir, sip, sbf)
+- out = self._get_sip_output_list(sbf)
++ sip_basename = os.path.basename(sip)[:-4]
++ sip_builddir = os.path.join(self.build_temp, 'sip-' + sip_basename)
++ if not os.path.exists(sip_builddir) or self.force:
++ os.makedirs(sip_builddir, exist_ok=True)
++ self._sip_compile(sip_exe, sip_dir, sip, sip_builddir)
++ out = [
++ os.path.join(sip_builddir, fn)
++ for fn in os.listdir(sip_builddir)
++ if fn.endswith(".cpp")
++ ]
+ generated_sources.extend(out)
+
+ return generated_sources + other_sources
+
+- def _sip_compile(self, sip_exe, sip_dir, source, sbf):
++ def _sip_compile(self, sip_exe, sip_dir, source, sip_builddir):
+ """Compile sip file to sources."""
++ if 'sip5' in sip_exe:
++ pyqt5_include_dir = os.path.join(get_python_lib(plat_specific=1),
++ 'PyQt5', 'bindings')
++ self.spawn(['sip-module', '--target-dir', sip_builddir,
++ '--sip-h', 'PyQt5.sip'])
++ else:
++ pyqt5_include_dir = os.path.join(sip_dir, 'PyQt5')
+ self.spawn(
+ [
sip_exe,
- '-c', self.build_temp
+- '-c', self.build_temp
++ '-c', sip_builddir
] + SIP_FLAGS.split() + [
- '-I', os.path.join(sip_dir, 'PyQt5'),
-+ '-I', sip_dir, # for FreeBSD's SIP file locations
- '-b', sbf,
+- '-b', sbf,
++ '-I', pyqt5_include_dir,
source
]
+ )