]> git.draconx.ca Git - gentoo-draconx.git/blob - media-plugins/gimp-python/gimp-python-2.10.20-r2.ebuild
gimp-python et al: Avoid python-exec dependency.
[gentoo-draconx.git] / media-plugins / gimp-python / gimp-python-2.10.20-r2.ebuild
1 # Copyright © 2020-2021 Nick Bowler
2 # License GPLv3+: GNU General Public License version 3 or any later version.
3 # This is free software: you are free to change and redistribute it.
4 # There is NO WARRANTY, to the extent permitted by law.
5
6 EAPI=7
7
8 _PYTHON_ALLOW_PY27=1
9 PYTHON_COMPAT=( python2_7 )
10
11 inherit autotools python-single-r1
12
13 MY_P=${P/-python/}
14
15 DESCRIPTION="Python plugin support for GIMP"
16 HOMEPAGE="https://www.gimp.org/"
17 SRC_URI="mirror://gimp/v2.10/$MY_P.tar.bz2"
18
19 LICENSE="GPL-3+"
20 SLOT="0"
21 KEYWORDS="~amd64 ~x86"
22 IUSE="cpu_flags_ppc_altivec cpu_flags_x86_mmx cpu_flags_x86_sse"
23
24 DEPEND="dev-lang/python:2.7
25         >=media-gfx/gimp-$PV
26         $(python_gen_cond_dep '
27                 >=dev-python/pycairo-1.0.2:2[${PYTHON_USEDEP}]
28                 >=dev-python/pygtk-2.10.4:2[${PYTHON_USEDEP}]')
29         !media-gfx/gimp[python(-)]"
30 RDEPEND=$DEPEND
31 REQUIRED_USE=$PYTHON_REQUIRED_USE
32
33 S=$WORKDIR/$MY_P
34
35 PATCHES=("$FILESDIR/$PV-no-mypaint-brushes.patch")
36
37 src_prepare () {
38         sed -i '/^libgimp/s|[^ ]*/lib\(gimp[^-]*\)-[^ ]*\.la|-l\1-2.0|' \
39                 plug-ins/pygimp/Makefile.am
40
41         default
42
43         eautoreconf
44 }
45
46 src_configure () {
47         local myconf=(
48                 GDBUS_CODEGEN="/bin/false"
49                 GEGL="$EPREFIX/usr/bin/gegl-0.4"
50
51                 $(use_enable cpu_flags_ppc_altivec altivec)
52                 $(use_enable cpu_flags_x86_mmx mmx)
53                 $(use_enable cpu_flags_x86_sse sse)
54                 --enable-python
55         )
56
57         econf "${myconf[@]}"
58 }
59
60 src_compile () {
61         cd plug-ins/pygimp && emake
62 }
63
64 src_install () {
65         cd plug-ins/pygimp && emake DESTDIR="$D" install
66         find "$D" -name '*.la' -delete
67 }