summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/clang-12-tools-extra-directory.patch16
-rw-r--r--gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch28
-rw-r--r--gnu/packages/patches/go-github-com-urfave-cli-v2-fix-tests.patch37
-rw-r--r--gnu/packages/patches/mailutils-fix-uninitialized-variable.patch26
-rw-r--r--gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch2
-rw-r--r--gnu/packages/patches/nnpack-system-libraries.patch205
-rw-r--r--gnu/packages/patches/ntfs-3g-CVE-2019-9755.patch72
-rw-r--r--gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch4
-rw-r--r--gnu/packages/patches/python-pytorch-system-libraries.patch38
-rw-r--r--gnu/packages/patches/racket-minimal-backport-1629887.patch28
-rw-r--r--gnu/packages/patches/ungoogled-chromium-ffmpeg-compat.patch68
-rw-r--r--gnu/packages/patches/ungoogled-chromium-system-nspr.patch54
-rw-r--r--gnu/packages/patches/webkitgtk-bind-all-fonts.patch2
-rw-r--r--gnu/packages/patches/xgboost-use-system-dmlc-core.patch34
14 files changed, 481 insertions, 133 deletions
diff --git a/gnu/packages/patches/clang-12-tools-extra-directory.patch b/gnu/packages/patches/clang-12-tools-extra-directory.patch
deleted file mode 100644
index 0a236da26e..0000000000
--- a/gnu/packages/patches/clang-12-tools-extra-directory.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Help CMake locate the "tools-extra" directory.
-
-Taken from <https://bugs.llvm.org/show_bug.cgi?id=49990#c3>.
-
-diff --git a/clang-tools-extra/clangd/quality/CompletionModel.cmake b/clang-tools-extra/clangd/quality/CompletionModel.cmake
---- a/clangd/quality/CompletionModel.cmake
-+++ b/clangd/quality/CompletionModel.cmake
-@@ -5,7 +5,7 @@
- # will define a C++ class called ${cpp_class} - which may be a
- # namespace-qualified class name.
- function(gen_decision_forest model filename cpp_class)
-- set(model_compiler ${CMAKE_SOURCE_DIR}/../clang-tools-extra/clangd/quality/CompletionModelCodegen.py)
-+ set(model_compiler ${CMAKE_CURRENT_LIST_DIR}/quality/CompletionModelCodegen.py)
-
- set(output_dir ${CMAKE_CURRENT_BINARY_DIR})
- set(header_file ${output_dir}/${filename}.h)
diff --git a/gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch b/gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch
new file mode 100644
index 0000000000..7408d4ec16
--- /dev/null
+++ b/gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch
@@ -0,0 +1,28 @@
+Backported from upstream PR: https://github.com/urfave/cli/pull/1299
+---
+diff --git a/app_test.go b/app_test.go
+index 33024ff..6b3aaa3 100644
+--- a/app_test.go
++++ b/app_test.go
+@@ -513,18 +513,18 @@ func TestApp_RunAsSubcommandParseFlags(t *testing.T) {
+ func TestApp_RunAsSubCommandIncorrectUsage(t *testing.T) {
+ a := App{
+ Flags: []Flag{
+- StringFlag{Name: "--foo"},
++ StringFlag{Name: "foo"},
+ },
+ Writer: bytes.NewBufferString(""),
+ }
+
+ set := flag.NewFlagSet("", flag.ContinueOnError)
+- _ = set.Parse([]string{"", "---foo"})
++ _ = set.Parse([]string{"", "-bar"})
+ c := &Context{flagSet: set}
+
+ err := a.RunAsSubcommand(c)
+
+- expect(t, err, errors.New("bad flag syntax: ---foo"))
++ expect(t, err.Error(), "flag provided but not defined: -bar")
+ }
+
+ func TestApp_CommandWithFlagBeforeTerminator(t *testing.T) {
diff --git a/gnu/packages/patches/go-github-com-urfave-cli-v2-fix-tests.patch b/gnu/packages/patches/go-github-com-urfave-cli-v2-fix-tests.patch
new file mode 100644
index 0000000000..87ccc2b655
--- /dev/null
+++ b/gnu/packages/patches/go-github-com-urfave-cli-v2-fix-tests.patch
@@ -0,0 +1,37 @@
+From upstream PR: https://github.com/urfave/cli/pull/1299
+
+From: William Wilson <[email protected]>
+Date: Tue, 31 Aug 2021 14:19:17 -0500
+Subject: Make test case compatible with Go 1.17
+
+As of Go 1.17, the go flag package will panic if given a syntactically invalid
+flag. This causes TestApp_RunAsSubCommandIncorrectUsage to panic and therefore
+fail. See https://golang.org/doc/go1.17#flag for more information.
+
+---
+diff --git a/app_test.go b/app_test.go
+index 7c38f6048..76e211d68 100644
+--- a/app_test.go
++++ b/app_test.go
+@@ -476,18 +476,18 @@ func TestApp_RunAsSubCommandIncorrectUsage(t *testing.T) {
+ a := App{
+ Name: "cmd",
+ Flags: []Flag{
+- &StringFlag{Name: "--foo"},
++ &StringFlag{Name: "foo"},
+ },
+ Writer: bytes.NewBufferString(""),
+ }
+
+ set := flag.NewFlagSet("", flag.ContinueOnError)
+- _ = set.Parse([]string{"", "---foo"})
++ _ = set.Parse([]string{"", "-bar"})
+ c := &Context{flagSet: set}
+
+ err := a.RunAsSubcommand(c)
+
+- expect(t, err, errors.New("bad flag syntax: ---foo"))
++ expect(t, err.Error(), "flag provided but not defined: -bar")
+ }
+
+ func TestApp_CommandWithFlagBeforeTerminator(t *testing.T) {
diff --git a/gnu/packages/patches/mailutils-fix-uninitialized-variable.patch b/gnu/packages/patches/mailutils-fix-uninitialized-variable.patch
deleted file mode 100644
index 2a1c81648b..0000000000
--- a/gnu/packages/patches/mailutils-fix-uninitialized-variable.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 5ca6382fe8adb5bc436a6d873c8b86c69d5abfd1 Mon Sep 17 00:00:00 2001
-From: Sergey Poznyakoff <[email protected]>
-Date: Sun, 13 Sep 2020 14:43:46 +0300
-Subject: [PATCH] Fix uninitialized variable in readmsg
-
-* readmsg/readmsg.c (main): Initialize weedc.
----
- readmsg/readmsg.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/readmsg/readmsg.c b/readmsg/readmsg.c
-index 9f305bb9c..3a9f420db 100644
---- a/readmsg/readmsg.c
-+++ b/readmsg/readmsg.c
-@@ -466,7 +466,7 @@ main (int argc, char **argv)
- mu_mailbox_t mbox = NULL;
- struct mu_wordsplit ws;
- char **weedv;
-- int weedc;
-+ int weedc = 0;
- int unix_header = 0;
-
- /* Native Language Support */
---
-2.28.0
-
diff --git a/gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch b/gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch
index a74034a2c5..41338e6e6f 100644
--- a/gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch
+++ b/gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch
@@ -8,7 +8,7 @@ When it exists, Minetest will look there for mods
in addition to ~/.minetest/mods/. Mods can still be
installed to ~/.minetest/mods/ with the built-in installer.
-With thanks to Leo Prikler.
+With thanks to Liliana Marie Prikler.
---
builtin/mainmenu/pkgmgr.lua | 7 +++----
doc/menu_lua_api.txt | 8 +++++++-
diff --git a/gnu/packages/patches/nnpack-system-libraries.patch b/gnu/packages/patches/nnpack-system-libraries.patch
new file mode 100644
index 0000000000..d708045ba0
--- /dev/null
+++ b/gnu/packages/patches/nnpack-system-libraries.patch
@@ -0,0 +1,205 @@
+This patch allows us to use our copy of the dependencies instead
+of downloading them and rebuilding them. It also builds a shared
+library.
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5ecd2df..aaa67d1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -12,7 +12,7 @@ SET_PROPERTY(CACHE NNPACK_BACKEND PROPERTY STRINGS auto psimd scalar)
+ OPTION(NNPACK_CONVOLUTION_ONLY "Build only NNPACK functions for convolutional layer" OFF)
+ OPTION(NNPACK_INFERENCE_ONLY "Build only NNPACK functions for inference" OFF)
+ OPTION(NNPACK_CUSTOM_THREADPOOL "Build NNPACK for custom thread pool" OFF)
+-SET(NNPACK_LIBRARY_TYPE "default" CACHE STRING "Type of library (shared, static, or default) to build")
++SET(NNPACK_LIBRARY_TYPE "shared" CACHE STRING "Type of library (shared, static, or default) to build")
+ SET_PROPERTY(CACHE NNPACK_LIBRARY_TYPE PROPERTY STRINGS default static shared)
+ OPTION(NNPACK_BUILD_TESTS "Build NNPACK unit tests" ON)
+
+@@ -123,7 +123,7 @@ SET(CONFU_DEPENDENCIES_BINARY_DIR ${CMAKE_BINARY_DIR}/deps
+ CACHE PATH "Confu-style dependencies binary directory")
+
+ IF(NNPACK_BACKEND STREQUAL "x86-64")
+- IF(NOT DEFINED PYTHON_SIX_SOURCE_DIR)
++ IF(FALSE)
+ MESSAGE(STATUS "Downloading six (Python package) to ${CONFU_DEPENDENCIES_SOURCE_DIR}/six (define PYTHON_SIX_SOURCE_DIR to avoid it)")
+ CONFIGURE_FILE(cmake/DownloadSix.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/six-download/CMakeLists.txt")
+ EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+@@ -133,7 +133,7 @@ IF(NNPACK_BACKEND STREQUAL "x86-64")
+ SET(PYTHON_SIX_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/six" CACHE STRING "six (Python package) source directory")
+ ENDIF()
+
+- IF(NOT DEFINED PYTHON_ENUM_SOURCE_DIR)
++ IF(FALSE)
+ IF(${PYTHON_VERSION_STRING} VERSION_LESS 3.4)
+ # ---[ Python < 3.4 does not natively support enums, and needs a polyfill
+ MESSAGE(STATUS "Downloading enum (Python package) to ${CONFU_DEPENDENCIES_SOURCE_DIR}/enum (define PYTHON_ENUM_SOURCE_DIR to avoid it)")
+@@ -148,7 +148,7 @@ IF(NNPACK_BACKEND STREQUAL "x86-64")
+ ENDIF()
+ ENDIF()
+
+- IF(NOT DEFINED PYTHON_PEACHPY_SOURCE_DIR)
++ IF(FALSE)
+ # ---[ PeachPy requires Opcodes for installation
+ IF(NOT DEFINED PYTHON_OPCODES_SOURCE_DIR)
+ MESSAGE(STATUS "Downloading opcodes (Python package) to ${CONFU_DEPENDENCIES_SOURCE_DIR}/opcodes (define PYTHON_OPCODES_SOURCE_DIR to avoid it)")
+@@ -169,15 +169,9 @@ IF(NNPACK_BACKEND STREQUAL "x86-64")
+ SET(PYTHON_PEACHPY_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/peachpy" CACHE STRING "PeachPy (Python package) source directory")
+ ENDIF()
+
+- IF(${PYTHON_VERSION_STRING} VERSION_LESS 3.4)
+- # ---[ Python < 3.4 does not natively support enums, and needs a polyfill
+- SET(PEACHPY_PYTHONPATH "${PYTHON_SIX_SOURCE_DIR}:${PYTHON_ENUM_SOURCE_DIR}:${PYTHON_PEACHPY_SOURCE_DIR}")
+- ELSE()
+- SET(PEACHPY_PYTHONPATH "${PYTHON_SIX_SOURCE_DIR}:${PYTHON_PEACHPY_SOURCE_DIR}")
+- ENDIF()
+ ENDIF()
+
+-IF(NOT DEFINED CPUINFO_SOURCE_DIR)
++IF(FALSE)
+ MESSAGE(STATUS "Downloading cpuinfo to ${CONFU_DEPENDENCIES_SOURCE_DIR}/cpuinfo (define CPUINFO_SOURCE_DIR to avoid it)")
+ CONFIGURE_FILE(cmake/DownloadCpuinfo.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/cpuinfo-download/CMakeLists.txt")
+ EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+@@ -187,7 +181,7 @@ IF(NOT DEFINED CPUINFO_SOURCE_DIR)
+ SET(CPUINFO_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/cpuinfo" CACHE STRING "cpuinfo source directory")
+ ENDIF()
+
+-IF(NOT DEFINED FP16_SOURCE_DIR)
++IF(FALSE)
+ MESSAGE(STATUS "Downloading FP16 to ${CONFU_DEPENDENCIES_SOURCE_DIR}/fp16 (define FP16_SOURCE_DIR to avoid it)")
+ CONFIGURE_FILE(cmake/DownloadFP16.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/fp16-download/CMakeLists.txt")
+ EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+@@ -197,7 +191,7 @@ IF(NOT DEFINED FP16_SOURCE_DIR)
+ SET(FP16_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/fp16" CACHE STRING "FP16 source directory")
+ ENDIF()
+
+-IF(NOT DEFINED FXDIV_SOURCE_DIR)
++IF(FALSE)
+ MESSAGE(STATUS "Downloading FXdiv to ${CONFU_DEPENDENCIES_SOURCE_DIR}/fxdiv (define FXDIV_SOURCE_DIR to avoid it)")
+ CONFIGURE_FILE(cmake/DownloadFXdiv.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/fxdiv-download/CMakeLists.txt")
+ EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+@@ -207,7 +201,7 @@ IF(NOT DEFINED FXDIV_SOURCE_DIR)
+ SET(FXDIV_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/fxdiv" CACHE STRING "FXdiv source directory")
+ ENDIF()
+
+-IF(NOT DEFINED PSIMD_SOURCE_DIR)
++IF(FALSE)
+ MESSAGE(STATUS "Downloading PSimd to ${CONFU_DEPENDENCIES_SOURCE_DIR}/psimd (define PSIMD_SOURCE_DIR to avoid it)")
+ CONFIGURE_FILE(cmake/DownloadPSimd.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/psimd-download/CMakeLists.txt")
+ EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+@@ -217,7 +211,7 @@ IF(NOT DEFINED PSIMD_SOURCE_DIR)
+ SET(PSIMD_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/psimd" CACHE STRING "PSimd source directory")
+ ENDIF()
+
+-IF(NOT DEFINED PTHREADPOOL_SOURCE_DIR)
++IF(FALSE)
+ MESSAGE(STATUS "Downloading pthreadpool to ${CONFU_DEPENDENCIES_SOURCE_DIR}/pthreadpool (define PTHREADPOOL_SOURCE_DIR to avoid it)")
+ CONFIGURE_FILE(cmake/DownloadPThreadPool.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/pthreadpool-download/CMakeLists.txt")
+ EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+@@ -227,7 +221,7 @@ IF(NOT DEFINED PTHREADPOOL_SOURCE_DIR)
+ SET(PTHREADPOOL_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/pthreadpool" CACHE STRING "pthreadpool source directory")
+ ENDIF()
+
+-IF(NNPACK_BUILD_TESTS AND NOT DEFINED GOOGLETEST_SOURCE_DIR)
++IF(FALSE)
+ MESSAGE(STATUS "Downloading Google Test to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest (define GOOGLETEST_SOURCE_DIR to avoid it)")
+ CONFIGURE_FILE(cmake/DownloadGoogleTest.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download/CMakeLists.txt")
+ EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+@@ -237,6 +231,7 @@ IF(NNPACK_BUILD_TESTS AND NOT DEFINED GOOGLETEST_SOURCE_DIR)
+ SET(GOOGLETEST_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest" CACHE STRING "Google Test source directory")
+ ENDIF()
+
++
+ # ---[ NNPACK library
+ SET(NNPACK_INIT_SRCS src/init.c)
+ SET(NNPACK_LAYER_SRCS src/convolution-inference.c)
+@@ -427,8 +422,7 @@ IF(NNPACK_BACKEND STREQUAL "x86-64")
+ FILE(MAKE_DIRECTORY ${obj_dir})
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${obj}
+- COMMAND "PYTHONPATH=${PEACHPY_PYTHONPATH}"
+- ${PYTHON_EXECUTABLE} -m peachpy.x86_64
++ COMMAND ${PYTHON_EXECUTABLE} -m peachpy.x86_64
+ -mabi=sysv -g4 -mimage-format=${PEACHPY_IMAGE_FORMAT}
+ "-I${PROJECT_SOURCE_DIR}/src" "-I${PROJECT_SOURCE_DIR}/src/x86_64-fma" "-I${FP16_SOURCE_DIR}/include"
+ -o ${obj} "${PROJECT_SOURCE_DIR}/${src}"
+@@ -495,63 +489,10 @@ ADD_LIBRARY(nnpack_reference_layers STATIC ${NNPACK_REFERENCE_LAYERS_SRCS})
+ NNPACK_TARGET_ENABLE_C99(nnpack_reference_layers)
+ TARGET_INCLUDE_DIRECTORIES(nnpack_reference_layers PUBLIC include)
+
+-# ---[ Configure cpuinfo
+-IF(NOT TARGET cpuinfo)
+- SET(CPUINFO_BUILD_TOOLS OFF CACHE BOOL "")
+- SET(CPUINFO_BUILD_UNIT_TESTS OFF CACHE BOOL "")
+- SET(CPUINFO_BUILD_MOCK_TESTS OFF CACHE BOOL "")
+- SET(CPUINFO_BUILD_BENCHMARKS OFF CACHE BOOL "")
+- ADD_SUBDIRECTORY(
+- "${CPUINFO_SOURCE_DIR}"
+- "${CONFU_DEPENDENCIES_BINARY_DIR}/cpuinfo")
+-ENDIF()
+-TARGET_LINK_LIBRARIES(nnpack PRIVATE cpuinfo)
+-
+-# ---[ Configure pthreadpool
+-IF(NOT TARGET pthreadpool)
+- SET(PTHREADPOOL_BUILD_TESTS OFF CACHE BOOL "")
+- SET(PTHREADPOOL_BUILD_BENCHMARKS OFF CACHE BOOL "")
+- ADD_SUBDIRECTORY(
+- "${PTHREADPOOL_SOURCE_DIR}"
+- "${CONFU_DEPENDENCIES_BINARY_DIR}/pthreadpool")
+-ENDIF()
+-IF(NNPACK_CUSTOM_THREADPOOL)
+- # Depend on pthreadpool interface, but not on implementation.
+- # This is used when NNPACK user (e.g. Caffe2) provides its own threadpool implementation.
+- TARGET_LINK_LIBRARIES(nnpack PUBLIC pthreadpool_interface)
+-ELSE()
+- TARGET_LINK_LIBRARIES(nnpack PUBLIC pthreadpool)
+-ENDIF()
+-TARGET_LINK_LIBRARIES(nnpack_reference_layers PUBLIC pthreadpool)
++TARGET_LINK_LIBRARIES(nnpack PUBLIC cpuinfo)
+
+-# ---[ Configure FXdiv
+-IF(NOT TARGET fxdiv)
+- SET(FXDIV_BUILD_TESTS OFF CACHE BOOL "")
+- SET(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "")
+- ADD_SUBDIRECTORY(
+- "${FXDIV_SOURCE_DIR}"
+- "${CONFU_DEPENDENCIES_BINARY_DIR}/fxdiv")
+-ENDIF()
+-TARGET_LINK_LIBRARIES(nnpack PRIVATE fxdiv)
+-
+-# ---[ Configure psimd
+-IF(NOT TARGET psimd)
+- ADD_SUBDIRECTORY(
+- "${PSIMD_SOURCE_DIR}"
+- "${CONFU_DEPENDENCIES_BINARY_DIR}/psimd")
+-ENDIF()
+-TARGET_LINK_LIBRARIES(nnpack PRIVATE psimd)
+-
+-# ---[ Configure FP16
+-IF(NOT TARGET fp16)
+- SET(FP16_BUILD_TESTS OFF CACHE BOOL "")
+- SET(FP16_BUILD_BENCHMARKS OFF CACHE BOOL "")
+- ADD_SUBDIRECTORY(
+- "${FP16_SOURCE_DIR}"
+- "${CONFU_DEPENDENCIES_BINARY_DIR}/fp16")
+-ENDIF()
+-TARGET_LINK_LIBRARIES(nnpack PRIVATE fp16)
+-TARGET_LINK_LIBRARIES(nnpack_reference_layers PUBLIC fp16)
++TARGET_LINK_LIBRARIES(nnpack PUBLIC pthreadpool)
++TARGET_LINK_LIBRARIES(nnpack_reference_layers PUBLIC pthreadpool)
+
+ INSTALL(TARGETS nnpack
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+@@ -560,13 +501,6 @@ INSTALL(TARGETS nnpack
+
+ IF(NNPACK_BUILD_TESTS)
+ # ---[ Build google test
+- IF(NOT TARGET gtest)
+- SET(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+- ADD_SUBDIRECTORY(
+- "${GOOGLETEST_SOURCE_DIR}"
+- "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest")
+- ENDIF()
+-
+ ADD_EXECUTABLE(convolution-inference-smoketest test/convolution-inference/smoke.cc)
+ NNPACK_TARGET_ENABLE_CXX11(convolution-inference-smoketest)
+ TARGET_INCLUDE_DIRECTORIES(convolution-inference-smoketest PRIVATE test)
diff --git a/gnu/packages/patches/ntfs-3g-CVE-2019-9755.patch b/gnu/packages/patches/ntfs-3g-CVE-2019-9755.patch
deleted file mode 100644
index a7794aed47..0000000000
--- a/gnu/packages/patches/ntfs-3g-CVE-2019-9755.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-Fix CVE-2019-9755:
-
-https://security-tracker.debian.org/tracker/CVE-2019-9755
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-9755
-
-Patch copied from upstream source repository:
-
-https://sourceforge.net/p/ntfs-3g/ntfs-3g/ci/85c1634a26faa572d3c558d4cf8aaaca5202d4e9/
-
-From 85c1634a26faa572d3c558d4cf8aaaca5202d4e9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= <[email protected]>
-Date: Wed, 19 Dec 2018 15:57:50 +0100
-Subject: [PATCH] Fixed reporting an error when failed to build the mountpoint
-
-The size check was inefficient because getcwd() uses an unsigned int
-argument.
----
- src/lowntfs-3g.c | 6 +++++-
- src/ntfs-3g.c | 6 +++++-
- 2 files changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c
-index 993867fa..0660439b 100644
---- a/src/lowntfs-3g.c
-+++ b/src/lowntfs-3g.c
-@@ -4411,7 +4411,8 @@ int main(int argc, char *argv[])
- else {
- ctx->abs_mnt_point = (char*)ntfs_malloc(PATH_MAX);
- if (ctx->abs_mnt_point) {
-- if (getcwd(ctx->abs_mnt_point,
-+ if ((strlen(opts.mnt_point) < PATH_MAX)
-+ && getcwd(ctx->abs_mnt_point,
- PATH_MAX - strlen(opts.mnt_point) - 1)) {
- strcat(ctx->abs_mnt_point, "/");
- strcat(ctx->abs_mnt_point, opts.mnt_point);
-@@ -4419,6 +4420,9 @@ int main(int argc, char *argv[])
- /* Solaris also wants the absolute mount point */
- opts.mnt_point = ctx->abs_mnt_point;
- #endif /* defined(__sun) && defined (__SVR4) */
-+ } else {
-+ free(ctx->abs_mnt_point);
-+ ctx->abs_mnt_point = (char*)NULL;
- }
- }
- }
-diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c
-index 6ce89fef..4e0912ae 100644
---- a/src/ntfs-3g.c
-+++ b/src/ntfs-3g.c
-@@ -4148,7 +4148,8 @@ int main(int argc, char *argv[])
- else {
- ctx->abs_mnt_point = (char*)ntfs_malloc(PATH_MAX);
- if (ctx->abs_mnt_point) {
-- if (getcwd(ctx->abs_mnt_point,
-+ if ((strlen(opts.mnt_point) < PATH_MAX)
-+ && getcwd(ctx->abs_mnt_point,
- PATH_MAX - strlen(opts.mnt_point) - 1)) {
- strcat(ctx->abs_mnt_point, "/");
- strcat(ctx->abs_mnt_point, opts.mnt_point);
-@@ -4156,6 +4157,9 @@ int main(int argc, char *argv[])
- /* Solaris also wants the absolute mount point */
- opts.mnt_point = ctx->abs_mnt_point;
- #endif /* defined(__sun) && defined (__SVR4) */
-+ } else {
-+ free(ctx->abs_mnt_point);
-+ ctx->abs_mnt_point = (char*)NULL;
- }
- }
- }
---
-2.21.0
-
diff --git a/gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch b/gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch
index 155ba35efd..3a5ae1a2cd 100644
--- a/gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch
+++ b/gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch
@@ -1,9 +1,9 @@
From 942730ce7148cd54a30d4a606ce71a2654c8a2e0 Mon Sep 17 00:00:00 2001
-From: Leo Prikler <[email protected]>
+From: Liliana Marie Prikler <[email protected]>
Date: Sat, 5 Jun 2021 22:47:00 -0400
Subject: [PATCH] ppsspp: Remove upgrade code and gold support.
-Original patch from Leo Prikler.
+Original patch from Liliana Marie Prikler.
Rebased on master (commit 69fa20744958aef8da9ca052ba7675fdc1636e46) by
Maxim Cournoyer.
---
diff --git a/gnu/packages/patches/python-pytorch-system-libraries.patch b/gnu/packages/patches/python-pytorch-system-libraries.patch
index c8d14b3f56..76c06520f0 100644
--- a/gnu/packages/patches/python-pytorch-system-libraries.patch
+++ b/gnu/packages/patches/python-pytorch-system-libraries.patch
@@ -81,7 +81,7 @@ diff --git a/torch/lib/c10d/test/CMakeLists.txt b/torch/lib/c10d/test/CMakeLists
index b74d4b65f7..fc7c207505 100644
--- a/torch/lib/c10d/test/CMakeLists.txt
+++ b/torch/lib/c10d/test/CMakeLists.txt
-@@ -16,25 +16,25 @@ function(c10d_add_test test_src)
+@@ -16,24 +16,24 @@ function(c10d_add_test test_src)
add_test(NAME ${test_name} COMMAND $<TARGET_FILE:${test_name}>)
endfunction()
@@ -114,18 +114,26 @@ index b74d4b65f7..fc7c207505 100644
+ c10d_add_test(ProcessGroupGlooTest.cpp c10d gtest_main gtest)
endif()
endif()
+
+diff --git a/cmake/External/nnpack.cmake b/cmake/External/nnpack.cmake
+index a41343cbb5..6075bdd0a4 100644
+--- a/cmake/External/nnpack.cmake
++++ b/cmake/External/nnpack.cmake
+@@ -40,7 +40,7 @@ endif()
+ # (3) Android, iOS, Linux, macOS - supported
+ ##############################################################################
+
+-if(ANDROID OR IOS OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
++if(FALSE)
+ message(STATUS "Brace yourself, we are building NNPACK")
+ set(CAFFE2_THIRD_PARTY_ROOT ${PROJECT_SOURCE_DIR}/third_party)
+
+@@ -114,6 +114,5 @@ endif()
+ # (4) Catch-all: not supported.
+ ##############################################################################
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 5ecd2df..24feae3 100644
---- a/third_party/NNPACK/CMakeLists.txt
-+++ b/third_party/NNPACK/CMakeLists.txt
-@@ -427,8 +427,7 @@ IF(NNPACK_BACKEND STREQUAL "x86-64")
- FILE(MAKE_DIRECTORY ${obj_dir})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${obj}
-- COMMAND "PYTHONPATH=${PEACHPY_PYTHONPATH}"
-- ${PYTHON_EXECUTABLE} -m peachpy.x86_64
-+ COMMAND ${PYTHON_EXECUTABLE} -m peachpy.x86_64
- -mabi=sysv -g4 -mimage-format=${PEACHPY_IMAGE_FORMAT}
- "-I${PROJECT_SOURCE_DIR}/src" "-I${PROJECT_SOURCE_DIR}/src/x86_64-fma" "-I${FP16_SOURCE_DIR}/include"
- -o ${obj} "${PROJECT_SOURCE_DIR}/${src}"
+-message(WARNING "Unknown platform - I don't know how to build NNPACK. "
+- "See cmake/External/nnpack.cmake for details.")
+-set(USE_NNPACK OFF)
++set(NNPACK_FOUND TRUE)
++set(USE_NNPACK ON)
diff --git a/gnu/packages/patches/racket-minimal-backport-1629887.patch b/gnu/packages/patches/racket-minimal-backport-1629887.patch
new file mode 100644
index 0000000000..aa060ef5aa
--- /dev/null
+++ b/gnu/packages/patches/racket-minimal-backport-1629887.patch
@@ -0,0 +1,28 @@
+From fb1a6ab205fd63a46669a463931af473e2ac0c87 Mon Sep 17 00:00:00 2001
+From: Matthew Flatt <[email protected]>
+Date: Sat, 21 Aug 2021 15:29:59 -0600
+Subject: [PATCH] setup/variant: recognize starter executables
+
+Related to #3969
+
+(cherry picked from commit 1629887071fe3cc8fe8af0a7aa0d3912509cb058)
+---
+ racket/collects/setup/variant.rkt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/racket/collects/setup/variant.rkt b/racket/collects/setup/variant.rkt
+index 81da6f5701..b23131e481 100644
+--- a/racket/collects/setup/variant.rkt
++++ b/racket/collects/setup/variant.rkt
+@@ -25,7 +25,7 @@
+ (and (file-exists? f)
+ (with-input-from-file f
+ (lambda ()
+- (define m (regexp-match #rx#"bINARy tYPe:..(.)"
++ (define m (regexp-match #rx#"bINARy tYPe:e?..(.)"
+ (current-input-port)))
+ (cond
+ [(not m) '3m]
+--
+2.30.2
+
diff --git a/gnu/packages/patches/ungoogled-chromium-ffmpeg-compat.patch b/gnu/packages/patches/ungoogled-chromium-ffmpeg-compat.patch
new file mode 100644
index 0000000000..636f518a33
--- /dev/null
+++ b/gnu/packages/patches/ungoogled-chromium-ffmpeg-compat.patch
@@ -0,0 +1,68 @@
+The bundled ffmpeg in Chromium is newer than the one in Guix. Patch so
+we can build with the new and old ffmpeg versions.
+
+Taken from Gentoo:
+https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files/chromium-93-fix-build-with-system-ffmpeg.patch
+
+diff --git a/media/filters/audio_decoder_unittest.cc b/media/filters/audio_decoder_unittest.cc
+--- a/media/filters/audio_decoder_unittest.cc
++++ b/media/filters/audio_decoder_unittest.cc
+@@ -109,7 +109,11 @@ void SetDiscardPadding(AVPacket* packet,
+ }
+
+ // If the timestamp is positive, try to use FFmpeg's discard data.
++#if LIBAVUTIL_VERSION_MAJOR < 57
++ int skip_samples_size = 0;
++#else
+ size_t skip_samples_size = 0;
++#endif
+ const uint32_t* skip_samples_ptr =
+ reinterpret_cast<const uint32_t*>(av_packet_get_side_data(
+ packet, AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size));
+diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
+--- a/media/filters/ffmpeg_demuxer.cc
++++ b/media/filters/ffmpeg_demuxer.cc
+@@ -427,11 +427,19 @@ void FFmpegDemuxerStream::EnqueuePacket(
+ scoped_refptr<DecoderBuffer> buffer;
+
+ if (type() == DemuxerStream::TEXT) {
++#if LIBAVUTIL_VERSION_MAJOR < 57
++ int id_size = 0;
++#else
+ size_t id_size = 0;
++#endif
+ uint8_t* id_data = av_packet_get_side_data(
+ packet.get(), AV_PKT_DATA_WEBVTT_IDENTIFIER, &id_size);
+
++#if LIBAVUTIL_VERSION_MAJOR < 57
++ int settings_size = 0;
++#else
+ size_t settings_size = 0;
++#endif
+ uint8_t* settings_data = av_packet_get_side_data(
+ packet.get(), AV_PKT_DATA_WEBVTT_SETTINGS, &settings_size);
+
+@@ -443,7 +451,11 @@ void FFmpegDemuxerStream::EnqueuePacket(
+ buffer = DecoderBuffer::CopyFrom(packet->data, packet->size,
+ side_data.data(), side_data.size());
+ } else {
++#if LIBAVUTIL_VERSION_MAJOR < 57
++ int side_data_size = 0;
++#else
+ size_t side_data_size = 0;
++#endif
+ uint8_t* side_data = av_packet_get_side_data(
+ packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size);
+
+@@ -504,7 +516,11 @@ void FFmpegDemuxerStream::EnqueuePacket(
+ packet->size - data_offset);
+ }
+
++#if LIBAVUTIL_VERSION_MAJOR < 57
++ int skip_samples_size = 0;
++#else
+ size_t skip_samples_size = 0;
++#endif
+ const uint32_t* skip_samples_ptr =
+ reinterpret_cast<const uint32_t*>(av_packet_get_side_data(
+ packet.get(), AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size));
diff --git a/gnu/packages/patches/ungoogled-chromium-system-nspr.patch b/gnu/packages/patches/ungoogled-chromium-system-nspr.patch
new file mode 100644
index 0000000000..831e2b899c
--- /dev/null
+++ b/gnu/packages/patches/ungoogled-chromium-system-nspr.patch
@@ -0,0 +1,54 @@
+Build with the system NSPR library instead of the bundled version.
+
+Originally based on this Debian patch:
+https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/system/nspr.patch
+
+diff --git a/base/BUILD.gn b/base/BUILD.gn
+--- a/base/BUILD.gn
++++ b/base/BUILD.gn
+@@ -141,6 +141,12 @@ config("perfetto_config") {
+ }
+ }
+
++if (is_linux) {
++ ldflags = [
++ "-lnspr4",
++ ]
++}
++
+ # Base and everything it depends on should be a static library rather than
+ # a source set. Base is more of a "library" in the classic sense in that many
+ # small parts of it are used in many different contexts. This combined with a
+@@ -759,8 +765,6 @@ component("base") {
+ "third_party/cityhash_v103/src/city_v103.cc",
+ "third_party/cityhash_v103/src/city_v103.h",
+ "third_party/icu/icu_utf.h",
+- "third_party/nspr/prtime.cc",
+- "third_party/nspr/prtime.h",
+ "third_party/superfasthash/superfasthash.c",
+ "thread_annotations.h",
+ "threading/hang_watcher.cc",
+diff --git a/base/time/pr_time_unittest.cc b/base/time/pr_time_unittest.cc
+--- a/base/time/pr_time_unittest.cc
++++ b/base/time/pr_time_unittest.cc
+@@ -7,7 +7,7 @@
+
+ #include "base/compiler_specific.h"
+ #include "base/cxx17_backports.h"
+-#include "base/third_party/nspr/prtime.h"
++#include <nspr/prtime.h>
+ #include "base/time/time.h"
+ #include "build/build_config.h"
+ #include "testing/gtest/include/gtest/gtest.h"
+diff --git a/base/time/time.cc b/base/time/time.cc
+--- a/base/time/time.cc
++++ b/base/time/time.cc
+@@ -18,7 +18,7 @@
+ #include <utility>
+
+ #include "base/strings/stringprintf.h"
+-#include "base/third_party/nspr/prtime.h"
++#include <nspr/prtime.h>
+ #include "base/time/time_override.h"
+ #include "build/build_config.h"
+ #include "third_party/abseil-cpp/absl/types/optional.h"
diff --git a/gnu/packages/patches/webkitgtk-bind-all-fonts.patch b/gnu/packages/patches/webkitgtk-bind-all-fonts.patch
index 3fe9704727..e7b06cc650 100644
--- a/gnu/packages/patches/webkitgtk-bind-all-fonts.patch
+++ b/gnu/packages/patches/webkitgtk-bind-all-fonts.patch
@@ -1,7 +1,7 @@
Add fonts from all XDG_DATA_DIRS, not just XDG_DATA_HOME.
See <http://bugs.gnu.org/41174>.
-Author: Leo Prikler <[email protected]>
+Author: Liliana Marie Prikler <[email protected]>
Index: webkitgtk-2.28.2/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
===================================================================
--- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
diff --git a/gnu/packages/patches/xgboost-use-system-dmlc-core.patch b/gnu/packages/patches/xgboost-use-system-dmlc-core.patch
new file mode 100644
index 0000000000..c654694fec
--- /dev/null
+++ b/gnu/packages/patches/xgboost-use-system-dmlc-core.patch
@@ -0,0 +1,34 @@
+From 34167cc105e47589b86b6f62da76e0ab744002dd Mon Sep 17 00:00:00 2001
+From: Vinicius Monego <[email protected]>
+Date: Tue, 11 May 2021 19:35:30 -0300
+Subject: [PATCH] Use dmlc-core from Guix.
+
+---
+This patch is a subset of the following Debian patch: https://sources.debian.org/src/xgboost/1.2.1-1/debian/patches/cmake.patch/
+
+Rabit is now developed as part of xgboost, so we don't build it separately.
+
+ CMakeLists.txt | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6cc19fbd..3b42bc17 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -150,11 +150,9 @@ endif (USE_OPENMP)
+
+ # dmlc-core
+ msvc_use_static_runtime()
+-add_subdirectory(${xgboost_SOURCE_DIR}/dmlc-core)
+-set_target_properties(dmlc PROPERTIES
+- CXX_STANDARD 14
+- CXX_STANDARD_REQUIRED ON
+- POSITION_INDEPENDENT_CODE ON)
++add_library(dmlc SHARED IMPORTED)
++find_library(DMLC_LIBRARY dmlc)
++set_property(TARGET dmlc PROPERTY IMPORTED_LOCATION "${DMLC_LIBRARY}")
+ if (MSVC)
+ target_compile_options(dmlc PRIVATE
+ -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE)
+--
+2.31.1