summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-01-10 04:55:26 +0000
committerSam James <sam@gentoo.org>2023-01-10 04:56:16 +0000
commit45846fb0a873286029d6673f114c43433b7be91c (patch)
tree09019bfe80c5c5271cc43caccea0f54ff8c5187e /media-gfx/mypaint/mypaint-2.0.1-r3.ebuild
parentdev-vcs/git-filter-repo: enable py3.11, run tests per python impl (diff)
downloadgentoo-45846fb0a873286029d6673f114c43433b7be91c.tar.gz
gentoo-45846fb0a873286029d6673f114c43433b7be91c.tar.bz2
gentoo-45846fb0a873286029d6673f114c43433b7be91c.zip
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@gentoo.org>
Diffstat (limited to 'media-gfx/mypaint/mypaint-2.0.1-r3.ebuild')
-rw-r--r--media-gfx/mypaint/mypaint-2.0.1-r3.ebuild79
1 files changed, 79 insertions, 0 deletions
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
+}