]> git.draconx.ca Git - gentoo-draconx.git/blobdiff - media-plugins/gimp-plugin-export-layers/gimp-plugin-export-layers-3.3.1-r4.ebuild
media-plugins/gimp-python: Remove python eclass usage.
[gentoo-draconx.git] / media-plugins / gimp-plugin-export-layers / gimp-plugin-export-layers-3.3.1-r4.ebuild
similarity index 65%
rename from media-plugins/gimp-plugin-export-layers/gimp-plugin-export-layers-3.3.1-r3.ebuild
rename to media-plugins/gimp-plugin-export-layers/gimp-plugin-export-layers-3.3.1-r4.ebuild
index 64282d25070caeec3f2605ddaa016d7b2bb4f19b..439e72f9075c4325b98de5b0fbc1334b2e68e314 100644 (file)
@@ -1,15 +1,10 @@
-# Copyright © 2020-2021 Nick Bowler
+# Copyright © 2020-2022 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_ALLOW_PY27=1
-PYTHON_COMPAT=( python2_7 )
-
-inherit python-single-r1
-
 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"
@@ -17,19 +12,26 @@ 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
 
 RDEPEND="dev-lang/python:2.7
        || (
-               media-plugins/gimp-python[$PYTHON_SINGLE_USEDEP]
-               media-gfx/gimp[python(-),$PYTHON_SINGLE_USEDEP] )"
+               media-plugins/gimp-python[python_targets_python2_7(+)]
+               media-gfx/gimp[python(-)] )"
+BDEPEND="dev-lang/python:2.7"
 
 src_install () {
        local plugindir=/usr/$(get_libdir)/gimp/2.0/plug-ins
+
        default
 
-       python_moduleinto "$plugindir"
-       python_domodule export_layers
+       insinto "$plugindir"
+       doins -r export_layers
+
+       local args=(
+               -m compileall -q -f -d "${EPREFIX%/}$plugindir" "${ED%/}$plugindir"
+       )
+       python2.7 "${args[@]}"
+       python2.7 -OO "${args[@]}"
 
        exeinto "$plugindir"
        doexe export_layers.py