summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/clang-17.0-link-dsymutil-latomic.patch14
-rw-r--r--gnu/packages/patches/libextractor-tidy-support.patch81
-rw-r--r--gnu/packages/patches/python-poppler-qt5-fix-build.patch116
-rw-r--r--gnu/packages/patches/ruby-x25519-automatic-fallback-non-x86_64.patch45
4 files changed, 140 insertions, 116 deletions
diff --git a/gnu/packages/patches/clang-17.0-link-dsymutil-latomic.patch b/gnu/packages/patches/clang-17.0-link-dsymutil-latomic.patch
new file mode 100644
index 0000000000..f94840527e
--- /dev/null
+++ b/gnu/packages/patches/clang-17.0-link-dsymutil-latomic.patch
@@ -0,0 +1,14 @@
+This was mistakenly added to llvm-17 while a patch was being rebased.
+
+---
+
+diff --git a/llvm/tools/dsymutil/CMakeLists.txt b/llvm/tools/dsymutil/CMakeLists.txt
+index 3cb88a50ce25..8699d0bb1d6b 100644
+--- a/llvm/tools/dsymutil/CMakeLists.txt
++++ b/llvm/tools/dsymutil/CMakeLists.txt
+@@ -42,4 +42,4 @@ if(APPLE)
+ target_link_libraries(dsymutil PRIVATE "-framework CoreFoundation")
+ endif(APPLE)
+
+-# target_link_libraries(dsymutil PRIVATE ${LLVM_ATOMIC_LIB})
++target_link_libraries(dsymutil PRIVATE ${LLVM_ATOMIC_LIB})
diff --git a/gnu/packages/patches/libextractor-tidy-support.patch b/gnu/packages/patches/libextractor-tidy-support.patch
new file mode 100644
index 0000000000..8fe2f21b2b
--- /dev/null
+++ b/gnu/packages/patches/libextractor-tidy-support.patch
@@ -0,0 +1,81 @@
+Upstream status: submitted to bug-libextractor@gnu.org.
+
+From 1fc6daaeaf829fb941a176831c011888a73c43b9 Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Mon, 11 Mar 2024 09:36:26 -0400
+Subject: [PATCH] html_extractor: Add support for modern tidy-html.
+
+* configure.ac: Use PKG_PROG_PKG_CONFIG to initialize pkg-config detection.
+<tidy>: Check for library via pkg-config.
+* src/plugins/html_extractor.c: Standardize tidy include file names.
+---
+ configure.ac | 28 +++++++++-------------------
+ src/plugins/html_extractor.c | 4 ++--
+ 2 files changed, 11 insertions(+), 21 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index d17ff39..e89d70c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -176,6 +176,8 @@ AS_CASE(["$target_os"],
+
+ AM_ICONV
+
++PKG_PROG_PKG_CONFIG()
++
+ # We define the paths here, because MinGW/GCC expands paths
+ # passed through the command line ("-DLOCALEDIR=..."). This would
+ # lead to hard-coded paths ("C:\mingw\mingw\bin...") that do
+@@ -424,25 +426,13 @@ AC_CHECK_LIB(magic, magic_open,
+ AM_CONDITIONAL(HAVE_MAGIC, false))],
+ AM_CONDITIONAL(HAVE_MAGIC, false))
+
+-AC_MSG_CHECKING(for tidyNodeGetValue -ltidy)
+-AC_LANG_PUSH(C++)
+-SAVED_LIBS=$LIBS
+-LIBS="$LIBS -ltidy"
+-AC_LINK_IFELSE(
+- [AC_LANG_PROGRAM([[#include <tidy/tidy.h>]],
+- [[ Bool b = tidyNodeGetValue (NULL, NULL, NULL); ]])],
+- [AC_MSG_RESULT(yes)
+- AM_CONDITIONAL(HAVE_TIDY, true)
+- AC_DEFINE(HAVE_TIDY,1,[Have tidyNodeGetValue in libtidy])],
+- [AC_MSG_RESULT(no)
+- AM_CONDITIONAL(HAVE_TIDY, false)])
+-LIBS=$SAVED_LIBS
+-AC_LANG_POP(C++)
+-
+-# restore LIBS
+-LIBS=$LIBSOLD
+-
+-
++dnl tidyNodeGetValue was already available in 5.0.0, released in 2015.
++PKG_CHECK_MODULES([TIDY], [tidy >= 5.0.0],
++ [AC_DEFINE(HAVE_TIDY, 1, [Have tidy])
++ AM_CONDITIONAL(HAVE_TIDY, true)],
++ [AM_CONDITIONAL(HAVE_TIDY, false)])
++CFLAGS="$CFLAGS $TIDY_CFLAGS"
++LIBS="$LIBS $TIDY_LIBS"
+
+ # should 'make check' run tests?
+ AC_MSG_CHECKING(whether to run tests)
+diff --git a/src/plugins/html_extractor.c b/src/plugins/html_extractor.c
+index 5ebf97b..88100d3 100644
+--- a/src/plugins/html_extractor.c
++++ b/src/plugins/html_extractor.c
+@@ -26,8 +26,8 @@
+ #include "platform.h"
+ #include "extractor.h"
+ #include <magic.h>
+-#include <tidy/tidy.h>
+-#include <tidy/tidybuffio.h>
++#include <tidy.h>
++#include <tidybuffio.h>
+
+ /**
+ * Mapping of HTML META names to LE types.
+
+base-commit: a75f40b64b5868967c95ea214e8eaac4f7088b23
+--
+2.41.0
+
diff --git a/gnu/packages/patches/python-poppler-qt5-fix-build.patch b/gnu/packages/patches/python-poppler-qt5-fix-build.patch
deleted file mode 100644
index 099bb86d2f..0000000000
--- a/gnu/packages/patches/python-poppler-qt5-fix-build.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-Patch taken from the upstream repository
-https://github.com/frescobaldi/python-poppler-qt5/issues/43
-
-From 92e5962ec3751ab051d0b655fd61afc7a1cf709e Mon Sep 17 00:00:00 2001
-From: Ben Greiner <code@bnavigator.de>
-Date: Thu, 4 Mar 2021 17:02:51 +0100
-Subject: [PATCH] map type QVector< QPair<TYPE, TYPE> > for
- FormFieldChoice::choicesWithExportValues() (#45)
-
----
- types.sip | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 93 insertions(+)
-
-diff --git a/types.sip b/types.sip
-index 239b8c9..81cb283 100644
---- a/types.sip
-+++ b/types.sip
-@@ -331,5 +331,98 @@ template <TYPE>
- };
-
-
-+/**
-+ * Convert QVector< QPair<TYPE, TYPE> >
-+ * from and to a Python list of a 2-item tuple
-+ */
-+
-+template<TYPE>
-+%MappedType QVector< QPair<TYPE, TYPE> >
-+{
-+%TypeHeaderCode
-+#include <qvector.h>
-+#include <qpair.h>
-+%End
-+
-+%ConvertFromTypeCode
-+ // Create the list.
-+ PyObject *l;
-+
-+ if ((l = PyList_New(sipCpp->size())) == NULL)
-+ return NULL;
-+
-+ // Set the list elements.
-+ for (int i = 0; i < sipCpp->size(); ++i)
-+ {
-+ QPair<TYPE, TYPE>* p = new QPair<TYPE, TYPE>(sipCpp->at(i));
-+ PyObject *ptuple = PyTuple_New(2);
-+ PyObject *pfirst;
-+ PyObject *psecond;
-+
-+ TYPE *sfirst = new TYPE(p->first);
-+ if ((pfirst = sipConvertFromType(sfirst, sipType_TYPE, sipTransferObj)) == NULL)
-+ {
-+ Py_DECREF(l);
-+ Py_DECREF(ptuple);
-+ return NULL;
-+ }
-+ PyTuple_SET_ITEM(ptuple, 0, pfirst);
-+
-+ TYPE *ssecond = new TYPE(p->second);
-+ if ((psecond = sipConvertFromType(ssecond, sipType_TYPE, sipTransferObj)) == NULL)
-+ {
-+ Py_DECREF(l);
-+ Py_DECREF(ptuple);
-+ Py_DECREF(pfirst);
-+ return NULL;
-+ }
-+ PyTuple_SET_ITEM(ptuple, 1, psecond);
-+
-+ PyList_SET_ITEM(l, i, ptuple);
-+ }
-+
-+ return l;
-+%End
-+
-+%ConvertToTypeCode
-+ const sipTypeDef* qpair_type = sipFindType("QPair<TYPE, TYPE>");
-+
-+ // Check the type if that is all that is required.
-+ if (sipIsErr == NULL)
-+ {
-+ if (!PySequence_Check(sipPy))
-+ return 0;
-+
-+ for (int i = 0; i < PySequence_Size(sipPy); ++i)
-+ if (!sipCanConvertToType(PySequence_ITEM(sipPy, i), qpair_type, SIP_NOT_NONE))
-+ return 0;
-+
-+ return 1;
-+ }
-+
-+
-+ QVector< QPair<TYPE, TYPE> > *qv = new QVector< QPair<TYPE, TYPE> >;
-+
-+ for (int i = 0; i < PySequence_Size(sipPy); ++i)
-+ {
-+ int state;
-+ QPair<TYPE, TYPE> * p = reinterpret_cast< QPair<TYPE, TYPE> * >(sipConvertToType(PySequence_ITEM(sipPy, i), qpair_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
-+
-+ if (*sipIsErr)
-+ {
-+ sipReleaseType(p, qpair_type, state);
-+ delete qv;
-+ return 0;
-+ }
-+ qv->append(*p);
-+ sipReleaseType(p, qpair_type, state);
-+ }
-+
-+ *sipCppPtr = qv;
-+ return sipGetState(sipTransferObj);
-+%End
-+
-+};
-+
-
- /* kate: indent-width 4; space-indent on; hl c++; indent-mode cstyle; */
diff --git a/gnu/packages/patches/ruby-x25519-automatic-fallback-non-x86_64.patch b/gnu/packages/patches/ruby-x25519-automatic-fallback-non-x86_64.patch
new file mode 100644
index 0000000000..cd501bb343
--- /dev/null
+++ b/gnu/packages/patches/ruby-x25519-automatic-fallback-non-x86_64.patch
@@ -0,0 +1,45 @@
+from https://patch-diff.githubusercontent.com/raw/RubyCrypto/x25519/pull/36.patch
+
+From 5886507e08488c0ed116b1979a073b78b9495683 Mon Sep 17 00:00:00 2001
+From: Eric Long <i@hack3r.moe>
+Date: Sat, 15 Apr 2023 02:58:26 +0800
+Subject: [PATCH] Add automatic fallback for non-x86_64 targets
+
+---
+ Rakefile | 2 +-
+ ext/x25519_precomputed/extconf.rb | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Rakefile b/Rakefile
+index 535697c..6e4f4d3 100644
+--- a/Rakefile
++++ b/Rakefile
+@@ -7,7 +7,7 @@ CLEAN.include("**/*.o", "**/*.so", "**/*.bundle", "pkg", "tmp")
+
+ require "rake/extensiontask"
+ %w[precomputed ref10].each do |provider|
+- next if provider == "precomputed" && RUBY_PLATFORM =~ /arm64-darwin/
++ next if provider == "precomputed" && RUBY_PLATFORM !~ /x86_64|x64/
+
+ Rake::ExtensionTask.new("x25519_#{provider}") do |ext|
+ ext.ext_dir = "ext/x25519_#{provider}"
+diff --git a/ext/x25519_precomputed/extconf.rb b/ext/x25519_precomputed/extconf.rb
+index 7f2ba4d..b049f98 100644
+--- a/ext/x25519_precomputed/extconf.rb
++++ b/ext/x25519_precomputed/extconf.rb
+@@ -4,12 +4,12 @@
+
+ require "mkmf"
+
+-if RUBY_PLATFORM =~ /arm64-darwin|aarch64-linux/
+- File.write("Makefile", "install clean: ;")
+-else
++if RUBY_PLATFORM =~ /x86_64|x64/
+ $CFLAGS << " -Wall -O3 -pedantic -std=c99 -mbmi -mbmi2 -march=haswell"
+
+ create_makefile "x25519_precomputed"
++else
++ File.write("Makefile", "install clean: ;")
+ end
+
+ # rubocop:enable Style/GlobalVars