Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/gedit/files/, app-editors/gedit/
Date: Sun, 16 Aug 2020 21:02:23
Message-Id: 1597611683.708dc351c4d23eb2b5ffaf7d01d2318f35ca59b5.leio@gentoo
1 commit: 708dc351c4d23eb2b5ffaf7d01d2318f35ca59b5
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 16 20:54:31 2020 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 16 21:01:23 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=708dc351
7
8 app-editors/gedit: bump to 3.36.2
9
10 Package-Manager: Portage-2.3.103, Repoman-2.3.20
11 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
12
13 app-editors/gedit/Manifest | 1 +
14 .../gedit/files/3.36-make-gspell-optional.patch | 62 ++++++++++++
15 .../gedit/files/3.36-make-python-optional.patch | 90 ++++++++++++++++++
16 .../gedit/files/restore-overlay-scrollbars.patch | 26 +++++
17 app-editors/gedit/gedit-3.36.2.ebuild | 105 +++++++++++++++++++++
18 5 files changed, 284 insertions(+)
19
20 diff --git a/app-editors/gedit/Manifest b/app-editors/gedit/Manifest
21 index 20b7ca30105..a226fc44cd0 100644
22 --- a/app-editors/gedit/Manifest
23 +++ b/app-editors/gedit/Manifest
24 @@ -1 +1,2 @@
25 DIST gedit-3.34.1.tar.xz 14797588 BLAKE2B 8dfaac4660575d67e3f8396dfed675a737fc69bc2b34866ee467a3464a338240133cab8d067db7b87fdc129f06a2450b91f4e0f70a73912d4a274cca980196d6 SHA512 22968c678a2f7ecf062f490d5eedc97aaa53b15932db801ea83eb336f01f41e7a6037a85508a40164f38dee406f8db097b7ef6f1481ab44ea82668766d24966d
26 +DIST gedit-3.36.2.tar.xz 14770004 BLAKE2B 505c01aa60e64e418a09c9fbd0c397a487c612117c3068e35a41b075a8d5440cf85daf6e011eeacee7b228306342cc5c4a3dc1af24d52583c9a896531355f6d0 SHA512 20c3592aaf08ad4a5842b14ecb1eb0c9ddbef190412dc3f70b60bbf6125c9c4791a48260c89402ce4773720ae65b36fab510f9d1e104f548e243d11bc49279b5
27
28 diff --git a/app-editors/gedit/files/3.36-make-gspell-optional.patch b/app-editors/gedit/files/3.36-make-gspell-optional.patch
29 new file mode 100644
30 index 00000000000..e891f98f0c0
31 --- /dev/null
32 +++ b/app-editors/gedit/files/3.36-make-gspell-optional.patch
33 @@ -0,0 +1,62 @@
34 +From d622460b08c7c13ce8e0c23e3afcbd1e4c65d019 Mon Sep 17 00:00:00 2001
35 +From: Mart Raudsepp <leio@g.o>
36 +Date: Sun, 16 Aug 2020 23:20:31 +0300
37 +Subject: [PATCH] build: Make gspell optional
38 +
39 +---
40 + meson.build | 3 ++-
41 + meson_options.txt | 4 ++++
42 + plugins/spell/meson.build | 4 ++++
43 + 3 files changed, 10 insertions(+), 1 deletion(-)
44 +
45 +diff --git a/meson.build b/meson.build
46 +index edb2896a6..b8707f33d 100644
47 +--- a/meson.build
48 ++++ b/meson.build
49 +@@ -63,7 +63,7 @@ libpeas_gtk_dep = dependency('libpeas-gtk-1.0', version: libpeas_req)
50 +
51 + libgd_dep = libgd_subproject.get_variable('libgd_dep')
52 +
53 +-gspell_dep = dependency('gspell-1', version: '>= 1.0', required: true)
54 ++gspell_dep = dependency('gspell-1', version: '>= 1.0', required: get_option('spell'))
55 + x11_dep = dependency('x11', required: false)
56 +
57 + introspection_dep = dependency('gobject-introspection-1.0', required: false)
58 +@@ -154,6 +154,7 @@ summary = [
59 + ' User documentation: @0@'.format(get_option('user_documentation')),
60 + ' GObject Introspection: @0@'.format(generate_gir),
61 + ' Vala API: @0@'.format(generate_vapi),
62 ++ ' Spell checker plugin: @0@'.format(gspell_dep.found().to_string()),
63 + '',
64 + ]
65 + message('\n'.join(summary))
66 +diff --git a/meson_options.txt b/meson_options.txt
67 +index d0cbf0720..03e07244e 100644
68 +--- a/meson_options.txt
69 ++++ b/meson_options.txt
70 +@@ -10,6 +10,10 @@ option('gtk_doc',
71 + type: 'boolean', value: false,
72 + description: 'Build API reference for plugins (requires gtk-doc)')
73 +
74 ++option('spell',
75 ++ type: 'feature', value: 'enabled',
76 ++ description: 'Build spell checking plugin')
77 ++
78 + # This option exists for the developers, to speed up the install.
79 + option('user_documentation',
80 + type: 'boolean', value: true,
81 +diff --git a/plugins/spell/meson.build b/plugins/spell/meson.build
82 +index 8ce7634b7..cccb42fc1 100644
83 +--- a/plugins/spell/meson.build
84 ++++ b/plugins/spell/meson.build
85 +@@ -1,3 +1,7 @@
86 ++if not gspell_dep.found()
87 ++ subdir_done()
88 ++endif
89 ++
90 + libspell_sources = files(
91 + 'gedit-spell-app-activatable.c',
92 + 'gedit-spell-plugin.c',
93 +--
94 +2.20.1
95 +
96
97 diff --git a/app-editors/gedit/files/3.36-make-python-optional.patch b/app-editors/gedit/files/3.36-make-python-optional.patch
98 new file mode 100644
99 index 00000000000..c27a0551f00
100 --- /dev/null
101 +++ b/app-editors/gedit/files/3.36-make-python-optional.patch
102 @@ -0,0 +1,90 @@
103 +From d082ef03b9f545980ab77e6c0a20d5bf4893be69 Mon Sep 17 00:00:00 2001
104 +From: Mart Raudsepp <leio@g.o>
105 +Date: Sun, 16 Aug 2020 23:34:42 +0300
106 +Subject: [PATCH] build: Make python optional
107 +
108 +---
109 + gedit/meson.build | 2 ++
110 + meson.build | 4 +++-
111 + meson_options.txt | 4 ++++
112 + plugins/meson.build | 11 +++++++----
113 + 4 files changed, 16 insertions(+), 5 deletions(-)
114 +
115 +diff --git a/gedit/meson.build b/gedit/meson.build
116 +index 075c001b2..174deba04 100644
117 +--- a/gedit/meson.build
118 ++++ b/gedit/meson.build
119 +@@ -214,6 +214,7 @@ if generate_gir == true
120 + install_dir_typelib: join_paths(pkglibdir, 'girepository-1.0'),
121 + )
122 +
123 ++if get_option('python')
124 + python3.install_sources(
125 + 'Gedit.py',
126 + subdir: join_paths(
127 +@@ -221,6 +222,7 @@ if generate_gir == true
128 + 'overrides',
129 + )
130 + )
131 ++endif
132 +
133 + libgedit_dep_sources += [
134 + libgedit_gir,
135 +diff --git a/meson.build b/meson.build
136 +index b8707f33d..4e40833ec 100644
137 +--- a/meson.build
138 ++++ b/meson.build
139 +@@ -69,7 +69,9 @@ x11_dep = dependency('x11', required: false)
140 + introspection_dep = dependency('gobject-introspection-1.0', required: false)
141 + vapigen_dep = dependency('vapigen', version: '>= 0.25.1', required: false)
142 +
143 +-python3 = python.find_installation('python3')
144 ++if get_option('python')
145 ++ python3 = python.find_installation('python3')
146 ++endif
147 +
148 + build_checkupdate_plugin = host_machine.system() == 'windows'
149 + if build_checkupdate_plugin
150 +diff --git a/meson_options.txt b/meson_options.txt
151 +index 03e07244e..cdcec6165 100644
152 +--- a/meson_options.txt
153 ++++ b/meson_options.txt
154 +@@ -10,6 +10,10 @@ option('gtk_doc',
155 + type: 'boolean', value: false,
156 + description: 'Build API reference for plugins (requires gtk-doc)')
157 +
158 ++option('python',
159 ++ type: 'boolean', value: true,
160 ++ description: 'Install GIR python overrides and python plugins')
161 ++
162 + option('spell',
163 + type: 'feature', value: 'enabled',
164 + description: 'Build spell checking plugin')
165 +diff --git a/plugins/meson.build b/plugins/meson.build
166 +index a9167f8d6..97f1b1765 100644
167 +--- a/plugins/meson.build
168 ++++ b/plugins/meson.build
169 +@@ -20,13 +20,16 @@ if build_checkupdate_plugin
170 + endif
171 +
172 + subdir('docinfo')
173 +-subdir('externaltools')
174 + subdir('filebrowser')
175 + subdir('modelines')
176 +-subdir('pythonconsole')
177 + subdir('quickhighlight')
178 +-subdir('quickopen')
179 +-subdir('snippets')
180 + subdir('sort')
181 + subdir('spell')
182 + subdir('time')
183 ++
184 ++if get_option('python')
185 ++ subdir('externaltools')
186 ++ subdir('pythonconsole')
187 ++ subdir('quickopen')
188 ++ subdir('snippets')
189 ++endif
190 +--
191 +2.20.1
192 +
193
194 diff --git a/app-editors/gedit/files/restore-overlay-scrollbars.patch b/app-editors/gedit/files/restore-overlay-scrollbars.patch
195 new file mode 100644
196 index 00000000000..55a353a796b
197 --- /dev/null
198 +++ b/app-editors/gedit/files/restore-overlay-scrollbars.patch
199 @@ -0,0 +1,26 @@
200 +From 189ee4514107e70a62d44766f8ca39d815d48581 Mon Sep 17 00:00:00 2001
201 +From: Michael Catanzaro <mcatanzaro@×××××.org>
202 +Date: Fri, 20 Mar 2020 11:32:59 -0500
203 +Subject: [PATCH] Revert "ViewFrame: disable overlay scrolling for the
204 + GtkScrolledWindow"
205 +
206 +This reverts commit 5e0909c19f267b4023131881fac89c58a2a17453.
207 +---
208 + gedit/resources/ui/gedit-view-frame.ui | 1 -
209 + 1 file changed, 1 deletion(-)
210 +
211 +diff --git a/gedit/resources/ui/gedit-view-frame.ui b/gedit/resources/ui/gedit-view-frame.ui
212 +index ebf70b013..4c783c711 100644
213 +--- a/gedit/resources/ui/gedit-view-frame.ui
214 ++++ b/gedit/resources/ui/gedit-view-frame.ui
215 +@@ -11,7 +11,6 @@
216 + <property name="visible">True</property>
217 + <property name="hexpand">True</property>
218 + <property name="vexpand">True</property>
219 +- <property name="overlay_scrolling">False</property>
220 + <child>
221 + <object class="GeditView" id="view">
222 + <property name="visible">True</property>
223 +--
224 +2.25.1
225 +
226
227 diff --git a/app-editors/gedit/gedit-3.36.2.ebuild b/app-editors/gedit/gedit-3.36.2.ebuild
228 new file mode 100644
229 index 00000000000..d1b13e1d463
230 --- /dev/null
231 +++ b/app-editors/gedit/gedit-3.36.2.ebuild
232 @@ -0,0 +1,105 @@
233 +# Copyright 1999-2020 Gentoo Authors
234 +# Distributed under the terms of the GNU General Public License v2
235 +
236 +EAPI=7
237 +PYTHON_COMPAT=( python3_{6,7,8} )
238 +VALA_MIN_API_VERSION="0.26"
239 +VALA_USE_DEPEND="vapigen"
240 +
241 +inherit gnome.org gnome2-utils meson python-single-r1 vala xdg
242 +
243 +DESCRIPTION="A text editor for the GNOME desktop"
244 +HOMEPAGE="https://wiki.gnome.org/Apps/Gedit"
245 +
246 +LICENSE="GPL-2+ CC-BY-SA-3.0"
247 +SLOT="0"
248 +
249 +IUSE="+introspection +python gtk-doc spell vala"
250 +REQUIRED_USE="python? ( introspection ${PYTHON_REQUIRED_USE} )"
251 +
252 +KEYWORDS="~amd64 ~x86"
253 +
254 +# X libs are not needed for OSX (aqua)
255 +DEPEND="
256 + >=dev-libs/glib-2.52:2
257 + >=dev-libs/libpeas-1.14.1[gtk]
258 + >=x11-libs/gtk+-3.22.0:3[introspection?]
259 + >=x11-libs/gtksourceview-4.0.2:4[introspection?]
260 + >=gui-libs/tepl-4.4:4
261 + x11-libs/libX11
262 +
263 + spell? ( >=app-text/gspell-0.2.5:0= )
264 + introspection? ( >=dev-libs/gobject-introspection-1.54:= )
265 + python? (
266 + ${PYTHON_DEPS}
267 + $(python_gen_cond_dep '
268 + dev-python/pycairo[${PYTHON_USEDEP}]
269 + >=dev-python/pygobject-3:3[cairo,${PYTHON_USEDEP}]
270 + dev-libs/libpeas[python,${PYTHON_SINGLE_USEDEP}]
271 + ')
272 + )
273 +"
274 +RDEPEND="${DEPEND}
275 + x11-themes/adwaita-icon-theme
276 + gnome-base/gsettings-desktop-schemas
277 + gnome-base/gvfs
278 +"
279 +BDEPEND="
280 + ${vala_depend}
281 + app-text/docbook-xml-dtd:4.1.2
282 + dev-util/glib-utils
283 + gtk-doc? ( >=dev-util/gtk-doc-1 )
284 + dev-util/itstool
285 + >=sys-devel/gettext-0.18
286 + virtual/pkgconfig
287 +"
288 +PATCHES=(
289 + # Don't force off overlay scrollbars for dubious reasons that GNOME designers heavily
290 + # disagree with; those wanting them off in general would set that globally for gtk
291 + "${FILESDIR}"/restore-overlay-scrollbars.patch
292 + # Make gspell and python optional
293 + "${FILESDIR}"/3.36-make-gspell-optional.patch
294 + "${FILESDIR}"/3.36-make-python-optional.patch
295 +)
296 +
297 +pkg_setup() {
298 + use python && python-single-r1_pkg_setup
299 +}
300 +
301 +src_prepare() {
302 + use vala && vala_src_prepare
303 + xdg_src_prepare
304 +}
305 +
306 +src_configure() {
307 + local emesonargs=(
308 + $(meson_use introspection)
309 + $(meson_use vala vapi)
310 + $(meson_use python)
311 + $(meson_use gtk-doc gtk_doc)
312 + -Duser_documentation=true
313 + $(meson_feature spell)
314 + )
315 + meson_src_configure
316 +}
317 +
318 +# Only appdata and desktop file validation in v3.32.2
319 +src_test() { :; }
320 +
321 +src_install() {
322 + meson_src_install
323 + if use python; then
324 + python_optimize
325 + python_optimize "${ED}/usr/$(get_libdir)/gedit/plugins/"
326 + fi
327 +}
328 +
329 +pkg_postinst() {
330 + xdg_pkg_postinst
331 + gnome2_schemas_update
332 +}
333 +
334 +pkg_postrm() {
335 + xdg_pkg_postrm
336 + gnome2_schemas_update
337 +}