Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 684886
Collapse All | Expand All

(-)a/media-gfx/gimp/gimp-2.10.10-r1.ebuild (+222 lines)
Line 0 Link Here
1
# Copyright 1999-2019 Gentoo Authors
2
# Distributed under the terms of the GNU General Public License v2
3
4
EAPI=6
5
PYTHON_COMPAT=( python2_7 )
6
GNOME2_EAUTORECONF=yes
7
8
inherit eapi7-ver virtualx autotools gnome2 multilib python-single-r1
9
10
DESCRIPTION="GNU Image Manipulation Program"
11
HOMEPAGE="https://www.gimp.org/"
12
SRC_URI="mirror://gimp/v$(ver_cut 1-2)/${P}.tar.bz2"
13
LICENSE="GPL-3 LGPL-3"
14
SLOT="2"
15
KEYWORDS="~amd64 ~x86"
16
17
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"
18
IUSE="alsa aalib altivec aqua debug doc openexr gnome heif postscript jpeg2k cpu_flags_x86_mmx mng python cpu_flags_x86_sse udev unwind vector-icons webp wmf xpm"
19
20
RDEPEND=">=dev-libs/glib-2.56.0:2
21
	>=dev-libs/atk-2.2.0
22
	>=x11-libs/gtk+-2.24.32:2
23
	>=x11-libs/gdk-pixbuf-2.31:2
24
	>=x11-libs/cairo-1.12.2
25
	>=x11-libs/pango-1.29.4
26
	xpm? ( x11-libs/libXpm )
27
	>=media-libs/freetype-2.1.7
28
	>=media-libs/harfbuzz-0.9.19
29
	>=media-libs/gexiv2-0.10.6
30
	>=media-libs/libmypaint-1.3.0
31
	>=media-gfx/mypaint-brushes-1.3.0
32
	>=media-libs/fontconfig-2.12.4
33
	sys-libs/zlib
34
	dev-libs/libxml2
35
	dev-libs/libxslt
36
	x11-themes/hicolor-icon-theme
37
	>=media-libs/babl-0.1.62
38
	>=media-libs/gegl-0.4.14:0.4[cairo]
39
	aalib? ( media-libs/aalib )
40
	alsa? ( media-libs/alsa-lib )
41
	aqua? ( x11-libs/gtk-mac-integration )
42
	gnome? ( gnome-base/gvfs )
43
	virtual/jpeg:0
44
	jpeg2k? ( >=media-libs/openjpeg-2.1.0:2= )
45
	>=media-libs/lcms-2.8:2
46
	mng? ( media-libs/libmng )
47
	openexr? ( >=media-libs/openexr-1.6.1:= )
48
	>=app-text/poppler-0.50[cairo]
49
	>=app-text/poppler-data-0.4.7
50
	>=media-libs/libpng-1.6.25:0=
51
	python?	(
52
		${PYTHON_DEPS}
53
		>=dev-python/pygtk-2.10.4:2[${PYTHON_USEDEP}]
54
		>=dev-python/pycairo-1.0.2[${PYTHON_USEDEP}]
55
	)
56
	>=media-libs/tiff-3.5.7:0
57
	>=gnome-base/librsvg-2.40.6:2
58
	webp? ( >=media-libs/libwebp-0.6.0 )
59
	wmf? ( >=media-libs/libwmf-0.2.8 )
60
	net-libs/glib-networking[ssl]
61
	x11-libs/libXcursor
62
	sys-libs/zlib
63
	app-arch/bzip2
64
	>=app-arch/xz-utils-5.0.0
65
	postscript? ( app-text/ghostscript-gpl )
66
	udev? ( virtual/libgudev:= )
67
	unwind? ( sys-libs/libunwind:= )
68
	heif? ( >=media-libs/libheif-1.1.0:= )"
69
DEPEND="${RDEPEND}
70
	>=dev-lang/perl-5.10.0
71
	dev-libs/appstream-glib
72
	dev-util/gtk-update-icon-cache
73
	sys-apps/findutils
74
	virtual/pkgconfig
75
	>=dev-util/intltool-0.40.1
76
	>=sys-devel/gettext-0.19
77
	doc? ( >=dev-util/gtk-doc-1 )
78
	>=sys-devel/libtool-2.2
79
	>=sys-devel/automake-1.11
80
	dev-util/gtk-doc-am"
81
82
DOCS="AUTHORS ChangeLog* HACKING NEWS README*"
83
84
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
85
86
pkg_setup() {
87
	if use python; then
88
		python-single-r1_pkg_setup
89
	fi
90
}
91
92
src_prepare() {
93
	sed -i -e 's/== "xquartz"/= "xquartz"/' configure.ac || die #494864
94
	sed 's:-DGIMP_DISABLE_DEPRECATED:-DGIMP_protect_DISABLE_DEPRECATED:g' -i configure.ac || die #615144
95
96
	gnome2_src_prepare  # calls eautoreconf
97
98
	sed 's:-DGIMP_protect_DISABLE_DEPRECATED:-DGIMP_DISABLE_DEPRECATED:g' -i configure || die #615144
99
	fgrep -q GIMP_DISABLE_DEPRECATED configure || die #615144, self-test
100
}
101
102
_adjust_sandbox() {
103
	# Bugs #569738 and #591214
104
	local nv
105
	for nv in /dev/nvidia-uvm /dev/nvidiactl /dev/nvidia{0..9} ; do
106
		# We do not check for existence as they may show up later
107
		# https://bugs.gentoo.org/show_bug.cgi?id=569738#c21
108
		addwrite "${nv}"
109
	done
110
111
	addwrite /dev/dri/  # bugs #574038 and #684886
112
	addwrite /dev/ati/  # bug #589198
113
	addwrite /proc/mtrr  # bug #589198
114
}
115
116
src_configure() {
117
	_adjust_sandbox
118
119
	local myconf=(
120
		GEGL="${EPREFIX}"/usr/bin/gegl-0.4
121
		GDBUS_CODEGEN="${EPREFIX}"/bin/false
122
123
		--enable-default-binary
124
		--disable-silent-rules
125
126
		$(use_with !aqua x)
127
		$(use_with aalib aa)
128
		$(use_with alsa)
129
		$(use_enable altivec)
130
		--with-appdata-test
131
		--without-libbacktrace
132
		--with-bug-report-url=https://bugs.gentoo.org/
133
		--without-webkit
134
		$(use_with jpeg2k jpeg2000)
135
		$(use_with postscript gs)
136
		$(use_enable cpu_flags_x86_mmx mmx)
137
		$(use_with mng libmng)
138
		$(use_with openexr)
139
		$(use_with webp)
140
		$(use_with heif libheif)
141
		$(use_enable python)
142
		--enable-mp
143
		$(use_enable cpu_flags_x86_sse sse)
144
		$(use_with udev gudev)
145
		$(use_with unwind libunwind)
146
		$(use_with wmf)
147
		--with-xmc
148
		$(use_with xpm libxpm)
149
		$(use_enable vector-icons)
150
		--without-xvfb-run
151
	)
152
153
	gnome2_src_configure "${myconf[@]}"
154
}
155
156
src_compile() {
157
	export XDG_DATA_DIRS="${EPREFIX}"/usr/share  # bug 587004
158
	gnome2_src_compile
159
}
160
161
_clean_up_locales() {
162
	[[ -z ${LINGUAS+set} ]] && return
163
	einfo "Cleaning up locales..."
164
	for lang in ${LANGS}; do
165
		has ${lang} ${LINGUAS} && {
166
			einfo "- keeping ${lang}"
167
			continue
168
		}
169
		rm -Rf "${ED%/}"/usr/share/locale/"${lang}"
170
	done
171
}
172
173
# for https://bugs.gentoo.org/664938
174
_rename_plugins() {
175
	einfo 'Renaming plug-ins to not collide with pre-2.10.6 file layout (bug #664938)...'
176
	local prepend=gimp-org-
177
	(
178
		cd "${ED%/}"/usr/$(get_libdir)/gimp/2.0/plug-ins || exit 1
179
		for plugin_slash in $(ls -d1 */); do
180
		    plugin=${plugin_slash%/}
181
		    if [[ -f ${plugin}/${plugin} ]]; then
182
			# NOTE: Folder and file name need to match for Gimp to load that plug-in
183
			#       so "file-svg/file-svg" becomes "${prepend}file-svg/${prepend}file-svg"
184
			mv ${plugin}/{,${prepend}}${plugin} || exit 1
185
			mv {,${prepend}}${plugin} || exit 1
186
		    fi
187
		done
188
	)
189
}
190
191
src_test() {
192
	virtx emake check
193
}
194
195
src_install() {
196
	gnome2_src_install
197
198
	if use python; then
199
		python_optimize
200
	fi
201
202
	# Workaround for bug #321111 to give GIMP the least
203
	# precedence on PDF documents by default
204
	mv "${ED%/}"/usr/share/applications/{,zzz-}gimp.desktop || die
205
206
	find "${D}" -name '*.la' -type f -delete || die
207
208
	# Prevent dead symlink gimp-console.1 from downstream man page compression (bug #433527)
209
	local gimp_app_version=$(get_version_component_range 1-2)
210
	mv "${ED%/}"/usr/share/man/man1/gimp-console{-${gimp_app_version},}.1 || die
211
212
	_rename_plugins || die
213
	_clean_up_locales
214
}
215
216
pkg_postinst() {
217
	gnome2_pkg_postinst
218
}
219
220
pkg_postrm() {
221
	gnome2_pkg_postrm
222
}
(-)a/media-gfx/gimp/gimp-9999.ebuild (-12 / +16 lines)
Lines 102-108 src_prepare() { Link Here
102
	fgrep -q GIMP_DISABLE_DEPRECATED configure || die #615144, self-test
102
	fgrep -q GIMP_DISABLE_DEPRECATED configure || die #615144, self-test
103
}
103
}
104
104
105
_adjust_sandbox() {
106
	# Bugs #569738 and #591214
107
	local nv
108
	for nv in /dev/nvidia-uvm /dev/nvidiactl /dev/nvidia{0..9} ; do
109
		# We do not check for existence as they may show up later
110
		# https://bugs.gentoo.org/show_bug.cgi?id=569738#c21
111
		addwrite "${nv}"
112
	done
113
114
	addwrite /dev/dri/  # bugs #574038 and #684886
115
	addwrite /dev/ati/  # bug #589198
116
	addwrite /proc/mtrr  # bug #589198
117
}
118
105
src_configure() {
119
src_configure() {
120
	_adjust_sandbox
121
106
	local myconf=(
122
	local myconf=(
107
		GEGL="${EPREFIX}"/usr/bin/gegl-0.4
123
		GEGL="${EPREFIX}"/usr/bin/gegl-0.4
108
		GDBUS_CODEGEN="${EPREFIX}"/usr/bin/gdbus-codegen
124
		GDBUS_CODEGEN="${EPREFIX}"/usr/bin/gdbus-codegen
Lines 141-157 src_configure() { Link Here
141
}
157
}
142
158
143
src_compile() {
159
src_compile() {
144
	# Bugs #569738 and #591214
145
	local nv
146
	for nv in /dev/nvidia-uvm /dev/nvidiactl /dev/nvidia{0..9} ; do
147
		# We do not check for existence as they may show up later
148
		# https://bugs.gentoo.org/show_bug.cgi?id=569738#c21
149
		addwrite "${nv}"
150
	done
151
	addwrite /dev/dri/  # bug #574038
152
	addwrite /dev/ati/  # bug 589198
153
	addwrite /proc/mtrr  # bug 589198
154
155
	export XDG_DATA_DIRS="${EPREFIX}"/usr/share  # bug 587004
160
	export XDG_DATA_DIRS="${EPREFIX}"/usr/share  # bug 587004
156
	gnome2_src_compile
161
	gnome2_src_compile
157
}
162
}
158
- 

Return to bug 684886