]> git.draconx.ca Git - gentoo-draconx.git/blob - media-plugins/gimp-python/gimp-python-2.10.20.ebuild
Add media-plugins/gimp-python to maintain python support in GIMP.
[gentoo-draconx.git] / media-plugins / gimp-python / gimp-python-2.10.20.ebuild
1 # Copyright © 2020 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_COMPAT=( python2_7 )
9
10 inherit autotools python-single-r1
11
12 MY_P=${P/-python/}
13
14 DESCRIPTION="Python plugin support for GIMP"
15 HOMEPAGE="https://www.gimp.org/"
16 SRC_URI="mirror://gimp/v2.10/$MY_P.tar.bz2"
17
18 LICENSE="GPL-3+"
19 SLOT="0"
20 KEYWORDS="~amd64 ~x86"
21 IUSE="cpu_flags_ppc_altivec cpu_flags_x86_mmx cpu_flags_x86_sse"
22
23 DEPEND="$PYTHON_DEPS
24         >=media-gfx/gimp-$PV
25         $(python_gen_cond_dep '
26                 >=dev-python/pycairo-1.0.2:2[${PYTHON_USEDEP}]
27                 >=dev-python/pygtk-2.10.4:2[${PYTHON_USEDEP}]')
28         !media-gfx/gimp[python(-)]"
29 RDEPEND=$DEPEND
30 REQUIRED_USE=$PYTHON_REQUIRED_USE
31
32 S=$WORKDIR/$MY_P
33
34 src_prepare () {
35         sed -i '/^libgimp/s|[^ ]*/lib\(gimp[^-]*\)-[^ ]*\.la|-l\1-2.0|' \
36                 plug-ins/pygimp/Makefile.am
37
38         default
39
40         eautoreconf
41 }
42
43 src_configure () {
44         local myconf=(
45                 GDBUS_CODEGEN="/bin/false"
46                 GEGL="$EPREFIX/usr/bin/gegl-0.4"
47
48                 $(use_enable cpu_flags_ppc_altivec altivec)
49                 $(use_enable cpu_flags_x86_mmx mmx)
50                 $(use_enable cpu_flags_x86_sse sse)
51                 --enable-python
52         )
53
54         econf "${myconf[@]}"
55 }
56
57 src_compile () {
58         cd plug-ins/pygimp && emake
59 }
60
61 src_install () {
62         cd plug-ins/pygimp && emake DESTDIR="$D" install
63         find "$D" -name '*.la' -delete
64 }