summaryrefslogtreecommitdiff
path: root/dev-lang/ghc/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-09 15:43:36 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-09 15:43:36 +0100
commit2719f73b6813d11d13a9650cdd2ab8ec6e69385d (patch)
tree8c816148bcbd22757d892089c989ae614eae4f5a /dev-lang/ghc/files
parent0f558761aa2dee1017b4751e4017205e015a9560 (diff)
gentoo resync : 09.07.2022
Diffstat (limited to 'dev-lang/ghc/files')
-rw-r--r--dev-lang/ghc/files/ghc-9.0.2-CHOST-prefix.patch17
-rw-r--r--dev-lang/ghc/files/ghc-9.0.2-darwin.patch31
-rw-r--r--dev-lang/ghc/files/ghc-9.0.2-fix-tests-python310.patch33
-rw-r--r--dev-lang/ghc/files/ghc-9.0.2-modorigin.patch24
-rw-r--r--dev-lang/ghc/files/ghc-9.0.2-verbose-modunusable.patch12
5 files changed, 117 insertions, 0 deletions
diff --git a/dev-lang/ghc/files/ghc-9.0.2-CHOST-prefix.patch b/dev-lang/ghc/files/ghc-9.0.2-CHOST-prefix.patch
new file mode 100644
index 000000000000..204eb3ef7dcd
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-9.0.2-CHOST-prefix.patch
@@ -0,0 +1,17 @@
+Strip versioning components from *HOST for Darwin and Solaris
+
+--- a/m4/fptools.m4
++++ b/m4/fptools.m4
+@@ -1358,6 +1358,12 @@
+ freebsd*)
+ $2="freebsd"
+ ;;
++ darwin*)
++ $2="darwin"
++ ;;
++ solaris2.*)
++ $2="solaris2"
++ ;;
+ *)
+ echo "Unknown OS $1"
+ exit 1
diff --git a/dev-lang/ghc/files/ghc-9.0.2-darwin.patch b/dev-lang/ghc/files/ghc-9.0.2-darwin.patch
new file mode 100644
index 000000000000..c3d8109e6ccc
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-9.0.2-darwin.patch
@@ -0,0 +1,31 @@
+From d39a3409acd3c40fb018ec1c114f15d3ecef6ef9 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Thu, 1 Jun 2017 22:30:05 +0100
+Subject: [PATCH] aclocal.m4: add support for versioned darwin triplets
+
+The change adds support for 'darwin*' OS:
+ $ ./configure --target=aarch64-apple-darwin14
+
+Reported-by: jp_rider
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ aclocal.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 7ad9c36453..437974a0c7 100644
+--- a/m4/fptools.m4
++++ b/m4/fptools.m4
+@@ -1906,6 +1906,9 @@ AC_DEFUN([GHC_CONVERT_OS],[
+ aix*) # e.g. powerpc-ibm-aix7.1.3.0
+ $3="aix"
+ ;;
++ darwin*) # e.g. aarch64-apple-darwin14
++ $3="darwin"
++ ;;
+ freebsd*) # like i686-gentoo-freebsd7
+ # i686-gentoo-freebsd8
+ # i686-gentoo-freebsd8.2
+--
+2.14.1
+
diff --git a/dev-lang/ghc/files/ghc-9.0.2-fix-tests-python310.patch b/dev-lang/ghc/files/ghc-9.0.2-fix-tests-python310.patch
new file mode 100644
index 000000000000..c59cfcbfc4a2
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-9.0.2-fix-tests-python310.patch
@@ -0,0 +1,33 @@
+From 81a8f7a7daeb87db53d598ced4b303f8f320442f Mon Sep 17 00:00:00 2001
+From: Zubin Duggal <zubin.duggal@gmail.com>
+Date: Wed, 12 Jan 2022 23:01:40 +0530
+Subject: [PATCH] testsuite: Fix import on python 3.10
+
+---
+ testsuite/driver/testlib.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
+index fb2a7010f59..6b6462f527b 100644
+--- a/testsuite/driver/testlib.py
++++ b/testsuite/driver/testlib.py
+@@ -16,6 +16,7 @@ import sys
+ from math import ceil, trunc, floor, log
+ from pathlib import Path, PurePath
+ import collections
++import collections.abc
+ import subprocess
+
+ from testglobals import config, ghc_env, default_testopts, brokens, t, \
+@@ -907,7 +908,7 @@ def join_normalisers(*a):
+ Taken from http://stackoverflow.com/a/2158532/946226
+ """
+ for el in l:
+- if (isinstance(el, collections.Iterable)
++ if (isinstance(el, collections.abc.Iterable)
+ and not isinstance(el, (bytes, str))):
+ for sub in flatten(el):
+ yield sub
+--
+GitLab
+
diff --git a/dev-lang/ghc/files/ghc-9.0.2-modorigin.patch b/dev-lang/ghc/files/ghc-9.0.2-modorigin.patch
new file mode 100644
index 000000000000..3c7053778e98
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-9.0.2-modorigin.patch
@@ -0,0 +1,24 @@
+diff --git a/compiler/GHC/Unit/State.hs b/compiler/GHC/Unit/State.hs
+index cefa5e5058bf68e68aaafadad0c7874189bf8225..92b38443c8378eb69db19a40d23abca47d6acee8 100644
+--- a/compiler/GHC/Unit/State.hs
++++ b/compiler/GHC/Unit/State.hs
+@@ -224,14 +224,16 @@ fromFlag :: ModuleOrigin
+ fromFlag = ModOrigin Nothing [] [] True
+
+ instance Semigroup ModuleOrigin where
+- ModOrigin e res rhs f <> ModOrigin e' res' rhs' f' =
++ x@(ModOrigin e res rhs f) <> y@(ModOrigin e' res' rhs' f') =
+ ModOrigin (g e e') (res ++ res') (rhs ++ rhs') (f || f')
+ where g (Just b) (Just b')
+ | b == b' = Just b
+- | otherwise = panic "ModOrigin: package both exposed/hidden"
++ | otherwise = pprPanic "ModOrigin: package both exposed/hidden" $
++ text "x: " <> ppr x $$ text "y: " <> ppr y
+ g Nothing x = x
+ g x Nothing = x
+- _x <> _y = panic "ModOrigin: hidden module redefined"
++ x <> y = pprPanic "ModOrigin: hidden module redefined" $
++ text "x: " <> ppr x $$ text "y: " <> ppr y
+
+ instance Monoid ModuleOrigin where
+ mempty = ModOrigin Nothing [] [] False
diff --git a/dev-lang/ghc/files/ghc-9.0.2-verbose-modunusable.patch b/dev-lang/ghc/files/ghc-9.0.2-verbose-modunusable.patch
new file mode 100644
index 000000000000..13d12efdc0ec
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-9.0.2-verbose-modunusable.patch
@@ -0,0 +1,12 @@
+diff -urN ghc-9.0.2/compiler/GHC/Unit/State.hs ghc-9.0.2-r1/compiler/GHC/Unit/State.hs
+--- ghc-9.0.2/compiler/GHC/Unit/State.hs 2021-10-19 05:20:00.000000000 -0600
++++ ghc-9.0.2-r1/compiler/GHC/Unit/State.hs 2022-02-17 01:04:05.117930250 -0700
+@@ -194,7 +194,7 @@
+
+ instance Outputable ModuleOrigin where
+ ppr ModHidden = text "hidden module"
+- ppr (ModUnusable _) = text "unusable module"
++ ppr (ModUnusable reason) = text "unusable module" $$ ppr reason
+ ppr (ModOrigin e res rhs f) = sep (punctuate comma (
+ (case e of
+ Nothing -> []