Date: Friday, January 6, 2023 @ 00:12:41
Author: felixonmars
Revision: 1378424
upgpkg: ghc 9.0.2-2: use llvm14 and fix building with sphinx 6
Modified:
ghc/trunk/PKGBUILD
----------+
PKGBUILD | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2023-01-05 23:51:13 UTC (rev 1378423)
+++ PKGBUILD 2023-01-06 00:12:41 UTC (rev 1378424)
@@ -12,17 +12,19 @@
pkgbase=ghc
pkgname=(ghc-libs ghc ghc-static)
pkgver=9.0.2
-pkgrel=1
+pkgrel=2
pkgdesc='The Glasgow Haskell Compiler'
arch=('x86_64')
url='https://www.haskell.org/ghc/'
license=('custom')
makedepends=('ghc-static' 'perl' 'libxslt' 'docbook-xsl' 'python-sphinx'
'haskell-hscolour'
- 'texlive-bin' 'texlive-latexextra' 'ttf-dejavu' 'alex' 'happy'
'time' 'numactl' 'llvm')
+ 'texlive-bin' 'texlive-latexextra' 'ttf-dejavu' 'alex' 'happy'
'time' 'numactl' 'llvm14')
source=("https://downloads.haskell.org/~ghc/$pkgver/$pkgbase-${pkgver}-src.tar.xz"
+
ghc-sphinx-6.patch::https://gitlab.haskell.org/ghc/ghc/-/commit/00dc51060881df81258ba3b3bdf447294618a4de.patch
ghc-rebuild-doc-index.hook ghc-register.hook ghc-unregister.hook)
noextract=("$pkgbase-${pkgver}-src.tar.xz")
sha512sums=('32994c7d2b8f47bae604cd825bfcf9c788d79ce26d1d5f58bd73a7093e11ae6c3c17b31dc0c9e454dbf67ca169b942f92213c388d615768cae86055bf6094dee'
+
'7a79a5e9591b1ddd78fa349526a85cf9fee64db80639dcf1f3d6edef422fd4454222aedf5581e21489a20d748656265a40e7645004e4d5220280f6214c568e64'
'd69e5222d1169c4224a2b69a13e57fdd574cb1b5932b15f4bc6c7d269a9658dd87acb1be81f52fbcf3cb64f96978b9943d10cee2c21bff0565aaa93a5d35fcae'
'5f659651d8e562a4dcaae0f821d272d6e9c648b645b1d6ab1af61e4dd690dc5a4b9c6846753b7f935963f001bb1ae1f40cd77731b71ef5a8dbc079a360aa3f8f'
'3bdbd05c4a2c4fce4adf6802ff99b1088bdfad63da9ebfc470af9e271c3dd796f86fba1cf319d8f4078054d85c6d9e6a01f79994559f24cc77ee1a25724af2e6')
@@ -34,9 +36,15 @@
LANG=en_US.UTF-8 bsdtar xf $pkgbase-${pkgver}-src.tar.xz
cd ghc-$pkgver
- # Suppress warnings for LLVM 13
- sed -i 's/LlvmMaxVersion=13/LlvmMaxVersion=14/' configure.ac
+ patch -p1 -i ../ghc-sphinx-6.patch
+ # Suppress warnings for newer LLVM. LlvmMaxVersion is non-inclusive and
currently GHC
+ # doesn't work with LLVM 15:
https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8999
+ sed -i 's/LlvmMaxVersion=13/LlvmMaxVersion=15/' configure.ac
+
+ # Temporary hack to use LLVM 14 for bootstrapping during LLVM 15 rebuild.
+ export PATH="/usr/lib/llvm14/bin/:$PATH"
+
cp mk/build.mk{.sample,}
sed -i '1iBuildFlavour = perf-llvm' mk/build.mk
@@ -73,7 +81,7 @@
package_ghc() {
pkgdesc='The Glasgow Haskell Compiler'
- depends=('gcc' 'ghc-libs' 'llvm')
+ depends=('gcc' 'ghc-libs' 'llvm14')
provides=('haskell-haddock=2.25.1'
'haskell-hp2ps=0.1'
'haskell-hpc-bin=0.68'