commit:     8048c4c0150f6761115dfef23be004e589f21fc3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  6 03:50:31 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep  6 03:50:31 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8048c4c0

media-gfx/mypaint: tidy ebuild

* Respect CFLAGS further (was injecting -O3 -g later on for
  some of the build)

* Tidy eclass usage

* Unrestrict tests (failing at present), reported upstream.

Bug: https://bugs.gentoo.org/739122
Package-Manager: Portage-3.0.5, Repoman-3.0.1
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../mypaint/files/mypaint-2.0.1-build-system.patch | 22 ++++++++++++++++++
 media-gfx/mypaint/mypaint-2.0.1.ebuild             | 27 ++++++----------------
 2 files changed, 29 insertions(+), 20 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
new file mode 100644
index 00000000000..63a7a5bf75e
--- /dev/null
+++ b/media-gfx/mypaint/files/mypaint-2.0.1-build-system.patch
@@ -0,0 +1,22 @@
+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/media-gfx/mypaint/mypaint-2.0.1.ebuild 
b/media-gfx/mypaint/mypaint-2.0.1.ebuild
index cb35547d5db..ac43f1303cf 100644
--- a/media-gfx/mypaint/mypaint-2.0.1.ebuild
+++ b/media-gfx/mypaint/mypaint-2.0.1.ebuild
@@ -4,10 +4,11 @@
 EAPI=7
 
 PYTHON_COMPAT=( python3_{7,8,9} )
+DISTUTILS_SINGLE_IMPL=1
 
-inherit desktop distutils-r1 gnome2-utils xdg xdg-utils
+inherit desktop distutils-r1 xdg
 
-DESCRIPTION="fast and easy graphics application for digital painters"
+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";
 
@@ -18,6 +19,7 @@ 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
@@ -42,9 +44,9 @@ RDEPEND="
 "
 DEPEND="${RDEPEND}"
 
-# Need to poke at failing tests
-# Dying on a numpy assert
-RESTRICT="test"
+PATCHES=(
+       "${FILESDIR}/${PN}-2.0.1-build-system.patch"
+)
 
 distutils_enable_tests setup.py
 
@@ -60,18 +62,3 @@ src_install() {
                fi
        done
 }
-
-pkg_preinst() {
-       xdg_pkg_preinst
-       gnome2_icon_savelist
-}
-
-pkg_postinst() {
-       xdg_pkg_postinst
-       xdg_icon_cache_update
-}
-
-pkg_postrm() {
-       xdg_pkg_postrm
-       xdg_mimeinfo_database_update
-}

Reply via email to