Revert "media-gfx/mypaint: fix compat w/ newer pygobject"

This reverts commit 923195dc3c5affe6eb051a78f981adfd7583d22b.

The patch doesn't work w/ old pygobject.

Bug: https://bugs.gentoo.org/963605
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James 2025-12-12 02:04:51 +00:00
parent 3cd75b35dc
commit cb33f53794
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
3 changed files with 0 additions and 153 deletions

View File

@ -1,54 +0,0 @@
https://bugs.gentoo.org/963605
https://gitlab.alpinelinux.org/alpine/aports/-/blob/da14a6d0ee52aeaa90485719bcbf33623465780a/community/mypaint/fix-pyobject-userdirectory.patch
Patch-Source: https://github.com/wobbol/mypaint/commit/3b682d5898f4a6b709a2cd1a4d2b1b9288277cd6
---
From 3b682d5898f4a6b709a2cd1a4d2b1b9288277cd6 Mon Sep 17 00:00:00 2001
From: insane <shreyanshsaha19@proton.me>
Date: Thu, 3 Apr 2025 03:14:39 -0500
Subject: [PATCH] Fix pyobject enums in pygobject >= 3.51.0
Co-authored-by: N.F. <nfontenot27@gmail.com>
Fix AttributeError: 'UserDirectory' object has no attribute 'value_name'
k.value_name was resulting in attribute error.
Changing it to k.name resolves it.
Background information below.
Unregistered pygobject enums in v3.51.0 released on 2025-02-01 are now
stdlib enums.
From the NEWS file:
> Note: Only enumerations and flags that have a GType associated will
> have the GEnum extra properties, such as
> `value_nicks` and `value_names`.
Further down:
> * Use standard `enum` module for enums and flags in
> PyGObject :mr:`394`
Reference:
https://github.com/mypaint/mypaint/issues/1292
https://gitlab.gnome.org/GNOME/pygobject/-/blob/1c675e47a160662e5247a387dcd35e0d36b3c4d2/NEWS#L32
https://gitlab.gnome.org/GNOME/pygobject/-/merge_requests/394
Closes #1292
---
lib/glib.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/glib.py b/lib/glib.py
index 5d4eef16c..865ec86ae 100644
--- a/lib/glib.py
+++ b/lib/glib.py
@@ -190,7 +190,7 @@ def init_user_dir_caches():
k = GLib.UserDirectory(i)
logger.debug(
"Init g_get_user_special_dir(%s): %r",
- k.value_name,
+ k.name,
get_user_special_dir(k),
)

View File

@ -1,99 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..13} )
inherit desktop edo python-single-r1 toolchain-funcs xdg
DESCRIPTION="Fast and easy graphics application for digital painters"
HOMEPAGE="https://www.mypaint.app/en/"
SRC_URI="https://github.com/mypaint/${PN}/releases/download/v${PV}/${P}.tar.xz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="openmp"
LANGS="cs de en_CA en_GB es fr hu id it ja ko nb nn_NO pl pt_BR ro ru sl sv uk zh_CN zh_TW"
# Relies on setup.py test (long-removed) and nose (also long-removed)
# See bug #927525 and https://github.com/mypaint/mypaint/issues/1191
RESTRICT="test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="
${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/pygobject:3[${PYTHON_USEDEP}]
dev-python/numpy[${PYTHON_USEDEP}]
>=dev-python/pycairo-1.4[${PYTHON_USEDEP}]
dev-python/protobuf[${PYTHON_USEDEP}]
')
>=dev-libs/json-c-0.11:=
gnome-base/librsvg
media-gfx/mypaint-brushes:2.0
media-libs/lcms:2
>=media-libs/libmypaint-1.5.0[openmp?]
media-libs/libpng:=
sys-devel/gettext
llvm-runtimes/openmp
x11-libs/gdk-pixbuf[jpeg]
x11-libs/gtk+:3
"
DEPEND="${RDEPEND}"
BDEPEND="
${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/setuptools[${PYTHON_USEDEP}]
')
dev-lang/swig
sys-devel/gettext
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${PN}-2.0.1-r1-build-system.patch
"${FILESDIR}"/${P}-GIL-hold.patch
"${FILESDIR}"/${P}-setuptools.patch
"${FILESDIR}"/${PN}-2.0.1-python3.11.patch
"${FILESDIR}"/${PN}-2.0.1-numpy-2.patch
"${FILESDIR}"/${PN}-2.0.1-pygobject-3.52.patch
)
pkg_pretend() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}
pkg_setup() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
python-single-r1_pkg_setup
}
src_compile() {
# --disable-openmp can't be passed to setup.py build,
# only setup.py build_ext.
# Trying to call build_ext then build and such fails.
#
# We just override the environment instead for simplicity.
local openmp=$(usex openmp '-fopenmp' '-fno-openmp')
local -x OPENMP_CFLAG="${openmp}" OPENMP_LDFLAG="${openmp}"
edo ${EPYTHON} setup.py build
}
src_install() {
edo ${EPYTHON} setup.py install --prefix="${EPREFIX}/usr" --root="${D}"
python_fix_shebang "${ED}"/usr/bin
python_optimize
python_optimize "${ED}/usr/lib/mypaint"
einstalldocs
newicon pixmaps/${PN}_logo.png ${PN}.png
local lang=
for lang in ${LANGS}; do
if ! has ${lang} ${LINGUAS}; then
rm -rf "${ED}"/usr/share/locale/${lang} || die
fi
done
}