New package: python3-pyqt5-qsci-2.14.1

This commit is contained in:
Đoàn Trần Công Danh 2021-06-06 21:35:40 +07:00 committed by classabbyamp
parent 6d8c0a0e7c
commit e4d8977482
4 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1 @@
python3-pyqt5-qsci

View File

@ -0,0 +1,20 @@
Index: QScintilla_src-2.12.1/Python/project.py
===================================================================
--- QScintilla_src-2.12.1.orig/Python/project.py
+++ QScintilla_src-2.12.1/Python/project.py
@@ -41,6 +41,15 @@ class QScintilla(PyQtProject):
# static or dynamic).
self.qsci_external_lib = not os.path.isdir('src')
+ def run_command(self, args, *, fatal=True):
+ """ Run a command and display the output if requested. """
+ qemu_machine = os.environ.get("XBPS_TARGET_QEMU_MACHINE")
+ builddir = os.environ.get("XBPS_BUILDDIR")
+ if qemu_machine and args[0].startswith(os.path.join(builddir, "python3-pyqt5-qsci")):
+ qemu = "qemu-{}-static".format(qemu_machine)
+ args.insert(0, qemu)
+ super().run_command(args, fatal=fatal)
+
def apply_user_defaults(self, tool):
""" Set default values for user options that haven't been set yet. """

View File

@ -0,0 +1,39 @@
# Template file for 'python3-pyqt5-qsci'
# XXX Keep in sync with qscintilla-qt5
# Splited because of circular dependencies
# qscintilla-qt5 -> PyQt5 -> pyqt5-qsci
pkgname=python3-pyqt5-qsci
version=2.14.1
revision=1
build_wrksrc=Python
build_style=sip-build
build_helper=qemu
hostmakedepends="qt5-qmake qt5-host-tools python3-PyQt5-devel
python3-PyQt-builder pkg-config"
makedepends="qscintilla-qt5-devel python3-PyQt5-devel qt5-devel python3-devel"
depends="python3-PyQt5"
short_desc="Qt5 port of Scintilla editor - Python 3 binding"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="GPL-3.0-only"
homepage="https://www.riverbankcomputing.com/software/qscintilla/intro"
distfiles="https://www.riverbankcomputing.com/static/Downloads/QScintilla/${version}/QScintilla_src-${version}.tar.gz"
checksum=dfe13c6acc9d85dfcba76ccc8061e71a223957a6c02f3c343b30a9d43a4cdd4d
lib32disabled=yes
CXXFLAGS="$(printf " -I$XBPS_CROSS_BASE/usr/include/qt5/%s" \
QtWidgets QtPrintSupport)"
post_extract() {
rm -rf src
ln -sf pyproject-qt5.toml Python/pyproject.toml
}
python3-pyqt5-qsci-devel_package() {
short_desc+=" - development files"
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
lib32disabled=yes
pkg_install() {
vmove ${py3_sitelib}/PyQt5/bindings
vmove usr/share/qt5/qsci/api
}
}

View File

@ -0,0 +1,2 @@
site="https://www.riverbankcomputing.com/software/qscintilla/download"
pattern='QScintilla[_a-zA-Z]*-\K[\d.]+(?=.tar.gz)'