diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-11-21 22:44:15 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-11-21 22:44:15 +0100 |
commit | b60d2bfff95c0859d7814c1fe9d0940c87edc2b4 (patch) | |
tree | 49d3339f93c9d9fad5c66609a1dc4964f2856f79 /gnu/packages/patches | |
parent | 0c6ab52243353e3417e5a9733bb089e4771cc86e (diff) | |
parent | a31b9dac1cbda07225fcdffe03d13d68c4eab981 (diff) | |
download | guix-b60d2bfff95c0859d7814c1fe9d0940c87edc2b4.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches')
16 files changed, 730 insertions, 105 deletions
diff --git a/gnu/packages/patches/elm-compiler-relax-glsl-bound.patch b/gnu/packages/patches/elm-compiler-relax-glsl-bound.patch deleted file mode 100644 index 3f8be810c2..0000000000 --- a/gnu/packages/patches/elm-compiler-relax-glsl-bound.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit 4c649a5a270aba15cc6a3913c3ad51a293047f40 -Author: Rémi Lefèvre <rlefevre@gmail.com> -Date: Mon Sep 3 19:18:54 2018 +0200 - - update language-glsl maximum version - -diff --git a/elm.cabal b/elm.cabal -index 48aa84f0..464fe9d5 100644 ---- a/elm.cabal -+++ b/elm.cabal -@@ -246,7 +246,7 @@ Executable elm - http-client >= 0.5 && < 0.6, - http-client-tls >= 0.3 && < 0.4, - http-types >= 0.9 && < 1.0, -- language-glsl >= 0.0.2 && < 0.3, -+ language-glsl >= 0.0.2 && < 0.4, - logict, - mtl >= 2.2.1 && < 3, - network >= 2.4 && < 2.7, diff --git a/gnu/packages/patches/ghc-diff-swap-cover-args.patch b/gnu/packages/patches/ghc-diff-swap-cover-args.patch new file mode 100644 index 0000000000..724416ff7a --- /dev/null +++ b/gnu/packages/patches/ghc-diff-swap-cover-args.patch @@ -0,0 +1,20 @@ +The QuickCheck library swapped the order of the arguments of the 'cover' +function in version 2.12. Version 0.3.4 of the Diff library still uses +the old argument order. Swapping the argument order makes Diff work +with newer versions of QuickCheck. + +See <https://github.com/commercialhaskell/stackage/issues/4289> for the +upstream bug report. + +diff -ruN a/test/Test.hs b/test/Test.hs +--- a/test/Test.hs 2016-04-23 01:21:45.000000000 -0400 ++++ b/test/Test.hs 2019-11-01 19:13:04.590770903 -0400 +@@ -134,7 +134,7 @@ + prop_ppDiffR (DiffInput le ri) = + let haskDiff=ppDiff $ getGroupedDiff le ri + utilDiff= unsafePerformIO (runDiff (unlines le) (unlines ri)) +- in cover (haskDiff == utilDiff) 90 "exact match" $ ++ in cover 90 (haskDiff == utilDiff) "exact match" $ + classify (haskDiff == utilDiff) "exact match" + (div ((length haskDiff)*100) (length utilDiff) < 110) -- less than 10% bigger + where diff --git a/gnu/packages/patches/ghc-haddock-api-fix-haddock.patch b/gnu/packages/patches/ghc-haddock-api-fix-haddock.patch new file mode 100644 index 0000000000..927cb5b366 --- /dev/null +++ b/gnu/packages/patches/ghc-haddock-api-fix-haddock.patch @@ -0,0 +1,54 @@ +This patch is taken from upstream. It fixes documentation generation. +The patch has been lightly adapted to apply to the release tarball, but +the commit message was left untouched, so it refers to some changes not +included in the patch. + +From 0d9a81e20238a6b72f9f5c005f1f7e9cf05f6fb9 Mon Sep 17 00:00:00 2001 +From: Alec Theriault <alec.theriault@gmail.com> +Date: Sat, 27 Oct 2018 10:05:04 -0700 +Subject: [PATCH] Fix documentation in `haddock-api` (#957) + +* Fix misplaced Haddocks in Haddock itself + +Haddock should be able to generate documentation for 'haddock-api' +again. + +* Make CI check that documentation can be built. + +* Add back a doc that is OK +--- + .travis.yml | 3 +++ + haddock-api/src/Haddock/Backends/LaTeX.hs | 10 +++++----- + 2 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/src/Haddock/Backends/LaTeX.hs b/src/Haddock/Backends/LaTeX.hs +index 4e0e6eba..613c6deb 100644 +--- a/src/Haddock/Backends/LaTeX.hs ++++ b/src/Haddock/Backends/LaTeX.hs +@@ -243,8 +243,8 @@ ppDocGroup lev doc = sec lev <> braces doc + + -- | Given a declaration, extract out the names being declared + declNames :: LHsDecl DocNameI +- -> ( LaTeX -- ^ to print before each name in an export list +- , [DocName] -- ^ names being declared ++ -> ( LaTeX -- to print before each name in an export list ++ , [DocName] -- names being declared + ) + declNames (L _ decl) = case decl of + TyClD _ d -> (empty, [tcdName d]) +@@ -444,9 +444,9 @@ ppLPatSig doc docnames ty unicode + -- arguments as needed. + ppTypeOrFunSig :: HsType DocNameI + -> DocForDecl DocName -- ^ documentation +- -> ( LaTeX -- ^ first-line (no-argument docs only) +- , LaTeX -- ^ first-line (argument docs only) +- , LaTeX -- ^ type prefix (argument docs only) ++ -> ( LaTeX -- first-line (no-argument docs only) ++ , LaTeX -- first-line (argument docs only) ++ , LaTeX -- type prefix (argument docs only) + ) + -> Bool -- ^ unicode + -> LaTeX +-- +2.23.0 + diff --git a/gnu/packages/patches/ghc-haddock-library-unbundle.patch b/gnu/packages/patches/ghc-haddock-library-unbundle.patch deleted file mode 100644 index 0e8b548956..0000000000 --- a/gnu/packages/patches/ghc-haddock-library-unbundle.patch +++ /dev/null @@ -1,86 +0,0 @@ -This patch (inspired by Debian) allows ghc-haddock-library to use our -ghc-attoparsec package instead of using a bundled version. - ---- a/haddock-library.cabal 2018-09-01 01:22:18.676855884 -0400 -+++ b/haddock-library.cabal 2018-09-01 01:25:10.501150260 -0400 -@@ -10,7 +10,6 @@ - itself, see the ‘haddock’ package. - license: BSD3 - license-files: LICENSE -- vendor/attoparsec-0.13.1.0/LICENSE - maintainer: Alex Biehl <alexbiehl@gmail.com>, Simon Hengel <sol@typeful.net>, Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> - homepage: http://www.haskell.org/haddock/ - bug-reports: https://github.com/haskell/haddock/issues -@@ -28,7 +27,6 @@ - , containers >= 0.4.2.1 && < 0.6 - , transformers >= 0.3.0 && < 0.6 - -- -- internal sub-lib - build-depends: attoparsec - - hs-source-dirs: src -@@ -49,42 +47,6 @@ - if impl(ghc >= 8.0) - ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances - --library attoparsec -- default-language: Haskell2010 -- -- build-depends: -- base >= 4.5 && < 4.12 -- , bytestring >= 0.9.2.1 && < 0.11 -- , deepseq >= 1.3 && < 1.5 -- -- hs-source-dirs: vendor/attoparsec-0.13.1.0 -- -- -- NB: haddock-library needs only small part of lib:attoparsec -- -- internally, so we only bundle that subset here -- exposed-modules: -- Data.Attoparsec.ByteString -- Data.Attoparsec.ByteString.Char8 -- Data.Attoparsec.Combinator -- -- other-modules: -- Data.Attoparsec -- Data.Attoparsec.ByteString.Buffer -- Data.Attoparsec.ByteString.FastSet -- Data.Attoparsec.ByteString.Internal -- Data.Attoparsec.Internal -- Data.Attoparsec.Internal.Fhthagn -- Data.Attoparsec.Internal.Types -- Data.Attoparsec.Number -- -- ghc-options: -funbox-strict-fields -Wall -fwarn-tabs -O2 -- -- ghc-options: -Wall -- if impl(ghc >= 8.0) -- ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances -- else -- build-depends: semigroups ^>= 0.18.3, fail ^>= 4.9.0.0 -- -- - test-suite spec - type: exitcode-stdio-1.0 - default-language: Haskell2010 -@@ -115,11 +77,10 @@ - , hspec ^>= 2.4.4 - , QuickCheck ^>= 2.11 - -- -- internal sub-lib - build-depends: attoparsec - - -- Versions for the dependencies below are transitively pinned by -- -- dependency on haddock-library:lib:attoparsec -+ -- dependency on attoparsec - build-depends: - base - , bytestring -@@ -146,7 +107,7 @@ - haddock-library - - -- Versions for the dependencies below are transitively pinned by -- -- dependency on haddock-library:lib:attoparsec -+ -- dependency on attoparsec - build-depends: - base - diff --git a/gnu/packages/patches/ghc-hpack-fix-tests.patch b/gnu/packages/patches/ghc-hpack-fix-tests.patch new file mode 100644 index 0000000000..19aa762174 --- /dev/null +++ b/gnu/packages/patches/ghc-hpack-fix-tests.patch @@ -0,0 +1,193 @@ +This patch is taken and adapted from upstream. It landed shortly after +the release of 0.31.2, and fixes eleven tests. The patch has been +lightly adapted to apply to the release tarball, but the commit message +was left untouched, so it refers to some changes not included in the +patch. + +From a8d9362d4b686074f698c04c20beea88587511a1 Mon Sep 17 00:00:00 2001 +From: quasicomputational <quasicomputational@gmail.com> +Date: Sat, 1 Jun 2019 15:11:31 +0100 +Subject: [PATCH] Make CI green (#345) + +* AppVeyor workaround for TMP issue + +https://github.com/commercialhaskell/stack/issues/3944 + +* Bump resolver to nightly-2018-12-12. + +This has the primary benefit of moving to GHC 8.6.3 and should fix +AppVeyor. + +* Add clock 0.8 as an extra-dep. + +* Adapt expected output to aeson 1.4.3.0. +--- + appveyor.yml | 3 +++ + hpack.cabal | 10 +++++----- + package.yaml | 2 +- + stack.yaml | 5 +++-- + test/Data/Aeson/Config/FromValueSpec.hs | 2 +- + test/Data/Aeson/Config/TypesSpec.hs | 2 +- + test/EndToEndSpec.hs | 8 ++++---- + test/Hpack/ConfigSpec.hs | 2 +- + test/Hpack/Syntax/DefaultsSpec.hs | 2 +- + test/Hpack/Syntax/DependenciesSpec.hs | 4 ++-- + 10 files changed, 22 insertions(+), 18 deletions(-) + +diff --git a/hpack.cabal b/hpack.cabal +index fedb9a8..4db3014 100644 +--- a/hpack.cabal ++++ b/hpack.cabal +@@ -1,10 +1,10 @@ + cabal-version: 1.12 + +--- This file has been generated from package.yaml by hpack version 0.31.0. ++-- This file has been generated from package.yaml by hpack version 0.31.2. + -- + -- see: https://github.com/sol/hpack + -- +--- hash: 3d060180293c32b8d0c25b710d0f419e96a6cc6ec3f95ac5e70bb77f44cbafc3 ++-- hash: bd5dd178c7e9f7f7a3456d79b592ea336c41ef43c9892354c001f06659e8b901 + + name: hpack + version: 0.31.2 +@@ -31,7 +31,7 @@ library + build-depends: + Cabal >=2.2 + , Glob >=0.9.0 +- , aeson >=1.2.1.0 ++ , aeson >=1.4.3.0 + , base >=4.9 && <5 + , bifunctors + , bytestring +@@ -87,7 +87,7 @@ executable hpack + build-depends: + Cabal >=2.2 + , Glob >=0.9.0 +- , aeson >=1.2.1.0 ++ , aeson >=1.4.3.0 + , base >=4.9 && <5 + , bifunctors + , bytestring +@@ -125,7 +125,7 @@ test-suite spec + , Glob >=0.9.0 + , HUnit >=1.6.0.0 + , QuickCheck +- , aeson >=1.2.1.0 ++ , aeson >=1.4.3.0 + , base >=4.9 && <5 + , bifunctors + , bytestring +diff --git a/test/Data/Aeson/Config/FromValueSpec.hs b/test/Data/Aeson/Config/FromValueSpec.hs +index 33de8b7..06b3eb9 100644 +--- a/test/Data/Aeson/Config/FromValueSpec.hs ++++ b/test/Data/Aeson/Config/FromValueSpec.hs +@@ -85,7 +85,7 @@ spec = do + [yaml| + name: "Joe" + age: "23" +- |] `shouldDecodeTo` left "Error while parsing $.age - expected Int, encountered String" ++ |] `shouldDecodeTo` left "Error while parsing $.age - parsing Int failed, expected Number, but encountered String" + + context "with (,)" $ do + it "captures unrecognized fields" $ do +diff --git a/test/Data/Aeson/Config/TypesSpec.hs b/test/Data/Aeson/Config/TypesSpec.hs +index c954534..472aa42 100644 +--- a/test/Data/Aeson/Config/TypesSpec.hs ++++ b/test/Data/Aeson/Config/TypesSpec.hs +@@ -13,7 +13,7 @@ spec = do + context "List" $ do + let + parseError :: String -> Result (List Int) +- parseError prefix = Left (prefix ++ " - expected Int, encountered String") ++ parseError prefix = Left (prefix ++ " - parsing Int failed, expected Number, but encountered String") + + context "when parsing single values" $ do + it "returns the value in a singleton list" $ do +diff --git a/test/EndToEndSpec.hs b/test/EndToEndSpec.hs +index 283c72c..46389ea 100644 +--- a/test/EndToEndSpec.hs ++++ b/test/EndToEndSpec.hs +@@ -285,7 +285,7 @@ spec = around_ (inTempDirectoryNamed "foo") $ do + path: defaults.yaml + ref: "2017" + library: {} +- |] `shouldFailWith` (file ++ ": Error while parsing $ - expected Object, encountered Array") ++ |] `shouldFailWith` (file ++ ": Error while parsing $ - expected Object, but encountered Array") + + it "warns on unknown fields" $ do + let file = joinPath ["defaults", "sol", "hpack-template", "2017", "defaults.yaml"] +@@ -340,7 +340,7 @@ spec = around_ (inTempDirectoryNamed "foo") $ do + it "rejects other values" $ do + [i| + version: {} +- |] `shouldFailWith` "package.yaml: Error while parsing $.version - expected Number or String, encountered Object" ++ |] `shouldFailWith` "package.yaml: Error while parsing $.version - expected Number or String, but encountered Object" + + describe "license" $ do + it "accepts cabal-style licenses" $ do +@@ -1363,14 +1363,14 @@ spec = around_ (inTempDirectoryNamed "foo") $ do + then: + dependencies: Win32 + else: null +- |] `shouldFailWith` "package.yaml: Error while parsing $.when.else - expected Object, encountered Null" ++ |] `shouldFailWith` "package.yaml: Error while parsing $.when.else - expected Object, but encountered Null" + + it "rejects invalid conditionals" $ do + [i| + dependencies: + - foo + - 23 +- |] `shouldFailWith` "package.yaml: Error while parsing $.dependencies[1] - expected Object or String, encountered Number" ++ |] `shouldFailWith` "package.yaml: Error while parsing $.dependencies[1] - expected Object or String, but encountered Number" + + it "warns on unknown fields" $ do + [i| +diff --git a/test/Hpack/ConfigSpec.hs b/test/Hpack/ConfigSpec.hs +index 9f4b279..69cbea1 100644 +--- a/test/Hpack/ConfigSpec.hs ++++ b/test/Hpack/ConfigSpec.hs +@@ -675,7 +675,7 @@ spec = do + it "rejects other values" $ do + [yaml| + 23 +- |] `shouldDecodeTo` (Left "Error while parsing $ - expected Boolean or String, encountered Number" :: Result Cond) ++ |] `shouldDecodeTo` (Left "Error while parsing $ - expected Boolean or String, but encountered Number" :: Result Cond) + + describe "formatOrList" $ do + it "formats a singleton list" $ do +diff --git a/test/Hpack/Syntax/DefaultsSpec.hs b/test/Hpack/Syntax/DefaultsSpec.hs +index 5875413..5438b7a 100644 +--- a/test/Hpack/Syntax/DefaultsSpec.hs ++++ b/test/Hpack/Syntax/DefaultsSpec.hs +@@ -151,4 +151,4 @@ spec = do + it "fails" $ do + [yaml| + 10 +- |] `shouldDecodeTo` left "Error while parsing $ - expected Object or String, encountered Number" ++ |] `shouldDecodeTo` left "Error while parsing $ - expected Object or String, but encountered Number" +diff --git a/test/Hpack/Syntax/DependenciesSpec.hs b/test/Hpack/Syntax/DependenciesSpec.hs +index 1a83732..d95044f 100644 +--- a/test/Hpack/Syntax/DependenciesSpec.hs ++++ b/test/Hpack/Syntax/DependenciesSpec.hs +@@ -125,7 +125,7 @@ spec = do + it "rejects invalid values" $ do + [yaml| + hpack: [] +- |] `shouldDecodeTo` left "Error while parsing $.hpack - expected Null, Object, Number, or String, encountered Array" ++ |] `shouldDecodeTo` left "Error while parsing $.hpack - expected Null, Object, Number, or String, but encountered Array" + + context "when the constraint is a Number" $ do + it "accepts 1" $ do +@@ -213,7 +213,7 @@ spec = do + [yaml| + foo: + version: {} +- |] `shouldDecodeTo` left "Error while parsing $.foo.version - expected Null, Number, or String, encountered Object" ++ |] `shouldDecodeTo` left "Error while parsing $.foo.version - expected Null, Number, or String, but encountered Object" + + it "accepts a string" $ do + [yaml| +-- +2.23.0 + diff --git a/gnu/packages/patches/ghc-microlens-aeson-fix-tests.patch b/gnu/packages/patches/ghc-microlens-aeson-fix-tests.patch new file mode 100644 index 0000000000..c1ef6a837c --- /dev/null +++ b/gnu/packages/patches/ghc-microlens-aeson-fix-tests.patch @@ -0,0 +1,27 @@ +This patch fixes the test suite to allow any order when listing the +members of a JSON object. Aeson (being true to the JSON specification) +does not specify an order for objects. In practice, the order depends +on your processor architecture. + +See <https://github.com/bos/aeson/issues/568> for a discussion resulting +in a similar patch fixing the Aeson tests. + +See <https://github.com/fosskers/microlens-aeson/issues/1> for the +upstream bug report. + +diff -ruN a/test/Test.hs b/test/Test.hs +--- a/test/Test.hs 2018-12-31 15:10:50.000000000 -0500 ++++ b/test/Test.hs 2019-11-08 01:34:07.419706831 -0500 +@@ -48,8 +48,10 @@ + , testCase "" $ ("{\"a\": {}, \"b\": null}" ^? key (T.pack "b") . _Object) @?= Nothing + , testCase "" $ ("{\"a\": 100, \"b\": 200}" ^? key (T.pack "a")) @?= Just (Number 100.0) + , testCase "" $ ("[1,2,3]" ^? key (T.pack "a")) @?= Nothing +- , testCase "" $ ("{\"a\": 4, \"b\": 7}" ^.. members) @?= [Number 4.0,Number 7.0] +- , testCase "" $ ("{\"a\": 4, \"b\": 7}" & members . _Number %~ (* 10)) @?= "{\"a\":40,\"b\":70}" ++ , testCase "" $ assertBool "" (let x = ("{\"a\": 4, \"b\": 7}" ^.. members) ++ in x == [Number 4.0,Number 7.0] || x == [Number 7.0,Number 4.0]) ++ , testCase "" $ assertBool "" (let x = ("{\"a\": 4, \"b\": 7}" & members . _Number %~ (* 10)) ++ in x == "{\"a\":40,\"b\":70}" || x == "{\"b\":70,\"a\":40}") + , testCase "" $ ("[1,2,3]" ^? nth 1) @?= Just (Number 2.0) + , testCase "" $ ("{\"a\": 100, \"b\": 200}" ^? nth 1) @?= Nothing + , testCase "" $ ("[1,2,3]" & nth 1 .~ Number 20) @?= "[1,20,3]" diff --git a/gnu/packages/patches/ghc-monad-par-fix-tests.patch b/gnu/packages/patches/ghc-monad-par-fix-tests.patch new file mode 100644 index 0000000000..d21a1e485c --- /dev/null +++ b/gnu/packages/patches/ghc-monad-par-fix-tests.patch @@ -0,0 +1,45 @@ +This patch is taken from upstream. It fixes a test to work with GHC 8.6. +The paths have been slightly altered to work with the release tarball. + +See <https://github.com/simonmar/monad-par/issues/66>. + +From e20f81c8060208e4fb038e8f0e0668b41d72a6fb Mon Sep 17 00:00:00 2001 +From: Clint Adams <clint@debian.org> +Date: Sat, 31 Aug 2019 14:12:34 -0400 +Subject: [PATCH] Use a case statement instead of pattern-matching in + case_test_diamond + +This avoids the need for a MonadFail instance. Closes #66 +--- + monad-par/tests/ParTests_shared.hs | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) + +diff --git a/tests/ParTests_shared.hs b/tests/ParTests_shared.hs +index 31f438d..b2de50c 100644 +--- a/tests/ParTests_shared.hs ++++ b/tests/ParTests_shared.hs +@@ -109,12 +109,15 @@ case_test_diamond :: Assertion + case_test_diamond = 9 @=? (m :: Int) + where + m = runPar $ do +- [a,b,c,d] <- sequence [new,new,new,new] +- fork $ do x <- get a; put b (x+1) +- fork $ do x <- get a; put c (x+2) +- fork $ do x <- get b; y <- get c; put d (x+y) +- fork $ do put a 3 +- get d ++ abcd <- sequence [new,new,new,new] ++ case abcd of ++ [a,b,c,d] -> do ++ fork $ do x <- get a; put b (x+1) ++ fork $ do x <- get a; put c (x+2) ++ fork $ do x <- get b; y <- get c; put d (x+y) ++ fork $ do put a 3 ++ get d ++ _ -> error "Oops" + + -- | Violate IVar single-assignment: + -- +-- +2.23.0 + diff --git a/gnu/packages/patches/ghc-pandoc-fix-html-tests.patch b/gnu/packages/patches/ghc-pandoc-fix-html-tests.patch new file mode 100644 index 0000000000..b624ff9e9e --- /dev/null +++ b/gnu/packages/patches/ghc-pandoc-fix-html-tests.patch @@ -0,0 +1,92 @@ +This patch is taken from upstream. It fixes two HTML tests that are broken +due to using a Skylighting version greater than or equal to 0.8.2. + +From 968d2046a3cb6db661673be580660ac402753c34 Mon Sep 17 00:00:00 2001 +From: John MacFarlane <jgm@berkeley.edu> +Date: Sun, 14 Jul 2019 10:48:14 -0700 +Subject: [PATCH] Update test for new skylighting. + +--- + test/lhs-test.html | 13 ++++++------- + test/lhs-test.html+lhs | 13 ++++++------- + 2 files changed, 12 insertions(+), 14 deletions(-) + +diff --git a/test/lhs-test.html b/test/lhs-test.html +index 6685555f4..446dd3d95 100644 +--- a/test/lhs-test.html ++++ b/test/lhs-test.html +@@ -12,19 +12,18 @@ + div.column{display: inline-block; vertical-align: top; width: 50%;} + </style> + <style> +-code.sourceCode > span { display: inline-block; line-height: 1.25; } ++pre > code.sourceCode { white-space: pre; position: relative; } ++pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } ++pre > code.sourceCode > span:empty { height: 1.2em; } + code.sourceCode > span { color: inherit; text-decoration: inherit; } +-code.sourceCode > span:empty { height: 1.2em; } +-.sourceCode { overflow: visible; } +-code.sourceCode { white-space: pre; position: relative; } + div.sourceCode { margin: 1em 0; } + pre.sourceCode { margin: 0; } + @media screen { + div.sourceCode { overflow: auto; } + } + @media print { +-code.sourceCode { white-space: pre-wrap; } +-code.sourceCode > span { text-indent: -5em; padding-left: 5em; } ++pre > code.sourceCode { white-space: pre-wrap; } ++pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } + } + pre.numberSource code + { counter-reset: source-line 0; } +@@ -44,7 +43,7 @@ pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-le + div.sourceCode + { } + @media screen { +-code.sourceCode > span > a:first-child::before { text-decoration: underline; } ++pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } + } + code span.al { color: #ff0000; font-weight: bold; } /* Alert */ + code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ +diff --git a/test/lhs-test.html+lhs b/test/lhs-test.html+lhs +index e57dfc105..a5cdb0245 100644 +--- a/test/lhs-test.html+lhs ++++ b/test/lhs-test.html+lhs +@@ -12,19 +12,18 @@ + div.column{display: inline-block; vertical-align: top; width: 50%;} + </style> + <style> +-code.sourceCode > span { display: inline-block; line-height: 1.25; } ++pre > code.sourceCode { white-space: pre; position: relative; } ++pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } ++pre > code.sourceCode > span:empty { height: 1.2em; } + code.sourceCode > span { color: inherit; text-decoration: inherit; } +-code.sourceCode > span:empty { height: 1.2em; } +-.sourceCode { overflow: visible; } +-code.sourceCode { white-space: pre; position: relative; } + div.sourceCode { margin: 1em 0; } + pre.sourceCode { margin: 0; } + @media screen { + div.sourceCode { overflow: auto; } + } + @media print { +-code.sourceCode { white-space: pre-wrap; } +-code.sourceCode > span { text-indent: -5em; padding-left: 5em; } ++pre > code.sourceCode { white-space: pre-wrap; } ++pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } + } + pre.numberSource code + { counter-reset: source-line 0; } +@@ -44,7 +43,7 @@ pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-le + div.sourceCode + { } + @media screen { +-code.sourceCode > span > a:first-child::before { text-decoration: underline; } ++pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } + } + code span.al { color: #ff0000; font-weight: bold; } /* Alert */ + code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ +-- +2.23.0 + diff --git a/gnu/packages/patches/ghc-pandoc-fix-latex-test.patch b/gnu/packages/patches/ghc-pandoc-fix-latex-test.patch new file mode 100644 index 0000000000..b38476882d --- /dev/null +++ b/gnu/packages/patches/ghc-pandoc-fix-latex-test.patch @@ -0,0 +1,31 @@ +This patch is taken from upstream. It fixes a LaTeX test that is broken due +to using a Skylighting version greater than or equal to 0.8.1.1. + +From 2cd1c7b30f200d18f1f1bdef1671369e1ad303ed Mon Sep 17 00:00:00 2001 +From: John MacFarlane <jgm@berkeley.edu> +Date: Thu, 13 Jun 2019 19:33:52 -0700 +Subject: [PATCH] Update test for skylighting 0.8.1.1. + +--- + test/lhs-test.latex | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/lhs-test.latex b/test/lhs-test.latex +index 0442db5ca..a456995a3 100644 +--- a/test/lhs-test.latex ++++ b/test/lhs-test.latex +@@ -94,9 +94,9 @@ return a single value: + + \begin{Shaded} + \begin{Highlighting}[] +-\OtherTok{unsplit ::}\NormalTok{ (}\DataTypeTok{Arrow}\NormalTok{ a) }\OtherTok{=>}\NormalTok{ (b }\OtherTok{->}\NormalTok{ c }\OtherTok{->}\NormalTok{ d) }\OtherTok{->}\NormalTok{ a (b, c) d} ++\OtherTok{unsplit ::}\NormalTok{ (}\DataTypeTok{Arrow}\NormalTok{ a) }\OtherTok{=>}\NormalTok{ (b }\OtherTok{{-}>}\NormalTok{ c }\OtherTok{{-}>}\NormalTok{ d) }\OtherTok{{-}>}\NormalTok{ a (b, c) d} + \NormalTok{unsplit }\OtherTok{=}\NormalTok{ arr }\OperatorTok{.} \FunctionTok{uncurry} +- \CommentTok{-- arr (\textbackslash{}op (x,y) -> x `op` y)} ++ \CommentTok{{-}{-} arr (\textbackslash{}op (x,y) {-}> x \textasciigrave{}op\textasciigrave{} y)} + \end{Highlighting} + \end{Shaded} + +-- +2.23.0 + diff --git a/gnu/packages/patches/hexchat-crash-exit.patch b/gnu/packages/patches/hexchat-crash-exit.patch new file mode 100644 index 0000000000..e67fef73e0 --- /dev/null +++ b/gnu/packages/patches/hexchat-crash-exit.patch @@ -0,0 +1,31 @@ +From d9c637ae8a1137d3ca512d2c560589903a4bd79d Mon Sep 17 00:00:00 2001 +From: Adam Williamson <awilliam@redhat.com> +Date: Tue, 30 Apr 2019 11:16:01 -0700 +Subject: [PATCH] Python plugin: Call EndInterpreter when deinit'ing the plugin + +This fixes https://github.com/hexchat/hexchat/issues/2237 , a +commonly-encountered bug when using Hexchat 2.14 on Python 3.7. +Thanks to @ncoghlan for the fix. + +Signed-off-by: Adam Williamson <awilliam@redhat.com> +--- + plugins/python/python.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/plugins/python/python.c b/plugins/python/python.c +index 4403474d..475756ba 100644 +--- a/plugins/python/python.c ++++ b/plugins/python/python.c +@@ -2806,6 +2806,9 @@ hexchat_plugin_deinit(void) + xchatout_buffer = NULL; + + if (interp_plugin) { ++ PyThreadState *tstate = ((PluginObject*)interp_plugin)->tstate; ++ PyThreadState_Swap(tstate); ++ Py_EndInterpreter(tstate); + Py_DECREF(interp_plugin); + interp_plugin = NULL; + } +-- +2.21.0 + diff --git a/gnu/packages/patches/minisat-friend-declaration.patch b/gnu/packages/patches/minisat-friend-declaration.patch new file mode 100644 index 0000000000..14a886ae2f --- /dev/null +++ b/gnu/packages/patches/minisat-friend-declaration.patch @@ -0,0 +1,25 @@ +See https://groups.google.com/forum/#!topic/minisat/FCocZsC8oMQ +This seems to only be a problem with newer versions of g++, and +upstream development seems to have stopped in 2013. + +diff -rupN minisat-2.2.0/core/SolverTypes.h minisat-2.2.0.patched/core/SolverTypes.h +--- a/minisat/core/SolverTypes.h 2010-07-10 17:07:36.000000000 +0100 ++++ b/minisat/core/SolverTypes.h 2014-03-29 11:57:49.000000000 +0000 +@@ -47,7 +47,7 @@ struct Lit { + int x; + + // Use this as a constructor: +- friend Lit mkLit(Var var, bool sign = false); ++ //friend Lit mkLit(Var var, bool sign = false); + + bool operator == (Lit p) const { return x == p.x; } + bool operator != (Lit p) const { return x != p.x; } +@@ -55,7 +55,7 @@ struct Lit { + }; + + +-inline Lit mkLit (Var var, bool sign) { Lit p; p.x = var + var + (int)sign; return p; } ++inline Lit mkLit (Var var, bool sign = false) { Lit p; p.x = var + var + (int)sign; return p; } + inline Lit operator ~(Lit p) { Lit q; q.x = p.x ^ 1; return q; } + inline Lit operator ^(Lit p, bool b) { Lit q; q.x = p.x ^ (unsigned int)b; return q; } + inline bool sign (Lit p) { return p.x & 1; } diff --git a/gnu/packages/patches/minisat-install.patch b/gnu/packages/patches/minisat-install.patch new file mode 100644 index 0000000000..23cde89bec --- /dev/null +++ b/gnu/packages/patches/minisat-install.patch @@ -0,0 +1,19 @@ +Avoid the default dynamic executable, which depends on minisat.so +Instead install the release version, which is statically linked. + +diff --git a/Makefile b/Makefile +index ceb9d77..7b91906 100644 +--- a/Makefile ++++ b/Makefile +@@ -191,9 +191,9 @@ install-lib: $(BUILD_DIR)/release/lib/$(MINISAT_SLIB) $(BUILD_DIR)/dynamic/lib/$ + ln -sf $(MINISAT_DLIB).$(SOMAJOR) $(DESTDIR)$(libdir)/$(MINISAT_DLIB) + $(INSTALL) -m 644 $(BUILD_DIR)/release/lib/$(MINISAT_SLIB) $(DESTDIR)$(libdir) + +-install-bin: $(BUILD_DIR)/dynamic/bin/$(MINISAT) ++install-bin: $(BUILD_DIR)/release/bin/$(MINISAT) + $(INSTALL) -d $(DESTDIR)$(bindir) +- $(INSTALL) -m 755 $(BUILD_DIR)/dynamic/bin/$(MINISAT) $(DESTDIR)$(bindir) ++ $(INSTALL) -m 755 $(BUILD_DIR)/release/bin/$(MINISAT) $(DESTDIR)$(bindir) + + clean: + rm -f $(foreach t, release debug profile dynamic, $(foreach o, $(SRCS:.cc=.o), $(BUILD_DIR)/$t/$o)) \ diff --git a/gnu/packages/patches/python-3.8-fix-tests.patch b/gnu/packages/patches/python-3.8-fix-tests.patch new file mode 100644 index 0000000000..4fbdd444c7 --- /dev/null +++ b/gnu/packages/patches/python-3.8-fix-tests.patch @@ -0,0 +1,42 @@ +diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py +index 1474624..887f8ee 100644 +--- a/Lib/test/_test_multiprocessing.py ++++ b/Lib/test/_test_multiprocessing.py +@@ -3801,6 +3801,7 @@ class _TestSharedMemory(BaseTestCase): + sms.close() + + @unittest.skipIf(os.name != "posix", "not feasible in non-posix platforms") ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_shared_memory_SharedMemoryServer_ignores_sigint(self): + # bpo-36368: protect SharedMemoryManager server process from + # KeyboardInterrupt signals. +diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py +index d41e94b..a1c15e7 100644 +--- a/Lib/test/test_signal.py ++++ b/Lib/test/test_signal.py +@@ -78,6 +78,7 @@ class PosixTests(unittest.TestCase): + self.assertLess(len(s), signal.NSIG) + + @unittest.skipUnless(sys.executable, "sys.executable required.") ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_keyboard_interrupt_exit_code(self): + """KeyboardInterrupt triggers exit via SIGINT.""" + process = subprocess.run( +@@ -128,6 +129,7 @@ class WindowsSignalTests(unittest.TestCase): + signal.signal(7, handler) + + @unittest.skipUnless(sys.executable, "sys.executable required.") ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_keyboard_interrupt_exit_code(self): + """KeyboardInterrupt triggers an exit using STATUS_CONTROL_C_EXIT.""" + # We don't test via os.kill(os.getpid(), signal.CTRL_C_EVENT) here +@@ -1245,6 +1247,7 @@ class StressTest(unittest.TestCase): + + class RaiseSignalTest(unittest.TestCase): + ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_sigint(self): + with self.assertRaises(KeyboardInterrupt): + signal.raise_signal(signal.SIGINT) +-- +2.23.0 diff --git a/gnu/packages/patches/python-3.8-search-paths.patch b/gnu/packages/patches/python-3.8-search-paths.patch new file mode 100644 index 0000000000..88f19850bf --- /dev/null +++ b/gnu/packages/patches/python-3.8-search-paths.patch @@ -0,0 +1,17 @@ +diff --git a/setup.py b/setup.py +index 20d7f35..5751083 100644 +--- a/setup.py ++++ b/setup.py +@@ -676,8 +676,8 @@ class PyBuildExt(build_ext): + # if a file is found in one of those directories, it can + # be assumed that no additional -I,-L directives are needed. + if not CROSS_COMPILING: +- self.lib_dirs = self.compiler.library_dirs + system_lib_dirs +- self.inc_dirs = self.compiler.include_dirs + system_include_dirs ++ self.lib_dirs = os.getenv('LIBRARY_PATH', '').split(os.pathsep) ++ self.inc_dirs = os.getenv('CPATH', '').split(os.pathsep) + else: + # Add the sysroot paths. 'sysroot' is a compiler option used to + # set the logical path of the standard system headers and +-- +2.23.0 diff --git a/gnu/packages/patches/tomb-fix-errors-on-open.patch b/gnu/packages/patches/tomb-fix-errors-on-open.patch new file mode 100644 index 0000000000..5f41c9ee8f --- /dev/null +++ b/gnu/packages/patches/tomb-fix-errors-on-open.patch @@ -0,0 +1,25 @@ +Description: Avoid error messages when opening a new tomb + Make sure control file exists and has user ownership before user writes to it. +Author: Sven Geuer <debmaint@g-e-u-e-r.de> +Bug: https://github.com/dyne/Tomb/issues/369 +Last-Update: 2019-11-04 +--- a/tomb ++++ b/tomb +@@ -2197,14 +2197,15 @@ + # {{{ Open + + _update_control_file() { +- # replaces a control file with new contents and gives it user ownership ++ # make sure a control file exists, gives it user ownership ++ # and replaces it with new contents + # stdin = contents + # $1 = path to control file + # $2 = contents + [[ "$2" = "" ]] && return 1 + _sudo touch "$1" +- print "$2" > "$1" + _sudo chown ${_UID}:${_GID} "$1" ++ print "$2" > "$1" + _verbose "updated control file $1 = $2" + } + diff --git a/gnu/packages/patches/ucx-tcp-iface-ioctl.patch b/gnu/packages/patches/ucx-tcp-iface-ioctl.patch new file mode 100644 index 0000000000..d5df7047bc --- /dev/null +++ b/gnu/packages/patches/ucx-tcp-iface-ioctl.patch @@ -0,0 +1,109 @@ +Since /sys is unavailable in build environments, the list of available +TCP network interfaces cannot be obtained via /sys/class/net. This patch +provides alternative code that uses the SIOCGIFCONF ioctl to get the +names of the available TCP network interfaces. + +diff --git a/src/uct/tcp/tcp_iface.c b/src/uct/tcp/tcp_iface.c +index 81ad459..10024a6 100644 +--- a/src/uct/tcp/tcp_iface.c ++++ b/src/uct/tcp/tcp_iface.c +@@ -12,6 +12,8 @@ + #include <sys/poll.h> + #include <netinet/tcp.h> + #include <dirent.h> ++#include <net/if.h> ++#include <sys/ioctl.h> + + static ucs_config_field_t uct_tcp_iface_config_table[] = { + {"", "MAX_SHORT=8k", NULL, +@@ -483,6 +485,70 @@ static UCS_CLASS_DEFINE_NEW_FUNC(uct_tcp_iface_t, uct_iface_t, uct_md_h, + uct_worker_h, const uct_iface_params_t*, + const uct_iface_config_t*); + ++/* Fetch information about available network devices through an ioctl. */ ++static ucs_status_t query_devices_ioctl(uct_md_h md, ++ uct_tl_resource_desc_t **resource_p, ++ unsigned *num_resources_p) ++{ ++ int sock, err, i; ++ uct_tl_resource_desc_t *resources, *tmp; ++ unsigned num_resources; ++ ucs_status_t status; ++ struct ifconf conf; ++ struct ifreq reqs[10]; ++ ++ conf.ifc_len = sizeof reqs; ++ conf.ifc_req = reqs; ++ ++ sock = socket(SOCK_STREAM, AF_INET, 0); ++ if (sock < 0) { ++ ucs_error("socket(2) failed: %m"); ++ status = UCS_ERR_IO_ERROR; ++ goto out; ++ } ++ ++ err = ioctl(sock, SIOCGIFCONF, &conf); ++ if (err < 0) { ++ ucs_error("SIOCGIFCONF ioctl failed: %m"); ++ status = UCS_ERR_IO_ERROR; ++ goto out; ++ } ++ ++ resources = NULL; ++ num_resources = 0; ++ for (i = 0; i < conf.ifc_len / sizeof(struct ifreq); i++) { ++ const char *name = reqs[i].ifr_name; ++ ++ if (!ucs_netif_is_active(name)) { ++ continue; ++ } ++ ++ tmp = ucs_realloc(resources, sizeof(*resources) * (num_resources + 1), ++ "tcp resources"); ++ if (tmp == NULL) { ++ ucs_free(resources); ++ status = UCS_ERR_NO_MEMORY; ++ goto out; ++ } ++ resources = tmp; ++ ++ ucs_snprintf_zero(resources[i].tl_name, sizeof(resources[i].tl_name), ++ "%s", UCT_TCP_NAME); ++ ucs_snprintf_zero(resources[i].dev_name, sizeof(resources[i].dev_name), ++ "%s", name); ++ resources[i].dev_type = UCT_DEVICE_TYPE_NET; ++ ++num_resources; ++ } ++ ++ *num_resources_p = num_resources; ++ *resource_p = resources; ++ status = UCS_OK; ++ ++out: ++ if (sock >= 0) close(sock); ++ return status; ++} ++ + static ucs_status_t uct_tcp_query_tl_resources(uct_md_h md, + uct_tl_resource_desc_t **resource_p, + unsigned *num_resources_p) +@@ -496,9 +562,9 @@ static ucs_status_t uct_tcp_query_tl_resources(uct_md_h md, + + dir = opendir(netdev_dir); + if (dir == NULL) { +- ucs_error("opendir(%s) failed: %m", netdev_dir); +- status = UCS_ERR_IO_ERROR; +- goto out; ++ /* When /sys is unavailable, as can be the case in a container, ++ * resort to a good old 'ioctl'. */ ++ return query_devices_ioctl(md, resource_p, num_resources_p); + } + + resources = NULL; +@@ -543,6 +609,5 @@ static ucs_status_t uct_tcp_query_tl_resources(uct_md_h md, + + out_closedir: + closedir(dir); +-out: + return status; + } |