]> git.draconx.ca Git - gentoo-draconx.git/commitdiff
Add media-plugins/gimp-python to maintain python support in GIMP.
authorNick Bowler <nbowler@draconx.ca>
Thu, 26 Nov 2020 07:54:25 +0000 (02:54 -0500)
committerNick Bowler <nbowler@draconx.ca>
Thu, 26 Nov 2020 07:54:25 +0000 (02:54 -0500)
It's pretty easy to build the python support separately from GIMP, so
let's do so.  This allows the support to be installed alongside the
normal python-deficient gimp from Gentoo repository.

media-plugins/gimp-plugin-export-layers/Manifest [new file with mode: 0644]
media-plugins/gimp-plugin-export-layers/gimp-plugin-export-layers-3.3.1-r1.ebuild [new file with mode: 0644]
media-plugins/gimp-python/Manifest [new file with mode: 0644]
media-plugins/gimp-python/gimp-python-2.10.20.ebuild [new file with mode: 0644]

diff --git a/media-plugins/gimp-plugin-export-layers/Manifest b/media-plugins/gimp-plugin-export-layers/Manifest
new file mode 100644 (file)
index 0000000..1343189
--- /dev/null
@@ -0,0 +1,2 @@
+DIST gimp-plugin-export-layers-3.3.1.tar.gz 1023297 BLAKE2B c6a26b381bdfe450b1a6cd0491fcc1f471ee1c2cd204cf43cb7c993bd62311a1d32e977b917fa020732ac92a6eab371d5574eb9c13b7c505022971b736b531ff SHA512 92b8798f9129624e4a5ce5fc8b1e9106eb1e0614b50074450c69f17d33646f3b9bfda231d8de7f79d16037194f94d5584b0e3b98ebac1c2aa98f94ae7f66ef8e
+EBUILD gimp-plugin-export-layers-3.3.1-r1.ebuild 940 BLAKE2B 2d0bd6650f2030812bdc6d1bf63ad3e98c2e353336a24d8083a8659a2e30d46c15a9c97f7b40ddf0e9a906d598fcc04ca94baccbfe08b51d0161ab072bc86d30 SHA512 b2b4c77d206cf0feed5669d1c85e4fe09f62a1234b93622994f78b9d41bc3e7be64e8b04f913a286f19a9a944bd20c7d9d534ba63511f397ca0c5499ba76d7aa
diff --git a/media-plugins/gimp-plugin-export-layers/gimp-plugin-export-layers-3.3.1-r1.ebuild b/media-plugins/gimp-plugin-export-layers/gimp-plugin-export-layers-3.3.1-r1.ebuild
new file mode 100644 (file)
index 0000000..cc0b94d
--- /dev/null
@@ -0,0 +1,37 @@
+# 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 python-single-r1 multilib
+
+DESCRIPTION="GIMP plug-in that exports layers as separate images"
+HOMEPAGE="https://khalim19.github.io/gimp-plugin-export-layers/"
+SRC_URI="https://github.com/khalim19/$PN/archive/$PV.tar.gz -> $P.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+REQUIRED_USE=$PYTHON_REQUIRED_USE
+
+DEPEND=$PYTHON_DEPS
+RDEPEND="$DEPEND
+       || (
+               media-plugins/gimp-python[$PYTHON_SINGLE_USEDEP]
+               media-gfx/gimp[python(-),$PYTHON_SINGLE_USEDEP] )"
+
+src_install () {
+       local plugindir=/usr/$(get_libdir)/gimp/2.0/plug-ins
+       default
+
+       python_moduleinto "$plugindir"
+       python_domodule export_layers
+
+       exeinto "$plugindir"
+       doexe export_layers.py
+}
diff --git a/media-plugins/gimp-python/Manifest b/media-plugins/gimp-python/Manifest
new file mode 100644 (file)
index 0000000..aa3832b
--- /dev/null
@@ -0,0 +1,2 @@
+DIST gimp-2.10.20.tar.bz2 33108938 BLAKE2B 060c0e46e6f4ac861de265842d545285c2fa4590908172971ef240ae87f8caa2c015447deee810fef59c4869810676daae2e40aa611062168feffe38c7cd9b22 SHA512 7cd0b1833af87a167fdfee59fb491a72727fe3071c21c0de1813adb0f8272a92473e1e300517395b1b4593c8cb6781ee30f7a63966756e5a7f523a164308aba6
+EBUILD gimp-python-2.10.20.ebuild 1391 BLAKE2B 8c9668f92457dff226bc6f707cbd1d333e7406d4eb0ac995c903033d748b851b62d7709ea9650ad5a622d85cc88966632ae2bbf253c029ddf63960940e04fa2c SHA512 72b7fec13a785ce41f3e5483a3d34336d3781bc1e589018df4b004102b4a950142998fd8dc4d175c54dabdb384388d533ccd3c46505b1de0e957dbfbd72d9f3c
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
+}