]> git.draconx.ca Git - gentoo-draconx.git/blobdiff - 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
diff --git a/media-plugins/gimp-python/gimp-python-2.10.20.ebuild b/media-plugins/gimp-python/gimp-python-2.10.20.ebuild
new file mode 100644 (file)
index 0000000..f77a72b
--- /dev/null
@@ -0,0 +1,64 @@
+# Copyright © 2020 Nick Bowler
+# License GPLv3+: GNU General Public License version 3 or any later version.
+# This is free software: you are free to change and redistribute it.
+# There is NO WARRANTY, to the extent permitted by law.
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools python-single-r1
+
+MY_P=${P/-python/}
+
+DESCRIPTION="Python plugin support for GIMP"
+HOMEPAGE="https://www.gimp.org/"
+SRC_URI="mirror://gimp/v2.10/$MY_P.tar.bz2"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cpu_flags_ppc_altivec cpu_flags_x86_mmx cpu_flags_x86_sse"
+
+DEPEND="$PYTHON_DEPS
+       >=media-gfx/gimp-$PV
+       $(python_gen_cond_dep '
+               >=dev-python/pycairo-1.0.2:2[${PYTHON_USEDEP}]
+               >=dev-python/pygtk-2.10.4:2[${PYTHON_USEDEP}]')
+       !media-gfx/gimp[python(-)]"
+RDEPEND=$DEPEND
+REQUIRED_USE=$PYTHON_REQUIRED_USE
+
+S=$WORKDIR/$MY_P
+
+src_prepare () {
+       sed -i '/^libgimp/s|[^ ]*/lib\(gimp[^-]*\)-[^ ]*\.la|-l\1-2.0|' \
+               plug-ins/pygimp/Makefile.am
+
+       default
+
+       eautoreconf
+}
+
+src_configure () {
+       local myconf=(
+               GDBUS_CODEGEN="/bin/false"
+               GEGL="$EPREFIX/usr/bin/gegl-0.4"
+
+               $(use_enable cpu_flags_ppc_altivec altivec)
+               $(use_enable cpu_flags_x86_mmx mmx)
+               $(use_enable cpu_flags_x86_sse sse)
+               --enable-python
+       )
+
+       econf "${myconf[@]}"
+}
+
+src_compile () {
+       cd plug-ins/pygimp && emake
+}
+
+src_install () {
+       cd plug-ins/pygimp && emake DESTDIR="$D" install
+       find "$D" -name '*.la' -delete
+}