haskell/ghc: Updated for version 8.10.4.

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
Matteo Bernardini 2021-02-20 21:08:03 +01:00 committed by Robby Workman
parent ccb32c144a
commit 95db5616a1
4 changed files with 1040 additions and 813 deletions

View file

@ -1,48 +0,0 @@
From 4eebc8016f68719e1ccdf460754a97d1f4d6ef05 Mon Sep 17 00:00:00 2001
From: Ben Gamari <ben@smart-cactus.org>
Date: Thu, 20 Sep 2018 08:27:37 -0400
Subject: [PATCH] users-guide: Fix build with sphinx 1.8
It seems that both add_object_type and add_directive_to_domain both register a
directive. Previously sphinx didn't seem to mind this but as of Sphinx 1.8 it
crashes with an exception.
---
docs/users_guide/flags.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/docs/users_guide/flags.py b/docs/users_guide/flags.py
index a70f7fef1e0..284b5e06cc1 100644
--- a/docs/users_guide/flags.py
+++ b/docs/users_guide/flags.py
@@ -48,6 +48,8 @@
from docutils.parsers.rst import Directive, directives
from sphinx import addnodes
from sphinx.domains.std import GenericObject
+from sphinx.domains import ObjType
+from sphinx.roles import XRefRole
from sphinx.errors import SphinxError
from utils import build_table_from_list
@@ -599,14 +601,20 @@ def purge_flags(app, env, docname):
### Initialization
def setup(app):
+ # Yuck: We can't use app.add_object_type since we need to provide the
+ # Directive instance ourselves.
+ std_object_types = app.registry.domain_object_types.setdefault('std', {})
# Add ghc-flag directive, and override the class with our own
- app.add_object_type('ghc-flag', 'ghc-flag')
app.add_directive_to_domain('std', 'ghc-flag', Flag)
+ app.add_role_to_domain('std', 'ghc-flag', XRefRole())
+ std_object_types['ghc-flag'] = ObjType('ghc-flag', 'ghc-flag')
# Add extension directive, and override the class with our own
- app.add_object_type('extension', 'extension')
app.add_directive_to_domain('std', 'extension', LanguageExtension)
+ app.add_role_to_domain('std', 'extension', XRefRole())
+ std_object_types['extension'] = ObjType('ghc-flag', 'ghc-flag')
+
# NB: language-extension would be misinterpreted by sphinx, and produce
# lang="extensions" XML attributes

File diff suppressed because one or more lines are too long

View file

@ -24,8 +24,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=ghc
VERSION=${VERSION:-8.4.3}
BUILD=${BUILD:-2}
VERSION=${VERSION:-8.10.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -69,7 +69,7 @@ if [ "${BOOTSTRAP:-yes}" = "yes" ] ; then
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION-$TARARCH-deb8-linux.tar.xz
tar xvf $CWD/$PRGNAM-$VERSION-$TARARCH-deb9-linux.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@ -96,7 +96,7 @@ if [ "${BOOTSTRAP:-yes}" = "yes" ] ; then
mkdir -p $LIBTINFO_DIR
ln -s /lib$LIBDIRSUFFIX/libncurses.so.5 $LIBTINFO_DIR/libtinfo.so.5
LD_LIBRARY_PATH=$LIBTINFO_DIR \
make install
make -j1 install
sed -i -r -e "s|^exec |LD_LIBRARY_PATH=$LIBTINFO_DIR exec |" $BOOTSTRAPDIR/usr/bin/ghc{,-pkg}-$VERSION
BOOTSTRAPGHC=$BOOTSTRAPDIR/usr/bin/ghc
@ -115,11 +115,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Fix build with Sphinx
# https://phabricator.haskell.org/D5161
# https://github.com/ghc/ghc/commit/4eebc8016f68719e1ccdf460754a97d1f4d6ef05.patch
patch -p1 < $CWD/4eebc8016f68719e1ccdf460754a97d1f4d6ef05.patch
GHC=$BOOTSTRAPGHC \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@ -128,21 +124,23 @@ CXXFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--with-ghc=$BOOTSTRAPGHC
--docdir=/usr/doc/$PRGNAM-$VERSION
make
make install DESTDIR=$PKG
make -j1 install DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# If docs were not built and installed, let's install the prebuilt manpage
# (taken from ghc-8.4.3-x86_64-deb8-linux.tar.xz)
# (taken from the prebuilt tarball)
if [ ! -d $PKG/usr/man ]; then
install -D -m0644 $CWD/ghc.1 $PKG/usr/man/man1
fi
# Install the bash completion file too
install -D -m0644 utils/completion/ghc.bash $PKG/usr/share/bash-completion/completions/ghc
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done

View file

@ -1,14 +1,14 @@
PRGNAM="ghc"
VERSION="8.4.3"
VERSION="8.10.4"
HOMEPAGE="https://haskell.org/ghc/"
DOWNLOAD="https://downloads.haskell.org/~ghc/8.4.3/ghc-8.4.3-i386-deb8-linux.tar.xz \
https://downloads.haskell.org/~ghc/8.4.3/ghc-8.4.3-src.tar.xz"
MD5SUM="fcd2b5c34a3276146731dc34d0dc4694 \
5aebdda828eb544578b80132a1658315"
DOWNLOAD_x86_64="https://downloads.haskell.org/~ghc/8.4.3/ghc-8.4.3-x86_64-deb8-linux.tar.xz \
https://downloads.haskell.org/~ghc/8.4.3/ghc-8.4.3-src.tar.xz"
MD5SUM_x86_64="99b63b934ed9f9659ac4adc3b711a3c0 \
5aebdda828eb544578b80132a1658315"
DOWNLOAD="https://downloads.haskell.org/~ghc/8.10.4/ghc-8.10.4-i386-deb9-linux.tar.xz \
https://downloads.haskell.org/~ghc/8.10.4/ghc-8.10.4-src.tar.xz"
MD5SUM="7d55b957ea04db1eb214b92b52e1fa5c \
6262720694e38941ecb500c30a019342"
DOWNLOAD_x86_64="https://downloads.haskell.org/~ghc/8.10.4/ghc-8.10.4-x86_64-deb9-linux.tar.xz \
https://downloads.haskell.org/~ghc/8.10.4/ghc-8.10.4-src.tar.xz"
MD5SUM_x86_64="4379535901684abd010bf1eac6664d21 \
6262720694e38941ecb500c30a019342"
REQUIRES=""
MAINTAINER="David Spencer"
EMAIL="baildon.research@googlemail.com"