commit:     fea4860e2c82475880cf566e304f41df80c99f69
Author:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 24 19:59:36 2018 +0000
Commit:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Mon Sep 24 20:38:37 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fea4860e

media-gfx/gimp: Avoid colliding with pre-2.10.6 plug-ins

Bug: https://bugs.gentoo.org/664938
Package-Manager: Portage-2.3.49, Repoman-2.3.10

 .../{gimp-9999.ebuild => gimp-2.10.6-r1.ebuild}    | 38 +++++++++++++++++-----
 media-gfx/gimp/gimp-9999.ebuild                    | 19 +++++++++++
 2 files changed, 49 insertions(+), 8 deletions(-)

diff --git a/media-gfx/gimp/gimp-9999.ebuild 
b/media-gfx/gimp/gimp-2.10.6-r1.ebuild
similarity index 82%
copy from media-gfx/gimp/gimp-9999.ebuild
copy to media-gfx/gimp/gimp-2.10.6-r1.ebuild
index 82186f49ec6..21a2f68ae67 100644
--- a/media-gfx/gimp/gimp-9999.ebuild
+++ b/media-gfx/gimp/gimp-2.10.6-r1.ebuild
@@ -5,15 +5,17 @@ EAPI=6
 PYTHON_COMPAT=( python2_7 )
 GNOME2_EAUTORECONF=yes
 
-inherit virtualx autotools gnome2 multilib python-single-r1 ltprune git-r3
+MY_PV="${PV/_rc/-RC}"
+MY_P="${PN}-${MY_PV}"
+
+inherit versionator virtualx autotools gnome2 multilib python-single-r1 ltprune
 
 DESCRIPTION="GNU Image Manipulation Program"
 HOMEPAGE="https://www.gimp.org/";
-EGIT_REPO_URI="https://gitlab.gnome.org/GNOME/gimp.git";
-SRC_URI=""
+SRC_URI="mirror://gimp/v$(get_version_component_range 1-2)/${MY_P}.tar.bz2"
 LICENSE="GPL-3 LGPL-3"
 SLOT="2"
-KEYWORDS=""
+KEYWORDS="~amd64 ~x86"
 
 LANGS="am ar ast az be bg br ca ca@valencia cs csb da de dz el en_CA en_GB eo 
es et eu fa fi fr ga gl gu he hi hr hu id is it ja ka kk km kn ko lt lv mk ml 
ms my nb nds ne nl nn oc pa pl pt pt_BR ro ru rw si sk sl sr sr@latin sv ta te 
th tr tt uk vi xh yi zh_CN zh_HK zh_TW"
 IUSE="alsa aalib altivec aqua debug doc openexr gnome postscript jpeg2k 
cpu_flags_x86_mmx mng python smp cpu_flags_x86_sse udev vector-icons webp wmf 
xpm"
@@ -69,7 +71,6 @@ RDEPEND=">=dev-libs/glib-2.54.2:2
 DEPEND="${RDEPEND}
        >=dev-lang/perl-5.10.0
        dev-libs/appstream-glib
-       dev-util/gdbus-codegen
        dev-util/gtk-update-icon-cache
        sys-apps/findutils
        virtual/pkgconfig
@@ -77,7 +78,6 @@ DEPEND="${RDEPEND}
        >=sys-devel/gettext-0.19
        doc? ( >=dev-util/gtk-doc-1 )
        >=sys-devel/libtool-2.2
-       >=sys-devel/autoconf-2.54
        >=sys-devel/automake-1.11
        dev-util/gtk-doc-am"
 
@@ -85,6 +85,8 @@ DOCS="AUTHORS ChangeLog* HACKING NEWS README*"
 
 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
+S="${WORKDIR}/${MY_P}"
+
 pkg_setup() {
        if use python; then
                python-single-r1_pkg_setup
@@ -104,7 +106,7 @@ src_prepare() {
 src_configure() {
        local myconf=(
                GEGL="${EPREFIX}"/usr/bin/gegl-0.4
-               GDBUS_CODEGEN="${EPREFIX}"/usr/bin/gdbus-codegen
+               GDBUS_CODEGEN="${EPREFIX}"/bin/false
 
                --enable-default-binary
                --disable-silent-rules
@@ -165,6 +167,24 @@ _clean_up_locales() {
        done
 }
 
+# for https://bugs.gentoo.org/664938
+_rename_plugins() {
+       einfo 'Renaming plug-ins to not collide with pre-2.10.6 file layout 
(bug #664938)...'
+       local prepend=gimp-org-
+       (
+               cd "${ED%/}"/usr/$(get_libdir)/gimp/2.0/plug-ins || exit 1
+               for plugin_slash in $(ls -d1 */); do
+                   plugin=${plugin_slash%/}
+                   if [[ -f ${plugin}/${plugin} ]]; then
+                       # NOTE: Folder and file name need to match for Gimp to 
load that plug-in
+                       #       so "file-svg/file-svg" becomes 
"${prepend}file-svg/${prepend}file-svg"
+                       mv ${plugin}/{,${prepend}}${plugin} || exit 1
+                       mv {,${prepend}}${plugin} || exit 1
+                   fi
+               done
+       )
+}
+
 src_test() {
        virtx emake check
 }
@@ -183,8 +203,10 @@ src_install() {
        prune_libtool_files --all
 
        # Prevent dead symlink gimp-console.1 from downstream man page 
compression (bug #433527)
-       mv "${ED%/}"/usr/share/man/man1/gimp-console{-*,}.1 || die
+       local gimp_app_version=$(get_version_component_range 1-2)
+       mv "${ED%/}"/usr/share/man/man1/gimp-console{-${gimp_app_version},}.1 
|| die
 
+       _rename_plugins || die
        _clean_up_locales
 }
 

diff --git a/media-gfx/gimp/gimp-9999.ebuild b/media-gfx/gimp/gimp-9999.ebuild
index 82186f49ec6..e44b1d4fca7 100644
--- a/media-gfx/gimp/gimp-9999.ebuild
+++ b/media-gfx/gimp/gimp-9999.ebuild
@@ -165,6 +165,24 @@ _clean_up_locales() {
        done
 }
 
+# for https://bugs.gentoo.org/664938
+_rename_plugins() {
+       einfo 'Renaming plug-ins to not collide with pre-2.10.6 file layout 
(bug #664938)...'
+       local prepend=gimp-org-
+       (
+               cd "${ED%/}"/usr/$(get_libdir)/gimp/2.0/plug-ins || exit 1
+               for plugin_slash in $(ls -d1 */); do
+                   plugin=${plugin_slash%/}
+                   if [[ -f ${plugin}/${plugin} ]]; then
+                       # NOTE: Folder and file name need to match for Gimp to 
load that plug-in
+                       #       so "file-svg/file-svg" becomes 
"${prepend}file-svg/${prepend}file-svg"
+                       mv ${plugin}/{,${prepend}}${plugin} || exit 1
+                       mv {,${prepend}}${plugin} || exit 1
+                   fi
+               done
+       )
+}
+
 src_test() {
        virtx emake check
 }
@@ -185,6 +203,7 @@ src_install() {
        # Prevent dead symlink gimp-console.1 from downstream man page 
compression (bug #433527)
        mv "${ED%/}"/usr/share/man/man1/gimp-console{-*,}.1 || die
 
+       _rename_plugins || die
        _clean_up_locales
 }
 

Reply via email to