From 7bae8075c5c573902b05ab51bf94d271be700752 Mon Sep 17 00:00:00 2001 From: Matheus Date: Sun, 28 Jun 2026 11:49:12 -0300 Subject: [PATCH] ports: pyqt6 --- host-recipes/pyqt-builder | 11 +++++ host-recipes/python-packaging | 10 ++++ host-recipes/python-tomli | 10 ++++ host-recipes/sip | 20 ++++++++ recipes/pyqt6 | 81 +++++++++++++++++++++++++++++++++ recipes/pyqt6-sip | 19 ++++++++ source-recipes/pyqt-builder | 5 ++ source-recipes/pyqt6 | 5 ++ source-recipes/pyqt6-sip | 5 ++ source-recipes/python-packaging | 5 ++ source-recipes/python-sip | 5 ++ source-recipes/python-tomli | 5 ++ 12 files changed, 181 insertions(+) create mode 100644 host-recipes/pyqt-builder create mode 100644 host-recipes/python-packaging create mode 100644 host-recipes/python-tomli create mode 100644 host-recipes/sip create mode 100644 recipes/pyqt6 create mode 100644 recipes/pyqt6-sip create mode 100644 source-recipes/pyqt-builder create mode 100644 source-recipes/pyqt6 create mode 100644 source-recipes/pyqt6-sip create mode 100644 source-recipes/python-packaging create mode 100644 source-recipes/python-sip create mode 100644 source-recipes/python-tomli diff --git a/host-recipes/pyqt-builder b/host-recipes/pyqt-builder new file mode 100644 index 00000000..57775be9 --- /dev/null +++ b/host-recipes/pyqt-builder @@ -0,0 +1,11 @@ +name=pyqt-builder +revision=1 +from_source=pyqt-builder +hostdeps="python python-packaging sip" + +package() { + site_packages="${dest_dir}${prefix}/lib/python3.10/site-packages" + mkdir -p "${site_packages}" + cp -rp "${source_dir}"/pyqtbuild "${site_packages}"/ + cp -rp "${source_dir}"/PyQt_builder.egg-info "${site_packages}"/ +} diff --git a/host-recipes/python-packaging b/host-recipes/python-packaging new file mode 100644 index 00000000..3951d1b8 --- /dev/null +++ b/host-recipes/python-packaging @@ -0,0 +1,10 @@ +name=python-packaging +revision=1 +from_source=python-packaging +hostdeps="python" + +package() { + site_packages="${dest_dir}${prefix}/lib/python3.10/site-packages" + mkdir -p "${site_packages}" + cp -rp "${source_dir}"/src/packaging "${site_packages}"/ +} diff --git a/host-recipes/python-tomli b/host-recipes/python-tomli new file mode 100644 index 00000000..3b895cc8 --- /dev/null +++ b/host-recipes/python-tomli @@ -0,0 +1,10 @@ +name=python-tomli +revision=1 +from_source=python-tomli +hostdeps="python" + +package() { + site_packages="${dest_dir}${prefix}/lib/python3.10/site-packages" + mkdir -p "${site_packages}" + cp -rp "${source_dir}"/src/tomli "${site_packages}"/ +} diff --git a/host-recipes/sip b/host-recipes/sip new file mode 100644 index 00000000..442be144 --- /dev/null +++ b/host-recipes/sip @@ -0,0 +1,20 @@ +name=sip +revision=1 +from_source=python-sip +hostdeps="python python-packaging python-tomli" + +package() { + site_packages="${dest_dir}${prefix}/lib/python3.10/site-packages" + mkdir -p "${site_packages}" "${dest_dir}${prefix}/bin" + cp -rp "${source_dir}"/sipbuild "${site_packages}"/ + cp -rp "${source_dir}"/sip.egg-info "${site_packages}"/ + + for tool in build install module sdist wheel distinfo; do + cat > "${dest_dir}${prefix}/bin/sip-${tool}" << EOF +#!/usr/bin/env python3 +from sipbuild.tools.${tool} import main +main() +EOF + chmod +x "${dest_dir}${prefix}/bin/sip-${tool}" + done +} diff --git a/recipes/pyqt6 b/recipes/pyqt6 new file mode 100644 index 00000000..01caf30a --- /dev/null +++ b/recipes/pyqt6 @@ -0,0 +1,81 @@ +name=pyqt6 +revision=1 +from_source=pyqt6 +imagedeps="build-essential python3" +hostdeps="xgcc xbinutils python pkgconfig libstdc++-v3 host-qtbase6 sip pyqt-builder" +deps="base python pyqt6-sip qtbase6" + +build() { + cp -rp "${source_dir}"/* . + cat > qt.conf << EOF +[Paths] +Prefix=${sysroot_dir}${prefix} +ArchData=lib/qt6 +Data=share/qt6 +Headers=include/qt6 +Libraries=lib +LibraryExecutables=lib/qt6/libexec +Binaries=bin +Plugins=lib/qt6/plugins +Qml2Imports=lib/qt6/qml +Translations=share/qt6/translations +HostPrefix=/usr/local +HostData=${sysroot_dir}${prefix}/lib/qt6 +HostBinaries=bin +HostLibraryExecutables=/usr/local/libexec +HostLibraries=lib +EOF + cat > qmake6-astral << EOF +#!/bin/sh +exec /usr/local/bin/qmake6 -qtconf "$(pwd)/qt.conf" "\$@" +EOF + chmod +x qmake6-astral + +} + +package() { + INSTALL_ROOT="${dest_dir}" \ + MAKEFLAGS="${MAKEFLAGS} INSTALL_ROOT=${dest_dir}" \ + _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__astral_ \ + PYTHONPATH=${sysroot_dir}${prefix}/lib/python3.10 \ + PKG_CONFIG=/usr/local/bin/x86_64-astral-pkg-config \ + CC=x86_64-astral-gcc \ + CXX=x86_64-astral-g++ \ + LINK=x86_64-astral-g++ \ + DESTDIR=${dest_dir} \ + /usr/bin/env python3 -m sipbuild.tools.install \ + --confirm-license \ + --build-dir build \ + --qmake "$(pwd)/qmake6-astral" \ + --spec astral-g++ \ + --qmake-setting QMAKE_CC=x86_64-astral-gcc \ + --qmake-setting QMAKE_CXX=x86_64-astral-g++ \ + --qmake-setting QMAKE_LINK=x86_64-astral-g++ \ + --qmake-setting QMAKE_LINK_SHLIB=x86_64-astral-g++ \ + --qmake-setting QMAKE_AR="x86_64-astral-ar cqs" \ + --qmake-setting QMAKE_NM="x86_64-astral-nm -P" \ + --qmake-setting QMAKE_OBJCOPY=x86_64-astral-objcopy \ + --qmake-setting QMAKE_RANLIB=x86_64-astral-ranlib \ + --qmake-setting "INCLUDEPATH+=${sysroot_dir}${prefix}/include/python3.10" \ + --qmake-setting "QMAKE_LIBDIR+=${sysroot_dir}${prefix}/lib" \ + --target-dir ${prefix}/lib/python3.10/site-packages \ + --scripts-dir ${prefix}/bin \ + --qt-shared \ + --enable QtCore \ + --enable QtNetwork \ + --enable QtGui \ + --disabled-feature PyQt_Vulkan \ + --disabled-feature PyQt_Wayland \ + --enable QtWidgets \ + --enable QtOpenGL \ + --disabled-feature PyQt_OpenGL_ES2 \ + --enable QtOpenGLWidgets \ + --enable QtPrintSupport \ + --enable QtSql \ + --enable QtTest \ + --enable QtXml \ + --no-designer-plugin \ + --no-qml-plugin \ + --no-dbus-python \ + --jobs ${parallelism} +} diff --git a/recipes/pyqt6-sip b/recipes/pyqt6-sip new file mode 100644 index 00000000..9f539ebd --- /dev/null +++ b/recipes/pyqt6-sip @@ -0,0 +1,19 @@ +name=pyqt6-sip +revision=1 +from_source=pyqt6-sip +imagedeps="build-essential python3" +hostdeps="xgcc xbinutils python" +deps="base python" + +build() { + true +} + +package() { + _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__astral_ \ + PYTHONPATH=${sysroot_dir}/${prefix}/lib/python3.10 \ + CC=x86_64-astral-gcc \ + CFLAGS="-I${sysroot_dir}/${prefix}/include/python3.10" \ + LDSHARED="x86_64-astral-gcc -shared" \ + /usr/bin/env python3 setup.py install --prefix=${prefix} --root=${dest_dir} +} diff --git a/source-recipes/pyqt-builder b/source-recipes/pyqt-builder new file mode 100644 index 00000000..e25c0f1c --- /dev/null +++ b/source-recipes/pyqt-builder @@ -0,0 +1,5 @@ +name=pyqt-builder +version=1.19.1 +source_method=tarball +tarball_url="https://files.pythonhosted.org/packages/61/f6/f3b504b4d55a7c4d3393cb90378501f1f5fc7f233bd85c0375674f84d2af/pyqt_builder-${version}.tar.gz" +tarball_sha256=6af6646ba29668751b039bfdced51642cb510e300796b58a4d68b7f956a024d8 diff --git a/source-recipes/pyqt6 b/source-recipes/pyqt6 new file mode 100644 index 00000000..6146c48b --- /dev/null +++ b/source-recipes/pyqt6 @@ -0,0 +1,5 @@ +name=pyqt6 +version=6.11.0 +source_method=tarball +tarball_url="https://files.pythonhosted.org/packages/8b/47/b25c13eca5bebc6505394d0223e46d7ebf0c57dcac2ed908d7d19b18ab6b/pyqt6-${version}.tar.gz" +tarball_sha256=45dd60aa69976de1918b5ced6b4e7b6a25abd2a919ecef5fd5826ecc76718889 diff --git a/source-recipes/pyqt6-sip b/source-recipes/pyqt6-sip new file mode 100644 index 00000000..3b24f475 --- /dev/null +++ b/source-recipes/pyqt6-sip @@ -0,0 +1,5 @@ +name=pyqt6-sip +version=13.11.1 +source_method=tarball +tarball_url="https://files.pythonhosted.org/packages/90/24/a753e1af94b9ae5b2da63d4598457308da3cdbf0838c959381db086ccc86/pyqt6_sip-${version}.tar.gz" +tarball_sha256=869c5b48afe38e55b1ee0dd72182b0886e968cc509b98023ff50010b013ce1be diff --git a/source-recipes/python-packaging b/source-recipes/python-packaging new file mode 100644 index 00000000..40456bcf --- /dev/null +++ b/source-recipes/python-packaging @@ -0,0 +1,5 @@ +name=python-packaging +version=26.2 +source_method=tarball +tarball_url="https://files.pythonhosted.org/packages/d7/f1/e7a6dd94a8d4a5626c03e4e99c87f241ba9e350cd9e6d75123f992427270/packaging-${version}.tar.gz" +tarball_sha256=ff452ff5a3e828ce110190feff1178bb1f2ea2281fa2075aadb987c2fb221661 diff --git a/source-recipes/python-sip b/source-recipes/python-sip new file mode 100644 index 00000000..0da8d07d --- /dev/null +++ b/source-recipes/python-sip @@ -0,0 +1,5 @@ +name=python-sip +version=6.15.3 +source_method=tarball +tarball_url="https://files.pythonhosted.org/packages/02/b1/79bff1c49a9e19ffe0211cb8905cc514c3f6b8f3f7ae55a40403d346c076/sip-${version}.tar.gz" +tarball_sha256=bb2516983f9f716d321e5157c00d0de0c12422eba73b8f43a44610a0f6622438 diff --git a/source-recipes/python-tomli b/source-recipes/python-tomli new file mode 100644 index 00000000..4d9a2271 --- /dev/null +++ b/source-recipes/python-tomli @@ -0,0 +1,5 @@ +name=python-tomli +version=2.4.1 +source_method=tarball +tarball_url="https://files.pythonhosted.org/packages/22/de/48c59722572767841493b26183a0d1cc411d54fd759c5607c4590b6563a6/tomli-${version}.tar.gz" +tarball_sha256=7c7e1a961a0b2f2472c1ac5b69affa0ae1132c39adcb67aba98568702b9cc23f