Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed2a655f3b | ||
|
|
c99f36cd7b | ||
|
|
773d870807 | ||
|
|
416302fefa | ||
|
|
649e766bae |
4 changed files with 51 additions and 8 deletions
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
Name: haskell-platform
|
||||
Version: 2022.1
|
||||
Release: 20%{?dist}
|
||||
Release: 22%{?dist}
|
||||
Summary: Standard Haskell distribution
|
||||
|
||||
License: BSD
|
||||
|
|
@ -48,6 +48,10 @@ Source13: https://hackage.haskell.org/package/%{casatypes}/%{casatypes}.ta
|
|||
Source20: stack-symlink-distro-ghc
|
||||
# End cabal-rpm sources
|
||||
Patch0: stack-2.7.5-ghc-Cabal-version-warnings.patch
|
||||
# https://github.com/commercialhaskell/stack/issues/6379
|
||||
Patch2: stack-Setup-Platforms.patch
|
||||
# https://discourse.haskell.org/t/ann-stack-2-15-3-and-earliers-default-source-for-list-of-stackage-snapshots-not-up-to-date/9023
|
||||
Patch3: stack-snapshots-json.patch
|
||||
|
||||
BuildRequires: ghc
|
||||
BuildRequires: alex
|
||||
|
|
@ -235,7 +239,7 @@ Stack is a cross-platform program for developing Haskell projects.
|
|||
# Begin cabal-rpm setup:
|
||||
%setup -q -c -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a12 -a13
|
||||
# End cabal-rpm setup
|
||||
%patch0 -p0 -b .orig
|
||||
%autopatch -p0
|
||||
|
||||
|
||||
%build
|
||||
|
|
@ -258,7 +262,7 @@ echo %{_bindir}/haskell-mustache >> %{mustache}/ghc-mustache.files
|
|||
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions/
|
||||
%{buildroot}%{_bindir}/stack --bash-completion-script stack | sed s/filenames/default/ > %{buildroot}%{_datadir}/bash-completion/completions/stack
|
||||
|
||||
install -p -m 644 %{SOURCE20} %{buildroot}%{_bindir}/stack-symlink-distro-ghc
|
||||
install -p %{SOURCE20} %{buildroot}%{_bindir}/stack-symlink-distro-ghc
|
||||
|
||||
|
||||
%files
|
||||
|
|
@ -275,6 +279,15 @@ install -p -m 644 %{SOURCE20} %{buildroot}%{_bindir}/stack-symlink-distro-ghc
|
|||
|
||||
|
||||
%changelog
|
||||
* Mon Jul 8 2024 Jens Petersen <petersen@redhat.com> - 2022.1-22
|
||||
- update to new stackage snapshots.json url
|
||||
- stack-symlink-distro-ghc: workaround for ppc64le and no longer error
|
||||
for existing dir
|
||||
- patch stack setup for ppc64le and s390
|
||||
|
||||
* Sun Nov 12 2023 Jens Petersen <petersen@redhat.com> - 2022.1-21
|
||||
- make stack-symlink-distro-ghc executable
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2022.1-20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
11
stack-Setup-Platforms.patch
Normal file
11
stack-Setup-Platforms.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- stack-2.7.5/src/Stack/Setup.hs~ 2024-07-08 21:24:36.825860660 +0800
|
||||
+++ stack-2.7.5/src/Stack/Setup.hs 2024-07-08 21:26:16.500759387 +0800
|
||||
@@ -1261,6 +1261,8 @@
|
||||
Platform Sparc Cabal.Linux -> return "linux-sparc"
|
||||
Platform AArch64 Cabal.OSX -> return "macosx-aarch64"
|
||||
Platform AArch64 Cabal.FreeBSD -> return "freebsd-aarch64"
|
||||
+ Platform PPC64 Cabal.Linux -> pure "linux-ppc64"
|
||||
+ Platform S390 Cabal.Linux -> pure "linux-s390"
|
||||
Platform arch os -> throwM $ UnsupportedSetupCombo os arch
|
||||
|
||||
downloadOrUseLocal
|
||||
11
stack-snapshots-json.patch
Normal file
11
stack-snapshots-json.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- stack-2.7.5/src/Stack/Config.hs~ 2022-03-05 08:13:02.000000000 +0800
|
||||
+++ stack-2.7.5/src/Stack/Config.hs 2024-07-08 21:40:15.903671623 +0800
|
||||
@@ -213,7 +213,7 @@
|
||||
configWorkDir0 <- maybe (return relDirStackWork) (liftIO . parseRelDir) mstackWorkEnv
|
||||
let configWorkDir = fromFirst configWorkDir0 configMonoidWorkDir
|
||||
configLatestSnapshot = fromFirst
|
||||
- "https://s3.amazonaws.com/haddock.stackage.org/snapshots.json"
|
||||
+ "https://www.stackage.org/download/snapshots.json"
|
||||
configMonoidLatestSnapshot
|
||||
clConnectionCount = fromFirst 8 configMonoidConnectionCount
|
||||
configHideTHLoading = fromFirstTrue configMonoidHideTHLoading
|
||||
|
|
@ -7,21 +7,29 @@ if [ -z "$VERSION" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
#set +x
|
||||
|
||||
#FIXME lib
|
||||
LIBDIR=/usr/lib64/ghc-$VERSION
|
||||
if [ ! -d "$LIBDIR" ]; then
|
||||
echo "$LIBDIR does not exist: please install ghcX.Y first"
|
||||
echo "$0: $LIBDIR does not exist: please install ghcX.Y first"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# FIXME arch
|
||||
STACK_PROGRAMS=$HOME/.stack/programs/$(arch)-linux
|
||||
ARCH=$(arch)
|
||||
|
||||
# stack/Cabal doesn't know ppc64le
|
||||
if [ "$ARCH" = "ppc64le" ]; then
|
||||
ARCH=ppc64
|
||||
fi
|
||||
|
||||
STACK_PROGRAMS=$HOME/.stack/programs/$ARCH-linux
|
||||
|
||||
STACK_GHCDIR=${STACK_PROGRAMS}/ghc-tinfo6-$VERSION
|
||||
|
||||
if [ -e "$STACK_GHCDIR" ]; then
|
||||
echo "$STACK_GHCDIR exists: please remove first"
|
||||
exit 1
|
||||
echo "$0: $STACK_GHCDIR exists: to replace, please remove first"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mkdir -p $STACK_GHCDIR/bin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue