From e4d897748212614991007a949205015d311c7c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sun, 6 Jun 2021 21:35:40 +0700 Subject: [PATCH] New package: python3-pyqt5-qsci-2.14.1 --- srcpkgs/python3-pyqt5-qsci-devel | 1 + .../python3-pyqt5-qsci/patches/cross.patch | 20 ++++++++++ srcpkgs/python3-pyqt5-qsci/template | 39 +++++++++++++++++++ srcpkgs/python3-pyqt5-qsci/update | 2 + 4 files changed, 62 insertions(+) create mode 120000 srcpkgs/python3-pyqt5-qsci-devel create mode 100644 srcpkgs/python3-pyqt5-qsci/patches/cross.patch create mode 100644 srcpkgs/python3-pyqt5-qsci/template create mode 100644 srcpkgs/python3-pyqt5-qsci/update diff --git a/srcpkgs/python3-pyqt5-qsci-devel b/srcpkgs/python3-pyqt5-qsci-devel new file mode 120000 index 00000000000..2ded1bc41fb --- /dev/null +++ b/srcpkgs/python3-pyqt5-qsci-devel @@ -0,0 +1 @@ +python3-pyqt5-qsci \ No newline at end of file diff --git a/srcpkgs/python3-pyqt5-qsci/patches/cross.patch b/srcpkgs/python3-pyqt5-qsci/patches/cross.patch new file mode 100644 index 00000000000..7e90095a6fc --- /dev/null +++ b/srcpkgs/python3-pyqt5-qsci/patches/cross.patch @@ -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. """ + diff --git a/srcpkgs/python3-pyqt5-qsci/template b/srcpkgs/python3-pyqt5-qsci/template new file mode 100644 index 00000000000..65c489d8e85 --- /dev/null +++ b/srcpkgs/python3-pyqt5-qsci/template @@ -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 " +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 + } +} diff --git a/srcpkgs/python3-pyqt5-qsci/update b/srcpkgs/python3-pyqt5-qsci/update new file mode 100644 index 00000000000..8ddafc0f70a --- /dev/null +++ b/srcpkgs/python3-pyqt5-qsci/update @@ -0,0 +1,2 @@ +site="https://www.riverbankcomputing.com/software/qscintilla/download" +pattern='QScintilla[_a-zA-Z]*-\K[\d.]+(?=.tar.gz)'