From a59fca3cb8d7009d14d368762915cc040d30d8cf Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 18 Jan 2020 23:57:27 +0100 Subject: [PATCH] dev-lang/ghc-bin: bump to 8.8.2 --- .../dev-lang/ghc-bin/ghc-bin-8.8.2.exheres-0 | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 packages/dev-lang/ghc-bin/ghc-bin-8.8.2.exheres-0 diff --git a/packages/dev-lang/ghc-bin/ghc-bin-8.8.2.exheres-0 b/packages/dev-lang/ghc-bin/ghc-bin-8.8.2.exheres-0 new file mode 100644 index 0000000..a2fd162 --- /dev/null +++ b/packages/dev-lang/ghc-bin/ghc-bin-8.8.2.exheres-0 @@ -0,0 +1,96 @@ +# Copyright 2018 Julian Ospald +# Distributed under the terms of the GNU General Public License v2 + +require bash-completion alternatives + +SUMMARY="The Glorious Glasgow Haskell Compilation System" +DESCRIPTION=" +GHC is a state-of-the-art, open source, compiler and interactive environment for the functional +language Haskell." +HOMEPAGE="https://www.haskell.org/ghc/" +DOWNLOADS="https://downloads.haskell.org/~ghc/${PV}/ghc-${PV}-x86_64-fedora27-linux.tar.xz" + +LICENCES="BSD-3" +SLOT="${PV}" +PLATFORMS="-* ~amd64" +MYOPTIONS="" + +DEPENDENCIES=" + build+run: + dev-lang/perl:*[>=5.6.1] + dev-libs/gmp[>=6.1] [[ note = [ depends on libgmp.so.10 ] ]] + sys-libs/ncurses[>=6.1-r2] [[ note = [ Only these include libtinfo.so symlinks ] ]] + !dev-lang/GHC [[ + description = [ different provider ] + resolution = uninstall-blocked-after + ]] + !dev-lang/ghc [[ + description = [ Both install the same binaries/libs and alternatives ] + resolution = uninstall-blocked-before + ]] + suggestion: + dev-haskell/cabal-install-bin [[ description = [ the cabal binary for installing packages ] ]] + dev-lang/llvm[>=2.7] [[ description = [ LLVM can be used for code generation and linking ] ]] +" + +BUGS_TO="hasufell@posteo.de" +REMOTE_IDS="freecode:${PN}" +UPSTREAM_RELEASE_NOTES="http://www.haskell.org/${PN}/docs/${PV}/html/users_guide/release-${PV//./-}.html" + +RESTRICT="test" + +WORK=${WORKBASE}/ghc-${PV} + +src_configure() { + econf \ + --target=$(exhost --target) +} + +src_compile() { + : +} + +src_install() { + default + + # bashcomp + dobashcompletion "${FILES}/ghc-bash-completion" + alternatives_for ghc ${SLOT} ${SLOT} \ + /usr/share/bash-completion/completions/ghc-bin{,-${SLOT}} + + # some scripts are not versioned, move + edo mv "${IMAGE}"/usr/$(exhost --target)/bin/{hp2ps,hp2ps-${SLOT}} + edo mv "${IMAGE}"/usr/$(exhost --target)/bin/{hpc,hpc-${SLOT}} + edo mv "${IMAGE}"/usr/$(exhost --target)/bin/{hsc2hs,hsc2hs-${SLOT}} + + # remove unversioned symlinks, we create alternatives later + local ghc_bin + for ghc_bin in ghc ghci ghc-pkg haddock runghc runhaskell ; do + edo rm "${IMAGE}"/usr/$(exhost --target)/bin/${ghc_bin} + done + unset ghc_bin + + # create alternatives for scripts/binaries + alternatives_for ghc ${SLOT} ${SLOT} \ + /usr/$(exhost --target)/bin/ghc{,-${SLOT}} \ + /usr/$(exhost --target)/bin/ghci{,-${SLOT}} \ + /usr/$(exhost --target)/bin/ghc-pkg{,-${SLOT}} \ + /usr/$(exhost --target)/bin/haddock{,-ghc-${SLOT}} \ + /usr/$(exhost --target)/bin/hp2ps{,-${SLOT}} \ + /usr/$(exhost --target)/bin/hpc{,-${SLOT}} \ + /usr/$(exhost --target)/bin/hsc2hs{,-${SLOT}} \ + /usr/$(exhost --target)/bin/runghc{,-${SLOT}} \ + /usr/$(exhost --target)/bin/runhaskell /usr/$(exhost --target)/bin/runghc-${SLOT} + + # alternatives for manpages + local file alternatives=() + for file in "${IMAGE}"/usr/share/man/*/*; do + alternatives+=( + ${file#${IMAGE}} + ${file#${IMAGE}}-${SLOT} + ) + done + alternatives_for \ + ghc ${SLOT} ${SLOT} \ + "${alternatives[@]}" +}