1 |
commit: fea4860e2c82475880cf566e304f41df80c99f69 |
2 |
Author: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 24 19:59:36 2018 +0000 |
4 |
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 24 20:38:37 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fea4860e |
7 |
|
8 |
media-gfx/gimp: Avoid colliding with pre-2.10.6 plug-ins |
9 |
|
10 |
Bug: https://bugs.gentoo.org/664938 |
11 |
Package-Manager: Portage-2.3.49, Repoman-2.3.10 |
12 |
|
13 |
.../{gimp-9999.ebuild => gimp-2.10.6-r1.ebuild} | 38 +++++++++++++++++----- |
14 |
media-gfx/gimp/gimp-9999.ebuild | 19 +++++++++++ |
15 |
2 files changed, 49 insertions(+), 8 deletions(-) |
16 |
|
17 |
diff --git a/media-gfx/gimp/gimp-9999.ebuild b/media-gfx/gimp/gimp-2.10.6-r1.ebuild |
18 |
similarity index 82% |
19 |
copy from media-gfx/gimp/gimp-9999.ebuild |
20 |
copy to media-gfx/gimp/gimp-2.10.6-r1.ebuild |
21 |
index 82186f49ec6..21a2f68ae67 100644 |
22 |
--- a/media-gfx/gimp/gimp-9999.ebuild |
23 |
+++ b/media-gfx/gimp/gimp-2.10.6-r1.ebuild |
24 |
@@ -5,15 +5,17 @@ EAPI=6 |
25 |
PYTHON_COMPAT=( python2_7 ) |
26 |
GNOME2_EAUTORECONF=yes |
27 |
|
28 |
-inherit virtualx autotools gnome2 multilib python-single-r1 ltprune git-r3 |
29 |
+MY_PV="${PV/_rc/-RC}" |
30 |
+MY_P="${PN}-${MY_PV}" |
31 |
+ |
32 |
+inherit versionator virtualx autotools gnome2 multilib python-single-r1 ltprune |
33 |
|
34 |
DESCRIPTION="GNU Image Manipulation Program" |
35 |
HOMEPAGE="https://www.gimp.org/" |
36 |
-EGIT_REPO_URI="https://gitlab.gnome.org/GNOME/gimp.git" |
37 |
-SRC_URI="" |
38 |
+SRC_URI="mirror://gimp/v$(get_version_component_range 1-2)/${MY_P}.tar.bz2" |
39 |
LICENSE="GPL-3 LGPL-3" |
40 |
SLOT="2" |
41 |
-KEYWORDS="" |
42 |
+KEYWORDS="~amd64 ~x86" |
43 |
|
44 |
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" |
45 |
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" |
46 |
@@ -69,7 +71,6 @@ RDEPEND=">=dev-libs/glib-2.54.2:2 |
47 |
DEPEND="${RDEPEND} |
48 |
>=dev-lang/perl-5.10.0 |
49 |
dev-libs/appstream-glib |
50 |
- dev-util/gdbus-codegen |
51 |
dev-util/gtk-update-icon-cache |
52 |
sys-apps/findutils |
53 |
virtual/pkgconfig |
54 |
@@ -77,7 +78,6 @@ DEPEND="${RDEPEND} |
55 |
>=sys-devel/gettext-0.19 |
56 |
doc? ( >=dev-util/gtk-doc-1 ) |
57 |
>=sys-devel/libtool-2.2 |
58 |
- >=sys-devel/autoconf-2.54 |
59 |
>=sys-devel/automake-1.11 |
60 |
dev-util/gtk-doc-am" |
61 |
|
62 |
@@ -85,6 +85,8 @@ DOCS="AUTHORS ChangeLog* HACKING NEWS README*" |
63 |
|
64 |
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
65 |
|
66 |
+S="${WORKDIR}/${MY_P}" |
67 |
+ |
68 |
pkg_setup() { |
69 |
if use python; then |
70 |
python-single-r1_pkg_setup |
71 |
@@ -104,7 +106,7 @@ src_prepare() { |
72 |
src_configure() { |
73 |
local myconf=( |
74 |
GEGL="${EPREFIX}"/usr/bin/gegl-0.4 |
75 |
- GDBUS_CODEGEN="${EPREFIX}"/usr/bin/gdbus-codegen |
76 |
+ GDBUS_CODEGEN="${EPREFIX}"/bin/false |
77 |
|
78 |
--enable-default-binary |
79 |
--disable-silent-rules |
80 |
@@ -165,6 +167,24 @@ _clean_up_locales() { |
81 |
done |
82 |
} |
83 |
|
84 |
+# for https://bugs.gentoo.org/664938 |
85 |
+_rename_plugins() { |
86 |
+ einfo 'Renaming plug-ins to not collide with pre-2.10.6 file layout (bug #664938)...' |
87 |
+ local prepend=gimp-org- |
88 |
+ ( |
89 |
+ cd "${ED%/}"/usr/$(get_libdir)/gimp/2.0/plug-ins || exit 1 |
90 |
+ for plugin_slash in $(ls -d1 */); do |
91 |
+ plugin=${plugin_slash%/} |
92 |
+ if [[ -f ${plugin}/${plugin} ]]; then |
93 |
+ # NOTE: Folder and file name need to match for Gimp to load that plug-in |
94 |
+ # so "file-svg/file-svg" becomes "${prepend}file-svg/${prepend}file-svg" |
95 |
+ mv ${plugin}/{,${prepend}}${plugin} || exit 1 |
96 |
+ mv {,${prepend}}${plugin} || exit 1 |
97 |
+ fi |
98 |
+ done |
99 |
+ ) |
100 |
+} |
101 |
+ |
102 |
src_test() { |
103 |
virtx emake check |
104 |
} |
105 |
@@ -183,8 +203,10 @@ src_install() { |
106 |
prune_libtool_files --all |
107 |
|
108 |
# Prevent dead symlink gimp-console.1 from downstream man page compression (bug #433527) |
109 |
- mv "${ED%/}"/usr/share/man/man1/gimp-console{-*,}.1 || die |
110 |
+ local gimp_app_version=$(get_version_component_range 1-2) |
111 |
+ mv "${ED%/}"/usr/share/man/man1/gimp-console{-${gimp_app_version},}.1 || die |
112 |
|
113 |
+ _rename_plugins || die |
114 |
_clean_up_locales |
115 |
} |
116 |
|
117 |
|
118 |
diff --git a/media-gfx/gimp/gimp-9999.ebuild b/media-gfx/gimp/gimp-9999.ebuild |
119 |
index 82186f49ec6..e44b1d4fca7 100644 |
120 |
--- a/media-gfx/gimp/gimp-9999.ebuild |
121 |
+++ b/media-gfx/gimp/gimp-9999.ebuild |
122 |
@@ -165,6 +165,24 @@ _clean_up_locales() { |
123 |
done |
124 |
} |
125 |
|
126 |
+# for https://bugs.gentoo.org/664938 |
127 |
+_rename_plugins() { |
128 |
+ einfo 'Renaming plug-ins to not collide with pre-2.10.6 file layout (bug #664938)...' |
129 |
+ local prepend=gimp-org- |
130 |
+ ( |
131 |
+ cd "${ED%/}"/usr/$(get_libdir)/gimp/2.0/plug-ins || exit 1 |
132 |
+ for plugin_slash in $(ls -d1 */); do |
133 |
+ plugin=${plugin_slash%/} |
134 |
+ if [[ -f ${plugin}/${plugin} ]]; then |
135 |
+ # NOTE: Folder and file name need to match for Gimp to load that plug-in |
136 |
+ # so "file-svg/file-svg" becomes "${prepend}file-svg/${prepend}file-svg" |
137 |
+ mv ${plugin}/{,${prepend}}${plugin} || exit 1 |
138 |
+ mv {,${prepend}}${plugin} || exit 1 |
139 |
+ fi |
140 |
+ done |
141 |
+ ) |
142 |
+} |
143 |
+ |
144 |
src_test() { |
145 |
virtx emake check |
146 |
} |
147 |
@@ -185,6 +203,7 @@ src_install() { |
148 |
# Prevent dead symlink gimp-console.1 from downstream man page compression (bug #433527) |
149 |
mv "${ED%/}"/usr/share/man/man1/gimp-console{-*,}.1 || die |
150 |
|
151 |
+ _rename_plugins || die |
152 |
_clean_up_locales |
153 |
} |