summaryrefslogtreecommitdiff
path: root/media-gfx/mypaint
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-10 06:19:57 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-10 06:19:57 +0000
commit30f491533785a455cdfbd05bb57f1f869a8e41bb (patch)
tree231d01a9349dfa1f56a7235017f5201a7382c652 /media-gfx/mypaint
parenta96f1a2ca235a5eb9e7c498636cd1291be76cb09 (diff)
gentoo auto-resync : 10:01:2023 - 06:19:57
Diffstat (limited to 'media-gfx/mypaint')
-rw-r--r--media-gfx/mypaint/Manifest3
-rw-r--r--media-gfx/mypaint/files/mypaint-2.0.1-python3.11.patch92
-rw-r--r--media-gfx/mypaint/files/mypaint-2.0.1-setuptools.patch74
-rw-r--r--media-gfx/mypaint/mypaint-2.0.1-r3.ebuild79
4 files changed, 248 insertions, 0 deletions
diff --git a/media-gfx/mypaint/Manifest b/media-gfx/mypaint/Manifest
index f576238216a2..54137e508a88 100644
--- a/media-gfx/mypaint/Manifest
+++ b/media-gfx/mypaint/Manifest
@@ -1,5 +1,8 @@
AUX mypaint-2.0.1-GIL-hold.patch 5153 BLAKE2B 3d70b414bfb6396fffb9ebfc9c1fe6791878a97a999355b103fd848993172049db7f97f81d96e253294b9629a2a5dfe7c6710f29561f45b89f4fb26d4cf9a788 SHA512 aa64bb4ffb907516af811bb8ef4c0bccce9b785f94e0d71a44be30e7c96ea3a35dcceeac618956bf11c9d2c5c4e05524c8492ed14967148e2d6b9646b1ed5c15
+AUX mypaint-2.0.1-python3.11.patch 3968 BLAKE2B 02318c3543bc66fc1ffd89af02f00c0e02a233d9656415505abbd6585cb89ece985b5e8b6946a2b279df22d088fcb36e740e395b712dae8eab8a93e3fe76b212 SHA512 cb6a547ab5e842b9bf4b8ba7c3af83ab3027d9e9b6f65563a530f9ddb8f015024e9d4aa0a35a8881e8a59342c428ee2b457ed9243a37333290e81a854542bd0d
AUX mypaint-2.0.1-r1-build-system.patch 638 BLAKE2B 8e0209eb8fdba535cb8c0075e183681b0d8f8a11613cf7c3d2ddb5e20954d6c95da3ef3824063ac55bb11feda38cdf00eb8190cf76ca7753d2432d870926194b SHA512 8c088a089408542f57ef0fb608a63ae6fa0cce5392cb309376198813d35f5c3e54466945419984973af77e11f5bc4908961b5e81982a32fbef04c081df1b0349
+AUX mypaint-2.0.1-setuptools.patch 2647 BLAKE2B e9212c40830e51ed8abe217204ce3bcad65fac99c7ad00f38ae6275eb404c3464598672431a6c857f7de42950830a63f25bcfcb5f19685a443f963251ed1a9be SHA512 4d834558ab0e5419aae98a2a8f30c285d330392d3627e21d25def869b16e2ef4100d45d6a78b3f1714bd72e1e7b8cb7de24f89893c6c98d87bcefe74aff5965a
DIST mypaint-2.0.1.tar.xz 7295048 BLAKE2B 813a939f95ea6887c57d8c0868e33e9bc8b1b95746d5ecd793d4fd13a32198ee5a445cfdd2691a15e944bfb0099d6ac624dff320ae29465db5b1e0d197bedb30 SHA512 449beddcc6da5d720c9efbeac94a466ed0057bd1962d42ebb419190e8b7fd8ffd341327408467fc5da47920f9d0da1fd6d78233a0dda88de5f5d52d53d9ab562
EBUILD mypaint-2.0.1-r2.ebuild 1816 BLAKE2B 164664c5d655be800632266601806561675880f31f71911e481088fe83930732312f698419510eacf15052edf84bdf62c98d49ef607e6590519e7d1ea5be74b2 SHA512 b98f77948c760fe47e595b504607e254d64496b0b7348ea06992b111ed7ef5f18a978330f8fd0844415580691e6e44227d1c24ed77831526c05c52fc8b0a1201
+EBUILD mypaint-2.0.1-r3.ebuild 1898 BLAKE2B 40bbf73ab37e99377b8bf991e28f81e8442af50d9e48d2779c0c186280642560bb27ccb81517ac40d46c4e8bda53f3989263b6f7230bce3581cf515a074352ac SHA512 bc3514ca35ed8f62924160cf7b669357bb890d2d71a638452e03723b5faaec80d6ef2b37f0c05eb0c2e920d45678291df7884bc5a0da69808d3bd6d1e1352a77
MISC metadata.xml 320 BLAKE2B 17a66707a8182c8eb1a0206b8ec86cdc307ce2d965beb66aa08e3e2b31700eebc05213b7e27e98aef40e566fd028561476d6f614aeb2a0450f560801f187b060 SHA512 cb54ae739d86722c2959d8ff63d8f20394b0611ef3f3a6587e517f3de6625748201659d782e6ec8ca65e55c285a6ff52408b3586088ce2546ba42872dfd07133
diff --git a/media-gfx/mypaint/files/mypaint-2.0.1-python3.11.patch b/media-gfx/mypaint/files/mypaint-2.0.1-python3.11.patch
new file mode 100644
index 000000000000..7a652754204d
--- /dev/null
+++ b/media-gfx/mypaint/files/mypaint-2.0.1-python3.11.patch
@@ -0,0 +1,92 @@
+https://github.com/mypaint/mypaint/pull/1193
+
+From 032a155b72f2b021f66a994050d83f07342d04af Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
+ <congdanhqx@gmail.com>
+Date: Wed, 9 Nov 2022 11:24:33 +0700
+Subject: [PATCH] python: fix for Python 3.11
+
+- python 3 always open in universal mode, U is default mode in 3.0,
+ and removed in 3.11
+- mypaint doesn't use ld?n?gettext, so bind_textdomain_codeset isn't
+ needed, that function is deprecated in 3.8 and is no-ops in 3.10 and
+ removed in 3.11
+--- a/lib/gettext_setup.py
++++ b/lib/gettext_setup.py
+@@ -82,13 +82,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(
+@@ -117,12 +115,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,
+@@ -177,35 +169,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:
+--- a/setup.py
++++ b/setup.py
+@@ -679,7 +679,7 @@ def _install_script(self, src, header):
+ self.announce("installing %s as %s" % (src, targ_basename), level=2)
+ if self.dry_run:
+ return []
+- with open(src, "rU") as in_fp:
++ with open(src, "r") as in_fp:
+ with open(targ, "w") as out_fp:
+ line = in_fp.readline().rstrip()
+ if line.startswith("#!"):
+
diff --git a/media-gfx/mypaint/files/mypaint-2.0.1-setuptools.patch b/media-gfx/mypaint/files/mypaint-2.0.1-setuptools.patch
new file mode 100644
index 000000000000..352e23aceb7d
--- /dev/null
+++ b/media-gfx/mypaint/files/mypaint-2.0.1-setuptools.patch
@@ -0,0 +1,74 @@
+https://github.com/mypaint/mypaint/commit/1e97b4e1c0ea785b527ea63bf19f8554f3a25319
+https://github.com/mypaint/mypaint/commit/423950bec96d6057eac70442de577364d784a847
+
+From 1e97b4e1c0ea785b527ea63bf19f8554f3a25319 Mon Sep 17 00:00:00 2001
+From: Jan Tojnar <jtojnar@gmail.com>
+Date: Wed, 6 Apr 2022 22:55:21 +0200
+Subject: [PATCH] setup.py:
+
+Setuptools 54.1.0+ complains:
+
+ lib/python3.9/site-packages/setuptools/dist.py:732: UserWarning: Usage of dash-separated 'install-data' will not be supported in future versions. Please use the underscore name 'install_data' instead
+
+https://github.com/pypa/setuptools/commit/a2e9ae4cb75f9b00ddf37713ec307e5f00869737
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -7,11 +7,11 @@
+
+ [install]
+ verbose=1
+-install-scripts=$base/bin
+-install-platlib=$base/lib/mypaint
+-install-purelib=$base/lib/mypaint
+-install-data=$base/share
+-install-headers=$base/include
++install_scripts=$base/bin
++install_platlib=$base/lib/mypaint
++install_purelib=$base/lib/mypaint
++install_data=$base/share
++install_headers=$base/include
+
+ [nosetests]
+ with-doctest=1
+
+From 423950bec96d6057eac70442de577364d784a847 Mon Sep 17 00:00:00 2001
+From: Jan Tojnar <jtojnar@gmail.com>
+Date: Wed, 6 Apr 2022 23:13:06 +0200
+Subject: [PATCH] setup.py: Ensure setuptools-compatible distutils are used
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Setuptools is warning:
+
+ lib/python3.9/site-packages/_distutils_hack/__init__.py:17: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
+
+And in fact, I am getting such errors:
+
+ distutils.errors.DistutilsClassError: command class <class '__main__.Build'> must subclass Command
+
+Let’s do as asked.
+--- a/setup.py
++++ b/setup.py
+@@ -16,9 +16,6 @@
+ import shutil
+ import functools
+
+-from distutils.command.build import build
+-from distutils.command.clean import clean
+-
+ from setuptools import setup
+ from setuptools import Extension
+ from setuptools import Command
+@@ -26,6 +23,11 @@
+ from setuptools.command.install import install
+ from setuptools.command.install_scripts import install_scripts
+
++# setuptools must be imported first since they ensure
++# their distutils implementation will be used.
++from distutils.command.build import build
++from distutils.command.clean import clean
++
+ # Constants
+
+
diff --git a/media-gfx/mypaint/mypaint-2.0.1-r3.ebuild b/media-gfx/mypaint/mypaint-2.0.1-r3.ebuild
new file mode 100644
index 000000000000..a491c415a316
--- /dev/null
+++ b/media-gfx/mypaint/mypaint-2.0.1-r3.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+DISTUTILS_SINGLE_IMPL=1
+
+inherit desktop distutils-r1 xdg
+
+DESCRIPTION="Fast and easy graphics application for digital painters"
+HOMEPAGE="http://mypaint.org/"
+SRC_URI="https://github.com/mypaint/${PN}/releases/download/v${PV}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~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"
+
+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[${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
+ sys-libs/libomp
+ x11-libs/gdk-pixbuf[jpeg]
+ x11-libs/gtk+:3
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ ${PYTHON_DEPS}
+ 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
+)
+
+distutils_enable_tests setup.py
+
+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')
+
+ OPENMP_CFLAG="${openmp}" OPENMP_LDFLAG="${openmp}" distutils-r1_src_compile
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ 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
+}