public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/mypaint/, media-gfx/mypaint/files/
@ 2020-06-17 17:00 Joonas Niilola
  0 siblings, 0 replies; 4+ messages in thread
From: Joonas Niilola @ 2020-06-17 17:00 UTC (permalink / raw
  To: gentoo-commits

commit:     c7e9406d31735f3eebac889d3326fa96f690317f
Author:     Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Mon May 25 08:09:56 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Jun 17 17:00:25 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7e9406d

media-gfx/mypaint: fix build failure

The added patch fixes build failure caused by missing boolean definition when building with new json-c versions.

Closes: https://bugs.gentoo.org/721388
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Closes: https://github.com/gentoo/gentoo/pull/15959
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../files/mypaint-1.2.1-json-c-boolean-defs.patch  | 34 ++++++++++++++++++++++
 media-gfx/mypaint/mypaint-1.2.1-r5.ebuild          |  3 ++
 2 files changed, 37 insertions(+)

diff --git a/media-gfx/mypaint/files/mypaint-1.2.1-json-c-boolean-defs.patch b/media-gfx/mypaint/files/mypaint-1.2.1-json-c-boolean-defs.patch
new file mode 100644
index 00000000000..caa2df4de6e
--- /dev/null
+++ b/media-gfx/mypaint/files/mypaint-1.2.1-json-c-boolean-defs.patch
@@ -0,0 +1,34 @@
+commit a2b3f56b347c1897454eac1b5bdfe9d228302b80
+Author: Jehan <jehan@girinstud.io>
+Date:   Sat Jan 26 12:50:31 2019 +0100
+
+    Boolean #define-s removed from json-c in 2017.
+    
+    We don't need to #undef TRUE and FALSE before including json.h as this
+    redefinition has been removed in upstream json-c.
+    See json-c commit 0992aac61f8b087efd7094e9ac2b84fa9c040fcd.
+    
+    Note that it still works even if using an older json-c since the
+    original code was alreadying #undef-ing these 2 values before redefining
+    them. So that was anyway useless code and this change should work both
+    with old or new json-c.
+    
+    Note: the previous code was still working fine when building on Linux,
+    but not when cross-compiling on Windows. But this is the correct fix
+    anyway.
+    
+    (cherry picked from commit f4fd97445d3b6843af57ff8ba5f02cbdeb3942e9)
+
+diff --git a/brushlib/mypaint-brush.c b/mypaint-brush.c
+index 4759d11..7a1380c 100644
+--- a/brushlib/mypaint-brush.c
++++ b/brushlib/mypaint-brush.c
+@@ -35,9 +35,6 @@
+ #include "rng-double.h"
+ 
+ #ifdef HAVE_JSON_C
+-// Allow the C99 define from json.h
+-#undef TRUE
+-#undef FALSE
+ #include <json.h>
+ #endif // HAVE_JSON_C

diff --git a/media-gfx/mypaint/mypaint-1.2.1-r5.ebuild b/media-gfx/mypaint/mypaint-1.2.1-r5.ebuild
index ed192d39fbd..4c5a1859342 100644
--- a/media-gfx/mypaint/mypaint-1.2.1-r5.ebuild
+++ b/media-gfx/mypaint/mypaint-1.2.1-r5.ebuild
@@ -41,6 +41,9 @@ DEPEND="${RDEPEND}
 	dev-lang/swig
 	virtual/pkgconfig
 "
+PATCHES=(
+	"${FILESDIR}/${P}-json-c-boolean-defs.patch"
+)
 
 pkg_setup() {
 	python-single-r1_pkg_setup


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/mypaint/, media-gfx/mypaint/files/
@ 2020-09-19 21:24 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2020-09-19 21:24 UTC (permalink / raw
  To: gentoo-commits

commit:     226a0725ccc8ebe63bdb79676c9873d8fe40e714
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 19 21:23:41 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Sep 19 21:24:16 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=226a0725

media-gfx/mypaint: cleanup old

Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../mypaint/files/mypaint-2.0.1-build-system.patch | 37 ------------
 media-gfx/mypaint/mypaint-2.0.1.ebuild             | 69 ----------------------
 2 files changed, 106 deletions(-)

diff --git a/media-gfx/mypaint/files/mypaint-2.0.1-build-system.patch b/media-gfx/mypaint/files/mypaint-2.0.1-build-system.patch
deleted file mode 100644
index c7806e7119d..00000000000
--- a/media-gfx/mypaint/files/mypaint-2.0.1-build-system.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff --git a/setup.py b/setup.py
-index 670df4d..703f9d2 100644
---- a/setup.py
-+++ b/setup.py
-@@ -471,9 +471,6 @@ class BuildExt (build_ext):
-             linkflags.extend([
-                 "-O0",
-             ])
--        else:
--            linkflags.append("-O3")
--            ccflags.append("-O3")
- 
-         return build_ext.build_extension(self, ext)
- 
-@@ -869,7 +866,6 @@ def get_ext_modules():
-         '-Wno-write-strings',
-         '-D_POSIX_C_SOURCE=200809L',
-         "-DNO_TESTS",  # FIXME: we're building against shared libmypaint now
--        '-g',  # always include symbols, for profiling
-     ]
-     extra_link_args = []
- 
-diff --git a/setup.py b/setup.py
-index 703f9d2..cc8abbd 100644
---- a/setup.py
-+++ b/setup.py
-@@ -456,10 +456,6 @@ class BuildExt (build_ext):
-         ccflags = ext.extra_compile_args
-         linkflags = ext.extra_link_args
- 
--        if sys.platform != "darwin" and not self.disable_openmp:
--            linkflags.append(OPENMP_CFLAG)
--            ccflags.append(OPENMP_LDFLAG)
--
-         if self.debug:
-             skip = ["-DNDEBUG"]
-             ccflags[:] = [f for f in ccflags if f not in skip]

diff --git a/media-gfx/mypaint/mypaint-2.0.1.ebuild b/media-gfx/mypaint/mypaint-2.0.1.ebuild
deleted file mode 100644
index 1ca2e261568..00000000000
--- a/media-gfx/mypaint/mypaint-2.0.1.ebuild
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8,9} )
-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"
-
-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"
-
-BDEPEND="
-	${PYTHON_DEPS}
-	dev-lang/swig
-	sys-devel/gettext
-	virtual/pkgconfig
-"
-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
-	media-libs/libpng:0=
-	sys-devel/gettext
-	sys-libs/libomp
-	x11-libs/gtk+:3
-"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-2.0.1-build-system.patch"
-)
-
-distutils_enable_tests setup.py
-
-# TODO: Allow openmp support (patched out)
-# There's no urgency on this given that it currently
-# breaks runtime use [0]
-# [0] https://github.com/mypaint/mypaint/issues/1107.
-
-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
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/mypaint/, media-gfx/mypaint/files/
@ 2020-09-25 10:20 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2020-09-25 10:20 UTC (permalink / raw
  To: gentoo-commits

commit:     2f7948d6830dcabf5722c4f8ad09e399cfb57346
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 25 08:54:57 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Sep 25 10:19:16 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f7948d6

media-gfx/mypaint: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 media-gfx/mypaint/Manifest                         |  1 -
 .../files/mypaint-1.2.1-json-c-boolean-defs.patch  | 34 ---------
 media-gfx/mypaint/mypaint-1.2.1-r5.ebuild          | 89 ----------------------
 3 files changed, 124 deletions(-)

diff --git a/media-gfx/mypaint/Manifest b/media-gfx/mypaint/Manifest
index 4dd29e8dea2..f69a70eeb4d 100644
--- a/media-gfx/mypaint/Manifest
+++ b/media-gfx/mypaint/Manifest
@@ -1,2 +1 @@
-DIST mypaint-1.2.1.tar.xz 37897196 BLAKE2B 2d8f6b03f710febae1c2d617a6e542543786be384585ae8a973604da2eba8a0fb770d185aa3d2dfc6f794adf29ffb9c217356a96ab27d677ebb57816f62fae9c SHA512 1783765e495b9535669a83a29d27ba684e6201fdfe0875bdd2c167b1dab8af05993b19025767fe0b2770ed9e578e4709f75d8a4820ac945812cba85609f9eb9b
 DIST mypaint-2.0.1.tar.xz 7295048 BLAKE2B 813a939f95ea6887c57d8c0868e33e9bc8b1b95746d5ecd793d4fd13a32198ee5a445cfdd2691a15e944bfb0099d6ac624dff320ae29465db5b1e0d197bedb30 SHA512 449beddcc6da5d720c9efbeac94a466ed0057bd1962d42ebb419190e8b7fd8ffd341327408467fc5da47920f9d0da1fd6d78233a0dda88de5f5d52d53d9ab562

diff --git a/media-gfx/mypaint/files/mypaint-1.2.1-json-c-boolean-defs.patch b/media-gfx/mypaint/files/mypaint-1.2.1-json-c-boolean-defs.patch
deleted file mode 100644
index caa2df4de6e..00000000000
--- a/media-gfx/mypaint/files/mypaint-1.2.1-json-c-boolean-defs.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-commit a2b3f56b347c1897454eac1b5bdfe9d228302b80
-Author: Jehan <jehan@girinstud.io>
-Date:   Sat Jan 26 12:50:31 2019 +0100
-
-    Boolean #define-s removed from json-c in 2017.
-    
-    We don't need to #undef TRUE and FALSE before including json.h as this
-    redefinition has been removed in upstream json-c.
-    See json-c commit 0992aac61f8b087efd7094e9ac2b84fa9c040fcd.
-    
-    Note that it still works even if using an older json-c since the
-    original code was alreadying #undef-ing these 2 values before redefining
-    them. So that was anyway useless code and this change should work both
-    with old or new json-c.
-    
-    Note: the previous code was still working fine when building on Linux,
-    but not when cross-compiling on Windows. But this is the correct fix
-    anyway.
-    
-    (cherry picked from commit f4fd97445d3b6843af57ff8ba5f02cbdeb3942e9)
-
-diff --git a/brushlib/mypaint-brush.c b/mypaint-brush.c
-index 4759d11..7a1380c 100644
---- a/brushlib/mypaint-brush.c
-+++ b/brushlib/mypaint-brush.c
-@@ -35,9 +35,6 @@
- #include "rng-double.h"
- 
- #ifdef HAVE_JSON_C
--// Allow the C99 define from json.h
--#undef TRUE
--#undef FALSE
- #include <json.h>
- #endif // HAVE_JSON_C

diff --git a/media-gfx/mypaint/mypaint-1.2.1-r5.ebuild b/media-gfx/mypaint/mypaint-1.2.1-r5.ebuild
deleted file mode 100644
index 4c5a1859342..00000000000
--- a/media-gfx/mypaint/mypaint-1.2.1-r5.ebuild
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python2_7 )
-
-inherit flag-o-matic gnome2-utils scons-utils toolchain-funcs python-single-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=""
-REQUIRED_USE=${PYTHON_REQUIRED_USE}
-
-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_MULTI_USEDEP}]
-		|| (
-			dev-python/numpy-python2[${PYTHON_MULTI_USEDEP}]
-			dev-python/numpy[${PYTHON_MULTI_USEDEP}]
-		)
-		>=dev-python/pycairo-1.4[${PYTHON_MULTI_USEDEP}]
-		dev-python/protobuf-python[${PYTHON_MULTI_USEDEP}]
-	')
-	>=dev-libs/json-c-0.11:=
-	media-libs/lcms:2
-	>=media-libs/libmypaint-1.3.0
-	media-libs/libpng:0=
-	gnome-base/librsvg
-	sys-libs/libomp
-	x11-libs/gtk+:3
-"
-DEPEND="${RDEPEND}
-	dev-lang/swig
-	virtual/pkgconfig
-"
-PATCHES=(
-	"${FILESDIR}/${P}-json-c-boolean-defs.patch"
-)
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-}
-
-src_compile() {
-	# Workaround scons bug with locales. Bug #352700
-	export LANG="en_US.UTF-8"
-	tc-export CC CXX
-	strip-flags  # scons upstream issue #3017
-	escons
-}
-
-src_install() {
-	escons prefix="${D}/usr" install
-	newicon pixmaps/${PN}_logo.png ${PN}.png
-	for x in ${LANGS}; do
-		if ! has ${x} ${LINGUAS}; then
-			rm -rf "${ED}"/usr/share/locale/${x} || die
-		fi
-	done
-
-	python_optimize "${D}"usr/share/${PN}
-	# not used and broken
-	rm -r "${ED}"/usr/{include/,lib/libmypaint.a,lib/pkgconfig/} || die
-	# already provided by system-libmypaint
-	rm "${ED}"/usr/share/locale/*/LC_MESSAGES/libmypaint* || die
-}
-
-pkg_preinst() {
-	xdg_pkg_preinst
-	gnome2_icon_savelist
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-	gnome2_icon_cache_update
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-	fdo-mime_desktop_database_update
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/mypaint/, media-gfx/mypaint/files/
@ 2023-01-10  4:57 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2023-01-10  4:57 UTC (permalink / raw
  To: gentoo-commits

commit:     45846fb0a873286029d6673f114c43433b7be91c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 10 04:55:26 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan 10 04:56:16 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45846fb0

media-gfx/mypaint: update EAPI 7 -> 8, enable py3.11

Small chance the gettext stuff in the Python 3.11 patch helps
w/ the musl segfault, bug #836232.

Bug: https://bugs.gentoo.org/836232
Closes: https://bugs.gentoo.org/807979
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../mypaint/files/mypaint-2.0.1-python3.11.patch   | 92 ++++++++++++++++++++++
 .../mypaint/files/mypaint-2.0.1-setuptools.patch   | 74 +++++++++++++++++
 media-gfx/mypaint/mypaint-2.0.1-r3.ebuild          | 79 +++++++++++++++++++
 3 files changed, 245 insertions(+)

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
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-10  4:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-17 17:00 [gentoo-commits] repo/gentoo:master commit in: media-gfx/mypaint/, media-gfx/mypaint/files/ Joonas Niilola
  -- strict thread matches above, loose matches on Subject: below --
2020-09-19 21:24 Sam James
2020-09-25 10:20 Michał Górny
2023-01-10  4:57 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox