From 2c11b0f79f0c13374898cc93bf64f19da3bea874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bid=C5=BEan?= Date: Thu, 31 Jul 2025 23:32:55 +0200 Subject: [PATCH] Polishing ebuilds. Making gtk-meshtastic-client work after install. --- dev-python/bleak/bleak-1.0.1.ebuild | 7 +- dev-python/dotmap/dotmap-1.3.30.ebuild | 4 +- dev-python/print-color/Manifest | 2 +- .../print-color/print-color-0.4.6.ebuild | 17 +++- dev-python/pypubsub/pypubsub-4.0.3.ebuild | 5 +- dev-python/pyqrcode/pyqrcode-1.2.1-r3.ebuild | 4 +- dev-python/pytap2/Manifest | 2 +- dev-python/pytap2/pytap2-2.3.0.ebuild | 6 +- .../meshtastic/meshtastic-2.5.1.ebuild | 96 ++++++++++++------- 9 files changed, 89 insertions(+), 54 deletions(-) diff --git a/dev-python/bleak/bleak-1.0.1.ebuild b/dev-python/bleak/bleak-1.0.1.ebuild index 610adad..27ea45b 100644 --- a/dev-python/bleak/bleak-1.0.1.ebuild +++ b/dev-python/bleak/bleak-1.0.1.ebuild @@ -4,17 +4,16 @@ EAPI=8 DISTUTILS_USE_PEP517=poetry -PYTHON_COMPAT=( python3_{12..14} ) - +PYTHON_COMPAT=( python3_{12..13} ) inherit distutils-r1 pypi - DESCRIPTION="Bluetooth Low Energy platform Agnostic Klient" HOMEPAGE="https://github.com/hbldh/bleak" LICENSE="MIT" SLOT="0" -KEYWORDS="amd64 x86 arm64" +KEYWORDS="~amd64 ~x86 ~arm64 ~arm" +DEPEND="" RDEPEND="dev-python/dbus-fast[${PYTHON_USEDEP}]" BDEPEND="test? ( dev-python/pytest-asyncio[${PYTHON_USEDEP}] )" diff --git a/dev-python/dotmap/dotmap-1.3.30.ebuild b/dev-python/dotmap/dotmap-1.3.30.ebuild index bf6437b..9c3e6ed 100644 --- a/dev-python/dotmap/dotmap-1.3.30.ebuild +++ b/dev-python/dotmap/dotmap-1.3.30.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{10..13} ) +PYTHON_COMPAT=( python3_{11..13} ) DISTUTILS_USE_PEP517=setuptools inherit distutils-r1 @@ -12,7 +12,7 @@ HOMEPAGE="https://github.com/drgrib/dotmap https://pypi.org/project/dotmap/" SRC_URI="https://files.pythonhosted.org/packages/source/d/dotmap/dotmap-${PV}.tar.gz" LICENSE="MIT" SLOT="0" -KEYWORDS="~amd64 ~x86 arm64" +KEYWORDS="~amd64 ~x86 ~arm64 ~arm" RDEPEND="${PYTHON_DEPS}" DEPEND="${RDEPEND}" diff --git a/dev-python/print-color/Manifest b/dev-python/print-color/Manifest index 90f4ffe..9fae446 100644 --- a/dev-python/print-color/Manifest +++ b/dev-python/print-color/Manifest @@ -1 +1 @@ -DIST v0.4.6.tar.gz 10317 BLAKE2B 5f81549c59ecef1201b4224a38b76f52a7b855a23c4e9ce15c294a442a60c331b1155b528bb94e9787a6071d7631a26b8985112e686465341692fa573601d47f SHA512 d0c803a36069974f5e023237346781f4bd727bb7f177abe37a071dcc63dd12c9759f52278123f10270d583d2ac3ac857eefc96895671d6afe3bf4b33b6f38826 +DIST print-color-0.4.6.tar.gz 10317 BLAKE2B 5f81549c59ecef1201b4224a38b76f52a7b855a23c4e9ce15c294a442a60c331b1155b528bb94e9787a6071d7631a26b8985112e686465341692fa573601d47f SHA512 d0c803a36069974f5e023237346781f4bd727bb7f177abe37a071dcc63dd12c9759f52278123f10270d583d2ac3ac857eefc96895671d6afe3bf4b33b6f38826 diff --git a/dev-python/print-color/print-color-0.4.6.ebuild b/dev-python/print-color/print-color-0.4.6.ebuild index ac4684d..c899dee 100644 --- a/dev-python/print-color/print-color-0.4.6.ebuild +++ b/dev-python/print-color/print-color-0.4.6.ebuild @@ -1,21 +1,28 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + EAPI=8 -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..13} ) +DISTUTILS_USE_PEP517=poetry +PYTHON_COMPAT=( python3_{11..13} ) inherit distutils-r1 DESCRIPTION="A simple Python wrapper to print color messages in the terminal" HOMEPAGE="https://github.com/xy3/print-color" -SRC_URI="https://github.com/xy3/print-color/archive/refs/tags/v0.4.6.tar.gz" +SRC_URI="https://github.com/xy3/print-color/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="MIT" SLOT="0" -KEYWORDS="~amd64 ~x86 ~arm64" +KEYWORDS="~amd64 ~x86 ~arm64 ~arm" IUSE="test" RDEPEND="" -DEPEND="${RDEPEND} +BDEPEND=" + dev-python/poetry-core[${PYTHON_USEDEP}] +" +DEPEND=" + ${RDEPEND} test? ( dev-python/pytest[${PYTHON_USEDEP}] ) diff --git a/dev-python/pypubsub/pypubsub-4.0.3.ebuild b/dev-python/pypubsub/pypubsub-4.0.3.ebuild index 76fc585..0ad2b2c 100644 --- a/dev-python/pypubsub/pypubsub-4.0.3.ebuild +++ b/dev-python/pypubsub/pypubsub-4.0.3.ebuild @@ -3,7 +3,7 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..13} ) +PYTHON_COMPAT=( python3_{11..13} ) inherit distutils-r1 DESCRIPTION="Python Publish-Subscribe Package" @@ -14,10 +14,9 @@ S="${WORKDIR}/${MY_PN}-${PV}" LICENSE="BSD" SLOT="0" -KEYWORDS="amd64 arm arm64 x86" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" IUSE="test" RESTRICT="!test? ( test )" - DOCS="README.rst" BDEPEND=" diff --git a/dev-python/pyqrcode/pyqrcode-1.2.1-r3.ebuild b/dev-python/pyqrcode/pyqrcode-1.2.1-r3.ebuild index 5e2e9b5..aa83a8e 100644 --- a/dev-python/pyqrcode/pyqrcode-1.2.1-r3.ebuild +++ b/dev-python/pyqrcode/pyqrcode-1.2.1-r3.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{10..13} ) +PYTHON_COMPAT=( python3_{11..13} ) DISTUTILS_USE_PEP517=setuptools inherit distutils-r1 @@ -18,7 +18,7 @@ S=${WORKDIR}/${PN}-${EGIT_COMMIT} LICENSE="BSD" SLOT="0" -KEYWORDS="amd64 arm arm64 x86" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" IUSE="png test" RESTRICT="!test? ( test )" diff --git a/dev-python/pytap2/Manifest b/dev-python/pytap2/Manifest index d9ed820..6d35b31 100644 --- a/dev-python/pytap2/Manifest +++ b/dev-python/pytap2/Manifest @@ -1 +1 @@ -DIST pytap2-2.3.0.tar.gz 6591 BLAKE2B 3253e38e219b85301dd50dd445d1e1570891b8e7de7bb73ba2acf3916dd12f18fede1dd4e659f1f513d9ff4ed5eacb9d8d8ce87d8d10889bed169a48d282564a SHA512 3b5640f54b43b7350262bec09b744eca6f435564d1dc18d1228043eddf490ff4014689426e3015e3bd21890e66f274708aaabe9732bfb5deea8732c8e7f2e6d1 +DIST v2.3.0.tar.gz 6591 BLAKE2B 3253e38e219b85301dd50dd445d1e1570891b8e7de7bb73ba2acf3916dd12f18fede1dd4e659f1f513d9ff4ed5eacb9d8d8ce87d8d10889bed169a48d282564a SHA512 3b5640f54b43b7350262bec09b744eca6f435564d1dc18d1228043eddf490ff4014689426e3015e3bd21890e66f274708aaabe9732bfb5deea8732c8e7f2e6d1 diff --git a/dev-python/pytap2/pytap2-2.3.0.ebuild b/dev-python/pytap2/pytap2-2.3.0.ebuild index abdfea9..1a1bb5f 100644 --- a/dev-python/pytap2/pytap2-2.3.0.ebuild +++ b/dev-python/pytap2/pytap2-2.3.0.ebuild @@ -3,18 +3,18 @@ EAPI=8 -PYTHON_COMPAT=( python3_{8..13} ) +PYTHON_COMPAT=( python3_{11..13} ) DISTUTILS_USE_PEP517=setuptools inherit distutils-r1 DESCRIPTION="Object oriented interface to Linux TUN/TAP devices" HOMEPAGE="https://github.com/johnthagen/pytap2 https://pypi.org/project/pytap2/" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" +SRC_URI="https://github.com/johnthagen/pytap2/archive/refs/tags/v2.3.0.tar.gz" LICENSE="MIT" SLOT="0" -KEYWORDS="~amd64 ~x86 arm64" +KEYWORDS="~amd64 ~x86 ~arm64 ~arm" RDEPEND=" ${PYTHON_DEPS} diff --git a/media-radio/meshtastic/meshtastic-2.5.1.ebuild b/media-radio/meshtastic/meshtastic-2.5.1.ebuild index e8cd297..b2e46a7 100644 --- a/media-radio/meshtastic/meshtastic-2.5.1.ebuild +++ b/media-radio/meshtastic/meshtastic-2.5.1.ebuild @@ -3,14 +3,14 @@ EAPI=8 -PYTHON_COMPAT=( python3_{10..13} ) +PYTHON_COMPAT=( python3_{11..13} ) DISTUTILS_USE_PEP517=poetry -inherit distutils-r1 meson +inherit distutils-r1 meson python-r1 DESCRIPTION="Python CLI and API for Meshtastic devices, with optional GUI client" HOMEPAGE="https://github.com/meshtastic/python https://gitlab.com/kop316/gtk-meshtastic-client/" -GUI_PV="1.2" # Verify this version exists at https://gitlab.com/kop316/gtk-meshtastic-client/-/tags +GUI_PV="1.2" SRC_URI=" https://github.com/meshtastic/python/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz gui? ( https://gitlab.com/kop316/gtk-meshtastic-client/-/archive/${GUI_PV}/gtk-meshtastic-client-${GUI_PV}.tar.gz ) @@ -21,8 +21,8 @@ SLOT="0" KEYWORDS="~amd64 ~x86 ~arm64" IUSE="gui minimal +qrcode +tun" -DEPEND=" - ${PYTHON_DEPS} +# Common Python dependencies +COMMON_DEPEND=" >=dev-python/bleak-1.0.1[${PYTHON_USEDEP}] >=dev-python/packaging-25.0[${PYTHON_USEDEP}] >=dev-python/platformdirs-4.3.8[${PYTHON_USEDEP}] @@ -38,37 +38,21 @@ DEPEND=" !minimal? ( dev-python/print-color[${PYTHON_USEDEP}] ) qrcode? ( >=dev-python/pyqrcode-1.2.1[${PYTHON_USEDEP}] ) tun? ( >=dev-python/pytap2-2.3.0[${PYTHON_USEDEP}] ) +" + +DEPEND=" + ${COMMON_DEPEND} + ${PYTHON_DEPS} gui? ( - dev-libs/gobject-introspection - gui-libs/libadwaita[introspection] - >=gui-libs/gtk-4.10:4[introspection] - x11-libs/pango[introspection] - media-libs/libshumate[introspection] $(python_gen_cond_dep ' - dev-python/pygobject[${PYTHON_USEDEP}] - dev-python/dotmap[${PYTHON_USEDEP}] - dev-python/pyqrcode[${PYTHON_USEDEP}] + dev-python/meson-python[${PYTHON_USEDEP}] ') ) " RDEPEND=" + ${COMMON_DEPEND} ${PYTHON_DEPS} - >=dev-python/bleak-1.0.1[${PYTHON_USEDEP}] - >=dev-python/packaging-25.0[${PYTHON_USEDEP}] - >=dev-python/platformdirs-4.3.8[${PYTHON_USEDEP}] - >=dev-python/protobuf-6.31.1[${PYTHON_USEDEP}] - >=dev-python/pyserial-3.5-r2[${PYTHON_USEDEP}] - >=dev-python/pyyaml-6.0.2[${PYTHON_USEDEP}] - >=dev-python/requests-2.32.4[${PYTHON_USEDEP}] - >=dev-python/setuptools-80.9.0-r1[${PYTHON_USEDEP}] - >=dev-python/tabulate-0.9.0-r1[${PYTHON_USEDEP}] - >=dev-python/build-1.2.2_p1-r2[${PYTHON_USEDEP}] - >=dev-python/dotmap-1.3.0[${PYTHON_USEDEP}] - >=dev-python/pypubsub-4.0.3[${PYTHON_USEDEP}] - !minimal? ( dev-python/print-color[${PYTHON_USEDEP}] ) - qrcode? ( >=dev-python/pyqrcode-1.2.1[${PYTHON_USEDEP}] ) - tun? ( >=dev-python/pytap2-2.3.0[${PYTHON_USEDEP}] ) gui? ( dev-libs/glib:2 x11-libs/gdk-pixbuf:2 @@ -80,6 +64,7 @@ RDEPEND=" $(python_gen_cond_dep ' >=dev-python/pygobject-3.36[${PYTHON_USEDEP},cairo] dev-python/dotmap[${PYTHON_USEDEP}] + dev-python/pyqrcode[${PYTHON_USEDEP}] ') ) " @@ -90,10 +75,8 @@ BDEPEND=" dev-python/wheel[${PYTHON_USEDEP}] dev-python/installer[${PYTHON_USEDEP}] gui? ( - $(python_gen_cond_dep ' - dev-python/meson-python[${PYTHON_USEDEP}] - ') dev-util/desktop-file-utils + x11-libs/gtk+ ) " @@ -112,11 +95,25 @@ src_prepare() { } src_configure() { + distutils-r1_src_configure if use gui; then - # Configure GUI build in a separate build directory + [[ -f "${WORKDIR}/gtk-meshtastic-client/meson.build" ]] || die "meson.build not found in ${WORKDIR}/gtk-meshtastic-client" mkdir -p "${WORKDIR}/gui-build" || die pushd "${WORKDIR}/gui-build" || die - ECONF_SOURCE="${WORKDIR}/gtk-meshtastic-client" meson_src_configure + python_setup + meson setup \ + --prefix=/usr \ + --libdir=lib64 \ + --localstatedir=/var/lib \ + --sysconfdir=/etc \ + --wrap-mode=nodownload \ + --build.pkg-config-path=/usr/share/pkgconfig \ + --pkg-config-path=/usr/share/pkgconfig \ + -Db_pch=false \ + -Dwerror=false \ + -Dbuildtype=plain \ + "${WORKDIR}/gtk-meshtastic-client" \ + "${WORKDIR}/gui-build" || die "Meson setup failed" popd || die fi } @@ -125,6 +122,7 @@ src_compile() { distutils-r1_src_compile if use gui; then pushd "${WORKDIR}/gui-build" || die + python_setup meson_src_compile popd || die fi @@ -135,8 +133,40 @@ src_install() { dodoc README.md if use gui; then pushd "${WORKDIR}/gui-build" || die + python_setup meson_src_install python_optimize + python_fix_shebang "${ED}/usr/bin/gtk-meshtastic-client" popd || die + + if [[ -f "${WORKDIR}/gtk-meshtastic-client/data/io.meshtastic.GtkClient.desktop" ]]; then + insinto /usr/share/applications + doins "${WORKDIR}/gtk-meshtastic-client/data/io.meshtastic.GtkClient.desktop" + fi + + if [[ -d "${WORKDIR}/gtk-meshtastic-client/data/icons" ]]; then + insinto /usr/share/icons + doins -r "${WORKDIR}/gtk-meshtastic-client/data/icons"/* + fi + fi +} + +pkg_postinst() { + if use gui; then + xdg_pkg_postinst + glib-compile-schemas /usr/share/glib-2.0/schemas || die "Failed to compile GSettings schemas" + update-desktop-database /usr/share/applications + gtk-update-icon-cache -f -t /usr/share/icons/hicolor + elog "The Meshtastic GTK Client has been installed and is available in your application menu." + elog "To use the GUI, ensure a Meshtastic device is connected via serial, Bluetooth, or TCP." + elog "For configuration details, visit: https://meshtastic.org/docs/software/python/gui-client/" + elog "Report issues at: https://gitlab.com/kop316/gtk-meshtastic-client/-/issues" + fi +} + +pkg_postrm() { + if use gui; then + update-desktop-database /usr/share/applications + gtk-update-icon-cache -f -t /usr/share/icons/hicolor fi }