diff --git a/.gitignore b/.gitignore index 35a982e..ab01acc 100644 --- a/.gitignore +++ b/.gitignore @@ -53,26 +53,3 @@ haskell-platform-2010.2.0.0.tar.gz /mustache-2.3.2.tar.gz /neat-interpolation-0.5.1.3.tar.gz /pantry-0.5.3.tar.gz -/stack-2.9.1.tar.gz -/hi-file-parser-0.1.3.0.tar.gz -/hpack-0.35.2.tar.gz -/mintty-0.1.4.tar.gz -/mustache-2.4.1.tar.gz -/pantry-0.5.7.tar.gz -/stack-2.9.3.1.tar.gz -/filelock-0.1.1.6.tar.gz -/hi-file-parser-0.1.4.0.tar.gz -/mustache-2.4.2.tar.gz -/pantry-0.8.3.tar.gz -/stack-2.15.7.tar.gz -/aeson-warning-parser-0.1.1.tar.gz -/casa-client-0.0.2.tar.gz -/companion-0.1.0.tar.gz -/crypton-conduit-0.2.3.tar.gz -/filelock-0.1.1.7.tar.gz -/hi-file-parser-0.1.6.0.tar.gz -/hpack-0.36.1.tar.gz -/http-download-0.2.1.0.tar.gz -/neat-interpolation-0.5.1.4.tar.gz -/pantry-0.9.3.2.tar.gz -/static-bytes-0.1.0.tar.gz diff --git a/haskell-platform.spec b/haskell-platform.spec index b4cbdbd..f9bb2ea 100644 --- a/haskell-platform.spec +++ b/haskell-platform.spec @@ -1,20 +1,186 @@ -# generated by cabal-rpm-2.2.1 --subpackage +# generated by cabal-rpm-2.0.10 --subpackage # https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/ +%global stack_ver 2.7.5 +%global stack stack-%{stack_ver} + +%global filelock filelock-0.1.1.5 +%global hifileparser hi-file-parser-0.1.2.0 +%global hpack hpack-0.34.6 +%global httpdownload http-download-0.2.0.0 +%global mintty mintty-0.1.3 +%global mustache mustache-2.3.2 +%global neatinterpolation neat-interpolation-0.5.1.3 +%global openbrowser open-browser-0.2.1.0 +%global pantry pantry-0.5.3 +%global projecttemplate project-template-0.2.1.0 +%global rioorphans rio-orphans-0.1.2.0 +%global casaclient casa-client-0.0.1 +%global casatypes casa-types-0.0.2 + +%global subpkgs %{filelock} %{hifileparser} %{hpack} %{httpdownload} %{mintty} %{mustache} %{neatinterpolation} %{openbrowser} %{rioorphans} %{casatypes} %{casaclient} %{pantry} %{projecttemplate} %{stack} + +# testsuite missing deps: casa-client casa-types filelock hi-file-parser hpack http-download mintty mustache neat-interpolation open-browser pantry project-template raw-strings-qq + Name: haskell-platform -Version: 2024.1 -Release: 36%{?dist} +Version: 2022.1 +Release: 22%{?dist} Summary: Standard Haskell distribution -License: BSD-3-Clause -URL: https://www.haskell.org/ +License: BSD +URL: http://www.haskell.org/platform/ +# for stack: +# Begin cabal-rpm sources: +Source0: https://hackage.haskell.org/package/%{stack}/%{stack}.tar.gz +Source1: https://hackage.haskell.org/package/%{filelock}/%{filelock}.tar.gz +Source2: https://hackage.haskell.org/package/%{hifileparser}/%{hifileparser}.tar.gz +Source3: https://hackage.haskell.org/package/%{hpack}/%{hpack}.tar.gz +Source4: https://hackage.haskell.org/package/%{httpdownload}/%{httpdownload}.tar.gz +Source5: https://hackage.haskell.org/package/%{mintty}/%{mintty}.tar.gz +Source6: https://hackage.haskell.org/package/%{mustache}/%{mustache}.tar.gz +Source7: https://hackage.haskell.org/package/%{neatinterpolation}/%{neatinterpolation}.tar.gz +Source8: https://hackage.haskell.org/package/%{openbrowser}/%{openbrowser}.tar.gz +Source9: https://hackage.haskell.org/package/%{pantry}/%{pantry}.tar.gz +Source10: https://hackage.haskell.org/package/%{projecttemplate}/%{projecttemplate}.tar.gz +Source11: https://hackage.haskell.org/package/%{rioorphans}/%{rioorphans}.tar.gz +Source12: https://hackage.haskell.org/package/%{casaclient}/%{casaclient}.tar.gz +Source13: https://hackage.haskell.org/package/%{casatypes}/%{casatypes}.tar.gz +Source20: stack-symlink-distro-ghc +# End cabal-rpm sources +Patch0: stack-2.7.5-ghc-Cabal-version-warnings.patch BuildRequires: ghc BuildRequires: alex BuildRequires: cabal-install BuildRequires: happy BuildRequires: hscolour -BuildRequires: stack + +# for stack: +# Begin cabal-rpm deps: +BuildRequires: ghc-rpm-macros-extra +BuildRequires: ghc-Cabal-prof +BuildRequires: ghc-aeson-prof +BuildRequires: ghc-annotated-wl-pprint-prof +BuildRequires: ghc-ansi-terminal-prof +BuildRequires: ghc-array-prof +BuildRequires: ghc-async-prof +BuildRequires: ghc-attoparsec-prof +BuildRequires: ghc-base-prof +BuildRequires: ghc-base64-bytestring-prof +BuildRequires: ghc-bytestring-prof +#BuildRequires: ghc-casa-client-prof +#BuildRequires: ghc-casa-types-prof +BuildRequires: ghc-colour-prof +BuildRequires: ghc-conduit-prof +BuildRequires: ghc-conduit-extra-prof +BuildRequires: ghc-containers-prof +BuildRequires: ghc-cryptonite-prof +BuildRequires: ghc-cryptonite-conduit-prof +BuildRequires: ghc-deepseq-prof +BuildRequires: ghc-directory-prof +BuildRequires: ghc-echo-prof +BuildRequires: ghc-exceptions-prof +BuildRequires: ghc-extra-prof +BuildRequires: ghc-file-embed-prof +#BuildRequires: ghc-filelock-prof +BuildRequires: ghc-filepath-prof +BuildRequires: ghc-fsnotify-prof +BuildRequires: ghc-generic-deriving-prof +BuildRequires: ghc-githash-prof +BuildRequires: ghc-hackage-security-prof +BuildRequires: ghc-hashable-prof +#BuildRequires: ghc-hi-file-parser-prof +#BuildRequires: ghc-hpack-prof +BuildRequires: ghc-hpc-prof +BuildRequires: ghc-http-client-prof +BuildRequires: ghc-http-client-tls-prof +BuildRequires: ghc-http-conduit-prof +#BuildRequires: ghc-http-download-prof +BuildRequires: ghc-http-types-prof +BuildRequires: ghc-memory-prof +BuildRequires: ghc-microlens-prof +#BuildRequires: ghc-mintty-prof +BuildRequires: ghc-mono-traversable-prof +BuildRequires: ghc-mtl-prof +#BuildRequires: ghc-mustache-prof +#BuildRequires: ghc-neat-interpolation-prof +BuildRequires: ghc-network-uri-prof +#BuildRequires: ghc-open-browser-prof +BuildRequires: ghc-optparse-applicative-prof +BuildRequires: ghc-optparse-simple-prof +#BuildRequires: ghc-pantry-prof +BuildRequires: ghc-path-prof +BuildRequires: ghc-path-io-prof +BuildRequires: ghc-persistent-prof +BuildRequires: ghc-persistent-sqlite-prof +BuildRequires: ghc-persistent-template-devel +BuildRequires: ghc-pretty-prof +BuildRequires: ghc-primitive-prof +BuildRequires: ghc-process-prof +#BuildRequires: ghc-project-template-prof +BuildRequires: ghc-retry-prof +BuildRequires: ghc-rio-prof +BuildRequires: ghc-rio-prettyprint-prof +BuildRequires: ghc-semigroups-prof +BuildRequires: ghc-split-prof +BuildRequires: ghc-stm-prof +BuildRequires: ghc-streaming-commons-prof +BuildRequires: ghc-tar-prof +BuildRequires: ghc-template-haskell-prof +BuildRequires: ghc-temporary-prof +BuildRequires: ghc-text-prof +BuildRequires: ghc-text-metrics-prof +BuildRequires: ghc-th-reify-many-prof +BuildRequires: ghc-time-prof +BuildRequires: ghc-tls-prof +BuildRequires: ghc-transformers-prof +BuildRequires: ghc-typed-process-prof +BuildRequires: ghc-unicode-transforms-prof +BuildRequires: ghc-unix-prof +BuildRequires: ghc-unix-compat-prof +BuildRequires: ghc-unliftio-prof +BuildRequires: ghc-unordered-containers-prof +BuildRequires: ghc-vector-prof +BuildRequires: ghc-yaml-prof +BuildRequires: ghc-zip-archive-prof +BuildRequires: ghc-zlib-prof +# for missing dep 'hi-file-parser': +BuildRequires: ghc-binary-prof +# for missing dep 'hpack': +BuildRequires: ghc-Glob-prof +BuildRequires: ghc-bifunctors-prof +BuildRequires: ghc-infer-license-prof +BuildRequires: ghc-scientific-prof +# for missing dep 'mustache': +BuildRequires: ghc-cmdargs-prof +BuildRequires: ghc-either-prof +BuildRequires: ghc-parsec-prof +BuildRequires: ghc-scientific-prof +BuildRequires: ghc-th-lift-prof +# for missing dep 'neat-interpolation': +BuildRequires: ghc-megaparsec-prof +# for missing dep 'pantry': +BuildRequires: ghc-digest-prof +BuildRequires: ghc-resourcet-prof +BuildRequires: ghc-tar-conduit-prof +# for missing dep 'project-template': +BuildRequires: ghc-resourcet-prof +# for missing dep 'rio-orphans': +BuildRequires: ghc-fast-logger-prof +BuildRequires: ghc-monad-control-prof +BuildRequires: ghc-monad-logger-prof +BuildRequires: ghc-resourcet-prof +BuildRequires: ghc-transformers-base-prof +BuildRequires: ghc-unliftio-core-prof +# for missing dep 'casa-client': +BuildRequires: ghc-base16-bytestring-prof +BuildRequires: ghc-resourcet-prof +BuildRequires: ghc-th-lift-prof +BuildRequires: ghc-unliftio-core-prof +# for missing dep 'casa-types': +BuildRequires: ghc-base16-bytestring-prof +BuildRequires: ghc-path-pieces-prof +# End cabal-rpm deps # pull in all of ghc for least surprise # even though strictly libHSghc is not formally part of HP @@ -30,73 +196,91 @@ Haskell Platform is a set of stable and well used Haskell tools. It provides a good starting environment for Haskell development. +%package -n stack +Version: %{stack_ver} +Summary: Haskell package tool +License: BSD +Url: http://haskellstack.org +Requires: gcc +Requires: gmp-devel +Recommends: zlib-devel + +%description -n stack +Stack is a cross-platform program for developing Haskell projects. + + +%global main_version %{version} + +%if %{defined ghclibdir} +%ghc_lib_subpackage -l CC0 %{filelock} +%ghc_lib_subpackage -l BSD %{hifileparser} +%ghc_lib_subpackage -l MIT %{hpack} +%ghc_lib_subpackage -l BSD %{httpdownload} +%ghc_lib_subpackage -l BSD %{mintty} +%ghc_lib_subpackage -l BSD %{mustache} +%ghc_lib_subpackage -l MIT %{neatinterpolation} +%ghc_lib_subpackage -l BSD %{openbrowser} +%ghc_lib_subpackage -l BSD %{pantry} +%ghc_lib_subpackage -l BSD %{projecttemplate} +%ghc_lib_subpackage -l MIT %{rioorphans} +%ghc_lib_subpackage -l BSD %{casaclient} +%ghc_lib_subpackage -l BSD %{casatypes} +%ghc_lib_subpackage -l BSD %{stack} +%endif + +%global version %{main_version} + + %prep +# 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 %build +# Begin cabal-rpm build: +%ghc_libs_build %{subpkgs} +# End cabal-rpm build %install +# Begin cabal-rpm install +%ghc_libs_install %{subpkgs} +%ghc_delete_rpaths +# End cabal-rpm install + +# open-browser +rm %{buildroot}%{_bindir}/example +echo %{_bindir}/hpack >> %{hpack}/ghc-hpack.files +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 %{SOURCE20} %{buildroot}%{_bindir}/stack-symlink-distro-ghc %files +%files -n stack +# Begin cabal-rpm files: +%license %{stack}/LICENSE +%doc %{stack}/CONTRIBUTING.md %{stack}/ChangeLog.md %{stack}/README.md +%{_bindir}/stack +%{_bindir}/stack-symlink-distro-ghc +# End cabal-rpm files +%{_datadir}/bash-completion/completions/stack + + %changelog -* Thu Jul 24 2025 Fedora Release Engineering - 2024.1-36 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild +* Sun Nov 12 2023 Jens Petersen - 2022.1-22 +- stack-symlink-distro-ghc: also symlink bin/*-ghc-version -* Fri Jan 17 2025 Fedora Release Engineering - 2024.1-35 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Fri Dec 6 2024 Jens Petersen - 2024.1-34 -- stack is now packaged separately - -* Thu Aug 1 2024 Jens Petersen - 2024.1-33 -- https://hackage.haskell.org/package/stack-2.15.7/changelog - -* Thu Jul 18 2024 Fedora Release Engineering - 2023.1-32 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Mon Jul 8 2024 Jens Petersen - 2023.1-31 -- update to new stackage snapshots.json url - -* Thu Mar 7 2024 Jens Petersen - 2023.1-30 -- stack-symlink-distro-ghc: workaround for ppc64le and no longer error - for existing dir - -* Wed Jan 24 2024 Fedora Release Engineering - 2023.1-29 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sat Jan 20 2024 Fedora Release Engineering - 2023.1-28 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Dec 15 2023 Jens Petersen - 2023.1-27 -- patch Stack.Setup to accept PPC64 and S390X Linux platforms - -* Tue Nov 7 2023 Jens Petersen - 2023.1-26 +* Sun Nov 12 2023 Jens Petersen - 2022.1-21 - make stack-symlink-distro-ghc executable -* Tue Aug 8 2023 Jens Petersen - 2023.1-25 -- bring back the stack InvalidAbsFile patch updated for 2.9.3 - https://github.com/commercialhaskell/stack/pull/6028 -- disable warnings about untested ghc and Cabal versions - -* Sat Jul 29 2023 Jens Petersen - 2023.1-24 -- stack-2.9.3.1 -- https://hackage.haskell.org/package/stack-2.9.3.1/changelog - -* Thu Jul 20 2023 Fedora Release Engineering - 2022.2-23 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Apr 11 2023 Jens Petersen - 2022.2-22 -- backport fix for error: InvalidAbsFile "/usr/lib64/ghc-9.2.3/lib/../lib/x86_64-linux-ghc-9.2.3/rts-1.0.2/include/ghcversion.h" (#5866) - -* Tue Feb 21 2023 Jens Petersen - 2022.2-21 -- update to stack 2.9.1 -- https://hackage.haskell.org/package/stack-2.9.1/changelog -- SPDX migration - * Thu Jul 21 2022 Fedora Release Engineering - 2022.1-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/sources b/sources index e69de29..db15891 100644 --- a/sources +++ b/sources @@ -0,0 +1,14 @@ +SHA512 (stack-2.7.5.tar.gz) = fd51f990d3ccec6103c8699a8e39c970a0233a1185587a519eda659d2b45bc4496c4f261f6897c06781d0f76d2b1d526d5acdfb502fe1494f8cf048c78ba1a8d +SHA512 (filelock-0.1.1.5.tar.gz) = 6ccd0b671cec8d1c2daa3115a5b2d8cd10a31db0a1dc1c15e6cb80d679bd2e09208be8bebc0f4bb64d7cdd0fad2e7e170e8283b6be61edd5017b788f94a41048 +SHA512 (hi-file-parser-0.1.2.0.tar.gz) = a0e04ec071083c23e850264d9beb5d0346f3c2ed8ae99c86d1d4f0980cc5fe431ff8101beb94b03bf3bae6b5d6595070edd692596869252852ee2a45180fdb6a +SHA512 (hpack-0.34.6.tar.gz) = a7fb819b06ccb8019b7a6fb26526190d8856c113cdee12e6db58372cbc9c57a3584202bb44d23a3f12076f784d27f5ca1c401ec68fd0ae11ab5caa52a472c43e +SHA512 (http-download-0.2.0.0.tar.gz) = b31caa48c1ea2a01f1301ca63b2e0c135cd0d3d392b92518c7d70d89fd83da7fd95cffa3cb374900a45fb2da8d17f748de0de72fb4beb8ad11e203676f9864ae +SHA512 (mintty-0.1.3.tar.gz) = a445b37c4c02eb901b390f2a17eef713f7e45a3a195be7c5921b72f43e73e89faebce42b4d2d54ae8861d1edee5ae9bc8acfca54d66fd06ba7447862068deb73 +SHA512 (mustache-2.3.2.tar.gz) = 763ab60bfd99c08b21b291af6b4da17c9265c09659c1c1d14c0b5d5871583f28db5eca4385b66107ed7d9d9c547429a0bbc88048f28d1f6ee80c988cf63fff98 +SHA512 (neat-interpolation-0.5.1.3.tar.gz) = d777ac442d0b32348470b64458a88c76836e84b9fe15f46c6ec05f8a84ebe4a5b79827b85ff9a0e2138bb8db10fc4493c2793e13091ee5f5decf5e28110d86ba +SHA512 (open-browser-0.2.1.0.tar.gz) = 94ba71597c270b518742534b1b9b9a7ca0ede2eeb08a030b03cca6dbe6e5a2de363dc443bae907ca5c90b126aeb7dc5f5dd1eada95ca78a0ba1a8d472df4ada1 +SHA512 (pantry-0.5.3.tar.gz) = 6147bc446400f84ab3ab41eb3ab572192cb8bfe91750a0f1217fe994b663bfc98cb95c789965ee8315515df79fbe7fca46eca14dad466ef9e11671f6999b3bf7 +SHA512 (project-template-0.2.1.0.tar.gz) = ed70f640e5197f7a6158b851dcd3990e77b7266f716be248ecfb012c4827dc688028aa78d649313203a274357f57e45e94371a09446c4404d3282add0d1a158c +SHA512 (rio-orphans-0.1.2.0.tar.gz) = 85e883977e161161e5ba8f4fa6d13026d71f7367bac262307f9a8cfdc0316b71a490fcb6c15737919a6b4e73b3355b413161e09f5167c95b1f0c5a22c045f7ac +SHA512 (casa-client-0.0.1.tar.gz) = 2df03a0b1c2e01f2d24728e96fe446a25b630f5495c4e9995bcbde1ee9da530df1c6b40dde954cfaf6de2af6036fa6cfda7d9957b22106316557cc57d64114fa +SHA512 (casa-types-0.0.2.tar.gz) = a54bb7f15310878e0a4c0524749ba8c8de8537a60892d278941cacefb80ad9d31e9ba16dd236c196b6639758f281f9ae66911d04c39b0ec6e2b75db5127ad5bf diff --git a/stack-2.1-relax_version_warnings.patch b/stack-2.1-relax_version_warnings.patch new file mode 100644 index 0000000..53bd16e --- /dev/null +++ b/stack-2.1-relax_version_warnings.patch @@ -0,0 +1,28 @@ +--- stack-2.1.3.1/src/Stack/Setup.hs~ 2019-07-14 12:22:56.000000000 +0800 ++++ stack-2.1.3.1/src/Stack/Setup.hs 2020-04-12 11:56:39.453839733 +0800 +@@ -482,9 +482,9 @@ + logWarn "For more information, see: https://github.com/commercialhaskell/stack/issues/648" + logWarn "" + pure True +- | ghcVersion >= mkVersion [8, 7] -> do ++ | ghcVersion >= mkVersion [8, 9] -> do + logWarn $ +- "Stack has not been tested with GHC versions above 8.6, and using " <> ++ "Stack has not been tested with GHC versions above 8.8, and using " <> + fromString (versionString ghcVersion) <> + ", this may fail" + pure True +@@ -509,9 +509,9 @@ + logWarn "This invocation will most likely fail." + logWarn "To fix this, either use an older version of Stack or a newer resolver" + logWarn "Acceptable resolvers: lts-3.0/nightly-2015-05-05 or later" +- | cabalVersion >= mkVersion [2, 5] -> ++ | cabalVersion >= mkVersion [3, 1] -> + logWarn $ +- "Stack has not been tested with Cabal versions above 2.4, but version " <> ++ "Stack has not been tested with Cabal versions above 3.0, but version " <> + fromString (versionString cabalVersion) <> + " was found, this may fail" + | otherwise -> pure () + +Diff finished. Sun Apr 12 11:56:54 2020 diff --git a/stack-2.7.5-ghc-Cabal-version-warnings.patch b/stack-2.7.5-ghc-Cabal-version-warnings.patch new file mode 100644 index 0000000..08925f9 --- /dev/null +++ b/stack-2.7.5-ghc-Cabal-version-warnings.patch @@ -0,0 +1,20 @@ +--- stack-2.7.5/src/Stack/Setup.hs~ 2022-03-05 08:13:02.000000000 +0800 ++++ stack-2.7.5/src/Stack/Setup.hs 2022-03-21 17:34:33.423272288 +0800 +@@ -468,7 +468,7 @@ + logWarn "For more information, see: https://github.com/commercialhaskell/stack/issues/648" + logWarn "" + pure True +- | ghcVersion >= mkVersion [9, 1] -> do ++ | ghcVersion >= mkVersion [9, 3] -> do + logWarn $ + "Stack has not been tested with GHC versions above 9.0, and using " <> + fromString (versionString ghcVersion) <> +@@ -495,7 +495,7 @@ + logWarn "This invocation will most likely fail." + logWarn "To fix this, either use an older version of Stack or a newer resolver" + logWarn "Acceptable resolvers: lts-3.0/nightly-2015-05-05 or later" +- | cabalVersion >= mkVersion [3, 5] -> ++ | cabalVersion >= mkVersion [3, 7] -> + logWarn $ + "Stack has not been tested with Cabal versions above 3.4, but version " <> + fromString (versionString cabalVersion) <> diff --git a/stack-Setup-Platforms.patch b/stack-Setup-Platforms.patch deleted file mode 100644 index b557d44..0000000 --- a/stack-Setup-Platforms.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- stack-2.15.7/src/Stack/Setup.hs~ 2024-05-12 22:50:14.000000000 +0800 -+++ stack-2.15.7/src/Stack/Setup.hs 2024-08-02 01:11:32.252316054 +0800 -@@ -2138,6 +2138,8 @@ - Platform Sparc Cabal.Linux -> pure "linux-sparc" - Platform AArch64 Cabal.OSX -> pure "macosx-aarch64" - Platform AArch64 Cabal.FreeBSD -> pure "freebsd-aarch64" -+ Platform PPC64 Cabal.Linux -> pure "linux-ppc64" -+ Platform S390X Cabal.Linux -> pure "linux-s390x" - Platform arch os -> - prettyThrowM $ UnsupportedSetupCombo os arch tool toolDir programsDir - diff --git a/stack-disable-ghc-Cabal-version-warnings.patch b/stack-disable-ghc-Cabal-version-warnings.patch deleted file mode 100644 index 2bedd29..0000000 --- a/stack-disable-ghc-Cabal-version-warnings.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- stack-2.9.3.1/src/Stack/Setup.hs~ 2023-06-22 18:40:54.000000000 +0800 -+++ stack-2.9.3.1/src/Stack/Setup.hs 2023-08-08 14:29:43.486062926 +0800 -@@ -719,12 +719,12 @@ - logWarn "For more information, see: https://github.com/commercialhaskell/stack/issues/648" - logWarn "" - pure True -- | ghcVersion >= mkVersion [9, 5] -> do -- logWarn $ -- "Stack has not been tested with GHC versions above 9.4, and using " <> -- fromString (versionString ghcVersion) <> -- ", this may fail" -- pure True -+ -- | ghcVersion >= mkVersion [9, 5] -> do -+ -- logWarn $ -+ -- "Stack has not been tested with GHC versions above 9.4, and using " <> -+ -- fromString (versionString ghcVersion) <> -+ -- ", this may fail" -+ -- pure True - | otherwise -> do - logDebug "Asking for a supported GHC version" - pure False -@@ -746,11 +746,11 @@ - logWarn "This invocation will most likely fail." - logWarn "To fix this, either use an older version of Stack or a newer resolver" - logWarn "Acceptable resolvers: lts-3.0/nightly-2015-05-05 or later" -- | cabalVersion >= mkVersion [3, 9] -> -- logWarn $ -- "Stack has not been tested with Cabal versions above 3.8, but version " <> -- fromString (versionString cabalVersion) <> -- " was found, this may fail" -+ -- | cabalVersion >= mkVersion [3, 9] -> -+ -- logWarn $ -+ -- "Stack has not been tested with Cabal versions above 3.8, but version " <> -+ -- fromString (versionString cabalVersion) <> -+ -- " was found, this may fail" - | otherwise -> pure () - - -- | Ensure that the msys toolchain is installed if necessary and diff --git a/stack-disabled-global-warnings.patch b/stack-disabled-global-warnings.patch deleted file mode 100644 index fd4525d..0000000 --- a/stack-disabled-global-warnings.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -up stack-2.15.7/src/Stack/Config.hs~ stack-2.15.7/src/Stack/Config.hs ---- stack-2.15.7/src/Stack/Config.hs~ 2024-05-12 22:50:13.000000000 +0800 -+++ stack-2.15.7/src/Stack/Config.hs 2024-08-02 01:21:01.138918479 +0800 -@@ -435,9 +435,9 @@ configFromConfigMonoid - fromFirst Constants.hackageBaseUrl configMonoid.hackageBaseUrl - hideSourcePaths = fromFirstTrue configMonoid.hideSourcePaths - recommendUpgrade = fromFirstTrue configMonoid.recommendUpgrade -- notifyIfNixOnPath = fromFirstTrue configMonoid.notifyIfNixOnPath -- notifyIfGhcUntested = fromFirstTrue configMonoid.notifyIfGhcUntested -- notifyIfCabalUntested = fromFirstTrue configMonoid.notifyIfCabalUntested -+ notifyIfNixOnPath = fromFirstFalse configMonoid.notifyIfNixOnPath -+ notifyIfGhcUntested = fromFirstFalse configMonoid.notifyIfGhcUntested -+ notifyIfCabalUntested = fromFirstFalse configMonoid.notifyIfCabalUntested - notifyIfArchUnknown = fromFirstTrue configMonoid.notifyIfArchUnknown - noRunCompile = fromFirstFalse configMonoid.noRunCompile - allowDifferentUser <- -diff -up stack-2.15.7/src/Stack/Types/ConfigMonoid.hs~ stack-2.15.7/src/Stack/Types/ConfigMonoid.hs ---- stack-2.15.7/src/Stack/Types/ConfigMonoid.hs~ 2024-05-12 22:50:14.000000000 +0800 -+++ stack-2.15.7/src/Stack/Types/ConfigMonoid.hs 2024-08-02 01:20:22.724711778 +0800 -@@ -170,11 +170,11 @@ data ConfigMonoid = ConfigMonoid - -- ^ See 'configHideSourcePaths' - , recommendUpgrade :: !FirstTrue - -- ^ See 'configRecommendUpgrade' -- , notifyIfNixOnPath :: !FirstTrue -+ , notifyIfNixOnPath :: !FirstFalse - -- ^ See 'configNotifyIfNixOnPath' -- , notifyIfGhcUntested :: !FirstTrue -+ , notifyIfGhcUntested :: !FirstFalse - -- ^ See 'configNotifyIfGhcUntested' -- , notifyIfCabalUntested :: !FirstTrue -+ , notifyIfCabalUntested :: !FirstFalse - -- ^ See 'configNotifyIfCabalUntested' - , notifyIfArchUnknown :: !FirstTrue - -- ^ See 'configNotifyIfArchUnknown' -@@ -317,11 +317,11 @@ parseConfigMonoidObject rootDir obj = do - let styles = fromMaybe mempty $ configMonoidStylesUS <|> configMonoidStylesGB - hideSourcePaths <- FirstTrue <$> obj ..:? configMonoidHideSourcePathsName - recommendUpgrade <- FirstTrue <$> obj ..:? configMonoidRecommendUpgradeName -- notifyIfNixOnPath <- FirstTrue <$> obj ..:? configMonoidNotifyIfNixOnPathName -+ notifyIfNixOnPath <- FirstFalse <$> obj ..:? configMonoidNotifyIfNixOnPathName - notifyIfGhcUntested <- -- FirstTrue <$> obj ..:? configMonoidNotifyIfGhcUntestedName -+ FirstFalse <$> obj ..:? configMonoidNotifyIfGhcUntestedName - notifyIfCabalUntested <- -- FirstTrue <$> obj ..:? configMonoidNotifyIfCabalUntestedName -+ FirstFalse <$> obj ..:? configMonoidNotifyIfCabalUntestedName - notifyIfArchUnknown <- - FirstTrue <$> obj ..:? configMonoidNotifyIfArchUnknownName - casaOpts <- jsonSubWarnings (obj ..:? configMonoidCasaOptsName ..!= mempty) diff --git a/stack-symlink-distro-ghc b/stack-symlink-distro-ghc index 894dba8..d3c7b39 100755 --- a/stack-symlink-distro-ghc +++ b/stack-symlink-distro-ghc @@ -7,29 +7,21 @@ if [ -z "$VERSION" ]; then exit 1 fi -#set +x - #FIXME lib LIBDIR=/usr/lib64/ghc-$VERSION if [ ! -d "$LIBDIR" ]; then - echo "$0: $LIBDIR does not exist: please install ghcX.Y first" + echo "$LIBDIR does not exist: please install ghcX.Y first" exit 1 fi -ARCH=$(arch) - -# stack/Cabal doesn't know ppc64le -if [ "$ARCH" = "ppc64le" ]; then - ARCH=ppc64 -fi - -STACK_PROGRAMS=$HOME/.stack/programs/$ARCH-linux +# FIXME arch +STACK_PROGRAMS=$HOME/.stack/programs/$(arch)-linux STACK_GHCDIR=${STACK_PROGRAMS}/ghc-tinfo6-$VERSION if [ -e "$STACK_GHCDIR" ]; then - echo "$0: $STACK_GHCDIR exists: to replace, please remove first" - exit 0 + echo "$STACK_GHCDIR exists: please remove first" + exit 1 fi mkdir -p $STACK_GHCDIR/bin