code:
Tweak some gdb tests which were broken during LLVM upgrades.
This has been subsequently fixed upstream in later rustc versions,
but still needed to bootstrap some earlier versions of the compiler.

diff -r -u rustc-1.30.1-src-orig/src/test/debuginfo/borrowed-c-style-enum.rs rustc-1.30.1-src/src/test/debuginfo/borrowed-c-style-enum.rs
--- rustc-1.30.1-src-orig/src/test/debuginfo/borrowed-c-style-enum.rs	2019-02-04 12:49:34.055483896 -0800
+++ rustc-1.30.1-src/src/test/debuginfo/borrowed-c-style-enum.rs	2019-02-04 13:01:10.915950356 -0800
@@ -18,15 +18,15 @@

 // gdb-command:print *the_a_ref
 // gdbg-check:$1 = TheA
-// gdbr-check:$1 = borrowed_c_style_enum::ABC::TheA
+// gdbr-check:$1 = borrowed_c_style_enum::TheA

 // gdb-command:print *the_b_ref
 // gdbg-check:$2 = TheB
-// gdbr-check:$2 = borrowed_c_style_enum::ABC::TheB
+// gdbr-check:$2 = borrowed_c_style_enum::TheB

 // gdb-command:print *the_c_ref
 // gdbg-check:$3 = TheC
-// gdbr-check:$3 = borrowed_c_style_enum::ABC::TheC
+// gdbr-check:$3 = borrowed_c_style_enum::TheC

 // === LLDB TESTS ==================================================================================
diff -r -u rustc-1.30.1-src-orig/src/test/debuginfo/c-style-enum-in-composite.rs rustc-1.30.1-src/src/test/debuginfo/c-style-enum-in-composite.rs
--- rustc-1.30.1-src-orig/src/test/debuginfo/c-style-enum-in-composite.rs	2019-02-04 12:49:34.051483727 -0800
+++ rustc-1.30.1-src/src/test/debuginfo/c-style-enum-in-composite.rs	2019-02-04 13:02:00.981997525 -0800
@@ -19,31 +19,31 @@

 // gdb-command:print tuple_interior_padding
 // gdbg-check:$1 = {__0 = 0, __1 = OneHundred}
-// gdbr-check:$1 = (0, c_style_enum_in_composite::AnEnum::OneHundred)
+// gdbr-check:$1 = (0, c_style_enum_in_composite::OneHundred)

 // gdb-command:print tuple_padding_at_end
 // gdbg-check:$2 = {__0 = {__0 = 1, __1 = OneThousand}, __1 = 2}
-// gdbr-check:$2 = ((1, c_style_enum_in_composite::AnEnum::OneThousand), 2)
+// gdbr-check:$2 = ((1, c_style_enum_in_composite::OneThousand), 2)

 // gdb-command:print tuple_different_enums
 // gdbg-check:$3 = {__0 = OneThousand, __1 = MountainView, __2 = OneMillion, __3 = Vienna}
-// gdbr-check:$3 = (c_style_enum_in_composite::AnEnum::OneThousand, c_style_enum_in_composite::AnotherEnum::MountainView, c_style_enum_in_composite::AnEnum::OneMillion, c_style_enum_in_composite::AnotherEnum::Vienna)
+// gdbr-check:$3 = (c_style_enum_in_composite::OneThousand, c_style_enum_in_composite::MountainView, c_style_enum_in_composite::OneMillion, c_style_enum_in_composite::Vienna)

 // gdb-command:print padded_struct
 // gdbg-check:$4 = {a = 3, b = OneMillion, c = 4, d = Toronto, e = 5}
-// gdbr-check:$4 = c_style_enum_in_composite::PaddedStruct {a: 3, b: c_style_enum_in_composite::AnEnum::OneMillion, c: 4, d: c_style_enum_in_composite::AnotherEnum::Toronto, e: 5}
+// gdbr-check:$4 = c_style_enum_in_composite::PaddedStruct {a: 3, b: c_style_enum_in_composite::OneMillion, c: 4, d: c_style_enum_in_composite::Toronto, e: 5}

 // gdb-command:print packed_struct
 // gdbg-check:$5 = {a = 6, b = OneHundred, c = 7, d = Vienna, e = 8}
-// gdbr-check:$5 = c_style_enum_in_composite::PackedStruct {a: 6, b: c_style_enum_in_composite::AnEnum::OneHundred, c: 7, d: c_style_enum_in_composite::AnotherEnum::Vienna, e: 8}
+// gdbr-check:$5 = c_style_enum_in_composite::PackedStruct {a: 6, b: c_style_enum_in_composite::OneHundred, c: 7, d: c_style_enum_in_composite::Vienna, e: 8}

 // gdb-command:print non_padded_struct
 // gdbg-check:$6 = {a = OneMillion, b = MountainView, c = OneThousand, d = Toronto}
-// gdbr-check:$6 = c_style_enum_in_composite::NonPaddedStruct {a: c_style_enum_in_composite::AnEnum::OneMillion, b: c_style_enum_in_composite::AnotherEnum::MountainView, c: c_style_enum_in_composite::AnEnum::OneThousand, d: c_style_enum_in_composite::AnotherEnum::Toronto}
+// gdbr-check:$6 = c_style_enum_in_composite::NonPaddedStruct {a: c_style_enum_in_composite::OneMillion, b: c_style_enum_in_composite::MountainView, c: c_style_enum_in_composite::OneThousand, d: c_style_enum_in_composite::Toronto}

 // gdb-command:print struct_with_drop
 // gdbg-check:$7 = {__0 = {a = OneHundred, b = Vienna}, __1 = 9}
-// gdbr-check:$7 = (c_style_enum_in_composite::StructWithDrop {a: c_style_enum_in_composite::AnEnum::OneHundred, b: c_style_enum_in_composite::AnotherEnum::Vienna}, 9)
+// gdbr-check:$7 = (c_style_enum_in_composite::StructWithDrop {a: c_style_enum_in_composite::OneHundred, b: c_style_enum_in_composite::Vienna}, 9)

 // === LLDB TESTS ==================================================================================

diff -r -u rustc-1.30.1-src-orig/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs rustc-1.30.1-src/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs
--- rustc-1.30.1-src-orig/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs	2019-02-04 12:49:34.043483393 -0800
+++ rustc-1.30.1-src/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs	2019-02-04 13:02:17.954691634 -0800
@@ -27,15 +27,15 @@

 // gdb-command: print c_style_enum1
 // gdbg-check:$3 = CStyleEnumVar1
-// gdbr-check:$3 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar1
+// gdbr-check:$3 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnumVar1

 // gdb-command: print c_style_enum2
 // gdbg-check:$4 = CStyleEnumVar2
-// gdbr-check:$4 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar2
+// gdbr-check:$4 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnumVar2

 // gdb-command: print c_style_enum3
 // gdbg-check:$5 = CStyleEnumVar3
-// gdbr-check:$5 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar3
+// gdbr-check:$5 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnumVar3

 #![allow(dead_code, unused_variables)]


code:
Patch will be included upstream in 1.47: https://github.com/rust-lang/rust/pull/74416
diff --git a/src/librustc_codegen_ssa/back/linker.rs b/src/librustc_codegen_ssa/back/linker.rs
index e64aafa599f..12575ac4358 100644
--- a/src/librustc_codegen_ssa/back/linker.rs
+++ b/src/librustc_codegen_ssa/back/linker.rs
@@ -28,7 +28,7 @@ use rustc_target::spec::{LinkOutputKind, LinkerFlavor, LldFlavor};
 pub fn disable_localization(linker: &mut Command) {
     // No harm in setting both env vars simultaneously.
     // Unix-style linkers.
-    linker.env("LC_ALL", "C");
+    linker.env("LC_ALL", "en_US.UTF-8");
     // MSVC's `link.exe`.
     linker.env("VSLANG", "1033");
 }

license: mit


code:
Bootstrap tests failed with local stage0 cargo and rustc
Backported changes from https://github.com/rust-lang/rust/pull/51977

From 0834d9d771e912f51deca6c25699e44734624546 Mon Sep 17 00:00:00 2001
From: Nikolai Merinov <nikolai.merinov@member.fsf.org>
Date: Mon, 2 Jul 2018 01:45:35 +0500
Subject: [PATCH] bootstrap: tests should use rustc from config.toml

Tests should always use "rustc" and "cargo" from config.toml instead
of assuming that stage0 binaries was downloaded to build directory.
---
 src/bootstrap/bootstrap.py | 2 ++
 src/bootstrap/config.rs    | 6 ++----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 487440becf..1701f7b83a 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -788,6 +788,8 @@ def bootstrap(help_triggered):
     env["BOOTSTRAP_PARENT_ID"] = str(os.getpid())
     env["BOOTSTRAP_PYTHON"] = sys.executable
     env["BUILD_DIR"] = build.build_dir
+    env["CARGO"] = build.cargo()
+    env["RUSTC"] = build.rustc()
     run(args, env=env, verbose=build.verbose)

diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index 6dd6291be2..d1a0deb583 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -23,7 +23,6 @@ use std::cmp;

 use num_cpus;
 use toml;
-use util::exe;
 use cache::{INTERNER, Interned};
 use flags::Flags;
 pub use flags::Subcommand;
@@ -362,9 +361,8 @@ impl Config {
         config.src = Config::path_from_python("SRC");
         config.out = Config::path_from_python("BUILD_DIR");

-        let stage0_root = config.out.join(&config.build).join("stage0/bin");
-        config.initial_rustc = stage0_root.join(exe("rustc", &config.build));
-        config.initial_cargo = stage0_root.join(exe("cargo", &config.build));
+        config.initial_rustc = Config::path_from_python("RUSTC");
+        config.initial_cargo = Config::path_from_python("CARGO");

         config
     }
--
2.17.1


code:
Doctest coresimd::x86::__m256 failed on processors withouth "avx" feature.
Backported patch with changes from https://github.com/rust-lang-nursery/stdsimd/issues/481

--- rustc-1.26.2-src-orig/src/stdsimd/coresimd/x86/mod.rs	1970-01-01 05:00:00.000000000 +0500
+++ rustc-1.26.2-src/src/stdsimd/coresimd/x86/mod.rs	2018-06-22 00:01:55.142026720 +0500
@@ -293,13 +293,13 @@
     /// use std::arch::x86_64::*;
     ///
     /// # fn main() {
-    /// # #[target_feature(enable = "sse")]
+    /// # #[target_feature(enable = "avx")]
     /// # unsafe fn foo() {
     /// let eight_zeros = _mm256_setzero_ps();
     /// let eight_ones = _mm256_set1_ps(1.0);
     /// let eight_floats = _mm256_set_ps(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0);
     /// # }
-    /// # if is_x86_feature_detected!("sse") { unsafe { foo() } }
+    /// # if is_x86_feature_detected!("avx") { unsafe { foo() } }
     /// # }
     /// ```
     pub struct __m256(f32, f32, f32, f32, f32, f32, f32, f32);


code:
Subject: nettle: clear out "vendored" feature cruft from build.rs
From: Daniel Kahn Gillmor's avatarDaniel Kahn Gillmor <dkg@fifthhorseman.net>

https://salsa.debian.org/rust-team/debcargo-conf/-/commit/b608e6beaa1d38c14fc16ad53780d94954a91900
https://sources.debian.org/src/rust-nettle/7.0.0-1/debian/patches/disable-vendor.diff/
--- a/Cargo.toml	1969-12-31 19:00:00.000000000 -0500
+++ b/Cargo.toml	2019-10-23 19:12:01.076181971 -0400
@@ -35,4 +35,4 @@
 version = "1"

 [features]
-vendored = ["nettle-sys/vendored"]
+vendored = []


code:
Subject: nettle-sys: clear out "vendored" feature cruft from build.rs
From: Daniel Kahn Gillmor's avatarDaniel Kahn Gillmor <dkg@fifthhorseman.net>

https://salsa.debian.org/rust-team/debcargo-conf/-/commit/0c71150ad26bb66a8396dcdab055181af232ddc5
https://sources.debian.org/src/rust-nettle-sys/2.0.4-3/debian/patches/disable-vendor.diff/
--- a/Cargo.toml	2019-10-23 13:08:07.000000000 -0400
+++ b/Cargo.toml	2019-10-23 14:08:46.644064014 -0400
@@ -29,12 +29,9 @@
 version = "0.51.1"
 default-features = false

-[build-dependencies.nettle-src]
-version = "3.5.1-0"
-optional = true
-
 [build-dependencies.pkg-config]
 version = "0.3"

 [features]
 vendored = ["nettle-src"]
+nettle-src = []
diff --git a/build.rs b/build.rs
index 44f7af3..ede4b2f 100644
--- a/build.rs
+++ b/build.rs
@@ -1,7 +1,5 @@
 extern crate bindgen;
 extern crate pkg_config;
-#[cfg(feature = "vendored")]
-extern crate nettle_src;

 use std::env;
 use std::fs;
@@ -36,14 +34,6 @@ fn main() {
     println!("cargo:rerun-if-env-changed=NETTLE_STATIC");
     println!("cargo:rerun-if-env-changed={}", NETTLE_PREGENERATED_BINDINGS);

-    #[cfg(feature = "vendored")]
-    {
-        let artifacts = nettle_src::Build::new().build();
-        println!("cargo:vendored=1");
-        env::set_var("PKG_CONFIG_PATH",
-                     artifacts.lib_dir().join("pkgconfig"));
-    }
-
     let nettle = pkg_config::probe_library("nettle hogweed").unwrap();

     let mode = match env::var_os("NETTLE_STATIC") {


code:
https://sources.debian.org/data/main/r/rust-openssl-sys/0.9.53-1/debian/patches/disable-vendor.patch
"MIT" licensed according to debian/copyright file
slightly modified to only change the vendored openssl-src dependency

--- a/Cargo.toml
+++ b/Cargo.toml
@@ -31,14 +31,11 @@
 [build-dependencies.cc]
 version = "1.0"

-[build-dependencies.openssl-src]
-version = "111.0.1"
-optional = true
-
 [build-dependencies.pkg-config]
 version = "0.3.9"

 [features]
 vendored = ["openssl-src"]
+openssl-src = []
 [target."cfg(target_env = \"msvc\")".build-dependencies.vcpkg]
 version = "0.2"


code:
From b9ca108fcae2b738ca3f0c88c84ae5dc5a6f843f Mon Sep 17 00:00:00 2001
From: Tim Ryan <id@timryan.org>
Date: Mon, 14 May 2018 06:22:21 -0400
Subject: [PATCH] Support reproducible builds by forcing window.search to use
 stable key ordering. (#692)
See <https://github.com/rust-lang-nursery/mdBook/pull/692>
---
 src/vendor/mdbook/src/renderer/html_handlebars/search.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs
index d49772f8b..1ee66a511 100644
--- a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs
+++ b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs
@@ -205,6 +205,10 @@ fn write_to_js(index: Index, search_config: &Search) -> Result<String> {
         searchoptions,
         index,
     };
+
+    // By converting to serde_json::Value as an intermediary, we use a
+    // BTreeMap internally and can force a stable ordering of map keys.
+    let json_contents = serde_json::to_value(&json_contents)?;
     let json_contents = serde_json::to_string(&json_contents)?;

     Ok(format!("window.search = {};", json_contents))


code:
This patch prevents a code execution vector involving terminal escape
sequences when rxvt-unicode is in "secure mode".

This change was spurred by the following conversation on the
oss-security mailing list:

Problem description and proof of concept:
http://seclists.org/oss-sec/2017/q2/190

Upstream response:
http://seclists.org/oss-sec/2017/q2/291

Patch copied from upstream source repository:
http://cvs.schmorp.de/rxvt-unicode/src/command.C?r1=1.582&r2=1.583

--- rxvt-unicode/src/command.C	2016/07/14 05:33:26	1.582
+++ rxvt-unicode/src/command.C	2017/05/18 02:43:18	1.583
@@ -2695,7 +2695,7 @@
         /* kidnapped escape sequence: Should be 8.3.48 */
       case C1_ESA:		/* ESC G */
         // used by original rxvt for rob nations own graphics mode
-        if (cmd_getc () == 'Q')
+        if (cmd_getc () == 'Q' && option (Opt_insecure))
           tt_printf ("\033G0\012");	/* query graphics - no graphics */
         break;

@@ -2914,7 +2914,7 @@
         break;

       case CSI_CUB:		/* 8.3.18: (1) CURSOR LEFT */
-      case CSI_HPB: 		/* 8.3.59: (1) CHARACTER POSITION BACKWARD */
+      case CSI_HPB:		/* 8.3.59: (1) CHARACTER POSITION BACKWARD */
 #ifdef ISO6429
         arg[0] = -arg[0];
 #else				/* emulate common DEC VTs */


code:
commit 52ebece1243ae6900e414b6248b5145a28348eef
Author: Guillaume Le Vaillant <glv@posteo.net>
Date:   Fri Oct 18 15:41:23 2019 +0200

    Use basic ASDF system definitions instead of package-inferred-system

diff --git a/graph.asd b/graph.asd
index 193b6e3..56afc8f 100644
--- a/graph.asd
+++ b/graph.asd
@@ -3,12 +3,10 @@
   :version "0.0.0"
   :author ("Eric Schulte <schulte.eric@gmail.com>" "Thomas Dye")
   :licence "GPL V3"
-  :class :package-inferred-system
-  :defsystem-depends-on (:asdf-package-system)
+  :in-order-to ((test-op (test-op graph-test)))
   :depends-on (alexandria
                metabang-bind
                named-readtables
                curry-compose-reader-macros
-               graph/graph))
-
-(register-system-packages "femlisp-matlisp" '(:fl.matlisp))
+               cl-heap)
+  :components ((:file "graph")))
diff --git a/graph-dot.asd b/graph-dot.asd
new file mode 100644
index 0000000..12aec7e
--- /dev/null
+++ b/graph-dot.asd
@@ -0,0 +1,8 @@
+(defsystem :graph-dot
+  :depends-on (alexandria
+               metabang-bind
+               named-readtables
+               curry-compose-reader-macros
+               cl-ppcre
+               graph)
+  :components ((:file "dot")))
diff --git a/graph-json.asd b/graph-json.asd
new file mode 100644
index 0000000..e7d091f
--- /dev/null
+++ b/graph-json.asd
@@ -0,0 +1,8 @@
+(defsystem :graph-json
+  :depends-on (alexandria
+               metabang-bind
+               named-readtables
+               curry-compose-reader-macros
+               yason
+               graph)
+  :components ((:file "json")))
diff --git a/graph-test.asd b/graph-test.asd
new file mode 100644
index 0000000..1e811e1
--- /dev/null
+++ b/graph-test.asd
@@ -0,0 +1,10 @@
+(defsystem :graph-test
+  :depends-on (alexandria
+               metabang-bind
+               named-readtables
+               curry-compose-reader-macros
+               graph
+               stefil)
+  :perform (test-op (o s)
+             (uiop:symbol-call :graph/test 'test))
+  :components ((:file "test")))


code:
From f11c3f094ed5ca727ec819983425b6641db8227c Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Wed, 13 Feb 2019 09:32:11 -0600
Subject: [PATCH] BLACS: Remove use of long-deprecated MPI1 functions.

* BLACS/SRC/blacs_get_.c: 'MPI_Attr_get' -> 'MPI_Comm_get_attr'.
* BLACS/SRC/cgamn2d_.c, BLACS/SRC/cgamx2d_.c, BLACS/SRC/dgamn2d_.c,
BLACS/SRC/dgamx2d_.c, BLACS/SRC/igamn2d_.c, BLACS/SRC/igamx2d_.c,
BLACS/SRC/sgamn2d_.c, BLACS/SRC/sgamx2d_.c, BLACS/SRC/zgamn2d_.c,
BLACS/SRC/zgamx2d_.c: 'MPI_Type_struct' -> 'MPI_Type_create_struct'.
---
 BLACS/SRC/blacs_get_.c | 2 +-
 BLACS/SRC/cgamn2d_.c   | 2 +-
 BLACS/SRC/cgamx2d_.c   | 2 +-
 BLACS/SRC/dgamn2d_.c   | 2 +-
 BLACS/SRC/dgamx2d_.c   | 2 +-
 BLACS/SRC/igamn2d_.c   | 2 +-
 BLACS/SRC/igamx2d_.c   | 2 +-
 BLACS/SRC/sgamn2d_.c   | 2 +-
 BLACS/SRC/sgamx2d_.c   | 2 +-
 BLACS/SRC/zgamn2d_.c   | 2 +-
 BLACS/SRC/zgamx2d_.c   | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/BLACS/SRC/blacs_get_.c b/BLACS/SRC/blacs_get_.c
index e979767..d4b04cf 100644
--- a/BLACS/SRC/blacs_get_.c
+++ b/BLACS/SRC/blacs_get_.c
@@ -23,7 +23,7 @@ F_VOID_FUNC blacs_get_(int *ConTxt, int *what, int *val)
    case SGET_MSGIDS:
       if (BI_COMM_WORLD == NULL) Cblacs_pinfo(val, &val[1]);
       iptr = &val[1];
-      ierr=MPI_Attr_get(MPI_COMM_WORLD, MPI_TAG_UB, (BVOID **) &iptr,val);
+      ierr=MPI_Comm_get_attr(MPI_COMM_WORLD, MPI_TAG_UB, (BVOID **) &iptr,val);
       val[0] = 0;
       val[1] = *iptr;
       break;
diff --git a/BLACS/SRC/cgamn2d_.c b/BLACS/SRC/cgamn2d_.c
index 2db6ccb..6958f32 100644
--- a/BLACS/SRC/cgamn2d_.c
+++ b/BLACS/SRC/cgamn2d_.c
@@ -221,7 +221,7 @@ F_VOID_FUNC cgamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
diff --git a/BLACS/SRC/cgamx2d_.c b/BLACS/SRC/cgamx2d_.c
index 707c0b6..f802d01 100644
--- a/BLACS/SRC/cgamx2d_.c
+++ b/BLACS/SRC/cgamx2d_.c
@@ -221,7 +221,7 @@ F_VOID_FUNC cgamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
diff --git a/BLACS/SRC/dgamn2d_.c b/BLACS/SRC/dgamn2d_.c
index dff23b4..a2627ac 100644
--- a/BLACS/SRC/dgamn2d_.c
+++ b/BLACS/SRC/dgamn2d_.c
@@ -221,7 +221,7 @@ F_VOID_FUNC dgamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
diff --git a/BLACS/SRC/dgamx2d_.c b/BLACS/SRC/dgamx2d_.c
index a51f731..2a644d0 100644
--- a/BLACS/SRC/dgamx2d_.c
+++ b/BLACS/SRC/dgamx2d_.c
@@ -221,7 +221,7 @@ F_VOID_FUNC dgamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
diff --git a/BLACS/SRC/igamn2d_.c b/BLACS/SRC/igamn2d_.c
index 16bc003..f6a7859 100644
--- a/BLACS/SRC/igamn2d_.c
+++ b/BLACS/SRC/igamn2d_.c
@@ -218,7 +218,7 @@ F_VOID_FUNC igamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
diff --git a/BLACS/SRC/igamx2d_.c b/BLACS/SRC/igamx2d_.c
index 8165cbe..a7cfcc6 100644
--- a/BLACS/SRC/igamx2d_.c
+++ b/BLACS/SRC/igamx2d_.c
@@ -218,7 +218,7 @@ F_VOID_FUNC igamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
diff --git a/BLACS/SRC/sgamn2d_.c b/BLACS/SRC/sgamn2d_.c
index d6c95e5..569c797 100644
--- a/BLACS/SRC/sgamn2d_.c
+++ b/BLACS/SRC/sgamn2d_.c
@@ -221,7 +221,7 @@ F_VOID_FUNC sgamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
diff --git a/BLACS/SRC/sgamx2d_.c b/BLACS/SRC/sgamx2d_.c
index 4b0af6f..8897ece 100644
--- a/BLACS/SRC/sgamx2d_.c
+++ b/BLACS/SRC/sgamx2d_.c
@@ -221,7 +221,7 @@ F_VOID_FUNC sgamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
diff --git a/BLACS/SRC/zgamn2d_.c b/BLACS/SRC/zgamn2d_.c
index 9de2b23..37897df 100644
--- a/BLACS/SRC/zgamn2d_.c
+++ b/BLACS/SRC/zgamn2d_.c
@@ -221,7 +221,7 @@ F_VOID_FUNC zgamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
diff --git a/BLACS/SRC/zgamx2d_.c b/BLACS/SRC/zgamx2d_.c
index 414c381..0e9d474 100644
--- a/BLACS/SRC/zgamx2d_.c
+++ b/BLACS/SRC/zgamx2d_.c
@@ -221,7 +221,7 @@ F_VOID_FUNC zgamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
--
2.20.1


code:
The test case below relies on /etc/groups and similar info that is
not available in chroot builds, so skip it.

--- scheme48-1.9/scheme/posix/check.scm	2013-05-11 21:55:36.000000000 +0200
+++ scheme48-1.9/scheme/posix/check.scm	2013-05-11 21:55:40.000000000 +0200
@@ -229,29 +229,7 @@

 ; This assumes that we are not running as root and that / is owned by root.

-(define-test-case users&groups posix-core-tests
-  (let ((my-info (get-file-info directory-name))
-	(root-info (get-file-info "/")))
-    (let ((my-user (user-id->user-info (file-info-owner my-info)))
-	  (root-user (user-id->user-info (file-info-owner root-info)))
-	  (my-group (group-id->group-info (file-info-group my-info)))
-	  (root-group (group-id->group-info (file-info-group root-info))))
-      (let ((my-other-user (name->user-info (user-info-name my-user)))
-	    (my-other-group (name->group-info (group-info-name my-group))))
-	(check-that (file-info-owner my-info)
-		    (is user-id=? (user-info-id my-user)))
-	(check-that (file-info-owner root-info)
-		    (opposite (is user-id=? (user-info-id my-user))))
-	(check-that (file-info-group my-info)
-		    (is group-id=? (group-info-id my-group)))
-	;; doesn't work reliably
-	;; (specifically, if the user is member of wheel)
-	;; (check (not (group-id=? (file-info-group root-info)
-	;;		(group-info-id my-group))))
-	(check-that (os-string->string (user-info-name root-user))
-		    (member-of '("root"
-				 "bin" ; AIX
-				 )))))))
+

 (define-test-case environment posix-core-tests
   (let ((env (reverse (environment-alist))))


code:
Fixes make with -j, otherwise scotch.h may not be generated by the time make
tries to compile library_graph_diam.o et al.

Reported upstream at
https://gforge.inria.fr/tracker/index.php?func=detail&aid=21651&group_id=248&atid=1081

diff --git a/src/libscotch/Makefile b/src/libscotch/Makefile
index 9898894..b0ee14c 100644
--- a/src/libscotch/Makefile
+++ b/src/libscotch/Makefile
@@ -2229,6 +2229,28 @@ library_graph_color_f$(OBJ)	:	library_graph_color_f.c			\
 					common.h				\
 					scotch.h

+library_graph_diam$(OBJ)	:	library_graph_diam.c			\
+					module.h				\
+					common.h				\
+					graph.h					\
+					scotch.h
+
+library_graph_diam_f$(OBJ)	:	library_graph_diam.c			\
+					module.h				\
+					common.h				\
+					scotch.h
+
+library_graph_induce$(OBJ)	:	library_graph_diam.c			\
+					module.h				\
+					common.h				\
+					graph.h					\
+					scotch.h
+
+library_graph_induce_f$(OBJ)	:	library_graph_diam.c			\
+					module.h				\
+					common.h				\
+					scotch.h
+
 library_graph_io_chac$(OBJ)	:	library_graph_io_chac.c			\
 					module.h				\
 					common.h				\


code:
diff --git a/src/libscotch/library.h b/src/libscotch/library.h
index 1891c19..ecc0533 100644
--- a/src/libscotch/library.h
+++ b/src/libscotch/library.h
@@ -67,6 +67,8 @@

 /*+ Integer type. +*/

+#include <stdint.h>
+
 typedef DUMMYIDX SCOTCH_Idx;

 typedef DUMMYINT SCOTCH_Num;
diff --git a/src/libscotchmetis/library_metis.h b/src/libscotchmetis/library_metis.h
index e6767e1..04e71c3 100644
--- a/src/libscotchmetis/library_metis.h
+++ b/src/libscotchmetis/library_metis.h
@@ -99,6 +99,7 @@ typedef enum {
 */

 #ifndef SCOTCH_H                                  /* In case "scotch.h" not included before */
+#include <stdint.h>
 typedef DUMMYINT SCOTCH_Num;
 #endif /* SCOTCH_H */

diff --git a/src/libscotchmetis/library_parmetis.h b/src/libscotchmetis/library_parmetis.h
index 6d2f0b0..3c803fc 100644
--- a/src/libscotchmetis/library_parmetis.h
+++ b/src/libscotchmetis/library_parmetis.h
@@ -106,6 +106,7 @@ typedef enum {
 */

 #ifndef SCOTCH_H                                  /* In case "scotch.h" not included before */
+#include <stdint.h>
 typedef DUMMYINT SCOTCH_Num;
 #endif /* SCOTCH_H */


code:
Workaround for PATH_MAX usage on the Hurd.

Taken from https://salsa.debian.org/debian/screen/-/blob/master/debian/patches/61-default-PATH_MAX-if-undefined-for-hurd.patch

Description: Set PATH_MAX to 4096 if undefined
 Fixes FTBFS since 4.4.0 on GNU/Hurd. Updated to add one more occurrence for 4.5.0.
Author: Axel Beckert <abe@debian.org>
Bug: https://savannah.gnu.org/bugs/?50089
Last-Updated: 2017-01-18

--- a/tty.sh
+++ b/tty.sh
@@ -1478,6 +1478,13 @@
   return 0;
 }

+/*
+ * Define PATH_MAX to 4096 if it's not defined, like on GNU/Hurd
+ */
+
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif

 int CheckTtyname (char *tty)
 {
--- a/screen.h
+++ b/screen.h
@@ -109,6 +109,13 @@
 # define DEFAULT_BUFFERFILE	"/tmp/screen-exchange"
 #endif

+/*
+ * Define PATH_MAX to 4096 if it's not defined, like on GNU/Hurd
+ */
+
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif

 #if defined(hpux) && !(defined(VSUSP) && defined(VDSUSP) && defined(VWERASE) && defined(VLNEXT))
 # define HPUX_LTCHARS_HACK


code:
Fix build with Poppler 0.86.

The original series of patches authored by Craig Bradney <mrb@scribus.info>
and Jean Ghali <jghali@libertysurf.fr>, taken from
https://gitweb.gentoo.org/repo/gentoo.git/tree/app-office/scribus/files

diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp
--- a/scribus/plugins/import/pdf/importpdf.cpp
+++ b/scribus/plugins/import/pdf/importpdf.cpp
@@ -75,7 +75,11 @@ PdfPlug::PdfPlug(ScribusDoc* doc, int flags)
 QImage PdfPlug::readThumbnail(const QString& fName)
 {
 	QString pdfFile = QDir::toNativeSeparators(fName);
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0)
+	globalParams.reset(new GlobalParams());
+#else
 	globalParams = new GlobalParams();
+#endif
 	if (globalParams)
 	{
 #if defined(Q_OS_WIN32) && POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 62, 0)
@@ -90,7 +94,9 @@ QImage PdfPlug::readThumbnail(const QString& fName)
 			if (pdfDoc->getErrorCode() == errEncrypted)
 			{
 				delete pdfDoc;
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
 				delete globalParams;
+#endif
 				return QImage();
 			}
 			if (pdfDoc->isOk())
@@ -134,11 +140,15 @@ QImage PdfPlug::readThumbnail(const QString& fName)
 				image.setText("YSize", QString("%1").arg(h));
 				delete dev;
 				delete pdfDoc;
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
 				delete globalParams;
+#endif
 				return image;
 			}
 			delete pdfDoc;
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
 			delete globalParams;
+#endif
 		}
 	}
 	return QImage();
@@ -387,7 +397,11 @@ bool PdfPlug::convert(const QString& fn)
 		qApp->processEvents();
 	}

+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0)
+	globalParams.reset(new GlobalParams());
+#else
 	globalParams = new GlobalParams();
+#endif
 	GooString *userPW = nullptr;
 	if (globalParams)
 	{
@@ -429,7 +443,9 @@ bool PdfPlug::convert(const QString& fn)
 					if (progressDialog)
 						progressDialog->close();
 					delete pdfDoc;
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
 					delete globalParams;
+#endif
 					return false;
 				}
 				if (progressDialog)
@@ -474,7 +490,9 @@ bool PdfPlug::convert(const QString& fn)
 							progressDialog->close();
 						delete optImp;
 						delete pdfDoc;
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
 						delete globalParams;
+#endif
 						return false;
 					}
 					pageString = optImp->getPagesString();
@@ -838,11 +856,20 @@ bool PdfPlug::convert(const QString& fn)
 								names = catDict.dictLookup("OpenAction");
 								if (names.isDict())
 								{
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+									std::unique_ptr<LinkAction> linkAction;
+									linkAction = LinkAction::parseAction(&names, pdfDoc->getCatalog()->getBaseURI());
+#else
 									LinkAction *linkAction = nullptr;
 									linkAction = LinkAction::parseAction(&names, pdfDoc->getCatalog()->getBaseURI());
+#endif
 									if (linkAction)
 									{
-										LinkJavaScript *jsa = (LinkJavaScript*)linkAction;
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+										LinkJavaScript *jsa = (LinkJavaScript*) linkAction.get();
+#else
+										LinkJavaScript *jsa = (LinkJavaScript*) linkAction;
+#endif
 										if (jsa->isOk())
 										{
 											QString script = UnicodeParsedString(jsa->getScript());
@@ -908,8 +935,12 @@ bool PdfPlug::convert(const QString& fn)
 		}
 		delete pdfDoc;
 	}
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0)
+	globalParams.release();
+#else
 	delete globalParams;
 	globalParams = nullptr;
+#endif

 //	qDebug() << "converting finished";
 //	qDebug() << "Imported" << Elements.count() << "Elements";
@@ -1046,3 +1077,43 @@ QString PdfPlug::UnicodeParsedString(POPPLER_CONST GooString *s1)
 	}
 	return result;
 }
+
+QString PdfPlug::UnicodeParsedString(const std::string& s1)
+{
+	if (s1.length() == 0)
+		return QString();
+	GBool isUnicode;
+	int i;
+	Unicode u;
+	QString result;
+	if ((s1.at(0) & 0xff) == 0xfe && (s1.length() > 1 && (s1.at(1) & 0xff) == 0xff))
+	{
+		isUnicode = gTrue;
+		i = 2;
+		result.reserve((s1.length() - 2) / 2);
+	}
+	else
+	{
+		isUnicode = gFalse;
+		i = 0;
+		result.reserve(s1.length());
+	}
+	while (i < s1.length())
+	{
+		if (isUnicode)
+		{
+			u = ((s1.at(i) & 0xff) << 8) | (s1.at(i+1) & 0xff);
+			i += 2;
+		}
+		else
+		{
+			u = s1.at(i) & 0xff;
+			++i;
+		}
+		// #15616: imagemagick may write unicode strings incorrectly in PDF
+		if (u == 0)
+			continue;
+		result += QChar( u );
+	}
+	return result;
+}
diff --git a/scribus/plugins/import/pdf/importpdf.h b/scribus/plugins/import/pdf/importpdf.h
--- a/scribus/plugins/import/pdf/importpdf.h
+++ b/scribus/plugins/import/pdf/importpdf.h
@@ -82,6 +82,7 @@ private:
 	bool convert(const QString& fn);
 	QRectF getCBox(int box, int pgNum);
 	QString UnicodeParsedString(POPPLER_CONST GooString *s1);
+	QString UnicodeParsedString(const std::string& s1);

 	QList<PageItem*> Elements;
 	double baseX, baseY;
diff --git a/scribus/plugins/import/pdf/importpdfconfig.h b/scribus/plugins/import/pdf/importpdfconfig.h
--- a/scribus/plugins/import/pdf/importpdfconfig.h
+++ b/scribus/plugins/import/pdf/importpdfconfig.h
@@ -52,4 +52,16 @@ for which a new license (GPL+exception) is in place.
 #define POPPLER_REF
 #endif

+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 82, 0)
+#define POPPLER_CONST_082 const
+#else
+#define POPPLER_CONST_082
+#endif
+
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0)
+#define POPPLER_CONST_083 const
+#else
+#define POPPLER_CONST_083
+#endif
+
 #endif
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
--- a/scribus/plugins/import/pdf/slaoutput.cpp
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
@@ -308,9 +308,15 @@ LinkAction* SlaOutputDev::SC_getAction(AnnotWidget *ano)
 }

 /* Replacement for the crippled Poppler function LinkAction* AnnotWidget::getAdditionalAction(AdditionalActionsType type) */
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+std::unique_ptr<LinkAction> SlaOutputDev::SC_getAdditionalAction(const char *key, AnnotWidget *ano)
+{
+	std::unique_ptr<LinkAction> linkAction;
+#else
 LinkAction* SlaOutputDev::SC_getAdditionalAction(const char *key, AnnotWidget *ano)
 {
 	LinkAction *linkAction = nullptr;
+#endif
 	Object obj;
 	Ref refa = ano->getRef();

@@ -455,7 +461,11 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double xCoor, double yCoor, do
 			POPPLER_CONST GooString *ndst = gto->getNamedDest();
 			if (ndst)
 			{
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+				std::unique_ptr<LinkDest> dstn = pdfDoc->findDest(ndst);
+#else
 				LinkDest *dstn = pdfDoc->findDest(ndst);
+#endif
 				if (dstn)
 				{
 					if (dstn->getKind() == destXYZ)
@@ -499,7 +509,11 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double xCoor, double yCoor, do
 			POPPLER_CONST GooString *ndst = gto->getNamedDest();
 			if (ndst)
 			{
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+				std::unique_ptr<LinkDest> dstn = pdfDoc->findDest(ndst);
+#else
 				LinkDest *dstn = pdfDoc->findDest(ndst);
+#endif
 				if (dstn)
 				{
 					if (dstn->getKind() == destXYZ)
@@ -967,7 +981,11 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
 				POPPLER_CONST GooString *ndst = gto->getNamedDest();
 				if (ndst)
 				{
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+					std::unique_ptr<LinkDest> dstn = pdfDoc->findDest(ndst);
+#else
 					LinkDest *dstn = pdfDoc->findDest(ndst);
+#endif
 					if (dstn)
 					{
 						if (dstn->getKind() == destXYZ)
@@ -1019,7 +1037,11 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
 				POPPLER_CONST GooString *ndst = gto->getNamedDest();
 				if (ndst)
 				{
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+					std::unique_ptr<LinkDest> dstn = pdfDoc->findDest(ndst);
+#else
 					LinkDest *dstn = pdfDoc->findDest(ndst);
+#endif
 					if (dstn)
 					{
 						if (dstn->getKind() == destXYZ)
@@ -1088,96 +1110,148 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
 		else
 			qDebug() << "Found unsupported Action of type" << Lact->getKind();
 	}
-	LinkAction *Aact = SC_getAdditionalAction("D", ano);
+	auto Aact = SC_getAdditionalAction("D", ano);
 	if (Aact)
 	{
 		if (Aact->getKind() == actionJavaScript)
 		{
-			LinkJavaScript *jsa = (LinkJavaScript*)Aact;
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+			LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
+#else
+			LinkJavaScript *jsa = (LinkJavaScript*) Aact;
+#endif
 			if (jsa->isOk())
 			{
 				ite->annotation().setD_act(UnicodeParsedString(jsa->getScript()));
 				ite->annotation().setAAact(true);
 			}
 		}
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+		Aact.reset();
+#else
 		Aact = nullptr;
+#endif
 	}
 	Aact = SC_getAdditionalAction("E", ano);
 	if (Aact)
 	{
 		if (Aact->getKind() == actionJavaScript)
 		{
-			LinkJavaScript *jsa = (LinkJavaScript*)Aact;
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+			LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
+#else
+			LinkJavaScript *jsa = (LinkJavaScript*) Aact;
+#endif
 			if (jsa->isOk())
 			{
 				ite->annotation().setE_act(UnicodeParsedString(jsa->getScript()));
 				ite->annotation().setAAact(true);
 			}
 		}
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+		Aact.reset();
+#else
 		Aact = nullptr;
+#endif
 	}
 	Aact = SC_getAdditionalAction("X", ano);
 	if (Aact)
 	{
 		if (Aact->getKind() == actionJavaScript)
 		{
-			LinkJavaScript *jsa = (LinkJavaScript*)Aact;
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+			LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
+#else
+			LinkJavaScript *jsa = (LinkJavaScript*) Aact;
+#endif
 			if (jsa->isOk())
 			{
 				ite->annotation().setX_act(UnicodeParsedString(jsa->getScript()));
 				ite->annotation().setAAact(true);
 			}
 		}
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+		Aact.reset();
+#else
 		Aact = nullptr;
+#endif
 	}
 	Aact = SC_getAdditionalAction("Fo", ano);
 	if (Aact)
 	{
 		if (Aact->getKind() == actionJavaScript)
 		{
-			LinkJavaScript *jsa = (LinkJavaScript*)Aact;
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+			LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
+#else
+			LinkJavaScript *jsa = (LinkJavaScript*) Aact;
+#endif
 			if (jsa->isOk())
 			{
 				ite->annotation().setFo_act(UnicodeParsedString(jsa->getScript()));
 				ite->annotation().setAAact(true);
 			}
 		}
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+		Aact.reset();
+#else
 		Aact = nullptr;
+#endif
 	}
 	Aact = SC_getAdditionalAction("Bl", ano);
 	if (Aact)
 	{
 		if (Aact->getKind() == actionJavaScript)
 		{
-			LinkJavaScript *jsa = (LinkJavaScript*)Aact;
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+			LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
+#else
+			LinkJavaScript *jsa = (LinkJavaScript*) Aact;
+#endif
 			if (jsa->isOk())
 			{
 				ite->annotation().setBl_act(UnicodeParsedString(jsa->getScript()));
 				ite->annotation().setAAact(true);
 			}
 		}
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+		Aact.reset();
+#else
 		Aact = nullptr;
+#endif
 	}
 	Aact = SC_getAdditionalAction("C", ano);
 	if (Aact)
 	{
 		if (Aact->getKind() == actionJavaScript)
 		{
-			LinkJavaScript *jsa = (LinkJavaScript*)Aact;
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+			LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
+#else
+			LinkJavaScript *jsa = (LinkJavaScript*) Aact;
+#endif
 			if (jsa->isOk())
 			{
 				ite->annotation().setC_act(UnicodeParsedString(jsa->getScript()));
 				ite->annotation().setAAact(true);
 			}
 		}
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+		Aact.reset();
+#else
 		Aact = nullptr;
+#endif
 	}
 	Aact = SC_getAdditionalAction("F", ano);
 	if (Aact)
 	{
 		if (Aact->getKind() == actionJavaScript)
 		{
-			LinkJavaScript *jsa = (LinkJavaScript*)Aact;
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+			LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
+#else
+			LinkJavaScript *jsa = (LinkJavaScript*) Aact;
+#endif
 			if (jsa->isOk())
 			{
 				ite->annotation().setF_act(UnicodeParsedString(jsa->getScript()));
@@ -1185,14 +1259,22 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
 				ite->annotation().setFormat(5);
 			}
 		}
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+		Aact.reset();
+#else
 		Aact = nullptr;
+#endif
 	}
 	Aact = SC_getAdditionalAction("K", ano);
 	if (Aact)
 	{
 		if (Aact->getKind() == actionJavaScript)
 		{
-			LinkJavaScript *jsa = (LinkJavaScript*)Aact;
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+			LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
+#else
+			LinkJavaScript *jsa = (LinkJavaScript*) Aact;
+#endif
 			if (jsa->isOk())
 			{
 				ite->annotation().setK_act(UnicodeParsedString(jsa->getScript()));
@@ -1200,21 +1282,33 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
 				ite->annotation().setFormat(5);
 			}
 		}
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+		Aact.reset();
+#else
 		Aact = nullptr;
+#endif
 	}
 	Aact = SC_getAdditionalAction("V", ano);
 	if (Aact)
 	{
 		if (Aact->getKind() == actionJavaScript)
 		{
-			LinkJavaScript *jsa = (LinkJavaScript*)Aact;
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+			LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
+#else
+			LinkJavaScript *jsa = (LinkJavaScript*) Aact;
+#endif
 			if (jsa->isOk())
 			{
 				ite->annotation().setV_act(UnicodeParsedString(jsa->getScript()));
 				ite->annotation().setAAact(true);
 			}
 		}
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+		Aact.reset();
+#else
 		Aact = nullptr;
+#endif
 	}
 }

@@ -1224,6 +1318,11 @@ void SlaOutputDev::startDoc(PDFDoc *doc, XRef *xrefA, Catalog *catA)
 	catalog = catA;
 	pdfDoc = doc;
 	updateGUICounter = 0;
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 84, 0)
+	m_fontEngine = new SplashFontEngine(true, true, true, true);
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 61, 0)
+	m_fontEngine = new SplashFontEngine(globalParams->getEnableFreeType(), true, true, true);
+#else
 	m_fontEngine = new SplashFontEngine(
 #if HAVE_T1LIB_H
 	globalParams->getEnableT1lib(),
@@ -1234,6 +1333,7 @@ void SlaOutputDev::startDoc(PDFDoc *doc, XRef *xrefA, Catalog *catA)
 	true,
 #endif
 	true);
+#endif
 }

 void SlaOutputDev::startPage(int pageNum, GfxState *, XRef *)
@@ -2784,7 +2884,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str,  i
 	delete[] mbuffer;
 }

-void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg)
+void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, POPPLER_CONST_082 int* maskColors, GBool inlineImg)
 {
 	ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits());
 //	qDebug() << "Image Components" << colorMap->getNumPixelComps() << "Mask" << maskColors;
@@ -3365,7 +3465,7 @@ err1:
 		fontsrc->unref();
 }

-void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, Unicode *u, int uLen)
+void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, POPPLER_CONST_082 Unicode *u, int uLen)
 {
 	double x1, y1, x2, y2;
 	int render;
@@ -3452,7 +3552,7 @@ void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, doub
 	}
 }

-GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, Unicode *u, int uLen)
+GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, POPPLER_CONST_082 Unicode *u, int uLen)
 {
 //	qDebug() << "beginType3Char";
 	GfxFont *gfxFont;
@@ -3705,7 +3805,7 @@ QString SlaOutputDev::getAnnotationColor(const AnnotColor *color)
 	return fNam;
 }

-QString SlaOutputDev::convertPath(GfxPath *path)
+QString SlaOutputDev::convertPath(POPPLER_CONST_083 GfxPath *path)
 {
 	if (! path)
 		return QString();
@@ -3715,7 +3815,7 @@ QString SlaOutputDev::convertPath(GfxPath *path)

 	for (int i = 0; i < path->getNumSubpaths(); ++i)
 	{
-		GfxSubpath * subpath = path->getSubpath(i);
+		POPPLER_CONST_083 GfxSubpath * subpath = path->getSubpath(i);
 		if (subpath->getNumPoints() > 0)
 		{
 			output += QString("M %1 %2").arg(subpath->getX(0)).arg(subpath->getY(0));
@@ -3922,6 +4022,46 @@ QString SlaOutputDev::UnicodeParsedString(POPPLER_CONST GooString *s1)
 	return result;
 }

+QString SlaOutputDev::UnicodeParsedString(const std::string& s1)
+{
+	if (s1.length() == 0)
+		return QString();
+	GBool isUnicode;
+	int i;
+	Unicode u;
+	QString result;
+	if ((s1.at(0) & 0xff) == 0xfe && (s1.length() > 1 && (s1.at(1) & 0xff) == 0xff))
+	{
+		isUnicode = gTrue;
+		i = 2;
+		result.reserve((s1.length() - 2) / 2);
+	}
+	else
+	{
+		isUnicode = gFalse;
+		i = 0;
+		result.reserve(s1.length());
+	}
+	while (i < s1.length())
+	{
+		if (isUnicode)
+		{
+			u = ((s1.at(i) & 0xff) << 8) | (s1.at(i+1) & 0xff);
+			i += 2;
+		}
+		else
+		{
+			u = s1.at(i) & 0xff;
+			++i;
+		}
+		// #15616: imagemagick may write unicode strings incorrectly in PDF
+		if (u == 0)
+			continue;
+		result += QChar( u );
+	}
+	return result;
+}
+
 bool SlaOutputDev::checkClip()
 {
 	bool ret = false;
diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h
--- a/scribus/plugins/import/pdf/slaoutput.h
+++ b/scribus/plugins/import/pdf/slaoutput.h
@@ -20,6 +20,8 @@ for which a new license (GPL+exception) is in place.
 #include <QTextStream>
 #include <QTransform>

+#include <memory>
+
 #include "fpointarray.h"
 #include "importpdfconfig.h"
 #include "pageitem.h"
@@ -159,7 +161,11 @@ public:
 	virtual ~SlaOutputDev();

 	LinkAction* SC_getAction(AnnotWidget *ano);
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
+	std::unique_ptr<LinkAction> SC_getAdditionalAction(const char *key, AnnotWidget *ano);
+#else
 	LinkAction* SC_getAdditionalAction(const char *key, AnnotWidget *ano);
+#endif
 	static GBool annotations_callback(Annot *annota, void *user_data);
 	bool handleTextAnnot(Annot* annota, double xCoor, double yCoor, double width, double height);
 	bool handleLinkAnnot(Annot* annota, double xCoor, double yCoor, double width, double height);
@@ -229,7 +235,7 @@ public:

 	//----- image drawing
 	void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg) override;
-	void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg) override;
+	void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, POPPLER_CONST_082 int *maskColors, GBool inlineImg) override;
 	void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
 				   int width, int height,
 				   GfxImageColorMap *colorMap,
@@ -261,8 +267,8 @@ public:
 	//----- text drawing
 	void  beginTextObject(GfxState *state) override;
 	void  endTextObject(GfxState *state) override;
-	void  drawChar(GfxState *state, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode /*code*/, int /*nBytes*/, Unicode * /*u*/, int /*uLen*/) override;
-	GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, Unicode * /*u*/, int /*uLen*/) override;
+	void  drawChar(GfxState *state, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode /*code*/, int /*nBytes*/, POPPLER_CONST_082 Unicode * /*u*/, int /*uLen*/) override;
+	GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, POPPLER_CONST_082 Unicode * /*u*/, int /*uLen*/) override;
 	void  endType3Char(GfxState * /*state*/) override;
 	void  type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/) override;
 	void  type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) override;
@@ -282,11 +288,12 @@ private:
 	void getPenState(GfxState *state);
 	QString getColor(GfxColorSpace *color_space, POPPLER_CONST_070 GfxColor *color, int *shade);
 	QString getAnnotationColor(const AnnotColor *color);
-	QString convertPath(GfxPath *path);
+	QString convertPath(POPPLER_CONST_083 GfxPath *path);
 	int getBlendMode(GfxState *state);
 	void applyMask(PageItem *ite);
 	void pushGroup(const QString& maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false);
 	QString UnicodeParsedString(POPPLER_CONST GooString *s1);
+	QString UnicodeParsedString(const std::string& s1);
 	bool checkClip();
 	bool pathIsClosed;
 	QString CurrColorFill;


code:
Update _XData32 declaration in SDL_x11sym.h to match that of libx11 1.6.

--- SDL-1.2.15/src/video/x11/SDL_x11sym.h.~1~	2012-01-19 01:30:06.000000000 -0500
+++ SDL-1.2.15/src/video/x11/SDL_x11sym.h	2014-12-26 00:22:36.445067694 -0500
@@ -165,7 +165,7 @@
  */
 #ifdef LONG64
 SDL_X11_MODULE(IO_32BIT)
-SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
+SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return)
 SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),)
 #endif


code:
Index: SDL_Pango-0.1.2/src/SDL_Pango.c
===================================================================
--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c	2004-12-10 10:06:33.000000000 +0100
+++ SDL_Pango-0.1.2/src/SDL_Pango.c	2007-09-18 14:56:35.362379428 +0200
@@ -723,13 +723,9 @@
     SDL_UnlockSurface(surface);
 }

-/*!
-    Create a context which contains Pango objects.

-    @return A pointer to the context as a SDLPango_Context*.
-*/
 SDLPango_Context*
-SDLPango_CreateContext()
+SDLPango_CreateContext_GivenFontDesc(const char* font_desc)
 {
     SDLPango_Context *context = g_malloc(sizeof(SDLPango_Context));
     G_CONST_RETURN char *charset;
@@ -743,8 +739,7 @@
     pango_context_set_language (context->context, pango_language_from_string (charset));
     pango_context_set_base_dir (context->context, PANGO_DIRECTION_LTR);

-    context->font_desc = pango_font_description_from_string(
-	MAKE_FONT_NAME (DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE));
+    context->font_desc = pango_font_description_from_string(font_desc);

     context->layout = pango_layout_new (context->context);

@@ -762,6 +757,17 @@
 }

 /*!
+    Create a context which contains Pango objects.
+
+    @return A pointer to the context as a SDLPango_Context*.
+*/
+SDLPango_Context*
+SDLPango_CreateContext()
+{
+    SDLPango_CreateContext_GivenFontDesc(MAKE_FONT_NAME(DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE));
+}
+
+/*!
     Free a context.

     @param *context [i/o] Context to be free
@@ -1053,6 +1059,20 @@
     pango_layout_set_font_description (context->layout, context->font_desc);
 }

+void
+SDLPango_SetText_GivenAlignment(
+    SDLPango_Context *context,
+    const char *text,
+    int length,
+    SDLPango_Alignment alignment)
+{
+    pango_layout_set_attributes(context->layout, NULL);
+    pango_layout_set_text (context->layout, text, length);
+    pango_layout_set_auto_dir (context->layout, TRUE);
+    pango_layout_set_alignment (context->layout, alignment);
+    pango_layout_set_font_description (context->layout, context->font_desc);
+}
+
 /*!
     Set plain text to context.
     Text must be utf-8.
@@ -1067,11 +1087,7 @@
     const char *text,
     int length)
 {
-    pango_layout_set_attributes(context->layout, NULL);
-    pango_layout_set_text (context->layout, text, length);
-    pango_layout_set_auto_dir (context->layout, TRUE);
-    pango_layout_set_alignment (context->layout, PANGO_ALIGN_LEFT);
-    pango_layout_set_font_description (context->layout, context->font_desc);
+    SDLPango_SetText_GivenAlignment(context, text, length, SDLPANGO_ALIGN_LEFT);
 }

 /*!
Index: SDL_Pango-0.1.2/src/SDL_Pango.h
===================================================================
--- SDL_Pango-0.1.2.orig/src/SDL_Pango.h	2004-12-10 10:06:33.000000000 +0100
+++ SDL_Pango-0.1.2/src/SDL_Pango.h	2007-09-18 15:00:41.736419485 +0200
@@ -26,6 +26,7 @@

 #ifndef SDL_PANGO_H
 #define SDL_PANGO_H
+#define SDL_PANGO_HAS_GC_EXTENSIONS

 #include "SDL.h"

@@ -109,12 +110,20 @@
     SDLPANGO_DIRECTION_NEUTRAL	/*! Neutral */
 } SDLPango_Direction;

-
+/*!
+    Specifies alignment of text. See Pango reference for detail
+*/
+typedef enum {
+    SDLPANGO_ALIGN_LEFT,
+    SDLPANGO_ALIGN_CENTER,
+    SDLPANGO_ALIGN_RIGHT
+} SDLPango_Alignment;

 extern DECLSPEC int SDLCALL SDLPango_Init();

 extern DECLSPEC int SDLCALL SDLPango_WasInit();

+extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext_GivenFontDesc(const char* font_desc);
 extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext();

 extern DECLSPEC void SDLCALL SDLPango_FreeContext(
@@ -157,6 +166,12 @@
     const char *markup,
     int length);

+extern DECLSPEC void SDLCALL SDLPango_SetText_GivenAlignment(
+    SDLPango_Context *context,
+    const char *text,
+    int length,
+    SDLPango_Alignment alignment);
+
 extern DECLSPEC void SDLCALL SDLPango_SetText(
     SDLPango_Context *context,
     const char *markup,


code:
Index: SDL_Pango-0.1.2/src/SDL_Pango.c
===================================================================
--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c	2007-09-18 15:56:12.406223540 +0200
+++ SDL_Pango-0.1.2/src/SDL_Pango.c	2007-09-18 15:57:27.986530616 +0200
@@ -932,7 +932,9 @@
     width = PANGO_PIXELS (logical_rect.width);
     height = PANGO_PIXELS (logical_rect.height);

-    SDL_FillRect(surface, NULL, SDL_MapRGBA(surface->format, 0, 0, 0, 0));
+    if (width && height) {
+        SDL_FillRect(surface, NULL, SDL_MapRGBA(surface->format, 0, 0, 0, 0));
+    }

     if((! context->tmp_ftbitmap) || context->tmp_ftbitmap->width < width
 	|| context->tmp_ftbitmap->rows < height)


code:
--- a/src/SDL_Pango.h
+++ b/src/SDL_Pango.h
@@ -171,7 +171,7 @@
     SDLPango_Direction direction);

-#ifdef __FT2_BUILD_UNIX_H__
+#ifdef FT2BUILD_H_

 extern DECLSPEC void SDLCALL SDLPango_CopyFTBitmapToSurface(
     const FT_Bitmap *bitmap,
@@ -179,7 +179,7 @@
     const SDLPango_Matrix *matrix,
     SDL_Rect *rect);

-#endif	/* __FT2_BUILD_UNIX_H__ */
+#endif

 #ifdef __PANGO_H__


code:
Index: SDL_Pango-0.1.2/src/SDL_Pango.c
===================================================================
--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c	2007-09-18 15:03:10.732910311 +0200
+++ SDL_Pango-0.1.2/src/SDL_Pango.c	2007-09-18 15:04:41.970109622 +0200
@@ -286,6 +286,59 @@
 } contextImpl;

+const SDLPango_Matrix _MATRIX_WHITE_BACK
+    = {255, 0, 0, 0,
+       255, 0, 0, 0,
+       255, 0, 0, 0,
+       255, 255, 0, 0,};
+
+/*!
+    Specifies white back and black letter.
+*/
+const SDLPango_Matrix *MATRIX_WHITE_BACK = &_MATRIX_WHITE_BACK;
+
+const SDLPango_Matrix _MATRIX_BLACK_BACK
+    = {0, 255, 0, 0,
+       0, 255, 0, 0,
+       0, 255, 0, 0,
+       255, 255, 0, 0,};
+/*!
+    Specifies black back and white letter.
+*/
+const SDLPango_Matrix *MATRIX_BLACK_BACK = &_MATRIX_BLACK_BACK;
+
+const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER
+    = {0, 0, 0, 0,
+       0, 0, 0, 0,
+       0, 0, 0, 0,
+       0, 255, 0, 0,};
+/*!
+    Specifies transparent back and black letter.
+*/
+const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER = &_MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
+
+const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER
+    = {255, 255, 0, 0,
+       255, 255, 0, 0,
+       255, 255, 0, 0,
+       0, 255, 0, 0,};
+/*!
+    Specifies transparent back and white letter.
+*/
+const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER = &_MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
+
+const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER
+    = {255, 255, 0, 0,
+       255, 255, 0, 0,
+       255, 255, 0, 0,
+       0, 0, 0, 0,};
+/*!
+    Specifies transparent back and transparent letter.
+    This is useful for KARAOKE like rendering.
+*/
+const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER = &_MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
+
+
 /*!
     Initialize the Glib and Pango API.
     This must be called before using other functions in this library,
Index: SDL_Pango-0.1.2/src/SDL_Pango.h
===================================================================
--- SDL_Pango-0.1.2.orig/src/SDL_Pango.h	2007-09-18 15:03:10.732910311 +0200
+++ SDL_Pango-0.1.2/src/SDL_Pango.h	2007-09-18 15:06:24.919976401 +0200
@@ -47,57 +47,27 @@
     Uint8 m[4][4];  /*! Matrix variables */
 } SDLPango_Matrix;

-const SDLPango_Matrix _MATRIX_WHITE_BACK
-    = {255, 0, 0, 0,
-       255, 0, 0, 0,
-       255, 0, 0, 0,
-       255, 255, 0, 0,};
-
 /*!
     Specifies white back and black letter.
 */
-const SDLPango_Matrix *MATRIX_WHITE_BACK = &_MATRIX_WHITE_BACK;
-
-const SDLPango_Matrix _MATRIX_BLACK_BACK
-    = {0, 255, 0, 0,
-       0, 255, 0, 0,
-       0, 255, 0, 0,
-       255, 255, 0, 0,};
+extern const SDLPango_Matrix *MATRIX_WHITE_BACK;
 /*!
     Specifies black back and white letter.
 */
-const SDLPango_Matrix *MATRIX_BLACK_BACK = &_MATRIX_BLACK_BACK;
-
-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER
-    = {0, 0, 0, 0,
-       0, 0, 0, 0,
-       0, 0, 0, 0,
-       0, 255, 0, 0,};
+extern const SDLPango_Matrix *MATRIX_BLACK_BACK;
 /*!
     Specifies transparent back and black letter.
 */
-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER = &_MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
-
-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER
-    = {255, 255, 0, 0,
-       255, 255, 0, 0,
-       255, 255, 0, 0,
-       0, 255, 0, 0,};
+extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
 /*!
     Specifies transparent back and white letter.
 */
-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER = &_MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
-
-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER
-    = {255, 255, 0, 0,
-       255, 255, 0, 0,
-       255, 255, 0, 0,
-       0, 0, 0, 0,};
+extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
 /*!
     Specifies transparent back and transparent letter.
     This is useful for KARAOKE like rendering.
 */
-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER = &_MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
+extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;

 /*!
     Specifies direction of text. See Pango reference for detail


code:
Index: SDL_Pango-0.1.2/src/SDL_Pango.c
===================================================================
--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c	2007-09-18 15:12:20.736253215 +0200
+++ SDL_Pango-0.1.2/src/SDL_Pango.c	2007-09-18 15:12:44.621614364 +0200
@@ -234,7 +234,7 @@
 //! non-zero if initialized
 static int IS_INITIALIZED = 0;

-#define DEFAULT_FONT_FAMILY "Sans"
+#define DEFAULT_FONT_FAMILY "sans-serif"
 #define DEFAULT_FONT_SIZE 12
 #define DEFAULT_DPI 96
 #define _MAKE_FONT_NAME(family, size) family " " #size


code:
From 6d512b5c4d774a9853b51dae464a10cea7e3423a Mon Sep 17 00:00:00 2001
From: Peter Rustler <peter.rustler@basyskom.com>
Date: Mon, 7 Dec 2015 11:40:05 +0000
Subject: [PATCH] Add support for new webkit version 4.0 to build system

Add new configure value for option --with-webkit.
Now you can add 4.0 as value to --with-webkit.
Default is still 3.0.

https://bugzilla.gnome.org/show_bug.cgi?id=759171
---
 configure.ac | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2313c093..3d5d4823 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,12 +77,12 @@ dnl ==============================WebKit=======================================
 m4_define([webkit_default], [3.0])

 AC_ARG_WITH([webkit],
-            [AC_HELP_STRING([--with-webkit=@<:@3.0/1.0@:>@],
+            [AC_HELP_STRING([--with-webkit=@<:@4.0/3.0/1.0@:>@],
                             [Select the Webkit backend, default=3.0])],
 	    [],
             [with_webkit=webkit_default])

-dnl=== support both 1.0 and 3.0 (default 3.0) ==
+dnl=== support all 1.0, 3.0 and 4.0 (default 3.0) ==
 AS_CASE([$with_webkit],
 	[3.0], [
 		WEBKIT_PC=webkitgtk-3.0
@@ -90,6 +90,12 @@ AS_CASE([$with_webkit],
 		AC_CHECK_LIB(webkitgtk-3.0, JSContextGroupCreate,,
 	                AC_CHECK_LIB(javascriptcoregtk-3.0, JSContextGroupCreate,WEBKIT_PC=javascriptcoregtk-3.0))
 	],
+	[4.0], [
+		WEBKIT_PC=webkitgtk-4.0
+		SEED_GTK_VERSION=-gtk4
+		AC_CHECK_LIB(webkitgtk-4.0, JSContextGroupCreate,,
+	                AC_CHECK_LIB(javascriptcoregtk-4.0, JSContextGroupCreate,WEBKIT_PC=javascriptcoregtk-4.0))
+	],
 	[1.0], [
 		AC_CHECK_LIB(webkitgtk-1.0, JSContextGroupCreate,WEBKIT_PC=webkitgtk-1.0,
 	                AC_CHECK_LIB(javascriptcoregtk-1.0, JSContextGroupCreate,WEBKIT_PC=javascriptcoregtk-1.0,
--
GitLab


code:
The custom mutex definition in Seq24 clashes with the mutex defined in gtkmm.
This patch renames the custom definition.

See https://bugs.launchpad.net/seq24/+bug/1647614 for upstream bug report.

diff --git a/src/midibus.h b/src/midibus.h
index 2cdf8e8..1bb02bd 100644
--- a/src/midibus.h
+++ b/src/midibus.h
@@ -90,7 +90,7 @@ class midibus

     /* locking */
-    mutex m_mutex;
+    seq24mutex m_mutex;

     /* mutex */
     void lock();
@@ -208,7 +208,7 @@ class mastermidibus
     sequence *m_seq;

     /* locking */
-    mutex m_mutex;
+    seq24mutex m_mutex;

     /* mutex */
     void lock();
diff --git a/src/midibus_portmidi.h b/src/midibus_portmidi.h
index 0119e9c..8c6a27a 100644
--- a/src/midibus_portmidi.h
+++ b/src/midibus_portmidi.h
@@ -65,7 +65,7 @@ class midibus
     long m_lasttick;

     /* locking */
-    mutex m_mutex;
+    seq24mutex m_mutex;

     /* mutex */
     void lock();
@@ -164,7 +164,7 @@ class mastermidibus
     sequence *m_seq;

     /* locking */
-    mutex m_mutex;
+    seq24mutex m_mutex;

     /* mutex */
     void lock();
diff --git a/src/mutex.cpp b/src/mutex.cpp
index b3f23fd..914114f 100644
--- a/src/mutex.cpp
+++ b/src/mutex.cpp
@@ -20,23 +20,23 @@

 #include "mutex.h"

-const pthread_mutex_t mutex::recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+const pthread_mutex_t seq24mutex::recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
 const pthread_cond_t condition_var::cond  = PTHREAD_COND_INITIALIZER;

-mutex::mutex( )
+seq24mutex::seq24mutex( )
 {
     m_mutex_lock = recmutex;
 }

 void
-mutex::lock( )
+seq24mutex::lock( )
 {
     pthread_mutex_lock( &m_mutex_lock );
 }

 void
-mutex::unlock( )
+seq24mutex::unlock( )
 {
     pthread_mutex_unlock( &m_mutex_lock );
 }
diff --git a/src/mutex.h b/src/mutex.h
index 399f8a3..4f1b867 100644
--- a/src/mutex.h
+++ b/src/mutex.h
@@ -24,7 +24,7 @@

 #include <pthread.h>

-class mutex {
+class seq24mutex {

 private:

@@ -37,14 +37,14 @@ protected:

 public:

-    mutex();
+    seq24mutex();

     void lock();
     void unlock();

 };

-class condition_var : public mutex {
+class condition_var : public seq24mutex {

 private:

diff --git a/src/sequence.h b/src/sequence.h
index 2943946..9da8700 100644
--- a/src/sequence.h
+++ b/src/sequence.h
@@ -153,7 +153,7 @@ class sequence
     long m_rec_vol;

     /* locking */
-    mutex m_mutex;
+    seq24mutex m_mutex;

     /* used to idenfity which events are ours in the out queue */
     //unsigned char m_tag;


code:
Avoid including sys/prctl.h on the Hurd.

Upstream status: Not submitted.

--- shadow-4.8.1/libmisc/idmapping.c.orig	2020-03-07 16:32:05.000000000 -0500
+++ shadow-4.8.1/libmisc/idmapping.c	2020-03-07 16:32:27.000000000 -0500
@@ -36,8 +36,8 @@
 #include <stdio.h>
 #include "prototypes.h"
 #include "idmapping.h"
-#include <sys/prctl.h>
 #if HAVE_SYS_CAPABILITY_H
+#include <sys/prctl.h>
 #include <sys/capability.h>
 #endif


code:
Fix CVE-2018-1000097:

https://security-tracker.debian.org/tracker/CVE-2018-1000097
https://nvd.nist.gov/vuln/detail/CVE-2018-1000097

Patch taken from upstream bug report:
https://lists.gnu.org/archive/html/bug-gnu-utils/2018-02/msg00005.html

diff --git a/src/unshar.c b/src/unshar.c
index 80bc3a9..0fc3773 100644
--- a/src/unshar.c
+++ b/src/unshar.c
@@ -240,7 +240,7 @@ find_archive (char const * name, FILE * file, off_t start)
       off_t position = ftello (file);

       /* Read next line, fail if no more and no previous process.  */
-      if (!fgets (rw_buffer, BUFSIZ, file))
+      if (!fgets (rw_buffer, rw_base_size, file))
 	{
 	  if (!start)
 	    error (0, 0, _("Found no shell commands in %s"), name);


code:
Fix building of Shishi with libgcrypt 1.6 and later.

Patch copied from Debian:

https://anonscm.debian.org/cgit/collab-maint/shishi.git/tree/debian/patches/fix_gcrypt_detection.diff?id=948301ae648a542a408da250755aeed58a6e3542

Description: Fix autoconf gnutls detection to also accept gcrypt 1.6.
Author: Andreas Metzler <ametzler@debian.org>
Bug-Debian: http://bugs.debian.org/753150
Origin: vendor
Forwarded: no
Last-Update: 2014-07-18

--- shishi-1.0.2.orig/gl/m4/gc.m4
+++ shishi-1.0.2/gl/m4/gc.m4
@@ -12,10 +12,12 @@ AC_DEFUN([gl_GC],
   if test "$libgcrypt" != no; then
     AC_LIB_HAVE_LINKFLAGS([gcrypt], [gpg-error], [
 #include <gcrypt.h>
-/* GCRY_MODULE_ID_USER was added in 1.4.4 and gc-libgcrypt.c
-   will fail on startup if we don't have 1.4.4 or later, so
-   test for it early. */
-#if !defined GCRY_MODULE_ID_USER
+/* gc-libgcrypt.c will fail on startup if we don't have libgcrypt 1.4.4 or
+   later, test for it early. by checking for either
+   - GCRY_MODULE_ID_USER which was added in 1.4.4 and dropped in 1.6 or
+   - GCRYPT_VERSION_NUMBER which was added in 1.6.
+   */
+#if !defined GCRY_MODULE_ID_USER && !defined GCRYPT_VERSION_NUMBER
 error too old libgcrypt
 #endif
 ])


code:
Allow the configuration file and theme directory to be specified at run time.
Patch by Eelco Dolstra, from Nixpkgs.

--- slim-1.3.6/app.cpp	2013-10-02 00:38:05.000000000 +0200
+++ slim-1.3.6/app.cpp	2013-10-15 11:02:55.629263422 +0200
@@ -200,7 +200,9 @@

 	/* Read configuration and theme */
 	cfg = new Cfg;
-	cfg->readConf(CFGFILE);
+	char *cfgfile = getenv("SLIM_CFGFILE");
+	if (!cfgfile) cfgfile = CFGFILE;
+	cfg->readConf(cfgfile);
 	string themebase = "";
 	string themefile = "";
 	string themedir = "";
@@ -208,7 +210,9 @@
 	if (testing) {
 		themeName = testtheme;
 	} else {
-		themebase = string(THEMESDIR) + "/";
+		char *themesdir = getenv("SLIM_THEMESDIR");
+		if (!themesdir) themesdir = THEMESDIR;
+		themebase = string(themesdir) + "/";
 		themeName = cfg->getOption("current_theme");
 		string::size_type pos;
 		if ((pos = themeName.find(",")) != string::npos) {


code:
Add "display_name" configuration option and use its value instead of
the hard coded one.

Patch by Diego N. Barbato

--- a/app.cpp	1970-01-01 01:00:00.000000000 +0100
+++ b/app.cpp	2019-04-27 13:48:23.479133531 +0200
@@ -190,7 +190,13 @@
 }

 void App::Run() {
-	DisplayName = DISPLAY;
+	/* Read configuration */
+	cfg = new Cfg;
+	char *cfgfile = getenv("SLIM_CFGFILE");
+	if (!cfgfile) cfgfile = CFGFILE;
+	cfg->readConf(cfgfile);
+
+	DisplayName = cfg->getOption("display_name").c_str();

 #ifdef XNEST_DEBUG
 	char* p = getenv("DISPLAY");
@@ -200,11 +206,7 @@
 	}
 #endif

-	/* Read configuration and theme */
-	cfg = new Cfg;
-	char *cfgfile = getenv("SLIM_CFGFILE");
-	if (!cfgfile) cfgfile = CFGFILE;
-	cfg->readConf(cfgfile);
+	/* Read theme */
 	string themebase = "";
 	string themefile = "";
 	string themedir = "";
@@ -911,9 +913,7 @@
 	static const int MAX_XSERVER_ARGS = 256;
 	static char* server[MAX_XSERVER_ARGS+2] = { NULL };
 	server[0] = (char *)cfg->getOption("default_xserver").c_str();
-	string argOption = cfg->getOption("xserver_arguments");
-	/* Add mandatory -xauth option */
-	argOption = argOption + " -auth " + cfg->getOption("authfile");
+	string argOption = cfg->getOption("display_name") + " " + cfg->getOption("xserver_arguments") + " -auth " + cfg->getOption("authfile");
 	char* args = new char[argOption.length()+2]; /* NULL plus vt */
 	strcpy(args, argOption.c_str());

@@ -1233,7 +1233,7 @@
 	authfile = cfg->getOption("authfile");
 	remove(authfile.c_str());
 	putenv(StrConcat("XAUTHORITY=", authfile.c_str()));
-	Util::add_mcookie(mcookie, ":0", cfg->getOption("xauth_path"),
+	Util::add_mcookie(mcookie, cfg->getOption("display_name").c_str(), cfg->getOption("xauth_path"),
 	  authfile);
 }

--- a/cfg.cpp	1970-01-01 01:00:00.000000000 +0100
+++ b/cfg.cpp	2019-04-27 13:49:40.511773743 +0200
@@ -31,6 +31,7 @@
 	/* Configuration options */
 	options.insert(option("default_path","/bin:/usr/bin:/usr/local/bin"));
 	options.insert(option("default_xserver","/usr/bin/X"));
+	options.insert(option("display_name",":0.0"));
 	options.insert(option("xserver_arguments",""));
 	options.insert(option("numlock",""));
 	options.insert(option("daemon",""));
--- a/switchuser.cpp	1970-01-01 01:00:00.000000000 +0100
+++ b/switchuser.cpp	2019-04-27 13:50:19.380096651 +0200
@@ -54,6 +54,6 @@
 	string home = string(Pw->pw_dir);
 	string authfile = home + "/.Xauthority";
 	remove(authfile.c_str());
-	Util::add_mcookie(mcookie, ":0", cfg->getOption("xauth_path"),
+	Util::add_mcookie(mcookie, displayName.c_str(), cfg->getOption("xauth_path"),
 	  authfile);
 }


code:
Display configurable login message after successful authentication.

Patch by E. Bavier

--- slim-1.3.6/panel.cpp.orig	1969-12-31 18:00:00.000000000 -0600
+++ slim-1.3.6/panel.cpp	2016-10-17 17:00:07.259649063 -0500
@@ -260,6 +260,7 @@

 void Panel::ClosePanel() {
 	XUngrabKeyboard(Dpy, CurrentTime);
+	XClearWindow(Dpy, Root);
 	XUnmapWindow(Dpy, Win);
 	XDestroyWindow(Dpy, Win);
 	XFlush(Dpy);
--- slim-1.3.6/cfg.cpp.orig	2016-10-17 17:08:06.767666139 -0500
+++ slim-1.3.6/cfg.cpp	2016-10-17 17:06:53.115663516 -0500
@@ -52,6 +52,7 @@
 	options.insert(option("lockfile","/var/run/slim.lock"));
 	options.insert(option("logfile","/var/log/slim.log"));
 	options.insert(option("authfile","/var/run/slim.auth"));
+	options.insert(option("login_msg","Logging in..."));
 	options.insert(option("shutdown_msg","The system is halting..."));
 	options.insert(option("reboot_msg","The system is rebooting..."));
 	options.insert(option("sessiondir",""));
--- slim-1.3.6/app.cpp.orig	2016-10-17 17:08:41.731667384 -0500
+++ slim-1.3.6/app.cpp	2016-10-17 17:07:48.415665486 -0500
@@ -520,6 +520,8 @@
 	struct passwd *pw;
 	pid_t pid;

+	LoginPanel->Message((char*)cfg->getOption("login_msg").c_str());
+
 #ifdef USE_PAM
 	try{
 		pam.open_session();


code:
Do not reset chosen session and maintain the session-choser dialog after a
failed login attempt.

Patch by E. Bavier

--- slim-1.3.6/panel.cpp.orig	1969-12-31 18:00:00.000000000 -0600
+++ slim-1.3.6/panel.cpp	2016-10-17 17:00:07.259649063 -0500
@@ -260,13 +260,12 @@
 }

 void Panel::ClearPanel() {
-	session_name = "";
-    session_exec = "";
 	Reset();
 	XClearWindow(Dpy, Root);
 	XClearWindow(Dpy, Win);
 	Cursor(SHOW);
 	ShowText();
+	ShowSession();
 	XFlush(Dpy);
 }

@@ -760,9 +760,7 @@
         pair<string,string> ses = cfg->nextSession();
         session_name = ses.first;
         session_exec = ses.second;
-        if (session_name.size() > 0) {
-                ShowSession();
-        }
+        ShowSession();
  }

 /* Display session type on the screen */


code:
Exit after the user's session has finished.  This works around slim's broken
PAM session handling (see
http://developer.berlios.de/bugs/?func=detailbug&bug_id=19102&group_id=2663).

Patch by Eelco Dolstra, from Nixpkgs.

--- slim-1.3.6/app.cpp	2013-10-15 11:02:55.629263422 +0200
+++ slim-1.3.6/app.cpp	2013-10-15 13:00:10.141210784 +0200
@@ -816,7 +822,7 @@
 	StopServer();
 	RemoveLock();
 	while (waitpid(-1, NULL, WNOHANG) > 0); /* Collects all dead childrens */
-	Run();
+	exit(OK_EXIT);
 }

 void App::KillAllClients(Bool top) {


code:
This patch fixes SLiM so it really waits for the X server to be ready
before attempting to connect to it.  Indeed, the X server notices that
its parent process has a handler for SIGUSR1, and consequently sends it
SIGUSR1 when it's ready to accept connections.

The problem was that SLiM doesn't pay attention to SIGUSR1.  So in practice,
if X starts slowly, then SLiM gets ECONNREFUSED a couple of time on
/tmp/.X11-unix/X0, then goes on trying to connect to localhost:6000,
where nobody answers; eventually, it times out and tries again on
/tmp/.X11-unix/X0, and finally it shows up on the screen.

Patch by L. Courtès.

--- slim-1.3.6/app.cpp	2014-02-05 15:27:20.000000000 +0100
+++ slim-1.3.6/app.cpp	2014-02-09 22:42:04.000000000 +0100
@@ -119,7 +119,9 @@ void CatchSignal(int sig) {
 	exit(ERR_EXIT);
 }

+static volatile int got_sigusr1 = 0;
 void User1Signal(int sig) {
+	got_sigusr1 = 1;
 	signal(sig, User1Signal);
 }

@@ -884,6 +886,7 @@ int App::WaitForServer() {
 	int	ncycles	 = 120;
 	int	cycles;

+	while (!got_sigusr1);
 	for(cycles = 0; cycles < ncycles; cycles++) {
 		if((Dpy = XOpenDisplay(DisplayName))) {
 			XSetIOErrorHandler(xioerror);


code:
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Sun, 26 Aug 2018 17:24:42 +0200
Subject: [PATCH] snappy: Add O2 flag in CmakeLists.txt.

Use ‘-O2’ optimisation when building with CMake, as is already done when
using the Makefile. This patch was copied verbatim from the Snappy
mailing list[0].

[0]: <snappy-compression@googlegroups.com>

From 903c72fb29b2db07b4abc38a5feb83d88f739d80 Mon Sep 17 00:00:00 2001
From: huangwenjun <huangwenjun-hf@loongson.cn>
Date: Fri, 10 Aug 2018 17:17:35 +0800
Subject: [PATCH] Add O2 optimize flag in CmakeLists.txt.

---
 CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62ecd09..29e0cdc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,6 +6,9 @@ set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 set(CMAKE_CXX_EXTENSIONS OFF)

+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
+
 # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make
 # it prominent in the GUI.
 option(BUILD_SHARED_LIBS "Build shared libraries(DLLs)." OFF)
--
2.1.0


code:
https://github.com/cmusphinx/sphinxbase/commit/6989c52a3fb9473fd61326e548440fff887525c2

commit 6989c52a3fb9473fd61326e548440fff887525c2
Author: Michel Zou <xantares09@hotmail.com>
Date:   Thu Feb 6 07:02:06 2020 +0100

    Fix doxy2swig.py IndexError: list index out of range

diff --git a/doc/doxy2swig.py b/doc/doxy2swig.py
index 5589b0d..a01c4b1 100644
--- a/doc/doxy2swig.py
+++ b/doc/doxy2swig.py
@@ -299,7 +299,10 @@ class Doxy2SWIG:
             name = first['name'].firstChild.data

             for n in node.getElementsByTagName('param'):
-              arg_type = n.getElementsByTagName('type')[0]
+              elts = n.getElementsByTagName('type')
+              if len(elts) == 0:
+                  continue
+              arg_type = elts[0]
               ref = self.get_specific_nodes(arg_type, ('ref'))
               if 'ref' in ref:
                 type_name = ref['ref'].firstChild.data


code:
Adapted from Debian: https://sources.debian.org/patches/sqlite3/3.32.3-1/20-hurd-locking-style.patch
Upstream status: Not upstreamed.

This patch is needed to get offloading to work.

Sqlite can use simple file locking mode, but that does not work for the Hurd;
a second sqlite process fails with a "locking protocol" error.

See also: https://bugs.debian.org/529734.

diff -purN sqlite-autoconf-3310100/sqlite3.c sqlite-autoconf-3310100-/sqlite3.c
--- sqlite-autoconf-3310100/sqlite3.c	2020-01-27 21:25:19.000000000 +0100
+++ sqlite-autoconf-3310100-/sqlite3.c	2020-07-01 11:50:13.768333806 +0200
@@ -33189,7 +33189,7 @@ SQLITE_PRIVATE const char *sqlite3Opcode
 # include <sys/mman.h>
 #endif

-#if SQLITE_ENABLE_LOCKING_STYLE
+#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__)
 /* # include <sys/ioctl.h> */
 # include <sys/file.h>
 # include <sys/param.h>
@@ -35676,7 +35676,7 @@ static int dotlockClose(sqlite3_file *id
 **
 ** Omit this section if SQLITE_ENABLE_LOCKING_STYLE is turned off
 */
-#if SQLITE_ENABLE_LOCKING_STYLE
+#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__)

 /*
 ** Retry flock() calls that fail with EINTR
@@ -38586,7 +38586,7 @@ IOMETHODS(
   0                         /* xShmMap method */
 )

-#if SQLITE_ENABLE_LOCKING_STYLE
+#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__)
 IOMETHODS(
   flockIoFinder,            /* Finder function name */
   flockIoMethods,           /* sqlite3_io_methods object name */
@@ -41142,6 +41142,8 @@ SQLITE_API int sqlite3_os_init(void){
     UNIXVFS("unix",          autolockIoFinder ),
 #elif OS_VXWORKS
     UNIXVFS("unix",          vxworksIoFinder ),
+#elif defined(__GNU__)
+    UNIXVFS("unix",          flockIoFinder ),
 #else
     UNIXVFS("unix",          posixIoFinder ),
 #endif
@@ -41151,7 +41153,7 @@ SQLITE_API int sqlite3_os_init(void){
 #if OS_VXWORKS
     UNIXVFS("unix-namedsem", semIoFinder ),
 #endif
-#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS
+#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS || defined(__GNU__)
     UNIXVFS("unix-posix",    posixIoFinder ),
 #endif
 #if SQLITE_ENABLE_LOCKING_STYLE


code:
From bc56b10aea999284458dcc293b54cf65288e325d Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Fri, 24 Jan 2020 15:17:39 +0100
Subject: [PATCH] Fix build failure against samba 4.12.0rc1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The ndr_pull_get_switch() function was dropped, but it was just a wrapper
around the ndr_token_peek() function, so we can use this approach on both
old and new versions of libndr.

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>

Reviewed-by: Pavel Březina <pbrezina@redhat.com>
---
 src/providers/ad/ad_gpo_ndr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/providers/ad/ad_gpo_ndr.c b/src/providers/ad/ad_gpo_ndr.c
index d573033494..8f405aa62b 100644
--- a/src/providers/ad/ad_gpo_ndr.c
+++ b/src/providers/ad/ad_gpo_ndr.c
@@ -105,7 +105,7 @@ ndr_pull_security_ace_object_type(struct ndr_pull *ndr,
                                   union security_ace_object_type *r)
 {
     uint32_t level;
-    level = ndr_pull_get_switch_value(ndr, r);
+    level = ndr_token_peek(&ndr->switch_list, r);
     NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     if (ndr_flags & NDR_SCALARS) {
         NDR_CHECK(ndr_pull_union_align(ndr, 4));
@@ -135,7 +135,7 @@ ndr_pull_security_ace_object_inherited_type(struct ndr_pull *ndr,
                                             union security_ace_object_inherited_type *r)
 {
     uint32_t level;
-    level = ndr_pull_get_switch_value(ndr, r);
+    level = ndr_token_peek(&ndr->switch_list, r);
     NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     if (ndr_flags & NDR_SCALARS) {
         NDR_CHECK(ndr_pull_union_align(ndr, 4));
@@ -198,7 +198,7 @@ ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr,
                                  union security_ace_object_ctr *r)
 {
     uint32_t level;
-    level = ndr_pull_get_switch_value(ndr, r);
+    level = ndr_token_peek(&ndr->switch_list, r);
     NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     if (ndr_flags & NDR_SCALARS) {
         NDR_CHECK(ndr_pull_union_align(ndr, 4));


code:
Do not attempt to create $localstatedir and $sysconfdir (i.e., /var and /etc)
upon "make install".

diff --git a/Makefile.in b/Makefile.in
index c32cb7d..77a5c00 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -7991,7 +7991,7 @@ sssdconfdir = $(sysconfdir)/sssd
 sssddatadir = $(datadir)/sssd
 sssdapiplugindir = $(sssddatadir)/sssd.api.d
 sssdtapscriptdir = $(sssddatadir)/systemtap
-dbuspolicydir = $(sysconfdir)/dbus-1/system.d
+dbuspolicydir = $(prefix)/etc/dbus-1/system.d
 dbusservicedir = $(datadir)/dbus-1/system-services
 sss_statedir = $(localstatedir)/lib/sss
 pamlibdir = @pammoddir@
@@ -8000,7 +8000,7 @@ nfslibdir = @nfsidmaplibdir@
 keytabdir = $(sss_statedir)/keytabs
 pkgconfigdir = $(libdir)/pkgconfig
 sudolibdir = @sudolibpath@
-pamconfdir = $(sysconfdir)/pam.d
+pamconfdir = $(prefix)/etc/pam.d
 systemtap_tapdir = @tapset_dir@
 sssdkcmdatadir = $(datadir)/sssd-kcm
 deskprofilepath = $(sss_statedir)/deskprofile
@@ -43733,7 +43733,6 @@ installsssddirs::
     $(DESTDIR)$(bindir) \
     $(DESTDIR)$(sbindir) \
     $(DESTDIR)$(mandir) \
-    $(DESTDIR)$(pidpath) \
     $(DESTDIR)$(pluginpath) \
     $(DESTDIR)$(libdir)/ldb \
     $(DESTDIR)$(dbuspolicydir) \
@@ -43743,22 +43742,9 @@ installsssddirs::
     $(DESTDIR)$(sssddatadir) \
     $(DESTDIR)$(sudolibdir) \
     $(DESTDIR)$(autofslibdir) \
-    $(DESTDIR)$(pipepath)/private \
-    $(SSSD_USER_DIRS) \
     $(NULL);
 @SSSD_USER_TRUE@	-chown $(SSSD_USER):$(SSSD_USER) $(SSSD_USER_DIRS)
 @SSSD_USER_TRUE@	-chown $(SSSD_USER) $(DESTDIR)$(pipepath)/private
-	$(INSTALL) -d -m 0700 $(DESTDIR)$(dbpath) $(DESTDIR)$(logpath) \
-	    $(DESTDIR)$(keytabdir) \
-	    $(NULL)
-	$(INSTALL) -d -m 0750 $(DESTDIR)$(pipepath)/private
-	$(INSTALL) -d -m 0755 $(DESTDIR)$(mcpath) $(DESTDIR)$(pipepath) \
-            $(DESTDIR)$(pubconfpath) \
-            $(DESTDIR)$(pubconfpath)/krb5.include.d $(DESTDIR)$(gpocachepath)
-	$(INSTALL) -d -m 0711 $(DESTDIR)$(sssdconfdir) \
-                          $(DESTDIR)$(sssdconfdir)/conf.d \
-                          $(DESTDIR)$(sssdconfdir)/pki
-@BUILD_SECRETS_TRUE@	$(MKDIR_P) $(DESTDIR)$(secdbpath)

 @HAVE_DOXYGEN_TRUE@docs:
 @HAVE_DOXYGEN_TRUE@	$(DOXYGEN) src/doxy.config


code:
--- steghide-0.5.1/src/AuData.h
+++ steghide-0.5.1/src/AuData.h
@@ -26,22 +26,22 @@

 // AuMuLawAudioData
 typedef AudioDataImpl<AuMuLaw,BYTE> AuMuLawAudioData ;
-inline BYTE AuMuLawAudioData::readValue (BinaryIO* io) const { return (io->read8()) ; }
-inline void AuMuLawAudioData::writeValue (BinaryIO* io, BYTE v) const { io->write8(v) ; }
+template<> inline BYTE AuMuLawAudioData::readValue (BinaryIO* io) const { return (io->read8()) ; }
+template<> inline void AuMuLawAudioData::writeValue (BinaryIO* io, BYTE v) const { io->write8(v) ; }

 // AuPCM8AudioData
 typedef AudioDataImpl<AuPCM8,SBYTE> AuPCM8AudioData ;
-inline SBYTE AuPCM8AudioData::readValue (BinaryIO* io) const { return ((SBYTE) io->read8()) ; }
-inline void AuPCM8AudioData::writeValue (BinaryIO* io, SBYTE v) const { io->write8((BYTE) v) ; }
+template<> inline SBYTE AuPCM8AudioData::readValue (BinaryIO* io) const { return ((SBYTE) io->read8()) ; }
+template<> inline void AuPCM8AudioData::writeValue (BinaryIO* io, SBYTE v) const { io->write8((BYTE) v) ; }

 // AuPCM16AudioData
 typedef AudioDataImpl<AuPCM16,SWORD16> AuPCM16AudioData ;
-inline SWORD16 AuPCM16AudioData::readValue (BinaryIO* io) const { return ((SWORD16) io->read16_be()) ; }
-inline void AuPCM16AudioData::writeValue (BinaryIO* io, SWORD16 v) const { io->write16_be((UWORD16) v) ; }
+template<> inline SWORD16 AuPCM16AudioData::readValue (BinaryIO* io) const { return ((SWORD16) io->read16_be()) ; }
+template<> inline void AuPCM16AudioData::writeValue (BinaryIO* io, SWORD16 v) const { io->write16_be((UWORD16) v) ; }

 // AuPCM32AudioData
 typedef AudioDataImpl<AuPCM32,SWORD32> AuPCM32AudioData ;
-inline SWORD32 AuPCM32AudioData::readValue (BinaryIO* io) const { return ((SWORD32) io->read32_be()) ; }
-inline void AuPCM32AudioData::writeValue (BinaryIO* io, SWORD32 v) const { io->write32_be((UWORD32) v) ; }
+template<> inline SWORD32 AuPCM32AudioData::readValue (BinaryIO* io) const { return ((SWORD32) io->read32_be()) ; }
+template<> inline void AuPCM32AudioData::writeValue (BinaryIO* io, SWORD32 v) const { io->write32_be((UWORD32) v) ; }

 #endif // ndef SH_AUDATA_H
--- steghide-0.5.1/src/AuSampleValues.cc
+++ steghide-0.5.1/src/AuSampleValues.cc
@@ -21,17 +21,17 @@
 #include "AuSampleValues.h"

 // AuMuLawSampleValue
-const BYTE AuMuLawSampleValue::MinValue = 0 ;
-const BYTE AuMuLawSampleValue::MaxValue = BYTE_MAX ;
+template<> const BYTE AuMuLawSampleValue::MinValue = 0 ;
+template<> const BYTE AuMuLawSampleValue::MaxValue = BYTE_MAX ;

 // AuPCM8SampleValue
-const SBYTE AuPCM8SampleValue::MinValue = SBYTE_MIN ;
-const SBYTE AuPCM8SampleValue::MaxValue = SBYTE_MAX ;
+template<> const SBYTE AuPCM8SampleValue::MinValue = SBYTE_MIN ;
+template<> const SBYTE AuPCM8SampleValue::MaxValue = SBYTE_MAX ;

 // AuPCM16SampleValue
-const SWORD16 AuPCM16SampleValue::MinValue = SWORD16_MIN ;
-const SWORD16 AuPCM16SampleValue::MaxValue = SWORD16_MAX ;
+template<> const SWORD16 AuPCM16SampleValue::MinValue = SWORD16_MIN ;
+template<> const SWORD16 AuPCM16SampleValue::MaxValue = SWORD16_MAX ;

 // AuPCM32SampleValue
-const SWORD32 AuPCM32SampleValue::MinValue = SWORD32_MIN ;
-const SWORD32 AuPCM32SampleValue::MaxValue = SWORD32_MAX ;
+template<> const SWORD32 AuPCM32SampleValue::MinValue = SWORD32_MIN ;
+template<> const SWORD32 AuPCM32SampleValue::MaxValue = SWORD32_MAX ;
--- steghide-0.5.1/src/Graph.cc
+++ steghide-0.5.1/src/Graph.cc
@@ -18,6 +18,7 @@
  *
  */

+#include <climits>
 #include <ctime>
 #include <list>
 #include <map>


code:
https://github.com/streamlink/streamlink/commit/a3123346824ee7b9c461110f292ea6987ea9a78d.patch
This is taken from upstream, and can be removed at the next release

From c6f3994e177a42792238f2edd07ba9053c10abc9 Mon Sep 17 00:00:00 2001
From: back-to <backto@protonmail.ch>
Date: Sat, 21 Jul 2018 14:30:51 +0200
Subject: [PATCH] tests.localization: use en_CA instead of en_US for
 test_equivalent

**python-iso3166** got an update which breaks the Streamlink tests.
https://pypi.org/project/iso3166/#history

**python-iso3166** and **pycountry** have now a different `name` for _the United States of America_

> python-iso3166: United States of America
https://github.com/deactivated/python-iso3166/commit/e5f8b37f18b01fcb5fa0e8130d8296fc7a7b5a9f

> pycountry: United States
https://bitbucket.org/flyingcircus/pycountry/src/5aa4bb47e33798cb631a81521b7b5b18f7d6c919/src/pycountry/databases/iso3166-1.json?at=default&fileviewer=file-view-default#iso3166-1.json-1572:1578

https://www.iso.org/obp/ui/#iso:code:3166:US

---

use **en_CA** instead of **en_US** for backwards compatibility,
as changing the **US** name would fail with older versions of **python-iso3166** / **pycountry**
---
 tests/test_localization.py | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/tests/test_localization.py b/tests/test_localization.py
index 0b81ae591..90bb3ac31 100644
--- a/tests/test_localization.py
+++ b/tests/test_localization.py
@@ -32,11 +32,12 @@ def test_bad_language_code(self):
         self.assertRaises(LookupError, l10n.Localization, "enUS")

     def test_equivalent(self):
-        l = l10n.Localization("en_US")
+        l = l10n.Localization("en_CA")
         self.assertTrue(l.equivalent(language="eng"))
         self.assertTrue(l.equivalent(language="en"))
-        self.assertTrue(l.equivalent(language="en", country="US"))
-        self.assertTrue(l.equivalent(language="en", country="United States"))
+        self.assertTrue(l.equivalent(language="en", country="CA"))
+        self.assertTrue(l.equivalent(language="en", country="CAN"))
+        self.assertTrue(l.equivalent(language="en", country="Canada"))

     def test_equivalent_remap(self):
         l = l10n.Localization("fr_FR")
@@ -48,7 +49,7 @@ def test_not_equivalent(self):
         self.assertFalse(l.equivalent(language="eng"))
         self.assertFalse(l.equivalent(language="en"))
         self.assertFalse(l.equivalent(language="en", country="US"))
-        self.assertFalse(l.equivalent(language="en", country="United States"))
+        self.assertFalse(l.equivalent(language="en", country="Canada"))
         self.assertFalse(l.equivalent(language="en", country="ES"))
         self.assertFalse(l.equivalent(language="en", country="Spain"))

@@ -71,8 +72,8 @@ def test_get_country(self):
                          l10n.Localization.get_country("USA").alpha2)
         self.assertEqual("GB",
                          l10n.Localization.get_country("GB").alpha2)
-        self.assertEqual("United States",
-                         l10n.Localization.get_country("United States").name)
+        self.assertEqual("Canada",
+                         l10n.Localization.get_country("Canada").name)

     def test_get_country_miss(self):
         self.assertRaises(LookupError, l10n.Localization.get_country, "XE")


code:
Fix required by suitesparse to build Mongoose

The CMakeLists.txt of Mongoose assumes that SuiteSparse_config has been
installed into the suitesparse source directory, which is not the case
for us, as we are building suitesparse out-of-tree.

SuiteSparse_config can instead be found in the ${CMAKE_INSTALL_PREFIX}
directory.

diff --git a/Mongoose/CMakeLists.txt b/Mongoose/CMakeLists.txt
index 7e134ab..76fa9e2 100644
--- a/Mongoose/CMakeLists.txt
+++ b/Mongoose/CMakeLists.txt
@@ -148,10 +148,10 @@ set(CMAKE_CXX_STANDARD 11)
 #set(CMAKE_CXX_STANDARD_REQUIRED ON)

 # determine which SuiteSparse_config to use
-if (EXISTS ${PROJECT_SOURCE_DIR}/../SuiteSparse_config)
-    message(STATUS "External ../SuiteSparse_config" ${BoldBlue} " found" ${ColourReset} ".")
+if (EXISTS ${CMAKE_INSTALL_PREFIX})
+    message(STATUS "External SuiteSparse_config" ${BoldBlue} " found" ${ColourReset} ".")
     set ( SUITESPARSE_CONFIG_DIR ${PROJECT_SOURCE_DIR}/../SuiteSparse_config )
-    link_directories ( ${PROJECT_SOURCE_DIR}/../lib )
+    link_directories ( ${CMAKE_INSTALL_PREFIX}/lib )
     message ( STATUS "Note: ../SuiteSparse_config must be compiled before compiling Mongoose" )
     set ( SUITESPARSE_CONFIG_LIBRARY suitesparseconfig )
 else ()


code:
Create the CombBLAS::SpParMat with the MPI_Comm from the input 'gridinfo_t'.
This prevents a warning/error from CombBLAS about using MPI_COMM_WORLD.

--- a/SRC/AWPM_CombBLAS.hpp
+++ b/SRC/AWPM_CombBLAS.hpp
@@ -52,7 +52,7 @@
     {
         printf("AWPM only supports square process grid. Retuning without a permutation.\n");
     }
-    combblas::SpParMat < int_t, double, combblas::SpDCCols<int_t,double> > Adcsc;
+    combblas::SpParMat < int_t, double, combblas::SpDCCols<int_t,double> > Adcsc(grid->comm);
     std::vector< std::vector < std::tuple<int_t,int_t,double> > > data(procs);

     /* ------------------------------------------------------------
@@ -100,11 +100,10 @@
     combblas::AWPM(Adcsc, mateRow2Col, mateCol2Row,true);

     // now gather the matching vector
-    MPI_Comm World = mateRow2Col.getcommgrid()->GetWorld();
     int * rdispls = new int[procs];
     int sendcnt = mateRow2Col.LocArrSize();
     int * recvcnt = new int[procs];
-    MPI_Allgather(&sendcnt, 1, MPI_INT, recvcnt, 1, MPI_INT, World);
+    MPI_Allgather(&sendcnt, 1, MPI_INT, recvcnt, 1, MPI_INT, grid->comm);
     rdispls[0] = 0;
     for(int i=0; i<procs-1; ++i)
     {
@@ -112,7 +111,7 @@
     }
     int_t *senddata = (int_t *)mateRow2Col.GetLocArr();

-    MPI_Allgatherv(senddata, sendcnt, combblas::MPIType<int_t>(), ScalePermstruct->perm_r, recvcnt, rdispls, combblas::MPIType<int_t>(), World);
+    MPI_Allgatherv(senddata, sendcnt, combblas::MPIType<int_t>(), ScalePermstruct->perm_r, recvcnt, rdispls, combblas::MPIType<int_t>(), grid->comm);

     delete[] rdispls;
     delete[] recvcnt;


code:
The METIS interface from Scotch may segfault if passed NULL to indicate a
default parameter, so use the older calling style.

--- a/SRC/get_perm_c.c	2014-05-16 23:38:30.070835316 -0500
+++ b/SRC/get_perm_c.c	2014-05-16 23:39:04.582836211 -0500
@@ -70,11 +70,13 @@
 #else

     /* Earlier version 3.x.x */
-    /* METIS_NodeND(&nm, b_colptr, b_rowind, &numflag, metis_options,
-       perm, iperm);*/
+    METIS_NodeND(&nm, b_colptr, b_rowind, &numflag, metis_options,
+                 perm, iperm);

     /* Latest version 4.x.x */
+#if 0
     METIS_NodeND(&nm, b_colptr, b_rowind, NULL, NULL, perm, iperm);
+#endif

     /*check_perm_dist("metis perm",  n, perm);*/
 #endif


code:
diff -ur a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt	2019-05-24 17:58:19.693090158 -0400
+++ b/CMakeLists.txt	2019-05-24 17:57:43.349473252 -0400
@@ -375,44 +375,15 @@

 include(ConfigureChecks)

-
-## Also build external/squirrel
-
-if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/squirrel/CMakeLists.txt)
-  message(FATAL_ERROR "squirrel submodule is not checked out or ${CMAKE_CURRENT_SOURCE_DIR}/external/squirrel/CMakeLists.txt is missing")
-endif()
-
 set(SQUIRREL_PREFIX ${CMAKE_BINARY_DIR}/squirrel/ex)
-ExternalProject_Add(squirrel
-  SOURCE_DIR "${CMAKE_SOURCE_DIR}/external/squirrel/"
-  CMAKE_ARGS
-  -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-  -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-  -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-  -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-  -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-  -DCMAKE_INSTALL_PREFIX=${SQUIRREL_PREFIX}
-  -DINSTALL_INC_DIR=include)
-
-if(WIN32)
-  add_library(squirrel_lib SHARED IMPORTED)
-  set_target_properties(squirrel_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/bin/${CMAKE_SHARED_LIBRARY_PREFIX}squirrel${CMAKE_SHARED_LIBRARY_SUFFIX}")
-  set_target_properties(squirrel_lib PROPERTIES IMPORTED_IMPLIB "${SQUIRREL_PREFIX}/lib/squirrel${CMAKE_LINK_LIBRARY_SUFFIX}")
-  add_library(sqstdlib_lib SHARED IMPORTED)
-  set_target_properties(sqstdlib_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/bin/${CMAKE_SHARED_LIBRARY_PREFIX}sqstdlib${CMAKE_SHARED_LIBRARY_SUFFIX}")
-  set_target_properties(sqstdlib_lib PROPERTIES IMPORTED_IMPLIB "${SQUIRREL_PREFIX}/lib/sqstdlib${CMAKE_LINK_LIBRARY_SUFFIX}")
-
-  #For debug run purposes
-  configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mk/msvc/run_supertux.bat.in" "${PROJECT_BINARY_DIR}/run_supertux.bat")
-else()
-  add_library(squirrel_lib STATIC IMPORTED)
-  set_target_properties(squirrel_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}squirrel_static${CMAKE_STATIC_LIBRARY_SUFFIX}")
-  add_library(sqstdlib_lib STATIC IMPORTED)
-  set_target_properties(sqstdlib_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}sqstdlib_static${CMAKE_STATIC_LIBRARY_SUFFIX}")
-endif()

 include_directories(SYSTEM ${SQUIRREL_PREFIX}/include)

+add_library(squirrel_lib SHARED IMPORTED)
+set_target_properties(squirrel_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}squirrel${CMAKE_SHARED_LIBRARY_SUFFIX}")
+add_library(sqstdlib_lib SHARED IMPORTED)
+set_target_properties(sqstdlib_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}sqstdlib${CMAKE_SHARED_LIBRARY_SUFFIX}")
+
 ## Also build external/tinygettext

 if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/tinygettext/CMakeLists.txt)


code:
Borrowed from Debian.

--- swish-e-2.4.7/src/parser.c	2009-04-05 03:58:32.000000000 +0200
+++ swish-e-2.4.7/src/parser.c	2013-06-11 13:53:08.196559035 +0200
@@ -1760,7 +1760,7 @@
     va_start(args, msg);
     vsnprintf(str, 1000, msg, args );
     va_end(args);
-    xmlParserError(parse_data->ctxt, str);
+    xmlParserError(parse_data->ctxt, "%s", str);
 }

 static void warning(void *data, const char *msg, ...)
@@ -1772,7 +1772,7 @@
     va_start(args, msg);
     vsnprintf(str, 1000, msg, args );
     va_end(args);
-    xmlParserWarning(parse_data->ctxt, str);
+    xmlParserWarning(parse_data->ctxt, "%s", str);
 }

--- swish-e-2.4.7/src/result_output.c	2009-04-05 03:58:32.000000000 +0200
+++ swish-e-2.4.7/src/result_output.c	2013-06-11 13:53:38.593550825 +0200
@@ -752,7 +752,7 @@
             s = (char *) emalloc(MAXWORDLEN + 1);
             n = strftime(s, (size_t) MAXWORDLEN, fmt, localtime(&(pv->value.v_date)));
             if (n && f)
-                fprintf(f, s);
+                fprintf(f, "%s", s);
             efree(s);
         }
         break;


code:
From http://swish-e.org/archive/2015-09/13295.html

--- a/src/compress.c
+++ a/src/compress.c
@@ -995,7 +995,7 @@ void    remove_worddata_longs(unsigned char *worddata,int *sz_worddata)
             progerr("Internal error in remove_worddata_longs");

         /* dst may be smaller than src. So move the data */
-        memcpy(dst,src,data_len);
+        memmove(dst,src,data_len);

         /* Increase pointers */
         src += data_len;
--- a/src/headers.c
+++ a/src/headers.c
@@ -280,7 +280,7 @@ static SWISH_HEADER_VALUE fetch_single_header( IndexFILE *indexf, HEADER_MAP *he

         case SWISH_NUMBER:
         case SWISH_BOOL:
-            value.number = *(unsigned long *) data_pointer;
+            value.number = *(unsigned int *) data_pointer;

             /* $$$ Ugly hack alert! */
             /* correct for removed files */
--- a/src/swishspider
+++ a/src/swishspider
@@ -27,6 +27,7 @@ use LWP::UserAgent;
 use HTTP::Status;
 use HTML::Parser 3.00;
 use HTML::LinkExtor;
+use Encode;

     if (scalar(@ARGV) != 2) {
         print STDERR "Usage: $0 localpath url\n";
@@ -94,7 +95,7 @@ use HTML::LinkExtor;
     # Don't allow links above the base
     $URI::ABS_REMOTE_LEADING_DOTS = 1;

-    $p->parse( $$content_ref );
+    $p->parse( decode_utf8 $$content_ref );
     close( LINKS );

     exit;


code:
--- src/bruch.c	2007-12-06 11:30:00.000000000 -0500
+++ b/bruch.c	2013-10-22 08:37:43.000000000 -0400
@@ -975,14 +975,16 @@
     ggterg = ggt_i(S_B_UI(bruch),S_B_OI(bruch));

     if (ggterg == S_B_UI(bruch)) {
+        INT tmp = S_B_OI(bruch);
         freeself_bruch(bruch);
-        M_I_I(S_B_OI(bruch) / ggterg,bruch);
+        M_I_I(tmp / ggterg,bruch);
         goto ende;
         }

     if (-ggterg == S_B_UI(bruch)) {
+        INT tmp = S_B_OI(bruch);
         freeself_bruch(bruch);
-        M_I_I(- S_B_OI(bruch) / ggterg,bruch);
+        M_I_I(- tmp / ggterg,bruch);
         goto ende;
         }

@@ -1032,12 +1034,14 @@

     if (S_O_K(S_B_U(bruch)) == INTEGER)
         if (S_B_UI(bruch) == 1) {
+            INT tmp = S_B_OI(bruch);
             freeself_bruch(bruch);
-            M_I_I(S_B_OI(bruch),bruch);
+            M_I_I(tmp,bruch);
             goto ende; }
         else if (S_B_UI(bruch) == -1) {
+            INT tmp = S_B_OI(bruch);
             freeself_bruch(bruch);
-            M_I_I( - S_B_OI(bruch),bruch);
+            M_I_I( - tmp,bruch);
             goto ende; }
     if (NEGP(S_B_O(bruch)) && NEGP(S_B_U(bruch)))
         {


code:
diff -ru src/def.h c/def.h
--- src/def.h	2007-12-06 17:30:56.000000000 +0100
+++ c/def.h	2013-10-19 18:42:55.118745730 +0200
@@ -2,14 +2,9 @@
 /* INT should always be 4 byte */
 #ifndef DEF_H

-
-#ifdef __alpha
-typedef  int INT;
-typedef unsigned  int  UINT;
-#else /* __alpha */
-typedef long INT;
-typedef unsigned long UINT;
-#endif /* __alpha */
+#include <stdint.h>
+typedef int32_t INT;
+typedef uint32_t UINT;

 #include <stdio.h>
 #include <memory.h>
@@ -65,10 +60,13 @@

 /* definitionen fuer object.c */
-typedef INT OBJECTKIND;   /* 4 byte */
+/* NOTE: partition code assumes that there is no unused space in the
+ * object struct when an INT is stored. This requires both OBJECTKIND
+ * and OBJECTSELF to have a size equal to a machine word. */
+typedef intptr_t OBJECTKIND;

 typedef union {
-	INT ob_INT;
+	intptr_t ob_INT;
 	INT * ob_INTpointer;
 	char *ob_charpointer;
 	struct bruch *ob_bruch;