summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/at-spi2-core-meson-compat.patch18
-rw-r--r--gnu/packages/patches/bind-fix-unused-pk11-ecc-constants.patch43
-rw-r--r--gnu/packages/patches/borg-fix-hard-link-preloading.patch157
-rw-r--r--gnu/packages/patches/calibre-remove-test-bs4.patch34
-rw-r--r--gnu/packages/patches/calibre-remove-test-sqlite.patch29
-rw-r--r--gnu/packages/patches/calibre-remove-test-unrar.patch28
-rw-r--r--gnu/packages/patches/calibre-use-packaged-feedparser.patch51
-rw-r--r--gnu/packages/patches/efl-mesa-compat.patch21
-rw-r--r--gnu/packages/patches/gcc-8-cross-environment-variables.patch67
-rw-r--r--gnu/packages/patches/gcc-9-asan-fix-limits-include.patch13
-rw-r--r--gnu/packages/patches/gcc-9-strmov-store-file-names.patch114
-rw-r--r--gnu/packages/patches/gnome-tweaks-search-paths.patch (renamed from gnu/packages/patches/gnome-tweak-tool-search-paths.patch)4
-rw-r--r--gnu/packages/patches/gst-plugins-good-libvpx-compat.patch58
-rw-r--r--gnu/packages/patches/ocaml-piqilib-Update-base64.patch46
-rw-r--r--gnu/packages/patches/slim-display.patch75
-rw-r--r--gnu/packages/patches/upower-builddir.patch24
-rw-r--r--gnu/packages/patches/webkitgtk-sans-gstreamer-gl.patch24
-rw-r--r--gnu/packages/patches/webkitgtk-sse2.patch202
-rw-r--r--gnu/packages/patches/xf86-video-voodoo-pcitag.patch34
-rw-r--r--gnu/packages/patches/xorriso-no-mbr-in-inner-efi.patch47
-rw-r--r--gnu/packages/patches/xorriso-no-partition-table-in-inner-efi.patch107
21 files changed, 778 insertions, 418 deletions
diff --git a/gnu/packages/patches/at-spi2-core-meson-compat.patch b/gnu/packages/patches/at-spi2-core-meson-compat.patch
deleted file mode 100644
index 168a31b4ed..0000000000
--- a/gnu/packages/patches/at-spi2-core-meson-compat.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Fix build with Meson 0.50.0 and above.
-
-Taken from upstream repository:
-https://gitlab.gnome.org/GNOME/at-spi2-core/commit/44a812ea51223d82f21a098a2d45fcc5c329ce7a
-
-diff --git a/atspi/meson.build b/atspi/meson.build
-index b7a9357df1c4857dffa2ec123cd3073e67a07fea..2a6915d76202dabf923b50e6a8b85cbb83cb43d0 100644
---- a/atspi/meson.build
-+++ b/atspi/meson.build
-@@ -57,7 +57,7 @@ atspi_headers = [
- 
- atspi_includedir = join_paths(get_option('prefix'), get_option('includedir'), 'at-spi-2.0', 'atspi')
- 
--install_headers(atspi_headers, subdir: atspi_includedir)
-+install_headers(atspi_headers, install_dir: atspi_includedir)
- 
- atspi_enums = gnome.mkenums('atspi-enum-types',
-                             sources: [ 'atspi-constants.h', 'atspi-types.h' ],
diff --git a/gnu/packages/patches/bind-fix-unused-pk11-ecc-constants.patch b/gnu/packages/patches/bind-fix-unused-pk11-ecc-constants.patch
deleted file mode 100644
index ab7cc83684..0000000000
--- a/gnu/packages/patches/bind-fix-unused-pk11-ecc-constants.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From: Tobias Geerinckx-Rice <me@tobias.gr>
-Date: Thu, 25 Apr 2019 04:36:52 +0200
-Subject: [PATCH] gnu: bind: Fix unused PKCS#11 ECC constants.
-
-Without this patch, the build fails:
-
-  pkcs11-keygen.c: In function ‘main’:
-  pkcs11-keygen.c:424:32: error: ‘pk11_ecc_prime256v1’ undeclared (first use in this function)
-      public_template[4].pValue = pk11_ecc_prime256v1;
-                                  ^
-  pkcs11-keygen.c:424:32: note: each undeclared identifier is reported only once for each function it appears in
-  pkcs11-keygen.c:428:32: error: ‘pk11_ecc_secp384r1’ undeclared (first use in this function)
-      public_template[4].pValue = pk11_ecc_secp384r1;
-                                  ^
-  make[2]: *** [Makefile:217: pkcs11-keygen.o] Error 1
-
-Fix copied verbatim from upstream[0].
-
-[0]: https://gitlab.isc.org/isc-projects/bind9/issues/935
-
----
---- orig-bind-9.11.6/bin/pkcs11/pkcs11-keygen.c	2019-02-27 15:28:15.000000000 -0800
-+++ bind-9.11.6/bin/pkcs11/pkcs11-keygen.c	2019-03-11 09:20:50.955257469 -0700
-@@ -403,6 +403,10 @@
- 		public_template[RSA_PUBLIC_EXPONENT].ulValueLen = expsize;
- 		break;
- 	case key_ecc:
-+#if !defined(HAVE_PKCS11_ECDSA)
-+		fprintf(stderr, "prime256v1 and secp3841r1 is not supported\n");
-+		usage();
-+#else
- 		op_type = OP_EC;
- 		if (bits == 0)
- 			bits = 256;
-@@ -429,7 +433,7 @@
- 			public_template[4].ulValueLen =
- 				sizeof(pk11_ecc_secp384r1);
- 		}
--
-+#endif
- 		break;
- 	case key_ecx:
- #if !defined(CKM_EDDSA_KEY_PAIR_GEN)
diff --git a/gnu/packages/patches/borg-fix-hard-link-preloading.patch b/gnu/packages/patches/borg-fix-hard-link-preloading.patch
new file mode 100644
index 0000000000..92a4e22674
--- /dev/null
+++ b/gnu/packages/patches/borg-fix-hard-link-preloading.patch
@@ -0,0 +1,157 @@
+Fix a bug that would cause the test suite to hang:
+
+https://github.com/borgbackup/borg/issues/4350
+
+Patch copied from upstream source repository:
+
+https://github.com/borgbackup/borg/commit/18242ab9e2f26c450b8507aa1d5eceadab8ad027
+
+From 18242ab9e2f26c450b8507aa1d5eceadab8ad027 Mon Sep 17 00:00:00 2001
+From: Thomas Waldmann <tw@waldmann-edv.de>
+Date: Thu, 2 May 2019 21:02:26 +0200
+Subject: [PATCH] preload chunks for hardlink slaves w/o preloaded master,
+ fixes #4350
+
+also split the hardlink extraction test into 2 tests.
+
+(cherry picked from commit f33f318d816505161d1449a02ddfdeb97d6fe80a)
+---
+ src/borg/archive.py            | 42 +++++++++++++++++++++++++++++-----
+ src/borg/archiver.py           |  5 ++--
+ src/borg/testsuite/archiver.py | 20 +++++++++-------
+ 3 files changed, 51 insertions(+), 16 deletions(-)
+
+diff --git a/src/borg/archive.py b/src/borg/archive.py
+index adc1f42c..0793672a 100644
+--- a/src/borg/archive.py
++++ b/src/borg/archive.py
+@@ -192,7 +192,7 @@ def __init__(self, repository, key):
+         self.repository = repository
+         self.key = key
+ 
+-    def unpack_many(self, ids, filter=None, preload=False):
++    def unpack_many(self, ids, filter=None, partial_extract=False, preload=False, hardlink_masters=None):
+         """
+         Return iterator of items.
+ 
+@@ -209,12 +209,40 @@ def unpack_many(self, ids, filter=None, preload=False):
+             for item in items:
+                 if 'chunks' in item:
+                     item.chunks = [ChunkListEntry(*e) for e in item.chunks]
++
++            def preload(chunks):
++                self.repository.preload([c.id for c in chunks])
++
+             if filter:
+                 items = [item for item in items if filter(item)]
++
+             if preload:
+-                for item in items:
+-                    if 'chunks' in item:
+-                        self.repository.preload([c.id for c in item.chunks])
++                if filter and partial_extract:
++                    # if we do only a partial extraction, it gets a bit
++                    # complicated with computing the preload items: if a hardlink master item is not
++                    # selected (== not extracted), we will still need to preload its chunks if a
++                    # corresponding hardlink slave is selected (== is extracted).
++                    # due to a side effect of the filter() call, we now have hardlink_masters dict populated.
++                    masters_preloaded = set()
++                    for item in items:
++                        if 'chunks' in item:  # regular file, maybe a hardlink master
++                            preload(item.chunks)
++                            # if this is a hardlink master, remember that we already preloaded it:
++                            if 'source' not in item and hardlinkable(item.mode) and item.get('hardlink_master', True):
++                                masters_preloaded.add(item.path)
++                        elif 'source' in item and hardlinkable(item.mode):  # hardlink slave
++                            source = item.source
++                            if source not in masters_preloaded:
++                                # we only need to preload *once* (for the 1st selected slave)
++                                chunks, _ = hardlink_masters[source]
++                                preload(chunks)
++                                masters_preloaded.add(source)
++                else:
++                    # easy: we do not have a filter, thus all items are selected, thus we need to preload all chunks.
++                    for item in items:
++                        if 'chunks' in item:
++                            preload(item.chunks)
++
+             for item in items:
+                 yield item
+ 
+@@ -433,8 +461,10 @@ def item_filter(self, item, filter=None):
+             return False
+         return filter(item) if filter else True
+ 
+-    def iter_items(self, filter=None, preload=False):
+-        for item in self.pipeline.unpack_many(self.metadata.items, preload=preload,
++    def iter_items(self, filter=None, partial_extract=False, preload=False, hardlink_masters=None):
++        assert not (filter and partial_extract and preload) or hardlink_masters is not None
++        for item in self.pipeline.unpack_many(self.metadata.items, partial_extract=partial_extract,
++                                              preload=preload, hardlink_masters=hardlink_masters,
+                                               filter=lambda item: self.item_filter(item, filter)):
+             yield item
+ 
+diff --git a/src/borg/archiver.py b/src/borg/archiver.py
+index 957959d6..dcc20455 100644
+--- a/src/borg/archiver.py
++++ b/src/borg/archiver.py
+@@ -755,7 +755,8 @@ def peek_and_store_hardlink_masters(item, matched):
+         else:
+             pi = None
+ 
+-        for item in archive.iter_items(filter, preload=True):
++        for item in archive.iter_items(filter, partial_extract=partial_extract,
++                                       preload=True, hardlink_masters=hardlink_masters):
+             orig_path = item.path
+             if strip_components:
+                 item.path = os.sep.join(orig_path.split(os.sep)[strip_components:])
+@@ -997,7 +998,7 @@ def item_to_tarinfo(item, original_path):
+                 return None, stream
+             return tarinfo, stream
+ 
+-        for item in archive.iter_items(filter, preload=True):
++        for item in archive.iter_items(filter, preload=True, hardlink_masters=hardlink_masters):
+             orig_path = item.path
+             if strip_components:
+                 item.path = os.sep.join(orig_path.split(os.sep)[strip_components:])
+diff --git a/src/borg/testsuite/archiver.py b/src/borg/testsuite/archiver.py
+index c35ad800..935b3d79 100644
+--- a/src/borg/testsuite/archiver.py
++++ b/src/borg/testsuite/archiver.py
+@@ -823,7 +823,18 @@ def test_mount_hardlinks(self):
+             assert open('input/dir1/subdir/hardlink', 'rb').read() == b'123456'
+ 
+     @requires_hardlinks
+-    def test_extract_hardlinks(self):
++    def test_extract_hardlinks1(self):
++        self._extract_hardlinks_setup()
++        with changedir('output'):
++            self.cmd('extract', self.repository_location + '::test')
++            assert os.stat('input/source').st_nlink == 4
++            assert os.stat('input/abba').st_nlink == 4
++            assert os.stat('input/dir1/hardlink').st_nlink == 4
++            assert os.stat('input/dir1/subdir/hardlink').st_nlink == 4
++            assert open('input/dir1/subdir/hardlink', 'rb').read() == b'123456'
++
++    @requires_hardlinks
++    def test_extract_hardlinks2(self):
+         self._extract_hardlinks_setup()
+         with changedir('output'):
+             self.cmd('extract', self.repository_location + '::test', '--strip-components', '2')
+@@ -839,13 +850,6 @@ def test_extract_hardlinks(self):
+             assert open('input/dir1/subdir/hardlink', 'rb').read() == b'123456'
+             assert os.stat('input/dir1/aaaa').st_nlink == 2
+             assert os.stat('input/dir1/source2').st_nlink == 2
+-        with changedir('output'):
+-            self.cmd('extract', self.repository_location + '::test')
+-            assert os.stat('input/source').st_nlink == 4
+-            assert os.stat('input/abba').st_nlink == 4
+-            assert os.stat('input/dir1/hardlink').st_nlink == 4
+-            assert os.stat('input/dir1/subdir/hardlink').st_nlink == 4
+-            assert open('input/dir1/subdir/hardlink', 'rb').read() == b'123456'
+ 
+     def test_extract_include_exclude(self):
+         self.cmd('init', '--encryption=repokey', self.repository_location)
+-- 
+2.21.0
+
diff --git a/gnu/packages/patches/calibre-remove-test-bs4.patch b/gnu/packages/patches/calibre-remove-test-bs4.patch
new file mode 100644
index 0000000000..77dd45d329
--- /dev/null
+++ b/gnu/packages/patches/calibre-remove-test-bs4.patch
@@ -0,0 +1,34 @@
+In my efforts to fix all Calibre tests, this test would always complain about
+backports.functools_lru_cache not existing even after I packaged and added
+python2-soupsieve as an input and confirmed it was in the
+PYTHONPATH. Currently Calibre does not actually use it for anything other than
+testing it's there, so I assume they will start using it in future Calibre
+versions.
+
+From 2738dd42caebe55326c76922a12ba8740bdb22e7 Mon Sep 17 00:00:00 2001
+From: Brendan Tildesley <mail@brendan.scot>
+Date: Sat, 27 Apr 2019 00:42:39 +1000
+Subject: [PATCH] Remove test_bs4
+
+---
+ src/calibre/test_build.py | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/src/calibre/test_build.py b/src/calibre/test_build.py
+index 73f1172e8c..07bdffd3e5 100644
+--- a/src/calibre/test_build.py
++++ b/src/calibre/test_build.py
+@@ -73,10 +73,6 @@ class BuildTest(unittest.TestCase):
+         from html5_parser import parse
+         parse('<p>xxx')
+ 
+-    def test_bs4(self):
+-        import soupsieve, bs4
+-        del soupsieve, bs4
+-
+     def test_zeroconf(self):
+         if ispy3:
+             import zeroconf as z, ifaddr
+-- 
+2.21.0
+
diff --git a/gnu/packages/patches/calibre-remove-test-sqlite.patch b/gnu/packages/patches/calibre-remove-test-sqlite.patch
new file mode 100644
index 0000000000..7bdd90874d
--- /dev/null
+++ b/gnu/packages/patches/calibre-remove-test-sqlite.patch
@@ -0,0 +1,29 @@
+From a92e26359bd07743ab105819ed0b619e27e14017 Mon Sep 17 00:00:00 2001
+From: Brendan Tildesley <mail@brendan.scot>
+Date: Sat, 27 Apr 2019 03:30:53 +1000
+Subject: [PATCH] Disable test_sqlite.
+
+---
+ src/calibre/test_build.py | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/src/calibre/test_build.py b/src/calibre/test_build.py
+index 07bdffd3e5..740588c95b 100644
+--- a/src/calibre/test_build.py
++++ b/src/calibre/test_build.py
+@@ -162,12 +162,6 @@ class BuildTest(unittest.TestCase):
+             au(x, 'strftime')
+             self.assertEqual(unicode_type(time.strftime(fmt.replace('%e', '%#d'), t)), x)
+ 
+-    def test_sqlite(self):
+-        import sqlite3
+-        conn = sqlite3.connect(':memory:')
+-        from calibre.library.sqlite import load_c_extensions
+-        self.assertTrue(load_c_extensions(conn, True), 'Failed to load sqlite extension')
+-
+     def test_apsw(self):
+         import apsw
+         conn = apsw.Connection(':memory:')
+-- 
+2.21.0
+
diff --git a/gnu/packages/patches/calibre-remove-test-unrar.patch b/gnu/packages/patches/calibre-remove-test-unrar.patch
new file mode 100644
index 0000000000..4e5572d1a6
--- /dev/null
+++ b/gnu/packages/patches/calibre-remove-test-unrar.patch
@@ -0,0 +1,28 @@
+Unrar contains security vulnerabilities and has thus been removed from Guix.
+From a16f97b02bd8afd0ec05c471e156f631f2cc6eec Mon Sep 17 00:00:00 2001
+From: Brendan Tildesley <mail@brendan.scot>
+Date: Tue, 26 Mar 2019 22:17:03 +1100
+Subject: [PATCH] Remove test_unrar.
+
+---
+ src/calibre/test_build.py | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/src/calibre/test_build.py b/src/calibre/test_build.py
+index d67afd20a6..709132ef17 100644
+--- a/src/calibre/test_build.py
++++ b/src/calibre/test_build.py
+@@ -220,10 +220,6 @@ class BuildTest(unittest.TestCase):
+         from calibre.gui2.win_file_dialogs import test
+         test()
+ 
+-    def test_unrar(self):
+-        from calibre.utils.unrar import test_basic
+-        test_basic()
+-
+     @unittest.skipUnless(iswindows, 'WPD is windows only')
+     def test_wpd(self):
+         wpd = plugins['wpd'][0]
+-- 
+2.21.0
+
diff --git a/gnu/packages/patches/calibre-use-packaged-feedparser.patch b/gnu/packages/patches/calibre-use-packaged-feedparser.patch
deleted file mode 100644
index 8f4bbc8248..0000000000
--- a/gnu/packages/patches/calibre-use-packaged-feedparser.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From: Martin Pitt <mpitt@debian.org>
-Date: Mon, 14 Nov 2016 22:41:23 +0100
-Subject: Use packaged instead of bundled feedparser Python module
-
----
- recipes/lenta_ru.recipe           | 4 +++-
- src/calibre/web/feeds/__init__.py | 4 +++-
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/recipes/lenta_ru.recipe b/recipes/lenta_ru.recipe
-index aa4dac4..4b6710c 100644
---- a/recipes/lenta_ru.recipe
-+++ b/recipes/lenta_ru.recipe
-@@ -4,11 +4,13 @@
- Lenta.ru
- '''
- 
--from calibre.web.feeds.feedparser import parse
- from calibre.ebooks.BeautifulSoup import Tag
- from calibre.web.feeds.news import BasicNewsRecipe
-+from feedparser import parse
-+from functools import partial
- import re
- 
-+parse = partial(parse, agent='Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11')
- 
- class LentaRURecipe(BasicNewsRecipe):
-     title = u'Lenta.ru: \u041d\u043e\u0432\u043e\u0441\u0442\u0438'
-diff --git a/src/calibre/web/feeds/__init__.py b/src/calibre/web/feeds/__init__.py
-index 8c9d748..f262604 100644
---- a/src/calibre/web/feeds/__init__.py
-+++ b/src/calibre/web/feeds/__init__.py
-@@ -11,7 +11,10 @@ from calibre.utils.logging import default_log
- from calibre import entity_to_unicode, strftime, force_unicode
- from calibre.utils.date import dt_factory, utcnow, local_tz
- from calibre.utils.cleantext import clean_ascii_chars, clean_xml_chars
-+from feedparser import parse
-+from functools import partial
- 
-+parse = partial(parse, agent='Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11')
- 
- class Article(object):
- 
-@@ -334,7 +337,6 @@ def feed_from_xml(raw_xml, title=None, oldest_article=7,
-                   max_articles_per_feed=100,
-                   get_article_url=lambda item: item.get('link', None),
-                   log=default_log):
--    from calibre.web.feeds.feedparser import parse
-     # Handle unclosed escaped entities. They trip up feedparser and HBR for one
-     # generates them
-     raw_xml = re.sub(r'(&amp;#\d+)([^0-9;])', r'\1;\2', raw_xml)
diff --git a/gnu/packages/patches/efl-mesa-compat.patch b/gnu/packages/patches/efl-mesa-compat.patch
deleted file mode 100644
index 6fe7b38428..0000000000
--- a/gnu/packages/patches/efl-mesa-compat.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Fix build on 32-bit architectures with Mesa 18.3.  Patch taken from upstream:
-
-https://git.enlightenment.org/core/efl.git/commit/?id=0d2b624f1e24240a1c4e651aa1cfe9a8dd10a573
-
-diff --git a/src/lib/evas/Evas_GL.h b/src/lib/evas/Evas_GL.h
-index b6b642400f..4f67b1695f 100644
---- a/src/lib/evas/Evas_GL.h
-+++ b/src/lib/evas/Evas_GL.h
-@@ -4272,9 +4272,11 @@ typedef signed int       GLfixed;      // Changed khronos_int32_t
- 
- #ifndef GL_ES_VERSION_2_0
- /* GL types for handling large vertex buffer objects */
--#include <stddef.h>
-+# ifndef GL_VERSION_1_5
-+#  include <stddef.h>
- typedef ptrdiff_t GLintptr;     // Changed khronos_intptr_t
- typedef ptrdiff_t GLsizeiptr;   // Changed khronos_ssize_t
-+# endif
- #endif
- 
- /* Some definitions from GLES 3.0.
diff --git a/gnu/packages/patches/gcc-8-cross-environment-variables.patch b/gnu/packages/patches/gcc-8-cross-environment-variables.patch
new file mode 100644
index 0000000000..0ebf5705c9
--- /dev/null
+++ b/gnu/packages/patches/gcc-8-cross-environment-variables.patch
@@ -0,0 +1,67 @@
+Search path environment variables for cross-compilers.  See the discussion
+at <http://gcc.gnu.org/ml/gcc/2013-02/msg00124.html>.
+
+Note: Touch 'C_INCLUDE_PATH' et al. rather than 'CPATH', as discussed
+at <http://bugs.gnu.org/22186>.
+
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index a716f708259..dc7862f413a 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -4342,7 +4342,7 @@ process_command (unsigned int decoded_options_count,
+     }
+
+   temp = env.get (LIBRARY_PATH_ENV);
+-  if (temp && *cross_compile == '0')
++  if (temp)
+     {
+       const char *startp, *endp;
+       char *nstore = (char *) alloca (strlen (temp) + 3);
+diff --git a/gcc/incpath.c b/gcc/incpath.c
+index b11c6a57939..a66a94a04e5 100644
+--- a/gcc/incpath.c
++++ b/gcc/incpath.c
+@@ -472,8 +472,8 @@ register_include_chains (cpp_reader *pfile, const char *sysroot,
+ 			 int stdinc, int cxx_stdinc, int verbose)
+ {
+   static const char *const lang_env_vars[] =
+-    { "C_INCLUDE_PATH", "CPLUS_INCLUDE_PATH",
+-      "OBJC_INCLUDE_PATH", "OBJCPLUS_INCLUDE_PATH" };
++    { "CROSS_C_INCLUDE_PATH", "CROSS_CPLUS_INCLUDE_PATH",
++      "CROSS_OBJC_INCLUDE_PATH", "CROSS_OBJCPLUS_INCLUDE_PATH" };
+   cpp_options *cpp_opts = cpp_get_options (pfile);
+   size_t idx = (cpp_opts->objc ? 2: 0);
+
+@@ -484,7 +484,7 @@ register_include_chains (cpp_reader *pfile, const char *sysroot,
+
+   /* CPATH and language-dependent environment variables may add to the
+      include chain.  */
+-  add_env_var_paths ("CPATH", INC_BRACKET);
++  add_env_var_paths ("CROSS_CPATH", INC_BRACKET);
+   add_env_var_paths (lang_env_vars[idx], INC_SYSTEM);
+
+   target_c_incpath.extra_pre_includes (sysroot, iprefix, stdinc);
+diff --git a/gcc/system.h b/gcc/system.h
+index 4abc321c71d..d6186476024 100644
+--- a/gcc/system.h
++++ b/gcc/system.h
+@@ -1209,4 +1209,6 @@ helper_const_non_const_cast (const char *p)
+ void qsort_chk (void *, size_t, size_t, int (*)(const void *, const void *));
+ #endif
+
++#define LIBRARY_PATH_ENV "CROSS_LIBRARY_PATH"
++
+ #endif /* ! GCC_SYSTEM_H */
+diff --git a/gcc/tlink.c b/gcc/tlink.c
+index ec20bd2fa0f..cd17bdce004 100644
+--- a/gcc/tlink.c
++++ b/gcc/tlink.c
+@@ -456,7 +456,7 @@ recompile_files (void)
+   file *f;
+
+   putenv (xstrdup ("COMPILER_PATH="));
+-  putenv (xstrdup ("LIBRARY_PATH="));
++  putenv (xstrdup (LIBRARY_PATH_ENV "="));
+
+   while ((f = file_pop ()) != NULL)
+     {
diff --git a/gnu/packages/patches/gcc-9-asan-fix-limits-include.patch b/gnu/packages/patches/gcc-9-asan-fix-limits-include.patch
new file mode 100644
index 0000000000..2f5ce7c697
--- /dev/null
+++ b/gnu/packages/patches/gcc-9-asan-fix-limits-include.patch
@@ -0,0 +1,13 @@
+diff --git a/libsanitizer/asan/asan_linux.cc b/libsanitizer/asan/asan_linux.cc
+index d92d0596b7c..7926536a0c3 100644
+--- a/libsanitizer/asan/asan_linux.cc
++++ b/libsanitizer/asan/asan_linux.cc
+@@ -30,7 +30,7 @@
+ #include <sys/types.h>
+ #include <dlfcn.h>
+ #include <fcntl.h>
+-#include <limits.h>
++#include <linux/limits.h>
+ #include <pthread.h>
+ #include <stdio.h>
+ #include <unistd.h>
diff --git a/gnu/packages/patches/gcc-9-strmov-store-file-names.patch b/gnu/packages/patches/gcc-9-strmov-store-file-names.patch
new file mode 100644
index 0000000000..6705e19534
--- /dev/null
+++ b/gnu/packages/patches/gcc-9-strmov-store-file-names.patch
@@ -0,0 +1,114 @@
+Make sure that statements such as:
+
+  strcpy (dst, "/gnu/store/…");
+
+or
+
+  static const char str[] = "/gnu/store/…";
+  …
+  strcpy (dst, str);
+
+do not result in chunked /gnu/store strings that are undetectable by
+Guix's GC and its grafting code.  See <https://bugs.gnu.org/24703>
+and <https://bugs.gnu.org/30395>.
+
+diff --git a/gcc/builtins.c b/gcc/builtins.c
+index d37d73fc4a0..dac33d9d29a 100644
+--- a/gcc/builtins.c
++++ b/gcc/builtins.c
+@@ -3282,6 +3282,58 @@ determine_block_size (tree len, rtx len_rtx,
+ 			  GET_MODE_MASK (GET_MODE (len_rtx)));
+ }
+
++extern void debug_tree (tree);
++
++/* Return true if STR contains the string "/gnu/store".  */
++
++bool
++store_reference_p (tree str)
++{
++  if (getenv ("GUIX_GCC_DEBUG") != NULL)
++    debug_tree (str);
++
++  if (TREE_CODE (str) == ADDR_EXPR)
++    str = TREE_OPERAND (str, 0);
++
++  if (TREE_CODE (str) == VAR_DECL
++      && TREE_STATIC (str)
++      && TREE_READONLY (str))
++    {
++      /* STR may be a 'static const' variable whose initial value
++         is a string constant.  See <https://bugs.gnu.org/30395>.  */
++      str = DECL_INITIAL (str);
++      if (str == NULL_TREE)
++        return false;
++    }
++
++  if (TREE_CODE (str) != STRING_CST)
++    return false;
++
++  int len;
++  const char *store;
++
++  store = getenv ("NIX_STORE") ? getenv ("NIX_STORE") : "/gnu/store";
++  len = strlen (store);
++
++  /* Size of the hash part of store file names, including leading slash and
++     trailing hyphen.  */
++  const int hash_len = 34;
++
++  if (TREE_STRING_LENGTH (str) < len + hash_len)
++    return false;
++
++  /* We cannot use 'strstr' because 'TREE_STRING_POINTER' returns a string
++     that is not necessarily NUL-terminated.  */
++
++  for (int i = 0; i < TREE_STRING_LENGTH (str) - (len + hash_len); i++)
++    {
++      if (strncmp (TREE_STRING_POINTER (str) + i, store, len) == 0)
++	return true;
++    }
++
++  return false;
++}
++
+ /* Try to verify that the sizes and lengths of the arguments to a string
+    manipulation function given by EXP are within valid bounds and that
+    the operation does not lead to buffer overflow or read past the end.
+@@ -3839,6 +3891,13 @@ expand_builtin_memory_copy_args (tree dest, tree src, tree len,
+   unsigned HOST_WIDE_INT max_size;
+   unsigned HOST_WIDE_INT probable_max_size;
+
++  /* Do not emit block moves, which translate to the 'movabs' instruction on
++     x86_64, when SRC refers to store items.  That way, store references
++     remain visible to the Guix GC and grafting code.  See
++     <https://bugs.gnu.org/24703>.  */
++  if (store_reference_p (src))
++    return NULL_RTX;
++
+   /* If DEST is not a pointer type, call the normal function.  */
+   if (dest_align == 0)
+     return NULL_RTX;
+diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
+index f30818042ee..56b592f9335 100644
+--- a/gcc/gimple-fold.c
++++ b/gcc/gimple-fold.c
+@@ -656,6 +656,8 @@ var_decl_component_p (tree var)
+ 	      && TREE_CODE (TREE_OPERAND (inner, 0)) == ADDR_EXPR));
+ }
+
++extern bool store_reference_p (tree);
++
+ /* Return TRUE if the SIZE argument, representing the size of an
+    object, is in a range of values of which exactly zero is valid.  */
+
+@@ -748,6 +750,9 @@ gimple_fold_builtin_memory_op (gimple_stmt_iterator *gsi,
+       off0 = build_int_cst (build_pointer_type_for_mode (char_type_node,
+ 							 ptr_mode, true), 0);
+
++      if (store_reference_p (src))
++        return false;
++
+       /* If we can perform the copy efficiently with first doing all loads
+          and then all stores inline it that way.  Currently efficiently
+ 	 means that we can load all the memory into a single integer
diff --git a/gnu/packages/patches/gnome-tweak-tool-search-paths.patch b/gnu/packages/patches/gnome-tweaks-search-paths.patch
index 027c61b3af..e7524fa675 100644
--- a/gnu/packages/patches/gnome-tweak-tool-search-paths.patch
+++ b/gnu/packages/patches/gnome-tweaks-search-paths.patch
@@ -1,4 +1,4 @@
-Gnome-tweak-tool does not look at GSETTINGS_SCHEMA_PATH or XDG_DATA_DIRS, it
+Gnome-tweaks does not look at GSETTINGS_SCHEMA_PATH or XDG_DATA_DIRS, it
 assumes that schemas are installed in one global directory
 (GSETTINGS_SCHEMA_DIR/gsettingsschemadir).
 
@@ -8,7 +8,7 @@ packages pick-up files using XDG_DATA_DIRS.
 Upstream ticket: https://bugzilla.gnome.org/show_bug.cgi?id=764537
 janneke@gnu.org
 
---- gnome-tweak-tool-3.18.1.orig/gtweak/gsettings.py	2015-04-08 15:21:32.000000000 +0200
+--- gnome-tweak-3.18.1.orig/gtweak/gsettings.py	2015-04-08 15:21:32.000000000 +0200
 +++ gnome-tweak-tool-3.18.1/gtweak/gsettings.py	2016-04-03 11:26:38.658482704 +0200
 @@ -16,7 +16,8 @@
  # along with gnome-tweak-tool.  If not, see <http://www.gnu.org/licenses/>.
diff --git a/gnu/packages/patches/gst-plugins-good-libvpx-compat.patch b/gnu/packages/patches/gst-plugins-good-libvpx-compat.patch
deleted file mode 100644
index 8306c79e56..0000000000
--- a/gnu/packages/patches/gst-plugins-good-libvpx-compat.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-Fix build with libvpx 1.8.
-
-Taken from this upstream commit:
-https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/commit/b6e6f1ae73375ef66a5748069843aaed1a83e6a6
-
-Note: Remove the HAVE_VPX_1_8 build flag with this patch.  It was added
-to avoid re-creating the configure script.
-
-diff --git a/configure.ac b/configure.ac
-index 5e4cff126..8c20e5081 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1054,6 +1054,10 @@ AG_GST_CHECK_FEATURE(VPX, [VPX decoder], vpx, [
-       AC_DEFINE(HAVE_VPX_1_4, 1, [Defined if the VPX library version is 1.4 or bigger])
-     ], [true])
- 
-+    PKG_CHECK_MODULES(VPX_180, vpx >= 1.8.0, [
-+      AC_DEFINE(HAVE_VPX_1_8, 1, [Defined if the VPX library version is 1.8 or bigger])
-+    ], [true])
-+
-     LIBS="$OLD_LIBS"
-     CFLAGS="$OLD_CFLAGS"
-   fi
-diff --git a/ext/vpx/gstvpxdec.c b/ext/vpx/gstvpxdec.c
-index c3f0f625f..da4322513 100644
---- a/ext/vpx/gstvpxdec.c
-+++ b/ext/vpx/gstvpxdec.c
-@@ -62,6 +62,7 @@ gst_vpx_dec_post_processing_flags_get_type (void)
-     {C_FLAGS (VP8_DEBLOCK), "Deblock", "deblock"},
-     {C_FLAGS (VP8_DEMACROBLOCK), "Demacroblock", "demacroblock"},
-     {C_FLAGS (VP8_ADDNOISE), "Add noise", "addnoise"},
-+#ifndef HAVE_VPX_1_8
-     {C_FLAGS (VP8_DEBUG_TXT_FRAME_INFO),
-           "Print frame information",
-         "visualize-frame-info"},
-@@ -74,6 +75,7 @@ gst_vpx_dec_post_processing_flags_get_type (void)
-     {C_FLAGS (VP8_DEBUG_TXT_RATE_INFO),
-           "Print video rate info",
-         "visualize-rate-info"},
-+#endif
-     {C_FLAGS (VP8_MFQE), "Multi-frame quality enhancement", "mfqe"},
-     {0, NULL, NULL}
-   };
-diff --git a/ext/vpx/meson.build b/ext/vpx/meson.build
-index 6ed440728..0d2340b32 100644
---- a/ext/vpx/meson.build
-+++ b/ext/vpx/meson.build
-@@ -48,6 +48,10 @@ if vpx_dep.found()
-     vpx_args += '-DHAVE_VPX_1_4'
-   endif
- 
-+  if dependency('vpx', version : '>=1.8.0', required : false).found()
-+    vpx_args += '-DHAVE_VPX_1_8'
-+  endif
-+
-   gstvpx = library('gstvpx',
-     vpx_sources,
-     c_args : gst_plugins_good_args + vpx_args,
diff --git a/gnu/packages/patches/ocaml-piqilib-Update-base64.patch b/gnu/packages/patches/ocaml-piqilib-Update-base64.patch
new file mode 100644
index 0000000000..ec2c02d93e
--- /dev/null
+++ b/gnu/packages/patches/ocaml-piqilib-Update-base64.patch
@@ -0,0 +1,46 @@
+From 98abdbff3d5316a75f27d6a76fe09317d56f2a38 Mon Sep 17 00:00:00 2001
+From: Vincent Bernardoff <vb@luminar.eu.org>
+Date: Sun, 10 Feb 2019 14:47:07 +0100
+Subject: [PATCH] Fix compilation with newer base64 versions
+
+---
+ opam                   | 2 +-
+ piqilib/piqi_base64.ml | 9 ++++-----
+ 2 files changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/opam b/opam
+index 3a9128e..bb5a53f 100644
+--- a/opam
++++ b/opam
+@@ -26,6 +26,6 @@ depends: [
+   "easy-format"
+   "ulex"
+   "xmlm"
+-  "base64" {>="2.0.0"}
++  "base64" {>="3.1.0"}
+ ]
+ dev-repo: "git://github.com/alavrik/piqi"
+diff --git a/piqilib/piqi_base64.ml b/piqilib/piqi_base64.ml
+index c5a6ae7..a98346e 100644
+--- a/piqilib/piqi_base64.ml
++++ b/piqilib/piqi_base64.ml
+@@ -18,12 +18,11 @@
+ (* TODO: add more base64 validation; the base64 library doesn't do any
+  * validation *)
+ let decode x =
+-  try
+-    B64.decode x
+-  with _ ->
+-    invalid_arg "Piqi_base64.decode"
++  match Base64.decode x with
++  | Error _ -> invalid_arg "Piqi_base64.decode"
++  | Ok v -> v
+ 
+ 
+ let encode x =
+-  B64.encode x
++  Base64.encode_exn x
+ 
+-- 
+2.21.0
+
diff --git a/gnu/packages/patches/slim-display.patch b/gnu/packages/patches/slim-display.patch
new file mode 100644
index 0000000000..f68604a94b
--- /dev/null
+++ b/gnu/packages/patches/slim-display.patch
@@ -0,0 +1,75 @@
+Add "display_name" configuration option and use its value instead of
+the hard coded one.
+
+Patch by Diego N. Barbato
+
+--- a/app.cpp	1970-01-01 01:00:00.000000000 +0100
++++ b/app.cpp	2019-04-27 13:48:23.479133531 +0200
+@@ -190,7 +190,13 @@
+ }
+ 
+ void App::Run() {
+-	DisplayName = DISPLAY;
++	/* Read configuration */
++	cfg = new Cfg;
++	char *cfgfile = getenv("SLIM_CFGFILE");
++	if (!cfgfile) cfgfile = CFGFILE;
++	cfg->readConf(cfgfile);
++
++	DisplayName = cfg->getOption("display_name").c_str();
+ 
+ #ifdef XNEST_DEBUG
+ 	char* p = getenv("DISPLAY");
+@@ -200,11 +206,7 @@
+ 	}
+ #endif
+ 
+-	/* Read configuration and theme */
+-	cfg = new Cfg;
+-	char *cfgfile = getenv("SLIM_CFGFILE");
+-	if (!cfgfile) cfgfile = CFGFILE;
+-	cfg->readConf(cfgfile);
++	/* Read theme */
+ 	string themebase = "";
+ 	string themefile = "";
+ 	string themedir = "";
+@@ -911,9 +913,7 @@
+ 	static const int MAX_XSERVER_ARGS = 256;
+ 	static char* server[MAX_XSERVER_ARGS+2] = { NULL };
+ 	server[0] = (char *)cfg->getOption("default_xserver").c_str();
+-	string argOption = cfg->getOption("xserver_arguments");
+-	/* Add mandatory -xauth option */
+-	argOption = argOption + " -auth " + cfg->getOption("authfile");
++	string argOption = cfg->getOption("display_name") + " " + cfg->getOption("xserver_arguments") + " -auth " + cfg->getOption("authfile");
+ 	char* args = new char[argOption.length()+2]; /* NULL plus vt */
+ 	strcpy(args, argOption.c_str());
+ 
+@@ -1233,7 +1233,7 @@
+ 	authfile = cfg->getOption("authfile");
+ 	remove(authfile.c_str());
+ 	putenv(StrConcat("XAUTHORITY=", authfile.c_str()));
+-	Util::add_mcookie(mcookie, ":0", cfg->getOption("xauth_path"),
++	Util::add_mcookie(mcookie, cfg->getOption("display_name").c_str(), cfg->getOption("xauth_path"),
+ 	  authfile);
+ }
+ 
+--- a/cfg.cpp	1970-01-01 01:00:00.000000000 +0100
++++ b/cfg.cpp	2019-04-27 13:49:40.511773743 +0200
+@@ -31,6 +31,7 @@
+ 	/* Configuration options */
+ 	options.insert(option("default_path","/bin:/usr/bin:/usr/local/bin"));
+ 	options.insert(option("default_xserver","/usr/bin/X"));
++	options.insert(option("display_name",":0.0"));
+ 	options.insert(option("xserver_arguments",""));
+ 	options.insert(option("numlock",""));
+ 	options.insert(option("daemon",""));
+--- a/switchuser.cpp	1970-01-01 01:00:00.000000000 +0100
++++ b/switchuser.cpp	2019-04-27 13:50:19.380096651 +0200
+@@ -54,6 +54,6 @@
+ 	string home = string(Pw->pw_dir);
+ 	string authfile = home + "/.Xauthority";
+ 	remove(authfile.c_str());
+-	Util::add_mcookie(mcookie, ":0", cfg->getOption("xauth_path"),
++	Util::add_mcookie(mcookie, displayName.c_str(), cfg->getOption("xauth_path"),
+ 	  authfile);
+ }
diff --git a/gnu/packages/patches/upower-builddir.patch b/gnu/packages/patches/upower-builddir.patch
index d59d4364b8..51295f2076 100644
--- a/gnu/packages/patches/upower-builddir.patch
+++ b/gnu/packages/patches/upower-builddir.patch
@@ -7,17 +7,10 @@ some things, so we patch the Makefile.in instead.
 Also fix to not try to create /var/lib/upower if /var isn't writable.
 
 Patch by Andy Wingo <wingo@igalia.com>
+Reduced to upower 0.99.10 by Tobias Geerinckx-Rice <me@tobias.gr>
 
 --- upower-0.99.2.orig/src/Makefile.in	2014-12-18 10:32:01.000000000 +0100
 +++ upower-0.99.2/src/Makefile.in	2015-04-04 19:49:28.020843678 +0200
-@@ -780,6 +780,7 @@
- 
- @UP_BUILD_TESTS_TRUE@up_self_test_CFLAGS = $(AM_CFLAGS) $(WARNINGFLAGS_C)
- @UP_BUILD_TESTS_TRUE@TESTS_ENVIRONMENT = $(DBUS_LAUNCH)
-+@UP_BUILD_TESTS_TRUE@AM_TESTS_ENVIRONMENT = UPOWER_CONF_FILE_NAME=$(top_srcdir)/etc/UPower.conf
- dbusservicedir = $(datadir)/dbus-1/system-services
- dbusservice_in_files = org.freedesktop.UPower.service.in
- dbusservice_DATA = $(dbusservice_in_files:.service.in=.service)
 @@ -1789,7 +1790,7 @@
  @HAVE_SYSTEMDSYSTEMUNITDIR_TRUE@	@sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
  
@@ -27,18 +20,3 @@ Patch by Andy Wingo <wingo@igalia.com>
  		mkdir -p $(DESTDIR)$(historydir); \
  	fi
  
---- upower-0.99.2.orig/src/up-self-test.c	2014-07-17 09:46:15.000000000 +0200
-+++ upower-0.99.2/src/up-self-test.c	2015-04-04 18:43:04.952741927 +0200
-@@ -295,12 +295,6 @@
- #endif
- 	g_test_init (&argc, &argv, NULL);
- 
--	/* make check, vs. make distcheck */
--	if (g_file_test ("../etc/UPower.conf", G_FILE_TEST_EXISTS))
--		g_setenv ("UPOWER_CONF_FILE_NAME", "../etc/UPower.conf", TRUE);
--	else
--		g_setenv ("UPOWER_CONF_FILE_NAME", "../../../etc/UPower.conf", TRUE);
--
- 	/* tests go here */
- 	g_test_add_func ("/power/backend", up_test_backend_func);
- 	g_test_add_func ("/power/device", up_test_device_func);
diff --git a/gnu/packages/patches/webkitgtk-sans-gstreamer-gl.patch b/gnu/packages/patches/webkitgtk-sans-gstreamer-gl.patch
new file mode 100644
index 0000000000..4577c81edb
--- /dev/null
+++ b/gnu/packages/patches/webkitgtk-sans-gstreamer-gl.patch
@@ -0,0 +1,24 @@
+Fix build failure when USE_GSTREAMER_GL=off.  See
+<https://bugs.webkit.org/show_bug.cgi?id=196440>.
+
+This patch is taken from the upstream source repository:
+<https://git.webkit.org/?p=WebKit.git;a=commitdiff;h=e2dd6decbe25ea9498f1ba213808f34b232740c7>.
+
+diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
+index 00a2af6489e..5cb5f7536ac 100644
+--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
++++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
+@@ -1000,11 +1000,13 @@ void MediaPlayerPrivateGStreamerBase::updateTextureMapperFlags()
+         break;
+     }
+ 
++#if USE(GSTREAMER_GL)
+     // When the imxvpudecoder is used, the texture sampling of the
+     // directviv-uploaded texture returns an RGB value, so there's no need to
+     // convert it.
+     if (m_videoDecoderPlatform != WebKitGstVideoDecoderPlatform::ImxVPU)
+         m_textureMapperFlags |= TEXTURE_MAPPER_COLOR_CONVERT_FLAG;
++#endif
+ }
+ #endif
+ 
diff --git a/gnu/packages/patches/webkitgtk-sse2.patch b/gnu/packages/patches/webkitgtk-sse2.patch
deleted file mode 100644
index df70e38919..0000000000
--- a/gnu/packages/patches/webkitgtk-sse2.patch
+++ /dev/null
@@ -1,202 +0,0 @@
-Fix build on i686.
-
-This patch is taken from upstream, with ChangeLog entries omitted.
-
-From 5048338c5f21605441c6833907d1136ac9640b35 Mon Sep 17 00:00:00 2001
-From: "mcatanzaro@igalia.com"
- <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
-Date: Wed, 10 Apr 2019 18:27:25 +0000
-Subject: [PATCH] Unreviewed, rolling out r243989.
-
-Broke i686 builds
-
-Reverted changeset:
-
-"[CMake] Detect SSE2 at compile time"
-https://bugs.webkit.org/show_bug.cgi?id=196488
-https://trac.webkit.org/changeset/243989
-
-git-svn-id: http://svn.webkit.org/repository/webkit/trunk@244138 268f45cc-cd09-0410-ab3c-d52691b4dbfc
----
- CMakeLists.txt                                | 10 ---
- ChangeLog                                     | 12 ++++
- Source/JavaScriptCore/ChangeLog               | 12 ++++
- .../assembler/MacroAssemblerX86Common.cpp     |  7 ++
- .../assembler/MacroAssemblerX86Common.h       | 30 +++++++++
- Source/cmake/FindSSE2.cmake                   | 65 -------------------
- 6 files changed, 61 insertions(+), 75 deletions(-)
- delete mode 100644 Source/cmake/FindSSE2.cmake
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index acd77f4b623..d3e8a23f9ff 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -114,16 +114,6 @@ else ()
-     set(WTF_CPU_UNKNOWN 1)
- endif ()
- 
--#---------------------------
--# Make sure SSE2 is present.
--#---------------------------
--if (WTF_CPU_X86)
--    include(FindSSE2)
--    if (NOT SSE2_SUPPORT_FOUND)
--        message(FATAL_ERROR "SSE2 support is required to compile WebKit")
--    endif ()
--endif ()
--
- # -----------------------------------------------------------------------------
- # Determine the operating system
- # -----------------------------------------------------------------------------
-diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp b/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp
-index 8c752c0d030..31753589df7 100644
---- a/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp
-+++ b/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp
-@@ -168,6 +168,11 @@ static_assert(PROBE_OFFSETOF_REG(cpu.fprs, X86Registers::xmm15) == PROBE_CPU_XMM
- static_assert(sizeof(Probe::State) == PROBE_SIZE, "Probe::State::size's matches ctiMasmProbeTrampoline");
- static_assert((PROBE_EXECUTOR_OFFSET + PTR_SIZE) <= (PROBE_SIZE + OUT_SIZE), "Must have room after ProbeContext to stash the probe handler");
- 
-+#if CPU(X86)
-+// SSE2 is a hard requirement on x86.
-+static_assert(isSSE2Present(), "SSE2 support is required in JavaScriptCore");
-+#endif
-+
- #undef PROBE_OFFSETOF
- 
- #if CPU(X86)
-@@ -787,6 +792,7 @@ void MacroAssemblerX86Common::collectCPUFeatures()
-     std::call_once(onceKey, [] {
-         {
-             CPUID cpuid = getCPUID(0x1);
-+            s_sse2CheckState = (cpuid[3] & (1 << 26)) ? CPUIDCheckState::Set : CPUIDCheckState::Clear;
-             s_sse4_1CheckState = (cpuid[2] & (1 << 19)) ? CPUIDCheckState::Set : CPUIDCheckState::Clear;
-             s_sse4_2CheckState = (cpuid[2] & (1 << 20)) ? CPUIDCheckState::Set : CPUIDCheckState::Clear;
-             s_popcntCheckState = (cpuid[2] & (1 << 23)) ? CPUIDCheckState::Set : CPUIDCheckState::Clear;
-@@ -803,6 +809,7 @@ void MacroAssemblerX86Common::collectCPUFeatures()
-     });
- }
- 
-+MacroAssemblerX86Common::CPUIDCheckState MacroAssemblerX86Common::s_sse2CheckState = CPUIDCheckState::NotChecked;
- MacroAssemblerX86Common::CPUIDCheckState MacroAssemblerX86Common::s_sse4_1CheckState = CPUIDCheckState::NotChecked;
- MacroAssemblerX86Common::CPUIDCheckState MacroAssemblerX86Common::s_sse4_2CheckState = CPUIDCheckState::NotChecked;
- MacroAssemblerX86Common::CPUIDCheckState MacroAssemblerX86Common::s_avxCheckState = CPUIDCheckState::NotChecked;
-diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h b/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
-index ff097290ef3..097bcb0bb86 100644
---- a/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
-+++ b/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
-@@ -4197,11 +4197,41 @@ private:
-     }
- #endif
- 
-+#if CPU(X86)
-+#if OS(MAC_OS_X)
-+
-+    // All X86 Macs are guaranteed to support at least SSE2,
-+    static bool isSSE2Present()
-+    {
-+        return true;
-+    }
-+
-+#else // OS(MAC_OS_X)
-+    static bool isSSE2Present()
-+    {
-+        if (s_sse2CheckState == CPUIDCheckState::NotChecked)
-+            collectCPUFeatures();
-+        return s_sse2CheckState == CPUIDCheckState::Set;
-+    }
-+
-+#endif // OS(MAC_OS_X)
-+#elif !defined(NDEBUG) // CPU(X86)
-+
-+    // On x86-64 we should never be checking for SSE2 in a non-debug build,
-+    // but non debug add this method to keep the asserts above happy.
-+    static bool isSSE2Present()
-+    {
-+        return true;
-+    }
-+
-+#endif
-+
-     using CPUID = std::array<unsigned, 4>;
-     static CPUID getCPUID(unsigned level);
-     static CPUID getCPUIDEx(unsigned level, unsigned count);
-     JS_EXPORT_PRIVATE static void collectCPUFeatures();
- 
-+    JS_EXPORT_PRIVATE static CPUIDCheckState s_sse2CheckState;
-     JS_EXPORT_PRIVATE static CPUIDCheckState s_sse4_1CheckState;
-     JS_EXPORT_PRIVATE static CPUIDCheckState s_sse4_2CheckState;
-     JS_EXPORT_PRIVATE static CPUIDCheckState s_avxCheckState;
-diff --git a/Source/cmake/FindSSE2.cmake b/Source/cmake/FindSSE2.cmake
-deleted file mode 100644
-index 7a947feadd4..00000000000
---- a/Source/cmake/FindSSE2.cmake
-+++ /dev/null
-@@ -1,65 +0,0 @@
--#################################
--# Check for the presence of SSE2.
--#
--# Once done, this will define:
--# - SSE2_SUPPORT_FOUND - the system supports (at least) SSE2.
--#
--# Copyright (c) 2014, Pablo Fernandez Alcantarilla, Jesus Nuevo
--# Copyright (c) 2019, Igalia S.L.
--#
--# Redistribution and use in source and binary forms, with or without modification,
--# are permitted provided that the following conditions are met:
--#
--#   * Redistributions of source code must retain the above copyright notice,
--#     this list of conditions and the following disclaimer.
--#
--#   * Redistributions in binary form must reproduce the above copyright notice,
--#     this list of conditions and the following disclaimer in the documentation
--#     and/or other materials provided with the distribution.
--#
--#   * Neither the name of the copyright holders nor the names of its contributors
--#     may be used to endorse or promote products derived from this software without
--#     specific prior written permission.
--#
--# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
--# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
--# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
--# SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
--# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
--# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
--# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
--# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
--# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--
--set(SSE2_SUPPORT_FOUND FALSE)
--
--macro(CHECK_FOR_SSE2)
--    include(CheckCXXSourceRuns)
--
--    check_cxx_source_runs("
--        #include <emmintrin.h>
--        int main ()
--        {
--            __m128d a, b;
--            double vals[2] = {0};
--            a = _mm_loadu_pd (vals);
--            b = _mm_add_pd (a,a);
--            _mm_storeu_pd (vals,b);
--            return(0);
--        }"
--        HAVE_SSE2_EXTENSIONS)
--
--    if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
--        if (HAVE_SSE2_EXTENSIONS)
--            set(SSE2_SUPPORT_FOUND TRUE)
--        endif ()
--    elseif (MSVC AND NOT CMAKE_CL_64)
--        if (HAVE_SSE2_EXTENSIONS)
--            set(SSE2_SUPPORT_FOUND TRUE)
--            message(STATUS "Found SSE2 extensions.")
--        endif (HAVE_SSE2_EXTENSIONS)
--    endif ()
--
--endmacro(CHECK_FOR_SSE2)
--
--CHECK_FOR_SSE2()
--- 
-2.21.0
-
diff --git a/gnu/packages/patches/xf86-video-voodoo-pcitag.patch b/gnu/packages/patches/xf86-video-voodoo-pcitag.patch
new file mode 100644
index 0000000000..5cadef3928
--- /dev/null
+++ b/gnu/packages/patches/xf86-video-voodoo-pcitag.patch
@@ -0,0 +1,34 @@
+From: Tobias Geerinckx-Rice <me@tobias.gr>
+Date: Mon, 20 May 2019 04:52:33 +0200
+Subject: [PATCH] gnu: xf86-video-voodoo: Don't use PCITAG.
+
+Copied verbatim from upstream repository[0].
+
+[0]: https://cgit.freedesktop.org/xorg/driver/-xf86-video-voodoo/patch/?id=9172ae566a0e85313fc80ab62b4455393eefe593
+
+From 9172ae566a0e85313fc80ab62b4455393eefe593 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Mon, 22 Sep 2014 10:56:02 +1000
+Subject: don't use PCITAG in struct anymore
+
+---
+ src/voodoo.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/voodoo.h b/src/voodoo.h
+index bfed497..c3eb64e 100644
+--- a/src/voodoo.h
++++ b/src/voodoo.h
+@@ -23,7 +23,9 @@ typedef struct {
+   
+   Bool		      Voodoo2;		/* Set if Voodoo2 */
+   pciVideoPtr	      PciInfo;		/* PCI data */
++#ifndef XSERVER_LIBPCIACCESS
+   PCITAG	      PciTag;
++#endif
+   CARD32	      PhysBase;
+   
+   CARD32	      Width;		/* Current width */
+-- 
+cgit v1.0
+
diff --git a/gnu/packages/patches/xorriso-no-mbr-in-inner-efi.patch b/gnu/packages/patches/xorriso-no-mbr-in-inner-efi.patch
new file mode 100644
index 0000000000..a43889d2c6
--- /dev/null
+++ b/gnu/packages/patches/xorriso-no-mbr-in-inner-efi.patch
@@ -0,0 +1,47 @@
+https://dev.lovelyhq.com/libburnia/libisoburn/commit/1eb51f44dadb8b6c5f87533ca357186cdc1ac625
+diff --git a/frontend/grub-mkrescue-sed.sh b/frontend/grub-mkrescue-sed.sh
+index b3948c99..dcd9d696 100755
+--- a/frontend/grub-mkrescue-sed.sh
++++ b/frontend/grub-mkrescue-sed.sh
+@@ -120,6 +120,7 @@ fi
+ # "yes" overwrites the MBR partition table area in the EFI boot image by zeros.
+ # Some EFI implementations get stuck when seeing in the EFI partition a
+ # partition table entry which begins at LBA 0.
++# "extra" not only zeros the partition table but also the MBR signature.
+ efi_zero_inner_pt=no
+ if test -n "$MKRESCUE_SED_IN_EFI_NO_PT"
+ then
+@@ -192,24 +193,31 @@ then
+   find "$dir"
+ fi
+ 
+-if test "$efi_zero_inner_pt" = yes
++if test "$efi_zero_inner_pt" = yes -o "$efi_zero_inner_pt" = extra
+ then
+   did_dd=0
+   if test -e "$dir"/efi.img
+   then
++    # Look for 0x55 0xAA in bytes 510 and 511
+     magic=$(dd bs=1 skip=510 count=2 if="$dir"/efi.img 2>/dev/null | \
+             od -c | head -1 | awk '{print $2 " " $3}')
+     if test "$magic" = "U 252"
+     then
++      echo "Performing actions for MKRESCUE_SED_IN_EFI_NO_PT=$efi_zero_inner_pt" >&2
+       dd if=/dev/zero bs=1 seek=446 count=64 conv=notrunc of="$dir"/efi.img
+       did_dd=1
++      if test "$efi_zero_inner_pt" = extra
++      then
++        dd if=/dev/zero bs=1 seek=510 count=2 conv=notrunc of="$dir"/efi.img
++      fi
++      echo >&2
+     fi
+   fi
+   if test "$did_dd" = 0
+   then
+     echo >&2
+     echo "$0 : NOTE : No EFI image found or no MBR signature in it." >&2
+-    echo "$0 : NOTE : Will not obey MKRESCUE_SED_IN_EFI_NO_PT=yes" >&2
++    echo "$0 : NOTE : Will not obey MKRESCUE_SED_IN_EFI_NO_PT=$efi_zero_inner_pt" >&2
+     echo >&2
+   fi
+ fi
diff --git a/gnu/packages/patches/xorriso-no-partition-table-in-inner-efi.patch b/gnu/packages/patches/xorriso-no-partition-table-in-inner-efi.patch
new file mode 100644
index 0000000000..a719ca1f89
--- /dev/null
+++ b/gnu/packages/patches/xorriso-no-partition-table-in-inner-efi.patch
@@ -0,0 +1,107 @@
+https://dev.lovelyhq.com/libburnia/libisoburn/commit/3a2a3ba737a06162c22ace0ae09d33ba97aa2673
+diff --git a/frontend/grub-mkrescue-sed.sh b/frontend/grub-mkrescue-sed.sh
+index d772ff22..b3948c99 100755
+--- a/frontend/grub-mkrescue-sed.sh
++++ b/frontend/grub-mkrescue-sed.sh
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+ 
+-# Copyright (C) 2015 - 2016
++# Copyright (C) 2015 - 2019
+ # Thomas Schmitt <scdbackup@gmx.net>, libburnia-project.org
+ # Provided under BSD license: Use, modify, and distribute as you like.
+ 
+@@ -117,6 +117,15 @@ fi
+ #  command line.)
+ # Each argument must be a single word. No whitespace. No quotation marks.
+ 
++# "yes" overwrites the MBR partition table area in the EFI boot image by zeros.
++# Some EFI implementations get stuck when seeing in the EFI partition a
++# partition table entry which begins at LBA 0.
++efi_zero_inner_pt=no
++if test -n "$MKRESCUE_SED_IN_EFI_NO_PT"
++then
++  efi_zero_inner_pt="$MKRESCUE_SED_IN_EFI_NO_PT"
++fi
++
+ 
+ #
+ #                               Do the work 
+@@ -183,12 +192,48 @@ then
+   find "$dir"
+ fi
+ 
++if test "$efi_zero_inner_pt" = yes
++then
++  did_dd=0
++  if test -e "$dir"/efi.img
++  then
++    magic=$(dd bs=1 skip=510 count=2 if="$dir"/efi.img 2>/dev/null | \
++            od -c | head -1 | awk '{print $2 " " $3}')
++    if test "$magic" = "U 252"
++    then
++      dd if=/dev/zero bs=1 seek=446 count=64 conv=notrunc of="$dir"/efi.img
++      did_dd=1
++    fi
++  fi
++  if test "$did_dd" = 0
++  then
++    echo >&2
++    echo "$0 : NOTE : No EFI image found or no MBR signature in it." >&2
++    echo "$0 : NOTE : Will not obey MKRESCUE_SED_IN_EFI_NO_PT=yes" >&2
++    echo >&2
++  fi
++fi
++
+ efi_tmp_name=
++if test x"$mode" = xmjg \
++     -o x"$mode" = xmbr_only \
++     -o x"$mode" = xgpt_appended \
++     -o x"$mode" = xmbr_hfs
++then
++  # Move EFI partition image file out of the "$dir" tree, i.e. out of the ISO
++  efi_tmp_name=grub-mkrescue-sed-efi-img.$$
++  if test -e "$dir"/efi.img
++  then
++    mv "$dir"/efi.img /tmp/$efi_tmp_name
++  elif test -e /tmp/$efi_tmp_name
++  then
++    rm /tmp/$efi_tmp_name
++  fi
++fi
++
+ if test x"$mode" = xmjg
+ then
+   # Exchange arguments for the experimental GRUB2 mjg layout
+-  efi_tmp_name=grub-mkrescue-sed-efi-img.$$
+-  mv "$dir"/efi.img /tmp/$efi_tmp_name
+   x=$(echo " $*" | sed \
+     -e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition $partno 0xef \/tmp\/$efi_tmp_name/" \
+     -e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partition_${partno}:all:: -no-emul-boot -isohybrid-gpt-basdat/" \
+@@ -207,8 +252,6 @@ then
+ elif test x"$mode" = xmbr_only
+ then
+   # Exchange arguments for no-HFS MBR-only layout
+-  efi_tmp_name=grub-mkrescue-sed-efi-img.$$
+-  mv "$dir"/efi.img /tmp/$efi_tmp_name
+   x=$(echo " $*" | sed \
+     -e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_partition 2 0xef \/tmp\/$efi_tmp_name/" \
+     -e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partition_2:all:: -no-emul-boot/" \
+@@ -228,8 +271,6 @@ then
+ elif test x"$mode" = xmbr_hfs
+ then
+   # Exchange arguments for MBR and HFS+ layout
+-  efi_tmp_name=grub-mkrescue-sed-efi-img.$$
+-  mv "$dir"/efi.img /tmp/$efi_tmp_name
+   x=$(echo " $*" | sed \
+     -e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_partition 2 0xef \/tmp\/$efi_tmp_name/" \
+     -e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partition_2:all:: -no-emul-boot/" \
+@@ -247,8 +288,6 @@ then
+ elif test x"$mode" = xgpt_appended
+ then
+   # Exchange arguments for no-HFS MBR-only layout
+-  efi_tmp_name=grub-mkrescue-sed-efi-img.$$
+-  mv "$dir"/efi.img /tmp/$efi_tmp_name
+   x=$(echo " $*" | sed \
+     -e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition 2 0xef \/tmp\/$efi_tmp_name -appended_part_as_gpt -partition_offset 16/" \
+     -e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partition_2:all:: -no-emul-boot/" \