Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/gimp/
Date: Fri, 06 Mar 2020 15:55:56
Message-Id: 1583510136.94bcbe1f54d5abab03907cf2fb86cfe12e050209.juippis@gentoo
1 commit: 94bcbe1f54d5abab03907cf2fb86cfe12e050209
2 Author: band-a-prend <torokhov-s-a <AT> yandex <DOT> ru>
3 AuthorDate: Fri Mar 6 12:46:19 2020 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 6 15:55:36 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94bcbe1f
7
8 media-gfx/gimp: 2.10.18-r1 restore python2 plugins support
9
10 Closes: https://bugs.gentoo.org/711628
11
12 Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
13 Closes: https://github.com/gentoo/gentoo/pull/14846
14 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
15
16 media-gfx/gimp/gimp-2.10.18-r1.ebuild | 226 ++++++++++++++++++++++++++++++++++
17 1 file changed, 226 insertions(+)
18
19 diff --git a/media-gfx/gimp/gimp-2.10.18-r1.ebuild b/media-gfx/gimp/gimp-2.10.18-r1.ebuild
20 new file mode 100644
21 index 00000000000..84e548f9f15
22 --- /dev/null
23 +++ b/media-gfx/gimp/gimp-2.10.18-r1.ebuild
24 @@ -0,0 +1,226 @@
25 +# Copyright 1999-2020 Gentoo Authors
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=6
29 +PYTHON_COMPAT=( python2_7 )
30 +GNOME2_EAUTORECONF=yes
31 +WANT_AUTOMAKE=
32 +
33 +inherit autotools gnome2 python-single-r1 virtualx
34 +
35 +DESCRIPTION="GNU Image Manipulation Program"
36 +HOMEPAGE="https://www.gimp.org/"
37 +SRC_URI="mirror://gimp/v2.10/${P}.tar.bz2"
38 +LICENSE="GPL-3 LGPL-3"
39 +SLOT="2"
40 +KEYWORDS="~amd64 ~ia64 ~ppc64 ~x86"
41 +
42 +IUSE="aalib alsa altivec aqua debug doc gnome heif jpeg2k mng openexr postscript python udev unwind vector-icons webp wmf xpm cpu_flags_x86_mmx cpu_flags_x86_sse"
43 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
44 +
45 +RESTRICT="!test? ( test )"
46 +
47 +COMMON_DEPEND="
48 + >=app-text/poppler-0.50[cairo]
49 + >=app-text/poppler-data-0.4.7
50 + >=dev-libs/atk-2.2.0
51 + >=dev-libs/glib-2.56.0:2
52 + >=dev-libs/json-glib-1.2.6
53 + dev-libs/libxml2:2
54 + dev-libs/libxslt
55 + >=gnome-base/librsvg-2.40.6:2
56 + >=media-gfx/mypaint-brushes-1.3.0
57 + >=media-libs/babl-0.1.74
58 + >=media-libs/fontconfig-2.12.4
59 + >=media-libs/freetype-2.1.7
60 + >=media-libs/gegl-0.4.22:0.4[cairo]
61 + >=media-libs/gexiv2-0.10.6
62 + >=media-libs/harfbuzz-0.9.19
63 + >=media-libs/lcms-2.8:2
64 + >=media-libs/libmypaint-1.3.0:=
65 + >=media-libs/libpng-1.6.25:0=
66 + >=media-libs/tiff-3.5.7:0
67 + net-libs/glib-networking[ssl]
68 + sys-libs/zlib
69 + virtual/jpeg
70 + >=x11-libs/cairo-1.12.2
71 + >=x11-libs/gdk-pixbuf-2.31:2
72 + >=x11-libs/gtk+-2.24.32:2
73 + x11-libs/libXcursor
74 + >=x11-libs/pango-1.29.4
75 + aalib? ( media-libs/aalib )
76 + alsa? ( >=media-libs/alsa-lib-1.0.0 )
77 + aqua? ( >=x11-libs/gtk-mac-integration-2.0.0 )
78 + heif? ( >=media-libs/libheif-1.3.2:= )
79 + jpeg2k? ( >=media-libs/openjpeg-2.1.0:2= )
80 + mng? ( media-libs/libmng:= )
81 + openexr? ( >=media-libs/openexr-1.6.1:= )
82 + postscript? ( app-text/ghostscript-gpl )
83 + python? (
84 + ${PYTHON_DEPS}
85 + $(python_gen_cond_dep '
86 + >=dev-python/pycairo-1.0.2[${PYTHON_MULTI_USEDEP}]
87 + >=dev-python/pygtk-2.10.4:2[${PYTHON_MULTI_USEDEP}]
88 + ')
89 + )
90 + udev? ( dev-libs/libgudev:= )
91 + unwind? ( >=sys-libs/libunwind-1.1.0:= )
92 + webp? ( >=media-libs/libwebp-0.6.0:= )
93 + wmf? ( >=media-libs/libwmf-0.2.8 )
94 + xpm? ( x11-libs/libXpm )
95 +"
96 +
97 +RDEPEND="
98 + ${COMMON_DEPEND}
99 + x11-themes/hicolor-icon-theme
100 + gnome? ( gnome-base/gvfs )
101 +"
102 +
103 +DEPEND="
104 + ${COMMON_DEPEND}
105 + >=dev-lang/perl-5.10.0
106 + dev-libs/appstream-glib
107 + dev-util/gtk-update-icon-cache
108 + >=dev-util/intltool-0.40.1
109 + sys-apps/findutils
110 + >=sys-devel/gettext-0.19
111 + >=sys-devel/libtool-2.2
112 + virtual/pkgconfig
113 +"
114 +
115 +DOCS=( "AUTHORS" "ChangeLog" "HACKING" "NEWS" "README" "README.i18n" )
116 +
117 +# Bugs 685210 (and duplicate 691070)
118 +PATCHES=(
119 + "${FILESDIR}/${PN}-2.10_fix_test-appdata.patch"
120 +)
121 +
122 +pkg_setup() {
123 + use python && python-single-r1_pkg_setup
124 +}
125 +
126 +src_prepare() {
127 + # Disable system CFLAGS suppressing on SSE{2,4.1} support tests by addition of {SSE2,SSE4_1}_EXTRA_CFLAGS: bug #702554
128 + sed -i -e 's:\$intrinsics_save_CFLAGS \$SSE2_EXTRA_CFLAGS:\$SSE2_EXTRA_CFLAGS \$intrinsics_save_CFLAGS:' \
129 + -e 's:\$intrinsics_save_CFLAGS \$SSE4_1_EXTRA_CFLAGS:\$SSE4_1_EXTRA_CFLAGS \$intrinsics_save_CFLAGS:' configure.ac || die
130 +
131 + sed -i -e 's/== "xquartz"/= "xquartz"/' configure.ac || die #494864
132 + sed 's:-DGIMP_DISABLE_DEPRECATED:-DGIMP_protect_DISABLE_DEPRECATED:g' -i configure.ac || die #615144
133 +
134 + gnome2_src_prepare # calls eautoreconf
135 +
136 + sed 's:-DGIMP_protect_DISABLE_DEPRECATED:-DGIMP_DISABLE_DEPRECATED:g' -i configure || die #615144
137 + fgrep -q GIMP_DISABLE_DEPRECATED configure || die #615144, self-test
138 +}
139 +
140 +_adjust_sandbox() {
141 + # Bugs #569738 and #591214
142 + local nv
143 + for nv in /dev/nvidia-uvm /dev/nvidiactl /dev/nvidia{0..9} ; do
144 + # We do not check for existence as they may show up later
145 + # https://bugs.gentoo.org/show_bug.cgi?id=569738#c21
146 + addwrite "${nv}"
147 + done
148 +
149 + addwrite /dev/dri/ # bugs #574038 and #684886
150 + addwrite /dev/ati/ # bug #589198
151 + addwrite /proc/mtrr # bug #589198
152 +}
153 +
154 +src_configure() {
155 + _adjust_sandbox
156 +
157 + local myconf=(
158 + GEGL="${EPREFIX}"/usr/bin/gegl-0.4
159 + GDBUS_CODEGEN="${EPREFIX}"/bin/false
160 +
161 + --enable-default-binary
162 +
163 + --disable-check-update
164 + --enable-mp
165 + --with-appdata-test
166 + --with-bug-report-url=https://bugs.gentoo.org/
167 + --with-xmc
168 + --without-libbacktrace
169 + --without-webkit
170 + --without-xvfb-run
171 + $(use_enable altivec)
172 + $(use_enable cpu_flags_x86_mmx mmx)
173 + $(use_enable cpu_flags_x86_sse sse)
174 + $(use_enable python)
175 + $(use_enable vector-icons)
176 + $(use_with aalib aa)
177 + $(use_with alsa)
178 + $(use_with !aqua x)
179 + $(use_with heif libheif)
180 + $(use_with jpeg2k jpeg2000)
181 + $(use_with mng libmng)
182 + $(use_with openexr)
183 + $(use_with postscript gs)
184 + $(use_with udev gudev)
185 + $(use_with unwind libunwind)
186 + $(use_with webp)
187 + $(use_with wmf)
188 + $(use_with xpm libxpm)
189 + )
190 +
191 + gnome2_src_configure "${myconf[@]}"
192 +}
193 +
194 +src_compile() {
195 + export XDG_DATA_DIRS="${EPREFIX}"/usr/share # bug 587004
196 + gnome2_src_compile
197 +}
198 +
199 +# for https://bugs.gentoo.org/664938
200 +_rename_plugins() {
201 + einfo 'Renaming plug-ins to not collide with pre-2.10.6 file layout (bug #664938)...'
202 + local prepend=gimp-org-
203 + (
204 + cd "${ED%/}"/usr/$(get_libdir)/gimp/2.0/plug-ins || exit 1
205 + for plugin_slash in $(ls -d1 */); do
206 + plugin=${plugin_slash%/}
207 + if [[ -f ${plugin}/${plugin} ]]; then
208 + # NOTE: Folder and file name need to match for Gimp to load that plug-in
209 + # so "file-svg/file-svg" becomes "${prepend}file-svg/${prepend}file-svg"
210 + mv ${plugin}/{,${prepend}}${plugin} || exit 1
211 + mv {,${prepend}}${plugin} || exit 1
212 + fi
213 + done
214 + )
215 +}
216 +
217 +src_test() {
218 + virtx emake check
219 +}
220 +
221 +src_install() {
222 + gnome2_src_install
223 +
224 + use python && python_optimize
225 +
226 + # Workaround for bug #321111 to give GIMP the least
227 + # precedence on PDF documents by default
228 + mv "${ED%/}"/usr/share/applications/{,zzz-}gimp.desktop || die
229 +
230 + find "${D}" -name '*.la' -type f -delete || die
231 +
232 + # Prevent dead symlink gimp-console.1 from downstream man page compression (bug #433527)
233 + local gimp_app_version=$(get_version_component_range 1-2)
234 + mv "${ED%/}"/usr/share/man/man1/gimp-console{-${gimp_app_version},}.1 || die
235 +
236 + # Remove gimp devel-docs html files if user doesn't need it
237 + if ! use doc; then
238 + rm -r "${ED%/}"/usr/share/gtk-doc || die
239 + fi
240 +
241 + _rename_plugins || die
242 +}
243 +
244 +pkg_postinst() {
245 + gnome2_pkg_postinst
246 +}
247 +
248 +pkg_postrm() {
249 + gnome2_pkg_postrm
250 +}