Сравнение gimp-2.10.34-r2 с gimp-2.99.14-r3

/usr/portage/media-gfx/gimp/gimp-2.99.14-r3.ebuild 2023-10-09 14:52:31.628368404 +0300
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=8
5
GNOME2_EAUTORECONF=yes
6
WANT_AUTOMAKE=
7 5

  
8
inherit autotools gnome2 toolchain-funcs virtualx
6
LUA_COMPAT=( luajit )
7
PYTHON_COMPAT=( python3_{9..11} )
8
VALA_USE_DEPEND=vapigen
9

  
10
inherit lua-single meson python-single-r1 vala xdg
9 11

  
10 12
DESCRIPTION="GNU Image Manipulation Program"
11 13
HOMEPAGE="https://www.gimp.org/"
12
SRC_URI="mirror://gimp/v$(ver_cut 1-2)/${P}.tar.bz2"
14
SRC_URI="mirror://gimp/v$(ver_cut 1-2)/${P}.tar.xz"
15

  
13 16
LICENSE="GPL-3+ LGPL-3+"
14
SLOT="0/2"
15
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv x86"
17
SLOT="0/3"
16 18

  
17
IUSE="aalib alsa aqua debug doc gnome heif jpeg2k jpegxl mng openexr postscript udev unwind vector-icons webp wmf xpm cpu_flags_ppc_altivec cpu_flags_x86_mmx cpu_flags_x86_sse"
19
IUSE="X aalib alsa doc gnome heif javascript jpeg2k jpegxl lua mng openexr postscript python test udev unwind vala vector-icons webp wmf xpm"
20
REQUIRED_USE="
21
	lua? ( ${LUA_REQUIRED_USE} )
22
	python? ( ${PYTHON_REQUIRED_USE} )
23
"
18 24

  
19 25
RESTRICT="!test? ( test )"
20 26

  
27
# media-libs/{babl,gegl} are required to be built with USE="introspection"
28
# to fix the compilation checking of /usr/share/gir-1.0/{Babl-0.1gir,Gegl-0.4.gir}
21 29
COMMON_DEPEND="
22 30
	>=app-accessibility/at-spi2-core-2.46.0
23
	>=app-text/poppler-0.50[cairo]
24
	>=app-text/poppler-data-0.4.7
25
	>=dev-libs/glib-2.56.2:2
26
	>=dev-libs/json-glib-1.2.6
31
	>=app-text/poppler-0.90.1[cairo]
32
	>=app-text/poppler-data-0.4.9
33
	>=dev-libs/appstream-glib-0.7.16
34
	>=dev-libs/glib-2.68.0:2
35
	>=dev-libs/json-glib-1.4.4
27 36
	dev-libs/libxml2:2
28 37
	dev-libs/libxslt
29
	>=gnome-base/librsvg-2.40.6:2
38
	>=gnome-base/librsvg-2.40.21:2
30 39
	>=media-gfx/mypaint-brushes-2.0.2:=
31
	>=media-libs/babl-0.1.98
32
	>=media-libs/fontconfig-2.12.4
33
	>=media-libs/freetype-2.1.7
34
	>=media-libs/gegl-0.4.40:0.4[cairo]
35
	>=media-libs/gexiv2-0.10.6
36
	>=media-libs/harfbuzz-0.9.19:=
37
	>=media-libs/lcms-2.8:2
40
	>=media-libs/babl-0.1.98[introspection,lcms,vala?]
41
	>=media-libs/fontconfig-2.12.6
42
	>=media-libs/freetype-2.10.2
43
	>=media-libs/gegl-0.4.40:0.4[cairo,introspection,lcms,vala?]
44
	>=media-libs/gexiv2-0.14.0
45
	>=media-libs/harfbuzz-2.6.5:=
46
	>=media-libs/lcms-2.13.1:2
38 47
	media-libs/libjpeg-turbo:=
39 48
	>=media-libs/libmypaint-1.6.1:=
40
	>=media-libs/libpng-1.6.25:0=
41
	>=media-libs/tiff-3.5.7:=
49
	>=media-libs/libpng-1.6.37:0=
50
	>=media-libs/tiff-4.1.0:=
42 51
	net-libs/glib-networking[ssl]
43 52
	sys-libs/zlib
44
	>=x11-libs/cairo-1.12.2
45
	>=x11-libs/gdk-pixbuf-2.31:2
46
	>=x11-libs/gtk+-2.24.32:2
47
	x11-libs/libXcursor
48
	>=x11-libs/pango-1.29.4
53
	>=x11-libs/cairo-1.16.0
54
	>=x11-libs/gdk-pixbuf-2.40.0:2[introspection]
55
	>=x11-libs/gtk+-3.24.16:3[introspection]
56
	>=x11-libs/pango-1.44.7
57
	>=x11-libs/libXmu-1.1.4
49 58
	aalib? ( media-libs/aalib )
50 59
	alsa? ( >=media-libs/alsa-lib-1.0.0 )
51
	aqua? ( >=x11-libs/gtk-mac-integration-2.0.0 )
52
	heif? ( >=media-libs/libheif-1.9.1:= )
53
	jpeg2k? ( >=media-libs/openjpeg-2.1.0:2= )
54
	jpegxl? ( >=media-libs/libjxl-0.7.0:= )
60
	heif? ( >=media-libs/libheif-1.13.0:= )
61
	javascript? ( dev-libs/gjs )
62
	jpeg2k? ( >=media-libs/openjpeg-2.3.1:2= )
63
	jpegxl? ( >=media-libs/libjxl-0.6.1:= )
64
	lua? (
65
		${LUA_DEPS}
66
		$(lua_gen_cond_dep '
67
			dev-lua/lgi[${LUA_USEDEP}]
68
		')
69
	)
55 70
	mng? ( media-libs/libmng:= )
56
	openexr? ( >=media-libs/openexr-1.6.1:= )
71
	openexr? ( >=media-libs/openexr-2.3.0:= )
57 72
	postscript? ( app-text/ghostscript-gpl:= )
58
	udev? ( dev-libs/libgudev:= )
73
	python? (
74
		${PYTHON_DEPS}
75
		$(python_gen_cond_dep '
76
			>=dev-python/pygobject-3.0:3[${PYTHON_USEDEP}]
77
		')
78
	)
79
	udev? ( >=dev-libs/libgudev-167:= )
59 80
	unwind? ( >=sys-libs/libunwind-1.1.0:= )
60 81
	webp? ( >=media-libs/libwebp-0.6.0:= )
61 82
	wmf? ( >=media-libs/libwmf-0.2.8 )
83
	X? ( x11-libs/libXcursor )
62 84
	xpm? ( x11-libs/libXpm )
63 85
"
64 86

  
......
70 92

  
71 93
DEPEND="
72 94
	${COMMON_DEPEND}
73
	>=dev-lang/perl-5.10.0
74
	dev-libs/appstream-glib
75
	dev-util/gtk-update-icon-cache
76
	>=dev-util/intltool-0.40.1
77
	>=sys-devel/gettext-0.19
78
	>=sys-devel/libtool-2.2
95
	test? ( x11-misc/xvfb-run )
96
	vala? ( $(vala_depend) )
97
"
98

  
99
# TODO: there are probably more atoms in DEPEND which should be in BDEPEND now
100
BDEPEND="
101
	>=dev-lang/perl-5.30.3
102
	dev-util/gdbus-codegen
103
	>=sys-devel/gettext-0.21
104
	doc? (
105
		app-text/yelp-tools
106
		dev-libs/gobject-introspection[doctool]
107
		dev-util/gi-docgen
108
	)
79 109
	virtual/pkgconfig
80 110
"
81 111

  
82
DOCS=( "AUTHORS" "ChangeLog" "HACKING" "NEWS" "README" "README.i18n" )
112
DOCS=( "AUTHORS" "devel-docs/HACKING.md" "NEWS" "README" "README.i18n" )
83 113

  
84 114
PATCHES=(
85
	"${FILESDIR}/${PN}-2.10_fix_test-appdata.patch" # Bugs 685210 (and duplicate 691070)
86 115
	"${FILESDIR}/${PN}-2.10_fix_musl_backtrace_backend_switch.patch" #900148
87
	"${FILESDIR}/${PN}-2.10_fix_configure_GCC13_implicit_function_declarations.patch" #899796
88 116
)
89 117

  
118
pkg_setup() {
119
	use lua && lua-single_pkg_setup
120

  
121
	if use python; then
122
		python-single-r1_pkg_setup
123
	fi
124
}
125

  
90 126
src_prepare() {
91
	sed -i -e 's/mypaint-brushes-1.0/mypaint-brushes-2.0/' configure.ac || die #737794
127
	default
92 128

  
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
129
	sed -i -e 's/mypaint-brushes-1.0/mypaint-brushes-2.0/' meson.build || die #737794
95 130

  
96
	gnome2_src_prepare  # calls eautoreconf
131
	# Fix Gimp  and GimpUI devel doc installation paths
132
	sed -i -e "s/'doc'/'gtk-doc'/" devel-docs/reference/gimp/meson.build || die
133
	sed -i -e "s/'doc'/'gtk-doc'/" devel-docs/reference/gimp-ui/meson.build || die
97 134

  
98
	sed 's/-DGIMP_protect_DISABLE_DEPRECATED/-DGIMP_DISABLE_DEPRECATED/g' -i configure || die #615144
99
	grep -F -q GIMP_DISABLE_DEPRECATED configure || die #615144, self-test
135
	# Fix pygimp.interp python implementation path.
136
	# Meson @PYTHON_PATH@ use sandbox path e.g.:
137
	# '/var/tmp/portage/media-gfx/gimp-2.99.12/temp/python3.10/bin/python3'
138
	sed -i -e 's/@PYTHON_PATH@/'${EPYTHON}'/' plug-ins/python/pygimp.interp.in || die
100 139

  
101
	export CC_FOR_BUILD="$(tc-getBUILD_CC)"
140
	# Set proper intallation path of documentation logo
141
	sed -i -e "s/'gimp-@0@'.format(gimp_app_version)/'gimp-${PVR}'/" data/images/meson.build || die
102 142
}
103 143

  
104 144
_adjust_sandbox() {
......
118 158
src_configure() {
119 159
	_adjust_sandbox
120 160

  
121
	local myconf=(
122
		GEGL="${EPREFIX}"/usr/bin/gegl-0.4
123
		GDBUS_CODEGEN="${EPREFIX}"/bin/false
124

  
125
		--enable-default-binary
126

  
127
		--disable-check-update
128
		--disable-python
129
		--enable-mp
130
		--with-appdata-test
131
		--with-bug-report-url=https://bugs.gentoo.org/
132
		--with-xmc
133
		--without-libbacktrace
134
		--without-webkit
135
		--without-xvfb-run
136
		$(use_enable cpu_flags_ppc_altivec altivec)
137
		$(use_enable cpu_flags_x86_mmx mmx)
138
		$(use_enable cpu_flags_x86_sse sse)
139
		$(use_enable debug)
140
		$(use_enable vector-icons)
141
		$(use_with aalib aa)
142
		$(use_with alsa)
143
		$(use_with !aqua x)
144
		$(use_with heif libheif)
145
		$(use_with jpeg2k jpeg2000)
146
		$(use_with jpegxl)
147
		$(use_with mng libmng)
148
		$(use_with openexr)
149
		$(use_with postscript gs)
150
		$(use_with udev gudev)
151
		$(use_with unwind libunwind)
152
		$(use_with webp)
153
		$(use_with wmf)
154
		$(use_with xpm libxpm)
161
	use vala && vala_setup
162

  
163
	local emesonargs=(
164
		-Denable-default-bin=true
165

  
166
		-Dcheck-update=no
167
		-Denable-multiproc=true
168
		-Dappdata-test=disabled
169
		-Dbug-report-url=https://bugs.gentoo.org/
170
		-Dlibbacktrace=false
171
		-Dwebkit-unmaintained=false
172
		$(meson_feature aalib aa)
173
		$(meson_feature alsa)
174
		$(meson_feature doc gi-docgen)
175
		$(meson_feature heif)
176
		$(meson_feature jpeg2k jpeg2000)
177
		$(meson_feature jpegxl jpeg-xl)
178
		$(meson_feature mng)
179
		$(meson_feature openexr)
180
		$(meson_feature postscript ghostscript)
181
		$(meson_feature test headless-tests)
182
		$(meson_feature udev gudev)
183
		$(meson_feature vala vala-plugins)
184
		$(meson_feature webp)
185
		$(meson_feature wmf)
186
		$(meson_feature X xcursor)
187
		$(meson_feature xpm)
188
		$(meson_use doc g-ir-doc)
189
		$(meson_use javascript)
190
		$(meson_use lua)
191
		$(meson_use python)
192
		$(meson_use unwind libunwind)
193
		$(meson_use vector-icons)
155 194
	)
156 195

  
157
	gnome2_src_configure "${myconf[@]}"
196
	meson_src_configure
158 197
}
159 198

  
160 199
src_compile() {
161 200
	export XDG_DATA_DIRS="${EPREFIX}"/usr/share  # bug 587004
162
	gnome2_src_compile
201
	meson_src_compile
163 202
}
164 203

  
165 204
# for https://bugs.gentoo.org/664938
......
167 206
	einfo 'Renaming plug-ins to not collide with pre-2.10.6 file layout (bug #664938)...'
168 207
	local prename=gimp-org-
169 208
	(
170
		cd "${ED}"/usr/$(get_libdir)/gimp/2.0/plug-ins || die
209
		cd "${ED}"/usr/$(get_libdir)/gimp/2.99/plug-ins || exit 1
171 210
		for plugin_slash in $(ls -d1 */); do
172
		    plugin=${plugin_slash%/}
173
		    if [[ -f ${plugin}/${plugin} ]]; then
174
			# NOTE: Folder and file name need to match for Gimp to load that plug-in
175
			#       so "file-svg/file-svg" becomes "${prename}file-svg/${prename}file-svg"
176
			mv ${plugin}/{,${prename}}${plugin} || die
177
			mv {,${prename}}${plugin} || die
178
		    fi
211
			plugin=${plugin_slash%/}
212
			if [[ -f ${plugin}/${plugin} ]]; then
213
				# NOTE: Folder and file name need to match for Gimp to load that plug-in
214
				#       so "file-svg/file-svg" becomes "${prename}file-svg/${prename}file-svg"
215
				mv ${plugin}/{,${prename}}${plugin} || exit 1
216
				mv {,${prename}}${plugin} || exit 1
217
			fi
179 218
		done
180 219
	)
181 220
}
182 221

  
183
src_test() {
184
	virtx emake check
185
}
186

  
187 222
src_install() {
188
	gnome2_src_install
223
	meson_src_install
224

  
225
	if use python; then
226
		python_optimize
227
	fi
189 228

  
190 229
	# Workaround for bug #321111 to give GIMP the least
191 230
	# precedence on PDF documents by default
......
194 233
	find "${D}" -name '*.la' -type f -delete || die
195 234

  
196 235
	# Prevent dead symlink gimp-console.1 from downstream man page compression (bug #433527)
197
	local gimp_app_version=$(ver_cut 1-2)
198
	mv "${ED}"/usr/share/man/man1/gimp-console{-${gimp_app_version},}.1 || die
236
	mv "${ED}"/usr/share/man/man1/gimp-console{-*,}.1 || die
199 237

  
200
	# Remove gimp devel-docs html files if user doesn't need it
201
	if ! use doc; then
202
		rm -r "${ED}"/usr/share/gtk-doc || die
203
	fi
238
	# Create symlinks for Gimp exec in /usr/bin
239
	dosym "${ESYSROOT}"/usr/bin/gimp-2.99 /usr/bin/gimp
240
	dosym "${ESYSROOT}"/usr/bin/gimp-console-2.99 /usr/bin/gimp-console
241
	dosym "${ESYSROOT}"/usr/bin/gimp-script-fu-interpreter-3.0 /usr/bin/gimp-script-fu-interpreter
242
	dosym "${ESYSROOT}"/usr/bin/gimp-test-clipboard-2.99 /usr/bin/gimp-test-clipboard
243
	dosym "${ESYSROOT}"/usr/bin/gimptool-2.99 /usr/bin/gimptool
204 244

  
205 245
	_rename_plugins || die
206 246
}
207 247

  
208 248
pkg_postinst() {
209
	gnome2_pkg_postinst
249
	xdg_pkg_postinst
210 250
}
211 251

  
212 252
pkg_postrm() {
213
	gnome2_pkg_postrm
253
	xdg_pkg_postrm
214 254
}
Спасибо!