Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/inkscape/files/, media-gfx/inkscape/
Date: Sat, 25 Sep 2021 15:59:15
Message-Id: 1632585534.b5cf24fbb7854095f11b294e4999374fe2cdaadc.dilfridge@gentoo
1 commit: b5cf24fbb7854095f11b294e4999374fe2cdaadc
2 Author: Petr Vaněk <arkamar <AT> atlas <DOT> cz>
3 AuthorDate: Mon Jul 5 09:17:05 2021 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 25 15:58:54 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5cf24fb
7
8 media-gfx/inkscape: add 1.1
9
10 - Add optional readline support
11 - gtkspell dependency was changed to gspell, aspell is not required
12 anymore
13 - backported sentinel patch from upstream in order to support musl libc
14 - dropping ~hppa and ~ia64 keyword because they are missing in
15 app-text/gspell dependency
16
17 Closes: https://bugs.gentoo.org/791925
18 Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
19 Closes: https://github.com/gentoo/gentoo/pull/22353
20 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
21
22 media-gfx/inkscape/Manifest | 1 +
23 .../inkscape/files/inkscape-1.1-sentinels.patch | 727 +++++++++++++++++++++
24 media-gfx/inkscape/inkscape-1.1.ebuild | 162 +++++
25 3 files changed, 890 insertions(+)
26
27 diff --git a/media-gfx/inkscape/Manifest b/media-gfx/inkscape/Manifest
28 index 595bd98db34..1810db36929 100644
29 --- a/media-gfx/inkscape/Manifest
30 +++ b/media-gfx/inkscape/Manifest
31 @@ -1 +1,2 @@
32 DIST inkscape-1.0.2.tar.xz 32421620 BLAKE2B c3f9c37b15343ba0955a6d06810aef5fb9e035a240f99579301b8cd93858a62b5ed1a3ff528a9642ec74b8900305495236cf7f4c672864369a4e33dca3b34bd4 SHA512 f4fbc627c0f07db11194715c505b771a60af29a9a7f8be0232e4f7eb6b1c5814c3f160c2003d64ec62aeb92ef44174320a47aa6b6abc7a67cc27c996cba9522d
33 +DIST inkscape-1.1.tar.xz 34203156 BLAKE2B 38896509dcdcf1ef18523c790855035ef16dfae75e27c2d69f782270f52a579557edcb790bef30f3210b9f797a619369d7d16dd23f098debdd8e5b6abf9b30aa SHA512 54b75f8794d748ef59d5b719ea04e3debadc1a5cf3f62f14254502567973bbd634850edd0a3bc082be878dacf041e9bd10982c4846bf154f89aa5319eda4ee80
34
35 diff --git a/media-gfx/inkscape/files/inkscape-1.1-sentinels.patch b/media-gfx/inkscape/files/inkscape-1.1-sentinels.patch
36 new file mode 100644
37 index 00000000000..b4768d44f27
38 --- /dev/null
39 +++ b/media-gfx/inkscape/files/inkscape-1.1-sentinels.patch
40 @@ -0,0 +1,727 @@
41 +From 3abc0aac5ffed8a130086e93b1fdba596f505a1c Mon Sep 17 00:00:00 2001
42 +From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@×××××.cz>
43 +Date: Fri, 2 Jul 2021 12:10:48 +0200
44 +Subject: [PATCH] Fix sentinel errors for builds against musl libc
45 +MIME-Version: 1.0
46 +Content-Type: text/plain; charset=UTF-8
47 +Content-Transfer-Encoding: 8bit
48 +
49 +This change fixes failing builds on systems with musl libc, where one
50 +can experience lots of errors similar to following one:
51 +
52 +```
53 +FAILED: src/libnrtype/CMakeFiles/nrtype_LIB.dir/font-lister.cpp.o
54 +/usr/bin/c++ ... -c ../src/libnrtype/font-lister.cpp
55 +../src/libnrtype/font-lister.cpp: In function ‘void font_lister_cell_data_func2(GtkCellLayout*, GtkCellRenderer*, GtkTreeModel*, GtkTreeIter*, gpointer)’:
56 +../src/libnrtype/font-lister.cpp:1236:64: error: missing sentinel in function call [-Werror=format=]
57 + 1236 | g_object_set(G_OBJECT(cell), "markup", markup.c_str(), NULL);
58 + | ^
59 +```
60 +
61 +Those errors are triggered by the compiler, because musl does not use
62 +GCC's or Clang's __null extension for NULL definition, because it seems
63 +non-conforming to the standard's requirements [1]. However, it is
64 +possible to trigger this error with -Wstrict-null-sentinel GCC flag on
65 +systems with glibc.
66 +
67 +[1]: https://git.musl-libc.org/cgit/musl/commit/?id=c8a9c22173f485c8c053709e1dfa0a617cb6be1a
68 +
69 +---
70 +
71 +The patch is taken from upstream 1.1.x branch.
72 +
73 +Upstream-issue: https://gitlab.com/inkscape/inkscape/-/issues/1880
74 +Upstream-MR: https://gitlab.com/inkscape/inkscape/-/merge_requests/3378
75 +Backported-from: https://gitlab.com/inkscape/inkscape/-/merge_requests/3378/diffs?commit_id=8d8d7adb07649fa64f9879b56187708ab7166149
76 +
77 +
78 +
79 +diff --git a/src/display/nr-filter-image.cpp b/src/display/nr-filter-image.cpp
80 +index bfc2b6bb1f..5311d8cbce 100644
81 +--- a/src/display/nr-filter-image.cpp
82 ++++ b/src/display/nr-filter-image.cpp
83 +@@ -158,7 +158,7 @@ void FilterImage::render_cairo(FilterSlot &slot)
84 + if ( !g_file_test( fullname, G_FILE_TEST_EXISTS ) ) {
85 + // Try to load from relative position combined with document base
86 + if( document ) {
87 +- fullname = g_build_filename( document->getDocumentBase(), feImageHref, NULL );
88 ++ fullname = g_build_filename( document->getDocumentBase(), feImageHref, nullptr );
89 + }
90 + }
91 + if ( !g_file_test( fullname, G_FILE_TEST_EXISTS ) ) {
92 +diff --git a/src/extension/dbus/document-interface.cpp b/src/extension/dbus/document-interface.cpp
93 +index 5021734722..f490b5b6d5 100644
94 +--- a/src/extension/dbus/document-interface.cpp
95 ++++ b/src/extension/dbus/document-interface.cpp
96 +@@ -474,7 +474,7 @@ document_interface_spiral (DocumentInterface *doc_interface, int cx, int cy,
97 + sp_repr_set_int(newNode, "sodipodi:expansion", 1);
98 + gchar * retval = finish_create_shape (doc_interface, error, newNode, (gchar *)"create spiral");
99 + //Makes sure there is no fill for spirals by default.
100 +- gchar* newString = g_strconcat(newNode->attribute("style"), ";fill:none", NULL);
101 ++ gchar* newString = g_strconcat(newNode->attribute("style"), ";fill:none", nullptr);
102 + newNode->setAttribute("style", newString);
103 + g_free(newString);
104 + return retval;
105 +diff --git a/src/extension/dependency.cpp b/src/extension/dependency.cpp
106 +index f94634bbc3..09928c64f7 100644
107 +--- a/src/extension/dependency.cpp
108 ++++ b/src/extension/dependency.cpp
109 +@@ -186,7 +186,7 @@ bool Dependency::check ()
110 + break;
111 + }
112 + /* Look for deprecated locations next */
113 +- auto deprloc = g_build_filename("inkex", "deprecated-simple", location.c_str(), NULL);
114 ++ auto deprloc = g_build_filename("inkex", "deprecated-simple", location.c_str(), nullptr);
115 + std::string tempdepr =
116 + Inkscape::IO::Resource::get_filename_string(Inkscape::IO::Resource::EXTENSIONS, deprloc, false, true);
117 + g_free(deprloc);
118 +diff --git a/src/inkscape.cpp b/src/inkscape.cpp
119 +index 29b7e08c25..07794fd8b9 100644
120 +--- a/src/inkscape.cpp
121 ++++ b/src/inkscape.cpp
122 +@@ -434,15 +434,15 @@ void Application::add_gtk_css(bool only_providers)
123 + gboolean gtkApplicationPreferDarkTheme;
124 + GtkSettings *settings = gtk_settings_get_default();
125 + if (settings && !only_providers) {
126 +- g_object_get(settings, "gtk-icon-theme-name", &gtkIconThemeName, NULL);
127 +- g_object_get(settings, "gtk-theme-name", &gtkThemeName, NULL);
128 +- g_object_get(settings, "gtk-application-prefer-dark-theme", &gtkApplicationPreferDarkTheme, NULL);
129 ++ g_object_get(settings, "gtk-icon-theme-name", &gtkIconThemeName, nullptr);
130 ++ g_object_get(settings, "gtk-theme-name", &gtkThemeName, nullptr);
131 ++ g_object_get(settings, "gtk-application-prefer-dark-theme", &gtkApplicationPreferDarkTheme, nullptr);
132 + prefs->setBool("/theme/defaultPreferDarkTheme", gtkApplicationPreferDarkTheme);
133 + prefs->setString("/theme/defaultGtkTheme", Glib::ustring(gtkThemeName));
134 + prefs->setString("/theme/defaultIconTheme", Glib::ustring(gtkIconThemeName));
135 + Glib::ustring gtkthemename = prefs->getString("/theme/gtkTheme");
136 + if (gtkthemename != "") {
137 +- g_object_set(settings, "gtk-theme-name", gtkthemename.c_str(), NULL);
138 ++ g_object_set(settings, "gtk-theme-name", gtkthemename.c_str(), nullptr);
139 + } else {
140 + Glib::RefPtr<Gdk::Display> display = Gdk::Display::get_default();
141 + Glib::RefPtr<Gdk::Screen> screen = display->get_default_screen();
142 +@@ -451,13 +451,13 @@ void Application::add_gtk_css(bool only_providers)
143 + prefs->setBool("/theme/symbolicIcons", iconinfo.is_symbolic());
144 + }
145 + bool preferdarktheme = prefs->getBool("/theme/preferDarkTheme", false);
146 +- g_object_set(settings, "gtk-application-prefer-dark-theme", preferdarktheme, NULL);
147 ++ g_object_set(settings, "gtk-application-prefer-dark-theme", preferdarktheme, nullptr);
148 + themeiconname = prefs->getString("/theme/iconTheme");
149 + // legacy cleanup
150 + if (themeiconname == prefs->getString("/theme/defaultIconTheme")) {
151 + prefs->setString("/theme/iconTheme", "");
152 + } else if (themeiconname != "") {
153 +- g_object_set(settings, "gtk-icon-theme-name", themeiconname.c_str(), NULL);
154 ++ g_object_set(settings, "gtk-icon-theme-name", themeiconname.c_str(), nullptr);
155 + }
156 + }
157 +
158 +@@ -684,7 +684,7 @@ Application::crash_handler (int /*signum*/)
159 + FILE *file = nullptr;
160 + for(auto & location : locations) {
161 + if (!location) continue; // It seems to be okay, but just in case
162 +- gchar * filename = g_build_filename(location, c, NULL);
163 ++ gchar * filename = g_build_filename(location, c, nullptr);
164 + Inkscape::IO::dump_fopen_call(filename, "E");
165 + file = Inkscape::IO::fopen_utf8name(filename, "w");
166 + if (file) {
167 +diff --git a/src/io/resource.cpp b/src/io/resource.cpp
168 +index fec933f1a9..c75c4ed6cf 100644
169 +--- a/src/io/resource.cpp
170 ++++ b/src/io/resource.cpp
171 +@@ -445,14 +445,14 @@ char const *profile_path()
172 + }
173 +
174 + if (prefdir) {
175 +- const char *prefdir_profile = g_build_filename(prefdir, INKSCAPE_PROFILE_DIR, NULL);
176 ++ const char *prefdir_profile = g_build_filename(prefdir, INKSCAPE_PROFILE_DIR, nullptr);
177 + g_free((void *)prefdir);
178 + prefdir = prefdir_profile;
179 + }
180 + }
181 + #endif
182 + if (!prefdir) {
183 +- prefdir = g_build_filename(g_get_user_config_dir(), INKSCAPE_PROFILE_DIR, NULL);
184 ++ prefdir = g_build_filename(g_get_user_config_dir(), INKSCAPE_PROFILE_DIR, nullptr);
185 + // In case the XDG user config dir of the moment does not yet exist...
186 + int mode = S_IRWXU;
187 + #ifdef S_IRGRP
188 +@@ -471,7 +471,7 @@ char const *profile_path()
189 + gchar const *userDirs[] = { "keys", "templates", "icons", "extensions", "ui",
190 + "symbols", "paint", "themes", "palettes", nullptr };
191 + for (gchar const** name = userDirs; *name; ++name) {
192 +- gchar *dir = g_build_filename(prefdir, *name, NULL);
193 ++ gchar *dir = g_build_filename(prefdir, *name, nullptr);
194 + g_mkdir_with_parents(dir, mode);
195 + g_free(dir);
196 + }
197 +@@ -495,7 +495,7 @@ char *homedir_path(const char *filename)
198 + static const gchar *homedir = nullptr;
199 + homedir = g_get_home_dir();
200 +
201 +- return g_build_filename(homedir, filename, NULL);
202 ++ return g_build_filename(homedir, filename, nullptr);
203 + }
204 +
205 + }
206 +diff --git a/src/libnrtype/font-lister.cpp b/src/libnrtype/font-lister.cpp
207 +index 6177e7479d..75ff172c05 100644
208 +--- a/src/libnrtype/font-lister.cpp
209 ++++ b/src/libnrtype/font-lister.cpp
210 +@@ -1233,7 +1233,7 @@ void font_lister_cell_data_func2(GtkCellLayout * /*cell_layout*/,
211 + g_free(sample_escaped);
212 + }
213 +
214 +- g_object_set(G_OBJECT(cell), "markup", markup.c_str(), NULL);
215 ++ g_object_set(G_OBJECT(cell), "markup", markup.c_str(), nullptr);
216 + g_free(family);
217 + g_free(family_escaped);
218 + }
219 +diff --git a/src/object/color-profile.cpp b/src/object/color-profile.cpp
220 +index da103e90d1..a2464194dc 100644
221 +--- a/src/object/color-profile.cpp
222 ++++ b/src/object/color-profile.cpp
223 +@@ -700,7 +700,7 @@ std::set<ColorProfile::FilePlusHome> ColorProfile::getBaseProfileDirs() {
224 + std::set<ColorProfile::FilePlusHome> sources;
225 +
226 + // first try user's local dir
227 +- gchar* path = g_build_filename(g_get_user_data_dir(), "color", "icc", NULL);
228 ++ gchar* path = g_build_filename(g_get_user_data_dir(), "color", "icc", nullptr);
229 + sources.insert(FilePlusHome(path, true));
230 + g_free(path);
231 +
232 +@@ -708,11 +708,11 @@ std::set<ColorProfile::FilePlusHome> ColorProfile::getBaseProfileDirs() {
233 + // (see https://github.com/hughsie/colord/blob/fe10f76536bb27614ced04e0ff944dc6fb4625c0/lib/colord/cd-icc-store.c#L590)
234 +
235 + // user store
236 +- path = g_build_filename(g_get_user_data_dir(), "icc", NULL);
237 ++ path = g_build_filename(g_get_user_data_dir(), "icc", nullptr);
238 + sources.insert(FilePlusHome(path, true));
239 + g_free(path);
240 +
241 +- path = g_build_filename(g_get_home_dir(), ".color", "icc", NULL);
242 ++ path = g_build_filename(g_get_home_dir(), ".color", "icc", nullptr);
243 + sources.insert(FilePlusHome(path, true));
244 + g_free(path);
245 +
246 +@@ -722,7 +722,7 @@ std::set<ColorProfile::FilePlusHome> ColorProfile::getBaseProfileDirs() {
247 +
248 + const gchar* const * dataDirs = g_get_system_data_dirs();
249 + for ( int i = 0; dataDirs[i]; i++ ) {
250 +- gchar* path = g_build_filename(dataDirs[i], "color", "icc", NULL);
251 ++ gchar* path = g_build_filename(dataDirs[i], "color", "icc", nullptr);
252 + sources.insert(FilePlusHome(path, false));
253 + g_free(path);
254 + }
255 +@@ -732,7 +732,7 @@ std::set<ColorProfile::FilePlusHome> ColorProfile::getBaseProfileDirs() {
256 + sources.insert(FilePlusHome("/System/Library/ColorSync/Profiles", false));
257 + sources.insert(FilePlusHome("/Library/ColorSync/Profiles", false));
258 +
259 +- gchar *path = g_build_filename(g_get_home_dir(), "Library", "ColorSync", "Profiles", NULL);
260 ++ gchar *path = g_build_filename(g_get_home_dir(), "Library", "ColorSync", "Profiles", nullptr);
261 + sources.insert(FilePlusHome(path, true));
262 + g_free(path);
263 + }
264 +diff --git a/src/object/sp-guide.cpp b/src/object/sp-guide.cpp
265 +index 01e7596801..678c2b20bc 100644
266 +--- a/src/object/sp-guide.cpp
267 ++++ b/src/object/sp-guide.cpp
268 +@@ -538,7 +538,7 @@ char* SPGuide::description(bool const verbose) const
269 +
270 + if (verbose) {
271 + gchar *oldDescr = descr;
272 +- descr = g_strconcat(oldDescr, shortcuts, NULL);
273 ++ descr = g_strconcat(oldDescr, shortcuts, nullptr);
274 + g_free(oldDescr);
275 + }
276 +
277 +diff --git a/src/object/sp-image.cpp b/src/object/sp-image.cpp
278 +index 3c3fc5dd8a..459ecd4243 100644
279 +--- a/src/object/sp-image.cpp
280 ++++ b/src/object/sp-image.cpp
281 +@@ -756,7 +756,7 @@ void sp_embed_image(Inkscape::XML::Node *image_node, Inkscape::Pixbuf *pb)
282 + if (data == nullptr) {
283 + // if there is no supported MIME data, embed as PNG
284 + data_mimetype = "image/png";
285 +- gdk_pixbuf_save_to_buffer(pb->getPixbufRaw(), reinterpret_cast<gchar**>(&data), &len, "png", nullptr, NULL);
286 ++ gdk_pixbuf_save_to_buffer(pb->getPixbufRaw(), reinterpret_cast<gchar**>(&data), &len, "png", nullptr, nullptr);
287 + free_data = true;
288 + }
289 +
290 +diff --git a/src/rdf.cpp b/src/rdf.cpp
291 +index 563776a19b..3aeb0afa9d 100644
292 +--- a/src/rdf.cpp
293 ++++ b/src/rdf.cpp
294 +@@ -543,7 +543,7 @@ const gchar *RDFImpl::getReprText( Inkscape::XML::Node const * repr, struct rdf_
295 + const gchar * str = temp->firstChild()->content();
296 + if (bag) {
297 + holder = bag;
298 +- bag = g_strconcat(holder, ", ", str, NULL);
299 ++ bag = g_strconcat(holder, ", ", str, nullptr);
300 + g_free(holder);
301 + }
302 + else {
303 +diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
304 +index 5596030a64..38c5d59063 100644
305 +--- a/src/selection-chemistry.cpp
306 ++++ b/src/selection-chemistry.cpp
307 +@@ -3663,7 +3663,7 @@ void ObjectSet::createBitmapCopy()
308 + if (directory == nullptr) {
309 + directory = Inkscape::IO::Resource::homedir_path(nullptr);
310 + }
311 +- gchar *filepath = g_build_filename(directory, basename, NULL);
312 ++ gchar *filepath = g_build_filename(directory, basename, nullptr);
313 + g_free(directory);
314 +
315 + //g_print("%s\n", filepath);
316 +diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
317 +index 0cddf4586c..426ec52e81 100644
318 +--- a/src/ui/clipboard.cpp
319 ++++ b/src/ui/clipboard.cpp
320 +@@ -1221,7 +1221,7 @@ bool ClipboardManagerImpl::_pasteImage(SPDocument *doc)
321 + prefs->setBool("/dialogs/import/ask", false);
322 + png->set_gui(false);
323 +
324 +- gchar *filename = g_build_filename( g_get_user_cache_dir(), "inkscape-clipboard-import", NULL );
325 ++ gchar *filename = g_build_filename( g_get_user_cache_dir(), "inkscape-clipboard-import", nullptr );
326 + img->save(filename, "png");
327 + file_import(doc, filename, png);
328 + g_free(filename);
329 +@@ -1320,7 +1320,7 @@ std::unique_ptr<SPDocument> ClipboardManagerImpl::_retrieveClipboard(Glib::ustri
330 +
331 + // FIXME: Temporary hack until we add memory input.
332 + // Save the clipboard contents to some file, then read it
333 +- gchar *filename = g_build_filename( g_get_user_cache_dir(), "inkscape-clipboard-import", NULL );
334 ++ gchar *filename = g_build_filename( g_get_user_cache_dir(), "inkscape-clipboard-import", nullptr );
335 +
336 + bool file_saved = false;
337 + Glib::ustring target = best_target;
338 +@@ -1413,7 +1413,7 @@ void ClipboardManagerImpl::_onGet(Gtk::SelectionData &sel, guint /*info*/)
339 +
340 + // FIXME: Temporary hack until we add support for memory output.
341 + // Save to a temporary file, read it back and then set the clipboard contents
342 +- gchar *filename = g_build_filename( g_get_user_cache_dir(), "inkscape-clipboard-export", NULL );
343 ++ gchar *filename = g_build_filename( g_get_user_cache_dir(), "inkscape-clipboard-export", nullptr );
344 + gchar *data = nullptr;
345 + gsize len;
346 +
347 +@@ -1675,7 +1675,7 @@ void ClipboardManagerImpl::_setClipboardTargets()
348 + if ( out != outlist.end() ) {
349 + // FIXME: Temporary hack until we add support for memory output.
350 + // Save to a temporary file, read it back and then set the clipboard contents
351 +- gchar *filename = g_build_filename( g_get_user_cache_dir(), "inkscape-clipboard-export.emf", NULL );
352 ++ gchar *filename = g_build_filename( g_get_user_cache_dir(), "inkscape-clipboard-export.emf", nullptr );
353 +
354 + try {
355 + (*out)->save(_clipboardSPDoc.get(), filename);
356 +diff --git a/src/ui/dialog/clonetiler.cpp b/src/ui/dialog/clonetiler.cpp
357 +index 7802c37449..cd8af7f4a8 100644
358 +--- a/src/ui/dialog/clonetiler.cpp
359 ++++ b/src/ui/dialog/clonetiler.cpp
360 +@@ -159,7 +159,7 @@ CloneTiler::CloneTiler()
361 + auto cell_list = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(combo->gobj()));
362 + gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo->gobj()),
363 + GTK_CELL_RENDERER(cell_list->data),
364 +- "markup", 0, NULL);
365 ++ "markup", 0, nullptr);
366 +
367 + for (const auto & sg : sym_groups) {
368 + // Add the description of the symgroup to a new row
369 +diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
370 +index 7496284cec..7f83143992 100644
371 +--- a/src/ui/dialog/export.cpp
372 ++++ b/src/ui/dialog/export.cpp
373 +@@ -490,7 +490,7 @@ void Export::set_default_filename () {
374 + extension_point = g_strrstr(uri_copy, old_extension);
375 + extension_point[0] = '\0';
376 +
377 +- final_name = g_strconcat(uri_copy, ".png", NULL);
378 ++ final_name = g_strconcat(uri_copy, ".png", nullptr);
379 + filename_entry.set_text(final_name);
380 + filename_entry.set_position(strlen(final_name));
381 +
382 +@@ -498,7 +498,7 @@ void Export::set_default_filename () {
383 + g_free(uri_copy);
384 + }
385 + } else {
386 +- gchar *name = g_strconcat(uri, ".png", NULL);
387 ++ gchar *name = g_strconcat(uri, ".png", nullptr);
388 + filename_entry.set_text(name);
389 + filename_entry.set_position(strlen(name));
390 +
391 +diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp
392 +index 940ef1b834..520e6091d1 100644
393 +--- a/src/ui/dialog/inkscape-preferences.cpp
394 ++++ b/src/ui/dialog/inkscape-preferences.cpp
395 +@@ -1623,7 +1623,7 @@ void InkscapePreferences::initPageUI()
396 + _page_theme.add_line(false, _("Change GTK theme:"), _gtk_theme, "", "", false);
397 + _gtk_theme.signal_changed().connect(sigc::mem_fun(*this, &InkscapePreferences::themeChange));
398 + }
399 +- _sys_user_themes_dir_copy.init(g_build_filename(g_get_user_data_dir(), "themes", NULL), _("Open themes folder"));
400 ++ _sys_user_themes_dir_copy.init(g_build_filename(g_get_user_data_dir(), "themes", nullptr), _("Open themes folder"));
401 + _page_theme.add_line(true, _("User themes:"), _sys_user_themes_dir_copy, "", _("Location of the user’s themes"), true, Gtk::manage(new Gtk::Box()));
402 + //_contrast_theme.init("/theme/contrast", 1, 10, 1, 2, 10, 1);
403 + Gtk::Widget *space = new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL);
404 +@@ -3351,7 +3351,7 @@ void InkscapePreferences::initPageSystem()
405 + _("Open fonts folder"));
406 + _page_system.add_line(true, _("User fonts:"), _sys_user_fonts_dir, "", _("Location of the user’s fonts"), true);
407 +
408 +- _sys_user_themes_dir.init(g_build_filename(g_get_user_data_dir(), "themes", NULL), _("Open themes folder"));
409 ++ _sys_user_themes_dir.init(g_build_filename(g_get_user_data_dir(), "themes", nullptr), _("Open themes folder"));
410 + _page_system.add_line(true, _("User themes:"), _sys_user_themes_dir, "", _("Location of the user’s themes"), true);
411 +
412 + _sys_user_icons_dir.init((char const *)IO::Resource::get_path(IO::Resource::USER, IO::Resource::ICONS, ""),
413 +diff --git a/src/ui/drag-and-drop.cpp b/src/ui/drag-and-drop.cpp
414 +index 880906c34b..c99bd0f4f5 100644
415 +--- a/src/ui/drag-and-drop.cpp
416 ++++ b/src/ui/drag-and-drop.cpp
417 +@@ -357,7 +357,7 @@ ink_drag_data_received(GtkWidget *widget,
418 + ext->set_param_optiongroup("link", "embed");
419 + ext->set_gui(false);
420 +
421 +- gchar *filename = g_build_filename( g_get_tmp_dir(), "inkscape-dnd-import", NULL );
422 ++ gchar *filename = g_build_filename( g_get_tmp_dir(), "inkscape-dnd-import", nullptr );
423 + g_file_set_contents(filename,
424 + reinterpret_cast<gchar const *>(gtk_selection_data_get_data (data)),
425 + gtk_selection_data_get_length (data),
426 +diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp
427 +index 089327c7ac..8ae64382d6 100644
428 +--- a/src/ui/interface.cpp
429 ++++ b/src/ui/interface.cpp
430 +@@ -203,7 +203,7 @@ sp_ui_overwrite_file(gchar const *filename)
431 + gtk_dialog_add_buttons( GTK_DIALOG(dialog),
432 + _("_Cancel"), GTK_RESPONSE_NO,
433 + _("Replace"), GTK_RESPONSE_YES,
434 +- NULL );
435 ++ nullptr );
436 + gtk_dialog_set_default_response( GTK_DIALOG(dialog), GTK_RESPONSE_YES );
437 +
438 + if ( gtk_dialog_run( GTK_DIALOG(dialog) ) == GTK_RESPONSE_YES ) {
439 +diff --git a/src/ui/themes.cpp b/src/ui/themes.cpp
440 +index f874c4c1a8..ff1eca4a9f 100644
441 +--- a/src/ui/themes.cpp
442 ++++ b/src/ui/themes.cpp
443 +@@ -30,15 +30,15 @@
444 + static void inkscape_fill_gtk(const gchar *path, gtkThemeList &themes)
445 + {
446 + const gchar *dir_entry;
447 +- GDir *dir = g_dir_open(path, 0, NULL);
448 ++ GDir *dir = g_dir_open(path, 0, nullptr);
449 + if (!dir)
450 + return;
451 + while ((dir_entry = g_dir_read_name(dir))) {
452 +- gchar *filename = g_build_filename(path, dir_entry, "gtk-3.0", "gtk.css", NULL);
453 ++ gchar *filename = g_build_filename(path, dir_entry, "gtk-3.0", "gtk.css", nullptr);
454 + bool has_prefer_dark = false;
455 +
456 + Glib::ustring theme = dir_entry;
457 +- gchar *filenamedark = g_build_filename(path, dir_entry, "gtk-3.0", "gtk-dark.css", NULL);
458 ++ gchar *filenamedark = g_build_filename(path, dir_entry, "gtk-3.0", "gtk-dark.css", nullptr);
459 + if (g_file_test(filenamedark, G_FILE_TEST_IS_REGULAR))
460 + has_prefer_dark = true;
461 + if (themes.find(theme) != themes.end() && !has_prefer_dark) {
462 +@@ -67,7 +67,7 @@ std::map<Glib::ustring, bool> get_available_themes()
463 + const gchar *const *dirs;
464 +
465 + /* Builtin themes */
466 +- builtin_themes = g_resources_enumerate_children("/org/gtk/libgtk/theme", G_RESOURCE_LOOKUP_FLAGS_NONE, NULL);
467 ++ builtin_themes = g_resources_enumerate_children("/org/gtk/libgtk/theme", G_RESOURCE_LOOKUP_FLAGS_NONE, nullptr);
468 + for (i = 0; builtin_themes[i] != NULL; i++) {
469 + if (g_str_has_suffix(builtin_themes[i], "/")) {
470 + theme = builtin_themes[i];
471 +@@ -75,7 +75,7 @@ std::map<Glib::ustring, bool> get_available_themes()
472 + Glib::ustring theme_path = "/org/gtk/libgtk/theme";
473 + theme_path += "/" + theme;
474 + gchar **builtin_themes_files =
475 +- g_resources_enumerate_children(theme_path.c_str(), G_RESOURCE_LOOKUP_FLAGS_NONE, NULL);
476 ++ g_resources_enumerate_children(theme_path.c_str(), G_RESOURCE_LOOKUP_FLAGS_NONE, nullptr);
477 + bool has_prefer_dark = false;
478 + if (builtin_themes_files != NULL) {
479 + for (j = 0; builtin_themes_files[j] != NULL; j++) {
480 +@@ -92,17 +92,17 @@ std::map<Glib::ustring, bool> get_available_themes()
481 +
482 + g_strfreev(builtin_themes);
483 +
484 +- path = g_build_filename(g_get_user_data_dir(), "themes", NULL);
485 ++ path = g_build_filename(g_get_user_data_dir(), "themes", nullptr);
486 + inkscape_fill_gtk(path, themes);
487 + g_free(path);
488 +
489 +- path = g_build_filename(g_get_home_dir(), ".themes", NULL);
490 ++ path = g_build_filename(g_get_home_dir(), ".themes", nullptr);
491 + inkscape_fill_gtk(path, themes);
492 + g_free(path);
493 +
494 + dirs = g_get_system_data_dirs();
495 + for (i = 0; dirs[i]; i++) {
496 +- path = g_build_filename(dirs[i], "themes", NULL);
497 ++ path = g_build_filename(dirs[i], "themes", nullptr);
498 + inkscape_fill_gtk(path, themes);
499 + g_free(path);
500 + }
501 +diff --git a/src/ui/tool/control-point.cpp b/src/ui/tool/control-point.cpp
502 +index c29b09d93f..13f2e60c6e 100644
503 +--- a/src/ui/tool/control-point.cpp
504 ++++ b/src/ui/tool/control-point.cpp
505 +@@ -185,7 +185,7 @@ void ControlPoint::_setControlType(Inkscape::CanvasItemCtrlType type)
506 +
507 + void ControlPoint::_setAnchor(SPAnchorType anchor)
508 + {
509 +-// g_object_set(_canvas_item_ctrl, "anchor", anchor, NULL);
510 ++// g_object_set(_canvas_item_ctrl, "anchor", anchor, nullptr);
511 + }
512 +
513 + void ControlPoint::_setPixbuf(Glib::RefPtr<Gdk::Pixbuf> p)
514 +diff --git a/src/ui/toolbar/arc-toolbar.cpp b/src/ui/toolbar/arc-toolbar.cpp
515 +index b663d905f4..986b28b3f8 100644
516 +--- a/src/ui/toolbar/arc-toolbar.cpp
517 ++++ b/src/ui/toolbar/arc-toolbar.cpp
518 +@@ -309,7 +309,7 @@ ArcToolbar::startend_value_changed(Glib::RefPtr<Gtk::Adjustment>& adj,
519 + // in turn, prevent listener from responding
520 + _freeze = true;
521 +
522 +- gchar* namespaced_name = g_strconcat("sodipodi:", value_name, NULL);
523 ++ gchar* namespaced_name = g_strconcat("sodipodi:", value_name, nullptr);
524 +
525 + bool modmade = false;
526 + auto itemlist= _desktop->getSelection()->items();
527 +diff --git a/src/ui/toolbar/spiral-toolbar.cpp b/src/ui/toolbar/spiral-toolbar.cpp
528 +index 05ce654242..bae2f8c064 100644
529 +--- a/src/ui/toolbar/spiral-toolbar.cpp
530 ++++ b/src/ui/toolbar/spiral-toolbar.cpp
531 +@@ -175,7 +175,7 @@ SpiralToolbar::value_changed(Glib::RefPtr<Gtk::Adjustment> &adj,
532 + // in turn, prevent listener from responding
533 + _freeze = true;
534 +
535 +- gchar* namespaced_name = g_strconcat("sodipodi:", value_name.data(), NULL);
536 ++ gchar* namespaced_name = g_strconcat("sodipodi:", value_name.data(), nullptr);
537 +
538 + bool modmade = false;
539 + auto itemlist= _desktop->getSelection()->items();
540 +diff --git a/src/ui/tools/gradient-tool.cpp b/src/ui/tools/gradient-tool.cpp
541 +index e83d2b4613..6aecf92ce4 100644
542 +--- a/src/ui/tools/gradient-tool.cpp
543 ++++ b/src/ui/tools/gradient-tool.cpp
544 +@@ -116,7 +116,7 @@ void GradientTool::selection_changed(Inkscape::Selection*) {
545 + _("%s selected"),
546 + //TRANSLATORS: Mind the space in front. This is part of a compound message
547 + ngettext(" out of %d gradient handle"," out of %d gradient handles",n_tot),
548 +- ngettext(" on %d selected object"," on %d selected objects",n_obj),NULL);
549 ++ ngettext(" on %d selected object"," on %d selected objects",n_obj),nullptr);
550 + message_context->setF(Inkscape::NORMAL_MESSAGE,
551 + message,_(gr_handle_descr[drag->singleSelectedDraggerSingleDraggableType()]), n_tot, n_obj);
552 + } else {
553 +@@ -125,14 +125,14 @@ void GradientTool::selection_changed(Inkscape::Selection*) {
554 + ngettext("One handle merging %d stop (drag with <b>Shift</b> to separate) selected",
555 + "One handle merging %d stops (drag with <b>Shift</b> to separate) selected",drag->singleSelectedDraggerNumDraggables()),
556 + ngettext(" out of %d gradient handle"," out of %d gradient handles",n_tot),
557 +- ngettext(" on %d selected object"," on %d selected objects",n_obj),NULL);
558 ++ ngettext(" on %d selected object"," on %d selected objects",n_obj),nullptr);
559 + message_context->setF(Inkscape::NORMAL_MESSAGE,message,drag->singleSelectedDraggerNumDraggables(), n_tot, n_obj);
560 + }
561 + } else if (n_sel > 1) {
562 + //TRANSLATORS: The plural refers to number of selected gradient handles. This is part of a compound message (part two indicates selected object count)
563 + gchar * message = g_strconcat(ngettext("<b>%d</b> gradient handle selected out of %d","<b>%d</b> gradient handles selected out of %d",n_sel),
564 + //TRANSLATORS: Mind the space in front. (Refers to gradient handles selected). This is part of a compound message
565 +- ngettext(" on %d selected object"," on %d selected objects",n_obj),NULL);
566 ++ ngettext(" on %d selected object"," on %d selected objects",n_obj),nullptr);
567 + message_context->setF(Inkscape::NORMAL_MESSAGE,message, n_sel, n_tot, n_obj);
568 + } else if (n_sel == 0) {
569 + message_context->setF(Inkscape::NORMAL_MESSAGE,
570 +diff --git a/src/ui/tools/mesh-tool.cpp b/src/ui/tools/mesh-tool.cpp
571 +index 07bf68bd12..fbde77f36f 100644
572 +--- a/src/ui/tools/mesh-tool.cpp
573 ++++ b/src/ui/tools/mesh-tool.cpp
574 +@@ -131,7 +131,7 @@ void MeshTool::selection_changed(Inkscape::Selection* /*sel*/) {
575 + _("%s selected"),
576 + //TRANSLATORS: Mind the space in front. This is part of a compound message
577 + ngettext(" out of %d mesh handle"," out of %d mesh handles",n_tot),
578 +- ngettext(" on %d selected object"," on %d selected objects",n_obj),NULL);
579 ++ ngettext(" on %d selected object"," on %d selected objects",n_obj),nullptr);
580 + this->message_context->setF(Inkscape::NORMAL_MESSAGE,
581 + message,_(ms_handle_descr[drag->singleSelectedDraggerSingleDraggableType()]), n_tot, n_obj);
582 + } else {
583 +@@ -142,7 +142,7 @@ void MeshTool::selection_changed(Inkscape::Selection* /*sel*/) {
584 + "One handle merging %d stops (drag with <b>Shift</b> to separate) selected",
585 + drag->singleSelectedDraggerNumDraggables()),
586 + ngettext(" out of %d mesh handle"," out of %d mesh handles",n_tot),
587 +- ngettext(" on %d selected object"," on %d selected objects",n_obj),NULL);
588 ++ ngettext(" on %d selected object"," on %d selected objects",n_obj),nullptr);
589 + this->message_context->setF(Inkscape::NORMAL_MESSAGE,message,drag->singleSelectedDraggerNumDraggables(), n_tot, n_obj);
590 + }
591 + } else if (n_sel > 1) {
592 +@@ -150,7 +150,7 @@ void MeshTool::selection_changed(Inkscape::Selection* /*sel*/) {
593 + gchar * message =
594 + g_strconcat(ngettext("<b>%d</b> mesh handle selected out of %d","<b>%d</b> mesh handles selected out of %d",n_sel),
595 + //TRANSLATORS: Mind the space in front. (Refers to gradient handles selected). This is part of a compound message
596 +- ngettext(" on %d selected object"," on %d selected objects",n_obj),NULL);
597 ++ ngettext(" on %d selected object"," on %d selected objects",n_obj),nullptr);
598 + this->message_context->setF(Inkscape::NORMAL_MESSAGE,message, n_sel, n_tot, n_obj);
599 + } else if (n_sel == 0) {
600 + this->message_context->setF(Inkscape::NORMAL_MESSAGE,
601 +diff --git a/src/ui/tools/text-tool.cpp b/src/ui/tools/text-tool.cpp
602 +index 4d0d7f5885..8f7aba97b1 100644
603 +--- a/src/ui/tools/text-tool.cpp
604 ++++ b/src/ui/tools/text-tool.cpp
605 +@@ -100,8 +100,8 @@ TextTool::~TextTool() {
606 + void TextTool::setup() {
607 + GtkSettings* settings = gtk_settings_get_default();
608 + gint timeout = 0;
609 +- g_object_get( settings, "gtk-cursor-blink-time", &timeout, NULL );
610 +-
611 ++ g_object_get( settings, "gtk-cursor-blink-time", &timeout, nullptr );
612 ++
613 + if (timeout < 0) {
614 + timeout = 200;
615 + } else {
616 +diff --git a/src/ui/widget/color-icc-selector.cpp b/src/ui/widget/color-icc-selector.cpp
617 +index 99c6b57af0..cf3b4b4b9b 100644
618 +--- a/src/ui/widget/color-icc-selector.cpp
619 ++++ b/src/ui/widget/color-icc-selector.cpp
620 +@@ -369,7 +369,7 @@ void ColorICCSelector::init()
621 +
622 + GtkCellRenderer *renderer = gtk_cell_renderer_text_new();
623 + gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(_impl->_profileSel), renderer, TRUE);
624 +- gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(_impl->_profileSel), renderer, "text", 0, NULL);
625 ++ gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(_impl->_profileSel), renderer, "text", 0, nullptr);
626 +
627 + GtkTreeIter iter;
628 + gtk_list_store_append(store, &iter);
629 +diff --git a/src/ui/widget/combo-box-entry-tool-item.cpp b/src/ui/widget/combo-box-entry-tool-item.cpp
630 +index 60f87d938b..9bce9ce91b 100644
631 +--- a/src/ui/widget/combo-box-entry-tool-item.cpp
632 ++++ b/src/ui/widget/combo-box-entry-tool-item.cpp
633 +@@ -74,8 +74,8 @@ ComboBoxEntryToolItem::ComboBoxEntryToolItem(Glib::ustring name,
634 + set_name(name);
635 +
636 + gchar *action_name = g_strdup( get_name().c_str() );
637 +- gchar *combobox_name = g_strjoin( nullptr, action_name, "_combobox", NULL );
638 +- gchar *entry_name = g_strjoin( nullptr, action_name, "_entry", NULL );
639 ++ gchar *combobox_name = g_strjoin( nullptr, action_name, "_combobox", nullptr );
640 ++ gchar *entry_name = g_strjoin( nullptr, action_name, "_entry", nullptr );
641 + g_free( action_name );
642 +
643 + GtkWidget* comboBoxEntry = gtk_combo_box_new_with_model_and_entry (_model);
644 +diff --git a/src/ui/widget/marker-combo-box.cpp b/src/ui/widget/marker-combo-box.cpp
645 +index 6ecc77be14..82199c547d 100644
646 +--- a/src/ui/widget/marker-combo-box.cpp
647 ++++ b/src/ui/widget/marker-combo-box.cpp
648 +@@ -201,7 +201,7 @@ const gchar * MarkerComboBox::get_active_marker_uri()
649 + gchar *markurn;
650 + if (stockid)
651 + {
652 +- markurn = g_strconcat("urn:inkscape:marker:",markid,NULL);
653 ++ markurn = g_strconcat("urn:inkscape:marker:",markid,nullptr);
654 + }
655 + else
656 + {
657 +@@ -211,7 +211,7 @@ const gchar * MarkerComboBox::get_active_marker_uri()
658 + g_free(markurn);
659 + if (mark) {
660 + Inkscape::XML::Node *repr = mark->getRepr();
661 +- marker = g_strconcat("url(#", repr->attribute("id"), ")", NULL);
662 ++ marker = g_strconcat("url(#", repr->attribute("id"), ")", nullptr);
663 + }
664 + } else {
665 + marker = g_strdup(markid);
666 +@@ -366,7 +366,7 @@ void MarkerComboBox::add_markers (std::vector<SPMarker *> const& marker_list, SP
667 + void
668 + MarkerComboBox::update_marker_image(gchar const *mname)
669 + {
670 +- gchar *cache_name = g_strconcat(combo_id, mname, NULL);
671 ++ gchar *cache_name = g_strconcat(combo_id, mname, nullptr);
672 + Glib::ustring key = svg_preview_cache.cache_key(doc->getDocumentURI(), cache_name, 24);
673 + g_free (cache_name);
674 + svg_preview_cache.remove_preview_from_cache(key);
675 +@@ -403,7 +403,7 @@ MarkerComboBox::create_marker_image(unsigned psize, gchar const *mname,
676 + }
677 +
678 + /* Get from cache right away */
679 +- gchar *cache_name = g_strconcat(combo_id, mname, NULL);
680 ++ gchar *cache_name = g_strconcat(combo_id, mname, nullptr);
681 + Glib::ustring key = svg_preview_cache.cache_key(source->getDocumentURI(), cache_name, psize);
682 + g_free (cache_name);
683 + GdkPixbuf *pixbuf = svg_preview_cache.get_preview_from_cache(key); // no ref created
684 +diff --git a/src/ui/widget/paint-selector.cpp b/src/ui/widget/paint-selector.cpp
685 +index 26a5a56032..d196654f2b 100644
686 +--- a/src/ui/widget/paint-selector.cpp
687 ++++ b/src/ui/widget/paint-selector.cpp
688 +@@ -878,7 +878,7 @@ void PaintSelector::set_mode_mesh(PaintSelector::Mode mode)
689 + GtkCellRenderer *renderer = gtk_cell_renderer_text_new();
690 + gtk_cell_renderer_set_padding(renderer, 2, 0);
691 + gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), renderer, TRUE);
692 +- gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo), renderer, "text", COMBO_COL_LABEL, NULL);
693 ++ gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo), renderer, "text", COMBO_COL_LABEL, nullptr);
694 +
695 + ink_mesh_menu(combo);
696 + g_signal_connect(G_OBJECT(combo), "changed", G_CALLBACK(PaintSelector::mesh_change), this);
697 +@@ -947,7 +947,7 @@ SPMeshGradient *PaintSelector::getMeshGradient()
698 +
699 + gchar *mesh_name;
700 + if (stockid) {
701 +- mesh_name = g_strconcat("urn:inkscape:mesh:", meshid, NULL);
702 ++ mesh_name = g_strconcat("urn:inkscape:mesh:", meshid, nullptr);
703 + } else {
704 + mesh_name = g_strdup(meshid);
705 + }
706 +@@ -1202,7 +1202,7 @@ void PaintSelector::set_mode_pattern(PaintSelector::Mode mode)
707 + GtkCellRenderer *renderer = gtk_cell_renderer_text_new();
708 + gtk_cell_renderer_set_padding(renderer, 2, 0);
709 + gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(_patternmenu), renderer, TRUE);
710 +- gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(_patternmenu), renderer, "text", COMBO_COL_LABEL, NULL);
711 ++ gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(_patternmenu), renderer, "text", COMBO_COL_LABEL, nullptr);
712 +
713 + ink_pattern_menu(_patternmenu);
714 + g_signal_connect(G_OBJECT(_patternmenu), "changed", G_CALLBACK(PaintSelector::pattern_change), this);
715 +@@ -1298,7 +1298,7 @@ SPPattern *PaintSelector::getPattern()
716 + gchar *paturn;
717 +
718 + if (stockid) {
719 +- paturn = g_strconcat("urn:inkscape:pattern:", patid, NULL);
720 ++ paturn = g_strconcat("urn:inkscape:pattern:", patid, nullptr);
721 + } else {
722 + paturn = g_strdup(patid);
723 + }
724 +diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
725 +index 5a018301de..7a5607b57c 100644
726 +--- a/src/widgets/desktop-widget.cpp
727 ++++ b/src/widgets/desktop-widget.cpp
728 +@@ -612,8 +612,8 @@ void SPDesktopWidget::on_realize()
729 + GtkSettings *settings = gtk_settings_get_default();
730 + Gtk::Container *window = get_toplevel();
731 + if (settings && window) {
732 +- g_object_get(settings, "gtk-theme-name", &gtkThemeName, NULL);
733 +- g_object_get(settings, "gtk-application-prefer-dark-theme", &gtkApplicationPreferDarkTheme, NULL);
734 ++ g_object_get(settings, "gtk-theme-name", &gtkThemeName, nullptr);
735 ++ g_object_get(settings, "gtk-application-prefer-dark-theme", &gtkApplicationPreferDarkTheme, nullptr);
736 + bool dark = isCurrentThemeDark(dynamic_cast<Gtk::Container *>(window));
737 + if (dark) {
738 + prefs->setBool("/theme/darkTheme", true);
739 +diff --git a/src/widgets/sp-xmlview-tree.cpp b/src/widgets/sp-xmlview-tree.cpp
740 +index b07ce2475e..67b0e9094b 100644
741 +--- a/src/widgets/sp-xmlview-tree.cpp
742 ++++ b/src/widgets/sp-xmlview-tree.cpp
743 +@@ -164,7 +164,7 @@ GtkWidget *sp_xmlview_tree_new(Inkscape::XML::Node * repr, void * /*factory*/, v
744 + gtk_tree_view_set_search_equal_func (GTK_TREE_VIEW(tree), search_equal_func, nullptr, nullptr);
745 +
746 + GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
747 +- GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes ("", renderer, "text", STORE_TEXT_COL, NULL);
748 ++ GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes ("", renderer, "text", STORE_TEXT_COL, nullptr);
749 + gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column);
750 + gtk_cell_renderer_set_padding (renderer, 2, 0);
751 + gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
752 +diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp
753 +index f3cbdcb8f3..d891f07e09 100644
754 +--- a/src/xml/repr-io.cpp
755 ++++ b/src/xml/repr-io.cpp
756 +@@ -449,7 +449,7 @@ void promote_to_namespace(Node *repr, const gchar *prefix) {
757 + if ( repr->type() == Inkscape::XML::NodeType::ELEMENT_NODE ) {
758 + GQuark code = repr->code();
759 + if (!qname_prefix(code).id()) {
760 +- gchar *svg_name = g_strconcat(prefix, ":", g_quark_to_string(code), NULL);
761 ++ gchar *svg_name = g_strconcat(prefix, ":", g_quark_to_string(code), nullptr);
762 + repr->setCodeUnsafe(g_quark_from_string(svg_name));
763 + g_free(svg_name);
764 + }
765 +--
766 +2.31.1
767 +
768
769 diff --git a/media-gfx/inkscape/inkscape-1.1.ebuild b/media-gfx/inkscape/inkscape-1.1.ebuild
770 new file mode 100644
771 index 00000000000..642643d65ca
772 --- /dev/null
773 +++ b/media-gfx/inkscape/inkscape-1.1.ebuild
774 @@ -0,0 +1,162 @@
775 +# Copyright 1999-2021 Gentoo Authors
776 +# Distributed under the terms of the GNU General Public License v2
777 +
778 +EAPI=7
779 +
780 +PYTHON_COMPAT=( python3_{8,9} )
781 +PYTHON_REQ_USE="xml"
782 +
783 +inherit cmake flag-o-matic xdg toolchain-funcs python-single-r1
784 +
785 +DESCRIPTION="SVG based generic vector-drawing program"
786 +HOMEPAGE="https://inkscape.org/"
787 +SRC_URI="https://media.inkscape.org/dl/resources/file/${P}.tar.xz"
788 +
789 +LICENSE="GPL-2 LGPL-2.1"
790 +SLOT="0"
791 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
792 +IUSE="cdr dbus dia exif graphicsmagick imagemagick inkjar jemalloc jpeg lcms
793 +openmp postscript readline spell static-libs svg2 visio wpg"
794 +
795 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
796 +
797 +BDEPEND="
798 + dev-util/glib-utils
799 + >=dev-util/intltool-0.40
800 + >=sys-devel/gettext-0.17
801 + virtual/pkgconfig
802 +"
803 +COMMON_DEPEND="${PYTHON_DEPS}
804 + >=app-text/poppler-0.57.0:=[cairo]
805 + >=dev-cpp/cairomm-1.12:0
806 + >=dev-cpp/glibmm-2.54.1:2
807 + dev-cpp/gtkmm:3.0
808 + >=dev-cpp/pangomm-2.40:1.4
809 + >=dev-libs/boehm-gc-7.1:=
810 + dev-libs/double-conversion:=
811 + >=dev-libs/glib-2.41
812 + >=dev-libs/libsigc++-2.8:2
813 + >=dev-libs/libxml2-2.7.4
814 + >=dev-libs/libxslt-1.1.25
815 + dev-libs/gdl:3
816 + dev-libs/popt
817 + media-gfx/potrace
818 + media-libs/fontconfig
819 + media-libs/freetype:2
820 + media-libs/libpng:0=
821 + net-libs/libsoup:2.4
822 + sci-libs/gsl:=
823 + x11-libs/libX11
824 + >=x11-libs/pango-1.37.2
825 + x11-libs/gtk+:3
826 + $(python_gen_cond_dep '
827 + dev-python/lxml[${PYTHON_USEDEP}]
828 + media-gfx/scour[${PYTHON_USEDEP}]
829 + ')
830 + cdr? (
831 + app-text/libwpg:0.3
832 + dev-libs/librevenge
833 + media-libs/libcdr
834 + )
835 + dbus? ( dev-libs/dbus-glib )
836 + exif? ( media-libs/libexif )
837 + imagemagick? (
838 + !graphicsmagick? ( media-gfx/imagemagick:=[cxx] )
839 + graphicsmagick? ( media-gfx/graphicsmagick:=[cxx] )
840 + )
841 + jemalloc? ( dev-libs/jemalloc )
842 + jpeg? ( virtual/jpeg:0 )
843 + lcms? ( media-libs/lcms:2 )
844 + readline? ( sys-libs/readline:= )
845 + spell? ( app-text/gspell )
846 + visio? (
847 + app-text/libwpg:0.3
848 + dev-libs/librevenge
849 + media-libs/libvisio
850 + )
851 + wpg? (
852 + app-text/libwpg:0.3
853 + dev-libs/librevenge
854 + )
855 +"
856 +# These only use executables provided by these packages
857 +# See share/extensions for more details. inkscape can tell you to
858 +# install these so we could of course just not depend on those and rely
859 +# on that.
860 +RDEPEND="${COMMON_DEPEND}
861 + $(python_gen_cond_dep '
862 + dev-python/numpy[${PYTHON_USEDEP}]
863 + ')
864 + dia? ( app-office/dia )
865 + postscript? ( app-text/ghostscript-gpl )
866 +"
867 +DEPEND="${COMMON_DEPEND}
868 + >=dev-libs/boost-1.65
869 +"
870 +
871 +RESTRICT="test"
872 +
873 +S="${WORKDIR}/${P}_2021-05-24_c4e8f9ed74"
874 +
875 +PATCHES=(
876 + "${FILESDIR}/${P}-sentinels.patch" # 1.1 is the last affected version, it is already fixed in upstream
877 +)
878 +
879 +pkg_pretend() {
880 + if [[ ${MERGE_TYPE} != binary ]] && use openmp; then
881 + tc-has-openmp || die "Please switch to an openmp compatible compiler"
882 + fi
883 +}
884 +
885 +src_prepare() {
886 + cmake_src_prepare
887 + sed -i "/install.*COPYING/d" CMakeScripts/ConfigCPack.cmake || die
888 +}
889 +
890 +src_configure() {
891 + # aliasing unsafe wrt #310393
892 + append-flags -fno-strict-aliasing
893 +
894 + local mycmakeargs=(
895 + # -DWITH_LPETOOL # Compile with LPE Tool and experimental LPEs enabled
896 + -DWITH_NLS=ON
897 + -DENABLE_POPPLER=ON
898 + -DENABLE_POPPLER_CAIRO=ON
899 + -DWITH_PROFILING=OFF
900 + -DBUILD_TESTING=OFF
901 + -DWITH_LIBCDR=$(usex cdr)
902 + -DWITH_DBUS=$(usex dbus)
903 + -DWITH_IMAGE_MAGICK=$(usex imagemagick $(usex !graphicsmagick)) # requires ImageMagick 6, only IM must be enabled
904 + -DWITH_GRAPHICS_MAGICK=$(usex graphicsmagick $(usex imagemagick)) # both must be enabled to use GraphicsMagick
905 + -DWITH_GNU_READLINE=$(usex readline)
906 + -DWITH_GSPELL=$(usex spell)
907 + -DWITH_JEMALLOC=$(usex jemalloc)
908 + -DENABLE_LCMS=$(usex lcms)
909 + -DWITH_OPENMP=$(usex openmp)
910 + -DBUILD_SHARED_LIBS=$(usex !static-libs)
911 + -DWITH_SVG2=$(usex svg2)
912 + -DWITH_LIBVISIO=$(usex visio)
913 + -DWITH_LIBWPG=$(usex wpg)
914 + )
915 +
916 + cmake_src_configure
917 +}
918 +
919 +src_install() {
920 + cmake_src_install
921 +
922 + find "${ED}" -type f -name "*.la" -delete || die
923 +
924 + find "${ED}"/usr/share/man -type f -maxdepth 3 -name '*.bz2' -exec bzip2 -d {} \; || die
925 +
926 + find "${ED}"/usr/share/man -type f -maxdepth 3 -name '*.gz' -exec gzip -d {} \; || die
927 +
928 + local extdir="${ED}"/usr/share/${PN}/extensions
929 +
930 + if [[ -e "${extdir}" ]] && [[ -n $(find "${extdir}" -mindepth 1) ]]; then
931 + python_optimize "${ED}"/usr/share/${PN}/extensions
932 + fi
933 +
934 + # Empty directory causes sandbox issues, see bug #761915
935 + rm -r "${ED}/usr/share/inkscape/fonts" || die "Failed to remove fonts directory."
936 +}