diff --git a/srcpkgs/mypaint/patches/python-3.11.patch b/srcpkgs/mypaint/patches/python-3.11.patch index 7a36ea63310..eff729d4acd 100644 --- a/srcpkgs/mypaint/patches/python-3.11.patch +++ b/srcpkgs/mypaint/patches/python-3.11.patch @@ -1,5 +1,9 @@ ---- a/setup.py -+++ b/setup.py +mypaint doesn't use l[dn]*gettext, +bind_textdomain_codeset is not needed at all +Index: mypaint-2.0.1/setup.py +=================================================================== +--- mypaint-2.0.1.orig/setup.py ++++ mypaint-2.0.1/setup.py @@ -632,7 +632,7 @@ class InstallScripts (install_scripts): self.announce("installing %s as %s" % (src, targ_basename), level=2) if self.dry_run: @@ -9,3 +13,72 @@ with open(targ, "w") as out_fp: line = in_fp.readline().rstrip() if line.startswith("#!"): +Index: mypaint-2.0.1/lib/gettext_setup.py +=================================================================== +--- mypaint-2.0.1.orig/lib/gettext_setup.py ++++ mypaint-2.0.1/lib/gettext_setup.py +@@ -72,13 +72,11 @@ def init_gettext(localepath): + # yanked in over GI. + # https://bugzilla.gnome.org/show_bug.cgi?id=574520#c26 + bindtextdomain = None +- bind_textdomain_codeset = None + textdomain = None + + # Try the POSIX/Linux way first. + try: + bindtextdomain = locale.bindtextdomain +- bind_textdomain_codeset = locale.bind_textdomain_codeset + textdomain = locale.textdomain + except AttributeError: + logger.warning( +@@ -107,12 +105,6 @@ def init_gettext(localepath): + ctypes.c_char_p, + ) + bindtextdomain.restype = ctypes.c_char_p +- bind_textdomain_codeset = libintl.bind_textdomain_codeset +- bind_textdomain_codeset.argtypes = ( +- ctypes.c_char_p, +- ctypes.c_char_p, +- ) +- bind_textdomain_codeset.restype = ctypes.c_char_p + textdomain = libintl.textdomain + textdomain.argtypes = ( + ctypes.c_char_p, +@@ -167,35 +159,22 @@ def init_gettext(localepath): + # complete set from the same source. + # Required for translatable strings in GtkBuilder XML + # to be translated. +- if bindtextdomain and bind_textdomain_codeset and textdomain: ++ if bindtextdomain and textdomain: + assert os.path.exists(path) + assert os.path.isdir(path) + if sys.platform == 'win32': + p = bindtextdomain(dom.encode('utf-8'), path.encode('utf-8')) +- c = bind_textdomain_codeset( +- dom.encode('utf-8'), codeset.encode('utf-8') +- ) + else: + p = bindtextdomain(dom, path) +- c = bind_textdomain_codeset(dom, codeset) + logger.debug("C bindtextdomain(%r, %r): %r", dom, path, p) +- logger.debug( +- "C bind_textdomain_codeset(%r, %r): %r", +- dom, codeset, c, +- ) + # Call the implementations in Python's standard gettext module + # too. This has proper cross-platform support, but it only + # initializes the native Python "gettext" module. + # Required for marked strings in Python source to be translated. + # See http://docs.python.org/release/2.7/library/locale.html + p = gettext.bindtextdomain(dom, path) +- c = gettext.bind_textdomain_codeset(dom, codeset) + logger.debug("Python bindtextdomain(%r, %r): %r", dom, path, p) +- logger.debug( +- "Python bind_textdomain_codeset(%r, %r): %r", +- dom, codeset, c, +- ) +- if bindtextdomain and bind_textdomain_codeset and textdomain: ++ if bindtextdomain and textdomain: + if sys.platform == 'win32': + d = textdomain(defaultdom.encode('utf-8')) + else: diff --git a/srcpkgs/mypaint/template b/srcpkgs/mypaint/template index 542ce34589d..34a96daa78d 100644 --- a/srcpkgs/mypaint/template +++ b/srcpkgs/mypaint/template @@ -1,7 +1,7 @@ # Template file for 'mypaint' pkgname=mypaint version=2.0.1 -revision=3 +revision=4 build_style=python3-module pycompile_dirs="/usr/share/mypaint" hostmakedepends="swig pkg-config gettext python3-setuptools python3-numpy python3"