]> git.draconx.ca Git - gentoo-draconx.git/blob - media-plugins/gimp-python/gimp-python-2.10.20-r3.ebuild
media-plugins/gimp-python: Fix build with autoconf-2.71.
[gentoo-draconx.git] / media-plugins / gimp-python / gimp-python-2.10.20-r3.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=(
36         "$FILESDIR/$PV-no-mypaint-brushes.patch"
37         "$FILESDIR/$PV-configure-fixes.patch"
38 )
39
40 src_prepare () {
41         sed -i '/^libgimp/s|[^ ]*/lib\(gimp[^-]*\)-[^ ]*\.la|-l\1-2.0|' \
42                 plug-ins/pygimp/Makefile.am
43
44         default
45
46         eautoreconf
47 }
48
49 src_configure () {
50         local myconf=(
51                 GDBUS_CODEGEN="/bin/false"
52                 GEGL="$EPREFIX/usr/bin/gegl-0.4"
53
54                 $(use_enable cpu_flags_ppc_altivec altivec)
55                 $(use_enable cpu_flags_x86_mmx mmx)
56                 $(use_enable cpu_flags_x86_sse sse)
57                 --enable-python
58         )
59
60         econf "${myconf[@]}"
61 }
62
63 src_compile () {
64         cd plug-ins/pygimp && emake
65 }
66
67 src_install () {
68         cd plug-ins/pygimp && emake DESTDIR="$D" install
69         find "$D" -name '*.la' -delete
70 }