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/azr3-remove-lash.patch191
-rw-r--r--gnu/packages/patches/azr3.patch12
-rw-r--r--gnu/packages/patches/bees-beesd-honor-destdir-on-installation.patch40
-rw-r--r--gnu/packages/patches/cabal-install-base16-bytestring1.0.patch29
-rw-r--r--gnu/packages/patches/cabal-install-ghc8.10.patch393
-rw-r--r--gnu/packages/patches/ddclient-skip-test.patch43
-rw-r--r--gnu/packages/patches/elm-ghc9.2.patch187
-rw-r--r--gnu/packages/patches/emacs-pasp-mode-quote-file-names.patch20
-rw-r--r--gnu/packages/patches/esmini-no-clutter-log.patch30
-rw-r--r--gnu/packages/patches/esmini-use-pkgconfig.patch541
-rw-r--r--gnu/packages/patches/ghc-9.2-glibc-2.33-link-order.patch35
-rw-r--r--gnu/packages/patches/ghc-bloomfilter-ghc9.2.patch303
-rw-r--r--gnu/packages/patches/ghc-bytestring-handle-ghc9.patch67
-rw-r--r--gnu/packages/patches/icecat-makeicecat.patch10
-rw-r--r--gnu/packages/patches/jami-libjami-headers-search.patch18
-rw-r--r--gnu/packages/patches/ngless-unliftio.patch66
-rw-r--r--gnu/packages/patches/onionshare-cli-async-mode.patch25
-rw-r--r--gnu/packages/patches/opencascade-oce-glibc-2.26.patch62
-rw-r--r--gnu/packages/patches/opentaxsolver-file-browser-fix.patch58
-rw-r--r--gnu/packages/patches/php-bug-74093-test.patch48
-rw-r--r--gnu/packages/patches/php-curl-compat.patch17
-rw-r--r--gnu/packages/patches/php-fix-streams-copy-length.patch52
-rw-r--r--gnu/packages/patches/qpdfview-qt515-compat.patch17
-rw-r--r--gnu/packages/patches/qtwebkit-fix-building-with-bison-3.7.patch54
-rw-r--r--gnu/packages/patches/qtwebkit-fix-building-with-glib-2.68.patch21
-rw-r--r--gnu/packages/patches/qtwebkit-fix-building-with-icu-68.patch152
-rw-r--r--gnu/packages/patches/qtwebkit-fix-building-with-python-3.9.patch35
-rw-r--r--gnu/packages/patches/qtwebkit-pbutils-include.patch15
-rw-r--r--gnu/packages/patches/racket-backport-8.7-pkg-strip.patch90
-rw-r--r--gnu/packages/patches/scsh-nonstring-search-path.patch15
-rw-r--r--gnu/packages/patches/spice-vdagent-glib-2.68.patch112
-rw-r--r--gnu/packages/patches/virglrenderer-CVE-2017-6386.patch54
-rw-r--r--gnu/packages/patches/wpa-supplicant-dbus-group-policy.patch23
-rw-r--r--gnu/packages/patches/xf86-video-qxl-fix-build.patch101
-rw-r--r--gnu/packages/patches/xf86-video-tga-remove-mibstore.patch34
-rw-r--r--gnu/packages/patches/xf86-video-voodoo-pcitag.patch34
-rw-r--r--gnu/packages/patches/xmonad-dynamic-linking.patch24
-rw-r--r--gnu/packages/patches/xmonad-next-dynamic-linking.patch16
38 files changed, 1622 insertions, 1422 deletions
diff --git a/gnu/packages/patches/azr3-remove-lash.patch b/gnu/packages/patches/azr3-remove-lash.patch
new file mode 100644
index 0000000000..d5d481c5dd
--- /dev/null
+++ b/gnu/packages/patches/azr3-remove-lash.patch
@@ -0,0 +1,191 @@
+Remove any reference to LASH, which has been abandoned and still requires the
+use of Python 2.
+
+diff --git a/Makefile b/Makefile
+index 7c9f4f0..f82ba75 100644
+--- a/Makefile
++++ b/Makefile
+@@ -10,7 +10,7 @@ PACKAGE_WEBPAGE = "http://ll-plugins.nongnu.org/azr3/"
+ PACKAGE_BUGTRACKER = "https://savannah.nongnu.org/bugs/?group=ll-plugins"
+ PACKAGE_VC = "http://git.savannah.gnu.org/cgit/ll-plugins/azr3-jack.git/"
+ 
+-PKG_DEPS = gtkmm-2.4>=2.8.8 jack>=0.103.0 lash-1.0>=0.5.3
++PKG_DEPS = gtkmm-2.4>=2.8.8 jack>=0.103.0
+ 
+ 
+ PROGRAMS = azr3
+@@ -32,8 +32,8 @@ azr3_SOURCES = \
+ 	drawbar.hpp drawbar.cpp \
+ 	textbox.hpp textbox.cpp
+ azr3_SOURCEDIR = azr3
+-azr3_CFLAGS = `pkg-config --cflags gtkmm-2.4 jack lash-1.0` -DDATADIR=\"$(pkgdatadir)\"
+-azr3_LDFLAGS = `pkg-config --libs gtkmm-2.4 jack lash-1.0` -lpthread
++azr3_CFLAGS = `pkg-config --cflags gtkmm-2.4 jack` -DDATADIR=\"$(pkgdatadir)\"
++azr3_LDFLAGS = `pkg-config --libs gtkmm-2.4 jack` -lpthread
+ azr3_cpp_CFLAGS = $(shell if pkg-config --atleast-version=0.107 jack ; then echo -include azr3/newjack.hpp; fi)
+ main_cpp_CFLAGS = -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\"
+ 
+diff --git a/azr3/main.cpp b/azr3/main.cpp
+index 344fd03..fbe5671 100644
+--- a/azr3/main.cpp
++++ b/azr3/main.cpp
+@@ -32,13 +32,6 @@ using namespace std;
+ 
+ 
+ Main::Main(int& argc, char**& argv) : m_ok(false) {
+-  
+-  /* this is a bit dumb, but the only way I know of to check whether we were
+-     started by lashd is to see if lash_extract_args() removes any arguments */
+-  int old_argc = argc;  
+-  lash_args_t* lash_args = lash_extract_args(&argc, &argv);
+-  m_started_by_lashd = (argc != old_argc);
+-  
+   // parse all non-LASH arguments
+   OptionParser op;
+   bool help(false);
+@@ -166,10 +159,6 @@ Main::Main(int& argc, char**& argv) : m_ok(false) {
+     }
+   }
+     
+-  // initialise LASH
+-  if (!init_lash(lash_args, jack_get_client_name(m_jack_client)))
+-    return;
+-  
+   m_win->set_title("AZR-3");
+   m_win->set_resizable(false);
+   m_win->add(*m_gui);
+@@ -184,14 +173,11 @@ void Main::run() {
+   jack_activate(m_jack_client);
+ 
+   // auto-connect JACK ports if desired
+-  if (!m_started_by_lashd)
+-    auto_connect();
++  auto_connect();
+ 
+   Glib::signal_timeout().
+     connect(sigc::bind_return(sigc::mem_fun(*this, &Main::check_changes), 
+ 			      true), 10);
+-  Glib::signal_timeout().
+-    connect(sigc::mem_fun(*this, &Main::check_lash_events), 500);
+   m_kit->run(*m_win);
+   jack_deactivate(m_jack_client);
+   m_engine->deactivate();
+@@ -343,83 +329,7 @@ int Main::process(jack_nframes_t nframes) {
+     
+   return 0;
+ }
+-
+-
+-bool Main::check_lash_events() {
+-  lash_event_t* event;
+-  bool go_on = true;
+-  while ((event = lash_get_event(m_lash_client))) {
+-      
+-    // save
+-    if (lash_event_get_type(event) == LASH_Save_File) {
+-      cerr<<"Received LASH Save command"<<endl;
+-      string dir(lash_event_get_string(event));
+-      ofstream fout((dir + "/state").c_str());
+-      fout<<int(m_program);
+-      for (uint32_t i = 0; i < 63; ++i)
+-	fout<<" "<<m_gui_controls[i];
+-      fout<<endl;
+-      write_presets((dir + "/presets").c_str());
+-      lash_send_event(m_lash_client, 
+-		      lash_event_new_with_type(LASH_Save_File));
+-    }
+-      
+-    // restore
+-    else if (lash_event_get_type(event) == LASH_Restore_File) {
+-      cerr<<"Received LASH Restore command"<<endl;
+-      string dir(lash_event_get_string(event));
+-      for (unsigned char i = 0; i < 128; ++i)
+-	m_presets[i].empty = true;
+-      load_presets((dir + "/presets").c_str());
+-      m_gui->clear_programs();
+-      for (unsigned char i = 0; i < 128; ++i) {
+-	if (!m_presets[i].empty)
+-	  m_gui->add_program(i, m_presets[i].name.c_str());
+-      }
+-      ifstream fin((dir + "/state").c_str());
+-      int prog;
+-      fin>>prog;
+-      m_gui->set_program(prog);
+-      for (uint32_t p = 0; p < 63; ++p) {
+-	float tmp;
+-	fin>>tmp;
+-	m_gui->set_control(p, tmp);
+-      }
+-      lash_send_event(m_lash_client, 
+-		      lash_event_new_with_type(LASH_Restore_File));
+-    }
+-      
+-    // quit
+-    else if (lash_event_get_type(event) == LASH_Quit) {
+-      cerr<<"Received LASH Quit command"<<endl;
+-      Gtk::Main::instance()->quit();
+-      go_on = false;
+-    }
+-    
+-    lash_event_destroy(event);
+-  }
+-  return go_on;
+-}
+-
+-
+-bool Main::init_lash(lash_args_t* lash_args, const std::string& jack_name) {
+-  
+-  m_lash_client = lash_init(lash_args, "AZR-3", 
+-			    LASH_Config_File, LASH_PROTOCOL(2, 0));
+-  if (m_lash_client) {
+-    lash_event_t* event = lash_event_new_with_type(LASH_Client_Name);
+-    lash_event_set_string(event, "AZR-3");
+-    lash_send_event(m_lash_client, event);      
+-    lash_jack_client_name(m_lash_client, jack_name.c_str());
+-    Glib::signal_timeout().
+-      connect(sigc::mem_fun(*this, &Main::check_lash_events), 500);
+-  }
+-  else
+-    cerr<<"Could not initialise LASH!"<<endl;
+-  return (m_lash_client != 0);
+-}
+-  
+-  
++ 
+ int Main::static_process(jack_nframes_t frames, void* arg) {
+   return static_cast<Main*>(arg)->process(frames);
+ }
+diff --git a/azr3/main.hpp b/azr3/main.hpp
+index 48a425c..0406295 100644
+--- a/azr3/main.hpp
++++ b/azr3/main.hpp
+@@ -25,7 +25,6 @@
+ #include <gtkmm.h>
+ #include <pthread.h>
+ #include <semaphore.h>
+-#include <lash/lash.h>
+ 
+ #include "azr3.hpp"
+ #include "azr3gui.hpp"
+@@ -65,10 +64,6 @@ protected:
+ 
+   int process(jack_nframes_t nframes);
+ 
+-  bool check_lash_events();
+-
+-  bool init_lash(lash_args_t* lash_args, const std::string& jack_name);
+-
+   void auto_connect();
+ 
+   static int static_process(jack_nframes_t frames, void* arg);
+@@ -89,10 +84,8 @@ protected:
+   sem_t m_gui_changed;
+   float m_gui_controls[63];
+   Preset m_presets[128];
+-  lash_client_t* m_lash_client;
+ 
+   bool m_ok;
+-  bool m_started_by_lashd;
+   std::string m_auto_midi;
+   std::string m_auto_audio;
+   
diff --git a/gnu/packages/patches/azr3.patch b/gnu/packages/patches/azr3.patch
index 5849383c5b..93e9b5b11a 100644
--- a/gnu/packages/patches/azr3.patch
+++ b/gnu/packages/patches/azr3.patch
@@ -68,9 +68,9 @@ The patch has been sent to the developer on 2016-09-26.
    Widget* eb = add_clickbox(m_fbox, 14, 319, 14, 44);
    eb->signal_button_press_event().
 -    connect(sigc::hide(bind(bind(mem_fun(*this, &AZR3GUI::change_mode), 
--				 ref(m_fbox)), false)));
+-				 sigc::ref(m_fbox)), false)));
 +    connect(sigc::hide(sigc::bind(sigc::mem_fun(*this, &AZR3GUI::change_mode), 
-+                                  false, std::ref(m_fbox))));
++                                  false, sigc::ref(m_fbox))));
    m_fx_widgets.push_back(eb);
    
    // Mr Valve controls
@@ -79,15 +79,15 @@ The patch has been sent to the developer on 2016-09-26.
    Widget* eb2 = add_clickbox(m_vbox, 14, 53, 14, 44);
    eb2->signal_button_press_event().
 -    connect(sigc::hide(bind(bind(mem_fun(*this, &AZR3GUI::change_mode), 
--				 ref(m_fbox)), true)));
+-				 sigc::ref(m_fbox)), true)));
 +    connect(sigc::hide(sigc::bind(sigc::mem_fun(*this, &AZR3GUI::change_mode), 
-+                                  true, std::ref(m_fbox))));
++                                  true, sigc::ref(m_fbox))));
  
    // vibrato controls
    add_switch(m_vbox, n_1_vibrato, 39, 17, Switch::Green);
 @@ -352,9 +352,9 @@
    knob->set_style(s);
-   if (port >= 0 && port < m_adj.size()) {
+   if (port < m_adj.size()) {
      knob->get_adjustment().signal_value_changed().
 -      connect(compose(bind<0>(mem_fun(*this, &AZR3GUI::control_changed), port),
 -		      mem_fun(knob->get_adjustment(), 
@@ -100,7 +100,7 @@ The patch has been sent to the developer on 2016-09-26.
    }
 @@ -382,8 +382,8 @@
    db->set_style(s);
-   if (port >= 0 && port < m_adj.size()) {
+   if (port < m_adj.size()) {
      db->get_adjustment().signal_value_changed().
 -      connect(compose(bind<0>(mem_fun(*this, &AZR3GUI::control_changed), port),
 -		      mem_fun(db->get_adjustment(), &Adjustment::get_value)));
diff --git a/gnu/packages/patches/bees-beesd-honor-destdir-on-installation.patch b/gnu/packages/patches/bees-beesd-honor-destdir-on-installation.patch
deleted file mode 100644
index 93817f42cf..0000000000
--- a/gnu/packages/patches/bees-beesd-honor-destdir-on-installation.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 66b00f8a972ebb4da68f7aa0d0656f43ce2a2c3a Mon Sep 17 00:00:00 2001
-From: Hilton Chain <hako@ultrarare.space>
-Date: Fri, 23 Dec 2022 11:04:46 +0800
-Subject: [PATCH] beesd: Honor DESTDIR on installation.
-
-Co-authored-by: Adam Faiz <adam.faiz@disroot.org>
-Signed-off-by: Hilton Chain <hako@ultrarare.space>
----
- Defines.mk       | 1 +
- scripts/beesd.in | 2 +-
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/Defines.mk b/Defines.mk
-index 9e8df40..e5394ba 100644
---- a/Defines.mk
-+++ b/Defines.mk
-@@ -2,6 +2,7 @@ MAKE += PREFIX=$(PREFIX) LIBEXEC_PREFIX=$(LIBEXEC_PREFIX) ETC_PREFIX=$(ETC_PREFI
-
- define TEMPLATE_COMPILER =
- sed $< >$@ \
-+		-e's#@DESTDIR@#$(DESTDIR)#' \
- 		-e's#@PREFIX@#$(PREFIX)#' \
- 		-e's#@ETC_PREFIX@#$(ETC_PREFIX)#' \
- 		-e's#@LIBEXEC_PREFIX@#$(LIBEXEC_PREFIX)#'
-diff --git a/scripts/beesd.in b/scripts/beesd.in
-index 174bb6c..35d04aa 100755
---- a/scripts/beesd.in
-+++ b/scripts/beesd.in
-@@ -15,7 +15,7 @@ readonly AL128K="$((128*1024))"
- readonly AL16M="$((16*1024*1024))"
- readonly CONFIG_DIR=@ETC_PREFIX@/bees/
-
--readonly bees_bin=$(realpath @LIBEXEC_PREFIX@/bees)
-+readonly bees_bin=$(realpath @DESTDIR@/@LIBEXEC_PREFIX@/bees)
-
- command -v "$bees_bin" &> /dev/null || ERRO "Missing 'bees' agent"
-
---
-2.38.1
-
diff --git a/gnu/packages/patches/cabal-install-base16-bytestring1.0.patch b/gnu/packages/patches/cabal-install-base16-bytestring1.0.patch
deleted file mode 100644
index 998bf08718..0000000000
--- a/gnu/packages/patches/cabal-install-base16-bytestring1.0.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Restore compatibility with newer version of base16-bytestring.
-
-Taken from https://raw.githubusercontent.com/archlinux/svntogit-community/packages/trunk/cabal-install-base16-bytestring1.0.patch
-
-diff --git a/Distribution/Client/HashValue.hs b/Distribution/Client/HashValue.hs
-index 54b8aee9e..11e647c1c 100644
---- a/Distribution/Client/HashValue.hs
-+++ b/Distribution/Client/HashValue.hs
-@@ -1,3 +1,4 @@
-+{-# LANGUAGE CPP          #-}
- {-# LANGUAGE DeriveDataTypeable #-}
- {-# LANGUAGE DeriveGeneric      #-}
- module Distribution.Client.HashValue (
-@@ -72,10 +73,14 @@ hashFromTUF (Sec.Hash hashstr) =
-     --TODO: [code cleanup] either we should get TUF to use raw bytestrings or
-     -- perhaps we should also just use a base16 string as the internal rep.
-     case Base16.decode (BS.pack hashstr) of
-+#if MIN_VERSION_base16_bytestring(1,0,0)
-+      Right hash -> HashValue hash
-+      Left _ -> error "hashFromTUF: cannot decode base16"
-+#else
-       (hash, trailing) | not (BS.null hash) && BS.null trailing
-         -> HashValue hash
-       _ -> error "hashFromTUF: cannot decode base16 hash"
--
-+#endif
- 
- -- | Truncate a 32 byte SHA256 hash to
- --
diff --git a/gnu/packages/patches/cabal-install-ghc8.10.patch b/gnu/packages/patches/cabal-install-ghc8.10.patch
deleted file mode 100644
index 67c0953058..0000000000
--- a/gnu/packages/patches/cabal-install-ghc8.10.patch
+++ /dev/null
@@ -1,393 +0,0 @@
-From ac9b41eef3c781ce188ded2551f98fe75152e30c Mon Sep 17 00:00:00 2001
-From: Oleg Grenrus <oleg.grenrus@iki.fi>
-Date: Tue, 14 Apr 2020 11:31:34 +0300
-Subject: [PATCH] GHC-8.10 support for 3.2
-
-Includes cherry-picked commits:
-
-- Test cabal-install with GHC-8.10 #6709
-- Add GHC-8.10.1 job. Only tests Cabal-the-lib part atm. #6617
-
-Also add topHandler' signature.
----
- .docker/validate-8.10.1.dockerfile            |  60 ++++++
- .github/workflows/artifacts.yml               |   6 +-
- .github/workflows/bootstrap.yml               |   4 +-
- .github/workflows/linux.yml                   | 179 ++++++++++++------
- .github/workflows/macos.yml                   |  40 ++--
- .github/workflows/quick-jobs.yml              |   4 +-
- .github/workflows/windows.yml                 | 117 +++++++++++-
- .../Distribution/PackageDescription/Quirks.hs |  19 +-
- Makefile                                      |   4 +
- boot/ci-artifacts.template.yml                |   6 +-
- boot/ci-bootstrap.template.yml                |   4 +-
- boot/ci-linux.template.yml                    |   8 +-
- boot/ci-macos.template.yml                    |   7 +-
- boot/ci-quick-jobs.template.yml               |   4 +-
- boot/ci-windows.template.yml                  |   8 +-
- cabal-dev-scripts/src/GenValidate.hs          |  33 ++--
- Distribution/Client/CmdSdist.hs |   3 +
- .../Distribution/Client/FetchUtils.hs         |   4 +-
- .../Distribution/Client/IndexUtils.hs         |   2 +-
- Distribution/Client/Sandbox.hs  |   5 +-
- .../Distribution/Client/TargetSelector.hs     |   2 +-
- Distribution/Client/Update.hs   |   4 +-
- .../Distribution/Client/Utils/Json.hs         |  13 +-
- .../Distribution/Solver/Modular/Assignment.hs |  11 +-
- .../Distribution/Solver/Modular/Builder.hs    |  10 +-
- .../Distribution/Solver/Modular/Index.hs      |   6 +-
- .../Solver/Modular/IndexConversion.hs         |   8 +-
- .../Distribution/Solver/Modular/Solver.hs     |  12 +-
- .../Distribution/Solver/Modular/Validate.hs   |   5 +-
- bootstrap.sh                    |   6 +-
- cabal-install.cabal             |   4 +-
- cabal-install.cabal.pp          |   4 +-
- .../targets/complex/q/q.cabal                 |   3 +-
- cabal-testsuite/cabal-testsuite.cabal         |   4 +-
- validate.sh                                   |  21 +-
- 35 files changed, 461 insertions(+), 169 deletions(-)
- create mode 100644 .docker/validate-8.10.1.dockerfile
-diff --git a/Distribution/Client/CmdSdist.hs b/Distribution/Client/CmdSdist.hs
-index 9ce0c80100e..a22317004c4 100644
---- a/Distribution/Client/CmdSdist.hs
-+++ b/Distribution/Client/CmdSdist.hs
-@@ -237,7 +237,10 @@ packageToSdist verbosity projectRootDir format outputFile pkg = do
-         (norm NoExec -> nonexec, norm Exec -> exec) <-
-            listPackageSources verbosity (flattenPackageDescription $ packageDescription pkg) knownSuffixHandlers
- 
-+        print $ map snd exec
-+        print $ map snd nonexec
-         let files =  nub . sortOn snd $ nonexec ++ exec
-+        print files
- 
-         case format of
-             SourceList nulSep -> do
-diff --git a/Distribution/Client/FetchUtils.hs b/Distribution/Client/FetchUtils.hs
-index e9a31a91f84..4e5e581f9ec 100644
---- a/Distribution/Client/FetchUtils.hs
-+++ b/Distribution/Client/FetchUtils.hs
-@@ -176,8 +176,8 @@ fetchRepoTarball verbosity' repoCtxt repo pkgid = do
-     verbosity = verboseUnmarkOutput verbosity'
- 
-     downloadRepoPackage = case repo of
--      RepoLocal{..} -> return (packageFile repo pkgid)
--      RepoLocalNoIndex{..} -> return (packageFile repo pkgid)
-+      RepoLocal{} -> return (packageFile repo pkgid)
-+      RepoLocalNoIndex{} -> return (packageFile repo pkgid)
- 
-       RepoRemote{..} -> do
-         transport <- repoContextGetTransport repoCtxt
-diff --git a/Distribution/Client/IndexUtils.hs b/Distribution/Client/IndexUtils.hs
-index a76becc05ba..bf0ff7cf5ba 100644
---- a/Distribution/Client/IndexUtils.hs
-+++ b/Distribution/Client/IndexUtils.hs
-@@ -634,7 +634,7 @@ withIndexEntries
-     -> ([IndexCacheEntry] -> IO a)
-     -> ([NoIndexCacheEntry] -> IO a)
-     -> IO a
--withIndexEntries _ (RepoIndex repoCtxt repo@RepoSecure{..}) callback _ =
-+withIndexEntries _ (RepoIndex repoCtxt repo@RepoSecure{}) callback _ =
-     repoContextWithSecureRepo repoCtxt repo $ \repoSecure ->
-       Sec.withIndex repoSecure $ \Sec.IndexCallbacks{..} -> do
-         -- Incrementally (lazily) read all the entries in the tar file in order,
-diff --git a/Distribution/Client/Sandbox.hs b/Distribution/Client/Sandbox.hs
-index 66b415d7239..14bad3f2135 100644
---- a/Distribution/Client/Sandbox.hs
-+++ b/Distribution/Client/Sandbox.hs
-@@ -666,7 +666,7 @@ reinstallAddSourceDeps :: Verbosity
-                           -> FilePath
-                           -> IO WereDepsReinstalled
- reinstallAddSourceDeps verbosity configFlags' configExFlags
--                       installFlags globalFlags sandboxDir = topHandler' $ do
-+                       installFlags globalFlags sandboxDir = topHandlerWith errorMsg $ do
-   let sandboxDistPref     = sandboxBuildDir sandboxDir
-       configFlags         = configFlags'
-                             { configDistPref  = Flag sandboxDistPref }
-@@ -710,7 +710,8 @@ reinstallAddSourceDeps verbosity configFlags' configExFlags
-         ++ "offending packages or recreating the sandbox."
-       logMsg message rest = debugNoWrap verbosity message >> rest
- 
--      topHandler' = topHandlerWith $ \_ -> do
-+      errorMsg :: a -> IO WereDepsReinstalled
-+      errorMsg _ = do
-         warn verbosity "Couldn't reinstall some add-source dependencies."
-         -- Here we can't know whether any deps have been reinstalled, so we have
-         -- to be conservative.
-diff --git a/Distribution/Client/TargetSelector.hs b/Distribution/Client/TargetSelector.hs
-index 23d92f580fd..f8f683d9875 100644
---- a/Distribution/Client/TargetSelector.hs
-+++ b/Distribution/Client/TargetSelector.hs
-@@ -222,7 +222,7 @@ readTargetSelectorsWith :: (Applicative m, Monad m) => DirActions m
-                         -> Maybe ComponentKindFilter
-                         -> [String]
-                         -> m (Either [TargetSelectorProblem] [TargetSelector])
--readTargetSelectorsWith dirActions@DirActions{..} pkgs mfilter targetStrs =
-+readTargetSelectorsWith dirActions@DirActions{} pkgs mfilter targetStrs =
-     case parseTargetStrings targetStrs of
-       ([], usertargets) -> do
-         usertargets' <- mapM (getTargetStringFileStatus dirActions) usertargets
-diff --git a/Distribution/Client/Update.hs b/Distribution/Client/Update.hs
-index 52bb1f76c96..8ded78b9d2e 100644
---- a/Distribution/Client/Update.hs
-+++ b/Distribution/Client/Update.hs
-@@ -73,8 +73,8 @@ updateRepo :: Verbosity -> UpdateFlags -> RepoContext -> Repo -> IO ()
- updateRepo verbosity updateFlags repoCtxt repo = do
-   transport <- repoContextGetTransport repoCtxt
-   case repo of
--    RepoLocal{..} -> return ()
--    RepoLocalNoIndex{..} -> return ()
-+    RepoLocal{} -> return ()
-+    RepoLocalNoIndex{} -> return ()
-     RepoRemote{..} -> do
-       downloadResult <- downloadIndex transport verbosity repoRemote repoLocalDir
-       case downloadResult of
-diff --git a/Distribution/Client/Utils/Json.hs b/Distribution/Client/Utils/Json.hs
-index 89a13af87a4..01d5753136b 100644
---- a/Distribution/Client/Utils/Json.hs
-+++ b/Distribution/Client/Utils/Json.hs
-@@ -15,12 +15,9 @@ module Distribution.Client.Utils.Json
-     )
-     where
- 
--import Data.Char
--import Data.Int
--import Data.String
--import Data.Word
--import Data.List
--import Data.Monoid
-+import Distribution.Client.Compat.Prelude
-+
-+import Data.Char (intToDigit)
- 
- import Data.ByteString.Builder (Builder)
- import qualified Data.ByteString.Builder as BB
-@@ -135,13 +132,13 @@ encodeArrayBB :: [Value] -> Builder
- encodeArrayBB [] = "[]"
- encodeArrayBB jvs = BB.char8 '[' <> go jvs <> BB.char8 ']'
-   where
--    go = Data.Monoid.mconcat . intersperse (BB.char8 ',') . map encodeValueBB
-+    go = mconcat . intersperse (BB.char8 ',') . map encodeValueBB
- 
- encodeObjectBB :: Object -> Builder
- encodeObjectBB [] = "{}"
- encodeObjectBB jvs = BB.char8 '{' <> go jvs <> BB.char8 '}'
-   where
--    go = Data.Monoid.mconcat . intersperse (BB.char8 ',') . map encPair
-+    go = mconcat . intersperse (BB.char8 ',') . map encPair
-     encPair (l,x) = encodeStringBB l <> BB.char8 ':' <> encodeValueBB x
- 
- encodeStringBB :: String -> Builder
-diff --git a/Distribution/Solver/Modular/Assignment.hs b/Distribution/Solver/Modular/Assignment.hs
-index be5e63bfbc1..b05a099ec5a 100644
---- a/Distribution/Solver/Modular/Assignment.hs
-+++ b/Distribution/Solver/Modular/Assignment.hs
-@@ -9,10 +9,11 @@ module Distribution.Solver.Modular.Assignment
- import Prelude ()
- import Distribution.Solver.Compat.Prelude hiding (pi)
- 
--import Data.Array as A
--import Data.List as L
--import Data.Map as M
--import Data.Maybe
-+import qualified Data.Array as A
-+import qualified Data.List as L
-+import qualified Data.Map as M
-+
-+import Data.Maybe (fromJust)
- 
- import Distribution.PackageDescription (FlagAssignment, mkFlagAssignment) -- from Cabal
- 
-@@ -79,7 +80,7 @@ toCPs (A pa fa sa) rdm =
-     -- Dependencies per package.
-     depp :: QPN -> [(Component, PI QPN)]
-     depp qpn = let v :: Vertex
--                   v   = fromJust (cvm qpn)
-+                   v   = fromJust (cvm qpn) -- TODO: why this is safe?
-                    dvs :: [(Component, Vertex)]
-                    dvs = tg A.! v
-                in L.map (\ (comp, dv) -> case vm dv of (_, x, _) -> (comp, PI x (pa M.! x))) dvs
-diff --git a/Distribution/Solver/Modular/Builder.hs b/Distribution/Solver/Modular/Builder.hs
-index eb11a36aa16..5d196f4fd9f 100644
---- a/Distribution/Solver/Modular/Builder.hs
-+++ b/Distribution/Solver/Modular/Builder.hs
-@@ -19,10 +19,10 @@ module Distribution.Solver.Modular.Builder (
- -- flag-guarded dependencies, we cannot introduce them immediately. Instead, we
- -- store the entire dependency.
- 
--import Data.List as L
--import Data.Map as M
--import Data.Set as S
--import Prelude hiding (sequence, mapM)
-+import qualified Data.List as L
-+import qualified Data.Map as M
-+import qualified Data.Set as S
-+import Prelude
- 
- import qualified Distribution.Solver.Modular.ConflictSet as CS
- import Distribution.Solver.Modular.Dependency
-@@ -55,7 +55,7 @@ data BuildState = BS {
- }
- 
- -- | Map of available linking targets.
--type LinkingState = Map (PN, I) [PackagePath]
-+type LinkingState = M.Map (PN, I) [PackagePath]
- 
- -- | Extend the set of open goals with the new goals listed.
- --
-diff --git a/Distribution/Solver/Modular/Index.hs b/Distribution/Solver/Modular/Index.hs
-index fdddfc8237a..ac60fec7d65 100644
---- a/Distribution/Solver/Modular/Index.hs
-+++ b/Distribution/Solver/Modular/Index.hs
-@@ -6,10 +6,12 @@ module Distribution.Solver.Modular.Index
-     , mkIndex
-     ) where
- 
--import Data.List as L
--import Data.Map as M
- import Prelude hiding (pi)
- 
-+import Data.Map (Map)
-+import qualified Data.List as L
-+import qualified Data.Map as M
-+
- import Distribution.Solver.Modular.Dependency
- import Distribution.Solver.Modular.Flag
- import Distribution.Solver.Modular.Package
-diff --git a/Distribution/Solver/Modular/IndexConversion.hs b/Distribution/Solver/Modular/IndexConversion.hs
-index c9565c80dba..8e9ef614184 100644
---- a/Distribution/Solver/Modular/IndexConversion.hs
-+++ b/Distribution/Solver/Modular/IndexConversion.hs
-@@ -2,12 +2,12 @@ module Distribution.Solver.Modular.IndexConversion
-     ( convPIs
-     ) where
- 
--import Data.List as L
-+import qualified Data.List as L
- import Data.Map.Strict (Map)
- import qualified Data.Map.Strict as M
--import Data.Maybe
-+import Data.Maybe (mapMaybe, fromMaybe, maybeToList)
- import Data.Monoid as Mon
--import Data.Set as S
-+import qualified Data.Set as S
- 
- import Distribution.Compiler
- import Distribution.InstalledPackageInfo as IPI
-@@ -330,7 +330,7 @@ flagInfo (StrongFlags strfl) =
- 
- -- | Internal package names, which should not be interpreted as true
- -- dependencies.
--type IPNs = Set PN
-+type IPNs = S.Set PN
- 
- -- | Convenience function to delete a 'Dependency' if it's
- -- for a 'PN' that isn't actually real.
-diff --git a/Distribution/Solver/Modular/Solver.hs b/Distribution/Solver/Modular/Solver.hs
-index 32452550556..e6aa1fb4374 100644
---- a/Distribution/Solver/Modular/Solver.hs
-+++ b/Distribution/Solver/Modular/Solver.hs
-@@ -9,9 +9,9 @@ module Distribution.Solver.Modular.Solver
-     , PruneAfterFirstSuccess(..)
-     ) where
- 
--import Data.Map as M
--import Data.List as L
--import Data.Set as S
-+import qualified Data.Map as M
-+import qualified Data.List as L
-+import qualified Data.Set as S
- import Distribution.Verbosity
- 
- import Distribution.Compiler (CompilerInfo)
-@@ -91,8 +91,8 @@ solve :: SolverConfig                         -- ^ solver parameters
-       -> Index                                -- ^ all available packages as an index
-       -> PkgConfigDb                          -- ^ available pkg-config pkgs
-       -> (PN -> PackagePreferences)           -- ^ preferences
--      -> Map PN [LabeledPackageConstraint]    -- ^ global constraints
--      -> Set PN                               -- ^ global goals
-+      -> M.Map PN [LabeledPackageConstraint]  -- ^ global constraints
-+      -> S.Set PN                             -- ^ global goals
-       -> RetryLog Message SolverFailure (Assignment, RevDepMap)
- solve sc cinfo idx pkgConfigDB userPrefs userConstraints userGoals =
-   explorePhase     $
-@@ -232,7 +232,7 @@ instance GSimpleTree (Tree d c) where
- 
-       -- Show conflict set
-       goCS :: ConflictSet -> String
--      goCS cs = "{" ++ (intercalate "," . L.map showVar . CS.toList $ cs) ++ "}"
-+      goCS cs = "{" ++ (L.intercalate "," . L.map showVar . CS.toList $ cs) ++ "}"
- #endif
- 
- -- | Replace all goal reasons with a dummy goal reason in the tree
-diff --git a/Distribution/Solver/Modular/Validate.hs b/Distribution/Solver/Modular/Validate.hs
-index 6195d101b02..a3dec6e1f67 100644
---- a/Distribution/Solver/Modular/Validate.hs
-+++ b/Distribution/Solver/Modular/Validate.hs
-@@ -15,11 +15,12 @@ module Distribution.Solver.Modular.Validate (validateTree) where
- import Control.Applicative
- import Control.Monad.Reader hiding (sequence)
- import Data.Function (on)
--import Data.List as L
--import Data.Set as S
- import Data.Traversable
- import Prelude hiding (sequence)
- 
-+import qualified Data.List as L
-+import qualified Data.Set as S
-+
- import Language.Haskell.Extension (Extension, Language)
- 
- import Data.Map.Strict as M
-diff --git a/bootstrap.sh b/bootstrap.sh
-index 077d7f4efd2..d5141660474 100755
---- a/bootstrap.sh
-+++ b/bootstrap.sh
-@@ -260,9 +260,9 @@ EDIT_DISTANCE_VER="0.2.2.1"; EDIT_DISTANCE_VER_REGEXP="0\.2\.2\.?"
-                        # 0.2.2.*
- ED25519_VER="0.0.5.0"; ED25519_VER_REGEXP="0\.0\.?"
-                        # 0.0.*
--HACKAGE_SECURITY_VER="0.6.0.0"; HACKAGE_SECURITY_VER_REGEXP="0\.6\."
--                       # >= 0.7.0.0 && < 0.7
--TAR_VER="0.5.1.0";     TAR_VER_REGEXP="0\.5\.([1-9]|1[0-9]|0\.[3-9]|0\.1[0-9])\.?"
-+HACKAGE_SECURITY_VER="0.6.0.1"; HACKAGE_SECURITY_VER_REGEXP="0\.6\."
-+                       # >= 0.6.0.0 && < 0.7
-+TAR_VER="0.5.1.1";     TAR_VER_REGEXP="0\.5\.([1-9]|1[0-9]|0\.[3-9]|0\.1[0-9])\.?"
-                        # >= 0.5.0.3  && < 0.6
- DIGEST_VER="0.0.1.2"; DIGEST_REGEXP="0\.0\.(1\.[2-9]|[2-9]\.?)"
-                        # >= 0.0.1.2 && < 0.1
-diff --git a/cabal-install.cabal b/cabal-install.cabal
-index 985ea9a5a69..c9d713c29fe 100644
---- a/cabal-install.cabal
-+++ b/cabal-install.cabal
-@@ -316,7 +316,7 @@ executable cabal
-     build-depends:
-         async      >= 2.0      && < 2.3,
-         array      >= 0.4      && < 0.6,
--        base       >= 4.8      && < 4.14,
-+        base       >= 4.8      && < 4.15,
-         base16-bytestring >= 0.1.1 && < 0.2,
-         binary     >= 0.7.3    && < 0.9,
-         bytestring >= 0.10.6.0 && < 0.11,
-@@ -341,7 +341,7 @@ executable cabal
-         time       >= 1.5.0.1  && < 1.10,
-         transformers >= 0.4.2.0 && < 0.6,
-         zlib       >= 0.5.3    && < 0.7,
--        hackage-security >= 0.6.0.0 && < 0.7,
-+        hackage-security >= 0.6.0.1 && < 0.7,
-         text       >= 1.2.3    && < 1.3,
-         parsec     >= 3.1.13.0 && < 3.2
- 
-diff --git a/tests/IntegrationTests2/targets/complex/q/q.cabal b/tests/IntegrationTests2/targets/complex/q/q.cabal
-index 556fa4a4202..7ee22fcb28d 100644
---- a/tests/IntegrationTests2/targets/complex/q/q.cabal
-+++ b/tests/IntegrationTests2/targets/complex/q/q.cabal
-@@ -5,7 +5,8 @@ cabal-version: >= 1.2
- 
- library
-   exposed-modules: Q
--  build-depends: base, filepath
-+  -- we rely that filepath has filepath-tests component
-+  build-depends: base, filepath >=1.4.0.0
- 
- executable buildable-false
-   main-is: Main.hs
diff --git a/gnu/packages/patches/ddclient-skip-test.patch b/gnu/packages/patches/ddclient-skip-test.patch
new file mode 100644
index 0000000000..28d748997b
--- /dev/null
+++ b/gnu/packages/patches/ddclient-skip-test.patch
@@ -0,0 +1,43 @@
+From e5657802025f238b39581534f3b4d408565c8943 Mon Sep 17 00:00:00 2001
+From: Bruno Victal <mirai@makinata.eu>
+Date: Sun, 5 Feb 2023 21:05:00 +0000
+Subject: [PATCH] Disable sandbox incompatible tests.
+
+See: https://github.com/ddclient/ddclient/issues/465
+---
+ t/get_ip_from_if.pl | 21 ---------------------
+ 1 file changed, 21 deletions(-)
+
+diff --git a/t/get_ip_from_if.pl b/t/get_ip_from_if.pl
+index 6f08e5d..d78c3d0 100644
+--- a/t/get_ip_from_if.pl
++++ b/t/get_ip_from_if.pl
+@@ -39,25 +39,4 @@ subtest "get_ip_from_interface tests" => sub {
+     }
+ };
+ 
+-subtest "Get default interface and IP for test system" => sub {
+-    my $interface = ddclient::get_default_interface(4);
+-    if ($interface) {
+-        isnt($interface, "lo", "Check for loopback 'lo'");
+-        isnt($interface, "lo0", "Check for loopback 'lo0'");
+-        my $ip1 = ddclient::get_ip_from_interface("default", 4);
+-        my $ip2 = ddclient::get_ip_from_interface($interface, 4);
+-        is($ip1, $ip2, "Check IPv4 from default interface");
+-        ok(ddclient::is_ipv4($ip1), "Valid IPv4 from get_ip_from_interface($interface)");
+-    }
+-    $interface = ddclient::get_default_interface(6);
+-    if ($interface) {
+-        isnt($interface, "lo", "Check for loopback 'lo'");
+-        isnt($interface, "lo0", "Check for loopback 'lo0'");
+-        my $ip1 = ddclient::get_ip_from_interface("default", 6);
+-        my $ip2 = ddclient::get_ip_from_interface($interface, 6);
+-        is($ip1, $ip2, "Check IPv6 from default interface");
+-        ok(ddclient::is_ipv6($ip1), "Valid IPv6 from get_ip_from_interface($interface)");
+-    }
+-};
+-
+ done_testing();
+-- 
+2.38.1
+
diff --git a/gnu/packages/patches/elm-ghc9.2.patch b/gnu/packages/patches/elm-ghc9.2.patch
new file mode 100644
index 0000000000..7b1e653e80
--- /dev/null
+++ b/gnu/packages/patches/elm-ghc9.2.patch
@@ -0,0 +1,187 @@
+From f88043586337ba33cf3e852908003a71dfe493ec Mon Sep 17 00:00:00 2001
+From: vlkrs <codeberg@schlecht.dev>
+Date: Sat, 7 May 2022 17:51:15 +0200
+Subject: [PATCH] Quick hack to build on ghc-9.2.2
+
+Taken from
+https://codeberg.org/vlkrs/elm-compiler/commit/f88043586337ba33cf3e852908003a71dfe493ec.patch
+
+diff --git a/compiler/src/Data/Name.hs b/compiler/src/Data/Name.hs
+index beecf114..39b64029 100644
+--- a/compiler/src/Data/Name.hs
++++ b/compiler/src/Data/Name.hs
+@@ -47,6 +47,7 @@ import qualified Data.Utf8 as Utf8
+ import GHC.Exts
+   ( Int(I#), Ptr
+   , MutableByteArray#
++  , int8ToInt#
+   , isTrue#
+   , newByteArray#
+   , sizeofByteArray#
+@@ -241,7 +242,7 @@ fromTypeVariable name@(Utf8.Utf8 ba#) index =
+   else
+     let
+       len# = sizeofByteArray# ba#
+-      end# = indexWord8Array# ba# (len# -# 1#)
++      end# = word8ToWord# (indexWord8Array# ba# (len# -# 1#))
+     in
+     if isTrue# (leWord# 0x30## end#) && isTrue# (leWord# end# 0x39##) then
+       runST
+@@ -316,11 +317,11 @@ fromManyNames names =
+         ST $ \s ->
+           case newByteArray# (len# +# 3#) s of
+             (# s, mba# #) ->
+-              case writeWord8Array# mba# 0# 0x5F## {-_-} s of
++              case writeWord8Array# mba# 0# (wordToWord8# 0x5F##) {-_-} s of
+                 s ->
+-                  case writeWord8Array# mba# 1# 0x4D## {-M-} s of
++                  case writeWord8Array# mba# 1# (wordToWord8# 0x4D##) {-M-} s of
+                     s ->
+-                      case writeWord8Array# mba# 2# 0x24## {-$-} s of
++                      case writeWord8Array# mba# 2# (wordToWord8# 0x24##) {-$-} s of
+                         s ->
+                           case copyByteArray# ba# 0# mba# 3# len# s of
+                             s ->
+diff --git a/compiler/src/Data/Utf8.hs b/compiler/src/Data/Utf8.hs
+index e985aa64..472777df 100644
+--- a/compiler/src/Data/Utf8.hs
++++ b/compiler/src/Data/Utf8.hs
+@@ -109,10 +109,10 @@ contains (W8# word#) (Utf8 ba#) =
+   containsHelp word# ba# 0# (sizeofByteArray# ba#)
+ 
+ 
+-containsHelp :: Word# -> ByteArray# -> Int# -> Int# -> Bool
++containsHelp :: Word8# -> ByteArray# -> Int# -> Int# -> Bool
+ containsHelp word# ba# !offset# len# =
+   if isTrue# (offset# <# len#) then
+-    if isTrue# (eqWord# word# (indexWord8Array# ba# offset#))
++    if isTrue# (eqWord8# word# (indexWord8Array# ba# offset#))
+       then True
+       else containsHelp word# ba# (offset# +# 1#) len#
+   else
+@@ -147,10 +147,10 @@ startsWithChar isGood bytes@(Utf8 ba#) =
+     let
+       !w# = indexWord8Array# ba# 0#
+       !char
+-        | isTrue# (ltWord# w# 0xC0##) = C# (chr# (word2Int# w#))
+-        | isTrue# (ltWord# w# 0xE0##) = chr2 ba# 0# w#
+-        | isTrue# (ltWord# w# 0xF0##) = chr3 ba# 0# w#
+-        | True                        = chr4 ba# 0# w#
++        | isTrue# (ltWord8# w# (wordToWord8# 0xC0##)) = C# (chr# (int8ToInt# (word8ToInt8# w#)))
++        | isTrue# (ltWord8# w# (wordToWord8# 0xE0##)) = chr2 ba# 0# (word8ToWord# w#)
++        | isTrue# (ltWord8# w# (wordToWord8# 0xF0##)) = chr3 ba# 0# (word8ToWord# w#)
++        | True                        = chr4 ba# 0# (word8ToWord# w#)
+     in
+     isGood char
+ 
+@@ -164,7 +164,7 @@ endsWithWord8 (W8# w#) (Utf8 ba#) =
+   let len# = sizeofByteArray# ba# in
+   isTrue# (len# ># 0#)
+   &&
+-  isTrue# (eqWord# w# (indexWord8Array# ba# (len# -# 1#)))
++  isTrue# (eqWord8# w# (indexWord8Array# ba# (len# -# 1#)))
+ 
+ 
+ 
+@@ -186,11 +186,11 @@ splitHelp str start offsets =
+       unsafeSlice str start offset : splitHelp str (offset + 1) offsets
+ 
+ 
+-findDividers :: Word# -> ByteArray# -> Int# -> Int# -> [Int] -> [Int]
++findDividers :: Word8# -> ByteArray# -> Int# -> Int# -> [Int] -> [Int]
+ findDividers divider# ba# !offset# len# revOffsets =
+   if isTrue# (offset# <# len#) then
+     findDividers divider# ba# (offset# +# 1#) len# $
+-      if isTrue# (eqWord# divider# (indexWord8Array# ba# offset#))
++      if isTrue# (eqWord8# divider# (indexWord8Array# ba# offset#))
+       then I# offset# : revOffsets
+       else revOffsets
+   else
+@@ -353,10 +353,10 @@ toCharsHelp ba# offset# len# =
+     let
+       !w# = indexWord8Array# ba# offset#
+       !(# char, width# #)
+-        | isTrue# (ltWord# w# 0xC0##) = (# C# (chr# (word2Int# w#)), 1# #)
+-        | isTrue# (ltWord# w# 0xE0##) = (# chr2 ba# offset# w#, 2# #)
+-        | isTrue# (ltWord# w# 0xF0##) = (# chr3 ba# offset# w#, 3# #)
+-        | True                        = (# chr4 ba# offset# w#, 4# #)
++        | isTrue# (ltWord8# w# (wordToWord8# 0xC0##)) = (# C# (chr# (int8ToInt# (word8ToInt8# w#))), 1# #)
++        | isTrue# (ltWord8# w# (wordToWord8# 0xE0##)) = (# chr2 ba# offset# (word8ToWord# w#), 2# #)
++        | isTrue# (ltWord8# w# (wordToWord8# 0xF0##)) = (# chr3 ba# offset# (word8ToWord# w#), 3# #)
++        | True                        = (# chr4 ba# offset# (word8ToWord# w#), 4# #)
+ 
+       !newOffset# = offset# +# width#
+     in
+@@ -368,7 +368,7 @@ chr2 :: ByteArray# -> Int# -> Word# -> Char
+ chr2 ba# offset# firstWord# =
+   let
+     !i1# = word2Int# firstWord#
+-    !i2# = word2Int# (indexWord8Array# ba# (offset# +# 1#))
++    !i2# = int8ToInt# (word8ToInt8# (indexWord8Array# ba# (offset# +# 1#)))
+     !c1# = uncheckedIShiftL# (i1# -# 0xC0#) 6#
+     !c2# = i2# -# 0x80#
+   in
+@@ -380,8 +380,8 @@ chr3 :: ByteArray# -> Int# -> Word# -> Char
+ chr3 ba# offset# firstWord# =
+   let
+     !i1# = word2Int# firstWord#
+-    !i2# = word2Int# (indexWord8Array# ba# (offset# +# 1#))
+-    !i3# = word2Int# (indexWord8Array# ba# (offset# +# 2#))
++    !i2# = int8ToInt# (word8ToInt8# (indexWord8Array# ba# (offset# +# 1#)))
++    !i3# = int8ToInt# (word8ToInt8# (indexWord8Array# ba# (offset# +# 2#)))
+     !c1# = uncheckedIShiftL# (i1# -# 0xE0#) 12#
+     !c2# = uncheckedIShiftL# (i2# -# 0x80#) 6#
+     !c3# = i3# -# 0x80#
+@@ -394,9 +394,9 @@ chr4 :: ByteArray# -> Int# -> Word# -> Char
+ chr4 ba# offset# firstWord# =
+   let
+     !i1# = word2Int# firstWord#
+-    !i2# = word2Int# (indexWord8Array# ba# (offset# +# 1#))
+-    !i3# = word2Int# (indexWord8Array# ba# (offset# +# 2#))
+-    !i4# = word2Int# (indexWord8Array# ba# (offset# +# 3#))
++    !i2# = int8ToInt# (word8ToInt8# (indexWord8Array# ba# (offset# +# 1#)))
++    !i3# = int8ToInt# (word8ToInt8# (indexWord8Array# ba# (offset# +# 2#)))
++    !i4# = int8ToInt# (word8ToInt8# (indexWord8Array# ba# (offset# +# 3#)))
+     !c1# = uncheckedIShiftL# (i1# -# 0xF0#) 18#
+     !c2# = uncheckedIShiftL# (i2# -# 0x80#) 12#
+     !c3# = uncheckedIShiftL# (i3# -# 0x80#) 6#
+@@ -471,7 +471,7 @@ toEscapedBuilderHelp before after !name@(Utf8 ba#) k =
+ escape :: Word8 -> Word8 -> Ptr a -> Utf8 t -> Int -> Int -> Int -> IO ()
+ escape before@(W8# before#) after ptr name@(Utf8 ba#) offset@(I# offset#) len@(I# len#) i@(I# i#) =
+   if isTrue# (i# <# len#) then
+-    if isTrue# (eqWord# before# (indexWord8Array# ba# (offset# +# i#)))
++    if isTrue# (eqWord8# before# (indexWord8Array# ba# (offset# +# i#)))
+     then
+       do  writeWordToPtr ptr i after
+           escape before after ptr name offset len (i + 1)
+diff --git a/compiler/src/Parse/Primitives.hs b/compiler/src/Parse/Primitives.hs
+index bb973193..3747cfac 100644
+--- a/compiler/src/Parse/Primitives.hs
++++ b/compiler/src/Parse/Primitives.hs
+@@ -82,7 +82,7 @@ instance Functor (Parser x) where
+ 
+ instance Applicative.Applicative (Parser x) where
+   {-# INLINE pure #-}
+-  pure = return
++  pure = pure
+ 
+   {-# INLINE (<*>) #-}
+   (<*>) (Parser parserFunc) (Parser parserArg) =
+diff --git a/compiler/src/Parse/Variable.hs b/compiler/src/Parse/Variable.hs
+index f3d86145..5e0ea802 100644
+--- a/compiler/src/Parse/Variable.hs
++++ b/compiler/src/Parse/Variable.hs
+@@ -22,6 +22,7 @@ import qualified Data.Set as Set
+ import Data.Word (Word8)
+ import Foreign.Ptr (Ptr, plusPtr)
+ import GHC.Exts (Char(C#), Int#, (+#), (-#), chr#, uncheckedIShiftL#, word2Int#)
++import GHC.Prim
+ import GHC.Word (Word8(W8#))
+ 
+ import qualified AST.Source as Src
+@@ -384,4 +385,4 @@ chr4 pos firstWord =
+ 
+ unpack :: Word8 -> Int#
+ unpack (W8# word#) =
+-  word2Int# word#
++  int8ToInt# (word8ToInt8# word#)
diff --git a/gnu/packages/patches/emacs-pasp-mode-quote-file-names.patch b/gnu/packages/patches/emacs-pasp-mode-quote-file-names.patch
new file mode 100644
index 0000000000..39dc5d0253
--- /dev/null
+++ b/gnu/packages/patches/emacs-pasp-mode-quote-file-names.patch
@@ -0,0 +1,20 @@
+diff --git a/pasp-mode.el b/pasp-mode.el
+index 7f83645..5daf08e 100644
+--- a/pasp-mode.el
++++ b/pasp-mode.el
+@@ -199,9 +199,12 @@
+ Argument ENCODING The current buffer which holds the problem encoding.
+ Optional argument INSTANCE The problem instance which is solved by the encoding.
+   If no instance it is assumed to be also in the encoding file."
+-  (if 'instance
+-      (concat pasp-clingo-path " " pasp-clingo-options " " encoding " " instance)
+-    (concat pasp-clingo-path " " pasp-clingo-options " " encoding)))
++  (if instance
++      (concat pasp-clingo-path " " pasp-clingo-options " "
++              (shell-quote-argument encoding) " "
++              (shell-quote-argument instance))
++    (concat pasp-clingo-path " " pasp-clingo-options " "
++            (shell-quote-argument encoding))))
+ 
+ (defun pasp-run-clingo (encoding &optional instance)
+   "Run Clingo with some ASP input files.
diff --git a/gnu/packages/patches/esmini-no-clutter-log.patch b/gnu/packages/patches/esmini-no-clutter-log.patch
new file mode 100644
index 0000000000..0920244f78
--- /dev/null
+++ b/gnu/packages/patches/esmini-no-clutter-log.patch
@@ -0,0 +1,30 @@
+Don't clutter /tmp with logs.
+
+---
+ EnvironmentSimulator/Modules/CommonMini/CommonMini.cpp | 10 ++--------
+ 1 file changed, 2 insertions(+), 8 deletions(-)
+
+diff --git a/EnvironmentSimulator/Modules/CommonMini/CommonMini.cpp b/EnvironmentSimulator/Modules/CommonMini/CommonMini.cpp
+index 56c655dc..2750f5a6 100644
+--- a/EnvironmentSimulator/Modules/CommonMini/CommonMini.cpp
++++ b/EnvironmentSimulator/Modules/CommonMini/CommonMini.cpp
+@@ -1013,14 +1013,8 @@ void Logger::OpenLogfile(std::string filename)
+ 		file_.open(filename.c_str());
+ 		if (file_.fail())
+ 		{
+-			const char* filename_tmp = std::tmpnam(NULL);
+-			printf("Cannot open log file: %s in working directory. Trying system tmp-file: %s\n",
+-				SE_Env::Inst().GetLogFilePath().c_str(), filename_tmp);
+-			file_.open(filename_tmp);
+-			if (file_.fail())
+-			{
+-				printf("Also failed to open log file: %s. Continue without logfile, still logging to console.\n", filename_tmp);
+-			}
++			printf("Cannot open log file: %s in working directory. Continuing without logfile, still logging to console.\n",
++				filename.c_str());
+ 		}
+ 	}
+ #endif
+-- 
+2.38.1
+
diff --git a/gnu/packages/patches/esmini-use-pkgconfig.patch b/gnu/packages/patches/esmini-use-pkgconfig.patch
new file mode 100644
index 0000000000..73e1b50015
--- /dev/null
+++ b/gnu/packages/patches/esmini-use-pkgconfig.patch
@@ -0,0 +1,541 @@
+Find dependencies via pkg-config.
+
+---
+ CMakeLists.txt                                |  16 +-
+ .../Applications/esmini-dyn/CMakeLists.txt    |   5 +-
+ .../Applications/esmini/CMakeLists.txt        |   1 +
+ EnvironmentSimulator/CMakeLists.txt           | 296 +-----------------
+ .../Modules/Controllers/ControllerSumo.cpp    |   1 -
+ .../Modules/RoadManager/CMakeLists.txt        |   8 +-
+ .../Modules/ScenarioEngine/CMakeLists.txt     |  15 +-
+ 7 files changed, 23 insertions(+), 319 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 156d9448..10ec48f9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,6 +8,7 @@ else()
+   cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
+ endif()
+ 
++include(FindPkgConfig)
+ 
+ project (EnvironmentSimulator)
+ 
+@@ -33,15 +34,10 @@ else ()
+   set (LINUX false)
+ endif ()
+ 
+-if (LINUX OR APPLE OR MINGW OR MSVC)
+-  set(INSTALL_DIRECTORY "${CMAKE_HOME_DIRECTORY}/bin")
+-else ()
+-  message(FATAL_ERROR "Unrecognized platform therefore there isn't an installation directory. Stopping the cmake process.")
+-endif ()
+-
+ set(INSTALL_DIRECTORY_CODE_EXAMPLES "${CMAKE_HOME_DIRECTORY}/code-examples-bin")
+ 
+-set(PUGIXML_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/externals/pugixml")
++find_package(pugixml)
++
+ set(EXPR_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/externals/expr")
+ if(MSVC)
+     set(DIRENT_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/externals/dirent/win")
+@@ -61,10 +57,14 @@ set(ENABLE_SANITIZERS False CACHE BOOL "Enable sanitizers (Only valid for Linux
+ 
+ 
+ if (USE_OSG)
++  pkg_check_modules(OSG REQUIRED openscenegraph osgdb_jpeg osgdb_osg
++                                 osgdb_serializers_osg
++                                 osgdb_serializers_osgsim)
+   add_definitions(-D_USE_OSG)
+ endif (USE_OSG)
+ 
+ if (USE_OSI)
++  find_package(open_simulation_interface REQUIRED)
+   add_definitions(-D_USE_OSI)
+ endif (USE_OSI)
+ 
+@@ -73,6 +73,7 @@ if (USE_SUMO)
+ endif (USE_SUMO)
+ 
+ if (USE_GTEST)
++  find_package(GTest REQUIRED)
+   add_definitions(-D_USE_GTEST)
+ endif (USE_GTEST)
+ 
+@@ -90,5 +91,4 @@ if( NOT EXISTS "test/OSC-ALKS-scenarios/.git" )
+ endif()
+ 
+ # Add variables to global scope, e.g. when esmini is used as submodule
+-set(PUGIXML_INCLUDE_DIR ${PUGIXML_INCLUDE_DIR} CACHE INTERNAL "")
+ set(EXPR_INCLUDE_DIR ${EXPR_INCLUDE_DIR} CACHE INTERNAL "")
+diff --git a/EnvironmentSimulator/Applications/esmini-dyn/CMakeLists.txt b/EnvironmentSimulator/Applications/esmini-dyn/CMakeLists.txt
+index 83d89420..e15062d3 100644
+--- a/EnvironmentSimulator/Applications/esmini-dyn/CMakeLists.txt
++++ b/EnvironmentSimulator/Applications/esmini-dyn/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ 
+ include_directories (
+   ${SCENARIOENGINE_DLL_INCLUDE_DIR}
+-  ${COMMON_MINI_INCLUDE_DIR}  
++  ${COMMON_MINI_INCLUDE_DIR}
+   ${OSI_INCLUDE_DIR}
+ )
+ 
+@@ -19,11 +19,12 @@ link_directories( ${OSI_DIR}/lib )
+ add_executable ( ${TARGET} ${SOURCES} ${INCLUDES} )
+ 
+ 
+-target_link_libraries ( 
++target_link_libraries (
+ 	${TARGET}
+ 	esminiLib
+ 	CommonMini
+ 	${TIME_LIB}
++        pugixml::pugixml
+   project_options
+ )
+ 
+diff --git a/EnvironmentSimulator/Applications/esmini/CMakeLists.txt b/EnvironmentSimulator/Applications/esmini/CMakeLists.txt
+index 6890c26a..a088ebdc 100644
+--- a/EnvironmentSimulator/Applications/esmini/CMakeLists.txt
++++ b/EnvironmentSimulator/Applications/esmini/CMakeLists.txt
+@@ -44,6 +44,7 @@ target_link_libraries (
+ 	${sumo_libs}
+ 	${TIME_LIB}
+     ${SOCK_LIB}
++    pugixml::pugixml
+     project_options
+ )
+ 
+diff --git a/EnvironmentSimulator/CMakeLists.txt b/EnvironmentSimulator/CMakeLists.txt
+index 157e8fe0..e771231a 100644
+--- a/EnvironmentSimulator/CMakeLists.txt
++++ b/EnvironmentSimulator/CMakeLists.txt
+@@ -1,7 +1,3 @@
+-
+-set ( FILE_STORAGE "esmini" ) # "dropbox", "google", "esmini"  (limited GB/Day)
+-set ( MODEL_STORAGE "esmini" ) # "dropbox", "google", "esmini"  (limited GB/Day)
+-
+ set ( VIEWER_BASE_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Modules/ViewerBase" )
+ set ( PLAYER_BASE_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Modules/PlayerBase" )
+ set ( ROADMANAGER_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Modules/RoadManager" )
+@@ -17,88 +13,12 @@ set ( CONTROLLERS_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Modules/Controllers")
+ 
+ # OpenSceneGraph package adapted for this project
+ set ( OSG_VERSION "osg161" )
+-set ( OSG_BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../externals/OpenSceneGraph" )
+-set ( OSI_BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../externals/OSI" )
+-set ( SUMO_BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../externals/SUMO" )
+ 
+ # GoogleTest package
+ set ( GTEST_VERSION "1.10.1" )
+-set ( GTEST_BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../externals/googletest" )
+ 
+ set( CMAKE_VERBOSE_MAKEFILE true )
+ 
+-if ( ${FILE_STORAGE} STREQUAL "dropbox" )
+-    if (APPLE)
+-        set ( OSG_PACKAGE_URL https://www.dropbox.com/s/d0czj6b89p9jyvv/OpenSceneGraph_mac.7z?dl=1 )
+-        set ( OSI_PACKAGE_URL https://www.dropbox.com/s/m62v19gp0m73dte/osi_mac.7z?dl=1 )
+-        set ( SUMO_PACKAGE_URL https://www.dropbox.com/s/0x8kwztk7nmacs1/sumo_mac.7z?dl=1 )
+-    elseif (LINUX)
+-        set ( OSG_PACKAGE_URL https://www.dropbox.com/s/4ug0gmkgdavzyb4/osg_linux_glibc_2_31_gcc_7_5_0.7z?dl=1 )
+-        set ( OSI_PACKAGE_URL https://dl.dropboxusercontent.com/s/kwtdg0c1c8pawa1/osi_linux.7z?dl=1 )
+-        set ( SUMO_PACKAGE_URL https://dl.dropboxusercontent.com/s/gfwtqd3gf76f86a/sumo_linux.7z?dl=1 )
+-        set ( GTEST_PACKAGE_URL https://dl.dropboxusercontent.com/s/si7jsjjsy5bpoym/googletest_linux.7z?dl=1 )
+-    elseif (MSVC)
+-        set ( OSG_PACKAGE_URL https://dl.dropboxusercontent.com/s/e95hnoo782p40uc/OpenSceneGraph_v10.7z?dl=1 )
+-        set ( OSI_PACKAGE_URL https://dl.dropboxusercontent.com/s/an58ckp2qfx5069/osi_v10.7z?dl=1 )
+-        set ( SUMO_PACKAGE_URL https://dl.dropboxusercontent.com/s/5jtpnnd61wonxuh/sumo_v10.7z?dl=1 )
+-        set ( GTEST_PACKAGE_URL https://dl.dropboxusercontent.com/s/aaiehwzc6woqbc6/googletest_v10.7z?dl=1 )
+-    elseif (MINGW)
+-        message("MinGW, enforcing slimmed esmini")
+-    else ()
+-        message ("Unsupported configuration")
+-    endif ()
+-elseif ( ${FILE_STORAGE} STREQUAL "google" )
+-    if (APPLE)
+-        set ( OSG_PACKAGE_URL https://drive.google.com/u/1/uc?id=1mfn_vrcXBoFBekR_t8RXTWB4sD59JD7p&export=download )
+-        set ( OSI_PACKAGE_URL https://drive.google.com/u/1/uc?id=1UVzO8cPQaDU9KVn9v2v8Suj0uUw1dzYI&export=download )
+-        set ( SUMO_PACKAGE_URL https://drive.google.com/u/1/uc?id=1FAve0-MlJPv6lUZy0HvriZI7xstLAzvX&export=download )
+-    elseif (LINUX)
+-        set ( OSG_PACKAGE_URL https://drive.google.com/u/1/uc?id=1Ya1bLp_0-qqlhs67WAwbGW7l37wqP3o2&export=download )
+-        set ( OSI_PACKAGE_URL https://drive.google.com/u/1/uc?id=1Q8O9YciIC0BPEszIKtQ2UW9KcVRZS4iB&export=download )
+-        set ( SUMO_PACKAGE_URL https://drive.google.com/u/1/uc?id=1m4znxNIXapP0D-l21oIm2l7L5ti-JbZH&export=download )
+-        set ( GTEST_PACKAGE_URL https://drive.google.com/u/1/uc?id=1Hyr9eJX2GmgpYwZhx14xOoXlZ2j-FY_p&export=download )
+-    elseif (MSVC)
+-        set ( OSG_PACKAGE_URL https://drive.google.com/u/1/uc?id=1RTag0aUn_pJPK697j0-E72ABW10wZvOm&export=download )
+-        set ( OSI_PACKAGE_URL https://drive.google.com/u/1/uc?id=1pcQcVHUESOk2Wmi-zUA7uzdxxE6iwRJx&export=download )
+-        set ( SUMO_PACKAGE_URL https://drive.google.com/u/1/uc?id=18PhbSLyvs0IGWTAY3YBoYzpVnMFPbOuR&export=download )
+-        set ( GTEST_PACKAGE_URL https://drive.google.com/u/1/uc?id=1So-3gtrmEdW9RhEvVQisj1QFksHM_otU&export=download )
+-    elseif (MINGW)
+-        message("MinGW, enforcing slimmed esmini")
+-    else ()
+-        message ("Unsupported configuration")
+-    endif ()
+-elseif ( ${FILE_STORAGE} STREQUAL "esmini" )
+-    if (APPLE)
+-        set ( OSG_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/OpenSceneGraph_mac.7z )
+-        set ( OSI_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/osi_mac.7z )
+-        set ( SUMO_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/sumo_mac.7z )
+-    elseif (LINUX)
+-        set ( OSG_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/osg_linux_glibc_2_31_gcc_7_5_0.7z )
+-        set ( OSI_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/osi_linux.7z )
+-        set ( SUMO_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/sumo_linux.7z )
+-        set ( GTEST_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/googletest_linux.7z )
+-    elseif (MSVC)
+-        set ( OSG_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/OpenSceneGraph_v10.7z )
+-        set ( OSI_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/osi_v10.7z )
+-        set ( SUMO_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/sumo_v10.7z )
+-        set ( GTEST_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/googletest_v10.7z )
+-    elseif (MINGW)
+-        message("MinGW, enforcing slimmed esmini")
+-    else ()
+-        message ("Unsupported configuration")
+-    endif ()
+-else ()
+-    Message("Unknown storage type: " ${FILE_STORAGE})
+-endif()
+-
+-if ( ${MODEL_STORAGE} STREQUAL "dropbox" )
+-    set ( MODELS_PACKAGE_URL https://dl.dropboxusercontent.com/s/5gk8bvgzqiaaoco/models.7z?dl=0 )
+-elseif ( ${MODEL_STORAGE} STREQUAL "google" )
+-    set ( MODELS_PACKAGE_URL https://drive.google.com/u/1/uc?id=1c3cqRzwY41gWXbg0rmugQkL5I_5L6DH_&export=download )
+-elseif ( ${MODEL_STORAGE} STREQUAL "esmini" )
+-    set ( MODELS_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD779364751/models/models.7z )
+-endif()
+-
+ if (APPLE)
+   set ( EXT_DIR_NAME "mac" )
+   set ( TIME_LIB "" )
+@@ -127,21 +47,8 @@ set ( OSI_DIR "${OSI_BASE_DIR}/${EXT_DIR_NAME}" )
+ set ( SUMO_DIR "${SUMO_BASE_DIR}/${EXT_DIR_NAME}" )
+ set ( GTEST_DIR "${GTEST_BASE_DIR}/${EXT_DIR_NAME}" )
+ 
+-set ( OSG_INCLUDE_DIR
+-    "${OSG_DIR}/build/include"
+-    "${OSG_DIR}/include"
+-)
+-set ( OSG_LIBRARIES_PATH
+-    "${OSG_DIR}/lib"
+-    "${OSG_DIR}/lib/osgPlugins-3.6.5"
+-)
+-
+ set ( OSI_INCLUDE_DIR "${OSI_DIR}/include" )
+-if (DYN_PROTOBUF)
+-  set ( OSI_LIBRARIES_PATH "${OSI_DIR}/lib-dyn" )
+-else ()
+-  set ( OSI_LIBRARIES_PATH "${OSI_DIR}/lib" )
+-endif (DYN_PROTOBUF)
++set ( OSI_LIBRARIES_PATH "${OSI_DIR}/lib" )
+ 
+ set ( SUMO_INCLUDE_DIR "${SUMO_DIR}/include" )
+ set ( SUMO_LIBRARIES_PATH "${SUMO_DIR}/lib" )
+@@ -153,74 +60,6 @@ link_directories(${OSG_LIBRARIES_PATH} ${OSI_LIBRARIES_PATH} ${SUMO_LIBRARIES_PA
+ 
+ if(APPLE)
+   SET(CMAKE_CXX_FLAGS "${CXX_STD_FLAG} -std=c++14 -pthread -fPIC -flto -DGL_SILENCE_DEPRECATION -Wl,-dead_strip")
+-  
+-  set ( OSG_LIBRARIES
+-    osg
+-    osgViewer
+-    osgDB
+-    osgdb_serializers_osgsim
+-    osgdb_serializers_osg
+-    osgGA
+-    osgText
+-    osgSim
+-    osgdb_osg
+-    osgdb_jpeg
+-    osgUtil
+-    osgAnimation
+-    osg
+-    OpenThreads
+-    jpeg
+-    "-framework OpenGL"
+-    "-framework Cocoa"
+-    dl
+-    z
+-  )
+-
+-  if (DYN_PROTOBUF)
+-    set ( OSI_LIBRARIES
+-      open_simulation_interface
+-      protobuf
+-    )
+-  else ()
+-    set ( OSI_LIBRARIES
+-      open_simulation_interface_pic
+-      protobuf
+-    )
+-  endif (DYN_PROTOBUF)
+-
+-
+-  set ( SUMO_LIBRARIES
+-    optimized libsumostatic debug libsumostaticd
+-    optimized netload debug netloadd
+-    optimized traciserver debug traciserverd
+-    optimized libsumostatic debug libsumostaticd
+-    optimized utils_vehicle debug utils_vehicled
+-    optimized utils_distribution debug utils_distributiond
+-    optimized utils_shapes debug utils_shapesd
+-    optimized utils_options debug utils_optionsd
+-    optimized utils_xml debug utils_xmld
+-    optimized utils_geom debug utils_geomd
+-    optimized utils_common debug utils_commond
+-    optimized utils_iodevices debug utils_iodevicesd
+-    optimized utils_traction_wire debug utils_traction_wired
+-    optimized utils_emissions debug utils_emissionsd
+-    optimized microsim_engine debug microsim_engined
+-    optimized microsim_lcmodels debug microsim_lcmodelsd
+-    optimized microsim_devices debug microsim_devicesd
+-    optimized microsim_trigger debug microsim_triggerd
+-    optimized microsim_output debug microsim_outputd
+-    optimized microsim_transportables debug microsim_transportablesd
+-    optimized microsim_actions debug microsim_actionsd
+-    optimized microsim_traffic_lights debug microsim_traffic_lightsd
+-    optimized microsim debug microsimd
+-    optimized mesosim debug mesosimd
+-    optimized foreign_phemlight debug foreign_phemlightd
+-    optimized foreign_tcpip debug foreign_tcpipd
+-    optimized microsim_cfmodels debug microsim_cfmodelsd
+-    optimized zlibstatic debug zlibstaticd
+-    optimized xerces-c_3 debug xerces-c_3D
+-    "-framework CoreServices"
+-  )
+ 
+ elseif(LINUX)
+ 
+@@ -251,82 +90,8 @@ elseif(LINUX)
+     SET(CMAKE_CXX_FLAGS "${CXX_STD_FLAG} -pthread -fPIC -Wl,-strip-all")
+   endif()
+ 
+-  set ( OSG_LIBRARIES
+-    optimized osg debug osgd
+-    optimized osgViewer debug osgViewerd
+-    optimized osgDB debug osgDBd
+-    optimized osgdb_serializers_osgsim debug osgdb_serializers_osgsimd
+-    optimized osgdb_serializers_osg debug osgdb_serializers_osgd
+-    optimized osgGA debug osgGAd
+-    optimized osgText debug osgTextd
+-    optimized osgSim debug osgSimd
+-    optimized osgdb_osg debug osgdb_osgd
+-    optimized osgdb_jpeg debug osgdb_jpegd
+-    optimized osgUtil debug osgUtild
+-    optimized osgAnimation debug osgAnimationd
+-    optimized osg debug osgd
+-    optimized OpenThreads debug OpenThreadsd
+-    optimized jpeg debug jpegd
+-
+-    GL
+-    X11
+-    Xrandr
+-    dl
+-    z
+-    Xinerama
+-    fontconfig
+-  )
+-
+-  if (DYN_PROTOBUF)
+-    set ( OSI_LIBRARIES
+-      optimized open_simulation_interface debug open_simulation_interfaced
+-      optimized protobuf debug protobufd
+-    )
+-  else ()
+-    set ( OSI_LIBRARIES
+-      optimized open_simulation_interface_pic debug open_simulation_interface_picd
+-      optimized protobuf debug protobufd
+-    )
+-  endif (DYN_PROTOBUF)
+-
+-  set ( SUMO_LIBRARIES
+-    optimized libsumostatic debug libsumostaticd
+-    optimized netload debug netloadd
+-    optimized traciserver debug traciserverd
+-    optimized libsumostatic debug libsumostaticd
+-    optimized utils_vehicle debug utils_vehicled
+-    optimized utils_distribution debug utils_distributiond
+-    optimized utils_shapes debug utils_shapesd
+-    optimized utils_options debug utils_optionsd
+-    optimized utils_xml debug utils_xmld
+-    optimized utils_geom debug utils_geomd
+-    optimized utils_common debug utils_commond
+-    optimized utils_iodevices debug utils_iodevicesd
+-    optimized utils_traction_wire debug utils_traction_wired
+-    optimized utils_emissions debug utils_emissionsd
+-    optimized microsim_engine debug microsim_engined
+-    optimized microsim_lcmodels debug microsim_lcmodelsd
+-    optimized microsim_devices debug microsim_devicesd
+-    optimized microsim_trigger debug microsim_triggerd
+-    optimized microsim_output debug microsim_outputd
+-    optimized microsim_transportables debug microsim_transportablesd
+-    optimized microsim_actions debug microsim_actionsd
+-    optimized microsim_traffic_lights debug microsim_traffic_lightsd
+-    optimized microsim debug microsimd
+-    optimized mesosim debug mesosimd
+-    optimized foreign_phemlight debug foreign_phemlightd
+-    optimized foreign_tcpip debug foreign_tcpipd
+-    optimized microsim_cfmodels debug microsim_cfmodelsd
+-    optimized zlibstatic debug zlibstaticd
+-    optimized xerces-c_3 debug xerces-c_3D
+-  )
+-
+-  set (GTEST_LIBRARIES
+-    optimized gmock debug gmockd
+-    optimized gmock_main debug gmock_maind
+-    optimized gtest debug gtestd
+-    optimized gtest_main debug gtest_maind
+-  )
++  set ( OSI_LIBRARIES open_simulation_interface::open_simulation_interface )
++  set ( SUMO_LIBRARIES sumocpp tracicpp )
+ 
+ elseif(MSVC)
+ 
+@@ -510,61 +275,6 @@ FOREACH(subdir ${SUBDIRS})
+     endif ()
+ ENDFOREACH()
+ 
+-
+-#
+-# Download library and content binary packets
+-#
+-
+-function (download_and_extract url target_folder target_filename)
+-    message (STATUS "downloading ${target_filename} ...")
+-    file (DOWNLOAD ${url} ${target_folder}/${target_filename} STATUS DOWNLOAD_STATUS)
+-
+-    if(DOWNLOAD_STATUS AND NOT DOWNLOAD_STATUS EQUAL 0)
+-        message(FATAL_ERROR "FAILED to download ${target_filename} (Status: ${DOWNLOAD_STATUS})")
+-    endif()
+-
+-    execute_process (COMMAND sleep 1)  # allow for file to be completely flushed
+-
+-    message (STATUS "extracting ${target_filename} ... ")
+-    execute_process (COMMAND ${CMAKE_COMMAND} -E tar xfz ${target_filename} WORKING_DIRECTORY ${target_folder} RESULT_VARIABLE STATUS)
+-
+-    if(STATUS AND NOT STATUS EQUAL 0)
+-        message(FATAL_ERROR "FAILED to unpack ${target_filename}")
+-    endif()
+-
+-    file (REMOVE ${target_folder}/${target_filename})
+-endfunction (download_and_extract)
+-
+-# download OpenSceneGraph
+-set ( OSG_PACKAGE_FILENAME "osg.7z" )
+-if (DEFINED OSG_DIR AND (FORCE_DOWNLOAD_BINARIES OR NOT EXISTS ${OSG_DIR} ))
+-    download_and_extract( ${OSG_PACKAGE_URL} ${OSG_BASE_DIR} ${OSG_PACKAGE_FILENAME} )
+-endif()
+-
+-# download OSI
+-set ( OSI_PACKAGE_FILENAME "osi.7z" )
+-if (DEFINED OSI_DIR AND (FORCE_DOWNLOAD_BINARIES OR NOT EXISTS ${OSI_DIR} ))
+-    download_and_extract( ${OSI_PACKAGE_URL} ${OSI_BASE_DIR} ${OSI_PACKAGE_FILENAME} )
+-endif()
+-
+-# download SUMO
+-set ( SUMO_PACKAGE_FILENAME "sumo.7z" )
+-if (DEFINED SUMO_DIR AND (FORCE_DOWNLOAD_BINARIES OR NOT EXISTS ${SUMO_DIR} ))
+-  download_and_extract( ${SUMO_PACKAGE_URL} ${SUMO_BASE_DIR} ${SUMO_PACKAGE_FILENAME} )
+-endif()
+-
+-# download googletest
+-if(NOT (APPLE OR MINGW))  # not available for Mac yet
+-  set ( GTEST_PACKAGE_FILENAME "googletest.7z" )
+-  if (DEFINED GTEST_DIR AND (FORCE_DOWNLOAD_BINARIES OR NOT EXISTS ${GTEST_DIR} ))
+-      download_and_extract( ${GTEST_PACKAGE_URL} ${GTEST_BASE_DIR} ${GTEST_PACKAGE_FILENAME} )
+-  endif()
+-endif()
+-
+-if (DEFINED MODELS_DIR AND (FORCE_DOWNLOAD_BINARIES OR NOT EXISTS ${MODELS_DIR} ))
+-    download_and_extract(${MODELS_PACKAGE_URL} ${MODELS_BASE_DIR} ${MODELS_PACKAGE_FILENAME})
+-endif()
+-
+ add_subdirectory(Applications/odrplot)
+ add_subdirectory(Applications/replayer)
+ 
+diff --git a/EnvironmentSimulator/Modules/Controllers/ControllerSumo.cpp b/EnvironmentSimulator/Modules/Controllers/ControllerSumo.cpp
+index 4c701d94..cb5de5bb 100644
+--- a/EnvironmentSimulator/Modules/Controllers/ControllerSumo.cpp
++++ b/EnvironmentSimulator/Modules/Controllers/ControllerSumo.cpp
+@@ -16,7 +16,6 @@
+ #include "ScenarioGateway.hpp"
+ #include "pugixml.hpp"
+ 
+-#include <utils/geom/PositionVector.h>
+ #include <libsumo/Simulation.h>
+ #include <libsumo/Vehicle.h>
+ #include <libsumo/TraCIDefs.h>
+diff --git a/EnvironmentSimulator/Modules/RoadManager/CMakeLists.txt b/EnvironmentSimulator/Modules/RoadManager/CMakeLists.txt
+index e4fad5f1..32d7a79c 100644
+--- a/EnvironmentSimulator/Modules/RoadManager/CMakeLists.txt
++++ b/EnvironmentSimulator/Modules/RoadManager/CMakeLists.txt
+@@ -2,7 +2,7 @@
+ include_directories (
+   ${PUGIXML_INCLUDE_DIR}
+   ${COMMON_MINI_INCLUDE_DIR}
+-  ${ROADMANAGER_INCLUDE_DIR}  
++  ${ROADMANAGER_INCLUDE_DIR}
+ )
+ 
+ set ( SOURCES
+@@ -11,8 +11,6 @@ set ( SOURCES
+   LaneIndependentRouter.cpp
+ )
+ 
+-set ( SRC_ADDITIONAL ../../../externals/pugixml/pugixml.cpp)
+-
+ SOURCE_GROUP("External Libraries" FILES ${SRC_ADDITIONAL})
+ 
+ set ( INCLUDES
+@@ -25,6 +23,6 @@ if(MSVC)
+ 	add_definitions("/wd4482")
+ endif()
+ 
+-add_library ( RoadManager STATIC ${SOURCES} ${SRC_ADDITIONAL} ${INCLUDES} )
++add_library ( RoadManager STATIC ${SOURCES} ${INCLUDES} )
+ 
+-target_link_libraries ( RoadManager CommonMini project_options)
+\ No newline at end of file
++target_link_libraries ( RoadManager CommonMini pugixml::pugixml project_options)
+diff --git a/EnvironmentSimulator/Modules/ScenarioEngine/CMakeLists.txt b/EnvironmentSimulator/Modules/ScenarioEngine/CMakeLists.txt
+index aec86ad6..86da77c1 100644
+--- a/EnvironmentSimulator/Modules/ScenarioEngine/CMakeLists.txt
++++ b/EnvironmentSimulator/Modules/ScenarioEngine/CMakeLists.txt
+@@ -5,7 +5,7 @@ include_directories (
+   ${ROADMANAGER_INCLUDE_DIR}
+   ${COMMON_MINI_INCLUDE_DIR}
+   ${CONTROLLERS_INCLUDE_DIR}
+-  ${REPLAY_INCLUDE_DIR}  
++  ${REPLAY_INCLUDE_DIR}
+   ${RDB_INCLUDE_DIR}
+   ${OSI_INCLUDE_DIR}
+   ${SUMO_INCLUDE_DIR}
+@@ -20,20 +20,15 @@ if (NOT USE_OSI)
+     list(REMOVE_ITEM SRC_SOURCEFILES "${CMAKE_CURRENT_LIST_DIR}/SourceFiles/OSIReporter.cpp")
+ endif (NOT USE_OSI)
+ 
+-set ( SRC_ADDITIONAL ../../../externals/pugixml/pugixml.cpp )
+-
+ SOURCE_GROUP(OSCTypeDefs FILES ${SRC_OSCTYPEDEFS})
+ SOURCE_GROUP("Source Files" FILES ${SRC_SOURCEFILES})
+ SOURCE_GROUP("External Libraries" FILES ${SRC_ADDITIONAL})
+ 
+-add_library ( ScenarioEngine STATIC 
+-  ${SRC_OSCTYPEDEFS} 
+-  ${SRC_SOURCEFILES} 
+-  ${SRC_ADDITIONAL} 
++add_library ( ScenarioEngine STATIC
++  ${SRC_OSCTYPEDEFS}
++  ${SRC_SOURCEFILES}
+ )
+ 
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+ 
+-target_link_libraries(ScenarioEngine PRIVATE project_options)
+-
+-	
++target_link_libraries(ScenarioEngine PRIVATE pugixml::pugixml project_options)
+-- 
+2.38.1
+
diff --git a/gnu/packages/patches/ghc-9.2-glibc-2.33-link-order.patch b/gnu/packages/patches/ghc-9.2-glibc-2.33-link-order.patch
new file mode 100644
index 0000000000..5d4afa28c1
--- /dev/null
+++ b/gnu/packages/patches/ghc-9.2-glibc-2.33-link-order.patch
@@ -0,0 +1,35 @@
+Slightly modified version of
+https://gitlab.haskell.org/ghc/ghc/-/issues/19029#note_447989, required
+for older, buggy glibc versions < 2.34.
+
+diff -Naur ghc-9.2.5/compiler/GHC/Linker/Unit.hs ghc-9.2.5.patched/compiler/GHC/Linker/Unit.hs
+--- ghc-9.2.5/compiler/GHC/Linker/Unit.hs	2022-11-06 20:40:29.000000000 +0100
++++ ghc-9.2.5.patched/compiler/GHC/Linker/Unit.hs	2023-01-15 14:52:57.511275338 +0100
+@@ -31,11 +31,26 @@
+     ps <- mayThrowUnitErr $ preloadUnitsInfo' unit_env pkgs
+     return (collectLinkOpts dflags ps)
+ 
++fixOrderLinkOpts :: [String] -> [String]
++fixOrderLinkOpts opts
++  | have_bad_glibc_version -- glibc version strictly less than 2.34
++  , let (before, rest) = break (== libc) opts
++  , not (pthread `elem` before)
++  , pthread `elem` rest -- optional if we know pthread is definitely present
++  = before ++ pthread_and_deps ++ rest
++  | otherwise
++  = opts
++  where
++    pthread = "-lpthread"
++    libc = "-lc"
++    pthread_and_deps = [ "-lrt", pthread ] -- should depend on the environment
++    have_bad_glibc_version = True
++
+ collectLinkOpts :: DynFlags -> [UnitInfo] -> ([String], [String], [String])
+ collectLinkOpts dflags ps =
+     (
+         concatMap (map ("-l" ++) . unitHsLibs (ghcNameVersion dflags) (ways dflags)) ps,
+-        concatMap (map ("-l" ++) . map ST.unpack . unitExtDepLibsSys) ps,
++        fixOrderLinkOpts $ concatMap (map ("-l" ++) . map ST.unpack . unitExtDepLibsSys) ps,
+         concatMap (map ST.unpack . unitLinkerOptions) ps
+     )
+ 
diff --git a/gnu/packages/patches/ghc-bloomfilter-ghc9.2.patch b/gnu/packages/patches/ghc-bloomfilter-ghc9.2.patch
new file mode 100644
index 0000000000..97caf2cc9b
--- /dev/null
+++ b/gnu/packages/patches/ghc-bloomfilter-ghc9.2.patch
@@ -0,0 +1,303 @@
+Taken from https://github.com/bos/bloomfilter/pull/20
+
+From fb79b39c44404fd791a3bed973e9d844fb084f1e Mon Sep 17 00:00:00 2001
+From: Simon Jakobi <simon.jakobi@gmail.com>
+Date: Fri, 12 Nov 2021 01:37:36 +0100
+Subject: [PATCH] Fix build with GHC 9.2
+
+The `FastShift.shift{L,R}` methods are replaced with `unsafeShift{L,R}`
+introduced in base-4.5.
+
+Fixes #19.
+---
+ Data/BloomFilter.hs         | 16 +++++------
+ Data/BloomFilter/Hash.hs    | 15 +++++-----
+ Data/BloomFilter/Mutable.hs | 20 +++++++-------
+ Data/BloomFilter/Util.hs    | 55 ++++++-------------------------------
+ bloomfilter.cabal           |  2 +-
+ 5 files changed, 34 insertions(+), 74 deletions(-)
+
+diff --git a/Data/BloomFilter.hs b/Data/BloomFilter.hs
+index 2210cef..6b47c21 100644
+--- a/Data/BloomFilter.hs
++++ b/Data/BloomFilter.hs
+@@ -78,8 +78,8 @@ import Control.DeepSeq (NFData(..))
+ import Data.Array.Base (unsafeAt)
+ import qualified Data.Array.Base as ST
+ import Data.Array.Unboxed (UArray)
+-import Data.Bits ((.&.))
+-import Data.BloomFilter.Util (FastShift(..), (:*)(..))
++import Data.Bits ((.&.), unsafeShiftL, unsafeShiftR)
++import Data.BloomFilter.Util ((:*)(..))
+ import qualified Data.BloomFilter.Mutable as MB
+ import qualified Data.BloomFilter.Mutable.Internal as MB
+ import Data.BloomFilter.Mutable.Internal (Hash, MBloom)
+@@ -98,7 +98,7 @@ data Bloom a = B {
+     }
+ 
+ instance Show (Bloom a) where
+-    show ub = "Bloom { " ++ show ((1::Int) `shiftL` shift ub) ++ " bits } "
++    show ub = "Bloom { " ++ show ((1::Int) `unsafeShiftL` shift ub) ++ " bits } "
+ 
+ instance NFData (Bloom a) where
+     rnf !_ = ()
+@@ -172,7 +172,7 @@ singleton hash numBits elt = create hash numBits (\mb -> MB.insert mb elt)
+ -- | Given a filter's mask and a hash value, compute an offset into
+ -- a word array and a bit offset within that word.
+ hashIdx :: Int -> Word32 -> (Int :* Int)
+-hashIdx mask x = (y `shiftR` logBitsInHash) :* (y .&. hashMask)
++hashIdx mask x = (y `unsafeShiftR` logBitsInHash) :* (y .&. hashMask)
+   where hashMask = 31 -- bitsInHash - 1
+         y = fromIntegral x .&. mask
+ 
+@@ -191,7 +191,7 @@ hashesU ub elt = hashIdx (mask ub) `map` hashes ub elt
+ -- /still/ some possibility that @True@ will be returned.
+ elem :: a -> Bloom a -> Bool
+ elem elt ub = all test (hashesU ub elt)
+-  where test (off :* bit) = (bitArray ub `unsafeAt` off) .&. (1 `shiftL` bit) /= 0
++  where test (off :* bit) = (bitArray ub `unsafeAt` off) .&. (1 `unsafeShiftL` bit) /= 0
+           
+ modify :: (forall s. (MBloom s a -> ST s z))  -- ^ mutation function (result is discarded)
+         -> Bloom a
+@@ -255,11 +255,11 @@ insertList elts = modify $ \mb -> mapM_ (MB.insert mb) elts
+ -- is /still/ some possibility that @True@ will be returned.
+ notElem :: a -> Bloom a -> Bool
+ notElem elt ub = any test (hashesU ub elt)
+-  where test (off :* bit) = (bitArray ub `unsafeAt` off) .&. (1 `shiftL` bit) == 0
++  where test (off :* bit) = (bitArray ub `unsafeAt` off) .&. (1 `unsafeShiftL` bit) == 0
+ 
+ -- | Return the size of an immutable Bloom filter, in bits.
+ length :: Bloom a -> Int
+-length = shiftL 1 . shift
++length = unsafeShiftL 1 . shift
+ 
+ -- | Build an immutable Bloom filter from a seed value.  The seeding
+ -- function populates the filter as follows.
+@@ -318,7 +318,7 @@ fromList hashes numBits = unfold hashes numBits convert
+ logPower2 :: Int -> Int
+ logPower2 k = go 0 k
+     where go j 1 = j
+-          go j n = go (j+1) (n `shiftR` 1)
++          go j n = go (j+1) (n `unsafeShiftR` 1)
+ 
+ -- $overview
+ --
+diff --git a/Data/BloomFilter/Hash.hs b/Data/BloomFilter/Hash.hs
+index 132a3a4..d071fd4 100644
+--- a/Data/BloomFilter/Hash.hs
++++ b/Data/BloomFilter/Hash.hs
+@@ -38,8 +38,7 @@ module Data.BloomFilter.Hash
+     ) where
+ 
+ import Control.Monad (foldM)
+-import Data.Bits ((.&.), (.|.), xor)
+-import Data.BloomFilter.Util (FastShift(..))
++import Data.Bits ((.&.), (.|.), unsafeShiftL, unsafeShiftR, xor)
+ import Data.List (unfoldr)
+ import Data.Int (Int8, Int16, Int32, Int64)
+ import Data.Word (Word8, Word16, Word32, Word64)
+@@ -91,11 +90,11 @@ class Hashable a where
+              -> Word64           -- ^ salt
+              -> IO Word64
+     hashIO64 v salt = do
+-                   let s1 = fromIntegral (salt `shiftR` 32) .&. maxBound
++                   let s1 = fromIntegral (salt `unsafeShiftR` 32) .&. maxBound
+                        s2 = fromIntegral salt
+                    h1 <- hashIO32 v s1
+                    h2 <- hashIO32 v s2
+-                   return $ (fromIntegral h1 `shiftL` 32) .|. fromIntegral h2
++                   return $ (fromIntegral h1 `unsafeShiftL` 32) .|. fromIntegral h2
+ 
+ -- | Compute a 32-bit hash.
+ hash32 :: Hashable a => a -> Word32
+@@ -149,8 +148,8 @@ cheapHashes :: Hashable a => Int -- ^ number of hashes to compute
+ cheapHashes k v = go 0
+     where go i | i == j = []
+                | otherwise = hash : go (i + 1)
+-               where !hash = h1 + (h2 `shiftR` i)
+-          h1 = fromIntegral (h `shiftR` 32)
++               where !hash = h1 + (h2 `unsafeShiftR` i)
++          h1 = fromIntegral (h `unsafeShiftR` 32)
+           h2 = fromIntegral h
+           h = hashSalt64 0x9150a946c4a8966e v
+           j = fromIntegral k
+@@ -163,7 +162,7 @@ instance Hashable Integer where
+                                    (salt `xor` 0x3ece731e)
+                   | otherwise = hashIO32 (unfoldr go k) salt
+         where go 0 = Nothing
+-              go i = Just (fromIntegral i :: Word32, i `shiftR` 32)
++              go i = Just (fromIntegral i :: Word32, i `unsafeShiftR` 32)
+ 
+ instance Hashable Bool where
+     hashIO32 = hashOne32
+@@ -224,7 +223,7 @@ instance Hashable Word64 where
+ -- | A fast unchecked shift.  Nasty, but otherwise GHC 6.8.2 does a
+ -- test and branch on every shift.
+ div4 :: CSize -> CSize
+-div4 k = fromIntegral ((fromIntegral k :: HTYPE_SIZE_T) `shiftR` 2)
++div4 k = fromIntegral ((fromIntegral k :: HTYPE_SIZE_T) `unsafeShiftR` 2)
+ 
+ alignedHash :: Ptr a -> CSize -> Word32 -> IO Word32
+ alignedHash ptr bytes salt
+diff --git a/Data/BloomFilter/Mutable.hs b/Data/BloomFilter/Mutable.hs
+index edff1fc..0bb5cc9 100644
+--- a/Data/BloomFilter/Mutable.hs
++++ b/Data/BloomFilter/Mutable.hs
+@@ -65,9 +65,9 @@ module Data.BloomFilter.Mutable
+ import Control.Monad (liftM, forM_)
+ import Control.Monad.ST (ST)
+ import Data.Array.Base (unsafeRead, unsafeWrite)
+-import Data.Bits ((.&.), (.|.))
++import Data.Bits ((.&.), (.|.), unsafeShiftL, unsafeShiftR)
+ import Data.BloomFilter.Array (newArray)
+-import Data.BloomFilter.Util (FastShift(..), (:*)(..), nextPowerOfTwo)
++import Data.BloomFilter.Util ((:*)(..), nextPowerOfTwo)
+ import Data.Word (Word32)
+ import Data.BloomFilter.Mutable.Internal
+ 
+@@ -86,9 +86,9 @@ new hash numBits = MB hash shft msk `liftM` newArray numElems numBytes
+                 | numBits > maxHash = maxHash
+                 | isPowerOfTwo numBits = numBits
+                 | otherwise = nextPowerOfTwo numBits
+-        numElems = max 2 (twoBits `shiftR` logBitsInHash)
+-        numBytes = numElems `shiftL` logBytesInHash
+-        trueBits = numElems `shiftL` logBitsInHash
++        numElems = max 2 (twoBits `unsafeShiftR` logBitsInHash)
++        numBytes = numElems `unsafeShiftL` logBytesInHash
++        trueBits = numElems `unsafeShiftL` logBitsInHash
+         shft     = logPower2 trueBits
+         msk      = trueBits - 1
+         isPowerOfTwo n = n .&. (n - 1) == 0
+@@ -109,7 +109,7 @@ logBytesInHash = 2 -- logPower2 (sizeOf (undefined :: Hash))
+ -- | Given a filter's mask and a hash value, compute an offset into
+ -- a word array and a bit offset within that word.
+ hashIdx :: Int -> Word32 -> (Int :* Int)
+-hashIdx msk x = (y `shiftR` logBitsInHash) :* (y .&. hashMask)
++hashIdx msk x = (y `unsafeShiftR` logBitsInHash) :* (y .&. hashMask)
+   where hashMask = 31 -- bitsInHash - 1
+         y = fromIntegral x .&. msk
+ 
+@@ -125,7 +125,7 @@ insert mb elt = do
+   let mu = bitArray mb
+   forM_ (hashesM mb elt) $ \(word :* bit) -> do
+       old <- unsafeRead mu word
+-      unsafeWrite mu word (old .|. (1 `shiftL` bit))
++      unsafeWrite mu word (old .|. (1 `unsafeShiftL` bit))
+ 
+ -- | Query a mutable Bloom filter for membership.  If the value is
+ -- present, return @True@.  If the value is not present, there is
+@@ -135,7 +135,7 @@ elem elt mb = loop (hashesM mb elt)
+   where mu = bitArray mb
+         loop ((word :* bit):wbs) = do
+           i <- unsafeRead mu word
+-          if i .&. (1 `shiftL` bit) == 0
++          if i .&. (1 `unsafeShiftL` bit) == 0
+             then return False
+             else loop wbs
+         loop _ = return True
+@@ -145,7 +145,7 @@ elem elt mb = loop (hashesM mb elt)
+ 
+ -- | Return the size of a mutable Bloom filter, in bits.
+ length :: MBloom s a -> Int
+-length = shiftL 1 . shift
++length = unsafeShiftL 1 . shift
+ 
+ 
+ -- | Slow, crummy way of computing the integer log of an integer known
+@@ -153,7 +153,7 @@ length = shiftL 1 . shift
+ logPower2 :: Int -> Int
+ logPower2 k = go 0 k
+     where go j 1 = j
+-          go j n = go (j+1) (n `shiftR` 1)
++          go j n = go (j+1) (n `unsafeShiftR` 1)
+ 
+ -- $overview
+ --
+diff --git a/Data/BloomFilter/Util.hs b/Data/BloomFilter/Util.hs
+index 7f695dc..6ade6e5 100644
+--- a/Data/BloomFilter/Util.hs
++++ b/Data/BloomFilter/Util.hs
+@@ -2,15 +2,11 @@
+ 
+ module Data.BloomFilter.Util
+     (
+-      FastShift(..)
+-    , nextPowerOfTwo
++      nextPowerOfTwo
+     , (:*)(..)
+     ) where
+ 
+-import Data.Bits ((.|.))
+-import qualified Data.Bits as Bits
+-import GHC.Base
+-import GHC.Word
++import Data.Bits ((.|.), unsafeShiftR)
+ 
+ -- | A strict pair type.
+ data a :* b = !a :* !b
+@@ -22,46 +18,11 @@ nextPowerOfTwo :: Int -> Int
+ {-# INLINE nextPowerOfTwo #-}
+ nextPowerOfTwo n =
+     let a = n - 1
+-        b = a .|. (a `shiftR` 1)
+-        c = b .|. (b `shiftR` 2)
+-        d = c .|. (c `shiftR` 4)
+-        e = d .|. (d `shiftR` 8)
+-        f = e .|. (e `shiftR` 16)
+-        g = f .|. (f `shiftR` 32)  -- in case we're on a 64-bit host
++        b = a .|. (a `unsafeShiftR` 1)
++        c = b .|. (b `unsafeShiftR` 2)
++        d = c .|. (c `unsafeShiftR` 4)
++        e = d .|. (d `unsafeShiftR` 8)
++        f = e .|. (e `unsafeShiftR` 16)
++        g = f .|. (f `unsafeShiftR` 32)  -- in case we're on a 64-bit host
+         !h = g + 1
+     in h
+-
+--- | This is a workaround for poor optimisation in GHC 6.8.2.  It
+--- fails to notice constant-width shifts, and adds a test and branch
+--- to every shift.  This imposes about a 10% performance hit.
+-class FastShift a where
+-    shiftL :: a -> Int -> a
+-    shiftR :: a -> Int -> a
+-
+-instance FastShift Word32 where
+-    {-# INLINE shiftL #-}
+-    shiftL (W32# x#) (I# i#) = W32# (x# `uncheckedShiftL#` i#)
+-
+-    {-# INLINE shiftR #-}
+-    shiftR (W32# x#) (I# i#) = W32# (x# `uncheckedShiftRL#` i#)
+-
+-instance FastShift Word64 where
+-    {-# INLINE shiftL #-}
+-    shiftL (W64# x#) (I# i#) = W64# (x# `uncheckedShiftL64#` i#)
+-
+-    {-# INLINE shiftR #-}
+-    shiftR (W64# x#) (I# i#) = W64# (x# `uncheckedShiftRL64#` i#)
+-
+-instance FastShift Int where
+-    {-# INLINE shiftL #-}
+-    shiftL (I# x#) (I# i#) = I# (x# `iShiftL#` i#)
+-
+-    {-# INLINE shiftR #-}
+-    shiftR (I# x#) (I# i#) = I# (x# `iShiftRA#` i#)
+-
+-instance FastShift Integer where
+-    {-# INLINE shiftL #-}
+-    shiftL = Bits.shiftL
+-
+-    {-# INLINE shiftR #-}
+-    shiftR = Bits.shiftR
+diff --git a/bloomfilter.cabal b/bloomfilter.cabal
+index 821a5d7..c621f7f 100644
+--- a/bloomfilter.cabal
++++ b/bloomfilter.cabal
+@@ -18,7 +18,7 @@ extra-source-files: README.markdown cbits/lookup3.c cbits/lookup3.h
+ library
+   build-depends:
+     array,
+-    base       >= 4.4 && < 5,
++    base       >= 4.5 && < 5,
+     bytestring >= 0.9,
+     deepseq
+   exposed-modules:  Data.BloomFilter
diff --git a/gnu/packages/patches/ghc-bytestring-handle-ghc9.patch b/gnu/packages/patches/ghc-bytestring-handle-ghc9.patch
new file mode 100644
index 0000000000..43dd472bf6
--- /dev/null
+++ b/gnu/packages/patches/ghc-bytestring-handle-ghc9.patch
@@ -0,0 +1,67 @@
+Taken from https://raw.githubusercontent.com/archlinux/svntogit-community/packages/haskell-bytestring-handle/trunk/ghc9.patch
+
+--- bytestring-handle-0.1.0.6/src/Data/ByteString/Handle/Write.hs.orig	2021-06-21 14:54:12.217134401 +0800
++++ bytestring-handle-0.1.0.6/src/Data/ByteString/Handle/Write.hs	2021-06-21 15:24:01.794796505 +0800
+@@ -17,7 +17,7 @@
+ 
+ import GHC.IO.Buffer ( BufferState(..), emptyBuffer, Buffer(..) )
+ import GHC.IO.BufferedIO ( BufferedIO(..) )
+-import GHC.IO.Device ( IODevice(..), IODeviceType(..), SeekMode(..) )
++import GHC.IO.Device ( IODevice(..), IODeviceType(..), SeekMode(..), RawIO(..) )
+ #if MIN_VERSION_base(4,5,0)
+ import GHC.IO.Encoding ( getLocaleEncoding )
+ #else
+@@ -138,6 +138,7 @@
+                                 seek_base = error "seek_base needs to be updated"
+                    })
+         modifyIORef (write_size ws) (`max` newSeekPos)
++        pure newSeekPos
+ 
+     tell ws = do
+         ss <- readIORef (write_seek_state ws)
+@@ -152,6 +153,12 @@
+ 
+     devType _ = return RegularFile -- TODO: is this correct?
+ 
++instance RawIO WriteState where
++    read _ _ _ _ = return 0
++    readNonBlocking _ _ _ _ = return Nothing
++    write _ _ _ _ = return ()
++    writeNonBlocking _ _ _ _ = return 0
++
+ ioe_seekOutOfRange :: IO a
+ ioe_seekOutOfRange =
+     ioException $ IOError Nothing InvalidArgument ""
+--- bytestring-handle-0.1.0.6/src/Data/ByteString/Handle/Read.hs.orig	2021-06-21 14:53:55.433129276 +0800
++++ bytestring-handle-0.1.0.6/src/Data/ByteString/Handle/Read.hs	2021-06-21 15:24:25.998784996 +0800
+@@ -24,7 +24,7 @@
+     , emptyBuffer, isEmptyBuffer, newBuffer, newByteBuffer
+     , bufferElems, withBuffer, withRawBuffer )
+ import GHC.IO.BufferedIO ( BufferedIO(..) )
+-import GHC.IO.Device ( IODevice(..), IODeviceType(..), SeekMode(..) )
++import GHC.IO.Device ( IODevice(..), IODeviceType(..), SeekMode(..), RawIO(..) )
+ #if MIN_VERSION_base(4,5,0)
+ import GHC.IO.Encoding ( getLocaleEncoding )
+ #else
+@@ -155,7 +155,7 @@
+                                                       (seek_before_length curSeekState)
+                                                       (fromIntegral (seek_pos curSeekState) + seekPos)
+                   SeekFromEnd -> normalisedSeekState (read_chunks_backwards rs) [] (read_length rs) seekPos
+-        maybe ioe_seekOutOfRange (writeIORef (read_seek_state rs)) newSeekState
++        maybe ioe_seekOutOfRange (\nss -> writeIORef (read_seek_state rs) nss >> pure (fromIntegral(seek_pos nss))) newSeekState
+ 
+     tell rs = do
+         ss <- readIORef (read_seek_state rs)
+@@ -166,6 +166,12 @@
+ 
+     devType _ = return RegularFile -- TODO: is this correct?
+ 
++instance RawIO ReadState where
++    read _ _ _ _ = return 0
++    readNonBlocking _ _ _ _ = return Nothing
++    write _ _ _ _ = return ()
++    writeNonBlocking _ _ _ _ = return 0
++
+ ioe_seekOutOfRange :: IO a
+ ioe_seekOutOfRange =
+     ioException $ IOError Nothing InvalidArgument ""
diff --git a/gnu/packages/patches/icecat-makeicecat.patch b/gnu/packages/patches/icecat-makeicecat.patch
index c46cb27ff6..940ca36b6c 100644
--- a/gnu/packages/patches/icecat-makeicecat.patch
+++ b/gnu/packages/patches/icecat-makeicecat.patch
@@ -6,7 +6,7 @@ diff --git a/makeicecat b/makeicecat
 index bf2b7a6..bc3b19b 100755
 --- a/makeicecat
 +++ b/makeicecat
-@@ -58,7 +58,7 @@ readonly SOURCEDIR=icecat-${FFVERSION}
+@@ -56,7 +56,7 @@ readonly SOURCEDIR=icecat-${FFVERSION}
  # debug/shell options
  readonly DEVEL=0
  set -euo pipefail
@@ -15,8 +15,8 @@ index bf2b7a6..bc3b19b 100755
  
  
  ###############################################################################
-@@ -459,7 +459,7 @@ configure_search()
-     sed 's|ddg@|ddg-html@|' -i browser/components/search/extensions/ddg-html/manifest.json
+@@ -455,7 +455,7 @@ configure_search()
+ 
  
      # Process various JSON pre-configuration dumps.
 -    python3 ../../tools/process-json-files.py . browser/components/extensions/schemas/
@@ -24,7 +24,7 @@ index bf2b7a6..bc3b19b 100755
  }
  
  configure_mobile()
-@@ -855,12 +855,12 @@ finalize_sourceball()
+@@ -837,12 +837,12 @@ finalize_sourceball()
  # entry point
  ###############################################################################
  
@@ -43,7 +43,7 @@ index bf2b7a6..bc3b19b 100755
  apply_patches
  configure
  configure_search
-@@ -872,4 +872,4 @@ prepare_macos_packaging
+@@ -854,4 +854,4 @@ prepare_macos_packaging
  configure_extensions
  configure_onboarding
  apply_bugfixes
diff --git a/gnu/packages/patches/jami-libjami-headers-search.patch b/gnu/packages/patches/jami-libjami-headers-search.patch
index 44e099a610..b3384ba563 100644
--- a/gnu/packages/patches/jami-libjami-headers-search.patch
+++ b/gnu/packages/patches/jami-libjami-headers-search.patch
@@ -20,9 +20,9 @@ Upstream status: https://review.jami.net/c/jami-client-qt/+/22973
  src/libclient/qtwrapper/CMakeLists.txt       |  2 +-
  4 files changed, 9 insertions(+), 18 deletions(-)
 
-diff --git a/client-qt/CMakeLists.txt b/CMakeLists.txt
+diff --git a/CMakeLists.txt b/CMakeLists.txt
 index d0a8fd70..94ac6074 100644
---- a/client-qt/CMakeLists.txt
+--- a/CMakeLists.txt
 +++ b/CMakeLists.txt
 @@ -118,7 +118,7 @@ set(CMAKE_MODULE_PATH
    ${CMAKE_MODULE_PATH} "${EXTRAS_DIR}/build/cmake/modules")
@@ -33,9 +33,9 @@ index d0a8fd70..94ac6074 100644
  endif()
  
  include(FindPython3)
-diff --git a/client-qt/extras/build/cmake/modules/FindLibJami.cmake b/extras/build/cmake/modules/FindLibJami.cmake
+diff --git a/extras/build/cmake/modules/FindLibJami.cmake b/extras/build/cmake/modules/FindLibJami.cmake
 index ddb05319..9ad20d2b 100644
---- a/client-qt/extras/build/cmake/modules/FindLibJami.cmake
+--- a/extras/build/cmake/modules/FindLibJami.cmake
 +++ b/extras/build/cmake/modules/FindLibJami.cmake
 @@ -20,28 +20,19 @@
  
@@ -78,9 +78,9 @@ index ddb05319..9ad20d2b 100644
 -message(STATUS "Jami daemon headers are in " ${LIBJAMI_INCLUDE_DIRS})
 +message(STATUS "Jami daemon headers are in " ${LIBJAMI_INCLUDE_DIR})
  message(STATUS "Jami daemon library is at " ${LIBJAMI_LIB})
-diff --git a/client-qt/src/libclient/CMakeLists.txt b/src/libclient/CMakeLists.txt
+diff --git a/src/libclient/CMakeLists.txt b/src/libclient/CMakeLists.txt
 index 2676c9c4..ac58ea2b 100644
---- a/client-qt/src/libclient/CMakeLists.txt
+--- a/src/libclient/CMakeLists.txt
 +++ b/src/libclient/CMakeLists.txt
 @@ -62,7 +62,7 @@ set(CMAKE_MODULE_PATH
    ${CMAKE_MODULE_PATH} "${EXTRAS_DIR}/build/cmake/modules")
@@ -91,10 +91,10 @@ index 2676c9c4..ac58ea2b 100644
  endif()
  
  string(SUBSTRING ${CMAKE_GENERATOR} 0 14 CMAKE_GENERATOR_SHORT)
-diff --git a/client-qt/src/libclient/qtwrapper/CMakeLists.txt b/src/libclient/qtwrapper/CMakeLists.txt
+diff --git a/src/libclient/qtwrapper/CMakeLists.txt b/src/libclient/qtwrapper/CMakeLists.txt
 index acee0d0c..ba68aac4 100644
---- a/client-qt/src/libclient/qtwrapper/CMakeLists.txt
-+++ b/client-qt/src/libclient/qtwrapper/CMakeLists.txt
+--- a/src/libclient/qtwrapper/CMakeLists.txt
++++ b/src/libclient/qtwrapper/CMakeLists.txt
 @@ -46,7 +46,7 @@ else()
  endif()
  
diff --git a/gnu/packages/patches/ngless-unliftio.patch b/gnu/packages/patches/ngless-unliftio.patch
deleted file mode 100644
index 87f5e79fcf..0000000000
--- a/gnu/packages/patches/ngless-unliftio.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 919565adc1216b9d3108b3043e8d307292b37393 Mon Sep 17 00:00:00 2001
-From: Luis Pedro Coelho <luis@luispedro.org>
-Date: Fri, 7 May 2021 11:42:56 +0800
-Subject: [PATCH] BLD Update to LTS-17.10
-
-- Updates the GHC version
-- Requires `extra-deps` for `diagrams` package
-- Simplifies code for NGLessIO monad as UnliftIO can now be auto-derived
----
- NGLess/NGLess/NGError.hs |  8 ++------
- stack.yaml               | 11 ++++++++---
- 2 files changed, 10 insertions(+), 9 deletions(-)
-
-diff --git a/NGLess/NGLess/NGError.hs b/NGLess/NGLess/NGError.hs
-index a22e557f..c7eddf5b 100644
---- a/NGLess/NGLess/NGError.hs
-+++ b/NGLess/NGLess/NGError.hs
-@@ -50,7 +50,8 @@ type NGLess = Either NGError
- 
- newtype NGLessIO a = NGLessIO { unwrapNGLessIO :: ResourceT IO a }
-                         deriving (Functor, Applicative, Monad, MonadIO,
--                        MonadResource, MonadThrow, MonadCatch, MonadMask)
-+                        MonadResource, MonadThrow, MonadCatch, MonadMask,
-+                        MonadUnliftIO)
- 
- 
- instance MonadError NGError NGLessIO where
-@@ -62,11 +63,6 @@ instance PrimMonad NGLessIO where
-     primitive act = NGLessIO (primitive act)
-     {-# INLINE primitive #-}
- 
--instance MonadUnliftIO NGLessIO where
--    askUnliftIO = NGLessIO $ do
--        u <- askUnliftIO
--        return $ UnliftIO (\(NGLessIO act) -> unliftIO u act)
--
- instance MonadFail NGLessIO where
-     fail err = throwShouldNotOccur err
- 
-diff --git a/stack.yaml b/stack.yaml
-index 051d973d..11b65887 100644
---- a/stack.yaml
-+++ b/stack.yaml
-@@ -1,14 +1,19 @@
- # For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md
- 
--resolver: lts-14.20
-+resolver: lts-17.10
- compiler-check: newer-minor
- 
- # Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)
- extra-deps:
-   - git: "https://github.com/ngless-toolkit/interval-to-int"
-     commit: "78289f6b48d41f7cc48169520ec9b77b050a0029"
--
--
-+  - diagrams-core-1.4.2@sha256:47de45658e8a805b7cb7f535e7b093daf7e861604fa3c70e25bd4ef481bf1571,2997
-+  - diagrams-lib-1.4.3@sha256:04f77778d4b550d3c8e54440800685f88467bef91075e82e009a8a6f45c51033,8232
-+  - diagrams-svg-1.4.3@sha256:36708b0b4cf35507ccf689f1a25f6f81b8f41c2c4c2900793de820f66d4e241c,3181
-+  - active-0.2.0.14@sha256:e618aba4a7881eb85dc1585e0a01230af6b4fbab6693931e4a5d0d3a5b184406,1823
-+  - dual-tree-0.2.2.1@sha256:9ff31e461d873ae74ba51d93b454c0c4094726d7cb78a0c454394c965e83539d,2830
-+  - monoid-extras-0.5.1@sha256:438dbfd7b4dce47d8f0ca577f56caf94bd1e21391afa545cad09fe7cf2e5793d,2333
-+  - svg-builder-0.1.1@sha256:22de54d326a6b6912e461e1302edb9108b02aac0b6a6368fcdc3c4a224d487fd,1440
- allow-newer: true
- 
- # Override default flag values for local packages and extra-deps
diff --git a/gnu/packages/patches/onionshare-cli-async-mode.patch b/gnu/packages/patches/onionshare-cli-async-mode.patch
new file mode 100644
index 0000000000..b71b56046d
--- /dev/null
+++ b/gnu/packages/patches/onionshare-cli-async-mode.patch
@@ -0,0 +1,25 @@
+Specifying the `async_mode` parameter seems to have been a workaround for
+packaging on Windows and macOS.  If not given, flask_socketio.SocketIO will
+probe for an available asynchronous model, e.g. `eventlet`, and otherwise gets
+stuck if `gevent-socketio` is not available.
+
+c.f. https://github.com/onionshare/onionshare/commit/ec7fa4ef16c9e1ba6028ee927c23f76c399a17a6
+and  https://github.com/onionshare/onionshare/issues/1510
+
+diff --git a/cli/onionshare_cli/web/web.py b/cli/onionshare_cli/web/web.py
+index 64844b5..7e1b095 100644
+--- a/cli/onionshare_cli/web/web.py
++++ b/cli/onionshare_cli/web/web.py
+@@ -164,10 +164,10 @@ class Web:
+         elif self.mode == "chat":
+             if self.common.verbose:
+                 self.socketio = SocketIO(
+-                    async_mode="gevent", logger=True, engineio_logger=True
++                    logger=True, engineio_logger=True
+                 )
+             else:
+-                self.socketio = SocketIO(async_mode="gevent")
++                self.socketio = SocketIO()
+             self.socketio.init_app(self.app)
+             self.chat_mode = ChatModeWeb(self.common, self)
+ 
diff --git a/gnu/packages/patches/opencascade-oce-glibc-2.26.patch b/gnu/packages/patches/opencascade-oce-glibc-2.26.patch
deleted file mode 100644
index ee5ed572c8..0000000000
--- a/gnu/packages/patches/opencascade-oce-glibc-2.26.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Fix build with glibc 2.26:
-
-https://github.com/tpaviot/oce/issues/675
-
-Patch copied from upstream source repository:
-
-https://github.com/tpaviot/oce/commit/aa1321e68cc004e3debe38d79ae74581a617c767
-
-From aa1321e68cc004e3debe38d79ae74581a617c767 Mon Sep 17 00:00:00 2001
-From: Janus Weil <janus@gcc.gnu.org>
-Date: Mon, 18 Dec 2017 11:27:55 +0100
-Subject: [PATCH] fix build errors with glibc 2.26+ due to missing xlocale.h
- (issue #675)
-
-* check for the presence of xlocale.h via cmake
-* remove related logic from Standard_CLocaleSentry.hxx
----
- CMakeLists.txt                          |  1 +
- src/Standard/Standard_CLocaleSentry.hxx | 15 ---------------
- 2 files changed, 1 insertion(+), 15 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b782b4101..50e9500b2 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -616,6 +616,7 @@ if (NOT WIN32)
- 	# compilation anywhere in OCE
- 	include(CheckIncludeFile)
- 	check_include_file(strings.h HAVE_STRINGS_H)
-+	check_include_file(xlocale.h HAVE_XLOCALE_H)
- 	include(CheckIncludeFileCXX)
- 	check_include_file_cxx(mm_malloc.h HAVE_MM_MALLOC_H)
- 	check_include_file_cxx(atomic.h OCE_HAVE_ATOMIC_H)
-diff --git a/src/Standard/Standard_CLocaleSentry.hxx b/src/Standard/Standard_CLocaleSentry.hxx
-index 2b226e7f3..1a4c1dadc 100644
---- a/src/Standard/Standard_CLocaleSentry.hxx
-+++ b/src/Standard/Standard_CLocaleSentry.hxx
-@@ -20,21 +20,6 @@
- 
- #include <locale.h>
- 
--#ifndef HAVE_XLOCALE_H
--  //! "xlocale.h" available in Mac OS X and glibc (Linux) for a long time as an extension
--  //! and become part of POSIX since '2008.
--  //! Notice that this is impossible to test (_POSIX_C_SOURCE >= 200809L)
--  //! since POSIX didn't declared such identifier.
--  #if defined(__APPLE__)
--    #define HAVE_XLOCALE_H
--  #endif
--
--  //! We check _GNU_SOURCE for glibc extensions here and it is always defined by g++ compiler.
--  #if defined(_GNU_SOURCE) && !defined(__ANDROID__)
--    #define HAVE_XLOCALE_H
--  #endif
--#endif // ifndef HAVE_LOCALE_H
--
- #ifdef HAVE_XLOCALE_H
-   #include <xlocale.h>
- #endif
--- 
-2.15.1
-
diff --git a/gnu/packages/patches/opentaxsolver-file-browser-fix.patch b/gnu/packages/patches/opentaxsolver-file-browser-fix.patch
new file mode 100644
index 0000000000..0e6be74f85
--- /dev/null
+++ b/gnu/packages/patches/opentaxsolver-file-browser-fix.patch
@@ -0,0 +1,58 @@
+From 96fda11a53a89c6647031f2c05ef12f1a9df6a08 Mon Sep 17 00:00:00 2001
+From: Skylar Hill <stellarskylark@posteo.net>
+Date: Tue, 31 Jan 2023 21:02:18 -0600
+Subject: [PATCH] Change default directory in file browser
+
+---
+ src/Gui_gtk/ots_gui2.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/Gui_gtk/ots_gui2.c b/src/Gui_gtk/ots_gui2.c
+index ff3366b..1247933 100644
+--- a/src/Gui_gtk/ots_gui2.c
++++ b/src/Gui_gtk/ots_gui2.c
+@@ -82,6 +82,7 @@ char ots_release_package[]="20.00";
+ #include <string.h>
+ #include <stdlib.h>
+ #include <ctype.h>
++#include <unistd.h>
+ #include <sys/stat.h>
+ // #include "backcompat.c"
+ #include "gtk_utils.c"		/* Include the graphics library. */
+@@ -109,6 +110,7 @@ char toolpath[MaxFname]="", *start_cmd;
+ int pending_compute=0, supported_pdf_form=1;
+ int filingstatus_mfj=1;
+ int round_to_whole_nums=0;
++char *working_dir[MaxFname+512];
+ 
+ void pick_file( GtkWidget *wdg, void *data );	/* Prototype */
+ void consume_leading_trailing_whitespace( char *line );
+@@ -2364,7 +2366,7 @@ void save_taxfile( GtkWidget *wdg, void *data )
+  if (cpt != 0)
+   strcpy( cpt, "_xxxx.txt" );
+  // printf("OTS_save_taxfile: dir='%s', wc='%s', fname='%s'\n", directory_dat, wildcards_fb, filename_fb );
+- Browse_Files( "File to Save As:", 2048, directory_dat, wildcards_fb, filename_fb, Save_Tax_File );
++ Browse_Files( "File to Save As:", 2048, working_dir, wildcards_fb, filename_fb, Save_Tax_File );
+ }
+ 
+ 
+@@ -3878,7 +3880,7 @@ void pick_file( GtkWidget *wdg, void *data )
+   strcpy( wildcards_fb, ".txt" );
+   strcpy( filename_fb, "" );
+   // printf("OTS_pick_file: dir='%s', wc='%s', fname='%s'\n", directory_dat, wildcards_fb, filename_fb );
+-  Browse_Files( "Select File", 2048, directory_dat, wildcards_fb, filename_fb, receive_filename );
++  Browse_Files( "Select File", 2048, working_dir, wildcards_fb, filename_fb, receive_filename );
+ }
+ 
+ 
+@@ -4019,6 +4021,7 @@ int main(int argc, char *argv[] )
+  invocation_path[k] = '\0';
+  // printf("Invocation path = '%s'\n", invocation_path);
+  set_ots_path();
++ getcwd(working_dir, MaxFname+512);
+ 
+  /* Decode any command-line arguments. */
+  argn = 1;  k=1;
+-- 
+2.38.1
+
diff --git a/gnu/packages/patches/php-bug-74093-test.patch b/gnu/packages/patches/php-bug-74093-test.patch
deleted file mode 100644
index 07b1949cef..0000000000
--- a/gnu/packages/patches/php-bug-74093-test.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From c641825c64e42627a2c9cac969b371ed532e0b57 Mon Sep 17 00:00:00 2001
-From: Ryan Sundberg <ryan@arctype.co>
-Date: Mon, 4 Oct 2021 20:12:25 -0700
-Subject: [PATCH] Zend/tests/bug74093.phpt: Fix failing test case
-
-This test case fails (on non-Windows hosts, where it is enabled) due
-to mismatching output in the error log language. This fixes the
-expectation, and also rewrites the test procedure in a more stable
-fashion.
-
-The objective of the test case is to run a program that exceeds
-the max_execution_time and verify that the process was aborted. The
-previous implementation tested this using a loop on array_intersect with
-large enough inputs to "probably" take enough time to trigger
-max_execution_time to abort it. With faster CPUs, over time this test
-can become flaky. Instead we simply spin a loop until enough
-wall clock time has passed to check our assertion.
----
- Zend/tests/bug74093.phpt | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/Zend/tests/bug74093.phpt b/Zend/tests/bug74093.phpt
-index 7f20285805..32eb445ddc 100644
---- a/Zend/tests/bug74093.phpt
-+++ b/Zend/tests/bug74093.phpt
-@@ -1,5 +1,5 @@
- --TEST--
--Bug #74093 (Maximum execution time of n+2 seconds exceed not written in error_log)
-+Bug #74093 (Maximum execution time exceeded not written in error_log)
- --SKIPIF--
- <?php
- if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
-@@ -12,9 +12,9 @@ max_execution_time=1
- hard_timeout=1
- --FILE--
- <?php
--$a1 = range(1, 1000000);
--$a2 = range(100000, 1999999);
--array_intersect($a1, $a2);
-+$start = time();
-+while (time() - $start < 5);
-+die("Failed to interrupt execution");
- ?>
- --EXPECTF--
--Fatal error: Maximum execution time of 1+1 seconds exceeded %s
-+Fatal error: Maximum execution time of 1 second exceeded in %s
---
-2.31.1
diff --git a/gnu/packages/patches/php-curl-compat.patch b/gnu/packages/patches/php-curl-compat.patch
deleted file mode 100644
index 0617251194..0000000000
--- a/gnu/packages/patches/php-curl-compat.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Fix test result with cURL 7.83 and later.
-
-Taken from upstream:
-
-  https://github.com/php/php-src/commit/a4179e4c92b6365d39e09cb9cd63c476848013af
-
-diff --git a/ext/curl/tests/curl_basic_007.phpt b/ext/curl/tests/curl_basic_007.phpt
-index 3b53658d6a7e..3834e4674f82 100644
---- a/ext/curl/tests/curl_basic_007.phpt
-+++ b/ext/curl/tests/curl_basic_007.phpt
-@@ -20,5 +20,5 @@ curl_close($ch);
- 
- ?>
- --EXPECTF--
--string(%d) "No URL set!%w"
-+string(%d) "No URL set%A"
- int(3)
diff --git a/gnu/packages/patches/php-fix-streams-copy-length.patch b/gnu/packages/patches/php-fix-streams-copy-length.patch
new file mode 100644
index 0000000000..d68f658071
--- /dev/null
+++ b/gnu/packages/patches/php-fix-streams-copy-length.patch
@@ -0,0 +1,52 @@
+From cddcc10becb013ae498ea9c2836792f407b61678 Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Tue, 7 Feb 2023 22:55:59 +0100
+Subject: [PATCH] Fix file corruption when using copy_file_range.
+
+This patch is adapted from https://github.com/php/php-src/pull/10440.
+---
+ main/streams/streams.c | 21 +++++++++++++++++----
+ 1 file changed, 17 insertions(+), 4 deletions(-)
+
+diff --git a/main/streams/streams.c b/main/streams/streams.c
+index 20029fc7..68dc76c5 100644
+--- a/main/streams/streams.c
++++ b/main/streams/streams.c
+@@ -1634,8 +1634,21 @@ PHPAPI zend_result _php_stream_copy_to_stream_ex(php_stream *src, php_stream *de
+ 		char *p;
+ 
+ 		do {
+-			size_t chunk_size = (maxlen == 0 || maxlen > PHP_STREAM_MMAP_MAX) ? PHP_STREAM_MMAP_MAX : maxlen;
+-			size_t mapped;
++            /* We must not modify maxlen here, because otherwise the file copy fallback below can fail */
++            size_t chunk_size, must_read, mapped;
++            if (maxlen == 0) {
++				/* Unlimited read */
++				must_read = chunk_size = PHP_STREAM_MMAP_MAX;
++			} else {
++				must_read = maxlen - haveread;
++				if (must_read >= PHP_STREAM_MMAP_MAX) {
++					chunk_size = PHP_STREAM_MMAP_MAX;
++				} else {
++					/* In case the length we still have to read from the file could be smaller than the file size,
++					 * chunk_size must not get bigger the size we're trying to read. */
++					chunk_size = must_read;
++				}
++			}
+ 
+ 			p = php_stream_mmap_range(src, php_stream_tell(src), chunk_size, PHP_STREAM_MAP_MODE_SHARED_READONLY, &mapped);
+ 
+@@ -1667,8 +1680,8 @@ PHPAPI zend_result _php_stream_copy_to_stream_ex(php_stream *src, php_stream *de
+ 					return SUCCESS;
+ 				}
+ 				if (maxlen != 0) {
+-					maxlen -= mapped;
+-					if (maxlen == 0) {
++					must_read -= mapped;
++					if (must_read == 0) {
+ 						return SUCCESS;
+ 					}
+ 				}
+-- 
+2.38.1
+
diff --git a/gnu/packages/patches/qpdfview-qt515-compat.patch b/gnu/packages/patches/qpdfview-qt515-compat.patch
deleted file mode 100644
index 1fbf5ec3f1..0000000000
--- a/gnu/packages/patches/qpdfview-qt515-compat.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Fix compatibility with Qt 5.15.
-
-Patch copied from upstream source repository:
-
-https://bazaar.launchpad.net/~adamreichold/qpdfview/trunk/revision/2104
-
---- a/sources/model.h	2017-04-19 21:01:25 +0000
-+++ b/sources/model.h	2020-06-09 06:24:11 +0000
-@@ -24,6 +24,7 @@
- #define DOCUMENTMODEL_H
- 
- #include <QList>
-+#include <QPainterPath>
- #include <QtPlugin>
- #include <QWidget>
- #include <QVector>
-
diff --git a/gnu/packages/patches/qtwebkit-fix-building-with-bison-3.7.patch b/gnu/packages/patches/qtwebkit-fix-building-with-bison-3.7.patch
deleted file mode 100644
index ddaf8e2849..0000000000
--- a/gnu/packages/patches/qtwebkit-fix-building-with-bison-3.7.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-Fix build with Bison 3.7
-
-https://bugs.gentoo.org/736499
-
-Patch copied from upstream source repository:
-
-https://github.com/qtwebkit/qtwebkit/commit/d92b11fea65364fefa700249bd3340e0cd4c5b31
-
-From d92b11fea65364fefa700249bd3340e0cd4c5b31 Mon Sep 17 00:00:00 2001
-From: Dmitry Shachnev <mitya57@gmail.com>
-Date: Tue, 4 Aug 2020 21:04:06 +0300
-Subject: [PATCH] Let Bison generate the header directly, to fix build with
- Bison 3.7
-
-Starting with Bison 3.7, the generated C++ file #include's the header
-by default, instead of duplicating it. So we should not delete it.
-
-Remove the code to add #ifdef guards to the header, since Bison adds
-them itself since version 2.6.3.
----
- Source/WebCore/css/makegrammar.pl | 21 +--------------------
- 1 file changed, 1 insertion(+), 20 deletions(-)
-
-diff --git a/Source/WebCore/css/makegrammar.pl b/Source/WebCore/css/makegrammar.pl
-index 5d63b08102eb5..9435701c70612 100644
---- a/Source/WebCore/css/makegrammar.pl
-+++ b/Source/WebCore/css/makegrammar.pl
-@@ -73,25 +73,6 @@
- }
- 
- my $fileBase = File::Spec->join($outputDir, $filename);
--my @bisonCommand = ($bison, "-d", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp");
-+my @bisonCommand = ($bison, "--defines=$fileBase.h", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp");
- push @bisonCommand, "--no-lines" if $^O eq "MSWin32"; # Work around bug in bison >= 3.0 on Windows where it puts backslashes into #line directives.
- system(@bisonCommand) == 0 or die;
--
--open HEADER, ">$fileBase.h" or die;
--print HEADER << "EOF";
--#ifndef CSSGRAMMAR_H
--#define CSSGRAMMAR_H
--EOF
--
--open HPP, "<$fileBase.cpp.h" or open HPP, "<$fileBase.hpp" or die;
--while (<HPP>) {
--    print HEADER;
--}
--close HPP;
--
--print HEADER "#endif\n";
--close HEADER;
--
--unlink("$fileBase.cpp.h");
--unlink("$fileBase.hpp");
--
diff --git a/gnu/packages/patches/qtwebkit-fix-building-with-glib-2.68.patch b/gnu/packages/patches/qtwebkit-fix-building-with-glib-2.68.patch
deleted file mode 100644
index 63840f4bbc..0000000000
--- a/gnu/packages/patches/qtwebkit-fix-building-with-glib-2.68.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Fix building with glib 2.68:
-
-https://github.com/qtwebkit/qtwebkit/issues/1057
-
-Patch copied from upstream pull request:
-
-https://github.com/qtwebkit/qtwebkit/pull/1058/commits/5b698ba3faffd4e198a45be9fe74f53307395e4b
-
-diff -aurN qtwebkit-5.212.0-alpha4/Source/WTF/wtf/glib/GRefPtr.h qtwebkit-5.212.0-alpha4-mod/Source/WTF/wtf/glib/GRefPtr.h
---- qtwebkit-5.212.0-alpha4/Source/WTF/wtf/glib/GRefPtr.h	2020-03-04 18:16:37.000000000 +0100
-+++ qtwebkit-5.212.0-alpha4-mod/Source/WTF/wtf/glib/GRefPtr.h	2021-04-05 06:58:44.763328636 +0200
-@@ -29,9 +29,6 @@
- #include <wtf/RefPtr.h>
- #include <algorithm>
- 
--extern "C" void g_object_unref(gpointer);
--extern "C" gpointer g_object_ref_sink(gpointer);
--
- namespace WTF {
- 
- enum GRefPtrAdoptType { GRefPtrAdopt };
diff --git a/gnu/packages/patches/qtwebkit-fix-building-with-icu-68.patch b/gnu/packages/patches/qtwebkit-fix-building-with-icu-68.patch
deleted file mode 100644
index acbfc4c4c8..0000000000
--- a/gnu/packages/patches/qtwebkit-fix-building-with-icu-68.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-Fix building with ICU > 68.
-
-https://bugs.gentoo.org/753260
-
-Patch adapted from Gentoo:
-
-https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=335f29d266c5b169ff1e781f9851a3a203f3198c
-
-From 335f29d266c5b169ff1e781f9851a3a203f3198c Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <asturm@gentoo.org>
-Date: Fri, 6 Nov 2020 09:22:15 +0100
-Subject: dev-qt/qtwebkit: Fix build with ICU-68
-
-Thanks-to: Lars Wendler <polynomial-c@gentoo.org>
-Closes: https://bugs.gentoo.org/753260
-Package-Manager: Portage-3.0.9, Repoman-3.0.2
-Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
----
- .../qtwebkit-5.212.0_pre20200309-icu-68.patch      | 120 +++++++++++++++++++++
- 1 file changed, 120 insertions(+)
- create mode 100644 dev-qt/qtwebkit/files/qtwebkit-5.212.0_pre20200309-icu-68.patch
-
-(limited to 'dev-qt/qtwebkit/files/qtwebkit-5.212.0_pre20200309-icu-68.patch')
-
-diff --git a/Source/WebCore/platform/text/TextCodecICU.cpp b/Source/WebCore/platform/text/TextCodecICU.cpp
-index dd6ff06..e0f4bd7 100644
---- a/Source/WebCore/platform/text/TextCodecICU.cpp
-+++ b/Source/WebCore/platform/text/TextCodecICU.cpp
-@@ -308,7 +308,7 @@ void TextCodecICU::createICUConverter() const
-     m_converterICU = ucnv_open(m_canonicalConverterName, &err);
-     ASSERT(U_SUCCESS(err));
-     if (m_converterICU)
--        ucnv_setFallback(m_converterICU, TRUE);
-+        ucnv_setFallback(m_converterICU, true);
- }
- 
- int TextCodecICU::decodeToBuffer(UChar* target, UChar* targetLimit, const char*& source, const char* sourceLimit, int32_t* offsets, bool flush, UErrorCode& err)
-diff --git a/Source/WebCore/platform/text/icu/UTextProvider.h b/Source/WebCore/platform/text/icu/UTextProvider.h
-index c254fc4..6d1e1cb 100644
---- a/Source/WebCore/platform/text/icu/UTextProvider.h
-+++ b/Source/WebCore/platform/text/icu/UTextProvider.h
-@@ -80,12 +80,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text, int64_t nativeIndex, int
-             // Ensure chunk offset is well formed if computed offset exceeds int32_t range.
-             ASSERT(offset < std::numeric_limits<int32_t>::max());
-             text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0;
--            isAccessible = TRUE;
-+            isAccessible = true;
-             return true;
-         }
-         if (nativeIndex >= nativeLength && text->chunkNativeLimit == nativeLength) {
-             text->chunkOffset = text->chunkLength;
--            isAccessible = FALSE;
-+            isAccessible = false;
-             return true;
-         }
-     } else {
-@@ -94,12 +94,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text, int64_t nativeIndex, int
-             // Ensure chunk offset is well formed if computed offset exceeds int32_t range.
-             ASSERT(offset < std::numeric_limits<int32_t>::max());
-             text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0;
--            isAccessible = TRUE;
-+            isAccessible = true;
-             return true;
-         }
-         if (nativeIndex <= 0 && !text->chunkNativeStart) {
-             text->chunkOffset = 0;
--            isAccessible = FALSE;
-+            isAccessible = false;
-             return true;
-         }
-     }
-diff --git a/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp b/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp
-index cd6852c..6a864b1 100644
---- a/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp
-+++ b/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp
-@@ -100,23 +100,23 @@ static UBool uTextLatin1Access(UText* uText, int64_t index, UBool forward)
-         if (index < uText->chunkNativeLimit && index >= uText->chunkNativeStart) {
-             // Already inside the buffer. Set the new offset.
-             uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
--            return TRUE;
-+            return true;
-         }
-         if (index >= length && uText->chunkNativeLimit == length) {
-             // Off the end of the buffer, but we can't get it.
-             uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
--            return FALSE;
-+            return false;
-         }
-     } else {
-         if (index <= uText->chunkNativeLimit && index > uText->chunkNativeStart) {
-             // Already inside the buffer. Set the new offset.
-             uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
--            return TRUE;
-+            return true;
-         }
-         if (!index && !uText->chunkNativeStart) {
-             // Already at the beginning; can't go any farther.
-             uText->chunkOffset = 0;
--            return FALSE;
-+            return false;
-         }
-     }
-     
-@@ -144,7 +144,7 @@ static UBool uTextLatin1Access(UText* uText, int64_t index, UBool forward)
- 
-     uText->nativeIndexingLimit = uText->chunkLength;
- 
--    return TRUE;
-+    return true;
- }
- 
- static int32_t uTextLatin1Extract(UText* uText, int64_t start, int64_t limit, UChar* dest, int32_t destCapacity, UErrorCode* status)
-@@ -336,7 +336,7 @@ static int64_t uTextLatin1ContextAwareNativeLength(UText* text)
- static UBool uTextLatin1ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward)
- {
-     if (!text->context)
--        return FALSE;
-+        return false;
-     int64_t nativeLength = uTextLatin1ContextAwareNativeLength(text);
-     UBool isAccessible;
-     if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible))
-@@ -356,7 +356,7 @@ static UBool uTextLatin1ContextAwareAccess(UText* text, int64_t nativeIndex, UBo
-         ASSERT(newContext == UTextProviderContext::PriorContext);
-         textLatin1ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward);
-     }
--    return TRUE;
-+    return true;
- }
- 
- static int32_t uTextLatin1ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode)
-diff --git a/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp b/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp
-index 7aaac48..9ae0d36 100644
---- a/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp
-+++ b/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp
-@@ -125,7 +125,7 @@ static inline int64_t uTextUTF16ContextAwareNativeLength(UText* text)
- static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward)
- {
-     if (!text->context)
--        return FALSE;
-+        return false;
-     int64_t nativeLength = uTextUTF16ContextAwareNativeLength(text);
-     UBool isAccessible;
-     if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible))
-@@ -145,7 +145,7 @@ static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBoo
-         ASSERT(newContext == UTextProviderContext::PriorContext);
-         textUTF16ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward);
-     }
--    return TRUE;
-+    return true;
- }
- 
- static int32_t uTextUTF16ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode)
diff --git a/gnu/packages/patches/qtwebkit-fix-building-with-python-3.9.patch b/gnu/packages/patches/qtwebkit-fix-building-with-python-3.9.patch
deleted file mode 100644
index 9f9674de33..0000000000
--- a/gnu/packages/patches/qtwebkit-fix-building-with-python-3.9.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Fix building with Python 3.9:
-
-https://github.com/qtwebkit/qtwebkit/issues/993
-
-Patch copied from upstream source repository:
-
-https://github.com/qtwebkit/qtwebkit/commit/78360c01c796b6260bf828bc9c8a0ef73c5132fd
-
-From 78360c01c796b6260bf828bc9c8a0ef73c5132fd Mon Sep 17 00:00:00 2001
-From: Konstantin Tokarev <annulen@yandex.ru>
-Date: Wed, 3 Jun 2020 15:01:42 +0300
-Subject: [PATCH] Fix compilation with Python 3.9: avoid passing encoding to
- json.load()
-
-In Python 2.7 UTF-8 is assumed by default, while in Python 3 this argument
-is not supported.
-
-Change-Id: Ic459d60a6b20bc1838d8771bc36ac41614fe61a9
----
- Source/JavaScriptCore/generate-bytecode-files | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Source/JavaScriptCore/generate-bytecode-files b/Source/JavaScriptCore/generate-bytecode-files
-index c5dab429c7b0f..af3431275ecf9 100644
---- a/Source/JavaScriptCore/generate-bytecode-files
-+++ b/Source/JavaScriptCore/generate-bytecode-files
-@@ -163,7 +163,7 @@ if __name__ == "__main__":
-         initBytecodesFile = openOrExit(initASMFileName, "w")
- 
-     try:
--        bytecodeSections = json.load(bytecodeFile, encoding = "utf-8")
-+        bytecodeSections = json.load(bytecodeFile)
-     except:
-         print("Unexpected error parsing {0}: {1}".format(bytecodeJSONFile, sys.exc_info()))
- 
diff --git a/gnu/packages/patches/qtwebkit-pbutils-include.patch b/gnu/packages/patches/qtwebkit-pbutils-include.patch
deleted file mode 100644
index 57961e7a51..0000000000
--- a/gnu/packages/patches/qtwebkit-pbutils-include.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Patch taken from Nix:
-   https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/qt-5/5.11/qtwebkit.patch
-
-diff --git a/Source/WebKit2/PlatformQt.cmake b/Source/WebKit2/PlatformQt.cmake
---- a/Source/WebKit2/PlatformQt.cmake
-+++ b/Source/WebKit2/PlatformQt.cmake
-@@ -261,6 +261,7 @@
- list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
-     ${GLIB_INCLUDE_DIRS}
-     ${GSTREAMER_INCLUDE_DIRS}
-+    ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
-     ${Qt5Quick_INCLUDE_DIRS}
-     ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
-     ${SQLITE_INCLUDE_DIR}
-
diff --git a/gnu/packages/patches/racket-backport-8.7-pkg-strip.patch b/gnu/packages/patches/racket-backport-8.7-pkg-strip.patch
deleted file mode 100644
index 703b6e8e82..0000000000
--- a/gnu/packages/patches/racket-backport-8.7-pkg-strip.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 1b7e15c23baf1fda44b1d0752902ddea11419fc5 Mon Sep 17 00:00:00 2001
-From: Philip McGrath <philip@philipmcgrath.com>
-Date: Fri, 7 Oct 2022 02:15:13 -0400
-Subject: [PATCH] pkg/strip: handle read-only input
-
-A package directory supplied to the functions from `pkg/strip` might
-have had all of its write permission bits unset. Since `copy-file`
-preserves the permissions of the source file, we may end up with a
-read-only file that we want to overwrite (e.g. an `info.rkt` file).
-Explicitly setting `user-write-bit` before writing avoids this problem.
-Conservatively, we only set the permissions when actually needed,
-and we restore the original permissions when we are done.
-
-(cherry picked from commit 8c647c8cc9b66112198fcf9bea27fc0e3737162f)
----
- racket/collects/pkg/strip.rkt | 35 +++++++++++++++++++++++++++++------
- 1 file changed, 29 insertions(+), 6 deletions(-)
-
-diff --git a/racket/collects/pkg/strip.rkt b/racket/collects/pkg/strip.rkt
-index 0ff58cea02..5899dbc6e6 100644
---- a/racket/collects/pkg/strip.rkt
-+++ b/racket/collects/pkg/strip.rkt
-@@ -306,9 +306,8 @@
-            #t
-            new-mod*-subs))))
-   (unless (eq? mod new-mod)
--    (call-with-output-file*
-+    (call-with-output-file/writable
-      new-p
--     #:exists 'truncate/replace
-      (lambda (out) (write new-mod out)))))
- 
- (define (fixup-local-redirect-reference p js-path #:user [user-js-path js-path])
-@@ -340,9 +339,8 @@
-                                       (string->bytes/utf-8 user-js-path)
-                                       (subbytes s (+ delta end2)))]
-                        [else s]))))
--    (call-with-output-file*
-+    (call-with-output-file/writable
-      p
--     #:exists 'truncate/replace
-      (lambda (out) (write-bytes new-bstr out)))))
- 
- ;; Used in binary[-lib] mode:
-@@ -383,9 +381,8 @@
-          (convert-mod info-lib defns)]))
-     (unless (equal? new-content content)
-       ;; write updated:
--      (call-with-output-file* 
-+      (call-with-output-file/writable
-        new-p
--       #:exists 'truncate
-        (lambda (out)
-          (write new-content out)
-          (newline out)))
-@@ -503,3 +500,29 @@
-                     which
-                     dir)
-             (current-continuation-marks)))))
-+
-+(define (call-with-output-file/writable pth proc)
-+  ;; In case `pth` was copied from a file without the user-write-bit set,
-+  ;; explicitly make it writable while we overwrite it.
-+  (define (run)
-+    (call-with-output-file* pth
-+      #:exists 'truncate/replace
-+      proc))
-+  (cond
-+    [(file-exists? pth)
-+     (define old-mode
-+       (file-or-directory-permissions pth 'bits))
-+     (define new-mode
-+       (if (eq? (system-type) 'windows)
-+           (bitwise-ior old-mode user-write-bit group-write-bit other-write-bit)
-+           (bitwise-ior old-mode user-write-bit)))
-+     (if (= old-mode new-mode)
-+         (run)
-+         (dynamic-wind
-+          (λ ()
-+            (file-or-directory-permissions pth new-mode))
-+          run
-+          (λ ()
-+            (file-or-directory-permissions pth old-mode))))]
-+    [else
-+     (run)]))
-
-base-commit: 7e4f6e2362d4a08affbbae3c7ee4b98e325274c6
--- 
-2.38.0
-
diff --git a/gnu/packages/patches/scsh-nonstring-search-path.patch b/gnu/packages/patches/scsh-nonstring-search-path.patch
new file mode 100644
index 0000000000..3934d49fa3
--- /dev/null
+++ b/gnu/packages/patches/scsh-nonstring-search-path.patch
@@ -0,0 +1,15 @@
+This patch was submitted upstream:
+https://github.com/scheme/scsh/pull/46
+
+diff --git a/scheme/lib-dirs.scm b/scheme/lib-dirs.scm
+index a1fc009..c630fb4 100644
+--- a/scheme/lib-dirs.scm
++++ b/scheme/lib-dirs.scm
+@@ -75,6 +75,7 @@
+               (let ((val (read)))
+                 (cond ((eof-object? val) '())
+                       ((string? val) (cons val (recur)))
++                      ((symbol? val) (cons (symbol->string val) (recur)))
+                       ((not val) (append default-lib-dirs (recur)))
+                       (else 
+                        (error 
diff --git a/gnu/packages/patches/spice-vdagent-glib-2.68.patch b/gnu/packages/patches/spice-vdagent-glib-2.68.patch
deleted file mode 100644
index cd5f13a909..0000000000
--- a/gnu/packages/patches/spice-vdagent-glib-2.68.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From 8348ef3c6121247e2b8be0641bbf3df3d55d9bff Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
-Date: Tue, 4 May 2021 13:20:47 +0400
-Subject: [PATCH] Fix g_memdup deprecation warning with glib >= 2.68
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Related to:
-https://bugzilla.redhat.com/show_bug.cgi?id=1943059
-
-Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
----
- configure.ac            | 4 ++++
- src/vdagent/vdagent.c   | 4 ++--
- src/vdagent/x11-randr.c | 2 +-
- src/vdagentd/vdagentd.c | 8 ++++----
- 4 files changed, 11 insertions(+), 7 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 7b2a99c..3de9b9b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -124,6 +124,10 @@ PKG_CHECK_MODULES(ALSA, [alsa >= 1.0.22])
- PKG_CHECK_MODULES([DBUS], [dbus-1])
- PKG_CHECK_MODULES([DRM], [libdrm])
- 
-+PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.68], [], [
-+    AC_DEFINE(g_memdup2, g_memdup, [GLib2 < 2.68 compatibility])
-+])
-+
- if test "$with_session_info" = "auto" || test "$with_session_info" = "systemd"; then
-     PKG_CHECK_MODULES([LIBSYSTEMD_LOGIN],
-                       [libsystemd >= 209],
-diff --git a/src/vdagent/vdagent.c b/src/vdagent/vdagent.c
-index 0c69907..fd08522 100644
---- a/src/vdagent/vdagent.c
-+++ b/src/vdagent/vdagent.c
-@@ -228,7 +228,7 @@ static void daemon_read_complete(UdscsConnection *conn,
-         break;
-     case VDAGENTD_AUDIO_VOLUME_SYNC: {
-         VDAgentAudioVolumeSync *avs = (VDAgentAudioVolumeSync *)data;
--        uint16_t *volume = g_memdup(avs->volume, sizeof(uint16_t) * avs->nchannels);
-+        uint16_t *volume = g_memdup2(avs->volume, sizeof(uint16_t) * avs->nchannels);
- 
-         if (avs->is_playback) {
-             vdagent_audio_playback_sync(avs->mute, avs->nchannels, volume);
-@@ -414,7 +414,7 @@ int main(int argc, char *argv[])
-     GOptionContext *context;
-     GError *error = NULL;
-     VDAgent *agent;
--    char **orig_argv = g_memdup(argv, sizeof(char*) * (argc+1));
-+    char **orig_argv = g_memdup2(argv, sizeof(char*) * (argc+1));
-     orig_argv[argc] = NULL; /* To avoid clang analyzer false-positive */
- 
-     context = g_option_context_new(NULL);
-diff --git a/src/vdagent/x11-randr.c b/src/vdagent/x11-randr.c
-index 27404a1..037aded 100644
---- a/src/vdagent/x11-randr.c
-+++ b/src/vdagent/x11-randr.c
-@@ -982,7 +982,7 @@ void vdagent_x11_set_monitor_config(struct vdagent_x11 *x11,
-                    fullscreen it will keep sending the failing config. */
-                 g_free(x11->randr.failed_conf);
-                 x11->randr.failed_conf =
--                    g_memdup(mon_config, config_size(mon_config->num_of_monitors));
-+                    g_memdup2(mon_config, config_size(mon_config->num_of_monitors));
-                 return;
-             }
-         }
-diff --git a/src/vdagentd/vdagentd.c b/src/vdagentd/vdagentd.c
-index 78378aa..3e59331 100644
---- a/src/vdagentd/vdagentd.c
-+++ b/src/vdagentd/vdagentd.c
-@@ -216,7 +216,7 @@ static void do_client_monitors(VirtioPort *vport, int port_nr,
-     vdagentd_write_xorg_conf(new_monitors);
- 
-     g_free(mon_config);
--    mon_config = g_memdup(new_monitors, size);
-+    mon_config = g_memdup2(new_monitors, size);
- 
-     /* Send monitor config to currently active agent */
-     if (active_session_conn)
-@@ -249,7 +249,7 @@ static void do_client_capabilities(VirtioPort *vport,
- {
-     capabilities_size = VD_AGENT_CAPS_SIZE_FROM_MSG_SIZE(message_header->size);
-     g_free(capabilities);
--    capabilities = g_memdup(caps->caps, capabilities_size * sizeof(uint32_t));
-+    capabilities = g_memdup2(caps->caps, capabilities_size * sizeof(uint32_t));
- 
-     if (caps->request) {
-         /* Report the previous client has disconnected. */
-@@ -647,7 +647,7 @@ static void virtio_port_read_complete(
-     case VD_AGENT_GRAPHICS_DEVICE_INFO: {
-         // store device info for re-sending when a session agent reconnects
-         g_free(device_info);
--        device_info = g_memdup(data, message_header->size);
-+        device_info = g_memdup2(data, message_header->size);
-         device_info_size = message_header->size;
-         forward_data_to_session_agent(VDAGENTD_GRAPHICS_DEVICE_INFO, data, message_header->size);
-         break;
-@@ -1090,7 +1090,7 @@ static void do_agent_xorg_resolution(UdscsConnection             *conn,
-     }
- 
-     g_free(agent_data->screen_info);
--    agent_data->screen_info = g_memdup(data, header->size);
-+    agent_data->screen_info = g_memdup2(data, header->size);
-     agent_data->width  = header->arg1;
-     agent_data->height = header->arg2;
-     agent_data->screen_count = n;
--- 
-GitLab
-
diff --git a/gnu/packages/patches/virglrenderer-CVE-2017-6386.patch b/gnu/packages/patches/virglrenderer-CVE-2017-6386.patch
deleted file mode 100644
index bd3bf106bf..0000000000
--- a/gnu/packages/patches/virglrenderer-CVE-2017-6386.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-Fix CVE-2017-6386 (memory leak introduced by fix for CVE-2017-5994).
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5994
-
-Patch copied from upstream source repository:
-
-https://cgit.freedesktop.org/virglrenderer/commit/?id=737c3350850ca4dbc5633b3bdb4118176ce59920
-
-From 737c3350850ca4dbc5633b3bdb4118176ce59920 Mon Sep 17 00:00:00 2001
-From: Dave Airlie <airlied@redhat.com>
-Date: Tue, 28 Feb 2017 14:52:09 +1000
-Subject: renderer: fix memory leak in vertex elements state create
-
-Reported-by: Li Qiang
-Free the vertex array in error path.
-This was introduced by this commit:
-renderer: fix heap overflow in vertex elements state create.
-
-I rewrote the code to not require the allocation in the first
-place if we have an error, seems nicer.
-
-Signed-off-by: Dave Airlie <airlied@redhat.com>
-
-diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
-index 1bca7ad..e5d9f5c 100644
---- a/src/vrend_renderer.c
-+++ b/src/vrend_renderer.c
-@@ -1648,18 +1648,19 @@ int vrend_create_vertex_elements_state(struct vrend_context *ctx,
-                                        unsigned num_elements,
-                                        const struct pipe_vertex_element *elements)
- {
--   struct vrend_vertex_element_array *v = CALLOC_STRUCT(vrend_vertex_element_array);
-+   struct vrend_vertex_element_array *v;
-    const struct util_format_description *desc;
-    GLenum type;
-    int i;
-    uint32_t ret_handle;
- 
--   if (!v)
--      return ENOMEM;
--
-    if (num_elements > PIPE_MAX_ATTRIBS)
-       return EINVAL;
- 
-+   v = CALLOC_STRUCT(vrend_vertex_element_array);
-+   if (!v)
-+      return ENOMEM;
-+
-    v->count = num_elements;
-    for (i = 0; i < num_elements; i++) {
-       memcpy(&v->elements[i].base, &elements[i], sizeof(struct pipe_vertex_element));
--- 
-cgit v0.10.2
-
diff --git a/gnu/packages/patches/wpa-supplicant-dbus-group-policy.patch b/gnu/packages/patches/wpa-supplicant-dbus-group-policy.patch
new file mode 100644
index 0000000000..95c18dac18
--- /dev/null
+++ b/gnu/packages/patches/wpa-supplicant-dbus-group-policy.patch
@@ -0,0 +1,23 @@
+Borrowed from debian, allows users in netdev group to control wpa-supplicant
+via D-Bus.
+
+Description: Debian does not use pam_console but uses group membership
+ to control access to D-Bus. Activating both options in the conf file
+ makes it work on Debian and Ubuntu.
+Author: Michael Biebl <biebl@debian.org>
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=15;bug=412179
+---
+--- a/wpa_supplicant/dbus/dbus-wpa_supplicant.conf
++++ b/wpa_supplicant/dbus/dbus-wpa_supplicant.conf
+@@ -14,6 +14,11 @@
+                 <allow send_interface="fi.w1.wpa_supplicant1"/>
+                 <allow receive_sender="fi.w1.wpa_supplicant1" receive_type="signal"/>
+         </policy>
++        <policy group="netdev">
++                <allow send_destination="fi.w1.wpa_supplicant1"/>
++                <allow send_interface="fi.w1.wpa_supplicant1"/>
++                <allow receive_sender="fi.w1.wpa_supplicant1" receive_type="signal"/>
++        </policy>
+         <policy context="default">
+                 <deny own="fi.epitest.hostap.WPASupplicant"/>
+                 <deny send_destination="fi.epitest.hostap.WPASupplicant"/>
diff --git a/gnu/packages/patches/xf86-video-qxl-fix-build.patch b/gnu/packages/patches/xf86-video-qxl-fix-build.patch
deleted file mode 100644
index 9ea50e4c91..0000000000
--- a/gnu/packages/patches/xf86-video-qxl-fix-build.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From 4b083ede3c4a827a84295ff223e34ee3c2e581b2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
- <zboszor@gmail.com>
-Date: Sat, 28 Aug 2021 15:38:40 +0200
-Subject: [PATCH] Fix a build  error with Xorg master
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Use xf86ReturnOptValBool() in get_bool_option() instead of
-options[option_index].value.bool to fix a compiler error with
-current Xorg xserver master branch.
-
-Also use xf86GetOptValInteger() in get_int_option() and
-xf86GetOptValString() in get_str_option() for consistency.
-
-The change causes a slight performance drop during option parsing
-because the passed-in index_value is no longer used as an index
-into the options array.
-
-Instead, it's used as a token now for the standard option getter
-functions which works since the index_value to the get_*_option()
-functions are identical to the value of options[n].token in the
-passed-in OptionInfoRec array.
-
-Also rename "int option_index" to "int token" for clarity in all
-three functions.
-
-Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
----
- src/qxl_option_helpers.c | 13 +++++++------
- src/qxl_option_helpers.h |  6 +++---
- 2 files changed, 10 insertions(+), 9 deletions(-)
-
-diff --git a/src/qxl_option_helpers.c b/src/qxl_option_helpers.c
-index 2aba677..7707b7c 100644
---- a/src/qxl_option_helpers.c
-+++ b/src/qxl_option_helpers.c
-@@ -10,31 +10,32 @@
- 
- #include "qxl_option_helpers.h"
- 
--int get_int_option(OptionInfoPtr options, int option_index,
-+int get_int_option(OptionInfoPtr options, int token,
-                    const char *env_name)
- {
-+    int value;
-     if (env_name && getenv(env_name)) {
-         return atoi(getenv(env_name));
-     }
--    return options[option_index].value.num;
-+    return xf86GetOptValInteger(options, token, &value) ? value : 0;
- }
- 
--const char *get_str_option(OptionInfoPtr options, int option_index,
-+const char *get_str_option(OptionInfoPtr options, int token,
-                            const char *env_name)
- {
-     if (getenv(env_name)) {
-         return getenv(env_name);
-     }
--    return options[option_index].value.str;
-+    return xf86GetOptValString(options, token);
- }
- 
--int get_bool_option(OptionInfoPtr options, int option_index,
-+int get_bool_option(OptionInfoPtr options, int token,
-                      const char *env_name)
- {
-     const char* value = getenv(env_name);
- 
-     if (!value) {
--        return options[option_index].value.bool;
-+        return xf86ReturnOptValBool(options, token, FALSE);
-     }
-     if (strcmp(value, "0") == 0 ||
-         strcasecmp(value, "off") == 0 ||
-diff --git a/src/qxl_option_helpers.h b/src/qxl_option_helpers.h
-index 7c54c72..66d0a17 100644
---- a/src/qxl_option_helpers.h
-+++ b/src/qxl_option_helpers.h
-@@ -4,13 +4,13 @@
- #include <xf86Crtc.h>
- #include <xf86Opt.h>
- 
--int get_int_option(OptionInfoPtr options, int option_index,
-+int get_int_option(OptionInfoPtr options, int token,
-                    const char *env_name);
- 
--const char *get_str_option(OptionInfoPtr options, int option_index,
-+const char *get_str_option(OptionInfoPtr options, int token,
-                            const char *env_name);
- 
--int get_bool_option(OptionInfoPtr options, int option_index,
-+int get_bool_option(OptionInfoPtr options, int token,
-                      const char *env_name);
- 
- #endif // OPTION_HELPERS_H
--- 
-GitLab
-
diff --git a/gnu/packages/patches/xf86-video-tga-remove-mibstore.patch b/gnu/packages/patches/xf86-video-tga-remove-mibstore.patch
deleted file mode 100644
index b1a96c3f10..0000000000
--- a/gnu/packages/patches/xf86-video-tga-remove-mibstore.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Removes references to mibstore.h and miInitializeBackingStore, which
-have been removed from xorg-server.  Zack Rusin <zackr@vmware.com>
-wrote: "It was a noop for at least 5 years and it has been removed."
-See: http://patches.openembedded.org/patch/46133/
-
---- xf86-video-tga-1.2.2/src/tga_accel.c.~1~	2012-07-15 23:54:04.000000000 -0400
-+++ xf86-video-tga-1.2.2/src/tga_accel.c	2014-12-19 01:40:27.535913013 -0500
-@@ -37,7 +37,6 @@
- #include "xf86cmap.h"
- #include "mipointer.h"
- 
--#include "mibstore.h"
- #include "miline.h"
- 
- #include "tga_regs.h"
---- xf86-video-tga-1.2.2/src/tga_driver.c.~1~	2012-07-15 23:54:28.000000000 -0400
-+++ xf86-video-tga-1.2.2/src/tga_driver.c	2014-12-19 01:40:48.756018238 -0500
-@@ -46,8 +46,6 @@
- 
- /* software cursor */
- #include "mipointer.h"
--/* backing store */
--#include "mibstore.h"
- 
- /*  #include "mibank.h" */
- /* colormap manipulation */
-@@ -1451,7 +1449,6 @@
-     
-     fbPictureInit (pScreen, 0, 0);
-     
--    miInitializeBackingStore(pScreen);
-     xf86SetBackingStore(pScreen);
-     xf86SetSilkenMouse(pScreen);
- 
diff --git a/gnu/packages/patches/xf86-video-voodoo-pcitag.patch b/gnu/packages/patches/xf86-video-voodoo-pcitag.patch
deleted file mode 100644
index 5cadef3928..0000000000
--- a/gnu/packages/patches/xf86-video-voodoo-pcitag.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-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/xmonad-dynamic-linking.patch b/gnu/packages/patches/xmonad-dynamic-linking.patch
index 4f3386e53a..a1d71825b6 100644
--- a/gnu/packages/patches/xmonad-dynamic-linking.patch
+++ b/gnu/packages/patches/xmonad-dynamic-linking.patch
@@ -2,15 +2,15 @@ This patch is required for xmonad to make use of shared libraries.
 Without it, xmonad will not work since we do not (by default) use
 statically linked Haskell libraries.
 
-diff -ruN xmonad-0.15-a/src/XMonad/Core.hs xmonad-0.15-b/src/XMonad/Core.hs
---- xmonad-0.15-a/src/XMonad/Core.hs	1969-12-31 19:00:00.000000000 -0500
-+++ xmonad-0.15-b/src/XMonad/Core.hs	1969-12-31 19:00:00.000000000 -0500
-@@ -681,6 +681,8 @@
-        compileGHC bin dir errHandle =
-          runProcess "ghc" ["--make"
-                           , "xmonad.hs"
-+                          , "-dynamic"
-+                          , "-fPIC"
-                           , "-i"
-                           , "-ilib"
-                           , "-fforce-recomp"
+index 46a0939..5ad4f8f 100644
+--- a/src/XMonad/Core.hs
++++ b/src/XMonad/Core.hs
+@@ -664,6 +664,8 @@ compile dirs method =
+   where
+     ghcArgs = [ "--make"
+               , "xmonad.hs"
++              , "-dynamic"
++              , "-fPIC"
+               , "-i" -- only look in @lib@
+               , "-ilib"
+               , "-fforce-recomp"
diff --git a/gnu/packages/patches/xmonad-next-dynamic-linking.patch b/gnu/packages/patches/xmonad-next-dynamic-linking.patch
deleted file mode 100644
index a1d71825b6..0000000000
--- a/gnu/packages/patches/xmonad-next-dynamic-linking.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-This patch is required for xmonad to make use of shared libraries.
-Without it, xmonad will not work since we do not (by default) use
-statically linked Haskell libraries.
-
-index 46a0939..5ad4f8f 100644
---- a/src/XMonad/Core.hs
-+++ b/src/XMonad/Core.hs
-@@ -664,6 +664,8 @@ compile dirs method =
-   where
-     ghcArgs = [ "--make"
-               , "xmonad.hs"
-+              , "-dynamic"
-+              , "-fPIC"
-               , "-i" -- only look in @lib@
-               , "-ilib"
-               , "-fforce-recomp"