[arch-commits] Commit in haskell-ghc-api-compat/repos (3 files)
Felix Yan
felixonmars at gemini.archlinux.org
Tue Jan 11 01:56:04 UTC 2022
Date: Tuesday, January 11, 2022 @ 01:56:04
Author: felixonmars
Revision: 1100262
archrelease: copy trunk to community-staging-x86_64
Added:
haskell-ghc-api-compat/repos/community-staging-x86_64/
haskell-ghc-api-compat/repos/community-staging-x86_64/PKGBUILD
(from rev 1100261, haskell-ghc-api-compat/trunk/PKGBUILD)
haskell-ghc-api-compat/repos/community-staging-x86_64/ghc-api-compat-ways.patch
(from rev 1100261, haskell-ghc-api-compat/trunk/ghc-api-compat-ways.patch)
---------------------------+
PKGBUILD | 53 +++++++++++++++
ghc-api-compat-ways.patch | 153 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 206 insertions(+)
Copied: haskell-ghc-api-compat/repos/community-staging-x86_64/PKGBUILD (from rev 1100261, haskell-ghc-api-compat/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2022-01-11 01:56:04 UTC (rev 1100262)
@@ -0,0 +1,53 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=ghc-api-compat
+pkgname=haskell-ghc-api-compat
+pkgver=8.6.1
+_commit=9e8c1ec540bc0a68700e8541d44dca14913c5c9e
+pkgrel=6
+pkgdesc="GHC-API compatibility helpers"
+url="https://hackage.haskell.org/package/ghc-api-compat"
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-ghc')
+makedepends=('ghc' 'uusi')
+# https://gitlab.haskell.org/haskell/ghc-api-compat/-/issues/1
+#source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
+source=("https://gitlab.haskell.org/haskell/ghc-api-compat/-/archive/$_commit/ghc-api-compat-$_commit.tar.bz2"
+ # https://gitlab.haskell.org/haskell/ghc-api-compat/-/merge_requests/2.patch
+ $_hkgname-ways.patch)
+sha256sums=('c9ff586aca0ccd6ccffe333403d21c9b86ed6dbd6335830419c0875c7df891bc'
+ '66463c2aafb9e341c5bd3d15bc21b7794b25e3ae231bf4c809f78bf24fca3e8d')
+
+prepare() {
+ cd $_hkgname-$_commit
+ gen-setup
+ # sed -i 's/GHC.Platform.ARM64/GHC.Platform.AArch64/' $_hkgname.cabal
+ patch -p1 -i ../$_hkgname-ways.patch
+}
+
+build() {
+ cd $_hkgname-$_commit
+
+ runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+ --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \
+ --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
+ --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+ --ghc-option='-pie'
+
+ runhaskell Setup build $MAKEFLAGS
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd $_hkgname-$_commit
+
+ install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
+ install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
+ runhaskell Setup copy --destdir="$pkgdir"
+ install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+ rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+}
Copied: haskell-ghc-api-compat/repos/community-staging-x86_64/ghc-api-compat-ways.patch (from rev 1100261, haskell-ghc-api-compat/trunk/ghc-api-compat-ways.patch)
===================================================================
--- community-staging-x86_64/ghc-api-compat-ways.patch (rev 0)
+++ community-staging-x86_64/ghc-api-compat-ways.patch 2022-01-11 01:56:04 UTC (rev 1100262)
@@ -0,0 +1,153 @@
+From c40f91549af351a126cedda71d48a6b7e6ebe725 Mon Sep 17 00:00:00 2001
+From: Potato Hatsue <1793913507 at qq.com>
+Date: Wed, 23 Jun 2021 18:42:40 +0800
+Subject: [PATCH 1/3] Re-export some 'Way' related functions in DynFlags
+
+---
+ ghc-api-compat.cabal | 4 ++--
+ src/DynFlags.hs | 24 ++++++++++++++++++++++++
+ 2 files changed, 26 insertions(+), 2 deletions(-)
+ create mode 100644 src/DynFlags.hs
+
+diff --git a/ghc-api-compat.cabal b/ghc-api-compat.cabal
+index f24cd2a..d694c2b 100644
+--- a/ghc-api-compat.cabal
++++ b/ghc-api-compat.cabal
+@@ -120,7 +120,7 @@ library
+
+ if impl(ghc >= 9.0)
+ hs-source-dirs: src
+- exposed-modules: Outputable
++ exposed-modules: Outputable DynFlags
+ reexported-modules:
+ GHC.Rename.Bind as RnBinds
+ , GHC.Rename.Env as RnEnv
+@@ -347,7 +347,7 @@ library
+ , GHC.Driver.Main as HscMain
+ , GHC.Driver.Make as GhcMake
+ , GHC.Driver.Hooks as Hooks
+- , GHC.Driver.Session as DynFlags
++ -- , GHC.Driver.Session as DynFlags
+ , GHC.Driver.Phases as DriverPhases
+ , GHC.Driver.Pipeline as DriverPipeline
+ , GHC.Driver.Pipeline.Monad as PipelineMonad
+diff --git a/src/DynFlags.hs b/src/DynFlags.hs
+new file mode 100644
+index 0000000..16f1adf
+--- /dev/null
++++ b/src/DynFlags.hs
+@@ -0,0 +1,24 @@
++{-# LANGUAGE CPP #-}
++module DynFlags
++ ( module GHC.Driver.Session,
++ Way(..),
++ wayRTSOnly,
++ wayGeneralFlags,
++ wayUnsetGeneralFlags,
++ buildTag,
++ dynamicGhc,
++ )
++where
++
++import GHC.Driver.Session
++#if MIN_VERSION_GLASGOW_HASKELL(9,2,0,0)
++import GHC.Platform.Ways
++#else
++import GHC.Driver.Ways
++#endif
++
++buildTag :: DynFlags -> String
++buildTag = waysBuildTag . ways
++
++dynamicGhc :: Bool
++dynamicGhc = hostIsDynamic
+--
+GitLab
+
+
+From 129557992495996523e5a23086e7e86e91f40fd5 Mon Sep 17 00:00:00 2001
+From: Potato Hatsue <1793913507 at qq.com>
+Date: Wed, 30 Jun 2021 20:25:05 +0800
+Subject: [PATCH 2/3] interpWays
+
+---
+ src/DynFlags.hs | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/DynFlags.hs b/src/DynFlags.hs
+index 16f1adf..b6a810d 100644
+--- a/src/DynFlags.hs
++++ b/src/DynFlags.hs
+@@ -7,9 +7,12 @@ module DynFlags
+ wayUnsetGeneralFlags,
+ buildTag,
+ dynamicGhc,
++ hostFullWays,
++ interpWays,
+ )
+ where
+
++import Data.Foldable (toList)
+ import GHC.Driver.Session
+ #if MIN_VERSION_GLASGOW_HASKELL(9,2,0,0)
+ import GHC.Platform.Ways
+@@ -22,3 +25,7 @@ buildTag = waysBuildTag . ways
+
+ dynamicGhc :: Bool
+ dynamicGhc = hostIsDynamic
++
++interpWays :: [Way]
++interpWays = toList hostFullWays
++
+--
+GitLab
+
+
+From 06ed5af221b13fdcd4a71994503c40f587b91e96 Mon Sep 17 00:00:00 2001
+From: Potato Hatsue <1793913507 at qq.com>
+Date: Thu, 1 Jul 2021 21:18:02 +0800
+Subject: [PATCH 3/3] Correct the type of interpWays
+
+---
+ ghc-api-compat.cabal | 2 ++
+ src/DynFlags.hs | 7 +++----
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/ghc-api-compat.cabal b/ghc-api-compat.cabal
+index d694c2b..be92e24 100644
+--- a/ghc-api-compat.cabal
++++ b/ghc-api-compat.cabal
+@@ -121,6 +121,8 @@ library
+ if impl(ghc >= 9.0)
+ hs-source-dirs: src
+ exposed-modules: Outputable DynFlags
++ build-depends:
++ containers >= 0.6.0 && <= 0.6.5
+ reexported-modules:
+ GHC.Rename.Bind as RnBinds
+ , GHC.Rename.Env as RnEnv
+diff --git a/src/DynFlags.hs b/src/DynFlags.hs
+index b6a810d..cadb25b 100644
+--- a/src/DynFlags.hs
++++ b/src/DynFlags.hs
+@@ -12,7 +12,7 @@ module DynFlags
+ )
+ where
+
+-import Data.Foldable (toList)
++import Data.Set (Set)
+ import GHC.Driver.Session
+ #if MIN_VERSION_GLASGOW_HASKELL(9,2,0,0)
+ import GHC.Platform.Ways
+@@ -26,6 +26,5 @@ buildTag = waysBuildTag . ways
+ dynamicGhc :: Bool
+ dynamicGhc = hostIsDynamic
+
+-interpWays :: [Way]
+-interpWays = toList hostFullWays
+-
++interpWays :: Set Way
++interpWays = hostFullWays
+--
+GitLab
+
More information about the arch-commits
mailing list