summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/aspell-default-dict-dir.patch24
-rw-r--r--gnu/packages/patches/aspell-gcc-compat.patch31
-rw-r--r--gnu/packages/patches/bash-linux-pgrp-pipe.patch32
-rw-r--r--gnu/packages/patches/bc-fix-cross-compilation.patch171
-rw-r--r--gnu/packages/patches/cmake-curl-certificates.patch10
-rw-r--r--gnu/packages/patches/cyrus-sasl-ac-try-run-fix.patch12
-rw-r--r--gnu/packages/patches/dconf-meson-0.52.patch19
-rw-r--r--gnu/packages/patches/doxygen-1.8.17-runtests.patch73
-rw-r--r--gnu/packages/patches/doxygen-test.patch38
-rw-r--r--gnu/packages/patches/file-CVE-2018-10360.patch27
-rw-r--r--gnu/packages/patches/file-CVE-2019-18218.patch55
-rw-r--r--gnu/packages/patches/findutils-gnulib-libio.patch114
-rw-r--r--gnu/packages/patches/findutils-makedev.patch22
-rw-r--r--gnu/packages/patches/findutils-test-xargs.patch22
-rw-r--r--gnu/packages/patches/fribidi-CVE-2019-18397.patch26
-rw-r--r--gnu/packages/patches/ghostscript-no-header-id.patch14
-rw-r--r--gnu/packages/patches/giflib-make-reallocarray-private.patch120
-rw-r--r--gnu/packages/patches/glibc-CVE-2019-19126.patch22
-rw-r--r--gnu/packages/patches/gsl-test-i686.patch17
-rw-r--r--gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch55
-rw-r--r--gnu/packages/patches/libffi-3.2.1-complex-alpha.patch28
-rw-r--r--gnu/packages/patches/libjpeg-turbo-CVE-2019-2201.patch31
-rw-r--r--gnu/packages/patches/libxslt-generated-ids.patch6
-rw-r--r--gnu/packages/patches/pango-skip-libthai-test.patch23
-rw-r--r--gnu/packages/patches/python-2.7-search-paths.patch10
-rw-r--r--gnu/packages/patches/python-3-search-paths.patch11
-rw-r--r--gnu/packages/patches/python-cross-compile.patch145
-rw-r--r--gnu/packages/patches/swig-guile-gc.patch76
-rw-r--r--gnu/packages/patches/tcl-fix-cross-compilation.patch39
-rw-r--r--gnu/packages/patches/tcsh-fix-autotest.patch45
-rw-r--r--gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch31
-rw-r--r--gnu/packages/patches/vigra-python-compat.patch18
-rw-r--r--gnu/packages/patches/webkitgtk-icu-65.patch47
33 files changed, 799 insertions, 615 deletions
diff --git a/gnu/packages/patches/aspell-default-dict-dir.patch b/gnu/packages/patches/aspell-default-dict-dir.patch
index 17a6ff606f..5f759a66d9 100644
--- a/gnu/packages/patches/aspell-default-dict-dir.patch
+++ b/gnu/packages/patches/aspell-default-dict-dir.patch
@@ -8,12 +8,34 @@ However it is necessary for applications that use libaspell since
--- a/common/config.cpp
+++ b/common/config.cpp
+@@ -651,7 +651,20 @@ namespace acommon {
+ } else { // sep == '|'
+ assert(replace[0] == '$');
+ const char * env = getenv(replace.c_str()+1);
+- final_str += env ? env : second;
++ if (env) {
++ final_str += env;
++ } else if (second[0] == '$') {
++ // Expand the right-hand side of '|', which starts with a
++ // reference to an environment variable.
++ auto slash = second.find('/');
++ String variable = second.substr(1, slash - 1);
++ const char * env = getenv(variable.c_str());
++ String value = env ? String(env) : "";
++ value += second.substr(slash, second.size() - slash);
++ final_str += value;
++ } else {
++ final_str += second;
++ }
+ }
+ replace = "";
+ in_replace = false;
@@ -1349,6 +1349,9 @@ namespace acommon {
# define REPL ".aspell.<lang>.prepl"
#endif
+#undef DICT_DIR
-+#define DICT_DIR "<$ASPELL_DICT_DIR|home-dir/.guix-profile/lib/aspell>"
++#define DICT_DIR "<$ASPELL_DICT_DIR|$HOME/.guix-profile/lib/aspell>"
+
static const KeyInfo config_keys[] = {
// the description should be under 50 chars
diff --git a/gnu/packages/patches/aspell-gcc-compat.patch b/gnu/packages/patches/aspell-gcc-compat.patch
deleted file mode 100644
index 94c44f8fb6..0000000000
--- a/gnu/packages/patches/aspell-gcc-compat.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Fix GCC7 warnings.
-
-Taken from upstream:
-https://git.savannah.gnu.org/cgit/aspell.git/commit/?id=8089fa02122fed0a6394eba14bbedcb1d18e2384
-
-diff --git a/modules/filter/tex.cpp b/modules/filter/tex.cpp
-index a979539..19ab63c 100644
---- a/modules/filter/tex.cpp
-+++ b/modules/filter/tex.cpp
-@@ -174,7 +174,7 @@ namespace {
-
- if (c == '{') {
-
-- if (top.in_what == Parm || top.in_what == Opt || top.do_check == '\0')
-+ if (top.in_what == Parm || top.in_what == Opt || *top.do_check == '\0')
- push_command(Parm);
-
- top.in_what = Parm;
-diff --git a/prog/check_funs.cpp b/prog/check_funs.cpp
-index db54f3d..89ee09d 100644
---- a/prog/check_funs.cpp
-+++ b/prog/check_funs.cpp
-@@ -647,7 +647,7 @@ static void print_truncate(FILE * out, const char * word, int width) {
- }
- }
- if (i == width-1) {
-- if (word == '\0')
-+ if (*word == '\0')
- put(out,' ');
- else if (word[len] == '\0')
- put(out, word, len);
diff --git a/gnu/packages/patches/bash-linux-pgrp-pipe.patch b/gnu/packages/patches/bash-linux-pgrp-pipe.patch
new file mode 100644
index 0000000000..234a55e897
--- /dev/null
+++ b/gnu/packages/patches/bash-linux-pgrp-pipe.patch
@@ -0,0 +1,32 @@
+Unconditionally enable PGRP_PIPE on Linux (the kernel), regardless of
+the kernel version in use on the build machine.
+
+--- configure.ac.orig 2019-01-02 09:38:44.000000000 -0500
++++ configure.ac 2019-08-15 16:40:24.271758379 -0400
+@@ -1108,10 +1108,7 @@
+ solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
+ lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
+ linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
+- case "`uname -r`" in
+- 1.*|2.[[0123]]*) : ;;
+- *) AC_DEFINE(PGRP_PIPE) ;;
+- esac ;;
++ AC_DEFINE(PGRP_PIPE) ;;
+ netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;;
+ *qnx[[67]]*) LOCAL_LIBS="-lncurses" ;;
+ *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
+--- configure.orig 2019-01-02 09:43:04.000000000 -0500
++++ configure 2019-08-15 16:41:44.440155912 -0400
+@@ -16312,11 +16312,7 @@
+ solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
+ lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
+ linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
+- case "`uname -r`" in
+- 1.*|2.[0123]*) : ;;
+- *) $as_echo "#define PGRP_PIPE 1" >>confdefs.h
+- ;;
+- esac ;;
++ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;;
+ netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;;
+ *qnx[67]*) LOCAL_LIBS="-lncurses" ;;
+ *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
diff --git a/gnu/packages/patches/bc-fix-cross-compilation.patch b/gnu/packages/patches/bc-fix-cross-compilation.patch
new file mode 100644
index 0000000000..14dfecdbde
--- /dev/null
+++ b/gnu/packages/patches/bc-fix-cross-compilation.patch
@@ -0,0 +1,171 @@
+Patch taken from nix.
+
+commit fdda59736ddc048cf38a2c7103f4f5d9eeaf995e
+Author: Ben Gamari <ben@smart-cactus.org>
+Date: Tue Oct 17 10:51:34 2017 -0400
+
+ Try implementing cross-compilation
+
+diff --git a/bc/Makefile.am b/bc/Makefile.am
+index d9d412e..fdef633 100644
+--- a/bc/Makefile.am
++++ b/bc/Makefile.am
+@@ -17,6 +17,7 @@ MAINTAINERCLEANFILES = Makefile.in bc.c bc.h scan.c \
+
+ AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/../h
+ LIBBC = ../lib/libbc.a
++LIBBC_HOST = ../lib/libbc_host.a
+ LIBL = @LEXLIB@
+ LDADD = $(LIBBC) $(LIBL) @READLINELIB@
+
+@@ -29,12 +30,20 @@ $(PROGRAMS): libmath.h $(LIBBC)
+ scan.o: bc.h
+ global.o: libmath.h
++
++main_host.c : main.c
++ cp $< $@
+
+-fbcOBJ = main.o bc.o scan.o execute.o load.o storage.o util.o warranty.o
++fbcOBJ = $(addsuffix _host,main.o bc.o scan.o execute.o load.o storage.o util.o warranty.o)
++
++%.o_host : CC:=$(CC_FOR_BUILD)
++
++%.o_host : %.c
++ $(COMPILE) -c $(CFLAGS) $(INCLUDES) -o $@ $<
+
+-libmath.h: libmath.b $(fbcOBJ) $(LIBBC)
++libmath.h: libmath.b $(fbcOBJ) $(LIBBC_HOST)
+ echo '{0}' > libmath.h
+- $(MAKE) global.o
+- $(LINK) -o fbc $(fbcOBJ) global.o $(LIBBC) $(LIBL) $(READLINELIB) $(LIBS)
++ $(MAKE) global.o_host
++ $(CC_FOR_BUILD) -o fbc $(fbcOBJ) global.o_host $(LIBBC_HOST) $(LIBL) ${READLINELIB} $(LIBS)
+ ./fbc -c $(srcdir)/libmath.b </dev/null >libmath.h
+ $(srcdir)/fix-libmath_h
+ rm -f ./fbc ./global.o
+diff --git a/configure.ac b/configure.ac
+index fc74573..5cabb73 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,6 +20,7 @@ m4_define([dc_version], 1.4.1)
+
+ AC_INIT([bc],[bc_version])
+ AC_CONFIG_SRCDIR(doc/bc.1)
++AC_CONFIG_MACRO_DIR([m4])
+ AM_INIT_AUTOMAKE([dist-bzip2])
+ AC_CONFIG_HEADERS(config.h)
+
+@@ -35,6 +36,7 @@ AC_DEFINE([DC_COPYRIGHT],
+ [Define the dc copyright line.])
+
+ AC_PROG_CC
++AX_CC_FOR_BUILD
+ AC_USE_SYSTEM_EXTENSIONS
+
+ AM_PROG_LEX
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index ec4bf59..c670f5b 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -1,5 +1,5 @@
+ ## Process this file with automake to produce Makefile.in
+-noinst_LIBRARIES = libbc.a
++noinst_LIBRARIES = libbc.a libbc_host.a
+
+ AM_CPPFLAGS = -I. -I.. -I$(srcdir)/../h
+
+@@ -24,3 +24,11 @@ testmul: testmul.o number.o
+
+ specialnumber: newnumber.o
+ cp newnumber.o number.o
++
++%.o_host : CC:=$(CC_FOR_BUILD)
++%.o_host : %.c
++ $(COMPILE) -c $(CFLAGS) $(INCLUDES) -o $@ $<
++
++libbc_host.a : $(addsuffix _host,$(libbc_a_OBJECTS))
++ ar cru $@ $+
++ ranlib $@
+diff --git a/m4/cc_for_build.m4 b/m4/cc_for_build.m4
+new file mode 100644
+index 0000000..c62ffad
+--- /dev/null
++++ b/m4/cc_for_build.m4
+@@ -0,0 +1,77 @@
++# ===========================================================================
++# https://www.gnu.org/software/autoconf-archive/ax_cc_for_build.html
++# ===========================================================================
++#
++# SYNOPSIS
++#
++# AX_CC_FOR_BUILD
++#
++# DESCRIPTION
++#
++# Find a build-time compiler. Sets CC_FOR_BUILD and EXEEXT_FOR_BUILD.
++#
++# LICENSE
++#
++# Copyright (c) 2010 Reuben Thomas <rrt@sc3d.org>
++# Copyright (c) 1999 Richard Henderson <rth@redhat.com>
++#
++# This program is free software: you can redistribute it and/or modify it
++# under the terms of the GNU General Public License as published by the
++# Free Software Foundation, either version 3 of the License, or (at your
++# option) any later version.
++#
++# This program is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
++# Public License for more details.
++#
++# You should have received a copy of the GNU General Public License along
++# with this program. If not, see <https://www.gnu.org/licenses/>.
++#
++# As a special exception, the respective Autoconf Macro's copyright owner
++# gives unlimited permission to copy, distribute and modify the configure
++# scripts that are the output of Autoconf when processing the Macro. You
++# need not follow the terms of the GNU General Public License when using
++# or distributing such scripts, even though portions of the text of the
++# Macro appear in them. The GNU General Public License (GPL) does govern
++# all other use of the material that constitutes the Autoconf Macro.
++#
++# This special exception to the GPL applies to versions of the Autoconf
++# Macro released by the Autoconf Archive. When you make and distribute a
++# modified version of the Autoconf Macro, you may extend this special
++# exception to the GPL to apply to your modified version as well.
++
++#serial 3
++
++dnl Get a default for CC_FOR_BUILD to put into Makefile.
++AC_DEFUN([AX_CC_FOR_BUILD],
++[# Put a plausible default for CC_FOR_BUILD in Makefile.
++if test -z "$CC_FOR_BUILD"; then
++ if test "x$cross_compiling" = "xno"; then
++ CC_FOR_BUILD='$(CC)'
++ else
++ CC_FOR_BUILD=gcc
++ fi
++fi
++AC_SUBST(CC_FOR_BUILD)
++# Also set EXEEXT_FOR_BUILD.
++if test "x$cross_compiling" = "xno"; then
++ EXEEXT_FOR_BUILD='$(EXEEXT)'
++else
++ AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
++ [rm -f conftest*
++ echo 'int main () { return 0; }' > conftest.c
++ bfd_cv_build_exeext=
++ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
++ for file in conftest.*; do
++ case $file in
++ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
++ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
++ esac
++ done
++ rm -f conftest*
++ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
++ EXEEXT_FOR_BUILD=""
++ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
++fi
++AC_SUBST(EXEEXT_FOR_BUILD)])dnl
diff --git a/gnu/packages/patches/cmake-curl-certificates.patch b/gnu/packages/patches/cmake-curl-certificates.patch
index 36252083f8..7fe2615271 100644
--- a/gnu/packages/patches/cmake-curl-certificates.patch
+++ b/gnu/packages/patches/cmake-curl-certificates.patch
@@ -6,19 +6,19 @@ as well as /etc/ssl/certs.
--- cmake-3.13.1/Source/cmCurl.cxx 2019-09-10 17:27:36.926907260 +0200
+++ cmake-3.13.1/Source/cmCurl.cxx 2019-09-10 17:52:35.475903919 +0200
-@@ -4,11 +4,8 @@
-
- #include "cmThirdParty.h"
+@@ -2,11 +2,8 @@
+ file Copyright.txt or https://cmake.org/licensing for details. */
+ #include "cmCurl.h"
-#if !defined(CMAKE_USE_SYSTEM_CURL) && !defined(_WIN32) && \
- !defined(__APPLE__) && !defined(CURL_CA_BUNDLE) && !defined(CURL_CA_PATH)
# define CMAKE_FIND_CAFILE
# include "cmSystemTools.h"
-#endif
+ #include "cmStringAlgorithms.h"
// curl versions before 7.21.5 did not provide this error code
- #if defined(LIBCURL_VERSION_NUM) && LIBCURL_VERSION_NUM < 0x071505
-@@ -29,6 +26,19 @@ std::string cmCurlSetCAInfo(::CURL* curl
+@@ -30,6 +27,19 @@
::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_CAINFO, cafile);
check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
}
diff --git a/gnu/packages/patches/cyrus-sasl-ac-try-run-fix.patch b/gnu/packages/patches/cyrus-sasl-ac-try-run-fix.patch
new file mode 100644
index 0000000000..8662e812e9
--- /dev/null
+++ b/gnu/packages/patches/cyrus-sasl-ac-try-run-fix.patch
@@ -0,0 +1,12 @@
+--- a/m4/sasl2.m4 2018-11-18 22:33:29.902625600 +0300
++++ b/m4/sasl2.m4 2018-11-18 22:33:59.828746176 +0300
+@@ -339,7 +339,8 @@
+ ],
+ [ AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO])
+ AC_MSG_RESULT(yes) ],
+- AC_MSG_RESULT(no))
++ AC_MSG_RESULT(no),
++ AC_MSG_RESULT(no))
+ LIBS="$cmu_save_LIBS"
+
+ else
diff --git a/gnu/packages/patches/dconf-meson-0.52.patch b/gnu/packages/patches/dconf-meson-0.52.patch
new file mode 100644
index 0000000000..c636edc108
--- /dev/null
+++ b/gnu/packages/patches/dconf-meson-0.52.patch
@@ -0,0 +1,19 @@
+Fix build failure with Meson 0.52.
+
+Taken from upstream:
+https://gitlab.gnome.org/GNOME/dconf/commit/7ad890fb7a2ec90a777a756a1fa20a615ec7245e
+https://gitlab.gnome.org/GNOME/dconf/merge_requests/54
+
+diff --git a/client/meson.build b/client/meson.build
+index f3b7122cb05bfa7bb481c487e3cd052aa1ad58e5..de6387e2cac2aba12b83f2614c277bada434fd16 100644
+--- a/client/meson.build
++++ b/client/meson.build
+@@ -28,7 +28,7 @@ libdconf_client = static_library(
+
+ libdconf_client_dep = declare_dependency(
+ dependencies: gio_dep,
+- link_whole: libdconf_client,
++ link_with: libdconf_client,
+ )
+
+ libdconf = shared_library(
diff --git a/gnu/packages/patches/doxygen-1.8.17-runtests.patch b/gnu/packages/patches/doxygen-1.8.17-runtests.patch
new file mode 100644
index 0000000000..0340c72448
--- /dev/null
+++ b/gnu/packages/patches/doxygen-1.8.17-runtests.patch
@@ -0,0 +1,73 @@
+1.8.17 was released with a broken test runner.
+
+https://github.com/doxygen/doxygen/issues/7464
+
+Taken from upstream:
+https://github.com/doxygen/doxygen/commit/cd9dee013dc749a10bbe019c350e0e62b6635795
+
+diff --git a/testing/runtests.py b/testing/runtests.py
+index a4118b865..10fe50214 100755
+--- a/testing/runtests.py
++++ b/testing/runtests.py
+@@ -3,6 +3,7 @@
+ from __future__ import print_function
+ import argparse, glob, itertools, re, shutil, os, sys
+ import subprocess
++import shlex
+
+ config_reg = re.compile('.*\/\/\s*(?P<name>\S+):\s*(?P<value>.*)$')
+
+@@ -28,10 +29,10 @@ def xpopen(cmd, cmd1="",encoding='utf-8-sig', getStderr=False):
+ return os.popen(cmd).read() # Python 2 without encoding
+ else:
+ if (getStderr):
+- proc = subprocess.run(cmd1,encoding=encoding,capture_output=True) # Python 3 with encoding
+- return proc.stderr
++ proc = subprocess.Popen(shlex.split(cmd1),stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding
++ return proc.stderr.read()
+ else:
+- proc = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding
++ proc = subprocess.Popen(shlex.split(cmd),stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding
+ return proc.stdout.read()
+
+ class Tester:
+@@ -137,7 +138,7 @@ def prepare_test(self):
+ print('GENERATE_DOCBOOK=NO', file=f)
+ if (self.args.xhtml):
+ print('GENERATE_HTML=YES', file=f)
+- # HTML_OUTPUT can also be set locally
++ # HTML_OUTPUT can also have been set locally
+ print('HTML_OUTPUT=%s/html' % self.test_out, file=f)
+ print('HTML_FILE_EXTENSION=.xhtml', file=f)
+ if (self.args.pdf):
+@@ -184,7 +185,7 @@ def update_test(self,testmgr):
+ print('Non-existing file %s after \'check:\' statement' % check_file)
+ return
+ # convert output to canonical form
+- data = xpopen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file)).read()
++ data = xpopen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file))
+ if data:
+ # strip version
+ data = re.sub(r'xsd" version="[0-9.-]+"','xsd" version=""',data).rstrip('\n')
+@@ -326,7 +327,7 @@ def perform_test(self,testmgr):
+ tests.append(glob.glob('%s/*.xml' % (docbook_output)))
+ tests.append(glob.glob('%s/*/*/*.xml' % (docbook_output)))
+ tests = ' '.join(list(itertools.chain.from_iterable(tests))).replace(self.args.outputdir +'/','').replace('\\','/')
+- exe_string = '%s --nonet --postvalid %s' % (self.args.xmllint,tests)
++ exe_string = '%s --noout --nonet --postvalid %s' % (self.args.xmllint,tests)
+ exe_string1 = exe_string
+ exe_string += ' %s' % (redirx)
+ exe_string += ' %s more "%s/temp"' % (separ,docbook_output)
+@@ -346,7 +347,11 @@ def perform_test(self,testmgr):
+ redirx=' 2> %s/temp >nul:'%html_output
+ else:
+ redirx='2>%s/temp >/dev/null'%html_output
+- exe_string = '%s --path dtd --nonet --postvalid %s/*xhtml' % (self.args.xmllint,html_output)
++ check_file = []
++ check_file.append(glob.glob('%s/*.xhtml' % (html_output)))
++ check_file.append(glob.glob('%s/*/*/*.xhtml' % (html_output)))
++ check_file = ' '.join(list(itertools.chain.from_iterable(check_file))).replace(self.args.outputdir +'/','').replace('\\','/')
++ exe_string = '%s --noout --path dtd --nonet --postvalid %s' % (self.args.xmllint,check_file)
+ exe_string1 = exe_string
+ exe_string += ' %s' % (redirx)
+ exe_string += ' %s more "%s/temp"' % (separ,html_output)
diff --git a/gnu/packages/patches/doxygen-test.patch b/gnu/packages/patches/doxygen-test.patch
index 8ccb9ec3c4..1c0d4eb946 100644
--- a/gnu/packages/patches/doxygen-test.patch
+++ b/gnu/packages/patches/doxygen-test.patch
@@ -5,19 +5,40 @@ test.
diff -u -r doxygen-1.8.7.orig/testing/012/citelist.xml doxygen-1.8.7/testing/012/citelist.xml
--- doxygen-1.8.7.orig/testing/012/citelist.xml 2014-04-24 23:43:34.000000000 +0200
+++ doxygen-1.8.7/testing/012/citelist.xml 2014-04-24 23:49:43.000000000 +0200
-@@ -6,17 +6,6 @@
+@@ -6,38 +6,6 @@
<briefdescription>
</briefdescription>
<detaileddescription>
- <para>
- <variablelist>
- <varlistentry>
-- <term><anchor id="citelist_1CITEREF_knuth79"/>[1]</term>
+- <term><anchor id="citelist_1CITEREF_Be09"/>[1]</term>
+- </varlistentry>
+- <listitem>
+- <para>P.<nonbreakablespace/>Belotti. <ulink url="http://doi.org/10.1007/978-1-4614-1927-3_5">Disjunctive cuts for non-convex MINLP</ulink>. In <ulink url="#CITEREF_LeLe12">Lee and Leyffer</ulink> <ulink url="#CITEREF_LeLe12">[4]</ulink>, pages 117<ndash/>144.</para>
+- <para/>
+- </listitem>
+- <varlistentry>
+- <term><anchor id="citelist_1CITEREF_BertholdHeinzVigerske2009"/>[2]</term>
+- </varlistentry>
+- <listitem>
+- <para>T.<nonbreakablespace/>Berthold, S.<nonbreakablespace/>Heinz, and S.<nonbreakablespace/>Vigerske. <ulink url="http://doi.org/10.1007/978-1-4614-1927-3_15">Extending a CIP framework to solve MIQCPs</ulink>. In <ulink url="#CITEREF_LeLe12">Lee and Leyffer</ulink> <ulink url="#CITEREF_LeLe12">[4]</ulink>, pages 427<ndash/>444.</para>
+- <para/>
+- </listitem>
+- <varlistentry>
+- <term><anchor id="citelist_1CITEREF_knuth79"/>[3]</term>
- </varlistentry>
- <listitem>
- <para>Donald<nonbreakablespace/>E. Knuth. <emphasis>Tex and Metafont, New Directions in Typesetting</emphasis>. American Mathematical Society and Digital Press, Stanford, 1979.</para>
- <para/>
- </listitem>
+- <varlistentry>
+- <term><anchor id="citelist_1CITEREF_LeLe12"/>[4]</term>
+- </varlistentry>
+- <listitem>
+- <para>Jon Lee and Sven Leyffer, editors. <ulink url="http://doi.org/10.1007/978-1-4614-1927-3"><emphasis>Mixed Integer Nonlinear Programming</emphasis></ulink>, volume 154 of <emphasis>The IMA Volumes in Mathematics and its Applications</emphasis>. Springer, 2012.</para>
+- <para/>
+- </listitem>
- </variablelist>
- </para>
</detaileddescription>
@@ -26,13 +47,14 @@ diff -u -r doxygen-1.8.7.orig/testing/012/citelist.xml doxygen-1.8.7/testing/012
diff -u -r doxygen-1.8.7.orig/testing/012/indexpage.xml doxygen-1.8.7/testing/012/indexpage.xml
--- doxygen-1.8.7.orig/testing/012/indexpage.xml 2014-04-24 23:43:34.000000000 +0200
+++ doxygen-1.8.7/testing/012/indexpage.xml 2014-04-24 23:44:05.000000000 +0200
-@@ -4,7 +4,7 @@
- <compoundname>index</compoundname>
- <title>My Project</title>
+@@ -6,8 +6,8 @@
+ <briefdescription>
+ </briefdescription>
<detaileddescription>
-- <para>See <ref refid="citelist_1CITEREF_knuth79" kindref="member">[1]</ref> for more info. </para>
-+ <para>See knuth79 for more info. </para>
+- <para>See <ref refid="citelist_1CITEREF_knuth79" kindref="member">[3]</ref> for more info.</para>
+- <para>Other references with cross references see <ref refid="citelist_1CITEREF_Be09" kindref="member">[1]</ref> and <ref refid="citelist_1CITEREF_BertholdHeinzVigerske2009" kindref="member">[2]</ref> for more info. </para>
++ <para>See knuth79 for more info.</para>
++ <para>Other references with cross references see Be09 and BertholdHeinzVigerske2009 for more info. </para>
</detaileddescription>
</compounddef>
</doxygen>
-
diff --git a/gnu/packages/patches/file-CVE-2018-10360.patch b/gnu/packages/patches/file-CVE-2018-10360.patch
deleted file mode 100644
index 9285611c04..0000000000
--- a/gnu/packages/patches/file-CVE-2018-10360.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-https://github.com/file/file/commit/a642587a9c9e2dd7feacdf513c3643ce26ad3c22.patch
-The leading part of the patch starting at line 27 was trimmed off.
-This patch should be OK to drop with file@5.35.
-
-From a642587a9c9e2dd7feacdf513c3643ce26ad3c22 Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Sat, 9 Jun 2018 16:00:06 +0000
-Subject: [PATCH] Avoid reading past the end of buffer (Rui Reis)
-
----
- src/readelf.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/src/readelf.c b/src/readelf.c
-index 79c83f9f5..1f41b4611 100644
---- a/src/readelf.c
-+++ b/src/readelf.c
-@@ -842,7 +842,8 @@ do_core_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
-
- cname = (unsigned char *)
- &nbuf[doff + prpsoffsets(i)];
-- for (cp = cname; *cp && isprint(*cp); cp++)
-+ for (cp = cname; cp < nbuf + size && *cp
-+ && isprint(*cp); cp++)
- continue;
- /*
- * Linux apparently appends a space at the end
diff --git a/gnu/packages/patches/file-CVE-2019-18218.patch b/gnu/packages/patches/file-CVE-2019-18218.patch
new file mode 100644
index 0000000000..21069823b7
--- /dev/null
+++ b/gnu/packages/patches/file-CVE-2019-18218.patch
@@ -0,0 +1,55 @@
+Fix CVE-2019-18218:
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-18218
+
+Patch copied from upstream source repository:
+
+https://github.com/file/file/commit/46a8443f76cec4b41ec736eca396984c74664f84
+
+From 46a8443f76cec4b41ec736eca396984c74664f84 Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos@zoulas.com>
+Date: Mon, 26 Aug 2019 14:31:39 +0000
+Subject: [PATCH] Limit the number of elements in a vector (found by oss-fuzz)
+
+---
+ src/cdf.c | 9 ++++-----
+ src/cdf.h | 1 +
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/cdf.c b/src/cdf.c
+index 9d6396742..bb81d6374 100644
+--- a/src/cdf.c
++++ b/src/cdf.c
+@@ -1027,8 +1027,9 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
+ goto out;
+ }
+ nelements = CDF_GETUINT32(q, 1);
+- if (nelements == 0) {
+- DPRINTF(("CDF_VECTOR with nelements == 0\n"));
++ if (nelements > CDF_ELEMENT_LIMIT || nelements == 0) {
++ DPRINTF(("CDF_VECTOR with nelements == %"
++ SIZE_T_FORMAT "u\n", nelements));
+ goto out;
+ }
+ slen = 2;
+@@ -1070,8 +1071,6 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
+ goto out;
+ inp += nelem;
+ }
+- DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n",
+- nelements));
+ for (j = 0; j < nelements && i < sh.sh_properties;
+ j++, i++)
+ {
+diff --git a/src/cdf.h b/src/cdf.h
+index 2f7e554b7..05056668f 100644
+--- a/src/cdf.h
++++ b/src/cdf.h
+@@ -48,6 +48,7 @@
+ typedef int32_t cdf_secid_t;
+
+ #define CDF_LOOP_LIMIT 10000
++#define CDF_ELEMENT_LIMIT 100000
+
+ #define CDF_SECID_NULL 0
+ #define CDF_SECID_FREE -1
diff --git a/gnu/packages/patches/findutils-gnulib-libio.patch b/gnu/packages/patches/findutils-gnulib-libio.patch
deleted file mode 100644
index 79f9fd914d..0000000000
--- a/gnu/packages/patches/findutils-gnulib-libio.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-Adjust to removal of libio interface in glibc 2.28.
-
-Based on this gnulib commit:
-https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4af4a4a71827c0bc5e0ec67af23edef4f15cee8e
-
-diff --git a/gl/lib/fflush.c b/gl/lib/fflush.c
-index 5ae3e41..7a82470 100644
---- a/gl/lib/fflush.c
-+++ b/gl/lib/fflush.c
-@@ -33,7 +33,7 @@
- #undef fflush
-
-
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-
- /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
- static void
-@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp)
-
- #endif
-
--#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
-+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
-
- # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
-@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream)
- if (stream == NULL || ! freading (stream))
- return fflush (stream);
-
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-
- clear_ungetc_buffer_preserving_position (stream);
-
-diff --git a/gl/lib/fpurge.c b/gl/lib/fpurge.c
-index f313b22..ecdf82d 100644
---- a/gl/lib/fpurge.c
-+++ b/gl/lib/fpurge.c
-@@ -62,7 +62,7 @@ fpurge (FILE *fp)
- /* Most systems provide FILE as a struct and the necessary bitmask in
- <stdio.h>, because they need it for implementing getc() and putc() as
- fast macros. */
--# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
- fp->_IO_read_end = fp->_IO_read_ptr;
- fp->_IO_write_ptr = fp->_IO_write_base;
- /* Avoid memory leak when there is an active ungetc buffer. */
-diff --git a/gl/lib/freadahead.c b/gl/lib/freadahead.c
-index 094daab..3f8101e 100644
---- a/gl/lib/freadahead.c
-+++ b/gl/lib/freadahead.c
-@@ -25,7 +25,7 @@
- size_t
- freadahead (FILE *fp)
- {
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
- if (fp->_IO_write_ptr > fp->_IO_write_base)
- return 0;
- return (fp->_IO_read_end - fp->_IO_read_ptr)
-diff --git a/gl/lib/freading.c b/gl/lib/freading.c
-index 0512b19..8c48fe4 100644
---- a/gl/lib/freading.c
-+++ b/gl/lib/freading.c
-@@ -31,7 +31,7 @@ freading (FILE *fp)
- /* Most systems provide FILE as a struct and the necessary bitmask in
- <stdio.h>, because they need it for implementing getc() and putc() as
- fast macros. */
--# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
- return ((fp->_flags & _IO_NO_WRITES) != 0
- || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
- && fp->_IO_read_base != NULL));
-diff --git a/gl/lib/fseeko.c b/gl/lib/fseeko.c
-index 1c65d2a..9026408 100644
---- a/gl/lib/fseeko.c
-+++ b/gl/lib/fseeko.c
-@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int whence)
- #endif
-
- /* These tests are based on fpurge.c. */
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
- if (fp->_IO_read_end == fp->_IO_read_ptr
- && fp->_IO_write_ptr == fp->_IO_write_base
- && fp->_IO_save_base == NULL)
-@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int whence)
- return -1;
- }
-
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
- fp->_flags &= ~_IO_EOF_SEEN;
- fp->_offset = pos;
- #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
-diff --git a/gl/lib/stdio-impl.h b/gl/lib/stdio-impl.h
-index 502d891..ea38ee2 100644
---- a/gl/lib/stdio-impl.h
-+++ b/gl/lib/stdio-impl.h
-@@ -18,6 +18,12 @@
- the same implementation of stdio extension API, except that some fields
- have different naming conventions, or their access requires some casts. */
-
-+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
-+ problem by defining it ourselves. FIXME: Do not rely on glibc
-+ internals. */
-+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
-+# define _IO_IN_BACKUP 0x100
-+#endif
-
- /* BSD stdio derived implementations. */
-
diff --git a/gnu/packages/patches/findutils-makedev.patch b/gnu/packages/patches/findutils-makedev.patch
deleted file mode 100644
index 2f16c625d8..0000000000
--- a/gnu/packages/patches/findutils-makedev.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Include <sys/sysmacros.h> for "makedev".
-
-Taken from this gnulib commit:
-https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4da63c5881f60f71999a943612da9112232b9161
-
-diff --git a/gl/lib/mountlist.c b/gl/lib/mountlist.c
-index bb4e4ee21..cf4020e2a 100644
---- a/gl/lib/mountlist.c
-+++ b/gl/lib/mountlist.c
-@@ -37,6 +37,12 @@
- # include <sys/param.h>
- #endif
-
-+#if MAJOR_IN_MKDEV
-+# include <sys/mkdev.h>
-+#elif MAJOR_IN_SYSMACROS
-+# include <sys/sysmacros.h>
-+#endif
-+
- #if defined MOUNTED_GETFSSTAT /* OSF_1 and Darwin1.3.x */
- # if HAVE_SYS_UCRED_H
- # include <grp.h> /* needed on OSF V4.0 for definition of NGROUPS,
diff --git a/gnu/packages/patches/findutils-test-xargs.patch b/gnu/packages/patches/findutils-test-xargs.patch
deleted file mode 100644
index 10c7bed28d..0000000000
--- a/gnu/packages/patches/findutils-test-xargs.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-This test relies on 'xargs' being available in $PATH, which is not
-the case when we build the initial Findutils doing bootstrapping.
-Reported at <https://savannah.gnu.org/bugs/index.php?46786>.
-
---- findutils-4.6.0/find/testsuite/sv-34976-execdir-fd-leak.sh 2015-12-31 19:37:59.401526288 +0100
-+++ findutils-4.6.0/find/testsuite/sv-34976-execdir-fd-leak.sh 2015-12-31 19:38:36.061770693 +0100
-@@ -50,13 +50,14 @@ die() {
- # Create test files, each 98 in the directories ".", "one" and "two".
- make_test_data() {
- d="$1"
-+ xargs="`cd ../../xargs; pwd -P`/xargs"
- (
- cd "$1" || exit 1
- mkdir one two || exit 1
- for i in ${three_to_hundred} ; do
- printf "./%03d one/%03d two/%03d " $i $i $i
- done \
-- | xargs touch || exit 1
-+ | "$xargs" touch || exit 1
- ) \
- || die "failed to set up the test in ${outdir}"
- }
diff --git a/gnu/packages/patches/fribidi-CVE-2019-18397.patch b/gnu/packages/patches/fribidi-CVE-2019-18397.patch
deleted file mode 100644
index aff1a669b2..0000000000
--- a/gnu/packages/patches/fribidi-CVE-2019-18397.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-https://github.com/fribidi/fribidi/commit/034c6e9a1d296286305f4cfd1e0072b879f52568.patch
-
-From 034c6e9a1d296286305f4cfd1e0072b879f52568 Mon Sep 17 00:00:00 2001
-From: Dov Grobgeld <dov.grobgeld@gmail.com>
-Date: Thu, 24 Oct 2019 09:37:29 +0300
-Subject: [PATCH] Truncate isolate_level to FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL
-
----
- lib/fribidi-bidi.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/lib/fribidi-bidi.c b/lib/fribidi-bidi.c
-index 6c84392..d384878 100644
---- a/lib/fribidi-bidi.c
-+++ b/lib/fribidi-bidi.c
-@@ -747,7 +747,9 @@ fribidi_get_par_embedding_levels_ex (
- }
-
- RL_LEVEL (pp) = level;
-- RL_ISOLATE_LEVEL (pp) = isolate_level++;
-+ RL_ISOLATE_LEVEL (pp) = isolate_level;
-+ if (isolate_level < FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL-1)
-+ isolate_level++;
- base_level_per_iso_level[isolate_level] = new_level;
-
- if (!FRIBIDI_IS_NEUTRAL (override))
diff --git a/gnu/packages/patches/ghostscript-no-header-id.patch b/gnu/packages/patches/ghostscript-no-header-id.patch
index da1aa5530f..45fc95fd6e 100644
--- a/gnu/packages/patches/ghostscript-no-header-id.patch
+++ b/gnu/packages/patches/ghostscript-no-header-id.patch
@@ -9,10 +9,10 @@ See: https://bugs.ghostscript.com/show_bug.cgi?id=698208
diff -ur orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c
--- orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c 2017-07-09 23:30:28.960479189 +0200
+++ gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c 2017-07-09 23:34:34.306524488 +0200
-@@ -1785,8 +1785,11 @@
+@@ -1810,8 +1810,11 @@
* +1 for the linearisation dict and +1 for the primary hint stream.
*/
- linear_params->FirsttrailerOffset = gp_ftell_64(linear_params->Lin_File.file);
+ linear_params->FirsttrailerOffset = gp_ftell(linear_params->Lin_File.file);
- gs_sprintf(LDict, "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R/ID[%s%s]/Prev %d>>\nstartxref\r\n0\n%%%%EOF\n \n",
- linear_params->LastResource + 3, pdev->ResourceUsage[linear_params->Info_id].NewObjectNumber, pdev->ResourceUsage[linear_params->Catalog_id].NewObjectNumber, fileID, fileID, 0);
+ gs_sprintf(LDict, "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R",
@@ -20,10 +20,10 @@ diff -ur orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c gnu-ghostscript-9.
+ if (pdev->OwnerPassword.size > 0 || !(!getenv("GS_GENERATE_UUIDS") || (strcasecmp(getenv("GS_GENERATE_UUIDS"), "0") != 0 && strcasecmp(getenv("GS_GENERATE_UUIDS"), "no") != 0))) /* ID is mandatory when encrypting */
+ gs_sprintf(LDict, "/ID[%s%s]", fileID, fileID);
+ gs_sprintf(LDict, "/Prev %d>>\nstartxref\r\n0\n%%%%EOF\n \n", 0);
- fwrite(LDict, strlen(LDict), 1, linear_params->Lin_File.file);
+ gp_fwrite(LDict, strlen(LDict), 1, linear_params->Lin_File.file);
/* Write document catalog (Part 4) */
-@@ -2321,8 +2324,11 @@
+@@ -2346,8 +2349,11 @@
if (code != 0)
return_error(gs_error_ioerror);
@@ -34,10 +34,10 @@ diff -ur orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c gnu-ghostscript-9.
+ if (pdev->OwnerPassword.size > 0 || !(!getenv("GS_GENERATE_UUIDS") || (strcasecmp(getenv("GS_GENERATE_UUIDS"), "0") != 0 || strcasecmp(getenv("GS_GENERATE_UUIDS"), "no") != 0))) /* ID is mandatory when encrypting */
+ gs_sprintf(LDict, "/ID[%s%s]", fileID, fileID);
+ gs_sprintf(LDict, "/Prev %"PRId64">>\nstartxref\r\n0\n%%%%EOF\n", mainxref);
- fwrite(LDict, strlen(LDict), 1, linear_params->sfile);
+ gp_fwrite(LDict, strlen(LDict), 1, linear_params->sfile);
- code = gp_fseek_64(linear_params->sfile, pdev->ResourceUsage[HintStreamObj].LinearisedOffset, SEEK_SET);
-@@ -3016,10 +3022,12 @@
+ code = gp_fseek(linear_params->sfile, pdev->ResourceUsage[HintStreamObj].LinearisedOffset, SEEK_SET);
+@@ -3012,10 +3018,12 @@
stream_puts(s, "trailer\n");
pprintld3(s, "<< /Size %ld /Root %ld 0 R /Info %ld 0 R\n",
pdev->next_id, Catalog_id, Info_id);
diff --git a/gnu/packages/patches/giflib-make-reallocarray-private.patch b/gnu/packages/patches/giflib-make-reallocarray-private.patch
deleted file mode 100644
index 69228c5be8..0000000000
--- a/gnu/packages/patches/giflib-make-reallocarray-private.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-Move the declaration from gif_lib.h to gif_lib_private.h to solve
-conflicts when some .c-file #includes both stdlib.h and gif_lib.h.
-See also https://sourceforge.net/p/giflib/bugs/110/
-
-diff -ur giflib-5.1.4.orig/lib/dgif_lib.c giflib-5.1.4/lib/dgif_lib.c
---- giflib-5.1.4.orig/lib/dgif_lib.c 2018-02-28 20:31:02.294682673 +0100
-+++ giflib-5.1.4/lib/dgif_lib.c 2018-02-28 22:38:11.659126414 +0100
-@@ -396,7 +396,7 @@
-
- if (GifFile->SavedImages) {
- SavedImage* new_saved_images =
-- (SavedImage *)reallocarray(GifFile->SavedImages,
-+ (SavedImage *)giflib_private_reallocarray(GifFile->SavedImages,
- (GifFile->ImageCount + 1), sizeof(SavedImage));
- if (new_saved_images == NULL) {
- GifFile->Error = D_GIF_ERR_NOT_ENOUGH_MEM;
-@@ -1108,7 +1108,7 @@
- if (ImageSize > (SIZE_MAX / sizeof(GifPixelType))) {
- return GIF_ERROR;
- }
-- sp->RasterBits = (unsigned char *)reallocarray(NULL, ImageSize,
-+ sp->RasterBits = (unsigned char *)giflib_private_reallocarray(NULL, ImageSize,
- sizeof(GifPixelType));
-
- if (sp->RasterBits == NULL) {
-diff -ur giflib-5.1.4.orig/lib/gifalloc.c giflib-5.1.4/lib/gifalloc.c
---- giflib-5.1.4.orig/lib/gifalloc.c 2018-02-28 20:31:02.294682673 +0100
-+++ giflib-5.1.4/lib/gifalloc.c 2018-02-28 22:38:11.657126423 +0100
-@@ -8,7 +8,7 @@
- #include <stdio.h>
- #include <string.h>
-
--#include "gif_lib.h"
-+#include "gif_lib_private.h"
-
- #define MAX(x, y) (((x) > (y)) ? (x) : (y))
-
-@@ -188,7 +188,7 @@
-
- /* perhaps we can shrink the map? */
- if (RoundUpTo < ColorUnion->ColorCount) {
-- GifColorType *new_map = (GifColorType *)reallocarray(Map,
-+ GifColorType *new_map = (GifColorType *)giflib_private_reallocarray(Map,
- RoundUpTo, sizeof(GifColorType));
- if( new_map == NULL ) {
- GifFreeMapObject(ColorUnion);
-@@ -232,7 +232,7 @@
- if (*ExtensionBlocks == NULL)
- *ExtensionBlocks=(ExtensionBlock *)malloc(sizeof(ExtensionBlock));
- else {
-- ExtensionBlock* ep_new = (ExtensionBlock *)reallocarray
-+ ExtensionBlock* ep_new = (ExtensionBlock *)giflib_private_reallocarray
- (*ExtensionBlocks, (*ExtensionBlockCount + 1),
- sizeof(ExtensionBlock));
- if( ep_new == NULL )
-@@ -325,7 +325,7 @@
- if (GifFile->SavedImages == NULL)
- GifFile->SavedImages = (SavedImage *)malloc(sizeof(SavedImage));
- else
-- GifFile->SavedImages = (SavedImage *)reallocarray(GifFile->SavedImages,
-+ GifFile->SavedImages = (SavedImage *)giflib_private_reallocarray(GifFile->SavedImages,
- (GifFile->ImageCount + 1), sizeof(SavedImage));
-
- if (GifFile->SavedImages == NULL)
-@@ -355,7 +355,7 @@
- }
-
- /* next, the raster */
-- sp->RasterBits = (unsigned char *)reallocarray(NULL,
-+ sp->RasterBits = (unsigned char *)giflib_private_reallocarray(NULL,
- (CopyFrom->ImageDesc.Height *
- CopyFrom->ImageDesc.Width),
- sizeof(GifPixelType));
-@@ -369,7 +369,7 @@
-
- /* finally, the extension blocks */
- if (sp->ExtensionBlocks != NULL) {
-- sp->ExtensionBlocks = (ExtensionBlock *)reallocarray(NULL,
-+ sp->ExtensionBlocks = (ExtensionBlock *)giflib_private_reallocarray(NULL,
- CopyFrom->ExtensionBlockCount,
- sizeof(ExtensionBlock));
- if (sp->ExtensionBlocks == NULL) {
-diff -ur giflib-5.1.4.orig/lib/gif_lib.h giflib-5.1.4/lib/gif_lib.h
---- giflib-5.1.4.orig/lib/gif_lib.h 2018-02-28 20:31:02.294682673 +0100
-+++ giflib-5.1.4/lib/gif_lib.h 2018-02-28 20:31:43.135716712 +0100
-@@ -244,9 +244,6 @@
- GifPixelType ColorTransIn2[]);
- extern int GifBitSize(int n);
-
--extern void *
--reallocarray(void *optr, size_t nmemb, size_t size);
--
- /******************************************************************************
- Support for the in-core structures allocation (slurp mode).
- ******************************************************************************/
-diff -ur giflib-5.1.4.orig/lib/gif_lib_private.h giflib-5.1.4/lib/gif_lib_private.h
---- giflib-5.1.4.orig/lib/gif_lib_private.h 2018-02-28 20:31:02.294682673 +0100
-+++ giflib-5.1.4/lib/gif_lib_private.h 2018-02-28 22:38:11.657126423 +0100
-@@ -54,6 +54,9 @@
- bool gif89;
- } GifFilePrivateType;
-
-+extern void *
-+giflib_private_reallocarray(void *optr, size_t nmemb, size_t size);
-+
- #endif /* _GIF_LIB_PRIVATE_H */
-
- /* end */
-diff -ur giflib-5.1.4.orig/lib/openbsd-reallocarray.c giflib-5.1.4/lib/openbsd-reallocarray.c
---- giflib-5.1.4.orig/lib/openbsd-reallocarray.c 2018-02-28 20:31:02.295682659 +0100
-+++ giflib-5.1.4/lib/openbsd-reallocarray.c 2018-02-28 22:38:11.656126428 +0100
-@@ -27,7 +27,7 @@
- #define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4))
-
- void *
--reallocarray(void *optr, size_t nmemb, size_t size)
-+giflib_private_reallocarray(void *optr, size_t nmemb, size_t size)
- {
- if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) &&
- nmemb > 0 && SIZE_MAX / nmemb < size) {
diff --git a/gnu/packages/patches/glibc-CVE-2019-19126.patch b/gnu/packages/patches/glibc-CVE-2019-19126.patch
new file mode 100644
index 0000000000..5b9ac58ab7
--- /dev/null
+++ b/gnu/packages/patches/glibc-CVE-2019-19126.patch
@@ -0,0 +1,22 @@
+Fix CVE-2019-19126:
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19126
+https://sourceware.org/bugzilla/show_bug.cgi?id=25204
+
+Taken from upstream:
+https://sourceware.org/git/?p=glibc.git;a=commit;h=37c90e117310728a4ad1eb998c0bbe7d79c4a398
+
+diff --git a/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h b/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h
+index 975cbe2..df2cdfd 100644
+--- a/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h
++++ b/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h
+@@ -31,7 +31,8 @@
+ environment variable, LD_PREFER_MAP_32BIT_EXEC. */
+ #define EXTRA_LD_ENVVARS \
+ case 21: \
+- if (memcmp (envline, "PREFER_MAP_32BIT_EXEC", 21) == 0) \
++ if (!__libc_enable_secure \
++ && memcmp (envline, "PREFER_MAP_32BIT_EXEC", 21) == 0) \
+ GLRO(dl_x86_cpu_features).feature[index_arch_Prefer_MAP_32BIT_EXEC] \
+ |= bit_arch_Prefer_MAP_32BIT_EXEC; \
+ break;
diff --git a/gnu/packages/patches/gsl-test-i686.patch b/gnu/packages/patches/gsl-test-i686.patch
deleted file mode 100644
index 8828c08614..0000000000
--- a/gnu/packages/patches/gsl-test-i686.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Work around a test failure due to a rounding issue on 32-bit
-platforms, as reported at:
-
- https://lists.gnu.org/archive/html/bug-gsl/2016-10/msg00000.html
-
---- gsl-2.2.1/linalg/test.c 2016-10-05 13:27:42.464059730 +0200
-+++ gsl-2.2.1/linalg/test.c 2016-10-05 13:27:46.988095882 +0200
-@@ -4843,9 +4843,6 @@ main(void)
- gsl_test(test_cholesky_decomp_unit(), "Cholesky Decomposition [unit triangular]");
- gsl_test(test_cholesky_solve(), "Cholesky Solve");
-
-- gsl_test(test_cholesky_decomp(r), "Cholesky Decomposition");
-- gsl_test(test_cholesky_invert(r), "Cholesky Inverse");
-- gsl_test(test_pcholesky_decomp(r), "Pivoted Cholesky Decomposition");
- gsl_test(test_pcholesky_solve(r), "Pivoted Cholesky Solve");
- gsl_test(test_pcholesky_invert(r), "Pivoted Cholesky Inverse");
- gsl_test(test_mcholesky_decomp(r), "Modified Cholesky Decomposition");
diff --git a/gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch b/gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch
new file mode 100644
index 0000000000..9ea9a47677
--- /dev/null
+++ b/gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch
@@ -0,0 +1,55 @@
+From a6e9e62a77ecc5012929613e20da23b2636450a5 Mon Sep 17 00:00:00 2001
+From: Mathieu Othacehe <mathieu.othacehe@parrot.com>
+Date: Mon, 25 Mar 2019 11:00:38 +0100
+Subject: [PATCH] cross compile
+
+---
+ build-aux/guile.am | 2 +-
+ configure.ac | 19 ++++++++++++-------
+ 2 files changed, 13 insertions(+), 8 deletions(-)
+
+diff --git a/build-aux/guile.am b/build-aux/guile.am
+index dc1e63f..3126372 100644
+--- a/build-aux/guile.am
++++ b/build-aux/guile.am
+@@ -16,4 +16,4 @@ EXTRA_DIST = $(SOURCES) $(NOCOMP_SOURCES)
+ GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
+ SUFFIXES = .scm .go
+ .scm.go:
+- $(AM_V_GEN)$(top_builddir)/env $(GUILE_TOOLS) compile $(GUILE_WARNINGS) -o "$@" "$<"
++ $(AM_V_GEN)$(top_builddir)/env $(GUILE_TOOLS) compile $(GUILE_TARGET) $(GUILE_WARNINGS) -o "$@" "$<"
+diff --git a/configure.ac b/configure.ac
+index f648fcb..2d34d0a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -21,15 +21,20 @@ PKG_CHECK_MODULES([SQLITE], [sqlite3])
+ SQLITE_LIBDIR="`"$PKG_CONFIG" sqlite3 --variable libdir`"
+ AC_SUBST([SQLITE_LIBDIR])
+
+-AC_MSG_CHECKING([whether '$SQLITE_LIBDIR/libsqlite3' is usable])
+-GUILE_CHECK([retval],
+- [(dynamic-func \"sqlite3_open_v2\"
++if test "$cross_compiling" = "no"; then
++ AC_MSG_CHECKING([whether '$SQLITE_LIBDIR/libsqlite3' is usable])
++ GUILE_CHECK([retval],
++ [(dynamic-func \"sqlite3_open_v2\"
+ (dynamic-link \"$SQLITE_LIBDIR/libsqlite3\"))])
+-if test "$retval" != 0; then
+- AC_MSG_RESULT([no])
+- AC_MSG_ERROR([failed to load '$SQLITE_LIBDIR/libsqlite3'])
++ if test "$retval" != 0; then
++ AC_MSG_RESULT([no])
++ AC_MSG_ERROR([failed to load '$SQLITE_LIBDIR/libsqlite3'])
++ else
++ AC_MSG_RESULT([yes])
++ fi
+ else
+- AC_MSG_RESULT([yes])
++ GUILE_TARGET="--target=$host_alias"
++ AC_SUBST([GUILE_TARGET])
+ fi
+
+ AC_CONFIG_FILES([Makefile sqlite3.scm])
+--
+2.17.1
+
diff --git a/gnu/packages/patches/libffi-3.2.1-complex-alpha.patch b/gnu/packages/patches/libffi-3.2.1-complex-alpha.patch
deleted file mode 100644
index ebbc0635a5..0000000000
--- a/gnu/packages/patches/libffi-3.2.1-complex-alpha.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-The patch fixes build failure of form:
- ../src/alpha/osf.S:298:2: error: #error "osf.S out of sync with ffi.h"
-Upstream fixed the bug in a more invasive way
-but didn't have releases since 3.2.1.
-
-The patch is taken from Gentoo:
-https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-libs/libffi/files/libffi-3.2.1-complex_alpha.patch
-
---- libffi-3.2.1/src/alpha/osf.S 2015-01-16 10:46:15.000000000 +0100
-+++ libffi-3.2.1/src/alpha/osf.S 2015-01-16 10:46:24.000000000 +0100
-@@ -279,6 +279,7 @@
- .gprel32 $load_64 # FFI_TYPE_SINT64
- .gprel32 $load_none # FFI_TYPE_STRUCT
- .gprel32 $load_64 # FFI_TYPE_POINTER
-+ .gprel32 $load_none # FFI_TYPE_COMPLEX
-
- /* Assert that the table above is in sync with ffi.h. */
-
-@@ -294,7 +295,8 @@
- || FFI_TYPE_SINT64 != 12 \
- || FFI_TYPE_STRUCT != 13 \
- || FFI_TYPE_POINTER != 14 \
-- || FFI_TYPE_LAST != 14
-+ || FFI_TYPE_COMPLEX != 15 \
-+ || FFI_TYPE_LAST != 15
- #error "osf.S out of sync with ffi.h"
- #endif
-
diff --git a/gnu/packages/patches/libjpeg-turbo-CVE-2019-2201.patch b/gnu/packages/patches/libjpeg-turbo-CVE-2019-2201.patch
deleted file mode 100644
index 35f2bf5963..0000000000
--- a/gnu/packages/patches/libjpeg-turbo-CVE-2019-2201.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Fix integer overflow which can potentially lead to RCE.
-
-https://www.openwall.com/lists/oss-security/2019/11/11/1
-https://nvd.nist.gov/vuln/detail/CVE-2019-2201
-
-The problem was partially fixed in 2.0.3. This patch is a follow-up.
-https://github.com/libjpeg-turbo/libjpeg-turbo/issues/388
-https://github.com/libjpeg-turbo/libjpeg-turbo/commit/c30b1e72dac76343ef9029833d1561de07d29bad
-
-diff --git a/tjbench.c b/tjbench.c
-index a7d397318..13a5bde62 100644
---- a/tjbench.c
-+++ b/tjbench.c
-@@ -171,7 +171,7 @@ static int decomp(unsigned char *srcBuf, unsigned char **jpegBuf,
- }
- /* Set the destination buffer to gray so we know whether the decompressor
- attempted to write to it */
-- memset(dstBuf, 127, pitch * scaledh);
-+ memset(dstBuf, 127, (size_t)pitch * scaledh);
-
- if (doYUV) {
- int width = doTile ? tilew : scaledw;
-@@ -193,7 +193,7 @@ static int decomp(unsigned char *srcBuf, unsigned char **jpegBuf,
- double start = getTime();
-
- for (row = 0, dstPtr = dstBuf; row < ntilesh;
-- row++, dstPtr += pitch * tileh) {
-+ row++, dstPtr += (size_t)pitch * tileh) {
- for (col = 0, dstPtr2 = dstPtr; col < ntilesw;
- col++, tile++, dstPtr2 += ps * tilew) {
- int width = doTile ? min(tilew, w - col * tilew) : scaledw;
diff --git a/gnu/packages/patches/libxslt-generated-ids.patch b/gnu/packages/patches/libxslt-generated-ids.patch
index 4273875c7c..1cd2363d6a 100644
--- a/gnu/packages/patches/libxslt-generated-ids.patch
+++ b/gnu/packages/patches/libxslt-generated-ids.patch
@@ -162,10 +162,10 @@ diff --git a/libxslt/xsltInternals.h b/libxslt/xsltInternals.h
index 95e8fe6..8eedae4 100644
--- a/libxslt/xsltInternals.h
+++ b/libxslt/xsltInternals.h
-@@ -1786,6 +1786,8 @@ struct _xsltTransformContext {
- int funcLevel; /* Needed to catch recursive functions issues */
- int maxTemplateDepth;
+@@ -1782,6 +1782,8 @@ struct _xsltTransformContext {
int maxTemplateVars;
+ unsigned long opLimit;
+ unsigned long opCount;
+
+ unsigned long nextid;/* for generating stable ids */
};
diff --git a/gnu/packages/patches/pango-skip-libthai-test.patch b/gnu/packages/patches/pango-skip-libthai-test.patch
new file mode 100644
index 0000000000..98732b5391
--- /dev/null
+++ b/gnu/packages/patches/pango-skip-libthai-test.patch
@@ -0,0 +1,23 @@
+Skip Thai character test when libthai is unavailable.
+
+Taken from upstream bug tracker:
+https://gitlab.gnome.org/GNOME/pango/merge_requests/161
+https://gitlab.gnome.org/GNOME/pango/commit/b73284747ac937e31dc9191f84ed6e24284c88ee
+
+diff --git a/tests/test-break.c b/tests/test-break.c
+index 8549b678bba69360d07dce3af21d915412f20d51..47fa3009165e19a331aa04a0df4351ae2323933b 100644
+--- a/tests/test-break.c
++++ b/tests/test-break.c
+@@ -305,6 +305,12 @@ main (int argc, char *argv[])
+ if (!strstr (name, "break"))
+ continue;
+
++#ifndef HAVE_LIBTHAI
++ /* four.break involves Thai, so only test it when we have libthai */
++ if (strstr (name, "four.break"))
++ continue;
++#endif
++
+ path = g_strdup_printf ("/break/%s", name);
+ g_test_add_data_func_full (path, g_test_build_filename (G_TEST_DIST, "breaks", name, NULL),
+ test_break, g_free);
diff --git a/gnu/packages/patches/python-2.7-search-paths.patch b/gnu/packages/patches/python-2.7-search-paths.patch
index a012bc8fe0..5a345c7691 100644
--- a/gnu/packages/patches/python-2.7-search-paths.patch
+++ b/gnu/packages/patches/python-2.7-search-paths.patch
@@ -3,13 +3,17 @@ looking for headers and libraries.
--- Python-2.7.10/setup.py 2015-10-07 18:33:18.125153186 +0200
+++ Python-2.7.10/setup.py 2015-10-07 18:33:47.497347552 +0200
-@@ -526,6 +526,10 @@ class PyBuildExt(build_ext):
+@@ -526,6 +526,14 @@ class PyBuildExt(build_ext):
inc_dirs += ['/system/include', '/atheos/autolnk/include']
inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep)
+ # Always honor these variables.
-+ lib_dirs += os.getenv('LIBRARY_PATH', '').split(os.pathsep)
-+ inc_dirs += os.getenv('CPATH', '').split(os.pathsep)
++ if not cross_compiling:
++ lib_dirs += os.getenv('LIBRARY_PATH', '').split(os.pathsep)
++ inc_dirs += os.getenv('CPATH', '').split(os.pathsep)
++ else:
++ lib_dirs = os.getenv('CROSS_LIBRARY_PATH', '').split(os.pathsep)
++ inc_dirs = os.getenv('CROSS_CPATH', '').split(os.pathsep)
+
# OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb)
if host_platform in ['osf1', 'unixware7', 'openunix8']:
diff --git a/gnu/packages/patches/python-3-search-paths.patch b/gnu/packages/patches/python-3-search-paths.patch
index 5fea9c66b6..cf1647207b 100644
--- a/gnu/packages/patches/python-3-search-paths.patch
+++ b/gnu/packages/patches/python-3-search-paths.patch
@@ -3,7 +3,7 @@ looking for headers and libraries.
--- a/setup.py 2015-10-07 23:32:58.891329173 +0200
+++ b/setup.py 2015-10-07 23:46:29.653349924 +0200
-@@ -575,8 +575,8 @@
+@@ -575,15 +575,15 @@
# if a file is found in one of those directories, it can
# be assumed that no additional -I,-L directives are needed.
if not cross_compiling:
@@ -14,3 +14,12 @@ looking for headers and libraries.
else:
# Add the sysroot paths. 'sysroot' is a compiler option used to
# set the logical path of the standard system headers and
+ # libraries.
+- lib_dirs = (self.compiler.library_dirs +
++ lib_dirs = (os.getenv('CROSS_LIBRARY_PATH', '').split(os.pathsep) +
+ sysroot_paths(('LDFLAGS', 'CC'), system_lib_dirs))
+- inc_dirs = (self.compiler.include_dirs +
++ inc_dirs = (os.getenv('CROSS_CPATH', '').split(os.pathsep) +
+ sysroot_paths(('CPPFLAGS', 'CFLAGS', 'CC'),
+ system_include_dirs))
+ exts = []
diff --git a/gnu/packages/patches/python-cross-compile.patch b/gnu/packages/patches/python-cross-compile.patch
new file mode 100644
index 0000000000..5a470e1852
--- /dev/null
+++ b/gnu/packages/patches/python-cross-compile.patch
@@ -0,0 +1,145 @@
+Patch taken from https://bugs.python.org/issue22724 and augmented with
+following Nix patch
+https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interpreters/python/cpython/2.7/cross-compile.patch
+to fix the whole cross-compilation circus.
+
+---
+ Makefile.pre.in | 14 +++++++-------
+ configure | 5 ++++-
+ setup.py | 9 ++++++---
+ 3 files changed, 17 insertions(+), 11 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 2a14f3323b..6239fc32fc 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -492,7 +492,7 @@ $(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY)
+ $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+
+ platform: $(BUILDPYTHON) pybuilddir.txt
+- $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
++ $(RUNSHARED) $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
+
+ # Create build directory and generate the sysconfig build-time data there.
+ # pybuilddir.txt contains the name of the build dir and is used for
+@@ -503,7 +503,7 @@ platform: $(BUILDPYTHON) pybuilddir.txt
+ # or removed in case of failure.
+ pybuilddir.txt: $(BUILDPYTHON)
+ @echo "none" > ./pybuilddir.txt
+- $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars ;\
++ $(RUNSHARED) $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars ;\
+ if test $$? -ne 0 ; then \
+ echo "generate-posix-vars failed" ; \
+ rm -f ./pybuilddir.txt ; \
+@@ -525,7 +525,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
+ esac; \
+ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
+ _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
+- $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
++ $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
+
+ # Build static library
+ # avoid long command lines, same as LIBRARY_OBJS
+@@ -928,7 +928,7 @@ install: @FRAMEWORKINSTALLFIRST@ commoninstall bininstall maninstall @FRAMEWORKI
+ upgrade) ensurepip="--upgrade" ;; \
+ install|*) ensurepip="" ;; \
+ esac; \
+- $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
++ $(RUNSHARED) $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) -m ensurepip \
+ $$ensurepip --root=$(DESTDIR)/ ; \
+ fi
+
+@@ -939,7 +939,7 @@ altinstall: commoninstall
+ upgrade) ensurepip="--altinstall --upgrade --no-default-pip" ;; \
+ install|*) ensurepip="--altinstall --no-default-pip" ;; \
+ esac; \
+- $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
++ $(RUNSHARED) $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) -m ensurepip \
+ $$ensurepip --root=$(DESTDIR)/ ; \
+ fi
+
+@@ -1270,7 +1270,7 @@ libainstall: @DEF_MAKE_RULE@ python-config
+ # Install the dynamically loadable modules
+ # This goes into $(exec_prefix)
+ sharedinstall: sharedmods
+- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
++ $(RUNSHARED) $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
+ --prefix=$(prefix) \
+ --install-scripts=$(BINDIR) \
+ --install-platlib=$(DESTSHARED) \
+@@ -1344,7 +1344,7 @@ frameworkinstallextras:
+ # This installs a few of the useful scripts in Tools/scripts
+ scriptsinstall:
+ SRCDIR=$(srcdir) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/setup.py install \
++ $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/setup.py install \
+ --prefix=$(prefix) \
+ --install-scripts=$(BINDIR) \
+ --root=$(DESTDIR)/
+diff --git a/configure b/configure
+index 67300fe2b6..6050f588c5 100755
+--- a/configure
++++ b/configure
+@@ -741,6 +741,7 @@ CONFIG_ARGS
+ SOVERSION
+ VERSION
+ PYTHON_FOR_BUILD
++PY_BUILD_ENVIRON
+ PYTHON_FOR_REGEN
+ host_os
+ host_vendor
+@@ -2964,7 +2965,8 @@ $as_echo_n "checking for python interpreter for cross build... " >&6; }
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
+ $as_echo "$interp" >&6; }
+- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
++ PY_BUILD_ENVIRON='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR)'
++ PYTHON_FOR_BUILD=$interp
+ fi
+ elif test "$cross_compiling" = maybe; then
+ as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
+@@ -2974,6 +2976,7 @@ fi
+
+
+
++
+ if test "$prefix" != "/"; then
+ prefix=`echo "$prefix" | sed -e 's/\/$//g'`
+ fi
+diff --git a/setup.py b/setup.py
+index cb47a2339c..472e7e2b26 100644
+--- a/setup.py
++++ b/setup.py
+@@ -497,8 +497,6 @@ class PyBuildExt(build_ext):
+ if not cross_compiling:
+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+- if cross_compiling:
+- self.add_gcc_paths()
+ self.add_multiarch_paths()
+
+ # Add paths specified in the environment variables LDFLAGS and
+@@ -556,7 +554,10 @@ class PyBuildExt(build_ext):
+ # be assumed that no additional -I,-L directives are needed.
+ inc_dirs = self.compiler.include_dirs[:]
+ lib_dirs = self.compiler.library_dirs[:]
+- if not cross_compiling:
++ if cross_compiling:
++ inc_dirs = []
++ lib_dirs = []
++ else:
+ for d in (
+ '/usr/include',
+ ):
+@@ -621,6 +622,8 @@ class PyBuildExt(build_ext):
+ # Some modules that are normally always on:
+ #exts.append( Extension('_weakref', ['_weakref.c']) )
+
++ self.compiler.library_dirs = lib_dirs + [ '.' ]
++
+ # array objects
+ exts.append( Extension('array', ['arraymodule.c']) )
+
+--
+2.17.1
+
diff --git a/gnu/packages/patches/swig-guile-gc.patch b/gnu/packages/patches/swig-guile-gc.patch
deleted file mode 100644
index 0e745a6247..0000000000
--- a/gnu/packages/patches/swig-guile-gc.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-Fix garbage collection for Guile versions >= 2.0.12. This issue showed
-up when running the tests on i686-linux.
-
-Taken from this upstream commit:
-https://github.com/swig/swig/commit/38f2ab0c30e369e63bbd0a6152108488d0de68e1
-
-diff --git a/Lib/guile/guile_scm_run.swg b/Lib/guile/guile_scm_run.swg
-index 274f197158..0d04cb7c62 100644
---- a/Lib/guile/guile_scm_run.swg
-+++ b/Lib/guile/guile_scm_run.swg
-@@ -99,6 +99,7 @@ SWIG_Guile_scm2newstr(SCM str, size_t *len) {
- static int swig_initialized = 0;
- static scm_t_bits swig_tag = 0;
- static scm_t_bits swig_collectable_tag = 0;
-+static scm_t_bits swig_finalized_tag = 0;
- static scm_t_bits swig_destroyed_tag = 0;
- static scm_t_bits swig_member_function_tag = 0;
- static SCM swig_make_func = SCM_EOL;
-@@ -163,7 +164,19 @@ SWIG_Guile_PointerType(SCM object)
- }
- else scm_wrong_type_arg("SWIG-Guile-PointerType", 1, object);
- }
--
-+
-+SWIGINTERN int
-+SWIG_Guile_IsValidSmob(SCM smob)
-+{
-+ /* We do not accept smobs representing destroyed pointers, but we have to
-+ allow finalized smobs because Guile >= 2.0.12 sets all smob instances
-+ to the 'finalized' type before calling their 'free' function. This change
-+ was introduced to Guile in commit 8dff3af087c6eaa83ae0d72aa8b22aef5c65d65d */
-+ return SCM_SMOB_PREDICATE(swig_tag, smob)
-+ || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)
-+ || SCM_SMOB_PREDICATE(swig_finalized_tag, smob);
-+}
-+
- SWIGINTERN int
- SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
- {
-@@ -179,8 +192,7 @@ SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
- *result = SCM_POINTER_VALUE(s);
- return SWIG_OK;
- #endif /* if SCM_MAJOR_VERSION >= 2 */
-- } else if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) {
-- /* we do not accept smobs representing destroyed pointers */
-+ } else if (SWIG_Guile_IsValidSmob(smob)) {
- from = (swig_type_info *) SCM_CELL_WORD_2(smob);
- if (!from) return SWIG_ERROR;
- if (type) {
-@@ -239,7 +251,7 @@ SWIG_Guile_MarkPointerNoncollectable(SCM s)
- {
- SCM smob = SWIG_Guile_GetSmob(s);
- if (!SCM_NULLP(smob)) {
-- if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) {
-+ if (SWIG_Guile_IsValidSmob(smob)) {
- SCM_SET_CELL_TYPE(smob, swig_tag);
- }
- else scm_wrong_type_arg(NULL, 0, s);
-@@ -252,7 +264,7 @@ SWIG_Guile_MarkPointerDestroyed(SCM s)
- {
- SCM smob = SWIG_Guile_GetSmob(s);
- if (!SCM_NULLP(smob)) {
-- if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) {
-+ if (SWIG_Guile_IsValidSmob(smob)) {
- SCM_SET_CELL_TYPE(smob, swig_destroyed_tag);
- }
- else scm_wrong_type_arg(NULL, 0, s);
-@@ -419,6 +431,8 @@ SWIG_Guile_Init ()
- scm_set_smob_print(swig_collectable_tag, print_collectable_swig);
- scm_set_smob_equalp(swig_collectable_tag, equalp_swig);
- scm_set_smob_free(swig_collectable_tag, free_swig);
-+ /* For Guile >= 2.0.12. See libguile/smob.c:clear_smobnum */
-+ swig_finalized_tag = swig_collectable_tag & ~0xff00;
- }
- if (ensure_smob_tag(swig_module, &swig_destroyed_tag,
- "destroyed-swig-pointer", "destroyed-swig-pointer-tag")) {
diff --git a/gnu/packages/patches/tcl-fix-cross-compilation.patch b/gnu/packages/patches/tcl-fix-cross-compilation.patch
new file mode 100644
index 0000000000..00c36b8f27
--- /dev/null
+++ b/gnu/packages/patches/tcl-fix-cross-compilation.patch
@@ -0,0 +1,39 @@
+From f7fa48c4c75a1e748dc5071e709c0b62ff739eaa Mon Sep 17 00:00:00 2001
+From: "jan.nijtmans" <nijtmans@users.sourceforge.net>
+Date: Mon, 9 Dec 2019 10:02:20 +0000
+Subject: [PATCH] Fix [abd4abedd2]: Failed to build tk 8.6.10 with cross
+ compile
+
+Patch taken from upstream to fix cross-compilation. To be removed on next Tcl release.
+
+---
+ compat/strtol.c | 2 +-
+ compat/strtoul.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/compat/strtol.c b/compat/strtol.c
+index b7f69196ce2..811006a64c3 100644
+--- a/compat/strtol.c
++++ b/compat/strtol.c
+@@ -53,7 +53,7 @@ strtol(
+ */
+
+ p = string;
+- while (TclIsSpaceProc(*p)) {
++ while (isspace(UCHAR(*p))) {
+ p += 1;
+ }
+
+diff --git a/compat/strtoul.c b/compat/strtoul.c
+index e37eb05f823..15587f1da1a 100644
+--- a/compat/strtoul.c
++++ b/compat/strtoul.c
+@@ -74,7 +74,7 @@ strtoul(
+ */
+
+ p = string;
+- while (TclIsSpaceProc(*p)) {
++ while (isspace(UCHAR(*p))) {
+ p += 1;
+ }
+ if (*p == '-') {
diff --git a/gnu/packages/patches/tcsh-fix-autotest.patch b/gnu/packages/patches/tcsh-fix-autotest.patch
index 78444a1b2a..200867cb9b 100644
--- a/gnu/packages/patches/tcsh-fix-autotest.patch
+++ b/gnu/packages/patches/tcsh-fix-autotest.patch
@@ -63,38 +63,14 @@
AT_DATA([comment2.csh],
[[echo testing...@%:@\
-@@ -567,10 +567,10 @@ run=3
-# Adapt to changes in sed 4.3:
-# https://github.com/tcsh-org/tcsh/commit/2ad4fc1705893207598ed5cd21713ddf3f17bba0
- ]])
- AT_DATA([uniformity_test.csh],
- [[
--set SERVICE_NAME_LOG = `cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[:blank:]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g'`
-+set SERVICE_NAME_LOG = `cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[[:blank:]]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g'`
- echo -n "$SERVICE_NAME_LOG" > ./output1
-
--cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[:blank:]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g' > ./output2
-+cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[[:blank:]]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g' > ./output2
-
- diff -uprN ./output1 ./output2 >& /dev/null
-
-@@ -587,7 +587,7 @@ AT_DATA([quoting_result_test.csh],
- echo "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP\)(HOST=db\)(PORT=1521\)\)(CONNECT_DATA=(SERVER=DEDICATED\)(SERVICE_NAME=bns03\)\)\)" > ./expected_result
-
- set string = "jdbc_url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=bns03)))"
--set SERVICE_NAME_LOG = `echo "$string" | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[:blank:]*\([^$]*\)$/\1/p' | perl -pe 's/\)/\\\)/g'`
-+set SERVICE_NAME_LOG = `echo "$string" | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[[:blank:]]*\([^$]*\)$/\1/p' | perl -pe 's/\)/\\\)/g'`
-
- echo "$SERVICE_NAME_LOG" > ./actual_result
-
--- tests/subst.at
+++ tests/subst.at
-@@ -54,7 +54,7 @@ AT_CHECK([echo 'echo ~; echo "$HOME"' | tcsh -f | uniq | wc -l | tr -d ' \t'],
+@@ -54,7 +54,7 @@ AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }')
, [1
])
--AT_CHECK([echo "echo ~$(id -un)/foo; echo \"$HOME/foo\"" | tcsh -f | uniq dnl
-+AT_CHECK([echo "echo ~$(id -un)/foo; echo \"$HOME/foo\"" | tcsh -f | grep -v "/homeless-shelter" | uniq dnl
+-AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }'); echo "echo ~$(id -un)/foo; echo \"\$HOME/foo\"" | tcsh -f | uniq dnl
++AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }'); echo "echo ~$(id -un)//foo; echo \"\$HOME/foo\"" | tcsh -f | uniq dnl
| wc -l | tr -d ' \t'], , [1
])
@@ -110,21 +86,6 @@
]])
chmod a+x args.sh
AT_CHECK([tcsh -f listflags.csh], ,
-@@ -704,9 +705,9 @@ AT_CHECK([tcsh -f mail.csh], ,
-# This test fails by trying to change to the build user's home
-# directory, which does not exist.
- AT_CLEANUP
-
-
--AT_SETUP([$ cdtohome])
--AT_CHECK([tcsh -f -c 'cd'], 0)
--AT_CLEANUP
-+#AT_SETUP([$ cdtohome])
-+#AT_CHECK([tcsh -f -c 'cd'], 0)
-+#AT_CLEANUP
- AT_SETUP([$ noimplicithome])
- AT_CHECK([tcsh -f -c 'unset cdtohome; cd'], 1, , [cd: Too few arguments.
- ])
@@ -728,55 +729,57 @@ TCSH_UNTESTED([$ oid])
AT_SETUP([$ owd])
diff --git a/gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch b/gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch
deleted file mode 100644
index 48c294f78e..0000000000
--- a/gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Fix out-of-bounds read in c_substitute():
-
-http://seclists.org/oss-sec/2016/q4/612
-
-Patch copied from upstream source repository:
-
-https://github.com/tcsh-org/tcsh/commit/6a542dc4fb2ba26518a47e9b3a9bcd6a91b94596
-
-From 6a542dc4fb2ba26518a47e9b3a9bcd6a91b94596 Mon Sep 17 00:00:00 2001
-From: christos <christos>
-Date: Fri, 2 Dec 2016 16:59:28 +0000
-Subject: [PATCH] Fix out of bounds read (Brooks Davis) (reproduce by starting
- tcsh and hitting tab at the prompt)
-
----
- ed.chared.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/ed.chared.c b/ed.chared.c
-index 1277e53..310393e 100644
---- ed.chared.c
-+++ ed.chared.c
-@@ -750,7 +750,7 @@ c_substitute(void)
- /*
- * If we found a history character, go expand it.
- */
-- if (HIST != '\0' && *p == HIST)
-+ if (p >= InputBuf && HIST != '\0' && *p == HIST)
- nr_exp = c_excl(p);
- else
- nr_exp = 0;
diff --git a/gnu/packages/patches/vigra-python-compat.patch b/gnu/packages/patches/vigra-python-compat.patch
new file mode 100644
index 0000000000..63c6abb326
--- /dev/null
+++ b/gnu/packages/patches/vigra-python-compat.patch
@@ -0,0 +1,18 @@
+Fix build with Boost + Python 3.7.
+
+Taken from upstream:
+https://github.com/ukoethe/vigra/commit/a6fa62663c6a6b752ed0707e95f643e25867a0f9
+
+diff --git a/vigranumpy/src/core/vigranumpycore.cxx b/vigranumpy/src/core/vigranumpycore.cxx
+index ec38d3636..c81c6ae52 100644
+--- a/vigranumpy/src/core/vigranumpycore.cxx
++++ b/vigranumpy/src/core/vigranumpycore.cxx
+@@ -61,7 +61,7 @@ UInt32 pychecksum(python::str const & s)
+ return checksum(data, size);
+ #else
+ Py_ssize_t size = 0;
+- char * data = PyUnicode_AsUTF8AndSize(s.ptr(), &size);
++ const char * data = PyUnicode_AsUTF8AndSize(s.ptr(), &size);
+ return checksum(data, size);
+ #endif
+ }
diff --git a/gnu/packages/patches/webkitgtk-icu-65.patch b/gnu/packages/patches/webkitgtk-icu-65.patch
new file mode 100644
index 0000000000..66819c566b
--- /dev/null
+++ b/gnu/packages/patches/webkitgtk-icu-65.patch
@@ -0,0 +1,47 @@
+Fix build with ICU 65.
+
+Taken from upstream:
+https://bugs.webkit.org/show_bug.cgi?id=202600
+https://trac.webkit.org/r250747
+
+diff --git a/Source/WTF/wtf/URLHelpers.cpp b/Source/WTF/wtf/URLHelpers.cpp
+index 18e7f13cd615..c584f1a0cb7e 100644
+--- a/Source/WTF/wtf/URLHelpers.cpp
++++ b/Source/WTF/wtf/URLHelpers.cpp
+@@ -301,7 +301,7 @@ static bool allCharactersInIDNScriptWhiteList(const UChar* buffer, int32_t lengt
+ Optional<UChar32> previousCodePoint;
+ while (i < length) {
+ UChar32 c;
+- U16_NEXT(buffer, i, length, c)
++ U16_NEXT(buffer, i, length, c);
+ UErrorCode error = U_ZERO_ERROR;
+ UScriptCode script = uscript_getScript(c, &error);
+ if (error != U_ZERO_ERROR) {
+diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp
+index 2443e24c9bc4..1fbb3a716006 100644
+--- a/Source/WebCore/dom/Document.cpp
++++ b/Source/WebCore/dom/Document.cpp
+@@ -4954,12 +4954,12 @@ static bool isValidNameNonASCII(const UChar* characters, unsigned length)
+ unsigned i = 0;
+
+ UChar32 c;
+- U16_NEXT(characters, i, length, c)
++ U16_NEXT(characters, i, length, c);
+ if (!isValidNameStart(c))
+ return false;
+
+ while (i < length) {
+- U16_NEXT(characters, i, length, c)
++ U16_NEXT(characters, i, length, c);
+ if (!isValidNamePart(c))
+ return false;
+ }
+@@ -5019,7 +5019,7 @@ ExceptionOr<std::pair<AtomString, AtomString>> Document::parseQualifiedName(cons
+
+ for (unsigned i = 0; i < length; ) {
+ UChar32 c;
+- U16_NEXT(qualifiedName, i, length, c)
++ U16_NEXT(qualifiedName, i, length, c);
+ if (c == ':') {
+ if (sawColon)
+ return Exception { InvalidCharacterError };