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/fpm-newer-clamp-fix.patch33
-rw-r--r--gnu/packages/patches/geeqie-clutter.patch35
-rw-r--r--gnu/packages/patches/guile-fix-invalid-unicode-handling.patch83
-rw-r--r--gnu/packages/patches/ruby-hiredis-use-system-hiredis.patch52
4 files changed, 168 insertions, 35 deletions
diff --git a/gnu/packages/patches/fpm-newer-clamp-fix.patch b/gnu/packages/patches/fpm-newer-clamp-fix.patch
new file mode 100644
index 0000000000..9fbb15ee29
--- /dev/null
+++ b/gnu/packages/patches/fpm-newer-clamp-fix.patch
@@ -0,0 +1,33 @@
+Retrieved from: https://github.com/jordansissel/fpm/pull/1561.patch
+
+From 956a218a7b35de08ea35da3b702ffdc716656b68 Mon Sep 17 00:00:00 2001
+From: Jordan Sissel <jls@semicomplete.com>
+Date: Mon, 15 Oct 2018 21:05:47 -0700
+Subject: [PATCH] Check if an option has a default value before we try to look
+ it up.
+
+This fixes fpm when used with clamp 1.3.0 or above.
+
+Fixes #1543
+---
+ lib/fpm/command.rb | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/lib/fpm/command.rb b/lib/fpm/command.rb
+index a204001e1..a99ddb627 100644
+--- a/lib/fpm/command.rb
++++ b/lib/fpm/command.rb
+@@ -394,7 +394,12 @@ def execute
+     set = proc do |object, attribute|
+       # if the package's attribute is currently nil *or* the flag setting for this
+       # attribute is non-default, use the value.
+-      if object.send(attribute).nil? || send(attribute) != send("default_#{attribute}")
++
++      # Not all options have a default value, so we assume `nil` if there's no default. (#1543)
++      # In clamp >= 1.3.0, options without `:default => ..` will not have any # `default_xyz` 
++      # methods generated, so we need to check for the presence of this method first.
++      default = respond_to?("default_#{attribute}") ? send("default_#{attribute}") : nil
++      if object.send(attribute).nil? || send(attribute) != default
+         logger.info("Setting from flags: #{attribute}=#{send(attribute)}")
+         object.send("#{attribute}=", send(attribute))
+       end
diff --git a/gnu/packages/patches/geeqie-clutter.patch b/gnu/packages/patches/geeqie-clutter.patch
deleted file mode 100644
index ab7cc957d8..0000000000
--- a/gnu/packages/patches/geeqie-clutter.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From c99084ac5fc2fb854ff8e8abd4bd3298fb08fb43 Mon Sep 17 00:00:00 2001
-From: Colin Clark <colin.clark@cclark.uk>
-Date: Sat, 9 Jan 2021 11:35:41 +0000
-Subject: [PATCH] Fix #829: segfault with clutter-gtk
-
-https://github.com/BestImageViewer/geeqie/issues/829
-
-This fix might cause other problems which might be cured by calling:
-LIBGL_ALWAYS_INDIRECT=1 geeqie
-
-or, worst case:
-geeqie --disable-clutter
----
- src/main.c | 5 -----
- 1 file changed, 5 deletions(-)
-
-diff --git a/src/main.c b/src/main.c
-index f497240d..4af654fe 100644
---- a/src/main.c
-+++ b/src/main.c
-@@ -904,11 +904,6 @@ gint main(gint argc, gchar *argv[])
- #ifdef HAVE_GTHREAD
- #if !GLIB_CHECK_VERSION(2,32,0)
- 	g_thread_init(NULL);
--#endif
--#ifdef HAVE_CLUTTER
--/* FIXME: see below */
--	putenv("LIBGL_ALWAYS_INDIRECT=1");
--	XInitThreads();
- #endif
- 	gdk_threads_init();
- 	gdk_threads_enter();
--- 
-2.34.0
-
diff --git a/gnu/packages/patches/guile-fix-invalid-unicode-handling.patch b/gnu/packages/patches/guile-fix-invalid-unicode-handling.patch
new file mode 100644
index 0000000000..20ee1a2cf5
--- /dev/null
+++ b/gnu/packages/patches/guile-fix-invalid-unicode-handling.patch
@@ -0,0 +1,83 @@
+Reported upstream at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62290 and
+patch merged as cba2e7e3fec3c781230570f5d1ef070625eeeda8.
+
+From 31a1c3c4783e8e66b93500737f23f209d8115f77 Mon Sep 17 00:00:00 2001
+From: Christopher Baines <mail@cbaines.net>
+Date: Fri, 17 Mar 2023 12:48:39 +0000
+Subject: [PATCH] Fix some invalid unicode handling issues with suspendable
+ ports.
+
+Based on the implementation in ports.c.  I don't understand what this
+code is really doing, but the suspendable ports implementation differs
+from the similar C code for a couple of inequalities.
+
+* module/ice-9/suspendable-ports.scm (decode-utf8, bad-utf8-len): Flip a
+couple of inequalities.
+* test-suite/tests/ports.test ("string ports"): Add additional invalid
+UTF-8 test case.
+---
+ module/ice-9/suspendable-ports.scm | 8 ++++----
+ test-suite/tests/ports.test        | 7 +++++++
+ 2 files changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/module/ice-9/suspendable-ports.scm b/module/ice-9/suspendable-ports.scm
+index a823f1d37..9fac1df62 100644
+--- a/module/ice-9/suspendable-ports.scm
++++ b/module/ice-9/suspendable-ports.scm
+@@ -419,7 +419,7 @@
+                (= (logand u8_2 #xc0) #x80)
+                (case u8_0
+                  ((#xe0) (>= u8_1 #xa0))
+-                 ((#xed) (>= u8_1 #x9f))
++                 ((#xed) (<= u8_1 #x9f))
+                  (else #t)))
+           (kt (integer->char
+                (logior (ash (logand u8_0 #x0f) 12)
+@@ -436,7 +436,7 @@
+                (= (logand u8_3 #xc0) #x80)
+                (case u8_0
+                  ((#xf0) (>= u8_1 #x90))
+-                 ((#xf4) (>= u8_1 #x8f))
++                 ((#xf4) (<= u8_1 #x8f))
+                  (else #t)))
+           (kt (integer->char
+                (logior (ash (logand u8_0 #x07) 18)
+@@ -462,7 +462,7 @@
+      ((< buffering 2) 1)
+      ((not (= (logand (ref 1) #xc0) #x80)) 1)
+      ((and (eq? first-byte #xe0) (< (ref 1) #xa0)) 1)
+-     ((and (eq? first-byte #xed) (< (ref 1) #x9f)) 1)
++     ((and (eq? first-byte #xed) (> (ref 1) #x9f)) 1)
+      ((< buffering 3) 2)
+      ((not (= (logand (ref 2) #xc0) #x80)) 2)
+      (else 0)))
+@@ -471,7 +471,7 @@
+      ((< buffering 2) 1)
+      ((not (= (logand (ref 1) #xc0) #x80)) 1)
+      ((and (eq? first-byte #xf0) (< (ref 1) #x90)) 1)
+-     ((and (eq? first-byte #xf4) (< (ref 1) #x8f)) 1)
++     ((and (eq? first-byte #xf4) (> (ref 1) #x8f)) 1)
+      ((< buffering 3) 2)
+      ((not (= (logand (ref 2) #xc0) #x80)) 2)
+      ((< buffering 4) 3)
+diff --git a/test-suite/tests/ports.test b/test-suite/tests/ports.test
+index 66e10e3dd..1b30e1a68 100644
+--- a/test-suite/tests/ports.test
++++ b/test-suite/tests/ports.test
+@@ -1059,6 +1059,13 @@
+        eof))
+ 
+     (test-decoding-error (#xf0 #x88 #x88 #x88) "UTF-8"
++      (error                ;; 2nd byte should be in the 90..BF range
++       error                ;; 88: not a valid starting byte
++       error                ;; 88: not a valid starting byte
++       error                ;; 88: not a valid starting byte
++       eof))
++
++    (test-decoding-error (#xf4 #xa4 #xbd #xa4) "UTF-8"
+       (error                ;; 2nd byte should be in the 90..BF range
+        error                ;; 88: not a valid starting byte
+        error                ;; 88: not a valid starting byte
+-- 
+2.39.1
+
diff --git a/gnu/packages/patches/ruby-hiredis-use-system-hiredis.patch b/gnu/packages/patches/ruby-hiredis-use-system-hiredis.patch
new file mode 100644
index 0000000000..1b238f5099
--- /dev/null
+++ b/gnu/packages/patches/ruby-hiredis-use-system-hiredis.patch
@@ -0,0 +1,52 @@
+Retrieved 2023-03-05 from
+https://sources.debian.org/data/main/r/ruby-hiredis/0.6.3-2/debian/patches/use_system_libhiredis.patch.
+
+From: Apollon Oikonomopoulos <apoikos@gmail.com>
+Date: Mon, 20 Jan 2020 09:28:45 -0300
+Subject: Use system libhiredis
+
+Last-Update: 2013-04-10
+Forwarded: no
+
+Use Debian's libhiredis version instead of downloading one and statically
+linking against it.
+---
+ ext/hiredis_ext/extconf.rb | 18 +++---------------
+ 1 file changed, 3 insertions(+), 15 deletions(-)
+
+diff --git a/ext/hiredis_ext/extconf.rb b/ext/hiredis_ext/extconf.rb
+index da39eb5..ffa3abf 100644
+--- a/ext/hiredis_ext/extconf.rb
++++ b/ext/hiredis_ext/extconf.rb
+@@ -9,12 +9,6 @@ end
+ 
+ RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
+ 
+-hiredis_dir = File.join(File.dirname(__FILE__), %w{.. .. vendor hiredis})
+-unless File.directory?(hiredis_dir)
+-  STDERR.puts "vendor/hiredis missing, please checkout its submodule..."
+-  exit 1
+-end
+-
+ RbConfig::CONFIG['configure_args'] =~ /with-make-prog\=(\w+)/
+ make_program = $1 || ENV['make']
+ make_program ||= case RUBY_PLATFORM
+@@ -27,15 +21,9 @@ else
+ end
+ 
+ if build_hiredis
+-  # Make sure hiredis is built...
+-  Dir.chdir(hiredis_dir) do
+-    success = system("#{make_program} static")
+-    raise "Building hiredis failed" if !success
+-  end
+-
+-  # Statically link to hiredis (mkmf can't do this for us)
+-  $CFLAGS << " -I#{hiredis_dir}"
+-  $LDFLAGS << " #{hiredis_dir}/libhiredis.a"
++  # Debian: use system hiredis
++  $CFLAGS << " -I/usr/include/hiredis"
++  $LDFLAGS << " -lhiredis"
+ 
+   have_func("rb_thread_fd_select")
+   create_makefile('hiredis/ext/hiredis_ext')