public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2015-08-27 22:24 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2015-08-27 22:24 UTC (permalink / raw
  To: gentoo-commits

commit:     0fdbbebbdc4b18e4078870a6a579834c64177219
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 27 22:24:35 2015 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Aug 27 22:24:49 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fdbbebb

dev-lang/ghc: get rid of ncurses runtime dependency, bug #557478

Recently gentoo updated ncurses to sys-libs/ncurses-6.0.
It changed ABI from libncursesw.so.5 to libncursesw.so.6
in an incompatible way.

The change disables ncurses backend for haskeline for
booter binary (USE=ghcmakebinary).

Bug: https://bugs.gentoo.org/show_bug.cgi?id=557478

Package-Manager: portage-2.2.20

 dev-lang/ghc/Manifest             |   2 +
 dev-lang/ghc/ghc-7.10.2-r1.ebuild | 651 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 653 insertions(+)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 7406de3..24c2cab 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -6,6 +6,8 @@ DIST ghc-7.8.3-src.tar.xz 9160092 SHA256 b0cd96a549ba3b5e512847a4a8cd1a3174e4b2b
 DIST ghc-7.8.4-ia64-CLOSUREs-regenerated.patch.gz 13268 SHA256 3bdff22e654aee6f942d43edf1bf6cf70404c0152c4fcf89276f10d2c4c5b4b9 SHA512 a655713e06324b56f0041edf70837487e296d28e6f3ee35fe116b9938765aaf3469d25e92645e0940655ed3607dff27d3826fe0f995c84e81b51bfc956816e7d WHIRLPOOL d2cb53bdc6debc0278d554168ea3ab22b0fd8314adac81444637278a92d21b766280fedfb4b7d1b4540c7381c7962dec6b13a799ab2fee4d456fe2875d5c6a5b
 DIST ghc-7.8.4-src.tar.bz2 10600755 SHA256 59e3bd514a1820cc1c03e1808282205c0b8518369acae12645ceaf839e6f114b SHA512 079a53891d8ebd8d9b88da96170e60981608a619f8282e4b7948f35244e99bd87277649ac7fcebc227a61a4d21960db8d5e5b9e92f2c69c82d8d68d7fd0a41d3 WHIRLPOOL a9be7641adbd237ed6e0f644c312e655e98be9566097aee5e2c0022e8756d5b2236e42dd86d76c638a001b5ca3f67307e89ec0cd003a92cd112a5d6d3e3d8467
 DIST ghc-bin-7.10.2-amd64.tbz2 112028560 SHA256 536297ac402da44ec1aafb1a937960883d12d192db16715ca34ab6469773a4c7 SHA512 207d8032c99d52bf4215ddeea2dbcd5816bb8d4caf2c3c31190e3ca92b49667d98a4f97aaf4cd6b40090f150854d520f75b5420dfe1ade7f036cf35d3dcb5100 WHIRLPOOL 8e43956a61c2c0fead242e3b179cde4918c04f3db7dbb27cc986f00f981261d98028ead82548b87d183d8da928635d5db4aa62ff1161f4077e5370483530a316
+DIST ghc-bin-7.10.2-r1-amd64.tbz2 111915962 SHA256 3c5972b69be650bc2d3a07ff8a6be97a2d8fd07387aee155183960ebcd7bd60c SHA512 e87c7c177cbfac7e8206c3ad94ab36d568d3b294311b60df5db50e3c6d46e0b5fae77b8b74701b6920f419c0bc7f763fe478760f14b00c1fc18fb79e9b17bb4f WHIRLPOOL b5be3ef924d729e77626ce69859ffa8952e1f5053a36672cef5713aa60b7167ab9d3886cc8052cacfdb6756d50db444b3f80bca77a932719a16cc9b4583e8319
+DIST ghc-bin-7.10.2-r1-x86.tbz2 113566669 SHA256 d0ff86c34d009e7980d3b1ea85b24dfe3854d85cf2aece36dbad38078283a382 SHA512 a2bfef656603db15147399424733f1f97867b0ad883880ee8912bbbad7fe42646caf6023a17653119ad7ea246ffe3f2ecff5b924c6912c41fb601d51c032c2ce WHIRLPOOL 2f2d4accbbaa3202754a9463dc321d0b830bc4710db36c5ca4dcf3ae00882f34db16bf613ba52712671aee69bb5ae2747d12a29a520a29fd057c86ec20e53286
 DIST ghc-bin-7.10.2-x86.tbz2 113900477 SHA256 eefb7a3002e3dcdd6d936b2b2826eadf3cd100352babad4c9a355b944064240a SHA512 61dae4b9c80bfef6b1e0550c77b70f25d11f4a9fbe3b57d6c4ad451b4b584884432405d39dc32b9f85f3a5ad9d02657356ae0ebd99518848f3d330314c74b595 WHIRLPOOL da0d7eb62d2ee2aeb80a3f495da2ff123e29151b7517fbcd212f83ab3722638f10019511f4f237e8e001c68dd957ed2817fb0f1a2b42c2710239343f1d801496
 DIST ghc-bin-7.4.2-alpha.tbz2 130483507 SHA256 cd8e72e569574f137bf10fcdb4337bb0dc320deb2a2c4d72529a821735c53ae6 SHA512 6fb99dea706965afa60f4aeb68da3da1c69dda477f5fcfb4e67b73d75b78583193148ce9f623a356679a57f1a740f8010f28a22f08e56ace50f3fcd42142f83f WHIRLPOOL e5ec69ab24dc963ac709f13928c0e35931d5d50ca6b21dfb0aa79f9088c0ce1196b64bb4d9668e35d73dcdf9e2df9c3da59c95eaf3db8b793a6bb65b1f4ba6c0
 DIST ghc-bin-7.4.2-amd64-stable-glibc.tbz2 93139900 SHA256 f06dff00585cc1a8ecc8ac29aeca7fdc601d272eed29d7613f7a2f2924cad585 SHA512 9b725f2613dd9013851a16eaea4000ea424c51cbafa97d3860f120fdb9936247f8c65208775a80a2f49b74946ddda2e843a54dec00b78c521197374aa3dd2d50 WHIRLPOOL 9e2630b1de40a059c324be38a1fe68b16ea484bc7afc2a397ea05192263d1964aed1d29fde543622ceab12ed2df111204576fdc72b7e35b2bbf9c6b9519901d1

diff --git a/dev-lang/ghc/ghc-7.10.2-r1.ebuild b/dev-lang/ghc/ghc-7.10.2-r1.ebuild
new file mode 100644
index 0000000..d830880
--- /dev/null
+++ b/dev-lang/ghc/ghc-7.10.2-r1.ebuild
@@ -0,0 +1,651 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+#
+# 'CTARGET' definition and 'is_crosscompile' are taken from 'toolchain.eclass'
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+		export CTARGET=${CATEGORY/cross-}
+	fi
+fi
+
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib pax-utils toolchain-funcs versionator
+
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="http://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+# sorted!
+#arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PVR}-amd64.tbz2 )"
+#arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PVR}-x86.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+	case "${ARCH}" in
+		#alpha) return 0 ;;
+		#arm)
+		#	ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
+		#	return 0
+		#;;
+		amd64) return 0 ;;
+		#ia64) return 0 ;;
+		#ppc) return 0 ;;
+		#ppc64) return 0 ;;
+		#sparc) return 0 ;;
+		x86) return 0 ;;
+		*) return 1 ;;
+	esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=7.10.1.20150630 # uncomment only for -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+#SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.bz2 )"
+# Upstream tarball was repackaged and inplace-updated. CDN cached old version for
+# many users
+SRC_URI="!binary? ( http://dev.gentoo.org/~slyfox/distfiles/${GHC_P}-src.tar.bz2 )"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+
+BUMP_LIBRARIES=(
+	# "hackage-name          hackage-version"
+	"binary                  0.7.5.0"
+	"hoopl                   3.10.1.0"
+	"transformers            0.4.3.0"
+)
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc ghcbootstrap ghcmakebinary +gmp"
+IUSE+=" binary"
+IUSE+=" elibc_glibc" # system stuff
+
+RDEPEND="
+	>=dev-lang/perl-5.6.1
+	>=dev-libs/gmp-5:=
+	sys-libs/ncurses:=[unicode]
+	!ghcmakebinary? ( virtual/libffi:= )
+	!kernel_Darwin? ( >=sys-devel/gcc-2.95.3:* )
+	kernel_linux? ( >=sys-devel/binutils-2.17:* )
+	kernel_SunOS? ( >=sys-devel/binutils-2.17:* )
+"
+
+# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
+# that we want the binaries to use the latest versioun available, and not to be
+# built against gmp-4
+
+# similar for glibc. we have bootstrapped binaries against glibc-2.17
+DEPEND="${RDEPEND}
+	doc? ( app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5
+		app-text/docbook-xsl-stylesheets
+		>=dev-libs/libxslt-1.1.2 )
+	!ghcbootstrap? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) )"
+
+PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
+
+REQUIRED_USE="?? ( ghcbootstrap binary )"
+
+# yeah, top-level 'use' sucks. I'd like to have it in 'src_install()'
+use binary && QA_PREBUILT="*"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+	[[ ${CHOST} != ${CTARGET} ]]
+}
+
+append-ghc-cflags() {
+	local persistent compile assemble link
+	local flag ghcflag
+
+	for flag in $*; do
+		case ${flag} in
+			persistent)	persistent="yes";;
+			compile)	compile="yes";;
+			assemble)	assemble="yes";;
+			link)		link="yes";;
+			*)
+				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				;;
+		esac
+	done
+}
+
+# $1 - lib name (under libraries/)
+# $2 - lib version
+# example: bump_lib "transformers" "0.4.2.0"
+bump_lib() {
+	local pn=$1 pv=$2
+	local p=${pn}-${pv}
+	local f
+
+	einfo "Bumping ${pn} up to ${pv}"
+
+	for f in ghc.mk GNUmakefile; do
+		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
+	done
+	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
+	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
+}
+
+update_SRC_URI() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		SRC_URI+=" mirror://hackage/package/${pn}/${pn}-${pv}.tar.gz"
+	done
+}
+
+update_SRC_URI
+
+bump_libs() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		bump_lib "${pn}" "${pv}"
+	done
+}
+
+ghc_setup_cflags() {
+	if is_crosscompile; then
+		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
+		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
+		einfo "Crosscompiling mode:"
+		einfo "   CHOST:   ${CHOST}"
+		einfo "   CTARGET: ${CTARGET}"
+		einfo "   CFLAGS:  ${CFLAGS}"
+		einfo "   LDFLAGS: ${LDFLAGS}"
+		return
+	fi
+	# We need to be very careful with the CFLAGS we ask ghc to pass through to
+	# gcc. There are plenty of flags which will make gcc produce output that
+	# breaks ghc in various ways. The main ones we want to pass through are
+	# -mcpu / -march flags. These are important for arches like alpha & sparc.
+	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
+	strip-flags
+	strip-unsupported-flags
+
+	# Cmm can't parse line numbers #482086
+	replace-flags -ggdb[3-9] -ggdb2
+
+	GHC_FLAGS=""
+	GHC_PERSISTENT_FLAGS=""
+	for flag in ${CFLAGS}; do
+		case ${flag} in
+
+			# Ignore extra optimisation (ghc passes -O to gcc anyway)
+			# -O2 and above break on too many systems
+			-O*) ;;
+
+			# Arch and ABI flags are what we're really after
+			-m*) append-ghc-cflags compile assemble ${flag};;
+
+			# Sometimes it's handy to see backtrace of RTS
+			# to get an idea what happens there
+			-g*) append-ghc-cflags compile ${flag};;
+
+			# Ignore all other flags, including all -f* flags
+		esac
+	done
+
+	for flag in ${LDFLAGS}; do
+		append-ghc-cflags link ${flag}
+	done
+
+	# hardened-gcc needs to be disabled, because the mangler doesn't accept
+	# its output.
+	gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
+	gcc-specs-ssp && append-ghc-cflags persistent compile      -fno-stack-protector
+
+	# prevent from failind building unregisterised ghc:
+	# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+	use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+	# fix the similar issue as ppc64 TOC on ia64. ia64 has limited size of small data
+	# currently ghc fails to build haddock
+	# http://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
+	use ia64 && append-ghc-cflags persistent compile -G0
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+	local from=$1
+	local   to=$2
+	shift 2
+	local file=
+	for file in "$@"
+	do
+		sed -i -e "s|$from|$to|g" \
+			"$file" || die "path relocation failed for '$file'"
+	done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+	local to=$1
+
+	# libdir for prebuilt binary and for current system may mismatch
+	# It does for prefix installation for example: bug #476998
+	local bin_ghc_prefix=${WORKDIR}/usr
+	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+	# backup original script to use it later after relocation
+	local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
+	cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+	if [[ ${bin_libdir} != $(get_libdir) ]]; then
+		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+		# moving the dir itself is not strictly needed
+		# but then USE=binary would result in installing
+		# in '${bin_libdir}'
+		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+			"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+			"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+			"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+			"${WORKDIR}/usr/bin/hsc2hs" \
+			"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+			"$gp_back" \
+			"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
+	fi
+
+	# Relocate from /usr to ${EPREFIX}/usr
+	relocate_path "/usr" "${to}/usr" \
+		"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+		"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+		"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+		"${WORKDIR}/usr/bin/hsc2hs" \
+		"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+		"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
+
+	# this one we will use to regenerate cache
+	# so it should point to current tree location
+	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+	if use prefix; then
+		# and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
+		# TODO: add the same for darwin's CHOST and it's DYLD_
+		local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
+		sed -i -e '2i'"$new_ldpath" \
+			"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+			"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+			"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+			"${WORKDIR}/usr/bin/hsc2hs" \
+			"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+			"$gp_back" \
+			"${WORKDIR}/usr/bin/hsc2hs" \
+			|| die "Adding LD_LIBRARY_PATH for wrappers failed"
+	fi
+
+	# regenerate the binary package cache
+	"$gp_back" recache || die "failed to update cache after relocation"
+	rm "$gp_back"
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} == binary ]] && return
+
+	if use ghcbootstrap; then
+		ewarn "You requested ghc bootstrapping, this is usually only used"
+		ewarn "by Gentoo developers to make binary .tbz2 packages."
+
+		[[ -z $(type -P ghc) ]] && \
+			die "Could not find a ghc to bootstrap with."
+	else
+		if ! yet_binary; then
+			eerror "Please try emerging with USE=ghcbootstrap and report build"
+			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
+			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
+		fi
+	fi
+}
+
+src_unpack() {
+	# Create the ${S} dir if we're using the binary version
+	use binary && mkdir "${S}"
+
+	# the Solaris and Darwin binaries from ghc (maeder) need to be
+	# unpacked separately, so prevent them from being unpacked
+	local ONLYA=${A}
+	case ${CHOST} in
+		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.bz2  ;;
+	esac
+	unpack ${ONLYA}
+
+	if [[ -d "${S}"/libraries/dph ]]; then
+		# Sometimes dph libs get accidentally shipped with ghc
+		# but they are not installed unless user requests it.
+		# We never install them.
+		elog "Removing 'libraries/dph'"
+		rm -rf "${S}"/libraries/dph
+	fi
+}
+
+src_prepare() {
+	ghc_setup_cflags
+
+	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+		# See bug #313635.
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${WORKDIR}/usr/bin/ghc-${GHC_PV}"
+
+		# allow hardened users use vanilla binary to bootstrap ghc
+		# ghci uses mmap with rwx protection at it implements dynamic
+		# linking on it's own (bug #299709)
+		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/bin/ghc"
+	fi
+
+	if use binary; then
+		if use prefix; then
+			relocate_ghc "${EPREFIX}"
+		fi
+
+		# Move unpacked files to the expected place
+		mv "${WORKDIR}/usr" "${S}"
+	else
+		if ! use ghcbootstrap; then
+			case ${CHOST} in
+				*-darwin* | *-solaris*)
+				# UPDATE ME for ghc-7
+				mkdir "${WORKDIR}"/ghc-bin-installer || die
+				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
+				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
+				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
+				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
+				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
+				popd > /dev/null
+
+				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
+				# fix the binaries so they run, on Solaris we need an
+				# LD_LIBRARY_PATH which has our prefix libdirs, on
+				# Darwin we need to replace the frameworks with our libs
+				# from the prefix fix before installation, because some
+				# of the tools are actually used during configure/make
+				if [[ ${CHOST} == *-solaris* ]] ; then
+					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
+				elif [[ ${CHOST} == *-darwin* ]] ; then
+					local readline_framework=GNUreadline.framework/GNUreadline
+					local gmp_framework=/opt/local/lib/libgmp.10.dylib
+					local ncurses_file=/opt/local/lib/libncurses.5.dylib
+					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
+						install_name_tool -change \
+							${readline_framework} \
+							"${EPREFIX}"/lib/libreadline.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${gmp_framework} \
+							"${EPREFIX}"/usr/lib/libgmp.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${ncurses_file} \
+							"${EPREFIX}"/usr/lib/libncurses.dylib \
+							${binary} || die
+					done
+					# we don't do frameworks!
+					sed -i \
+						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
+						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
+						rts/package.conf.in || die
+				fi
+
+				# it is autoconf, but we really don't want to give it too
+				# much arguments, in fact we do the make in-place anyway
+				./configure --prefix="${WORKDIR}"/usr || die
+				make install || die
+				popd > /dev/null
+				;;
+				*)
+				relocate_ghc "${WORKDIR}"
+				;;
+			esac
+		fi
+
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${S}/ghc/ghc.wrapper"
+
+		cd "${S}" # otherwise epatch will break
+
+		epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+
+		epatch "${FILESDIR}"/${PN}-7.8.2-cgen-constify.patch
+		epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+		epatch "${FILESDIR}"/${PN}-7.10.1-rc3-ghc-7.10-bootstrap.patch
+		epatch "${FILESDIR}"/${PN}-7.10.1-T10590-dequeue.patch
+		# Since ${S}/packages does not include base, etc. add them to gen_contents_index
+		sed -e 's@\(for REPO in .*\)@\1 base integer-gmp integer-gmp2 integer-simple template-haskell@' \
+			-i libraries/gen_contents_index || die
+
+		if use prefix; then
+			# Make configure find docbook-xsl-stylesheets from Prefix
+			sed -e '/^FP_DIR_DOCBOOK_XSL/s:\[.*\]:['"${EPREFIX}"'/usr/share/sgml/docbook/xsl-stylesheets/]:' \
+				-i utils/haddock/doc/configure.ac || die
+		fi
+
+		bump_libs
+
+		# as we have changed the build system
+		eautoreconf
+	fi
+}
+
+src_configure() {
+	if ! use binary; then
+		# initialize build.mk
+		echo '# Gentoo changes' > mk/build.mk
+
+		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
+		echo "docdir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
+		echo "htmldir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
+
+		# We also need to use the GHC_FLAGS flags when building ghc itself
+		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
+		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
+		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
+
+		# We can't depend on haddock except when bootstrapping when we
+		# must build docs and include them into the binary .tbz2 package
+		# app-text/dblatex is not in portage, can not build PDF or PS
+		echo "BUILD_DOCBOOK_PDF  = NO"  >> mk/build.mk
+		echo "BUILD_DOCBOOK_PS   = NO"  >> mk/build.mk
+		if use doc; then
+			echo "BUILD_DOCBOOK_HTML = YES" >> mk/build.mk
+		else
+			echo "BUILD_DOCBOOK_HTML = NO" >> mk/build.mk
+		fi
+
+		# this controls presence on 'xhtml' and 'haddock' in final install
+		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
+
+		# allows overriding build flavours for libraries:
+		# v   - vanilla (static libs)
+		# p   - profiled
+		# dyn - shared libraries
+		# example: GHC_LIBRARY_WAYS="v dyn"
+		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
+			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
+		fi
+
+		# Get ghc from the unpacked binary .tbz2
+		# except when bootstrapping we just pick ghc up off the path
+		if ! use ghcbootstrap; then
+			export PATH="${WORKDIR}/usr/bin:${PATH}"
+		fi
+
+		if use gmp; then
+			echo "INTEGER_LIBRARY=integer-gmp2" >> mk/build.mk
+		else
+			echo "INTEGER_LIBRARY=integer-simple" >> mk/build.mk
+		fi
+
+		# don't strip anything. Very useful when stage2 SIGSEGVs on you
+		echo "STRIP_CMD = :" >> mk/build.mk
+
+		local econf_args=()
+
+		# GHC embeds 'gcc' it was built by and uses it later.
+		# Don't allow things like ccache or versioned binary slip.
+		# We use stable thing across gcc upgrades.
+		is_crosscompile || econf_args+=(--with-gcc=${CHOST}-gcc)
+
+		if use ghcmakebinary; then
+			# When building booting libary we are trying to
+			# bundle or restrict most of external depends
+			# with unstable ABI:
+			#  - embed libffi (default GHC behaviour)
+			#  - disable ncurses support for ghci (via haskeline)
+			#    https://bugs.gentoo.org/557478
+			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
+		else
+			econf_args+=(--with-system-libffi)
+			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+		fi
+
+		elog "Final mk/build.mk:"
+		cat mk/build.mk || die
+
+		econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
+
+		if [[ ${PV} == *9999* ]]; then
+			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+			GHC_P=${PN}-${GHC_PV}
+		fi
+		GHC_TPF="$(grep 'S\[\"TargetPlatformFull\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+	fi # ! use binary
+}
+
+src_compile() {
+	if ! use binary; then
+		# 1. build compiler binary first
+		emake ghc/stage2/build/tmp/ghc-stage2
+		# 2. pax-mark (bug #516430)
+		pax-mark -m ghc/stage2/build/tmp/ghc-stage2
+		# 3. and then all the rest
+		emake all
+	fi # ! use binary
+}
+
+src_install() {
+	if use binary; then
+		use prefix && mkdir -p "${ED}"
+		mv "${S}/usr" "${ED}"
+	else
+
+		emake -j1 install DESTDIR="${D}"
+		dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
+
+		# rename ghc-shipped files to avoid collision
+		# of external packages. Motivating example:
+		#  user had installed:
+		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
+		#      dev-haskell/transformers-0.4.2.0
+		#  then user tried to update to
+		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
+		#  this will lead to single .conf file collision.
+		local shipped_conf renamed_conf
+		local package_confdir="${ED}/usr/$(get_libdir)/${GHC_P}/package.conf.d"
+		for shipped_conf in "${package_confdir}"/*.conf; do
+			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
+			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
+			mv "${shipped_conf}" "${renamed_conf}" || die
+		done
+
+		# remove link, but leave 'haddock-${GHC_P}'
+		rm -f "${ED}"/usr/bin/haddock
+
+		if [[ ! -f "${S}/VERSION" ]]; then
+			echo "${GHC_PV}" > "${S}/VERSION" \
+				|| die "Could not create file ${S}/VERSION"
+		fi
+		newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
+		newbashcomp utils/completion/ghc.bash         ghc
+	fi
+
+	# path to the package.cache
+	local package_confdir="${ED}/usr/$(get_libdir)/${GHC_P}/package.conf.d"
+	PKGCACHE="${package_confdir}"/package.cache
+	# copy the package.conf.d, including timestamp, save it so we can help
+	# users that have a broken package.conf.d
+	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
+
+	# copy the package.conf, including timestamp, save it so we later can put it
+	# back before uninstalling, or when upgrading.
+	cp -p "${PKGCACHE}"{,.shipped} \
+		|| die "failed to copy package.conf.d/package.cache"
+}
+
+pkg_preinst() {
+	# have we got an earlier version of ghc installed?
+	if has_version "<${CATEGORY}/${PF}"; then
+		haskell_updater_warn="1"
+	fi
+}
+
+pkg_postinst() {
+	ghc-reregister
+
+	# path to the package.cache
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/${GHC_P}/package.conf.d/package.cache"
+
+	# give the cache a new timestamp, it must be as recent as
+	# the package.conf.d directory.
+	touch "${PKGCACHE}"
+
+	if [[ "${haskell_updater_warn}" == "1" ]]; then
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+		ewarn "You have just upgraded from an older version of GHC."
+		ewarn "You may have to run"
+		ewarn "      'haskell-updater'"
+		ewarn "to rebuild all ghc-based Haskell libraries."
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+	fi
+}
+
+pkg_prerm() {
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/${GHC_P}/package.conf.d/package.cache"
+	rm -rf "${PKGCACHE}"
+
+	cp -p "${PKGCACHE}"{.shipped,}
+}
+
+pkg_postrm() {
+	ghc-package_pkg_postrm
+}


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2015-08-28 21:50 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2015-08-28 21:50 UTC (permalink / raw
  To: gentoo-commits

commit:     f6fa6889c4c19340c23b8cd5c34cff167e1953ba
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 28 21:33:18 2015 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Aug 28 21:47:14 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6fa6889

dev-lang/ghc: get rid of ncurses dependency, take 2 on bug #557478

Commit 0fdbbebbdc4b18e4078870a6a579834c64177219 removed
dependency from ghc binary, but not ghc-pkg binary.

This commit fixes that omission and pulls in new binaries.

Bug: https://bugs.gentoo.org/557478

Package-Manager: portage-2.2.20

 dev-lang/ghc/Manifest             | 4 ++--
 dev-lang/ghc/ghc-7.10.2-r1.ebuild | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 24c2cab..2b1151c 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -6,8 +6,8 @@ DIST ghc-7.8.3-src.tar.xz 9160092 SHA256 b0cd96a549ba3b5e512847a4a8cd1a3174e4b2b
 DIST ghc-7.8.4-ia64-CLOSUREs-regenerated.patch.gz 13268 SHA256 3bdff22e654aee6f942d43edf1bf6cf70404c0152c4fcf89276f10d2c4c5b4b9 SHA512 a655713e06324b56f0041edf70837487e296d28e6f3ee35fe116b9938765aaf3469d25e92645e0940655ed3607dff27d3826fe0f995c84e81b51bfc956816e7d WHIRLPOOL d2cb53bdc6debc0278d554168ea3ab22b0fd8314adac81444637278a92d21b766280fedfb4b7d1b4540c7381c7962dec6b13a799ab2fee4d456fe2875d5c6a5b
 DIST ghc-7.8.4-src.tar.bz2 10600755 SHA256 59e3bd514a1820cc1c03e1808282205c0b8518369acae12645ceaf839e6f114b SHA512 079a53891d8ebd8d9b88da96170e60981608a619f8282e4b7948f35244e99bd87277649ac7fcebc227a61a4d21960db8d5e5b9e92f2c69c82d8d68d7fd0a41d3 WHIRLPOOL a9be7641adbd237ed6e0f644c312e655e98be9566097aee5e2c0022e8756d5b2236e42dd86d76c638a001b5ca3f67307e89ec0cd003a92cd112a5d6d3e3d8467
 DIST ghc-bin-7.10.2-amd64.tbz2 112028560 SHA256 536297ac402da44ec1aafb1a937960883d12d192db16715ca34ab6469773a4c7 SHA512 207d8032c99d52bf4215ddeea2dbcd5816bb8d4caf2c3c31190e3ca92b49667d98a4f97aaf4cd6b40090f150854d520f75b5420dfe1ade7f036cf35d3dcb5100 WHIRLPOOL 8e43956a61c2c0fead242e3b179cde4918c04f3db7dbb27cc986f00f981261d98028ead82548b87d183d8da928635d5db4aa62ff1161f4077e5370483530a316
-DIST ghc-bin-7.10.2-r1-amd64.tbz2 111915962 SHA256 3c5972b69be650bc2d3a07ff8a6be97a2d8fd07387aee155183960ebcd7bd60c SHA512 e87c7c177cbfac7e8206c3ad94ab36d568d3b294311b60df5db50e3c6d46e0b5fae77b8b74701b6920f419c0bc7f763fe478760f14b00c1fc18fb79e9b17bb4f WHIRLPOOL b5be3ef924d729e77626ce69859ffa8952e1f5053a36672cef5713aa60b7167ab9d3886cc8052cacfdb6756d50db444b3f80bca77a932719a16cc9b4583e8319
-DIST ghc-bin-7.10.2-r1-x86.tbz2 113566669 SHA256 d0ff86c34d009e7980d3b1ea85b24dfe3854d85cf2aece36dbad38078283a382 SHA512 a2bfef656603db15147399424733f1f97867b0ad883880ee8912bbbad7fe42646caf6023a17653119ad7ea246ffe3f2ecff5b924c6912c41fb601d51c032c2ce WHIRLPOOL 2f2d4accbbaa3202754a9463dc321d0b830bc4710db36c5ca4dcf3ae00882f34db16bf613ba52712671aee69bb5ae2747d12a29a520a29fd057c86ec20e53286
+DIST ghc-bin-7.10.2-r1-amd64-noncurses.tbz2 111863814 SHA256 782a68a13343ac8d6ed97540b411f714c4e826ccc3d152724198548c9240aceb SHA512 b154dbd7fb4fefc4283ec337b0c6ce6b6b6b3a62e9d889ca9c5dd5b5e5987f811a1c87845239ca94941afea630fc8bf1d8db94eb11a4023abd4b1d772dfb17c1 WHIRLPOOL 1e1f1ec82c831d115cd5f0b27f1914da94d92a9eca9af634210eb5f72b54281de6e08ea8e304bebaec8a456659b40866b9f0e24ef0e72c3f5a63d85296eb172a
+DIST ghc-bin-7.10.2-r1-x86-noncurses.tbz2 113572461 SHA256 3ad1e2888d26b6858cd1efe0e9863bc325b97c47be19fdd2e8dd5bbc86f7266b SHA512 573b7228b576a47ca1c3796cc2d4180a6c9dcaff58555cf52fc85a9b487920fc19487ff9ee8e0b6c33d6196ba05b9908f0d984bf3a4c0d91f52667e7389580a5 WHIRLPOOL 2c8cda95d04e9f345aa2f20fe8758761dd35648b788b7bf9b8f571687a8aae92456552883684d83ec2d2acaf22a002121643316df3c82349400c7de3d0300f7d
 DIST ghc-bin-7.10.2-x86.tbz2 113900477 SHA256 eefb7a3002e3dcdd6d936b2b2826eadf3cd100352babad4c9a355b944064240a SHA512 61dae4b9c80bfef6b1e0550c77b70f25d11f4a9fbe3b57d6c4ad451b4b584884432405d39dc32b9f85f3a5ad9d02657356ae0ebd99518848f3d330314c74b595 WHIRLPOOL da0d7eb62d2ee2aeb80a3f495da2ff123e29151b7517fbcd212f83ab3722638f10019511f4f237e8e001c68dd957ed2817fb0f1a2b42c2710239343f1d801496
 DIST ghc-bin-7.4.2-alpha.tbz2 130483507 SHA256 cd8e72e569574f137bf10fcdb4337bb0dc320deb2a2c4d72529a821735c53ae6 SHA512 6fb99dea706965afa60f4aeb68da3da1c69dda477f5fcfb4e67b73d75b78583193148ce9f623a356679a57f1a740f8010f28a22f08e56ace50f3fcd42142f83f WHIRLPOOL e5ec69ab24dc963ac709f13928c0e35931d5d50ca6b21dfb0aa79f9088c0ce1196b64bb4d9668e35d73dcdf9e2df9c3da59c95eaf3db8b793a6bb65b1f4ba6c0
 DIST ghc-bin-7.4.2-amd64-stable-glibc.tbz2 93139900 SHA256 f06dff00585cc1a8ecc8ac29aeca7fdc601d272eed29d7613f7a2f2924cad585 SHA512 9b725f2613dd9013851a16eaea4000ea424c51cbafa97d3860f120fdb9936247f8c65208775a80a2f49b74946ddda2e843a54dec00b78c521197374aa3dd2d50 WHIRLPOOL 9e2630b1de40a059c324be38a1fe68b16ea484bc7afc2a397ea05192263d1964aed1d29fde543622ceab12ed2df111204576fdc72b7e35b2bbf9c6b9519901d1

diff --git a/dev-lang/ghc/ghc-7.10.2-r1.ebuild b/dev-lang/ghc/ghc-7.10.2-r1.ebuild
index d830880..fe3ce0d 100644
--- a/dev-lang/ghc/ghc-7.10.2-r1.ebuild
+++ b/dev-lang/ghc/ghc-7.10.2-r1.ebuild
@@ -27,12 +27,12 @@ arch_binaries=""
 # sorted!
 #arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
 #arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PVR}-amd64.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PVR}-amd64-noncurses.tbz2 )"
 #arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
 #arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
 #arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PVR}-x86.tbz2 )"
+arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PVR}-x86-noncurses.tbz2 )"
 
 # various ports:
 #arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
@@ -529,7 +529,9 @@ src_configure() {
 			#  - embed libffi (default GHC behaviour)
 			#  - disable ncurses support for ghci (via haskeline)
 			#    https://bugs.gentoo.org/557478
+			#  - disable ncurses support for ghc-pkg
 			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
+			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
 		else
 			econf_args+=(--with-system-libffi)
 			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2016-02-10 23:04 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2016-02-10 23:04 UTC (permalink / raw
  To: gentoo-commits

commit:     9bc66f191869fb05fcdd07973782b2097497a7fc
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 10 23:03:28 2016 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Feb 10 23:03:36 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bc66f19

dev-lang/ghc: move QA_PREBUILT to pkg_setup(), bug #566534

Should fix paludis users.
The change requires yet unreleased portage 2.2.28
to make QA_PREBUILT work as expected.

Bug: https://bugs.gentoo.org/566534

Package-Manager: portage-2.2.27

 dev-lang/ghc/ghc-7.10.2-r1.ebuild | 6 +++---
 dev-lang/ghc/ghc-7.10.2.ebuild    | 6 +++---
 dev-lang/ghc/ghc-7.4.2.ebuild     | 5 +++--
 dev-lang/ghc/ghc-7.6.3-r1.ebuild  | 5 +++--
 dev-lang/ghc/ghc-7.8.3.ebuild     | 6 +++---
 dev-lang/ghc/ghc-7.8.4.ebuild     | 6 +++---
 6 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/dev-lang/ghc/ghc-7.10.2-r1.ebuild b/dev-lang/ghc/ghc-7.10.2-r1.ebuild
index fe3ce0d..c010b36 100644
--- a/dev-lang/ghc/ghc-7.10.2-r1.ebuild
+++ b/dev-lang/ghc/ghc-7.10.2-r1.ebuild
@@ -107,9 +107,6 @@ PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
 
 REQUIRED_USE="?? ( ghcbootstrap binary )"
 
-# yeah, top-level 'use' sucks. I'd like to have it in 'src_install()'
-use binary && QA_PREBUILT="*"
-
 # haskell libraries built with cabal in configure mode, #515354
 QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
 
@@ -317,6 +314,9 @@ relocate_ghc() {
 }
 
 pkg_setup() {
+	# quiet portage about prebuilt binaries
+	use binary && QA_PREBUILT="*"
+
 	[[ ${MERGE_TYPE} == binary ]] && return
 
 	if use ghcbootstrap; then

diff --git a/dev-lang/ghc/ghc-7.10.2.ebuild b/dev-lang/ghc/ghc-7.10.2.ebuild
index 21c79e5..719778c 100644
--- a/dev-lang/ghc/ghc-7.10.2.ebuild
+++ b/dev-lang/ghc/ghc-7.10.2.ebuild
@@ -107,9 +107,6 @@ PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
 
 REQUIRED_USE="?? ( ghcbootstrap binary )"
 
-# yeah, top-level 'use' sucks. I'd like to have it in 'src_install()'
-use binary && QA_PREBUILT="*"
-
 # haskell libraries built with cabal in configure mode, #515354
 QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
 
@@ -317,6 +314,9 @@ relocate_ghc() {
 }
 
 pkg_setup() {
+	# quiet portage about prebuilt binaries
+	use binary && QA_PREBUILT="*"
+
 	[[ ${MERGE_TYPE} == binary ]] && return
 
 	if use ghcbootstrap; then

diff --git a/dev-lang/ghc/ghc-7.4.2.ebuild b/dev-lang/ghc/ghc-7.4.2.ebuild
index 679f1ba..366f1d4 100644
--- a/dev-lang/ghc/ghc-7.4.2.ebuild
+++ b/dev-lang/ghc/ghc-7.4.2.ebuild
@@ -111,8 +111,6 @@ PDEPEND="
 # ia64 fails to return from STG GMP primitives (stage2 always SIGSEGVs)
 REQUIRED_USE="ia64? ( !gmp )"
 
-use binary && QA_PREBUILT="*"
-
 append-ghc-cflags() {
 	local flag compile assemble link
 	for flag in $*; do
@@ -248,6 +246,9 @@ relocate_ghc() {
 }
 
 pkg_setup() {
+	# quiet portage about prebuilt binaries
+	use binary && QA_PREBUILT="*"
+
 	if use ghcbootstrap; then
 		ewarn "You requested ghc bootstrapping, this is usually only used"
 		ewarn "by Gentoo developers to make binary .tbz2 packages for"

diff --git a/dev-lang/ghc/ghc-7.6.3-r1.ebuild b/dev-lang/ghc/ghc-7.6.3-r1.ebuild
index 5dc2f89..c5c2e89 100644
--- a/dev-lang/ghc/ghc-7.6.3-r1.ebuild
+++ b/dev-lang/ghc/ghc-7.6.3-r1.ebuild
@@ -122,8 +122,6 @@ PDEPEND="
 # ia64 fails to return from STG GMP primitives (stage2 always SIGSEGVs)
 REQUIRED_USE="ia64? ( !gmp )"
 
-use binary && QA_PREBUILT="*"
-
 # haskell libraries built with cabal in configure mode, #515354
 QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
 
@@ -301,6 +299,9 @@ relocate_ghc() {
 }
 
 pkg_setup() {
+	# quiet portage about prebuilt binaries
+	use binary && QA_PREBUILT="*"
+
 	if use ghcbootstrap; then
 		ewarn "You requested ghc bootstrapping, this is usually only used"
 		ewarn "by Gentoo developers to make binary .tbz2 packages for"

diff --git a/dev-lang/ghc/ghc-7.8.3.ebuild b/dev-lang/ghc/ghc-7.8.3.ebuild
index 2831f4d..8bc6574 100644
--- a/dev-lang/ghc/ghc-7.8.3.ebuild
+++ b/dev-lang/ghc/ghc-7.8.3.ebuild
@@ -97,9 +97,6 @@ PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
 
 REQUIRED_USE="?? ( ghcbootstrap binary )"
 
-# yeah, top-level 'use' sucks. I'd like to have it in 'src_install()'
-use binary && QA_PREBUILT="*"
-
 # haskell libraries built with cabal in configure mode, #515354
 QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
 
@@ -268,6 +265,9 @@ relocate_ghc() {
 }
 
 pkg_setup() {
+	# quiet portage about prebuilt binaries
+	use binary && QA_PREBUILT="*"
+
 	if use ghcbootstrap; then
 		ewarn "You requested ghc bootstrapping, this is usually only used"
 		ewarn "by Gentoo developers to make binary .tbz2 packages."

diff --git a/dev-lang/ghc/ghc-7.8.4.ebuild b/dev-lang/ghc/ghc-7.8.4.ebuild
index c7640dd..aa9c5cc 100644
--- a/dev-lang/ghc/ghc-7.8.4.ebuild
+++ b/dev-lang/ghc/ghc-7.8.4.ebuild
@@ -98,9 +98,6 @@ PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
 
 REQUIRED_USE="?? ( ghcbootstrap binary )"
 
-# yeah, top-level 'use' sucks. I'd like to have it in 'src_install()'
-use binary && QA_PREBUILT="*"
-
 # haskell libraries built with cabal in configure mode, #515354
 QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
 
@@ -269,6 +266,9 @@ relocate_ghc() {
 }
 
 pkg_setup() {
+	# quiet portage about prebuilt binaries
+	use binary && QA_PREBUILT="*"
+
 	[[ ${MERGE_TYPE} == binary ]] && return
 
 	if use ghcbootstrap; then


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2016-04-04 20:32 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2016-04-04 20:32 UTC (permalink / raw
  To: gentoo-commits

commit:     2f5165d7c2641dc54d4a2024c0a52ac865ea6334
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  4 20:30:53 2016 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Apr  4 20:30:53 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f5165d7

dev-lang/ghc: add ia64 binary for ghc-7.10.3

Package-Manager: portage-2.2.28

 dev-lang/ghc/Manifest          | 1 +
 dev-lang/ghc/ghc-7.10.3.ebuild | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 6a328ba..a9b82dc 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -13,6 +13,7 @@ DIST ghc-bin-7.10.2-r1-x86-noncurses.tbz2 113572461 SHA256 3ad1e2888d26b6858cd1e
 DIST ghc-bin-7.10.2-x86.tbz2 113900477 SHA256 eefb7a3002e3dcdd6d936b2b2826eadf3cd100352babad4c9a355b944064240a SHA512 61dae4b9c80bfef6b1e0550c77b70f25d11f4a9fbe3b57d6c4ad451b4b584884432405d39dc32b9f85f3a5ad9d02657356ae0ebd99518848f3d330314c74b595 WHIRLPOOL da0d7eb62d2ee2aeb80a3f495da2ff123e29151b7517fbcd212f83ab3722638f10019511f4f237e8e001c68dd957ed2817fb0f1a2b42c2710239343f1d801496
 DIST ghc-bin-7.10.3-alpha.tbz2 183558856 SHA256 780ac45b9b38fb40f08eeb7dae741649ac19dce2271df4bc764cac9be6c5c225 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230 WHIRLPOOL f488ecc945c6100ba86b9ae25eb6a472693556be0205a6c8634f2c235e779fe17b391ced7fec5d89c0c6c3d21583fe9f9b80bf628f3307890becf3f3ffb57a96
 DIST ghc-bin-7.10.3-amd64.tbz2 112040431 SHA256 c3c71aff288f7de2785d1c3d54f0fd636144eb3dcb590bdda087b0775203e517 SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558 WHIRLPOOL c2497a9565abf7d37e7928f508f7bf7241dd529aa252da708517f9f067e3d016341b7a73cac34888b99c9b84a8d01fd9e8d76f2b332d53e0d708b078f20ee807
+DIST ghc-bin-7.10.3-ia64.tbz2 238680956 SHA256 0da9b5966f0920341f4cf041b814817e1ed06060e8a491481ab19a68153767db SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5 WHIRLPOOL 9e059a953607b6477ea7c27bf55175d838c6aa3c57fcf92f13fa6112e9e728037073047be300a5a757395d759d30545546cb46816ec879a2d31c3c0a78868e42
 DIST ghc-bin-7.10.3-ppc.tbz2 125832171 SHA256 67817636f5b91e04ecf94972c0bfe8e4e95efde82c4e23495b869da750409822 SHA512 4eb111e3686656a83515f59d4ace8bc28806dcabfcee5201ce29aee38b8efcefaaf70c50bee55202c2d2abbfbf231a6b41df8b13199332c53055adb1754a3191 WHIRLPOOL 8ec420bebf60b059c10ff0985993def7d1f40919d82e94b845b918f9ca146c8dd087f2abe9c2c7744e0f53acb75a752f8f7f6b72dabc04752dac22045302db2f
 DIST ghc-bin-7.10.3-ppc64.tbz2 142469712 SHA256 c8fa2ea861d4c5373f7f67fd3a29db4e48593d669c8616c2f349592af7e4846f SHA512 eb59d3abc8b10010311d59df9473c5ea649eb0dd7f9ad41a1929a540a0ef8c20abaccd68254f8abab037fb1fc94d824f474e18e4316b8f2a7a954d0645a2a2a4 WHIRLPOOL 14ccfbcf818a80f1daf39b44dc7562304af925e548407ce0deecd2d4593f4e138da38cfe63d4e5b8b0303c0237c678c27eaac4331288ee9b9dcbcf8be7390f74
 DIST ghc-bin-7.10.3-sparc.tbz2 163105069 SHA256 b9ef4179d87f4a56e9a786b28b0674f817118c73784b0dce283affadab296875 SHA512 d467a42487378d7dee311eb33aa1c151f5c16a6e7a4ab5bd8177df229f474adf19da3e1ca1064943a40abafcab6852b0589dd34413da82b33a03ede1ac17bf5d WHIRLPOOL 26ecb662f1d0eae524388008c24b3d25f954668aba781e997afd934c10b379b32e3376bc3a1232b066de84d3e1d1ad838dcef667b0f7606d0ac52acd7ef78a72

diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
index d151a78..19a4046 100644
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -28,7 +28,7 @@ arch_binaries=""
 arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
 #arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
 arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PVR}-amd64.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64.tbz2 )"
 arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
 arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
 arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
@@ -46,7 +46,7 @@ yet_binary() {
 		#	return 0
 		#;;
 		amd64) return 0 ;;
-		#ia64) return 0 ;;
+		ia64) return 0 ;;
 		ppc) return 0 ;;
 		ppc64) return 0 ;;
 		sparc) return 0 ;;
@@ -73,7 +73,7 @@ BUMP_LIBRARIES=(
 
 LICENSE="BSD"
 SLOT="0/${PV}"
-KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
 IUSE="doc ghcbootstrap ghcmakebinary +gmp"
 IUSE+=" binary"
 IUSE+=" elibc_glibc" # system stuff


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2016-07-26  9:07 Benda XU
  0 siblings, 0 replies; 92+ messages in thread
From: Benda XU @ 2016-07-26  9:07 UTC (permalink / raw
  To: gentoo-commits

commit:     77b887acb894169e0c983b010dc43388f3c55b14
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 26 08:59:51 2016 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Tue Jul 26 09:05:45 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77b887ac

dev-lang/ghc: Prefixify STAGE0_AR.

Bug: 540168

Package-Manager: portage-2.3.0

 dev-lang/ghc/ghc-7.10.3.ebuild | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
index 9721ed4..78ebfbf 100644
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -16,7 +16,7 @@ if [[ ${CTARGET} = ${CHOST} ]] ; then
 fi
 
 inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib pax-utils toolchain-funcs versionator
+inherit multilib pax-utils toolchain-funcs versionator prefix
 
 DESCRIPTION="The Glasgow Haskell Compiler"
 HOMEPAGE="http://www.haskell.org/ghc/"
@@ -322,6 +322,7 @@ relocate_ghc() {
 			"${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
 			"$gp_back" \
 			|| die "Adding LD_LIBRARY_PATH for wrappers failed"
+		hprefixify "${bin_libpath}"/${PN}*/settings
 	fi
 
 	# regenerate the binary package cache


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2016-12-28 21:14 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2016-12-28 21:14 UTC (permalink / raw
  To: gentoo-commits

commit:     47eaa6c9ce342607d3185ee5c10fdf0b763ef52e
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 28 21:12:39 2016 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Dec 28 21:14:05 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47eaa6c9

dev-lang/ghc: add dependency on ncurses-5 ABI for ghc[binary], bug #603632

all existing GHC versions were built agains ncurses-5.
Pull in this binary depend when uses choses to install
ghc binary as-is.

Reported-by: Chris Henhawke
Bug: https://bugs.gentoo.org/603632

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-lang/ghc/ghc-7.10.2-r1.ebuild | 11 ++++++++++-
 dev-lang/ghc/ghc-7.10.2.ebuild    | 11 ++++++++++-
 dev-lang/ghc/ghc-7.10.3.ebuild    |  9 +++++++++
 dev-lang/ghc/ghc-7.8.3.ebuild     | 11 ++++++++++-
 dev-lang/ghc/ghc-7.8.4.ebuild     | 11 ++++++++++-
 5 files changed, 49 insertions(+), 4 deletions(-)

diff --git a/dev-lang/ghc/ghc-7.10.2-r1.ebuild b/dev-lang/ghc/ghc-7.10.2-r1.ebuild
index c010b36..13af9a4 100644
--- a/dev-lang/ghc/ghc-7.10.2-r1.ebuild
+++ b/dev-lang/ghc/ghc-7.10.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -90,6 +90,15 @@ RDEPEND="
 	kernel_linux? ( >=sys-devel/binutils-2.17:* )
 	kernel_SunOS? ( >=sys-devel/binutils-2.17:* )
 "
+# gentoo binaries are built against ncurses-5
+RDEPEND+="
+	binary? (
+		|| (
+			sys-libs/ncurses:0/5
+			sys-libs/ncurses:5/5
+		)
+	)
+"
 
 # force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
 # that we want the binaries to use the latest versioun available, and not to be

diff --git a/dev-lang/ghc/ghc-7.10.2.ebuild b/dev-lang/ghc/ghc-7.10.2.ebuild
index 719778c..7b04d83 100644
--- a/dev-lang/ghc/ghc-7.10.2.ebuild
+++ b/dev-lang/ghc/ghc-7.10.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -90,6 +90,15 @@ RDEPEND="
 	kernel_linux? ( >=sys-devel/binutils-2.17:* )
 	kernel_SunOS? ( >=sys-devel/binutils-2.17:* )
 "
+# gentoo binaries are built against ncurses-5
+RDEPEND+="
+	binary? (
+		|| (
+			sys-libs/ncurses:0/5
+			sys-libs/ncurses:5/5
+		)
+	)
+"
 
 # force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
 # that we want the binaries to use the latest versioun available, and not to be

diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
index 78ebfbf..b2d4287 100644
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -87,6 +87,15 @@ RDEPEND="
 	kernel_linux? ( >=sys-devel/binutils-2.17:* )
 	kernel_SunOS? ( >=sys-devel/binutils-2.17:* )
 "
+# gentoo binaries are built against ncurses-5
+RDEPEND+="
+	binary? (
+		|| (
+			sys-libs/ncurses:0/5
+			sys-libs/ncurses:5/5
+		)
+	)
+"
 
 # force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
 # that we want the binaries to use the latest versioun available, and not to be

diff --git a/dev-lang/ghc/ghc-7.8.3.ebuild b/dev-lang/ghc/ghc-7.8.3.ebuild
index 8bc6574..30b7aa5 100644
--- a/dev-lang/ghc/ghc-7.8.3.ebuild
+++ b/dev-lang/ghc/ghc-7.8.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -79,6 +79,15 @@ RDEPEND="
 	kernel_linux? ( >=sys-devel/binutils-2.17 )
 	kernel_SunOS? ( >=sys-devel/binutils-2.17 )
 "
+# gentoo binaries are built against ncurses-5
+RDEPEND+="
+	binary? (
+		|| (
+			sys-libs/ncurses:0/5
+			sys-libs/ncurses:5/5
+		)
+	)
+"
 
 # force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
 # that we want the binaries to use the latest versioun available, and not to be

diff --git a/dev-lang/ghc/ghc-7.8.4.ebuild b/dev-lang/ghc/ghc-7.8.4.ebuild
index aa9c5cc..941a063 100644
--- a/dev-lang/ghc/ghc-7.8.4.ebuild
+++ b/dev-lang/ghc/ghc-7.8.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -80,6 +80,15 @@ RDEPEND="
 	kernel_linux? ( >=sys-devel/binutils-2.17 )
 	kernel_SunOS? ( >=sys-devel/binutils-2.17 )
 "
+# gentoo binaries are built against ncurses-5
+RDEPEND+="
+	binary? (
+		|| (
+			sys-libs/ncurses:0/5
+			sys-libs/ncurses:5/5
+		)
+	)
+"
 
 # force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
 # that we want the binaries to use the latest versioun available, and not to be


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2016-12-28 22:49 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2016-12-28 22:49 UTC (permalink / raw
  To: gentoo-commits

commit:     c9344ef315e0eb124d93ac1277f9edeb223506fc
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 28 22:29:31 2016 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Dec 28 22:37:40 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9344ef3

dev-lang/ghc: drop outdated lower bound on gcc and binutils

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-lang/ghc/ghc-7.10.3.ebuild | 3 ---
 dev-lang/ghc/ghc-7.8.4.ebuild  | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
index b2d4287..ac9989c 100644
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -83,9 +83,6 @@ RDEPEND="
 	>=dev-libs/gmp-5:=
 	sys-libs/ncurses:=[unicode]
 	!ghcmakebinary? ( virtual/libffi:= )
-	!kernel_Darwin? ( >=sys-devel/gcc-2.95.3:* )
-	kernel_linux? ( >=sys-devel/binutils-2.17:* )
-	kernel_SunOS? ( >=sys-devel/binutils-2.17:* )
 "
 # gentoo binaries are built against ncurses-5
 RDEPEND+="

diff --git a/dev-lang/ghc/ghc-7.8.4.ebuild b/dev-lang/ghc/ghc-7.8.4.ebuild
index 941a063..33f4a99 100644
--- a/dev-lang/ghc/ghc-7.8.4.ebuild
+++ b/dev-lang/ghc/ghc-7.8.4.ebuild
@@ -76,9 +76,6 @@ RDEPEND="
 	>=dev-libs/gmp-5:=
 	sys-libs/ncurses:=[unicode]
 	!ghcmakebinary? ( virtual/libffi:= )
-	!kernel_Darwin? ( >=sys-devel/gcc-2.95.3 )
-	kernel_linux? ( >=sys-devel/binutils-2.17 )
-	kernel_SunOS? ( >=sys-devel/binutils-2.17 )
 "
 # gentoo binaries are built against ncurses-5
 RDEPEND+="


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-01-20 10:21 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-01-20 10:21 UTC (permalink / raw
  To: gentoo-commits

commit:     3433bd74edfc8eb4abd455fd6976af8599ab598b
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 20 10:20:36 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Jan 20 10:20:36 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3433bd74

dev-lang/ghc: added amd64 and x86 binaries for ghc-8.0.2

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-lang/ghc/Manifest         | 2 ++
 dev-lang/ghc/ghc-8.0.2.ebuild | 8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 8fd1e4e..d1c3031 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -17,5 +17,7 @@ DIST ghc-bin-7.8.4-ppc.tbz2 112803496 SHA256 a47e0fb17137878af1e7b5a166046bee20d
 DIST ghc-bin-7.8.4-ppc64.tbz2 129284515 SHA256 1e8a350af39d1db1e58a74c9bc4a4c57765eceb33e5b32751fb31340b9ff02ff SHA512 53974e15c26cf6b62d8f838607abd209ec57cf0f45fcc48b90ad62736f5e4e7ff263dcd326ae03d8d5557a22eb9730e5eb8ae4eda55e52dd3d973bc73c84935e WHIRLPOOL adaaa92323d319f6576423ac41678f7d263f36e0e30d89fc14ee89104b006772c26d7b408be7f85225d1bddaf5f15ebdcbb7136f5c8bf7bda4bb0938eefbe6c2
 DIST ghc-bin-7.8.4-sparc.tbz2 147340595 SHA256 1cde749ce3c47016c5c7a7179423d0aa2b174ddae4af0392ae3b7f57b098ec0c SHA512 ee5f0b2f1cf2693a0f2be9df71ef61b52bc2327225d40b8be955c1584b9901ffc6aaab63c1e46bf9bb352633b605c98378f8fd3e6cd71aef1c089007e4110217 WHIRLPOOL 27d55a016ffb49852553f920c29929c3bdf383e28b4b806ceb9ffc8b46a59b438801101402e498b069aa6eb56870b70a00ba7b1f4098f3fd8d8ddf1b20caa626
 DIST ghc-bin-7.8.4-x86.tbz2 102312459 SHA256 4c53148836e5a1ba55b8db5bb7c3eb915103e0955fb503b2facdc5a72f12a974 SHA512 cabc5bd6d8760ce4120e7053f6c1dffca7d161ba454b6201087760096c037c932e3ff8c82e53346c8278855bf0cff1c2f5fb8046242ca4d8307355b060a9556e WHIRLPOOL 0171d67dc1b63381a491e1577a783eb0e8f53cb579ba96a9b4fdf6685d494d78eb2be780f77ff33422d3b7c320ed102d9b48f6e954f8fee5532982575001a4a5
+DIST ghc-bin-8.0.2-amd64.tbz2 131007452 SHA256 d68b0682de40ff42b7f91ebd113d774cf5145cb9609c689e31cb1eaea75ee355 SHA512 d960c40966e392d5497f694f0b47df4a6ec22ad1b4a607437c8af7c33dfbf122ccefb525d807716539af57c31660378e52fc495dd0a1d0fc3bccaef3578be177 WHIRLPOOL af5703c3df66f61b82746d784d6c937ce490944f387354b90846bcda9dbb02ee226abe6715d227be34677890fd0e6865d046c10a24d1309e9b6d8875398d501b
+DIST ghc-bin-8.0.2-x86.tbz2 133372061 SHA256 5e56bff6831a9c151d5d6f82db49b21d33bea05f05cdf74fca5adc423d546711 SHA512 020ce0e597e2907550c080f1bb0f863dbf83d5d45df2b3f44173506475bc4ef5423c5a060fdacd87614c3ec398ad94c2dcab9cff0376a54a2c54c2eb1e2f657d WHIRLPOOL 221eae08caff5c2157fae7df901c94d6d1393be3ab0526bb9d8a80d4304af4c4a420fcc2fe62926bf01c3bb02f161f1eb61c7eb47d3c6801cfacb25c1a33e983
 DIST hoopl-3.10.2.0.tar.gz 241940 SHA256 6740814c774e51815e8260ae1b4ac8af6ab69f02e112904450f689c4792f1121 SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a WHIRLPOOL 761e7440d2bc32b594ab55ea967c5b075bb638b2fdba6606beaf9c31a90e20031e914146828004b3d11203668210a6994be9fabc3b0ebb428d516b57cae9ee68
 DIST transformers-0.4.3.0.tar.gz 28632 SHA256 b3d0a797e815ca50d411e20c02f781efe7751308007d880af7f0b5c4365c3a9d SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780 WHIRLPOOL 89591781926b1d025056dedcfc5de61705056c1e3a8eba72f2e89789e78d2ed4d8909f84d6560dfc66bc0b360f98cb3dc3835f3a05c2325f747498373c88aa4b

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index 2cba08e..53d6413 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -27,12 +27,12 @@ arch_binaries=""
 # sorted!
 #arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
 #arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
-#arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
 #arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
 #arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
 #arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
-#arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86.tbz2 )"
+arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86.tbz2 )"
 
 # various ports:
 #arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
@@ -45,12 +45,12 @@ yet_binary() {
 		#	ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
 		#	return 0
 		#;;
-		#amd64) return 0 ;;
+		amd64) return 0 ;;
 		#ia64) return 0 ;;
 		#ppc) return 0 ;;
 		#ppc64) return 0 ;;
 		#sparc) return 0 ;;
-		#x86) return 0 ;;
+		x86) return 0 ;;
 		*) return 1 ;;
 	esac
 }


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-02-14 22:16 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-02-14 22:16 UTC (permalink / raw
  To: gentoo-commits

commit:     8274b84fb061ddcb1318f1ba5625b41b197e6987
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 14 10:01:08 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Feb 14 22:16:39 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8274b84f

ghc: spell '-nopie' as '-no-pie' for gcc-6.3.0, bug #606666

Gentoo upstreamed -pie/-nopie patch to GCC upstream but
there is a twist: '-nopie' gentoo flag became '-no-pie'.

But at least '-no-pie' is accessible in both vanilla
and hardened profiles of gcc-6.3.0.

Reported-by: Toralf Förster
Bug: https://bugs.gentoo.org/606666
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/ghc-7.10.3.ebuild | 10 ++++++++--
 dev-lang/ghc/ghc-8.0.2.ebuild  | 10 ++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
index ac9989cf6e..a963d059c6 100644
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -244,9 +244,15 @@ ghc_setup_cflags() {
 		append-ghc-cflags link ${flag}
 	done
 
-	# hardened-gcc needs to be disabled, because the mangler doesn't accept
-	# its output.
+	# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
+	# are not built with fPIC, bug #606666
 	gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
+	tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
+		# gcc-6.3 has support for -no-pie upstream, but spelling differs from
+		# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
+		# hardened users try '-pie' in USE=ghcbootstrap mode.
+		append-ghc-cflags persistent compile link -no-pie
+	fi
 	gcc-specs-ssp && append-ghc-cflags persistent compile      -fno-stack-protector
 
 	# prevent from failind building unregisterised ghc:

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index e6dc320cb7..e5abb43d94 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -236,9 +236,15 @@ ghc_setup_cflags() {
 		append-ghc-cflags link ${flag}
 	done
 
-	# hardened-gcc needs to be disabled, because the mangler doesn't accept
-	# its output.
+	# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
+	# are not built with fPIC, bug #606666
 	gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
+	tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
+		# gcc-6.3 has support for -no-pie upstream, but spelling differs from
+		# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
+		# hardened users try '-pie' in USE=ghcbootstrap mode.
+		append-ghc-cflags persistent compile link -no-pie
+	fi
 	gcc-specs-ssp && append-ghc-cflags persistent compile      -fno-stack-protector
 
 	# prevent from failind building unregisterised ghc:


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-02-14 22:16 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-02-14 22:16 UTC (permalink / raw
  To: gentoo-commits

commit:     4118fb63e77746ea1b9104ade24703c06e9be629
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 14 22:15:58 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Feb 14 22:16:40 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4118fb63

dev-lang/ghc: add alpha binary for 8.0.2

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-lang/ghc/Manifest         | 1 +
 dev-lang/ghc/ghc-8.0.2.ebuild | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index d1c3031be9..e19abd1c5c 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -17,6 +17,7 @@ DIST ghc-bin-7.8.4-ppc.tbz2 112803496 SHA256 a47e0fb17137878af1e7b5a166046bee20d
 DIST ghc-bin-7.8.4-ppc64.tbz2 129284515 SHA256 1e8a350af39d1db1e58a74c9bc4a4c57765eceb33e5b32751fb31340b9ff02ff SHA512 53974e15c26cf6b62d8f838607abd209ec57cf0f45fcc48b90ad62736f5e4e7ff263dcd326ae03d8d5557a22eb9730e5eb8ae4eda55e52dd3d973bc73c84935e WHIRLPOOL adaaa92323d319f6576423ac41678f7d263f36e0e30d89fc14ee89104b006772c26d7b408be7f85225d1bddaf5f15ebdcbb7136f5c8bf7bda4bb0938eefbe6c2
 DIST ghc-bin-7.8.4-sparc.tbz2 147340595 SHA256 1cde749ce3c47016c5c7a7179423d0aa2b174ddae4af0392ae3b7f57b098ec0c SHA512 ee5f0b2f1cf2693a0f2be9df71ef61b52bc2327225d40b8be955c1584b9901ffc6aaab63c1e46bf9bb352633b605c98378f8fd3e6cd71aef1c089007e4110217 WHIRLPOOL 27d55a016ffb49852553f920c29929c3bdf383e28b4b806ceb9ffc8b46a59b438801101402e498b069aa6eb56870b70a00ba7b1f4098f3fd8d8ddf1b20caa626
 DIST ghc-bin-7.8.4-x86.tbz2 102312459 SHA256 4c53148836e5a1ba55b8db5bb7c3eb915103e0955fb503b2facdc5a72f12a974 SHA512 cabc5bd6d8760ce4120e7053f6c1dffca7d161ba454b6201087760096c037c932e3ff8c82e53346c8278855bf0cff1c2f5fb8046242ca4d8307355b060a9556e WHIRLPOOL 0171d67dc1b63381a491e1577a783eb0e8f53cb579ba96a9b4fdf6685d494d78eb2be780f77ff33422d3b7c320ed102d9b48f6e954f8fee5532982575001a4a5
+DIST ghc-bin-8.0.2-alpha.tbz2 234361847 SHA256 fbf8f0662cd2ed7f8c233bbc176fcbc050f90dd627acf0729626d6d96798baf8 SHA512 c8b588feeab85f7b8fd60e2e8bf755d46790d4882d2ecf6b2c8b8e02c62a11b7e6453bf0cfbc646bfbf24310fdc775337f3957ba5783675a271b68f0af2e9070 WHIRLPOOL fbd9cdbab00daad446f0110c2bb989189248ecd4ef504f57c874caf2845f863d4800940ee69c328b8dfa5eb4adf57698a16c1b2921cba149485bb4df206fe8a0
 DIST ghc-bin-8.0.2-amd64.tbz2 131007452 SHA256 d68b0682de40ff42b7f91ebd113d774cf5145cb9609c689e31cb1eaea75ee355 SHA512 d960c40966e392d5497f694f0b47df4a6ec22ad1b4a607437c8af7c33dfbf122ccefb525d807716539af57c31660378e52fc495dd0a1d0fc3bccaef3578be177 WHIRLPOOL af5703c3df66f61b82746d784d6c937ce490944f387354b90846bcda9dbb02ee226abe6715d227be34677890fd0e6865d046c10a24d1309e9b6d8875398d501b
 DIST ghc-bin-8.0.2-x86.tbz2 133372061 SHA256 5e56bff6831a9c151d5d6f82db49b21d33bea05f05cdf74fca5adc423d546711 SHA512 020ce0e597e2907550c080f1bb0f863dbf83d5d45df2b3f44173506475bc4ef5423c5a060fdacd87614c3ec398ad94c2dcab9cff0376a54a2c54c2eb1e2f657d WHIRLPOOL 221eae08caff5c2157fae7df901c94d6d1393be3ab0526bb9d8a80d4304af4c4a420fcc2fe62926bf01c3bb02f161f1eb61c7eb47d3c6801cfacb25c1a33e983
 DIST hoopl-3.10.2.0.tar.gz 241940 SHA256 6740814c774e51815e8260ae1b4ac8af6ab69f02e112904450f689c4792f1121 SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a WHIRLPOOL 761e7440d2bc32b594ab55ea967c5b075bb638b2fdba6606beaf9c31a90e20031e914146828004b3d11203668210a6994be9fabc3b0ebb428d516b57cae9ee68

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index e5abb43d94..343ddb109f 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -25,7 +25,7 @@ HOMEPAGE="http://www.haskell.org/ghc/"
 arch_binaries=""
 
 # sorted!
-#arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
+arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
 #arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
 arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
 #arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
@@ -40,7 +40,7 @@ arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc
 # 0 - yet
 yet_binary() {
 	case "${ARCH}" in
-		#alpha) return 0 ;;
+		alpha) return 0 ;;
 		#arm)
 		#	ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
 		#	return 0


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-02-14 22:59 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-02-14 22:59 UTC (permalink / raw
  To: gentoo-commits

commit:     f00e5e7c8c577f25ccae203241d96eb7f4db4e51
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 14 22:56:22 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Feb 14 22:56:22 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f00e5e7c

dev-lang/ghc: keyword alpha as we have binaries for it

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-lang/ghc/ghc-8.0.2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index 343ddb109f..f4392497ce 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -70,7 +70,7 @@ BUMP_LIBRARIES=(
 
 LICENSE="BSD"
 SLOT="0/${PV}"
-#KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~alpha ~amd64 ~x86 ~amd64-linux ~x86-linux"
 IUSE="doc ghcbootstrap ghcmakebinary +gmp +profile"
 IUSE+=" binary"
 


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-02-18 12:12 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-02-18 12:12 UTC (permalink / raw
  To: gentoo-commits

commit:     c007515ecb55f7791845c59a3b49bd7ee8aa792f
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 18 12:10:55 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Feb 18 12:12:50 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c007515e

dev-lang/ghc: do not persist '-no-pie' in ghc wrapper, bug #609624

This fixes build failure of shared libraries on gcc-6.3.0
Reported-by: Helmut Jarausch
Bug: https://bugs.gentoo.org/609624

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-lang/ghc/ghc-7.10.3.ebuild | 2 +-
 dev-lang/ghc/ghc-8.0.2.ebuild  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
index a963d059c6..40d8745f70 100644
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -251,7 +251,7 @@ ghc_setup_cflags() {
 		# gcc-6.3 has support for -no-pie upstream, but spelling differs from
 		# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
 		# hardened users try '-pie' in USE=ghcbootstrap mode.
-		append-ghc-cflags persistent compile link -no-pie
+		append-ghc-cflags compile link -no-pie
 	fi
 	gcc-specs-ssp && append-ghc-cflags persistent compile      -fno-stack-protector
 

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index 1b6e172721..79e0333ca9 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -243,7 +243,7 @@ ghc_setup_cflags() {
 		# gcc-6.3 has support for -no-pie upstream, but spelling differs from
 		# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
 		# hardened users try '-pie' in USE=ghcbootstrap mode.
-		append-ghc-cflags persistent compile link -no-pie
+		append-ghc-cflags compile link -no-pie
 	fi
 
 	# prevent from failind building unregisterised ghc:


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-02-18 12:12 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-02-18 12:12 UTC (permalink / raw
  To: gentoo-commits

commit:     8cee49e4a6c8d9ec80faa4054b621467450d3ebb
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 18 12:09:08 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Feb 18 12:12:50 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cee49e4

dev-lang/ghc: drop '-fno-stack-protector'

GHC does not use Evil Mangler any more thus
GHC should not care about stack protection in C code.

It should just work.

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-lang/ghc/ghc-8.0.2.ebuild | 1 -
 1 file changed, 1 deletion(-)

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index f4392497ce..1b6e172721 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -245,7 +245,6 @@ ghc_setup_cflags() {
 		# hardened users try '-pie' in USE=ghcbootstrap mode.
 		append-ghc-cflags persistent compile link -no-pie
 	fi
-	gcc-specs-ssp && append-ghc-cflags persistent compile      -fno-stack-protector
 
 	# prevent from failind building unregisterised ghc:
 	# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-03-19 10:28 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-03-19 10:28 UTC (permalink / raw
  To: gentoo-commits

commit:     5580e8b52f6fa65dc33c0cda24ec11ce3bf39b28
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 19 10:27:50 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Mar 19 10:28:09 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5580e8b5

dev-lang/ghc: added 'arm64' binary, built by Alexander Adler

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 dev-lang/ghc/Manifest         | 1 +
 dev-lang/ghc/ghc-8.0.2.ebuild | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index e19abd1c5cf..b53fcb59087 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -19,6 +19,7 @@ DIST ghc-bin-7.8.4-sparc.tbz2 147340595 SHA256 1cde749ce3c47016c5c7a7179423d0aa2
 DIST ghc-bin-7.8.4-x86.tbz2 102312459 SHA256 4c53148836e5a1ba55b8db5bb7c3eb915103e0955fb503b2facdc5a72f12a974 SHA512 cabc5bd6d8760ce4120e7053f6c1dffca7d161ba454b6201087760096c037c932e3ff8c82e53346c8278855bf0cff1c2f5fb8046242ca4d8307355b060a9556e WHIRLPOOL 0171d67dc1b63381a491e1577a783eb0e8f53cb579ba96a9b4fdf6685d494d78eb2be780f77ff33422d3b7c320ed102d9b48f6e954f8fee5532982575001a4a5
 DIST ghc-bin-8.0.2-alpha.tbz2 234361847 SHA256 fbf8f0662cd2ed7f8c233bbc176fcbc050f90dd627acf0729626d6d96798baf8 SHA512 c8b588feeab85f7b8fd60e2e8bf755d46790d4882d2ecf6b2c8b8e02c62a11b7e6453bf0cfbc646bfbf24310fdc775337f3957ba5783675a271b68f0af2e9070 WHIRLPOOL fbd9cdbab00daad446f0110c2bb989189248ecd4ef504f57c874caf2845f863d4800940ee69c328b8dfa5eb4adf57698a16c1b2921cba149485bb4df206fe8a0
 DIST ghc-bin-8.0.2-amd64.tbz2 131007452 SHA256 d68b0682de40ff42b7f91ebd113d774cf5145cb9609c689e31cb1eaea75ee355 SHA512 d960c40966e392d5497f694f0b47df4a6ec22ad1b4a607437c8af7c33dfbf122ccefb525d807716539af57c31660378e52fc495dd0a1d0fc3bccaef3578be177 WHIRLPOOL af5703c3df66f61b82746d784d6c937ce490944f387354b90846bcda9dbb02ee226abe6715d227be34677890fd0e6865d046c10a24d1309e9b6d8875398d501b
+DIST ghc-bin-8.0.2-arm64.tbz2 191332951 SHA256 eb016875bb7bed6a03c72f142d05e2c4992526d4b5c674810fff723240b62b28 SHA512 b9cabfda8fc6e851ba99f53274c1a63c5a6a365311a9203f1247ecf90ab843dd94960ad44c4e67032f4690f07d67bfd8bdfbe59f857d6c63344430539e2082fc WHIRLPOOL e70f703acddf5e1778533ff221aa6dd0149e0381dfee352be66d72996bd67752bf17fc550dd27c7cf0a34e2f81995126b6edcb1f9c39f3e281a8bbd9f99a0735
 DIST ghc-bin-8.0.2-x86.tbz2 133372061 SHA256 5e56bff6831a9c151d5d6f82db49b21d33bea05f05cdf74fca5adc423d546711 SHA512 020ce0e597e2907550c080f1bb0f863dbf83d5d45df2b3f44173506475bc4ef5423c5a060fdacd87614c3ec398ad94c2dcab9cff0376a54a2c54c2eb1e2f657d WHIRLPOOL 221eae08caff5c2157fae7df901c94d6d1393be3ab0526bb9d8a80d4304af4c4a420fcc2fe62926bf01c3bb02f161f1eb61c7eb47d3c6801cfacb25c1a33e983
 DIST hoopl-3.10.2.0.tar.gz 241940 SHA256 6740814c774e51815e8260ae1b4ac8af6ab69f02e112904450f689c4792f1121 SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a WHIRLPOOL 761e7440d2bc32b594ab55ea967c5b075bb638b2fdba6606beaf9c31a90e20031e914146828004b3d11203668210a6994be9fabc3b0ebb428d516b57cae9ee68
 DIST transformers-0.4.3.0.tar.gz 28632 SHA256 b3d0a797e815ca50d411e20c02f781efe7751308007d880af7f0b5c4365c3a9d SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780 WHIRLPOOL 89591781926b1d025056dedcfc5de61705056c1e3a8eba72f2e89789e78d2ed4d8909f84d6560dfc66bc0b360f98cb3dc3835f3a05c2325f747498373c88aa4b

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index 3bb09c6851d..5dc0277ec6f 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -26,6 +26,7 @@ arch_binaries=""
 # sorted!
 arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
 #arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
+arch_binaries="$arch_binaries arm64? ( http://code.haskell.org/~slyfox/ghc-arm64/ghc-bin-${PV}-arm64.tbz2 )"
 arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
 #arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
@@ -40,6 +41,7 @@ arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc
 yet_binary() {
 	case "${ARCH}" in
 		alpha) return 0 ;;
+		arm64) return 0 ;;
 		#arm)
 		#	ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
 		#	return 0


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-05-28  0:41 Benda XU
  0 siblings, 0 replies; 92+ messages in thread
From: Benda XU @ 2017-05-28  0:41 UTC (permalink / raw
  To: gentoo-commits

commit:     5743a390cd13fabfe096738328a2a83bd5691708
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Sun May 28 00:27:24 2017 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Sun May 28 00:41:15 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5743a390

dev-lang/ghc: drop outdated docbook xsl prefix hacks.

  sys-libs/ncurses:5/6 SLOT has been removed.

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-lang/ghc/ghc-8.0.2.ebuild | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index 6ca4874cefe..606ecbb43d3 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -84,10 +84,7 @@ RDEPEND="
 # gentoo binaries are built against ncurses-6
 RDEPEND+="
 	binary? (
-		|| (
-			sys-libs/ncurses:0/6
-			sys-libs/ncurses:5/6
-		)
+		sys-libs/ncurses:0/6
 	)
 "
 
@@ -461,12 +458,6 @@ src_prepare() {
 		epatch "${FILESDIR}"/${PN}-8.0.2-libffi-alpha.patch
 		epatch "${FILESDIR}"/${PN}-8.0.2-O2-unreg.patch
 
-		if use prefix; then
-			# Make configure find docbook-xsl-stylesheets from Prefix
-			sed -e '/^FP_DIR_DOCBOOK_XSL/s:\[.*\]:['"${EPREFIX}"'/usr/share/sgml/docbook/xsl-stylesheets/]:' \
-				-i utils/haddock/doc/configure.ac || die
-		fi
-
 		bump_libs
 
 		# as we have changed the build system


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-06-20 21:56 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-06-20 21:56 UTC (permalink / raw
  To: gentoo-commits

commit:     952b12ef5a379a6b99f81b54990dac18455b1326
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 20 21:55:40 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Jun 20 21:55:55 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=952b12ef

dev-lang/ghc: disable parallel 'make install' until it gets fixed upstream

While at it added binaries for ppc, ppc64 (BE), ia64.

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-lang/ghc/Manifest         |  3 +++
 dev-lang/ghc/ghc-8.0.2.ebuild | 14 +++++++-------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index b53fcb59087..bbffd086951 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -20,6 +20,9 @@ DIST ghc-bin-7.8.4-x86.tbz2 102312459 SHA256 4c53148836e5a1ba55b8db5bb7c3eb91510
 DIST ghc-bin-8.0.2-alpha.tbz2 234361847 SHA256 fbf8f0662cd2ed7f8c233bbc176fcbc050f90dd627acf0729626d6d96798baf8 SHA512 c8b588feeab85f7b8fd60e2e8bf755d46790d4882d2ecf6b2c8b8e02c62a11b7e6453bf0cfbc646bfbf24310fdc775337f3957ba5783675a271b68f0af2e9070 WHIRLPOOL fbd9cdbab00daad446f0110c2bb989189248ecd4ef504f57c874caf2845f863d4800940ee69c328b8dfa5eb4adf57698a16c1b2921cba149485bb4df206fe8a0
 DIST ghc-bin-8.0.2-amd64.tbz2 131007452 SHA256 d68b0682de40ff42b7f91ebd113d774cf5145cb9609c689e31cb1eaea75ee355 SHA512 d960c40966e392d5497f694f0b47df4a6ec22ad1b4a607437c8af7c33dfbf122ccefb525d807716539af57c31660378e52fc495dd0a1d0fc3bccaef3578be177 WHIRLPOOL af5703c3df66f61b82746d784d6c937ce490944f387354b90846bcda9dbb02ee226abe6715d227be34677890fd0e6865d046c10a24d1309e9b6d8875398d501b
 DIST ghc-bin-8.0.2-arm64.tbz2 191332951 SHA256 eb016875bb7bed6a03c72f142d05e2c4992526d4b5c674810fff723240b62b28 SHA512 b9cabfda8fc6e851ba99f53274c1a63c5a6a365311a9203f1247ecf90ab843dd94960ad44c4e67032f4690f07d67bfd8bdfbe59f857d6c63344430539e2082fc WHIRLPOOL e70f703acddf5e1778533ff221aa6dd0149e0381dfee352be66d72996bd67752bf17fc550dd27c7cf0a34e2f81995126b6edcb1f9c39f3e281a8bbd9f99a0735
+DIST ghc-bin-8.0.2-ia64.tbz2 250237654 SHA256 f3e74db697900d031c4d405310c3bf3f40f663c5029b51039358914f835b8287 SHA512 e8cb381de12ccc0a7b513683deb5de555fecea22a735d09b073b0199ab4124305bbd8a093b4710b827513d33fd4224007e7bd210b146508eb183be7dfd283a26 WHIRLPOOL 284d780f6d3f7b786209ef5cbf844df37b3cda89ad4c2c7e6ffbe8bd4f890f512f4fbfef28373a40f91f0644ef4fb0ce49a3425cac9431bdaa1bb90e3aa810ec
+DIST ghc-bin-8.0.2-ppc.tbz2 144760090 SHA256 a261dd97df396296d1a94c311c757040f74284b812634d97734557915d0a44ca SHA512 bc6bf8998064ffc1692c3bb83c44d1787760a3f4a1e6b79dedaefda5fe32b9052049a60f0ddd3c0b0bd24a722fb35e310e0189b3511721ff89d4d02b3d7c14bb WHIRLPOOL b070acb230dccc2faed66002f4384c8c9b17ce58655b5861766582558a66236136b1d02ab6226c7de5c74960c7d2d37c3c0069e38dfa980730043f623df4baa6
+DIST ghc-bin-8.0.2-ppc64.tbz2 117432068 SHA256 f2eb278c4d40d92233767d48149ec96a6c6097159ec846a984152c99a559803a SHA512 0eaff0557b68649a15bbeb2019f46fa9e9e7b8a916aa210ab56888090a5b887d20d818e7987177bc6a8e7fde503de560026e6bb55fe39679b8b1ee13c6b7c4f9 WHIRLPOOL 8a4ba955183cb7c94ecb59f62eab18a4ee75aa422d3c6e7172d347112b8445dccf86c718fcd84d3271dcb1f35fee0451fece184840403a02f7ed8bb39785075e
 DIST ghc-bin-8.0.2-x86.tbz2 133372061 SHA256 5e56bff6831a9c151d5d6f82db49b21d33bea05f05cdf74fca5adc423d546711 SHA512 020ce0e597e2907550c080f1bb0f863dbf83d5d45df2b3f44173506475bc4ef5423c5a060fdacd87614c3ec398ad94c2dcab9cff0376a54a2c54c2eb1e2f657d WHIRLPOOL 221eae08caff5c2157fae7df901c94d6d1393be3ab0526bb9d8a80d4304af4c4a420fcc2fe62926bf01c3bb02f161f1eb61c7eb47d3c6801cfacb25c1a33e983
 DIST hoopl-3.10.2.0.tar.gz 241940 SHA256 6740814c774e51815e8260ae1b4ac8af6ab69f02e112904450f689c4792f1121 SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a WHIRLPOOL 761e7440d2bc32b594ab55ea967c5b075bb638b2fdba6606beaf9c31a90e20031e914146828004b3d11203668210a6994be9fabc3b0ebb428d516b57cae9ee68
 DIST transformers-0.4.3.0.tar.gz 28632 SHA256 b3d0a797e815ca50d411e20c02f781efe7751308007d880af7f0b5c4365c3a9d SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780 WHIRLPOOL 89591781926b1d025056dedcfc5de61705056c1e3a8eba72f2e89789e78d2ed4d8909f84d6560dfc66bc0b360f98cb3dc3835f3a05c2325f747498373c88aa4b

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index 606ecbb43d3..35b9ae7f93a 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -28,9 +28,9 @@ arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha
 #arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
 arch_binaries="$arch_binaries arm64? ( http://code.haskell.org/~slyfox/ghc-arm64/ghc-bin-${PV}-arm64.tbz2 )"
 arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
+arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64.tbz2 )"
+arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
+arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
 #arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
 arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86.tbz2 )"
 
@@ -47,9 +47,9 @@ yet_binary() {
 		#	return 0
 		#;;
 		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		#ppc64) return 0 ;;
+		ia64) return 0 ;;
+		ppc) return 0 ;;
+		ppc64) return 0 ;;
 		#sparc) return 0 ;;
 		x86) return 0 ;;
 		*) return 1 ;;
@@ -564,7 +564,7 @@ src_install() {
 		mv "${S}/usr" "${ED}"
 	else
 
-		emake install DESTDIR="${D}"
+		emake -j1 install DESTDIR="${D}"
 		dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
 
 		# rename ghc-shipped files to avoid collision


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-07-03 19:57 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-07-03 19:57 UTC (permalink / raw
  To: gentoo-commits

commit:     43fbec44acb0b56b2443f99e0994d5636c98d916
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  3 19:57:17 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Jul  3 19:57:27 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43fbec44

dev-lang/ghc: add a ncurses:5/5 binary dependency, bug #561276

Reported-by: Erich Seifert
Bug: https://bugs.gentoo.org/561276
Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-lang/ghc/ghc-7.10.3.ebuild | 21 +++++++--------------
 dev-lang/ghc/ghc-7.8.4.ebuild  | 21 +++++++--------------
 dev-lang/ghc/ghc-8.0.2.ebuild  | 12 ++++++------
 3 files changed, 20 insertions(+), 34 deletions(-)

diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
index 9945f481669..fb6bc873376 100644
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -83,27 +83,20 @@ RDEPEND="
 	sys-libs/ncurses:=[unicode]
 	!ghcmakebinary? ( virtual/libffi:= )
 "
-# gentoo binaries are built against ncurses-5
-RDEPEND+="
-	binary? (
-		|| (
-			sys-libs/ncurses:0/5
-			sys-libs/ncurses:5/5
-		)
-	)
+
+PREBUILT_BINARY_DEPENDS="
+	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+	sys-libs/ncurses:5/5
 "
 
-# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
-# that we want the binaries to use the latest versioun available, and not to be
-# built against gmp-4
+RDEPEND+="binary? ( ${PREBUILT_BINARY_DEPENDS} )"
 
-# similar for glibc. we have bootstrapped binaries against glibc-2.17
 DEPEND="${RDEPEND}
 	doc? ( app-text/docbook-xml-dtd:4.2
 		app-text/docbook-xml-dtd:4.5
 		app-text/docbook-xsl-stylesheets
 		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) )"
+	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
 
 PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
 

diff --git a/dev-lang/ghc/ghc-7.8.4.ebuild b/dev-lang/ghc/ghc-7.8.4.ebuild
index 00c4b0e0dfa..659446b80e5 100644
--- a/dev-lang/ghc/ghc-7.8.4.ebuild
+++ b/dev-lang/ghc/ghc-7.8.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -76,28 +76,21 @@ RDEPEND="
 	sys-libs/ncurses:=[unicode]
 	!ghcmakebinary? ( virtual/libffi:= )
 "
-# gentoo binaries are built against ncurses-5
-RDEPEND+="
-	binary? (
-		|| (
-			sys-libs/ncurses:0/5
-			sys-libs/ncurses:5/5
-		)
-	)
+
+PREBUILT_BINARY_DEPENDS="
+	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+	sys-libs/ncurses:5/5
 "
 
-# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
-# that we want the binaries to use the latest versioun available, and not to be
-# built against gmp-4
+RDEPEND+="binary? ( ${PREBUILT_BINARY_DEPENDS} )"
 
-# similar for glibc. we have bootstrapped binaries against glibc-2.17
 DEPEND="${RDEPEND}
 	ghcbootstrap? (
 		doc? ( app-text/docbook-xml-dtd:4.2
 			app-text/docbook-xml-dtd:4.5
 			app-text/docbook-xsl-stylesheets
 			>=dev-libs/libxslt-1.1.2 ) )
-	!ghcbootstrap? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) )"
+	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
 
 PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
 

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index 35b9ae7f93a..61c62ccf6fa 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -81,20 +81,20 @@ RDEPEND="
 	sys-libs/ncurses:=[unicode]
 	!ghcmakebinary? ( virtual/libffi:= )
 "
-# gentoo binaries are built against ncurses-6
-RDEPEND+="
-	binary? (
-		sys-libs/ncurses:0/6
-	)
+
+PREBUILT_BINARY_DEPENDS="
+	sys-libs/ncurses:0/6
 "
 
+RDEPEND+="binary? ( ${PREBUILT_BINARY_DEPENDS} )"
+
 DEPEND="${RDEPEND}
 	doc? ( app-text/docbook-xml-dtd:4.2
 		app-text/docbook-xml-dtd:4.5
 		app-text/docbook-xsl-stylesheets
 		dev-python/sphinx
 		>=dev-libs/libxslt-1.1.2 )
-"
+	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
 
 PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
 


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-07-08 11:59 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-07-08 11:59 UTC (permalink / raw
  To: gentoo-commits

commit:     0dc53bf2e8d10a09a892b5427009412ced1d65b0
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Jul  8 11:59:44 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Jul  8 11:59:52 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0dc53bf2

dev-lang/ghc: add check for disk space requirement, bug #611866

Reported-by: Mike Limansky
Bug: https://bugs.gentoo.org/611866
Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-lang/ghc/ghc-8.0.2.ebuild | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index 61c62ccf6fa..4ba077cf90b 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -16,7 +16,7 @@ fi
 
 inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib pax-utils toolchain-funcs versionator prefix
-
+inherit check-reqs
 DESCRIPTION="The Glasgow Haskell Compiler"
 HOMEPAGE="http://www.haskell.org/ghc/"
 
@@ -327,7 +327,21 @@ relocate_ghc() {
 	rm "$gp_back"
 }
 
+pkg_pretend() {
+	# These are pessimistic values (slightly bigger than worst-case)
+	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
+	# numbers on various arches.
+	CHECKREQS_DISK_BUILD=8G
+	CHECKREQS_DISK_USR=2G
+	# USE=binary roughly takes
+	use binary && CHECKREQS_DISK_BUILD=4G
+
+	check-reqs_pkg_pretend
+}
+
 pkg_setup() {
+	check-reqs_pkg_setup
+
 	# quiet portage about prebuilt binaries
 	use binary && QA_PREBUILT="*"
 


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-07-08 13:18 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-07-08 13:18 UTC (permalink / raw
  To: gentoo-commits

commit:     d1798083a2a89196960d9fde2d053cab9f6f991b
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Jul  8 13:17:56 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Jul  8 13:18:12 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1798083

dev-lang/ghc: fix check-reqs usage

Apparently pkg_pretend / pkg_setup don't share global environment.

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-lang/ghc/ghc-8.0.2.ebuild | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index 4ba077cf90b..1fd964ad314 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -327,7 +327,7 @@ relocate_ghc() {
 	rm "$gp_back"
 }
 
-pkg_pretend() {
+ghc-check-reqs() {
 	# These are pessimistic values (slightly bigger than worst-case)
 	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
 	# numbers on various arches.
@@ -336,11 +336,15 @@ pkg_pretend() {
 	# USE=binary roughly takes
 	use binary && CHECKREQS_DISK_BUILD=4G
 
-	check-reqs_pkg_pretend
+	"$@"
+}
+
+pkg_pretend() {
+	ghc-check-reqs check-reqs_pkg_pretend
 }
 
 pkg_setup() {
-	check-reqs_pkg_setup
+	ghc-check-reqs check-reqs_pkg_setup
 
 	# quiet portage about prebuilt binaries
 	use binary && QA_PREBUILT="*"


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-07-11 20:45 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-07-11 20:45 UTC (permalink / raw
  To: gentoo-commits

commit:     9caff4ab10a45797edba0d91ee4991613301d57d
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 11 20:45:06 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Jul 11 20:45:14 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9caff4ab

dev-lang/ghc: remove build-type dependency on ncurses, bug #561276

Re-adding ncurses:5 buildtime-only dependency was
an accidental bug. ghc binaries explicitly avoid
ncurses for bootstrap.

Reported-by: Zac Medico
Bug: https://bugs.gentoo.org/561276
Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-lang/ghc/ghc-7.10.3.ebuild | 11 ++++++++++-
 dev-lang/ghc/ghc-8.0.2.ebuild  | 12 +++++++++++-
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
index fb6bc873376..71edaa18a56 100644
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -84,12 +84,21 @@ RDEPEND="
 	!ghcmakebinary? ( virtual/libffi:= )
 "
 
+# This set of dependencies is needed to run
+# prebuilt ghc. We specifically avoid ncurses
+# dependency with:
+#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
 PREBUILT_BINARY_DEPENDS="
 	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+"
+# This set of dependencies is needed to install
+# ghc[binary] in system. terminfo package is linked
+# against ncurses.
+PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
 	sys-libs/ncurses:5/5
 "
 
-RDEPEND+="binary? ( ${PREBUILT_BINARY_DEPENDS} )"
+RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
 
 DEPEND="${RDEPEND}
 	doc? ( app-text/docbook-xml-dtd:4.2

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index 1fd964ad314..bed207b7b13 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -82,11 +82,21 @@ RDEPEND="
 	!ghcmakebinary? ( virtual/libffi:= )
 "
 
+# This set of dependencies is needed to run
+# prebuilt ghc. We specifically avoid ncurses
+# dependency with:
+#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
 PREBUILT_BINARY_DEPENDS="
+	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+"
+# This set of dependencies is needed to install
+# ghc[binary] in system. terminfo package is linked
+# against ncurses.
+PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
 	sys-libs/ncurses:0/6
 "
 
-RDEPEND+="binary? ( ${PREBUILT_BINARY_DEPENDS} )"
+RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
 
 DEPEND="${RDEPEND}
 	doc? ( app-text/docbook-xml-dtd:4.2


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-07-11 21:57 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-07-11 21:57 UTC (permalink / raw
  To: gentoo-commits

commit:     f970bb21ed1d00e29cde151e96e499841c18d92d
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 11 21:57:19 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Jul 11 21:57:32 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f970bb21

dev-lang/ghc: explicitly pin to libs+headers slot of ncurses

sys-libs/ncurses:= can match sys-libs/ncurses:5.
To build ghc we always need sys-libs/ncurses:0=.

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-lang/ghc/ghc-7.10.3.ebuild | 2 +-
 dev-lang/ghc/ghc-7.8.4.ebuild  | 2 +-
 dev-lang/ghc/ghc-8.0.2.ebuild  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
index 71edaa18a56..4afb2420ef3 100644
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -80,7 +80,7 @@ IUSE+=" elibc_glibc" # system stuff
 RDEPEND="
 	>=dev-lang/perl-5.6.1
 	>=dev-libs/gmp-5:=
-	sys-libs/ncurses:=[unicode]
+	sys-libs/ncurses:0=[unicode]
 	!ghcmakebinary? ( virtual/libffi:= )
 "
 

diff --git a/dev-lang/ghc/ghc-7.8.4.ebuild b/dev-lang/ghc/ghc-7.8.4.ebuild
index 659446b80e5..16a49986a1c 100644
--- a/dev-lang/ghc/ghc-7.8.4.ebuild
+++ b/dev-lang/ghc/ghc-7.8.4.ebuild
@@ -73,7 +73,7 @@ IUSE+=" elibc_glibc" # system stuff
 RDEPEND="
 	>=dev-lang/perl-5.6.1
 	>=dev-libs/gmp-5:=
-	sys-libs/ncurses:=[unicode]
+	sys-libs/ncurses:0=[unicode]
 	!ghcmakebinary? ( virtual/libffi:= )
 "
 

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index bed207b7b13..67329545ec0 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -78,7 +78,7 @@ IUSE+=" binary"
 RDEPEND="
 	>=dev-lang/perl-5.6.1
 	dev-libs/gmp:0=
-	sys-libs/ncurses:=[unicode]
+	sys-libs/ncurses:0=[unicode]
 	!ghcmakebinary? ( virtual/libffi:= )
 "
 


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-07-12 20:16 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-07-12 20:16 UTC (permalink / raw
  To: gentoo-commits

commit:     73b0ef093676404c24ee4672252b932a758b1966
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 12 20:14:35 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Jul 12 20:15:56 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73b0ef09

dev-lang/ghc: guard manuals building behind USE=doc

Building ghc.1 needs sphinx present in system.

Reported-by: Patrick McLean
Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-lang/ghc/ghc-8.0.2.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index 67329545ec0..dd4d223aeb6 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -514,6 +514,7 @@ src_configure() {
 		# app-text/dblatex is not in portage, can not build PDF or PS
 		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
 		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
+		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
 
 		# this controls presence on 'xhtml' and 'haddock' in final install
 		echo "HADDOCK_DOCS       = YES" >> mk/build.mk


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-09-02 20:29 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-09-02 20:29 UTC (permalink / raw
  To: gentoo-commits

commit:     4036e4259226158fe95da9dbe4bf255976783532
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  2 20:29:26 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Sep  2 20:29:36 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4036e425

dev-lang/ghc: update A variable to match .xz tarball

*-darwin hardcodes tarball extension to avoid our
prebuilt binaries. Bug noticed by yuuko.

Package-Manager: Portage-2.3.8, Repoman-2.3.3

 dev-lang/ghc/ghc-8.0.2.ebuild | 2 +-
 dev-lang/ghc/ghc-8.2.1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index dd4d223aeb6..de344882f22 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -384,7 +384,7 @@ src_unpack() {
 	# unpacked separately, so prevent them from being unpacked
 	local ONLYA=${A}
 	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.bz2  ;;
+		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
 	esac
 	unpack ${ONLYA}
 }

diff --git a/dev-lang/ghc/ghc-8.2.1.ebuild b/dev-lang/ghc/ghc-8.2.1.ebuild
index 56c31c83f65..d15bb059b7b 100644
--- a/dev-lang/ghc/ghc-8.2.1.ebuild
+++ b/dev-lang/ghc/ghc-8.2.1.ebuild
@@ -390,7 +390,7 @@ src_unpack() {
 	# unpacked separately, so prevent them from being unpacked
 	local ONLYA=${A}
 	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.bz2  ;;
+		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
 	esac
 	unpack ${ONLYA}
 }


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-09-02 20:50 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-09-02 20:50 UTC (permalink / raw
  To: gentoo-commits

commit:     d5afe5a31f0d3f3be042cf9c7bfd703127cfccdc
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  2 20:43:00 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Sep  2 20:50:31 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5afe5a3

dev-lang/ghc: drop attemp to sed non-existing utils/haddock/doc/configure.ac

Noticed by yuuko

Package-Manager: Portage-2.3.8, Repoman-2.3.3

 dev-lang/ghc/ghc-8.2.1.ebuild | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/dev-lang/ghc/ghc-8.2.1.ebuild b/dev-lang/ghc/ghc-8.2.1.ebuild
index d15bb059b7b..753ef86b498 100644
--- a/dev-lang/ghc/ghc-8.2.1.ebuild
+++ b/dev-lang/ghc/ghc-8.2.1.ebuild
@@ -505,12 +505,6 @@ src_prepare() {
 			epatch "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
 		popd
 
-		if use prefix; then
-			# Make configure find docbook-xsl-stylesheets from Prefix
-			sed -e '/^FP_DIR_DOCBOOK_XSL/s:\[.*\]:['"${EPREFIX}"'/usr/share/sgml/docbook/xsl-stylesheets/]:' \
-				-i utils/haddock/doc/configure.ac || die
-		fi
-
 		bump_libs
 
 		# as we have changed the build system


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-11-24  7:52 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-11-24  7:52 UTC (permalink / raw
  To: gentoo-commits

commit:     a6af937438bbd6d88028a5cda7ff8ba20a16721e
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 24 07:52:12 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Nov 24 07:52:31 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6af9374

dev-lang/ghc: drop LD_LIBRARY_PATH hack, bug #637532

LD_LIBRARY_PATH only worked for prefix systems using
host's libc.

On systems with prefix/libc it causes host's ld.so to
load prefix's libc.so. They are incompatible as ld.so
relies on presence of certain private symbols libc.so

Reported-by:  Horea Christian
Bug: https://bugs.gentoo.org/637532
Package-Manager: Portage-2.3.16, Repoman-2.3.6

 dev-lang/ghc/Manifest          | 62 +++++++++++++++++++++---------------------
 dev-lang/ghc/ghc-7.10.3.ebuild | 11 --------
 dev-lang/ghc/ghc-7.8.4.ebuild  | 15 ----------
 dev-lang/ghc/ghc-8.0.2.ebuild  | 11 --------
 dev-lang/ghc/ghc-8.2.1.ebuild  | 11 --------
 dev-lang/ghc/metadata.xml      |  4 +--
 6 files changed, 33 insertions(+), 81 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 1e20c41e682..c5a0c097149 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -1,31 +1,31 @@
-DIST binary-0.7.6.1.tar.gz 47086 SHA256 8f85cafc15be660757878a665d024ce595d4422fead174e20a501c9ec8f81067 SHA512 655daa93a52b845a85d440810452933d7bc3398ad1b51e1e955b2d19a0a32679325a0d1751ad50d252531e493528262e14dab32af4b9a515855fe7f64e0730b2 WHIRLPOOL 6853eb2c817e8ae792226c6c7764ce495833f965c3d503fe7e39c0502019d12f7bd46309b72dfdb276c7dbce8c004cb59fdea4936d69ede0a7c8b487acda2702
-DIST ghc-7.10.3-src.tar.bz2 13281867 SHA256 3e29a56a74ed6a74d3ee2a6db9389f2462837da46ca6dce9d2965f9c152f0c15 SHA512 97a8282d8a75399c78d85d6faab7ac253a993dc69f1840358572f1878b8fd1a527c28801e5823c8200b5690e268e4a0c00941945ada13790852c75a83b612c17 WHIRLPOOL 04af6ea2738a1cc9e266efbb0e1b41b70d4cd915b48ca1265fade62b1c56cd51056fd1a82fc14cebc19a0c16782609a991c1a181ebe59574f1a10b4f26ad830d
-DIST ghc-7.8.4-ia64-CLOSUREs-regenerated.patch.gz 13268 SHA256 3bdff22e654aee6f942d43edf1bf6cf70404c0152c4fcf89276f10d2c4c5b4b9 SHA512 a655713e06324b56f0041edf70837487e296d28e6f3ee35fe116b9938765aaf3469d25e92645e0940655ed3607dff27d3826fe0f995c84e81b51bfc956816e7d WHIRLPOOL d2cb53bdc6debc0278d554168ea3ab22b0fd8314adac81444637278a92d21b766280fedfb4b7d1b4540c7381c7962dec6b13a799ab2fee4d456fe2875d5c6a5b
-DIST ghc-7.8.4-src.tar.bz2 10600755 SHA256 59e3bd514a1820cc1c03e1808282205c0b8518369acae12645ceaf839e6f114b SHA512 079a53891d8ebd8d9b88da96170e60981608a619f8282e4b7948f35244e99bd87277649ac7fcebc227a61a4d21960db8d5e5b9e92f2c69c82d8d68d7fd0a41d3 WHIRLPOOL a9be7641adbd237ed6e0f644c312e655e98be9566097aee5e2c0022e8756d5b2236e42dd86d76c638a001b5ca3f67307e89ec0cd003a92cd112a5d6d3e3d8467
-DIST ghc-8.0.2-src.tar.xz 10687760 SHA256 11625453e1d0686b3fa6739988f70ecac836cadc30b9f0c8b49ef9091d6118b1 SHA512 58ea3853cd93b556ecdc4abd0be079b2621171b8491f59004ea4e036a4cba4470aaafe6591b942e0a50a64bdc47540e01fe6900212a1ef7087850112d9bfc5ef WHIRLPOOL 5ffd94f797c32c87d9d818acbb1a41f2c140d6f1da169854aab6eece7a41499b55fc573f9a4fbcccf09dcfc92e460d8c91be5efd8650837e8bfba009b04261b1
-DIST ghc-8.2.1-src.tar.xz 10736016 SHA256 cfc2d496708dacea3ea7dde4c6a4b921b97a7f550ee2acea44cfa535840593f0 SHA512 d9aa2aa7f9414db8f4e51d6c275694b46df515e68331a1a2b6018256333a2c63ebd877b75ee90407ecce5be672ec9afc6bebd62aadbf8ae06b94f1760d1736be WHIRLPOOL ecbdf8e3f330ef329fab21865c5f063763a2320e03063aeb8777f6c4769a86b33504c0548df9c6ce859028277851e6e7482b7c3b62986c6186745f894e7567d9
-DIST ghc-bin-7.10.3-alpha.tbz2 183558856 SHA256 780ac45b9b38fb40f08eeb7dae741649ac19dce2271df4bc764cac9be6c5c225 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230 WHIRLPOOL f488ecc945c6100ba86b9ae25eb6a472693556be0205a6c8634f2c235e779fe17b391ced7fec5d89c0c6c3d21583fe9f9b80bf628f3307890becf3f3ffb57a96
-DIST ghc-bin-7.10.3-amd64.tbz2 112040431 SHA256 c3c71aff288f7de2785d1c3d54f0fd636144eb3dcb590bdda087b0775203e517 SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558 WHIRLPOOL c2497a9565abf7d37e7928f508f7bf7241dd529aa252da708517f9f067e3d016341b7a73cac34888b99c9b84a8d01fd9e8d76f2b332d53e0d708b078f20ee807
-DIST ghc-bin-7.10.3-ia64.tbz2 238680956 SHA256 0da9b5966f0920341f4cf041b814817e1ed06060e8a491481ab19a68153767db SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5 WHIRLPOOL 9e059a953607b6477ea7c27bf55175d838c6aa3c57fcf92f13fa6112e9e728037073047be300a5a757395d759d30545546cb46816ec879a2d31c3c0a78868e42
-DIST ghc-bin-7.10.3-ppc.tbz2 125832171 SHA256 67817636f5b91e04ecf94972c0bfe8e4e95efde82c4e23495b869da750409822 SHA512 4eb111e3686656a83515f59d4ace8bc28806dcabfcee5201ce29aee38b8efcefaaf70c50bee55202c2d2abbfbf231a6b41df8b13199332c53055adb1754a3191 WHIRLPOOL 8ec420bebf60b059c10ff0985993def7d1f40919d82e94b845b918f9ca146c8dd087f2abe9c2c7744e0f53acb75a752f8f7f6b72dabc04752dac22045302db2f
-DIST ghc-bin-7.10.3-ppc64.tbz2 142469712 SHA256 c8fa2ea861d4c5373f7f67fd3a29db4e48593d669c8616c2f349592af7e4846f SHA512 eb59d3abc8b10010311d59df9473c5ea649eb0dd7f9ad41a1929a540a0ef8c20abaccd68254f8abab037fb1fc94d824f474e18e4316b8f2a7a954d0645a2a2a4 WHIRLPOOL 14ccfbcf818a80f1daf39b44dc7562304af925e548407ce0deecd2d4593f4e138da38cfe63d4e5b8b0303c0237c678c27eaac4331288ee9b9dcbcf8be7390f74
-DIST ghc-bin-7.10.3-sparc.tbz2 163105069 SHA256 b9ef4179d87f4a56e9a786b28b0674f817118c73784b0dce283affadab296875 SHA512 d467a42487378d7dee311eb33aa1c151f5c16a6e7a4ab5bd8177df229f474adf19da3e1ca1064943a40abafcab6852b0589dd34413da82b33a03ede1ac17bf5d WHIRLPOOL 26ecb662f1d0eae524388008c24b3d25f954668aba781e997afd934c10b379b32e3376bc3a1232b066de84d3e1d1ad838dcef667b0f7606d0ac52acd7ef78a72
-DIST ghc-bin-7.10.3-x86.tbz2 113877175 SHA256 a06d54e7256292123b49c4d429761794b53d2440d2efeb98bcfe79920c65b044 SHA512 75096fe9106d975c15e646b0a559c544621fd02791f491bce54926efabf0e55b97150069ddfa7a9f02cc30bb6975d3d3121a82207a9f67b8dda5ebfe17ec4744 WHIRLPOOL 63fea83be14ae317f313251b7c952c974a8e4f9671d78d1b3ef77c3ab317d2194faddc8d71431c5e1fc42215abed1842913f2f40ba383288784e984c47cd27f0
-DIST ghc-bin-7.8.4-alpha.tbz2 210691009 SHA256 23c9e5ef97b444fa87d3b9509a7b2b7b68c526ca4139739dd60c08fb1279d48a SHA512 f08230de82f0c4112da9d0b48227ca74d5d0b4a84046d746b023557b7aeeb9678f5ac037fe89a863178df4b9036e5c5c63182d14dfbb42c772011de883e3966f WHIRLPOOL d624b4d5eac8aa68f389b81e68d7fa2ea960c9b9c5fabb27ddf4da5140c18fd0ee9080725fb645e2c532bb0a01ade32da2cf6aac08707f9d89a94ea9752b8e72
-DIST ghc-bin-7.8.4-amd64.tbz2 100573133 SHA256 bd9d144c08caa0ff345ada8d7eed7592531b8f8b9ef2f94d0b9a42fd747440aa SHA512 e4416d6dae3c644f74bafb3aecf1a123f985427aba32d0e0c43143a137d64a9220fc5947cd9bde8a3bc44555ae71184fc06a3f7df7976aadd065ad5681b90954 WHIRLPOOL ab0bd6219d68e08cb473cf2f3f15538d65940f28e84f026361032c3a6bc09f7820faf67629e915f27c2afda7de41fa9c6010a1b5cd487df0936d968c7e58a3a4
-DIST ghc-bin-7.8.4-ia64.tbz2 222789275 SHA256 8bbbc11ba64d08bad691593afafc4c6a7cf078b10cf33cb8508bf0a0b3ccf523 SHA512 2d8b89e399cbe9bfeae29cf3ceea736bfaa65ea21483fa2ee95d9814e122fcfbb67ce22ad8175493fab088e9a9d0139610c67e9d5c8b4f797b5e14846df32b6e WHIRLPOOL 181d48bbb53d181c8febf63ddae620bec1a6c212a5b5bf938228689df2ff45ba68d7d4a99ebb1b68aa516d5633be41125321e3f8fdef6e5f0cd1e4a7f9b8774c
-DIST ghc-bin-7.8.4-ppc.tbz2 112803496 SHA256 a47e0fb17137878af1e7b5a166046bee20d456d49da6ba8cde990173f4b3be8d SHA512 9581f55a088e53edcc969960e45c9ad7227d71198ce2d241a4a066a138450a879287e55e7d2210e86143670539711387e36c7f60660c4422dc1b4122278fe4a0 WHIRLPOOL 4904414cbfafdb48f0539b071fe80568da74beb174948ee426da5c22acf1d0c35ade89d2e160ddd109d2fbc0a508459a8e249f3b732b88735070b9522b417108
-DIST ghc-bin-7.8.4-ppc64.tbz2 129284515 SHA256 1e8a350af39d1db1e58a74c9bc4a4c57765eceb33e5b32751fb31340b9ff02ff SHA512 53974e15c26cf6b62d8f838607abd209ec57cf0f45fcc48b90ad62736f5e4e7ff263dcd326ae03d8d5557a22eb9730e5eb8ae4eda55e52dd3d973bc73c84935e WHIRLPOOL adaaa92323d319f6576423ac41678f7d263f36e0e30d89fc14ee89104b006772c26d7b408be7f85225d1bddaf5f15ebdcbb7136f5c8bf7bda4bb0938eefbe6c2
-DIST ghc-bin-7.8.4-sparc.tbz2 147340595 SHA256 1cde749ce3c47016c5c7a7179423d0aa2b174ddae4af0392ae3b7f57b098ec0c SHA512 ee5f0b2f1cf2693a0f2be9df71ef61b52bc2327225d40b8be955c1584b9901ffc6aaab63c1e46bf9bb352633b605c98378f8fd3e6cd71aef1c089007e4110217 WHIRLPOOL 27d55a016ffb49852553f920c29929c3bdf383e28b4b806ceb9ffc8b46a59b438801101402e498b069aa6eb56870b70a00ba7b1f4098f3fd8d8ddf1b20caa626
-DIST ghc-bin-7.8.4-x86.tbz2 102312459 SHA256 4c53148836e5a1ba55b8db5bb7c3eb915103e0955fb503b2facdc5a72f12a974 SHA512 cabc5bd6d8760ce4120e7053f6c1dffca7d161ba454b6201087760096c037c932e3ff8c82e53346c8278855bf0cff1c2f5fb8046242ca4d8307355b060a9556e WHIRLPOOL 0171d67dc1b63381a491e1577a783eb0e8f53cb579ba96a9b4fdf6685d494d78eb2be780f77ff33422d3b7c320ed102d9b48f6e954f8fee5532982575001a4a5
-DIST ghc-bin-8.0.2-alpha.tbz2 234361847 SHA256 fbf8f0662cd2ed7f8c233bbc176fcbc050f90dd627acf0729626d6d96798baf8 SHA512 c8b588feeab85f7b8fd60e2e8bf755d46790d4882d2ecf6b2c8b8e02c62a11b7e6453bf0cfbc646bfbf24310fdc775337f3957ba5783675a271b68f0af2e9070 WHIRLPOOL fbd9cdbab00daad446f0110c2bb989189248ecd4ef504f57c874caf2845f863d4800940ee69c328b8dfa5eb4adf57698a16c1b2921cba149485bb4df206fe8a0
-DIST ghc-bin-8.0.2-amd64.tbz2 131007452 SHA256 d68b0682de40ff42b7f91ebd113d774cf5145cb9609c689e31cb1eaea75ee355 SHA512 d960c40966e392d5497f694f0b47df4a6ec22ad1b4a607437c8af7c33dfbf122ccefb525d807716539af57c31660378e52fc495dd0a1d0fc3bccaef3578be177 WHIRLPOOL af5703c3df66f61b82746d784d6c937ce490944f387354b90846bcda9dbb02ee226abe6715d227be34677890fd0e6865d046c10a24d1309e9b6d8875398d501b
-DIST ghc-bin-8.0.2-arm64.tbz2 191332951 SHA256 eb016875bb7bed6a03c72f142d05e2c4992526d4b5c674810fff723240b62b28 SHA512 b9cabfda8fc6e851ba99f53274c1a63c5a6a365311a9203f1247ecf90ab843dd94960ad44c4e67032f4690f07d67bfd8bdfbe59f857d6c63344430539e2082fc WHIRLPOOL e70f703acddf5e1778533ff221aa6dd0149e0381dfee352be66d72996bd67752bf17fc550dd27c7cf0a34e2f81995126b6edcb1f9c39f3e281a8bbd9f99a0735
-DIST ghc-bin-8.0.2-ia64.tbz2 250237654 SHA256 f3e74db697900d031c4d405310c3bf3f40f663c5029b51039358914f835b8287 SHA512 e8cb381de12ccc0a7b513683deb5de555fecea22a735d09b073b0199ab4124305bbd8a093b4710b827513d33fd4224007e7bd210b146508eb183be7dfd283a26 WHIRLPOOL 284d780f6d3f7b786209ef5cbf844df37b3cda89ad4c2c7e6ffbe8bd4f890f512f4fbfef28373a40f91f0644ef4fb0ce49a3425cac9431bdaa1bb90e3aa810ec
-DIST ghc-bin-8.0.2-ppc.tbz2 144760090 SHA256 a261dd97df396296d1a94c311c757040f74284b812634d97734557915d0a44ca SHA512 bc6bf8998064ffc1692c3bb83c44d1787760a3f4a1e6b79dedaefda5fe32b9052049a60f0ddd3c0b0bd24a722fb35e310e0189b3511721ff89d4d02b3d7c14bb WHIRLPOOL b070acb230dccc2faed66002f4384c8c9b17ce58655b5861766582558a66236136b1d02ab6226c7de5c74960c7d2d37c3c0069e38dfa980730043f623df4baa6
-DIST ghc-bin-8.0.2-ppc64.tbz2 117432068 SHA256 f2eb278c4d40d92233767d48149ec96a6c6097159ec846a984152c99a559803a SHA512 0eaff0557b68649a15bbeb2019f46fa9e9e7b8a916aa210ab56888090a5b887d20d818e7987177bc6a8e7fde503de560026e6bb55fe39679b8b1ee13c6b7c4f9 WHIRLPOOL 8a4ba955183cb7c94ecb59f62eab18a4ee75aa422d3c6e7172d347112b8445dccf86c718fcd84d3271dcb1f35fee0451fece184840403a02f7ed8bb39785075e
-DIST ghc-bin-8.0.2-x86.tbz2 133372061 SHA256 5e56bff6831a9c151d5d6f82db49b21d33bea05f05cdf74fca5adc423d546711 SHA512 020ce0e597e2907550c080f1bb0f863dbf83d5d45df2b3f44173506475bc4ef5423c5a060fdacd87614c3ec398ad94c2dcab9cff0376a54a2c54c2eb1e2f657d WHIRLPOOL 221eae08caff5c2157fae7df901c94d6d1393be3ab0526bb9d8a80d4304af4c4a420fcc2fe62926bf01c3bb02f161f1eb61c7eb47d3c6801cfacb25c1a33e983
-DIST ghc-bin-8.2.1-i686-pc-linux-gnu.tbz2 96157437 SHA256 2a05584fd51a4e9040a3611a0687d814b62b28c5ccd4102b00cf8bbfecadeec9 SHA512 e891e76557fa61853e28829b8bedc4a6abb92954f90cc1ebcf22a13cc137556bbe9262e7398b7e1aedbabeb997916b008bf1561a52f16a569f3d58ea9404f41e WHIRLPOOL c955dbc501b6c3effe08a91ba8b6584e74b224427c56232744c4ddedad72039e2cdb2f3ea1193e6ae2e7fd8a46a947cf7a835399c81f5dd5568c3ce1ad8a5adc
-DIST ghc-bin-8.2.1-x86_64-pc-linux-gnu.tbz2 97490496 SHA256 b67f4f7518a4e2ec5cfc0434dde0365cbfe37c4c7e164e9e8e38199bb6f083cd SHA512 52630a185d0eab56bce0469a612a54109895bfee041ec362ced59a9b35ba3b9c185e86bc7dbf0a5939081d3626baa19fbb3306e36d1857530248a7b9bfc100bb WHIRLPOOL 7998e0c351bd6943bd351909f5e9af0146a3e08f04141fc54807ebea994e4bbcec44247c885865eaa5af8786dfb514eed4fffc35ffaabe81f2d7f8a856ed10d9
-DIST hoopl-3.10.2.0.tar.gz 241940 SHA256 6740814c774e51815e8260ae1b4ac8af6ab69f02e112904450f689c4792f1121 SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a WHIRLPOOL 761e7440d2bc32b594ab55ea967c5b075bb638b2fdba6606beaf9c31a90e20031e914146828004b3d11203668210a6994be9fabc3b0ebb428d516b57cae9ee68
-DIST transformers-0.4.3.0.tar.gz 28632 SHA256 b3d0a797e815ca50d411e20c02f781efe7751308007d880af7f0b5c4365c3a9d SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780 WHIRLPOOL 89591781926b1d025056dedcfc5de61705056c1e3a8eba72f2e89789e78d2ed4d8909f84d6560dfc66bc0b360f98cb3dc3835f3a05c2325f747498373c88aa4b
+DIST binary-0.7.6.1.tar.gz 47086 BLAKE2B 7d81b9c254902d5ff2bafbef4c31a6f6f0396202d8585690c1ae3b63ae6ed157db7221d65a62e393ee8f6725ffd5d80e51030c0351e954b06004fcb70e5867cd SHA512 655daa93a52b845a85d440810452933d7bc3398ad1b51e1e955b2d19a0a32679325a0d1751ad50d252531e493528262e14dab32af4b9a515855fe7f64e0730b2
+DIST ghc-7.10.3-src.tar.bz2 13281867 BLAKE2B 51b0a94cc63269926fd5d04c0fb0871266c45b3168187b891127db71980d180668fb8ef7adc51a7a3df947ecc93b4d4a06965ccf9ef53eb74ed063c54adfebde SHA512 97a8282d8a75399c78d85d6faab7ac253a993dc69f1840358572f1878b8fd1a527c28801e5823c8200b5690e268e4a0c00941945ada13790852c75a83b612c17
+DIST ghc-7.8.4-ia64-CLOSUREs-regenerated.patch.gz 13268 BLAKE2B 35af21163e3a46ee340e29eb88daf617eeb094f02da7fdcb80e947c1d26234232b12d9eb2c38c02c3207c047573521fef3ac5e7b87609e66f0c57072fef1038e SHA512 a655713e06324b56f0041edf70837487e296d28e6f3ee35fe116b9938765aaf3469d25e92645e0940655ed3607dff27d3826fe0f995c84e81b51bfc956816e7d
+DIST ghc-7.8.4-src.tar.bz2 10600755 BLAKE2B 6cf27f663178513b25032b648cf36b016e01361966725dbfc219079961e8eb9b1ab3531427c7012dc599e8e102dc87ed6dd43b31e7bd4e231e2d989936eb2c66 SHA512 079a53891d8ebd8d9b88da96170e60981608a619f8282e4b7948f35244e99bd87277649ac7fcebc227a61a4d21960db8d5e5b9e92f2c69c82d8d68d7fd0a41d3
+DIST ghc-8.0.2-src.tar.xz 10687760 BLAKE2B 3b2a487c115680342ce308ff1a42d2b6fa6fb1f31e2670b27a305b4d44160056611b77273c9d47f2e37a1ef01b1aba59c36e76b65c83142a5f09812bf3b1ea02 SHA512 58ea3853cd93b556ecdc4abd0be079b2621171b8491f59004ea4e036a4cba4470aaafe6591b942e0a50a64bdc47540e01fe6900212a1ef7087850112d9bfc5ef
+DIST ghc-8.2.1-src.tar.xz 10736016 BLAKE2B 60993cfc9569e83b0c383591ef30a7280e0138fbb7bd696ad62d87e68dcbccf31c0b8ba211b6647922b8595c7aec2c783648f12c67da53e0766b71c7d7c923fc SHA512 d9aa2aa7f9414db8f4e51d6c275694b46df515e68331a1a2b6018256333a2c63ebd877b75ee90407ecce5be672ec9afc6bebd62aadbf8ae06b94f1760d1736be
+DIST ghc-bin-7.10.3-alpha.tbz2 183558856 BLAKE2B 2bb02aafa49c6a91bec016e8bec2d07257d602e53c9df55792ec6fbbf8e2e46de1d5f3f72c0ccf74d6bd7f7987f53412063ccb02ae85455fce11fa928cbf5291 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230
+DIST ghc-bin-7.10.3-amd64.tbz2 112040431 BLAKE2B 3e59b70ca309a1cd704266c54a7983f9a58362bf700ced89c5649c780c664c650ec091e14026a7b84e339d2ebff39eba1772eebcd9fb4b99b9c99d179453d5cc SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558
+DIST ghc-bin-7.10.3-ia64.tbz2 238680956 BLAKE2B 08593718d376051edfb0c86131e54dafc5c15056757fbeef90c653a7d217e49ff34ffaf7cd4083144c9277e73a290b822a0f889aaf806341375708e4b92654b2 SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5
+DIST ghc-bin-7.10.3-ppc.tbz2 125832171 BLAKE2B cbf9c87200062606fddc6fa705666aeabceef954dad17166e24e181d210d7d86aad684e9af5ca05abcc89c947bea295dec3223735a6a915b680667ad32d850a5 SHA512 4eb111e3686656a83515f59d4ace8bc28806dcabfcee5201ce29aee38b8efcefaaf70c50bee55202c2d2abbfbf231a6b41df8b13199332c53055adb1754a3191
+DIST ghc-bin-7.10.3-ppc64.tbz2 142469712 BLAKE2B 05e6ca2498180399dd8a1a209843dd1229a1668d7504c424b9182fff00f78ec9aa2848d562f293dd388dc983851e0e28d481b12f0ae860b5c3a36eb616c3f1cf SHA512 eb59d3abc8b10010311d59df9473c5ea649eb0dd7f9ad41a1929a540a0ef8c20abaccd68254f8abab037fb1fc94d824f474e18e4316b8f2a7a954d0645a2a2a4
+DIST ghc-bin-7.10.3-sparc.tbz2 163105069 BLAKE2B 4a535472bf9ed83164f4da8280215a156b973a3a1f93a742a46050a112b7073d0a5f252686ee2ebde97140748cf3f164f33f1ba9df0b11fe2b35a86a7211b3a5 SHA512 d467a42487378d7dee311eb33aa1c151f5c16a6e7a4ab5bd8177df229f474adf19da3e1ca1064943a40abafcab6852b0589dd34413da82b33a03ede1ac17bf5d
+DIST ghc-bin-7.10.3-x86.tbz2 113877175 BLAKE2B 2f3064174f82f3ad6fda615d1f47f30b11f9dbd4a4b721673e5db49013a11ba80e850a0f392460651408fd3b31f8e677f1488fe2c94160881ab34740846b0390 SHA512 75096fe9106d975c15e646b0a559c544621fd02791f491bce54926efabf0e55b97150069ddfa7a9f02cc30bb6975d3d3121a82207a9f67b8dda5ebfe17ec4744
+DIST ghc-bin-7.8.4-alpha.tbz2 210691009 BLAKE2B 7a59cd1dbbe76fcf37ec7d1b2e81a76bd35f268c10614890cc8a39dcd846f6e5fb524ce1851036c315a9e5fe219d3abbb78d55f3e93f4ab5ad1dbf6c946146b7 SHA512 f08230de82f0c4112da9d0b48227ca74d5d0b4a84046d746b023557b7aeeb9678f5ac037fe89a863178df4b9036e5c5c63182d14dfbb42c772011de883e3966f
+DIST ghc-bin-7.8.4-amd64.tbz2 100573133 BLAKE2B da6bfb26eac8ef6c996ed10a56da9c535fb5fff4c69474de2cd979fe185876059f9e87940d24db8c52a0f04e81cf312982da75d04f3b96e7a11f2f134b512058 SHA512 e4416d6dae3c644f74bafb3aecf1a123f985427aba32d0e0c43143a137d64a9220fc5947cd9bde8a3bc44555ae71184fc06a3f7df7976aadd065ad5681b90954
+DIST ghc-bin-7.8.4-ia64.tbz2 222789275 BLAKE2B 2e0fc3ea11885b739156dcfbb4d52ded6492bf992ea18be2f91302d82e541a4de52e4bbe215f4d0cdbe54b32aa59e142ad10ae2fb20e8f0dfea22368a88620dd SHA512 2d8b89e399cbe9bfeae29cf3ceea736bfaa65ea21483fa2ee95d9814e122fcfbb67ce22ad8175493fab088e9a9d0139610c67e9d5c8b4f797b5e14846df32b6e
+DIST ghc-bin-7.8.4-ppc.tbz2 112803496 BLAKE2B fa60eda8b87dca0e23cbb971bc1f361f280735846cbe628e632981dc86baba0e877112e5c03d09fbb7f256cc078f8bf3248007c013208dab41c5205a82fab494 SHA512 9581f55a088e53edcc969960e45c9ad7227d71198ce2d241a4a066a138450a879287e55e7d2210e86143670539711387e36c7f60660c4422dc1b4122278fe4a0
+DIST ghc-bin-7.8.4-ppc64.tbz2 129284515 BLAKE2B 2e9a1e70830930dda7dcbd696ef3c27e7b64d571042cc0fc26bed42d13b9707ffeb337ffab38e2e04a7dabc56d8305fd77df508928d61fd0c653945afac8984d SHA512 53974e15c26cf6b62d8f838607abd209ec57cf0f45fcc48b90ad62736f5e4e7ff263dcd326ae03d8d5557a22eb9730e5eb8ae4eda55e52dd3d973bc73c84935e
+DIST ghc-bin-7.8.4-sparc.tbz2 147340595 BLAKE2B 8e39d6b144f4fce5196ad758f89887476e0482e8b98a012874d293d5e57756659cb9acb897476593a28f98f5c859548efa2e130f3806bfa2bb9e74795078a506 SHA512 ee5f0b2f1cf2693a0f2be9df71ef61b52bc2327225d40b8be955c1584b9901ffc6aaab63c1e46bf9bb352633b605c98378f8fd3e6cd71aef1c089007e4110217
+DIST ghc-bin-7.8.4-x86.tbz2 102312459 BLAKE2B 256cca9b2353af30dd7c239db0e21781d9d8aa352e38b3dd678b1429be6251e81f8955ac6ee0f766cc55f4de71c68acd98bc7b9434c3ea4b056d446ca59adc97 SHA512 cabc5bd6d8760ce4120e7053f6c1dffca7d161ba454b6201087760096c037c932e3ff8c82e53346c8278855bf0cff1c2f5fb8046242ca4d8307355b060a9556e
+DIST ghc-bin-8.0.2-alpha.tbz2 234361847 BLAKE2B 8e3439f3bbae1d3f6ab71f69669ea065f5f36c9cb4b334f06161cc1b9507aae56297d5eeb8a9cf72916aa012fab0b444a179a0336f00d5f17a8d402d5807c6f8 SHA512 c8b588feeab85f7b8fd60e2e8bf755d46790d4882d2ecf6b2c8b8e02c62a11b7e6453bf0cfbc646bfbf24310fdc775337f3957ba5783675a271b68f0af2e9070
+DIST ghc-bin-8.0.2-amd64.tbz2 131007452 BLAKE2B bb0fd3199b62dee98ef6f47ebd1c52afa56af837bae85d96c5b745a50c6a2031885e7bdd4ad40d1fbed7c6edb446801fbe34cd93134234dc842dca21231d2dac SHA512 d960c40966e392d5497f694f0b47df4a6ec22ad1b4a607437c8af7c33dfbf122ccefb525d807716539af57c31660378e52fc495dd0a1d0fc3bccaef3578be177
+DIST ghc-bin-8.0.2-arm64.tbz2 191332951 BLAKE2B 305c4d618a6221e1322a5665544883624de4646e0186c6eab56d0b32877645f0b2bad8381848914751fbd2e11598727c46ab136de74c57207b75ecc6cce9572a SHA512 b9cabfda8fc6e851ba99f53274c1a63c5a6a365311a9203f1247ecf90ab843dd94960ad44c4e67032f4690f07d67bfd8bdfbe59f857d6c63344430539e2082fc
+DIST ghc-bin-8.0.2-ia64.tbz2 250237654 BLAKE2B e76987717399f4be0a3f99e9976f29416c768a61280bc5a05ca8759d5fbc6273e28d54fac102a5f69b65c7fb50acfd1a3c7505f697f0900cc3f619ffacf9e1bb SHA512 e8cb381de12ccc0a7b513683deb5de555fecea22a735d09b073b0199ab4124305bbd8a093b4710b827513d33fd4224007e7bd210b146508eb183be7dfd283a26
+DIST ghc-bin-8.0.2-ppc.tbz2 144760090 BLAKE2B 32410f3563f7f2555350806db460d2083c7248c57223c9c681d0b4913df942f023c7c1f5fda145179a524ee7ef105a9b8309ba87c20dc393a9f49151579b6767 SHA512 bc6bf8998064ffc1692c3bb83c44d1787760a3f4a1e6b79dedaefda5fe32b9052049a60f0ddd3c0b0bd24a722fb35e310e0189b3511721ff89d4d02b3d7c14bb
+DIST ghc-bin-8.0.2-ppc64.tbz2 117432068 BLAKE2B cae202f0d6e825127d543996b2fe7ae02578c47325674cbf22fddc53b1c4c9413f45c60d76ec3d07860cb8d0aae1ec792e4141822cc5c08ef9013308c5d29bf5 SHA512 0eaff0557b68649a15bbeb2019f46fa9e9e7b8a916aa210ab56888090a5b887d20d818e7987177bc6a8e7fde503de560026e6bb55fe39679b8b1ee13c6b7c4f9
+DIST ghc-bin-8.0.2-x86.tbz2 133372061 BLAKE2B 4a32e70e9ab767db4f03874a98f86730b696363874f593f6abdbeeda80e5f38ba3ac94824b9daef839be9f93a80352d529f27949ab91d5eab0c7ba4c57b25bc9 SHA512 020ce0e597e2907550c080f1bb0f863dbf83d5d45df2b3f44173506475bc4ef5423c5a060fdacd87614c3ec398ad94c2dcab9cff0376a54a2c54c2eb1e2f657d
+DIST ghc-bin-8.2.1-i686-pc-linux-gnu.tbz2 96157437 BLAKE2B 2b9608845db8cea78db07209fa054b3b05085d5c3ac07cbe3de02a93c87fb0cff12b1820f08757221c59c8a0a9e7a5563c44266b181525d916825e5cf5bac34c SHA512 e891e76557fa61853e28829b8bedc4a6abb92954f90cc1ebcf22a13cc137556bbe9262e7398b7e1aedbabeb997916b008bf1561a52f16a569f3d58ea9404f41e
+DIST ghc-bin-8.2.1-x86_64-pc-linux-gnu.tbz2 97490496 BLAKE2B 3666ea70cb8b3645db071040d2069fe244042c11954b34e5d92aaa90132d2316c0ee8c176cd4e674772bea3b99df150404f62bd8745c046cdaf102ecf0a0fa54 SHA512 52630a185d0eab56bce0469a612a54109895bfee041ec362ced59a9b35ba3b9c185e86bc7dbf0a5939081d3626baa19fbb3306e36d1857530248a7b9bfc100bb
+DIST hoopl-3.10.2.0.tar.gz 241940 BLAKE2B 0ed7bf80486767c81415f99da8780a525401c388dea0b3f380bbecceae9cc7f66d8b5d0d7b31f8cb41796309b7a93adb113485efd14882f8af321989ce900a9b SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a
+DIST transformers-0.4.3.0.tar.gz 28632 BLAKE2B 92cabcb654bb11854a3bffbb1262f5cd62eda1aff447157086a61ebc451ebf2fddec53b6a2cc058174f24f0f0e32df671d3717e30a542c8dc90cb87e327d990c SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780

diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
index 4afb2420ef3..9ec9caec506 100644
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -324,17 +324,6 @@ relocate_ghc() {
 	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
 
 	if use prefix; then
-		# and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
-		# TODO: add the same for darwin's CHOST and it's DYLD_
-		local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
-		sed -i -e '2i'"$new_ldpath" \
-			"${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/$(cross)hsc2hs" \
-			"${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
-			"$gp_back" \
-			|| die "Adding LD_LIBRARY_PATH for wrappers failed"
 		hprefixify "${bin_libpath}"/${PN}*/settings
 	fi
 

diff --git a/dev-lang/ghc/ghc-7.8.4.ebuild b/dev-lang/ghc/ghc-7.8.4.ebuild
index 16a49986a1c..96a398263f2 100644
--- a/dev-lang/ghc/ghc-7.8.4.ebuild
+++ b/dev-lang/ghc/ghc-7.8.4.ebuild
@@ -243,21 +243,6 @@ relocate_ghc() {
 	# so it should point to current tree location
 	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
 
-	if use prefix; then
-		# and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
-		# TODO: add the same for darwin's CHOST and it's DYLD_
-		local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
-		sed -i -e '2i'"$new_ldpath" \
-			"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			|| die "Adding LD_LIBRARY_PATH for wrappers failed"
-	fi
-
 	# regenerate the binary package cache
 	"$gp_back" recache || die "failed to update cache after relocation"
 	rm "$gp_back"

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index c2b48ae466f..2063cc61ec9 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -318,17 +318,6 @@ relocate_ghc() {
 	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
 
 	if use prefix; then
-		# and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
-		# TODO: add the same for darwin's CHOST and it's DYLD_
-		local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
-		sed -i -e '2i'"$new_ldpath" \
-			"${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/$(cross)hsc2hs" \
-			"${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
-			"$gp_back" \
-			|| die "Adding LD_LIBRARY_PATH for wrappers failed"
 		hprefixify "${bin_libpath}"/${PN}*/settings
 	fi
 

diff --git a/dev-lang/ghc/ghc-8.2.1.ebuild b/dev-lang/ghc/ghc-8.2.1.ebuild
index 66a642bf929..1b95d8e8ae0 100644
--- a/dev-lang/ghc/ghc-8.2.1.ebuild
+++ b/dev-lang/ghc/ghc-8.2.1.ebuild
@@ -324,17 +324,6 @@ relocate_ghc() {
 	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
 
 	if use prefix; then
-		# and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
-		# TODO: add the same for darwin's CHOST and it's DYLD_
-		local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
-		sed -i -e '2i'"$new_ldpath" \
-			"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
-			"$gp_back" \
-			|| die "Adding LD_LIBRARY_PATH for wrappers failed"
 		hprefixify "${bin_libpath}"/${PN}*/settings
 	fi
 

diff --git a/dev-lang/ghc/metadata.xml b/dev-lang/ghc/metadata.xml
index 521a174394e..494e169583d 100644
--- a/dev-lang/ghc/metadata.xml
+++ b/dev-lang/ghc/metadata.xml
@@ -7,7 +7,7 @@
 	</maintainer>
 	<use>
 		<flag name="binary">Install the binary version directly, rather than using it to build the source version.</flag>
-		<flag name="ghcbootstrap">Bootstrap from an existing GHC installation.</flag>
-		<flag name="ghcmakebinary">Build with less runtime depends (bundle libffi for building bootstrap binaries).</flag>
+		<flag name="ghcbootstrap">Internal: Bootstrap GHC from an existing GHC installation.</flag>
+		<flag name="ghcmakebinary">Internal: Build binary friendly for redistribution.</flag>
 	</use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-11-24  8:01 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-11-24  8:01 UTC (permalink / raw
  To: gentoo-commits

commit:     61763854fa6e7a98393f1abe3c4fbfff997dbb5c
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 24 08:00:58 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Nov 24 08:01:07 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61763854

dev-lang/ghc: bump up to 8.2.2, no keywords, binaries or core library pins

Package-Manager: Portage-2.3.16, Repoman-2.3.6

 dev-lang/ghc/Manifest         |   1 +
 dev-lang/ghc/ghc-8.2.2.ebuild | 754 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 755 insertions(+)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index c5a0c097149..0116a677bd6 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -4,6 +4,7 @@ DIST ghc-7.8.4-ia64-CLOSUREs-regenerated.patch.gz 13268 BLAKE2B 35af21163e3a46ee
 DIST ghc-7.8.4-src.tar.bz2 10600755 BLAKE2B 6cf27f663178513b25032b648cf36b016e01361966725dbfc219079961e8eb9b1ab3531427c7012dc599e8e102dc87ed6dd43b31e7bd4e231e2d989936eb2c66 SHA512 079a53891d8ebd8d9b88da96170e60981608a619f8282e4b7948f35244e99bd87277649ac7fcebc227a61a4d21960db8d5e5b9e92f2c69c82d8d68d7fd0a41d3
 DIST ghc-8.0.2-src.tar.xz 10687760 BLAKE2B 3b2a487c115680342ce308ff1a42d2b6fa6fb1f31e2670b27a305b4d44160056611b77273c9d47f2e37a1ef01b1aba59c36e76b65c83142a5f09812bf3b1ea02 SHA512 58ea3853cd93b556ecdc4abd0be079b2621171b8491f59004ea4e036a4cba4470aaafe6591b942e0a50a64bdc47540e01fe6900212a1ef7087850112d9bfc5ef
 DIST ghc-8.2.1-src.tar.xz 10736016 BLAKE2B 60993cfc9569e83b0c383591ef30a7280e0138fbb7bd696ad62d87e68dcbccf31c0b8ba211b6647922b8595c7aec2c783648f12c67da53e0766b71c7d7c923fc SHA512 d9aa2aa7f9414db8f4e51d6c275694b46df515e68331a1a2b6018256333a2c63ebd877b75ee90407ecce5be672ec9afc6bebd62aadbf8ae06b94f1760d1736be
+DIST ghc-8.2.2-src.tar.xz 10753272 BLAKE2B 6fd792390d3df20f84836466705c3f3c931ba2d594dcbe2b808ea0ae284460000b443df8aae74903eabf05ff9064d68a303086cf888ea68222eb1c60959c8f21 SHA512 6549416f470b599973d409fa45f59c25b07e6a94798cef1a19ad432547dc225338cf4dbc4a4793114b4a417798a3b59b122b92b020251074405c5302b7ffe799
 DIST ghc-bin-7.10.3-alpha.tbz2 183558856 BLAKE2B 2bb02aafa49c6a91bec016e8bec2d07257d602e53c9df55792ec6fbbf8e2e46de1d5f3f72c0ccf74d6bd7f7987f53412063ccb02ae85455fce11fa928cbf5291 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230
 DIST ghc-bin-7.10.3-amd64.tbz2 112040431 BLAKE2B 3e59b70ca309a1cd704266c54a7983f9a58362bf700ced89c5649c780c664c650ec091e14026a7b84e339d2ebff39eba1772eebcd9fb4b99b9c99d179453d5cc SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558
 DIST ghc-bin-7.10.3-ia64.tbz2 238680956 BLAKE2B 08593718d376051edfb0c86131e54dafc5c15056757fbeef90c653a7d217e49ff34ffaf7cd4083144c9277e73a290b822a0f889aaf806341375708e4b92654b2 SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5

diff --git a/dev-lang/ghc/ghc-8.2.2.ebuild b/dev-lang/ghc/ghc-8.2.2.ebuild
new file mode 100644
index 00000000000..3113c58efc3
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.2.2.ebuild
@@ -0,0 +1,754 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+		export CTARGET=${CATEGORY/cross-}
+	fi
+fi
+
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib pax-utils toolchain-funcs versionator prefix
+inherit check-reqs
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="http://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+# sorted!
+#arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( http://code.haskell.org/~slyfox/ghc-arm64/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
+#arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+	case "${ARCH}" in
+		#alpha) return 0 ;;
+		#arm64) return 0 ;;
+		#arm) return 0 ;;
+		#amd64) return 0 ;;
+		#ia64) return 0 ;;
+		#ppc) return 0 ;;
+		#ppc64) return 0 ;;
+		#sparc) return 0 ;;
+		#x86) return 0 ;;
+		*) return 1 ;;
+	esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=8.2.1.20171108 # uncomment only for -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.xz )"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+
+BUMP_LIBRARIES=(
+	# "hackage-name          hackage-version"
+)
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+#KEYWORDS="~alpha ~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc ghcbootstrap ghcmakebinary +gmp profile"
+IUSE+=" binary"
+
+RDEPEND="
+	>=dev-lang/perl-5.6.1
+	dev-libs/gmp:0=
+	sys-libs/ncurses:0=[unicode]
+	!ghcmakebinary? ( virtual/libffi:= )
+"
+
+# This set of dependencies is needed to run
+# prebuilt ghc. We specifically avoid ncurses
+# dependency with:
+#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
+PREBUILT_BINARY_DEPENDS="
+	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+"
+# This set of dependencies is needed to install
+# ghc[binary] in system. terminfo package is linked
+# against ncurses.
+PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
+	sys-libs/ncurses:0/6
+"
+
+RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
+
+DEPEND="${RDEPEND}
+	doc? ( app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5
+		app-text/docbook-xsl-stylesheets
+		dev-python/sphinx
+		>=dev-libs/libxslt-1.1.2 )
+	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
+
+PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
+
+REQUIRED_USE="?? ( ghcbootstrap binary )"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+	[[ ${CHOST} != ${CTARGET} ]]
+}
+
+is_native() {
+	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
+}
+
+# returns tool prefix for crosscompiler.
+# Example:
+#  CTARGET=armv7a-unknown-linux-gnueabi
+#  CHOST=x86_64-pc-linux-gnu
+#    "armv7a-unknown-linux-gnueabi-"
+#  CTARGET=${CHOST}
+#    ""
+# Used in tools and library prefix:
+#    "${ED}"/usr/bin/$(cross)haddock
+#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+
+cross() {
+	if is_crosscompile; then
+		echo "${CTARGET}-"
+	else
+		echo ""
+	fi
+}
+
+append-ghc-cflags() {
+	local persistent compile assemble link
+	local flag ghcflag
+
+	for flag in $*; do
+		case ${flag} in
+			persistent)	persistent="yes";;
+			compile)	compile="yes";;
+			assemble)	assemble="yes";;
+			link)		link="yes";;
+			*)
+				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				;;
+		esac
+	done
+}
+
+# $1 - lib name (under libraries/)
+# $2 - lib version
+# example: bump_lib "transformers" "0.4.2.0"
+bump_lib() {
+	local pn=$1 pv=$2
+	local p=${pn}-${pv}
+	local f
+
+	einfo "Bumping ${pn} up to ${pv}"
+
+	for f in ghc.mk GNUmakefile; do
+		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
+	done
+	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
+	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
+}
+
+update_SRC_URI() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		SRC_URI+=" mirror://hackage/package/${pn}/${pn}-${pv}.tar.gz"
+	done
+}
+
+update_SRC_URI
+
+bump_libs() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		bump_lib "${pn}" "${pv}"
+	done
+}
+
+ghc_setup_cflags() {
+	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
+	if ! is_native; then
+		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
+		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
+		einfo "Crosscompiling mode:"
+		einfo "   CHOST:   ${CHOST}"
+		einfo "   CTARGET: ${CTARGET}"
+		einfo "   CFLAGS:  ${CFLAGS}"
+		einfo "   LDFLAGS: ${LDFLAGS}"
+		einfo "   prefix: $(cross)"
+		return
+	fi
+	# We need to be very careful with the CFLAGS we ask ghc to pass through to
+	# gcc. There are plenty of flags which will make gcc produce output that
+	# breaks ghc in various ways. The main ones we want to pass through are
+	# -mcpu / -march flags. These are important for arches like alpha & sparc.
+	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
+	strip-flags
+	strip-unsupported-flags
+
+	# Cmm can't parse line numbers #482086
+	replace-flags -ggdb[3-9] -ggdb2
+
+	GHC_FLAGS=""
+	GHC_PERSISTENT_FLAGS=""
+	for flag in ${CFLAGS}; do
+		case ${flag} in
+
+			# Ignore extra optimisation (ghc passes -O to gcc anyway)
+			# -O2 and above break on too many systems
+			-O*) ;;
+
+			# Arch and ABI flags are what we're really after
+			-m*) append-ghc-cflags compile assemble ${flag};;
+
+			# Sometimes it's handy to see backtrace of RTS
+			# to get an idea what happens there
+			-g*) append-ghc-cflags compile ${flag};;
+
+			# Ignore all other flags, including all -f* flags
+		esac
+	done
+
+	for flag in ${LDFLAGS}; do
+		append-ghc-cflags link ${flag}
+	done
+
+	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
+	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
+	# options to gcc.
+	if is_native; then
+		# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
+		# are not built with fPIC, bug #606666
+		gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
+		tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
+			# gcc-6.3 has support for -no-pie upstream, but spelling differs from
+			# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
+			# hardened users try '-pie' in USE=ghcbootstrap mode.
+			append-ghc-cflags compile link -no-pie
+		fi
+
+		# prevent from failing to build unregisterised ghc:
+		# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+	fi
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+	local from=$1
+	local   to=$2
+	shift 2
+	local file=
+	for file in "$@"
+	do
+		sed -i -e "s|$from|$to|g" \
+			"$file" || die "path relocation failed for '$file'"
+	done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+	local to=$1
+
+	# libdir for prebuilt binary and for current system may mismatch
+	# It does for prefix installation for example: bug #476998
+	local bin_ghc_prefix=${WORKDIR}/usr
+	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+	# backup original script to use it later after relocation
+	local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
+	cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+	if [[ ${bin_libdir} != $(get_libdir) ]]; then
+		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+		# moving the dir itself is not strictly needed
+		# but then USE=binary would result in installing
+		# in '${bin_libdir}'
+		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+			"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+			"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+			"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+			"${WORKDIR}/usr/bin/hsc2hs" \
+			"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+			"$gp_back" \
+			"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
+	fi
+
+	# Relocate from /usr to ${EPREFIX}/usr
+	relocate_path "/usr" "${to}/usr" \
+		"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+		"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+		"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+		"${WORKDIR}/usr/bin/hsc2hs" \
+		"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+		"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
+
+	# this one we will use to regenerate cache
+	# so it should point to current tree location
+	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+	if use prefix; then
+		hprefixify "${bin_libpath}"/${PN}*/settings
+	fi
+
+	# regenerate the binary package cache
+	"$gp_back" recache || die "failed to update cache after relocation"
+	rm "$gp_back"
+}
+
+ghc-check-reqs() {
+	# These are pessimistic values (slightly bigger than worst-case)
+	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
+	# numbers on various arches.
+	CHECKREQS_DISK_BUILD=8G
+	CHECKREQS_DISK_USR=2G
+	# USE=binary roughly takes
+	use binary && CHECKREQS_DISK_BUILD=4G
+
+	"$@"
+}
+
+pkg_pretend() {
+	ghc-check-reqs check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	ghc-check-reqs check-reqs_pkg_setup
+
+	# quiet portage about prebuilt binaries
+	use binary && QA_PREBUILT="*"
+
+	[[ ${MERGE_TYPE} == binary ]] && return
+
+	if use ghcbootstrap; then
+		ewarn "You requested ghc bootstrapping, this is usually only used"
+		ewarn "by Gentoo developers to make binary .tbz2 packages."
+
+		[[ -z $(type -P ghc) ]] && \
+			die "Could not find a ghc to bootstrap with."
+	else
+		if ! yet_binary; then
+			eerror "Please try emerging with USE=ghcbootstrap and report build"
+			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
+			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
+		fi
+	fi
+}
+
+src_unpack() {
+	# Create the ${S} dir if we're using the binary version
+	use binary && mkdir "${S}"
+
+	# the Solaris and Darwin binaries from ghc (maeder) need to be
+	# unpacked separately, so prevent them from being unpacked
+	local ONLYA=${A}
+	case ${CHOST} in
+		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
+	esac
+	unpack ${ONLYA}
+}
+
+src_prepare() {
+	ghc_setup_cflags
+
+	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+		# See bug #313635.
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${WORKDIR}/usr/bin/ghc-${GHC_PV}"
+
+		# allow hardened users use vanilla binary to bootstrap ghc
+		# ghci uses mmap with rwx protection at it implements dynamic
+		# linking on it's own (bug #299709)
+		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/bin/ghc"
+	fi
+
+	if use binary; then
+		if use prefix; then
+			relocate_ghc "${EPREFIX}"
+		fi
+
+		# Move unpacked files to the expected place
+		mv "${WORKDIR}/usr" "${S}"
+		eapply_user
+	else
+		if ! use ghcbootstrap; then
+			case ${CHOST} in
+				*-darwin* | *-solaris*)
+				# UPDATE ME for ghc-7
+				mkdir "${WORKDIR}"/ghc-bin-installer || die
+				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
+				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
+				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
+				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
+				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
+				popd > /dev/null
+
+				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
+				# fix the binaries so they run, on Solaris we need an
+				# LD_LIBRARY_PATH which has our prefix libdirs, on
+				# Darwin we need to replace the frameworks with our libs
+				# from the prefix fix before installation, because some
+				# of the tools are actually used during configure/make
+				if [[ ${CHOST} == *-solaris* ]] ; then
+					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
+				elif [[ ${CHOST} == *-darwin* ]] ; then
+					local readline_framework=GNUreadline.framework/GNUreadline
+					local gmp_framework=/opt/local/lib/libgmp.10.dylib
+					local ncurses_file=/opt/local/lib/libncurses.5.dylib
+					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
+						install_name_tool -change \
+							${readline_framework} \
+							"${EPREFIX}"/lib/libreadline.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${gmp_framework} \
+							"${EPREFIX}"/usr/lib/libgmp.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${ncurses_file} \
+							"${EPREFIX}"/usr/lib/libncurses.dylib \
+							${binary} || die
+					done
+					# we don't do frameworks!
+					sed -i \
+						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
+						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
+						rts/package.conf.in || die
+				fi
+
+				# it is autoconf, but we really don't want to give it too
+				# much arguments, in fact we do the make in-place anyway
+				./configure --prefix="${WORKDIR}"/usr || die
+				make install || die
+				popd > /dev/null
+				;;
+				*)
+				relocate_ghc "${WORKDIR}"
+				;;
+			esac
+		fi
+
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${S}/ghc/ghc.wrapper"
+
+		cd "${S}" # otherwise eapply will break
+
+		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
+
+		eapply "${FILESDIR}"/${PN}-8.2.1_rc1-cgen-constify.patch
+		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+
+		eapply "${FILESDIR}"/${PN}-8.2.1_rc2-O2-unreg.patch
+
+		# a bunch of crosscompiler patches
+		eapply "${FILESDIR}"/${PN}-8.2.1_rc1-unphased-cross.patch
+		eapply "${FILESDIR}"/${PN}-8.2.1_rc1-staged-cross.patch
+		eapply "${FILESDIR}"/${PN}-8.2.1_rc1-ghci-cross.patch
+		eapply "${FILESDIR}"/${PN}-8.2.1_rc1-stage2-cross.patch
+		eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+
+		# needs a new libffi release
+		eapply "${FILESDIR}"/${PN}-8.0.2-libffi-alpha.patch
+
+		# mingw32 target
+		pushd "${S}/libraries/Win32"
+			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-1.patch # upstreamed, waits for merge to -HEAD
+			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
+		popd
+
+		bump_libs
+
+		eapply_user
+		# as we have changed the build system
+		eautoreconf
+	fi
+}
+
+src_configure() {
+	if ! use binary; then
+		# initialize build.mk
+		echo '# Gentoo changes' > mk/build.mk
+
+		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
+		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+
+		# We also need to use the GHC_FLAGS flags when building ghc itself
+		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
+		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
+		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
+		# Speed up initial Cabal bootstrap
+		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
+
+		# We can't depend on haddock except when bootstrapping when we
+		# must build docs and include them into the binary .tbz2 package
+		# app-text/dblatex is not in portage, can not build PDF or PS
+		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
+		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
+		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
+
+		# this controls presence on 'xhtml' and 'haddock' in final install
+		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
+
+		# not used outside of ghc's test
+		if [[ -n ${GHC_BUILD_DPH} ]]; then
+				echo "BUILD_DPH = YES" >> mk/build.mk
+			else
+				echo "BUILD_DPH = NO" >> mk/build.mk
+		fi
+
+		# Any non-native build has to skip as it needs
+		# target haddock binary to be runnabine.
+		if ! is_native; then
+			# disable docs generation as it requires running stage2
+			echo "HADDOCK_DOCS=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
+		fi
+
+		if is_crosscompile; then
+			# Install ghc-stage1 crosscompiler instead of
+			# ghc-stage2 cross-built compiler.
+			echo "Stage1Only=YES" >> mk/build.mk
+		fi
+
+		# allows overriding build flavours for libraries:
+		# v   - vanilla (static libs)
+		# p   - profiled
+		# dyn - shared libraries
+		# example: GHC_LIBRARY_WAYS="v dyn"
+		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
+			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
+		fi
+		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
+
+		# Get ghc from the unpacked binary .tbz2
+		# except when bootstrapping we just pick ghc up off the path
+		if ! use ghcbootstrap; then
+			export PATH="${WORKDIR}/usr/bin:${PATH}"
+		fi
+
+		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
+
+		# don't strip anything. Very useful when stage2 SIGSEGVs on you
+		echo "STRIP_CMD = :" >> mk/build.mk
+
+		local econf_args=()
+
+		# GHC embeds toolchain it was built by and uses it later.
+		# Don't allow things like ccache or versioned binary slip.
+		# We use stable thing across gcc upgrades.
+		# User can use EXTRA_ECONF=CC=... to override this default.
+		econf_args+=(
+			AR=${CTARGET}-ar
+			CC=${CTARGET}-gcc
+			LD=${CTARGET}-ld
+			# these should be inferred by GHC but ghc defaults
+			# to using bundled tools on windows.
+			Windres=${CTARGET}-windres
+			DllWrap=${CTARGET}-dllwrap
+		)
+		if [[ ${CTARGET} == arm* ]] ; then
+			# ld.bfd-2.28 does not work for ghc. Force ld.gold
+			# instead. This should be removed once gentoo gets
+			# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
+			econf_args+=(LD=${CTARGET}-ld.gold)
+		fi
+
+		if [[ ${CBUILD} != ${CHOST} ]]; then
+			# GHC bug: ghc claims not to support cross-building.
+			# It does, but does not distinct --host= value
+			# for stage1 and stage2 compiler.
+			econf_args+=(--host=${CBUILD})
+		fi
+
+		if use ghcmakebinary; then
+			# When building booting libary we are trying to
+			# bundle or restrict most of external depends
+			# with unstable ABI:
+			#  - embed libffi (default GHC behaviour)
+			#  - disable ncurses support for ghci (via haskeline)
+			#    https://bugs.gentoo.org/557478
+			#  - disable ncurses support for ghc-pkg
+			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
+			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
+		elif is_native; then
+			# using ${GTARGET}'s libffi is not supported yet:
+			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
+			econf_args+=(--with-system-libffi)
+			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+		fi
+
+		einfo "Final mk/build.mk:"
+		cat mk/build.mk || die
+
+		econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
+
+		if [[ ${PV} == *9999* ]]; then
+			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+			GHC_P=${PN}-${GHC_PV}
+		fi
+	fi # ! use binary
+}
+
+src_compile() {
+	if ! use binary; then
+		# Stage1Only crosscompiler does not build stage2
+		if ! is_crosscompile; then
+			# 1. build/pax-mark compiler binary first
+			emake ghc/stage2/build/tmp/ghc-stage2
+			# 2. pax-mark (bug #516430)
+			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
+			# 2. build/pax-mark haddock using ghc-stage2
+			if is_native; then
+				# non-native build does not build haddock
+				# due to HADDOCK_DOCS=NO, but it could.
+				emake utils/haddock/dist/build/tmp/haddock
+				pax-mark -m utils/haddock/dist/build/tmp/haddock
+			fi
+		fi
+		# 3. and then all the rest
+		emake all
+	fi # ! use binary
+}
+
+src_install() {
+	if use binary; then
+		use prefix && mkdir -p "${ED}"
+		mv "${S}/usr" "${ED}"
+	else
+		[[ -f VERSION ]] || emake VERSION
+
+		# -j1 due to a rare race in install script:
+		#    make --no-print-directory -f ghc.mk phase=final install
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
+		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
+		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
+		#    /usr/bin/install: cannot create regular file \
+		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
+		emake -j1 install DESTDIR="${D}"
+
+		# Skip for cross-targets as they all share target location:
+		# /usr/share/doc/ghc-9999/
+		if ! is_crosscompile; then
+			dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
+		fi
+
+		# rename ghc-shipped files to avoid collision
+		# of external packages. Motivating example:
+		#  user had installed:
+		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
+		#      dev-haskell/transformers-0.4.2.0
+		#  then user tried to update to
+		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
+		#  this will lead to single .conf file collision.
+		local shipped_conf renamed_conf
+		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+		for shipped_conf in "${package_confdir}"/*.conf; do
+			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
+			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
+			mv "${shipped_conf}" "${renamed_conf}" || die
+		done
+
+		# remove link, but leave 'haddock-${GHC_P}'
+		rm -f "${ED}"/usr/bin/$(cross)haddock
+
+		if ! is_crosscompile; then
+			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
+			newbashcomp utils/completion/ghc.bash         ghc
+		fi
+	fi
+
+	# path to the package.cache
+	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+	PKGCACHE="${package_confdir}"/package.cache
+	# copy the package.conf.d, including timestamp, save it so we can help
+	# users that have a broken package.conf.d
+	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
+
+	# copy the package.conf, including timestamp, save it so we later can put it
+	# back before uninstalling, or when upgrading.
+	cp -p "${PKGCACHE}"{,.shipped} \
+		|| die "failed to copy package.conf.d/package.cache"
+}
+
+pkg_preinst() {
+	# have we got an earlier version of ghc installed?
+	if has_version "<${CATEGORY}/${PF}"; then
+		haskell_updater_warn="1"
+	fi
+}
+
+pkg_postinst() {
+	ghc-reregister
+
+	# path to the package.cache
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+
+	# give the cache a new timestamp, it must be as recent as
+	# the package.conf.d directory.
+	touch "${PKGCACHE}"
+
+	if [[ "${haskell_updater_warn}" == "1" ]]; then
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+		ewarn "You have just upgraded from an older version of GHC."
+		ewarn "You may have to run"
+		ewarn "      'haskell-updater'"
+		ewarn "to rebuild all ghc-based Haskell libraries."
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+	fi
+}
+
+pkg_prerm() {
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+	rm -rf "${PKGCACHE}"
+
+	cp -p "${PKGCACHE}"{.shipped,}
+}
+
+pkg_postrm() {
+	ghc-package_pkg_postrm
+}


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-11-25 14:14 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-11-25 14:14 UTC (permalink / raw
  To: gentoo-commits

commit:     400835a244982980257478d8d8fc847e401d8731
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 25 14:14:15 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Nov 25 14:14:24 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=400835a2

dev-lang/ghc: add amd64 and x86 binaries

Package-Manager: Portage-2.3.16, Repoman-2.3.6

 dev-lang/ghc/Manifest         | 2 ++
 dev-lang/ghc/ghc-8.2.2.ebuild | 8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 0116a677bd6..bf8e63e2fb8 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -28,5 +28,7 @@ DIST ghc-bin-8.0.2-ppc64.tbz2 117432068 BLAKE2B cae202f0d6e825127d543996b2fe7ae0
 DIST ghc-bin-8.0.2-x86.tbz2 133372061 BLAKE2B 4a32e70e9ab767db4f03874a98f86730b696363874f593f6abdbeeda80e5f38ba3ac94824b9daef839be9f93a80352d529f27949ab91d5eab0c7ba4c57b25bc9 SHA512 020ce0e597e2907550c080f1bb0f863dbf83d5d45df2b3f44173506475bc4ef5423c5a060fdacd87614c3ec398ad94c2dcab9cff0376a54a2c54c2eb1e2f657d
 DIST ghc-bin-8.2.1-i686-pc-linux-gnu.tbz2 96157437 BLAKE2B 2b9608845db8cea78db07209fa054b3b05085d5c3ac07cbe3de02a93c87fb0cff12b1820f08757221c59c8a0a9e7a5563c44266b181525d916825e5cf5bac34c SHA512 e891e76557fa61853e28829b8bedc4a6abb92954f90cc1ebcf22a13cc137556bbe9262e7398b7e1aedbabeb997916b008bf1561a52f16a569f3d58ea9404f41e
 DIST ghc-bin-8.2.1-x86_64-pc-linux-gnu.tbz2 97490496 BLAKE2B 3666ea70cb8b3645db071040d2069fe244042c11954b34e5d92aaa90132d2316c0ee8c176cd4e674772bea3b99df150404f62bd8745c046cdaf102ecf0a0fa54 SHA512 52630a185d0eab56bce0469a612a54109895bfee041ec362ced59a9b35ba3b9c185e86bc7dbf0a5939081d3626baa19fbb3306e36d1857530248a7b9bfc100bb
+DIST ghc-bin-8.2.2-i686-pc-linux-gnu.tbz2 96638908 BLAKE2B b470f838e77330969f162196b0f1035fa764f5d123687fbf67c14323280bfe55216af0e16f8b79c62f290905d96abc8bfafee650f8d27c81608853e78329b2c9 SHA512 15b1525890477539878385efc15ce5f1cf2f126cc785c42923be958cabe3298cebe73526a2370cf4c630124160a7ca0f0f9062aebbf035dce807a0374eaddd14
+DIST ghc-bin-8.2.2-x86_64-pc-linux-gnu.tbz2 97696152 BLAKE2B b481cfea186220ee402f9f215dd48b002288766b643f3d8352579735347136c6349d242a9a56728d88ce80f72367dc9fdb6e40c47a0331910dadbb9a4998e17b SHA512 531df6505e8987fb5c5cc0aac59adc6aa153a4757b96936d3f09f27f3614589ff41c227568b780114b2e87c6c8656f2c88683cce86925628d12723f14b893eff
 DIST hoopl-3.10.2.0.tar.gz 241940 BLAKE2B 0ed7bf80486767c81415f99da8780a525401c388dea0b3f380bbecceae9cc7f66d8b5d0d7b31f8cb41796309b7a93adb113485efd14882f8af321989ce900a9b SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a
 DIST transformers-0.4.3.0.tar.gz 28632 BLAKE2B 92cabcb654bb11854a3bffbb1262f5cd62eda1aff447157086a61ebc451ebf2fddec53b6a2cc058174f24f0f0e32df671d3717e30a542c8dc90cb87e327d990c SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780

diff --git a/dev-lang/ghc/ghc-8.2.2.ebuild b/dev-lang/ghc/ghc-8.2.2.ebuild
index 3113c58efc3..5d07ec19494 100644
--- a/dev-lang/ghc/ghc-8.2.2.ebuild
+++ b/dev-lang/ghc/ghc-8.2.2.ebuild
@@ -26,12 +26,12 @@ arch_binaries=""
 #arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
 #arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
 #arch_binaries="$arch_binaries arm64? ( http://code.haskell.org/~slyfox/ghc-arm64/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
 #arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
 #arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
 #arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
-#arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
 # various ports:
 #arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
@@ -42,12 +42,12 @@ yet_binary() {
 		#alpha) return 0 ;;
 		#arm64) return 0 ;;
 		#arm) return 0 ;;
-		#amd64) return 0 ;;
+		amd64) return 0 ;;
 		#ia64) return 0 ;;
 		#ppc) return 0 ;;
 		#ppc64) return 0 ;;
 		#sparc) return 0 ;;
-		#x86) return 0 ;;
+		x86) return 0 ;;
 		*) return 1 ;;
 	esac
 }


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2017-12-26 12:30 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2017-12-26 12:30 UTC (permalink / raw
  To: gentoo-commits

commit:     fecb72aaa50430507694b62aec12b270a83a3c05
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 26 12:29:47 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Dec 26 12:29:57 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fecb72aa

dev-lang/ghc: bump up to 8.4.1_alpha1 (unkeyworded)

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 dev-lang/ghc/Manifest                |   1 +
 dev-lang/ghc/ghc-8.4.1_alpha1.ebuild | 758 +++++++++++++++++++++++++++++++++++
 2 files changed, 759 insertions(+)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index bf8e63e2fb8..82e0611e746 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -5,6 +5,7 @@ DIST ghc-7.8.4-src.tar.bz2 10600755 BLAKE2B 6cf27f663178513b25032b648cf36b016e01
 DIST ghc-8.0.2-src.tar.xz 10687760 BLAKE2B 3b2a487c115680342ce308ff1a42d2b6fa6fb1f31e2670b27a305b4d44160056611b77273c9d47f2e37a1ef01b1aba59c36e76b65c83142a5f09812bf3b1ea02 SHA512 58ea3853cd93b556ecdc4abd0be079b2621171b8491f59004ea4e036a4cba4470aaafe6591b942e0a50a64bdc47540e01fe6900212a1ef7087850112d9bfc5ef
 DIST ghc-8.2.1-src.tar.xz 10736016 BLAKE2B 60993cfc9569e83b0c383591ef30a7280e0138fbb7bd696ad62d87e68dcbccf31c0b8ba211b6647922b8595c7aec2c783648f12c67da53e0766b71c7d7c923fc SHA512 d9aa2aa7f9414db8f4e51d6c275694b46df515e68331a1a2b6018256333a2c63ebd877b75ee90407ecce5be672ec9afc6bebd62aadbf8ae06b94f1760d1736be
 DIST ghc-8.2.2-src.tar.xz 10753272 BLAKE2B 6fd792390d3df20f84836466705c3f3c931ba2d594dcbe2b808ea0ae284460000b443df8aae74903eabf05ff9064d68a303086cf888ea68222eb1c60959c8f21 SHA512 6549416f470b599973d409fa45f59c25b07e6a94798cef1a19ad432547dc225338cf4dbc4a4793114b4a417798a3b59b122b92b020251074405c5302b7ffe799
+DIST ghc-8.4.0.20171214-src.tar.xz 11153936 BLAKE2B 12a64fc5cf63c137f0f37c6ccf0f8be65edccb120a1ed4d156fcc3e6b4171319b5806e05ab11def25635df664c275e5c89749fd2f4138f0c1a50676fda482f73 SHA512 e92aa4746cb14c538cb6fc86c818b354dbf1c36dc0f9ef79e6617196e8f2264d072346d8f93e27b167d09651458000987c5cddd3751ec4d74972ebfd71cc817b
 DIST ghc-bin-7.10.3-alpha.tbz2 183558856 BLAKE2B 2bb02aafa49c6a91bec016e8bec2d07257d602e53c9df55792ec6fbbf8e2e46de1d5f3f72c0ccf74d6bd7f7987f53412063ccb02ae85455fce11fa928cbf5291 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230
 DIST ghc-bin-7.10.3-amd64.tbz2 112040431 BLAKE2B 3e59b70ca309a1cd704266c54a7983f9a58362bf700ced89c5649c780c664c650ec091e14026a7b84e339d2ebff39eba1772eebcd9fb4b99b9c99d179453d5cc SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558
 DIST ghc-bin-7.10.3-ia64.tbz2 238680956 BLAKE2B 08593718d376051edfb0c86131e54dafc5c15056757fbeef90c653a7d217e49ff34ffaf7cd4083144c9277e73a290b822a0f889aaf806341375708e4b92654b2 SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5

diff --git a/dev-lang/ghc/ghc-8.4.1_alpha1.ebuild b/dev-lang/ghc/ghc-8.4.1_alpha1.ebuild
new file mode 100644
index 00000000000..345c7f59539
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.4.1_alpha1.ebuild
@@ -0,0 +1,758 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+		export CTARGET=${CATEGORY/cross-}
+	fi
+fi
+
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib pax-utils toolchain-funcs versionator prefix
+inherit check-reqs
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="http://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+# sorted!
+#arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( http://code.haskell.org/~slyfox/ghc-arm64/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
+#arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+	case "${ARCH}" in
+		#alpha) return 0 ;;
+		#arm64) return 0 ;;
+		#arm) return 0 ;;
+		#amd64) return 0 ;;
+		#ia64) return 0 ;;
+		#ppc) return 0 ;;
+		#ppc64) return 0 ;;
+		#sparc) return 0 ;;
+		#x86) return 0 ;;
+		*) return 1 ;;
+	esac
+}
+
+GHC_PV=${PV}
+GHC_PV=8.4.0.20171214 # uncomment only for -alpha, -beta, -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz )"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+
+BUMP_LIBRARIES=(
+	# "hackage-name          hackage-version"
+)
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+#KEYWORDS="~alpha ~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc ghcbootstrap ghcmakebinary +gmp profile"
+IUSE+=" binary"
+
+RDEPEND="
+	>=dev-lang/perl-5.6.1
+	dev-libs/gmp:0=
+	sys-libs/ncurses:0=[unicode]
+	!ghcmakebinary? ( virtual/libffi:= )
+"
+
+# This set of dependencies is needed to run
+# prebuilt ghc. We specifically avoid ncurses
+# dependency with:
+#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
+PREBUILT_BINARY_DEPENDS="
+	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+"
+# This set of dependencies is needed to install
+# ghc[binary] in system. terminfo package is linked
+# against ncurses.
+PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
+	sys-libs/ncurses:0/6
+"
+
+RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
+
+DEPEND="${RDEPEND}
+	doc? ( app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5
+		app-text/docbook-xsl-stylesheets
+		dev-python/sphinx
+		>=dev-libs/libxslt-1.1.2 )
+	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
+
+PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
+
+REQUIRED_USE="?? ( ghcbootstrap binary )"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+	[[ ${CHOST} != ${CTARGET} ]]
+}
+
+is_native() {
+	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
+}
+
+# returns tool prefix for crosscompiler.
+# Example:
+#  CTARGET=armv7a-unknown-linux-gnueabi
+#  CHOST=x86_64-pc-linux-gnu
+#    "armv7a-unknown-linux-gnueabi-"
+#  CTARGET=${CHOST}
+#    ""
+# Used in tools and library prefix:
+#    "${ED}"/usr/bin/$(cross)haddock
+#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+
+cross() {
+	if is_crosscompile; then
+		echo "${CTARGET}-"
+	else
+		echo ""
+	fi
+}
+
+append-ghc-cflags() {
+	local persistent compile assemble link
+	local flag ghcflag
+
+	for flag in $*; do
+		case ${flag} in
+			persistent)	persistent="yes";;
+			compile)	compile="yes";;
+			assemble)	assemble="yes";;
+			link)		link="yes";;
+			*)
+				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				;;
+		esac
+	done
+}
+
+# $1 - lib name (under libraries/)
+# $2 - lib version
+# example: bump_lib "transformers" "0.4.2.0"
+bump_lib() {
+	local pn=$1 pv=$2
+	local p=${pn}-${pv}
+	local f
+
+	einfo "Bumping ${pn} up to ${pv}"
+
+	for f in ghc.mk GNUmakefile; do
+		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
+	done
+	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
+	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
+}
+
+update_SRC_URI() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		SRC_URI+=" mirror://hackage/package/${pn}/${pn}-${pv}.tar.gz"
+	done
+}
+
+update_SRC_URI
+
+bump_libs() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		bump_lib "${pn}" "${pv}"
+	done
+}
+
+ghc_setup_cflags() {
+	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
+	if ! is_native; then
+		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
+		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
+		einfo "Crosscompiling mode:"
+		einfo "   CHOST:   ${CHOST}"
+		einfo "   CTARGET: ${CTARGET}"
+		einfo "   CFLAGS:  ${CFLAGS}"
+		einfo "   LDFLAGS: ${LDFLAGS}"
+		einfo "   prefix: $(cross)"
+		return
+	fi
+	# We need to be very careful with the CFLAGS we ask ghc to pass through to
+	# gcc. There are plenty of flags which will make gcc produce output that
+	# breaks ghc in various ways. The main ones we want to pass through are
+	# -mcpu / -march flags. These are important for arches like alpha & sparc.
+	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
+	strip-flags
+	strip-unsupported-flags
+
+	# Cmm can't parse line numbers #482086
+	replace-flags -ggdb[3-9] -ggdb2
+
+	GHC_FLAGS=""
+	GHC_PERSISTENT_FLAGS=""
+	for flag in ${CFLAGS}; do
+		case ${flag} in
+
+			# Ignore extra optimisation (ghc passes -O to gcc anyway)
+			# -O2 and above break on too many systems
+			-O*) ;;
+
+			# Arch and ABI flags are what we're really after
+			-m*) append-ghc-cflags compile assemble ${flag};;
+
+			# Sometimes it's handy to see backtrace of RTS
+			# to get an idea what happens there
+			-g*) append-ghc-cflags compile ${flag};;
+
+			# Ignore all other flags, including all -f* flags
+		esac
+	done
+
+	for flag in ${LDFLAGS}; do
+		append-ghc-cflags link ${flag}
+	done
+
+	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
+	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
+	# options to gcc.
+	if is_native; then
+		# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
+		# are not built with fPIC, bug #606666
+		gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
+		tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
+			# gcc-6.3 has support for -no-pie upstream, but spelling differs from
+			# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
+			# hardened users try '-pie' in USE=ghcbootstrap mode.
+			append-ghc-cflags compile link -no-pie
+		fi
+
+		# prevent from failing to build unregisterised ghc:
+		# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+	fi
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+	local from=$1
+	local   to=$2
+	shift 2
+	local file=
+	for file in "$@"
+	do
+		sed -i -e "s|$from|$to|g" \
+			"$file" || die "path relocation failed for '$file'"
+	done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+	local to=$1
+
+	# libdir for prebuilt binary and for current system may mismatch
+	# It does for prefix installation for example: bug #476998
+	local bin_ghc_prefix=${WORKDIR}/usr
+	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+	# backup original script to use it later after relocation
+	local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
+	cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+	if [[ ${bin_libdir} != $(get_libdir) ]]; then
+		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+		# moving the dir itself is not strictly needed
+		# but then USE=binary would result in installing
+		# in '${bin_libdir}'
+		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+			"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+			"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+			"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+			"${WORKDIR}/usr/bin/hsc2hs" \
+			"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+			"$gp_back" \
+			"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
+	fi
+
+	# Relocate from /usr to ${EPREFIX}/usr
+	relocate_path "/usr" "${to}/usr" \
+		"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+		"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+		"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+		"${WORKDIR}/usr/bin/hsc2hs" \
+		"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+		"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
+
+	# this one we will use to regenerate cache
+	# so it should point to current tree location
+	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+	if use prefix; then
+		hprefixify "${bin_libpath}"/${PN}*/settings
+	fi
+
+	# regenerate the binary package cache
+	"$gp_back" recache || die "failed to update cache after relocation"
+	rm "$gp_back"
+}
+
+ghc-check-reqs() {
+	# These are pessimistic values (slightly bigger than worst-case)
+	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
+	# numbers on various arches.
+	CHECKREQS_DISK_BUILD=8G
+	CHECKREQS_DISK_USR=2G
+	# USE=binary roughly takes
+	use binary && CHECKREQS_DISK_BUILD=4G
+
+	"$@"
+}
+
+pkg_pretend() {
+	ghc-check-reqs check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	ghc-check-reqs check-reqs_pkg_setup
+
+	# quiet portage about prebuilt binaries
+	use binary && QA_PREBUILT="*"
+
+	[[ ${MERGE_TYPE} == binary ]] && return
+
+	if use ghcbootstrap; then
+		ewarn "You requested ghc bootstrapping, this is usually only used"
+		ewarn "by Gentoo developers to make binary .tbz2 packages."
+
+		[[ -z $(type -P ghc) ]] && \
+			die "Could not find a ghc to bootstrap with."
+	else
+		if ! yet_binary; then
+			eerror "Please try emerging with USE=ghcbootstrap and report build"
+			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
+			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
+		fi
+	fi
+}
+
+src_unpack() {
+	# Create the ${S} dir if we're using the binary version
+	use binary && mkdir "${S}"
+
+	# the Solaris and Darwin binaries from ghc (maeder) need to be
+	# unpacked separately, so prevent them from being unpacked
+	local ONLYA=${A}
+	case ${CHOST} in
+		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
+	esac
+	unpack ${ONLYA}
+}
+
+src_prepare() {
+	ghc_setup_cflags
+
+	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+		# See bug #313635.
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${WORKDIR}/usr/bin/ghc-${GHC_PV}"
+
+		# allow hardened users use vanilla binary to bootstrap ghc
+		# ghci uses mmap with rwx protection at it implements dynamic
+		# linking on it's own (bug #299709)
+		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/bin/ghc"
+	fi
+
+	if use binary; then
+		if use prefix; then
+			relocate_ghc "${EPREFIX}"
+		fi
+
+		# Move unpacked files to the expected place
+		mv "${WORKDIR}/usr" "${S}"
+		eapply_user
+	else
+		if ! use ghcbootstrap; then
+			case ${CHOST} in
+				*-darwin* | *-solaris*)
+				# UPDATE ME for ghc-7
+				mkdir "${WORKDIR}"/ghc-bin-installer || die
+				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
+				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
+				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
+				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
+				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
+				popd > /dev/null
+
+				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
+				# fix the binaries so they run, on Solaris we need an
+				# LD_LIBRARY_PATH which has our prefix libdirs, on
+				# Darwin we need to replace the frameworks with our libs
+				# from the prefix fix before installation, because some
+				# of the tools are actually used during configure/make
+				if [[ ${CHOST} == *-solaris* ]] ; then
+					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
+				elif [[ ${CHOST} == *-darwin* ]] ; then
+					local readline_framework=GNUreadline.framework/GNUreadline
+					local gmp_framework=/opt/local/lib/libgmp.10.dylib
+					local ncurses_file=/opt/local/lib/libncurses.5.dylib
+					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
+						install_name_tool -change \
+							${readline_framework} \
+							"${EPREFIX}"/lib/libreadline.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${gmp_framework} \
+							"${EPREFIX}"/usr/lib/libgmp.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${ncurses_file} \
+							"${EPREFIX}"/usr/lib/libncurses.dylib \
+							${binary} || die
+					done
+					# we don't do frameworks!
+					sed -i \
+						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
+						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
+						rts/package.conf.in || die
+				fi
+
+				# it is autoconf, but we really don't want to give it too
+				# much arguments, in fact we do the make in-place anyway
+				./configure --prefix="${WORKDIR}"/usr || die
+				make install || die
+				popd > /dev/null
+				;;
+				*)
+				relocate_ghc "${WORKDIR}"
+				;;
+			esac
+		fi
+
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${S}/ghc/ghc.wrapper"
+
+		cd "${S}" # otherwise eapply will break
+
+		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
+		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+
+		# a bunch of crosscompiler patches
+		# needs newer version:
+		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+
+		# needs a new libffi release
+		eapply "${FILESDIR}"/${PN}-8.0.2-libffi-alpha.patch
+
+		# mingw32 target
+		pushd "${S}/libraries/Win32"
+			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
+		popd
+
+		bump_libs
+
+		eapply_user
+		# as we have changed the build system
+		eautoreconf
+	fi
+}
+
+src_configure() {
+	if ! use binary; then
+		# initialize build.mk
+		echo '# Gentoo changes' > mk/build.mk
+
+		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
+		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+
+		# We also need to use the GHC_FLAGS flags when building ghc itself
+		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
+		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
+		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
+		# Speed up initial Cabal bootstrap
+		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
+
+		# We can't depend on haddock except when bootstrapping when we
+		# must build docs and include them into the binary .tbz2 package
+		# app-text/dblatex is not in portage, can not build PDF or PS
+		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
+		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
+		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
+
+		# this controls presence on 'xhtml' and 'haddock' in final install
+		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
+
+		# not used outside of ghc's test
+		if [[ -n ${GHC_BUILD_DPH} ]]; then
+				echo "BUILD_DPH = YES" >> mk/build.mk
+			else
+				echo "BUILD_DPH = NO" >> mk/build.mk
+		fi
+
+		# Any non-native build has to skip as it needs
+		# target haddock binary to be runnabine.
+		if ! is_native; then
+			# disable docs generation as it requires running stage2
+			echo "HADDOCK_DOCS=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
+		fi
+
+		if is_crosscompile; then
+			# Install ghc-stage1 crosscompiler instead of
+			# ghc-stage2 cross-built compiler.
+			echo "Stage1Only=YES" >> mk/build.mk
+		fi
+
+		# allows overriding build flavours for libraries:
+		# v   - vanilla (static libs)
+		# p   - profiled
+		# dyn - shared libraries
+		# example: GHC_LIBRARY_WAYS="v dyn"
+		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
+			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
+		fi
+		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
+
+		# Get ghc from the unpacked binary .tbz2
+		# except when bootstrapping we just pick ghc up off the path
+		if ! use ghcbootstrap; then
+			export PATH="${WORKDIR}/usr/bin:${PATH}"
+		fi
+
+		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
+
+		# don't strip anything. Very useful when stage2 SIGSEGVs on you
+		echo "STRIP_CMD = :" >> mk/build.mk
+
+		local econf_args=()
+
+		# GHC embeds toolchain it was built by and uses it later.
+		# Don't allow things like ccache or versioned binary slip.
+		# We use stable thing across gcc upgrades.
+		# User can use EXTRA_ECONF=CC=... to override this default.
+		econf_args+=(
+			AR=${CTARGET}-ar
+			CC=${CTARGET}-gcc
+			# these should be inferred by GHC but ghc defaults
+			# to using bundled tools on windows.
+			Windres=${CTARGET}-windres
+			DllWrap=${CTARGET}-dllwrap
+			# we set the linker explicitly below
+			--disable-ld-override
+		)
+		case ${CTARGET} in
+			arm*)
+				# ld.bfd-2.28 does not work for ghc. Force ld.gold
+				# instead. This should be removed once gentoo gets
+				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
+				econf_args+=(LD=${CTARGET}-ld.gold)
+			;;
+			sparc*)
+				# ld.gold-2.28 does not work for ghc. Force ld.bfd
+				# instead. This should be removed once gentoo gets
+				# a fix for missing --no-relax support bug:
+				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
+				econf_args+=(LD=${CTARGET}-ld.bfd)
+			;;
+			*)
+				econf_args+=(LD=${CTARGET}-ld)
+		esac
+
+		if [[ ${CBUILD} != ${CHOST} ]]; then
+			# GHC bug: ghc claims not to support cross-building.
+			# It does, but does not distinct --host= value
+			# for stage1 and stage2 compiler.
+			econf_args+=(--host=${CBUILD})
+		fi
+
+		if use ghcmakebinary; then
+			# When building booting libary we are trying to
+			# bundle or restrict most of external depends
+			# with unstable ABI:
+			#  - embed libffi (default GHC behaviour)
+			#  - disable ncurses support for ghci (via haskeline)
+			#    https://bugs.gentoo.org/557478
+			#  - disable ncurses support for ghc-pkg
+			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
+			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
+		elif is_native; then
+			# using ${GTARGET}'s libffi is not supported yet:
+			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
+			econf_args+=(--with-system-libffi)
+			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+		fi
+
+		einfo "Final mk/build.mk:"
+		cat mk/build.mk || die
+
+		econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
+
+		if [[ ${PV} == *9999* ]]; then
+			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+			GHC_P=${PN}-${GHC_PV}
+		fi
+	fi # ! use binary
+}
+
+src_compile() {
+	if ! use binary; then
+		# Stage1Only crosscompiler does not build stage2
+		if ! is_crosscompile; then
+			# 1. build/pax-mark compiler binary first
+			emake ghc/stage2/build/tmp/ghc-stage2
+			# 2. pax-mark (bug #516430)
+			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
+			# 2. build/pax-mark haddock using ghc-stage2
+			if is_native; then
+				# non-native build does not build haddock
+				# due to HADDOCK_DOCS=NO, but it could.
+				emake utils/haddock/dist/build/tmp/haddock
+				pax-mark -m utils/haddock/dist/build/tmp/haddock
+			fi
+		fi
+		# 3. and then all the rest
+		emake all
+	fi # ! use binary
+}
+
+src_install() {
+	if use binary; then
+		use prefix && mkdir -p "${ED}"
+		mv "${S}/usr" "${ED}"
+	else
+		[[ -f VERSION ]] || emake VERSION
+
+		# -j1 due to a rare race in install script:
+		#    make --no-print-directory -f ghc.mk phase=final install
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
+		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
+		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
+		#    /usr/bin/install: cannot create regular file \
+		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
+		emake -j1 install DESTDIR="${D}"
+
+		# Skip for cross-targets as they all share target location:
+		# /usr/share/doc/ghc-9999/
+		if ! is_crosscompile; then
+			dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
+		fi
+
+		# rename ghc-shipped files to avoid collision
+		# of external packages. Motivating example:
+		#  user had installed:
+		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
+		#      dev-haskell/transformers-0.4.2.0
+		#  then user tried to update to
+		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
+		#  this will lead to single .conf file collision.
+		local shipped_conf renamed_conf
+		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+		for shipped_conf in "${package_confdir}"/*.conf; do
+			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
+			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
+			mv "${shipped_conf}" "${renamed_conf}" || die
+		done
+
+		# remove link, but leave 'haddock-${GHC_P}'
+		rm -f "${ED}"/usr/bin/$(cross)haddock
+
+		if ! is_crosscompile; then
+			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
+			newbashcomp utils/completion/ghc.bash         ghc
+		fi
+	fi
+
+	# path to the package.cache
+	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+	PKGCACHE="${package_confdir}"/package.cache
+	# copy the package.conf.d, including timestamp, save it so we can help
+	# users that have a broken package.conf.d
+	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
+
+	# copy the package.conf, including timestamp, save it so we later can put it
+	# back before uninstalling, or when upgrading.
+	cp -p "${PKGCACHE}"{,.shipped} \
+		|| die "failed to copy package.conf.d/package.cache"
+}
+
+pkg_preinst() {
+	# have we got an earlier version of ghc installed?
+	if has_version "<${CATEGORY}/${PF}"; then
+		haskell_updater_warn="1"
+	fi
+}
+
+pkg_postinst() {
+	ghc-reregister
+
+	# path to the package.cache
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+
+	# give the cache a new timestamp, it must be as recent as
+	# the package.conf.d directory.
+	touch "${PKGCACHE}"
+
+	if [[ "${haskell_updater_warn}" == "1" ]]; then
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+		ewarn "You have just upgraded from an older version of GHC."
+		ewarn "You may have to run"
+		ewarn "      'haskell-updater'"
+		ewarn "to rebuild all ghc-based Haskell libraries."
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+	fi
+}
+
+pkg_prerm() {
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+	rm -rf "${PKGCACHE}"
+
+	cp -p "${PKGCACHE}"{.shipped,}
+}
+
+pkg_postrm() {
+	ghc-package_pkg_postrm
+}


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2018-01-22  0:01 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2018-01-22  0:01 UTC (permalink / raw
  To: gentoo-commits

commit:     bf8f136b40a11d047b6281970753ededfca09b04
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 22 00:01:07 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Jan 22 00:01:07 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf8f136b

dev-lang/ghc: rebuild ghc against gcc-6 (PIE support), bug #644170

Refresh binaries for amd64 and x86 to support -no-pie option by default.

Reported-by: Anton Kochkov
Bug: https://bugs.gentoo.org/644170
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 dev-lang/ghc/Manifest         | 4 ++--
 dev-lang/ghc/ghc-8.0.2.ebuild | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 82e0611e746..67e9873d8a6 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -21,12 +21,12 @@ DIST ghc-bin-7.8.4-ppc64.tbz2 129284515 BLAKE2B 2e9a1e70830930dda7dcbd696ef3c27e
 DIST ghc-bin-7.8.4-sparc.tbz2 147340595 BLAKE2B 8e39d6b144f4fce5196ad758f89887476e0482e8b98a012874d293d5e57756659cb9acb897476593a28f98f5c859548efa2e130f3806bfa2bb9e74795078a506 SHA512 ee5f0b2f1cf2693a0f2be9df71ef61b52bc2327225d40b8be955c1584b9901ffc6aaab63c1e46bf9bb352633b605c98378f8fd3e6cd71aef1c089007e4110217
 DIST ghc-bin-7.8.4-x86.tbz2 102312459 BLAKE2B 256cca9b2353af30dd7c239db0e21781d9d8aa352e38b3dd678b1429be6251e81f8955ac6ee0f766cc55f4de71c68acd98bc7b9434c3ea4b056d446ca59adc97 SHA512 cabc5bd6d8760ce4120e7053f6c1dffca7d161ba454b6201087760096c037c932e3ff8c82e53346c8278855bf0cff1c2f5fb8046242ca4d8307355b060a9556e
 DIST ghc-bin-8.0.2-alpha.tbz2 234361847 BLAKE2B 8e3439f3bbae1d3f6ab71f69669ea065f5f36c9cb4b334f06161cc1b9507aae56297d5eeb8a9cf72916aa012fab0b444a179a0336f00d5f17a8d402d5807c6f8 SHA512 c8b588feeab85f7b8fd60e2e8bf755d46790d4882d2ecf6b2c8b8e02c62a11b7e6453bf0cfbc646bfbf24310fdc775337f3957ba5783675a271b68f0af2e9070
-DIST ghc-bin-8.0.2-amd64.tbz2 131007452 BLAKE2B bb0fd3199b62dee98ef6f47ebd1c52afa56af837bae85d96c5b745a50c6a2031885e7bdd4ad40d1fbed7c6edb446801fbe34cd93134234dc842dca21231d2dac SHA512 d960c40966e392d5497f694f0b47df4a6ec22ad1b4a607437c8af7c33dfbf122ccefb525d807716539af57c31660378e52fc495dd0a1d0fc3bccaef3578be177
 DIST ghc-bin-8.0.2-arm64.tbz2 191332951 BLAKE2B 305c4d618a6221e1322a5665544883624de4646e0186c6eab56d0b32877645f0b2bad8381848914751fbd2e11598727c46ab136de74c57207b75ecc6cce9572a SHA512 b9cabfda8fc6e851ba99f53274c1a63c5a6a365311a9203f1247ecf90ab843dd94960ad44c4e67032f4690f07d67bfd8bdfbe59f857d6c63344430539e2082fc
+DIST ghc-bin-8.0.2-i686-pc-linux-gnu.tbz2 133679542 BLAKE2B c50597857b53a2bf9d8047c048f86aa1782f74d5d9816d44b7bad7302181b407257ad0b52a03b4ad4936de3a15010b0ff5ca877b9578af6d3e7684dda2284718 SHA512 7f33e0b20a21fe076db142a58a81f68ab8f230ac9ce0167aba31aa0843bce20a9cf4065acc1c0ee2aaa01ea2ad4a8234388b0cf3ef886dccf25d7072602b430b
 DIST ghc-bin-8.0.2-ia64.tbz2 250237654 BLAKE2B e76987717399f4be0a3f99e9976f29416c768a61280bc5a05ca8759d5fbc6273e28d54fac102a5f69b65c7fb50acfd1a3c7505f697f0900cc3f619ffacf9e1bb SHA512 e8cb381de12ccc0a7b513683deb5de555fecea22a735d09b073b0199ab4124305bbd8a093b4710b827513d33fd4224007e7bd210b146508eb183be7dfd283a26
 DIST ghc-bin-8.0.2-ppc.tbz2 144760090 BLAKE2B 32410f3563f7f2555350806db460d2083c7248c57223c9c681d0b4913df942f023c7c1f5fda145179a524ee7ef105a9b8309ba87c20dc393a9f49151579b6767 SHA512 bc6bf8998064ffc1692c3bb83c44d1787760a3f4a1e6b79dedaefda5fe32b9052049a60f0ddd3c0b0bd24a722fb35e310e0189b3511721ff89d4d02b3d7c14bb
 DIST ghc-bin-8.0.2-ppc64.tbz2 117432068 BLAKE2B cae202f0d6e825127d543996b2fe7ae02578c47325674cbf22fddc53b1c4c9413f45c60d76ec3d07860cb8d0aae1ec792e4141822cc5c08ef9013308c5d29bf5 SHA512 0eaff0557b68649a15bbeb2019f46fa9e9e7b8a916aa210ab56888090a5b887d20d818e7987177bc6a8e7fde503de560026e6bb55fe39679b8b1ee13c6b7c4f9
-DIST ghc-bin-8.0.2-x86.tbz2 133372061 BLAKE2B 4a32e70e9ab767db4f03874a98f86730b696363874f593f6abdbeeda80e5f38ba3ac94824b9daef839be9f93a80352d529f27949ab91d5eab0c7ba4c57b25bc9 SHA512 020ce0e597e2907550c080f1bb0f863dbf83d5d45df2b3f44173506475bc4ef5423c5a060fdacd87614c3ec398ad94c2dcab9cff0376a54a2c54c2eb1e2f657d
+DIST ghc-bin-8.0.2-x86_64-pc-linux-gnu.tbz2 130852973 BLAKE2B 24d2032bbfc664d924800c1a317334e2342c8ec1e529178f9d1bb99bb4772a9cc100603bf70111b8cfafa715c1cccc643f115c77cf6adcdfb17d1f1735ee6682 SHA512 c36e0e2600fc7c284562a323d396a03062cb6e8fa63c353e672be61e76d2ec5c7698485e3a370a57cf512db9e5ba6a68338fff2ab404d9fe67b1a468ed72638f
 DIST ghc-bin-8.2.1-i686-pc-linux-gnu.tbz2 96157437 BLAKE2B 2b9608845db8cea78db07209fa054b3b05085d5c3ac07cbe3de02a93c87fb0cff12b1820f08757221c59c8a0a9e7a5563c44266b181525d916825e5cf5bac34c SHA512 e891e76557fa61853e28829b8bedc4a6abb92954f90cc1ebcf22a13cc137556bbe9262e7398b7e1aedbabeb997916b008bf1561a52f16a569f3d58ea9404f41e
 DIST ghc-bin-8.2.1-x86_64-pc-linux-gnu.tbz2 97490496 BLAKE2B 3666ea70cb8b3645db071040d2069fe244042c11954b34e5d92aaa90132d2316c0ee8c176cd4e674772bea3b99df150404f62bd8745c046cdaf102ecf0a0fa54 SHA512 52630a185d0eab56bce0469a612a54109895bfee041ec362ced59a9b35ba3b9c185e86bc7dbf0a5939081d3626baa19fbb3306e36d1857530248a7b9bfc100bb
 DIST ghc-bin-8.2.2-i686-pc-linux-gnu.tbz2 96638908 BLAKE2B b470f838e77330969f162196b0f1035fa764f5d123687fbf67c14323280bfe55216af0e16f8b79c62f290905d96abc8bfafee650f8d27c81608853e78329b2c9 SHA512 15b1525890477539878385efc15ce5f1cf2f126cc785c42923be958cabe3298cebe73526a2370cf4c630124160a7ca0f0f9062aebbf035dce807a0374eaddd14

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index 2063cc61ec9..b95016abd95 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -27,12 +27,12 @@ arch_binaries=""
 arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
 #arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
 arch_binaries="$arch_binaries arm64? ( http://code.haskell.org/~slyfox/ghc-arm64/ghc-bin-${PV}-arm64.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
 arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64.tbz2 )"
 arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
 arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
 #arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
 # various ports:
 #arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2018-03-09 22:36 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2018-03-09 22:36 UTC (permalink / raw
  To: gentoo-commits

commit:     9ace482e762b1f671985c3e20a21d09a01b40917
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Mar  9 22:35:30 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Mar  9 22:36:18 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ace482e

dev-lang/ghc: bump up to 8.4.1 with x86 and amd64 binaries

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-lang/ghc/Manifest                                   |  4 +++-
 .../ghc/{ghc-8.4.1_alpha1.ebuild => ghc-8.4.1.ebuild}   | 17 +++++++----------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 67e9873d8a6..00b1a9c5e0d 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -5,7 +5,7 @@ DIST ghc-7.8.4-src.tar.bz2 10600755 BLAKE2B 6cf27f663178513b25032b648cf36b016e01
 DIST ghc-8.0.2-src.tar.xz 10687760 BLAKE2B 3b2a487c115680342ce308ff1a42d2b6fa6fb1f31e2670b27a305b4d44160056611b77273c9d47f2e37a1ef01b1aba59c36e76b65c83142a5f09812bf3b1ea02 SHA512 58ea3853cd93b556ecdc4abd0be079b2621171b8491f59004ea4e036a4cba4470aaafe6591b942e0a50a64bdc47540e01fe6900212a1ef7087850112d9bfc5ef
 DIST ghc-8.2.1-src.tar.xz 10736016 BLAKE2B 60993cfc9569e83b0c383591ef30a7280e0138fbb7bd696ad62d87e68dcbccf31c0b8ba211b6647922b8595c7aec2c783648f12c67da53e0766b71c7d7c923fc SHA512 d9aa2aa7f9414db8f4e51d6c275694b46df515e68331a1a2b6018256333a2c63ebd877b75ee90407ecce5be672ec9afc6bebd62aadbf8ae06b94f1760d1736be
 DIST ghc-8.2.2-src.tar.xz 10753272 BLAKE2B 6fd792390d3df20f84836466705c3f3c931ba2d594dcbe2b808ea0ae284460000b443df8aae74903eabf05ff9064d68a303086cf888ea68222eb1c60959c8f21 SHA512 6549416f470b599973d409fa45f59c25b07e6a94798cef1a19ad432547dc225338cf4dbc4a4793114b4a417798a3b59b122b92b020251074405c5302b7ffe799
-DIST ghc-8.4.0.20171214-src.tar.xz 11153936 BLAKE2B 12a64fc5cf63c137f0f37c6ccf0f8be65edccb120a1ed4d156fcc3e6b4171319b5806e05ab11def25635df664c275e5c89749fd2f4138f0c1a50676fda482f73 SHA512 e92aa4746cb14c538cb6fc86c818b354dbf1c36dc0f9ef79e6617196e8f2264d072346d8f93e27b167d09651458000987c5cddd3751ec4d74972ebfd71cc817b
+DIST ghc-8.4.1-src.tar.xz 11301528 BLAKE2B 6dcf467d04cace856b68315c85b80f19b517dcbc8ae6e2a08c60afa141c9e0261e012738452c9ca208f9fc40c48bd1a0817e5e0fe9f4737383cd7b44ca65c8d9 SHA512 f8ae11f498bf2911fb92635534c6906c96f1fbe5072c7b7447bd3f69e408026b674564515af02a8aaddc57ee6905ce78d10005b12478a39c220580aaec13a9f7
 DIST ghc-bin-7.10.3-alpha.tbz2 183558856 BLAKE2B 2bb02aafa49c6a91bec016e8bec2d07257d602e53c9df55792ec6fbbf8e2e46de1d5f3f72c0ccf74d6bd7f7987f53412063ccb02ae85455fce11fa928cbf5291 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230
 DIST ghc-bin-7.10.3-amd64.tbz2 112040431 BLAKE2B 3e59b70ca309a1cd704266c54a7983f9a58362bf700ced89c5649c780c664c650ec091e14026a7b84e339d2ebff39eba1772eebcd9fb4b99b9c99d179453d5cc SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558
 DIST ghc-bin-7.10.3-ia64.tbz2 238680956 BLAKE2B 08593718d376051edfb0c86131e54dafc5c15056757fbeef90c653a7d217e49ff34ffaf7cd4083144c9277e73a290b822a0f889aaf806341375708e4b92654b2 SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5
@@ -31,5 +31,7 @@ DIST ghc-bin-8.2.1-i686-pc-linux-gnu.tbz2 96157437 BLAKE2B 2b9608845db8cea78db07
 DIST ghc-bin-8.2.1-x86_64-pc-linux-gnu.tbz2 97490496 BLAKE2B 3666ea70cb8b3645db071040d2069fe244042c11954b34e5d92aaa90132d2316c0ee8c176cd4e674772bea3b99df150404f62bd8745c046cdaf102ecf0a0fa54 SHA512 52630a185d0eab56bce0469a612a54109895bfee041ec362ced59a9b35ba3b9c185e86bc7dbf0a5939081d3626baa19fbb3306e36d1857530248a7b9bfc100bb
 DIST ghc-bin-8.2.2-i686-pc-linux-gnu.tbz2 96638908 BLAKE2B b470f838e77330969f162196b0f1035fa764f5d123687fbf67c14323280bfe55216af0e16f8b79c62f290905d96abc8bfafee650f8d27c81608853e78329b2c9 SHA512 15b1525890477539878385efc15ce5f1cf2f126cc785c42923be958cabe3298cebe73526a2370cf4c630124160a7ca0f0f9062aebbf035dce807a0374eaddd14
 DIST ghc-bin-8.2.2-x86_64-pc-linux-gnu.tbz2 97696152 BLAKE2B b481cfea186220ee402f9f215dd48b002288766b643f3d8352579735347136c6349d242a9a56728d88ce80f72367dc9fdb6e40c47a0331910dadbb9a4998e17b SHA512 531df6505e8987fb5c5cc0aac59adc6aa153a4757b96936d3f09f27f3614589ff41c227568b780114b2e87c6c8656f2c88683cce86925628d12723f14b893eff
+DIST ghc-bin-8.4.1-i686-pc-linux-gnu.tbz2 116995839 BLAKE2B f94f2206d603d57f7fa64bdf63bcd2528019284fbf6641273ea1d8c62324e2f0b26b2cfa50c6ef96e12beba550bcedd17aa824e7cf9a27c794e962526326e105 SHA512 8167ea80fa627a1b55d28363513ac79985229326019288e7334cc87c3017d39781f4d129081d62da112420152a41d23d2dffb0c13721b80cca72d2a21fbd2c0a
+DIST ghc-bin-8.4.1-x86_64-pc-linux-gnu.tbz2 117369638 BLAKE2B 583db924a50a3d7d261d2f392a74e0ff487ee662af055ac292ff1943534fb305d6c9f6f0045ba4bdd5afa268d75beb50f64b4760e49cddabe1f56776a5f4769f SHA512 801f4ecd538c7a035a0f573f301769984814fa3ce4cf5b09a914ba012bebe0583b6695a6a93f92c7e6e2b7d58caf812a1214b5b778d7b7835d7eab988ad69ba0
 DIST hoopl-3.10.2.0.tar.gz 241940 BLAKE2B 0ed7bf80486767c81415f99da8780a525401c388dea0b3f380bbecceae9cc7f66d8b5d0d7b31f8cb41796309b7a93adb113485efd14882f8af321989ce900a9b SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a
 DIST transformers-0.4.3.0.tar.gz 28632 BLAKE2B 92cabcb654bb11854a3bffbb1262f5cd62eda1aff447157086a61ebc451ebf2fddec53b6a2cc058174f24f0f0e32df671d3717e30a542c8dc90cb87e327d990c SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780

diff --git a/dev-lang/ghc/ghc-8.4.1_alpha1.ebuild b/dev-lang/ghc/ghc-8.4.1.ebuild
similarity index 97%
rename from dev-lang/ghc/ghc-8.4.1_alpha1.ebuild
rename to dev-lang/ghc/ghc-8.4.1.ebuild
index 345c7f59539..0e4762bb07d 100644
--- a/dev-lang/ghc/ghc-8.4.1_alpha1.ebuild
+++ b/dev-lang/ghc/ghc-8.4.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -26,12 +26,12 @@ arch_binaries=""
 #arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
 #arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
 #arch_binaries="$arch_binaries arm64? ( http://code.haskell.org/~slyfox/ghc-arm64/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
 #arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
 #arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
 #arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
-#arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
 # various ports:
 #arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
@@ -42,18 +42,18 @@ yet_binary() {
 		#alpha) return 0 ;;
 		#arm64) return 0 ;;
 		#arm) return 0 ;;
-		#amd64) return 0 ;;
+		amd64) return 0 ;;
 		#ia64) return 0 ;;
 		#ppc) return 0 ;;
 		#ppc64) return 0 ;;
 		#sparc) return 0 ;;
-		#x86) return 0 ;;
+		x86) return 0 ;;
 		*) return 1 ;;
 	esac
 }
 
 GHC_PV=${PV}
-GHC_PV=8.4.0.20171214 # uncomment only for -alpha, -beta, -rc ebuilds
+#GHC_PV=8.4.0.20180224 # uncomment only for -alpha, -beta, -rc ebuilds
 GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
 
 SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz )"
@@ -102,7 +102,7 @@ DEPEND="${RDEPEND}
 		>=dev-libs/libxslt-1.1.2 )
 	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
 
-PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
+PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
 
 REQUIRED_USE="?? ( ghcbootstrap binary )"
 
@@ -478,9 +478,6 @@ src_prepare() {
 		# needs newer version:
 		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
 
-		# needs a new libffi release
-		eapply "${FILESDIR}"/${PN}-8.0.2-libffi-alpha.patch
-
 		# mingw32 target
 		pushd "${S}/libraries/Win32"
 			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2018-05-09 18:37 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2018-05-09 18:37 UTC (permalink / raw
  To: gentoo-commits

commit:     c31e4e32f8acee7451c3d7015b4f172ebb15fa7e
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed May  9 18:36:59 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed May  9 18:37:08 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c31e4e32

dev-lang/ghc: bump up to 8.4.2 (no keywords)

Package-Manager: Portage-2.3.36, Repoman-2.3.9

 dev-lang/ghc/Manifest         |   3 +
 dev-lang/ghc/ghc-8.4.2.ebuild | 755 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 758 insertions(+)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 00b1a9c5e0d..0e30d62f1a7 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -6,6 +6,7 @@ DIST ghc-8.0.2-src.tar.xz 10687760 BLAKE2B 3b2a487c115680342ce308ff1a42d2b6fa6fb
 DIST ghc-8.2.1-src.tar.xz 10736016 BLAKE2B 60993cfc9569e83b0c383591ef30a7280e0138fbb7bd696ad62d87e68dcbccf31c0b8ba211b6647922b8595c7aec2c783648f12c67da53e0766b71c7d7c923fc SHA512 d9aa2aa7f9414db8f4e51d6c275694b46df515e68331a1a2b6018256333a2c63ebd877b75ee90407ecce5be672ec9afc6bebd62aadbf8ae06b94f1760d1736be
 DIST ghc-8.2.2-src.tar.xz 10753272 BLAKE2B 6fd792390d3df20f84836466705c3f3c931ba2d594dcbe2b808ea0ae284460000b443df8aae74903eabf05ff9064d68a303086cf888ea68222eb1c60959c8f21 SHA512 6549416f470b599973d409fa45f59c25b07e6a94798cef1a19ad432547dc225338cf4dbc4a4793114b4a417798a3b59b122b92b020251074405c5302b7ffe799
 DIST ghc-8.4.1-src.tar.xz 11301528 BLAKE2B 6dcf467d04cace856b68315c85b80f19b517dcbc8ae6e2a08c60afa141c9e0261e012738452c9ca208f9fc40c48bd1a0817e5e0fe9f4737383cd7b44ca65c8d9 SHA512 f8ae11f498bf2911fb92635534c6906c96f1fbe5072c7b7447bd3f69e408026b674564515af02a8aaddc57ee6905ce78d10005b12478a39c220580aaec13a9f7
+DIST ghc-8.4.2-src.tar.xz 11313140 BLAKE2B d6fe90f3c68b137c6029bf08918a51ff43c210ba0485aca8d77541cd455f6f9c94287cd011ecd710a8e5a14a27e8a27c04c517417c5748966afd63a5ba6ed19e SHA512 aeb17c986c597762381d9887679eb0eec194c2938a92b5a33e66b4c80002ead02d672b4aa968e1061ab5652b74e46a3c9f9e3d58d5be4a0ae47aa8aed288cf1f
 DIST ghc-bin-7.10.3-alpha.tbz2 183558856 BLAKE2B 2bb02aafa49c6a91bec016e8bec2d07257d602e53c9df55792ec6fbbf8e2e46de1d5f3f72c0ccf74d6bd7f7987f53412063ccb02ae85455fce11fa928cbf5291 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230
 DIST ghc-bin-7.10.3-amd64.tbz2 112040431 BLAKE2B 3e59b70ca309a1cd704266c54a7983f9a58362bf700ced89c5649c780c664c650ec091e14026a7b84e339d2ebff39eba1772eebcd9fb4b99b9c99d179453d5cc SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558
 DIST ghc-bin-7.10.3-ia64.tbz2 238680956 BLAKE2B 08593718d376051edfb0c86131e54dafc5c15056757fbeef90c653a7d217e49ff34ffaf7cd4083144c9277e73a290b822a0f889aaf806341375708e4b92654b2 SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5
@@ -33,5 +34,7 @@ DIST ghc-bin-8.2.2-i686-pc-linux-gnu.tbz2 96638908 BLAKE2B b470f838e77330969f162
 DIST ghc-bin-8.2.2-x86_64-pc-linux-gnu.tbz2 97696152 BLAKE2B b481cfea186220ee402f9f215dd48b002288766b643f3d8352579735347136c6349d242a9a56728d88ce80f72367dc9fdb6e40c47a0331910dadbb9a4998e17b SHA512 531df6505e8987fb5c5cc0aac59adc6aa153a4757b96936d3f09f27f3614589ff41c227568b780114b2e87c6c8656f2c88683cce86925628d12723f14b893eff
 DIST ghc-bin-8.4.1-i686-pc-linux-gnu.tbz2 116995839 BLAKE2B f94f2206d603d57f7fa64bdf63bcd2528019284fbf6641273ea1d8c62324e2f0b26b2cfa50c6ef96e12beba550bcedd17aa824e7cf9a27c794e962526326e105 SHA512 8167ea80fa627a1b55d28363513ac79985229326019288e7334cc87c3017d39781f4d129081d62da112420152a41d23d2dffb0c13721b80cca72d2a21fbd2c0a
 DIST ghc-bin-8.4.1-x86_64-pc-linux-gnu.tbz2 117369638 BLAKE2B 583db924a50a3d7d261d2f392a74e0ff487ee662af055ac292ff1943534fb305d6c9f6f0045ba4bdd5afa268d75beb50f64b4760e49cddabe1f56776a5f4769f SHA512 801f4ecd538c7a035a0f573f301769984814fa3ce4cf5b09a914ba012bebe0583b6695a6a93f92c7e6e2b7d58caf812a1214b5b778d7b7835d7eab988ad69ba0
+DIST ghc-bin-8.4.2-i686-pc-linux-gnu.tbz2 117083472 BLAKE2B 7dac18523ed693efb0ec42b31bf7b910e6bb8289cdc13eb309bdb30230fc87fbb060baf41eb4f18af2bb265b42e6aca535ceb70cf0fe09046b0e4650f11bb37c SHA512 f9799bdf7a2a66d1db34b828860203872d7398bab2d667e8982c9ee89301654c3f7f54705b639df2d7adebcfb7a05e071b83d994f5e52a72f604b62098be51cd
+DIST ghc-bin-8.4.2-x86_64-pc-linux-gnu.tbz2 117604406 BLAKE2B 644ef535497eb73a2d1ceaab7ff96228e8d4021c09bc061a3f397dc27b3b86bd6d5300736e478671cee0a160bfaa5aa4611f06012285079b40973f468b59664a SHA512 7bf4bcdce954319422b8b8f09e56294012fac145662ba3de1c7765ed86ae9f8b61dcf6dd8febcf85d60db8d1a26edcaf4e89c3644ffa24c7b5b5c41a14105936
 DIST hoopl-3.10.2.0.tar.gz 241940 BLAKE2B 0ed7bf80486767c81415f99da8780a525401c388dea0b3f380bbecceae9cc7f66d8b5d0d7b31f8cb41796309b7a93adb113485efd14882f8af321989ce900a9b SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a
 DIST transformers-0.4.3.0.tar.gz 28632 BLAKE2B 92cabcb654bb11854a3bffbb1262f5cd62eda1aff447157086a61ebc451ebf2fddec53b6a2cc058174f24f0f0e32df671d3717e30a542c8dc90cb87e327d990c SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780

diff --git a/dev-lang/ghc/ghc-8.4.2.ebuild b/dev-lang/ghc/ghc-8.4.2.ebuild
new file mode 100644
index 00000000000..4fe09376cf4
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.4.2.ebuild
@@ -0,0 +1,755 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+		export CTARGET=${CATEGORY/cross-}
+	fi
+fi
+
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib pax-utils toolchain-funcs versionator prefix
+inherit check-reqs
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="http://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+# sorted!
+#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+	case "${ARCH}" in
+		#alpha) return 0 ;;
+		#arm64) return 0 ;;
+		#arm) return 0 ;;
+		amd64) return 0 ;;
+		#ia64) return 0 ;;
+		#ppc) return 0 ;;
+		#ppc64) return 0 ;;
+		#sparc) return 0 ;;
+		x86) return 0 ;;
+		*) return 1 ;;
+	esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=8.4.1.20180329 # uncomment only for -alpha, -beta, -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz )"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+
+BUMP_LIBRARIES=(
+	# "hackage-name          hackage-version"
+)
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+#KEYWORDS="~alpha ~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc ghcbootstrap ghcmakebinary +gmp profile"
+IUSE+=" binary"
+
+RDEPEND="
+	>=dev-lang/perl-5.6.1
+	dev-libs/gmp:0=
+	sys-libs/ncurses:0=[unicode]
+	!ghcmakebinary? ( virtual/libffi:= )
+"
+
+# This set of dependencies is needed to run
+# prebuilt ghc. We specifically avoid ncurses
+# dependency with:
+#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
+PREBUILT_BINARY_DEPENDS="
+	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+"
+# This set of dependencies is needed to install
+# ghc[binary] in system. terminfo package is linked
+# against ncurses.
+PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
+	sys-libs/ncurses:0/6
+"
+
+RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
+
+DEPEND="${RDEPEND}
+	doc? ( app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5
+		app-text/docbook-xsl-stylesheets
+		dev-python/sphinx
+		>=dev-libs/libxslt-1.1.2 )
+	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
+
+PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
+
+REQUIRED_USE="?? ( ghcbootstrap binary )"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+	[[ ${CHOST} != ${CTARGET} ]]
+}
+
+is_native() {
+	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
+}
+
+# returns tool prefix for crosscompiler.
+# Example:
+#  CTARGET=armv7a-unknown-linux-gnueabi
+#  CHOST=x86_64-pc-linux-gnu
+#    "armv7a-unknown-linux-gnueabi-"
+#  CTARGET=${CHOST}
+#    ""
+# Used in tools and library prefix:
+#    "${ED}"/usr/bin/$(cross)haddock
+#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+
+cross() {
+	if is_crosscompile; then
+		echo "${CTARGET}-"
+	else
+		echo ""
+	fi
+}
+
+append-ghc-cflags() {
+	local persistent compile assemble link
+	local flag ghcflag
+
+	for flag in $*; do
+		case ${flag} in
+			persistent)	persistent="yes";;
+			compile)	compile="yes";;
+			assemble)	assemble="yes";;
+			link)		link="yes";;
+			*)
+				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				;;
+		esac
+	done
+}
+
+# $1 - lib name (under libraries/)
+# $2 - lib version
+# example: bump_lib "transformers" "0.4.2.0"
+bump_lib() {
+	local pn=$1 pv=$2
+	local p=${pn}-${pv}
+	local f
+
+	einfo "Bumping ${pn} up to ${pv}"
+
+	for f in ghc.mk GNUmakefile; do
+		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
+	done
+	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
+	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
+}
+
+update_SRC_URI() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		SRC_URI+=" mirror://hackage/package/${pn}/${pn}-${pv}.tar.gz"
+	done
+}
+
+update_SRC_URI
+
+bump_libs() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		bump_lib "${pn}" "${pv}"
+	done
+}
+
+ghc_setup_cflags() {
+	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
+	if ! is_native; then
+		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
+		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
+		einfo "Crosscompiling mode:"
+		einfo "   CHOST:   ${CHOST}"
+		einfo "   CTARGET: ${CTARGET}"
+		einfo "   CFLAGS:  ${CFLAGS}"
+		einfo "   LDFLAGS: ${LDFLAGS}"
+		einfo "   prefix: $(cross)"
+		return
+	fi
+	# We need to be very careful with the CFLAGS we ask ghc to pass through to
+	# gcc. There are plenty of flags which will make gcc produce output that
+	# breaks ghc in various ways. The main ones we want to pass through are
+	# -mcpu / -march flags. These are important for arches like alpha & sparc.
+	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
+	strip-flags
+	strip-unsupported-flags
+
+	# Cmm can't parse line numbers #482086
+	replace-flags -ggdb[3-9] -ggdb2
+
+	GHC_FLAGS=""
+	GHC_PERSISTENT_FLAGS=""
+	for flag in ${CFLAGS}; do
+		case ${flag} in
+
+			# Ignore extra optimisation (ghc passes -O to gcc anyway)
+			# -O2 and above break on too many systems
+			-O*) ;;
+
+			# Arch and ABI flags are what we're really after
+			-m*) append-ghc-cflags compile assemble ${flag};;
+
+			# Sometimes it's handy to see backtrace of RTS
+			# to get an idea what happens there
+			-g*) append-ghc-cflags compile ${flag};;
+
+			# Ignore all other flags, including all -f* flags
+		esac
+	done
+
+	for flag in ${LDFLAGS}; do
+		append-ghc-cflags link ${flag}
+	done
+
+	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
+	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
+	# options to gcc.
+	if is_native; then
+		# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
+		# are not built with fPIC, bug #606666
+		gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
+		tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
+			# gcc-6.3 has support for -no-pie upstream, but spelling differs from
+			# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
+			# hardened users try '-pie' in USE=ghcbootstrap mode.
+			append-ghc-cflags compile link -no-pie
+		fi
+
+		# prevent from failing to build unregisterised ghc:
+		# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+	fi
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+	local from=$1
+	local   to=$2
+	shift 2
+	local file=
+	for file in "$@"
+	do
+		sed -i -e "s|$from|$to|g" \
+			"$file" || die "path relocation failed for '$file'"
+	done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+	local to=$1
+
+	# libdir for prebuilt binary and for current system may mismatch
+	# It does for prefix installation for example: bug #476998
+	local bin_ghc_prefix=${WORKDIR}/usr
+	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+	# backup original script to use it later after relocation
+	local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
+	cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+	if [[ ${bin_libdir} != $(get_libdir) ]]; then
+		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+		# moving the dir itself is not strictly needed
+		# but then USE=binary would result in installing
+		# in '${bin_libdir}'
+		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+			"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+			"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+			"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+			"${WORKDIR}/usr/bin/hsc2hs" \
+			"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+			"$gp_back" \
+			"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
+	fi
+
+	# Relocate from /usr to ${EPREFIX}/usr
+	relocate_path "/usr" "${to}/usr" \
+		"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+		"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+		"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+		"${WORKDIR}/usr/bin/hsc2hs" \
+		"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+		"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
+
+	# this one we will use to regenerate cache
+	# so it should point to current tree location
+	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+	if use prefix; then
+		hprefixify "${bin_libpath}"/${PN}*/settings
+	fi
+
+	# regenerate the binary package cache
+	"$gp_back" recache || die "failed to update cache after relocation"
+	rm "$gp_back"
+}
+
+ghc-check-reqs() {
+	# These are pessimistic values (slightly bigger than worst-case)
+	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
+	# numbers on various arches.
+	CHECKREQS_DISK_BUILD=8G
+	CHECKREQS_DISK_USR=2G
+	# USE=binary roughly takes
+	use binary && CHECKREQS_DISK_BUILD=4G
+
+	"$@"
+}
+
+pkg_pretend() {
+	ghc-check-reqs check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	ghc-check-reqs check-reqs_pkg_setup
+
+	# quiet portage about prebuilt binaries
+	use binary && QA_PREBUILT="*"
+
+	[[ ${MERGE_TYPE} == binary ]] && return
+
+	if use ghcbootstrap; then
+		ewarn "You requested ghc bootstrapping, this is usually only used"
+		ewarn "by Gentoo developers to make binary .tbz2 packages."
+
+		[[ -z $(type -P ghc) ]] && \
+			die "Could not find a ghc to bootstrap with."
+	else
+		if ! yet_binary; then
+			eerror "Please try emerging with USE=ghcbootstrap and report build"
+			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
+			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
+		fi
+	fi
+}
+
+src_unpack() {
+	# Create the ${S} dir if we're using the binary version
+	use binary && mkdir "${S}"
+
+	# the Solaris and Darwin binaries from ghc (maeder) need to be
+	# unpacked separately, so prevent them from being unpacked
+	local ONLYA=${A}
+	case ${CHOST} in
+		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
+	esac
+	unpack ${ONLYA}
+}
+
+src_prepare() {
+	ghc_setup_cflags
+
+	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+		# See bug #313635.
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${WORKDIR}/usr/bin/ghc-${GHC_PV}"
+
+		# allow hardened users use vanilla binary to bootstrap ghc
+		# ghci uses mmap with rwx protection at it implements dynamic
+		# linking on it's own (bug #299709)
+		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/bin/ghc"
+	fi
+
+	if use binary; then
+		if use prefix; then
+			relocate_ghc "${EPREFIX}"
+		fi
+
+		# Move unpacked files to the expected place
+		mv "${WORKDIR}/usr" "${S}"
+		eapply_user
+	else
+		if ! use ghcbootstrap; then
+			case ${CHOST} in
+				*-darwin* | *-solaris*)
+				# UPDATE ME for ghc-7
+				mkdir "${WORKDIR}"/ghc-bin-installer || die
+				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
+				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
+				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
+				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
+				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
+				popd > /dev/null
+
+				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
+				# fix the binaries so they run, on Solaris we need an
+				# LD_LIBRARY_PATH which has our prefix libdirs, on
+				# Darwin we need to replace the frameworks with our libs
+				# from the prefix fix before installation, because some
+				# of the tools are actually used during configure/make
+				if [[ ${CHOST} == *-solaris* ]] ; then
+					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
+				elif [[ ${CHOST} == *-darwin* ]] ; then
+					local readline_framework=GNUreadline.framework/GNUreadline
+					local gmp_framework=/opt/local/lib/libgmp.10.dylib
+					local ncurses_file=/opt/local/lib/libncurses.5.dylib
+					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
+						install_name_tool -change \
+							${readline_framework} \
+							"${EPREFIX}"/lib/libreadline.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${gmp_framework} \
+							"${EPREFIX}"/usr/lib/libgmp.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${ncurses_file} \
+							"${EPREFIX}"/usr/lib/libncurses.dylib \
+							${binary} || die
+					done
+					# we don't do frameworks!
+					sed -i \
+						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
+						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
+						rts/package.conf.in || die
+				fi
+
+				# it is autoconf, but we really don't want to give it too
+				# much arguments, in fact we do the make in-place anyway
+				./configure --prefix="${WORKDIR}"/usr || die
+				make install || die
+				popd > /dev/null
+				;;
+				*)
+				relocate_ghc "${WORKDIR}"
+				;;
+			esac
+		fi
+
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${S}/ghc/ghc.wrapper"
+
+		cd "${S}" # otherwise eapply will break
+
+		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
+		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+
+		# a bunch of crosscompiler patches
+		# needs newer version:
+		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+
+		# mingw32 target
+		pushd "${S}/libraries/Win32"
+			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
+		popd
+
+		bump_libs
+
+		eapply_user
+		# as we have changed the build system
+		eautoreconf
+	fi
+}
+
+src_configure() {
+	if ! use binary; then
+		# initialize build.mk
+		echo '# Gentoo changes' > mk/build.mk
+
+		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
+		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+
+		# We also need to use the GHC_FLAGS flags when building ghc itself
+		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
+		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
+		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
+		# Speed up initial Cabal bootstrap
+		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
+
+		# We can't depend on haddock except when bootstrapping when we
+		# must build docs and include them into the binary .tbz2 package
+		# app-text/dblatex is not in portage, can not build PDF or PS
+		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
+		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
+		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
+
+		# this controls presence on 'xhtml' and 'haddock' in final install
+		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
+
+		# not used outside of ghc's test
+		if [[ -n ${GHC_BUILD_DPH} ]]; then
+				echo "BUILD_DPH = YES" >> mk/build.mk
+			else
+				echo "BUILD_DPH = NO" >> mk/build.mk
+		fi
+
+		# Any non-native build has to skip as it needs
+		# target haddock binary to be runnabine.
+		if ! is_native; then
+			# disable docs generation as it requires running stage2
+			echo "HADDOCK_DOCS=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
+		fi
+
+		if is_crosscompile; then
+			# Install ghc-stage1 crosscompiler instead of
+			# ghc-stage2 cross-built compiler.
+			echo "Stage1Only=YES" >> mk/build.mk
+		fi
+
+		# allows overriding build flavours for libraries:
+		# v   - vanilla (static libs)
+		# p   - profiled
+		# dyn - shared libraries
+		# example: GHC_LIBRARY_WAYS="v dyn"
+		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
+			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
+		fi
+		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
+
+		# Get ghc from the unpacked binary .tbz2
+		# except when bootstrapping we just pick ghc up off the path
+		if ! use ghcbootstrap; then
+			export PATH="${WORKDIR}/usr/bin:${PATH}"
+		fi
+
+		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
+
+		# don't strip anything. Very useful when stage2 SIGSEGVs on you
+		echo "STRIP_CMD = :" >> mk/build.mk
+
+		local econf_args=()
+
+		# GHC embeds toolchain it was built by and uses it later.
+		# Don't allow things like ccache or versioned binary slip.
+		# We use stable thing across gcc upgrades.
+		# User can use EXTRA_ECONF=CC=... to override this default.
+		econf_args+=(
+			AR=${CTARGET}-ar
+			CC=${CTARGET}-gcc
+			# these should be inferred by GHC but ghc defaults
+			# to using bundled tools on windows.
+			Windres=${CTARGET}-windres
+			DllWrap=${CTARGET}-dllwrap
+			# we set the linker explicitly below
+			--disable-ld-override
+		)
+		case ${CTARGET} in
+			arm*)
+				# ld.bfd-2.28 does not work for ghc. Force ld.gold
+				# instead. This should be removed once gentoo gets
+				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
+				econf_args+=(LD=${CTARGET}-ld.gold)
+			;;
+			sparc*)
+				# ld.gold-2.28 does not work for ghc. Force ld.bfd
+				# instead. This should be removed once gentoo gets
+				# a fix for missing --no-relax support bug:
+				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
+				econf_args+=(LD=${CTARGET}-ld.bfd)
+			;;
+			*)
+				econf_args+=(LD=${CTARGET}-ld)
+		esac
+
+		if [[ ${CBUILD} != ${CHOST} ]]; then
+			# GHC bug: ghc claims not to support cross-building.
+			# It does, but does not distinct --host= value
+			# for stage1 and stage2 compiler.
+			econf_args+=(--host=${CBUILD})
+		fi
+
+		if use ghcmakebinary; then
+			# When building booting libary we are trying to
+			# bundle or restrict most of external depends
+			# with unstable ABI:
+			#  - embed libffi (default GHC behaviour)
+			#  - disable ncurses support for ghci (via haskeline)
+			#    https://bugs.gentoo.org/557478
+			#  - disable ncurses support for ghc-pkg
+			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
+			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
+		elif is_native; then
+			# using ${GTARGET}'s libffi is not supported yet:
+			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
+			econf_args+=(--with-system-libffi)
+			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+		fi
+
+		einfo "Final mk/build.mk:"
+		cat mk/build.mk || die
+
+		econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
+
+		if [[ ${PV} == *9999* ]]; then
+			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+			GHC_P=${PN}-${GHC_PV}
+		fi
+	fi # ! use binary
+}
+
+src_compile() {
+	if ! use binary; then
+		# Stage1Only crosscompiler does not build stage2
+		if ! is_crosscompile; then
+			# 1. build/pax-mark compiler binary first
+			emake ghc/stage2/build/tmp/ghc-stage2
+			# 2. pax-mark (bug #516430)
+			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
+			# 2. build/pax-mark haddock using ghc-stage2
+			if is_native; then
+				# non-native build does not build haddock
+				# due to HADDOCK_DOCS=NO, but it could.
+				emake utils/haddock/dist/build/tmp/haddock
+				pax-mark -m utils/haddock/dist/build/tmp/haddock
+			fi
+		fi
+		# 3. and then all the rest
+		emake all
+	fi # ! use binary
+}
+
+src_install() {
+	if use binary; then
+		use prefix && mkdir -p "${ED}"
+		mv "${S}/usr" "${ED}"
+	else
+		[[ -f VERSION ]] || emake VERSION
+
+		# -j1 due to a rare race in install script:
+		#    make --no-print-directory -f ghc.mk phase=final install
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
+		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
+		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
+		#    /usr/bin/install: cannot create regular file \
+		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
+		emake -j1 install DESTDIR="${D}"
+
+		# Skip for cross-targets as they all share target location:
+		# /usr/share/doc/ghc-9999/
+		if ! is_crosscompile; then
+			dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
+		fi
+
+		# rename ghc-shipped files to avoid collision
+		# of external packages. Motivating example:
+		#  user had installed:
+		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
+		#      dev-haskell/transformers-0.4.2.0
+		#  then user tried to update to
+		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
+		#  this will lead to single .conf file collision.
+		local shipped_conf renamed_conf
+		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+		for shipped_conf in "${package_confdir}"/*.conf; do
+			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
+			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
+			mv "${shipped_conf}" "${renamed_conf}" || die
+		done
+
+		# remove link, but leave 'haddock-${GHC_P}'
+		rm -f "${ED}"/usr/bin/$(cross)haddock
+
+		if ! is_crosscompile; then
+			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
+			newbashcomp utils/completion/ghc.bash         ghc
+		fi
+	fi
+
+	# path to the package.cache
+	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+	PKGCACHE="${package_confdir}"/package.cache
+	# copy the package.conf.d, including timestamp, save it so we can help
+	# users that have a broken package.conf.d
+	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
+
+	# copy the package.conf, including timestamp, save it so we later can put it
+	# back before uninstalling, or when upgrading.
+	cp -p "${PKGCACHE}"{,.shipped} \
+		|| die "failed to copy package.conf.d/package.cache"
+}
+
+pkg_preinst() {
+	# have we got an earlier version of ghc installed?
+	if has_version "<${CATEGORY}/${PF}"; then
+		haskell_updater_warn="1"
+	fi
+}
+
+pkg_postinst() {
+	ghc-reregister
+
+	# path to the package.cache
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+
+	# give the cache a new timestamp, it must be as recent as
+	# the package.conf.d directory.
+	touch "${PKGCACHE}"
+
+	if [[ "${haskell_updater_warn}" == "1" ]]; then
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+		ewarn "You have just upgraded from an older version of GHC."
+		ewarn "You may have to run"
+		ewarn "      'haskell-updater'"
+		ewarn "to rebuild all ghc-based Haskell libraries."
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+	fi
+}
+
+pkg_prerm() {
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+	rm -rf "${PKGCACHE}"
+
+	cp -p "${PKGCACHE}"{.shipped,}
+}
+
+pkg_postrm() {
+	ghc-package_pkg_postrm
+}


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2018-06-09 19:09 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2018-06-09 19:09 UTC (permalink / raw
  To: gentoo-commits

commit:     55e2390cae9029846c6a69d852cf03058b6c4aae
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  9 19:09:03 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Jun  9 19:09:17 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55e2390c

dev-lang/ghc: backport binutils fixes

A few changes:
- move off from code.haskell.org to /slyfox.uni.cx for binaries
- enable --relax on all arches, not just sparc
- fix dwarf generation (-g) on binutils-2.30
- allow >=haskell-updater-1.3
- fix relocation for haddoc, hp2ps, hpc

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-lang/ghc/ghc-7.10.3.ebuild | 20 ++++++++++----------
 dev-lang/ghc/ghc-7.8.4.ebuild  | 20 ++++++++++----------
 dev-lang/ghc/ghc-8.0.2.ebuild  | 20 +++++++++++---------
 dev-lang/ghc/ghc-8.2.1.ebuild  | 23 ++++++++++++-----------
 dev-lang/ghc/ghc-8.2.2.ebuild  | 22 ++++++++++++----------
 dev-lang/ghc/ghc-8.4.1.ebuild  | 17 +++++++++--------
 dev-lang/ghc/ghc-8.4.2.ebuild  |  6 ++++++
 7 files changed, 70 insertions(+), 58 deletions(-)

diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
index 9ec9caec506..43a286feca8 100644
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -24,17 +24,17 @@ HOMEPAGE="http://www.haskell.org/ghc/"
 arch_binaries=""
 
 # sorted!
-arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PVR}-amd64.tbz2 )"
-arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64.tbz2 )"
-arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
-arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
-arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PVR}-x86.tbz2 )"
+arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-arm.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PVR}-amd64.tbz2 )"
+arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64.tbz2 )"
+arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PVR}-x86.tbz2 )"
 
 # various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
 
 # 0 - yet
 yet_binary() {

diff --git a/dev-lang/ghc/ghc-7.8.4.ebuild b/dev-lang/ghc/ghc-7.8.4.ebuild
index 96a398263f2..49995a58d35 100644
--- a/dev-lang/ghc/ghc-7.8.4.ebuild
+++ b/dev-lang/ghc/ghc-7.8.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -24,17 +24,17 @@ HOMEPAGE="http://www.haskell.org/ghc/"
 arch_binaries=""
 
 # sorted!
-arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
-arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64.tbz2 )"
-arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
-arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
-arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86.tbz2 )"
+arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-arm.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-amd64.tbz2 )"
+arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64.tbz2 )"
+arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86.tbz2 )"
 
 # various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
 
 # 0 - yet
 yet_binary() {

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index b95016abd95..d8e84e58f1d 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -24,18 +24,18 @@ HOMEPAGE="http://www.haskell.org/ghc/"
 arch_binaries=""
 
 # sorted!
-arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
-arch_binaries="$arch_binaries arm64? ( http://code.haskell.org/~slyfox/ghc-arm64/ghc-bin-${PV}-arm64.tbz2 )"
+arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-arm.tbz2 )"
+arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-arm64.tbz2 )"
 arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64.tbz2 )"
-arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
-arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64.tbz2 )"
+arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
 arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
 # various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
 
 # 0 - yet
 yet_binary() {
@@ -106,7 +106,7 @@ DEPEND="${RDEPEND}
 		>=dev-libs/libxslt-1.1.2 )
 	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
 
-PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
+PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
 
 REQUIRED_USE="?? ( ghcbootstrap binary )"
 
@@ -467,6 +467,7 @@ src_prepare() {
 
 		epatch "${FILESDIR}"/${PN}-8.0.1_rc1-cgen-constify.patch
 		epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+		epatch "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
 
 		epatch "${FILESDIR}"/${PN}-8.0.1-limit-jN.patch
 		epatch "${FILESDIR}"/${PN}-8.0.1-ww-args-limit.patch
@@ -474,6 +475,7 @@ src_prepare() {
 		epatch "${FILESDIR}"/${PN}-8.0.2_rc2-old-sphinx.patch
 		epatch "${FILESDIR}"/${PN}-8.0.2-libffi-alpha.patch
 		epatch "${FILESDIR}"/${PN}-8.0.2-O2-unreg.patch
+		epatch "${FILESDIR}"/${PN}-8.0.2-binutils-2.30.patch
 
 		bump_libs
 

diff --git a/dev-lang/ghc/ghc-8.2.1.ebuild b/dev-lang/ghc/ghc-8.2.1.ebuild
index 1b95d8e8ae0..61e2fdf5dd9 100644
--- a/dev-lang/ghc/ghc-8.2.1.ebuild
+++ b/dev-lang/ghc/ghc-8.2.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -23,18 +23,18 @@ HOMEPAGE="http://www.haskell.org/ghc/"
 arch_binaries=""
 
 # sorted!
-#arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( http://code.haskell.org/~slyfox/ghc-arm64/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
 # various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
 
 # 0 - yet
 yet_binary() {
@@ -474,6 +474,7 @@ src_prepare() {
 
 		epatch "${FILESDIR}"/${PN}-8.2.1_rc1-cgen-constify.patch
 		epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+		epatch "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
 
 		epatch "${FILESDIR}"/${PN}-8.2.1_rc2-O2-unreg.patch
 

diff --git a/dev-lang/ghc/ghc-8.2.2.ebuild b/dev-lang/ghc/ghc-8.2.2.ebuild
index 5d07ec19494..6e41de8bde9 100644
--- a/dev-lang/ghc/ghc-8.2.2.ebuild
+++ b/dev-lang/ghc/ghc-8.2.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -23,18 +23,18 @@ HOMEPAGE="http://www.haskell.org/ghc/"
 arch_binaries=""
 
 # sorted!
-#arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( http://code.haskell.org/~slyfox/ghc-arm64/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
 arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
+#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
 arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
 # various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
 
 # 0 - yet
 yet_binary() {
@@ -102,7 +102,7 @@ DEPEND="${RDEPEND}
 		>=dev-libs/libxslt-1.1.2 )
 	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
 
-PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
+PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
 
 REQUIRED_USE="?? ( ghcbootstrap binary )"
 
@@ -475,8 +475,10 @@ src_prepare() {
 
 		eapply "${FILESDIR}"/${PN}-8.2.1_rc1-cgen-constify.patch
 		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+		eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
 
 		eapply "${FILESDIR}"/${PN}-8.2.1_rc2-O2-unreg.patch
+		eapply "${FILESDIR}"/${PN}-8.0.2-binutils-2.30.patch
 
 		# a bunch of crosscompiler patches
 		eapply "${FILESDIR}"/${PN}-8.2.1_rc1-unphased-cross.patch

diff --git a/dev-lang/ghc/ghc-8.4.1.ebuild b/dev-lang/ghc/ghc-8.4.1.ebuild
index 0e4762bb07d..e23cc25aadd 100644
--- a/dev-lang/ghc/ghc-8.4.1.ebuild
+++ b/dev-lang/ghc/ghc-8.4.1.ebuild
@@ -23,18 +23,18 @@ HOMEPAGE="http://www.haskell.org/ghc/"
 arch_binaries=""
 
 # sorted!
-#arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( http://code.haskell.org/~slyfox/ghc-arm64/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
 arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
+#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
 arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
 # various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
 
 # 0 - yet
 yet_binary() {
@@ -473,6 +473,7 @@ src_prepare() {
 		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
 		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
 		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+		eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
 
 		# a bunch of crosscompiler patches
 		# needs newer version:

diff --git a/dev-lang/ghc/ghc-8.4.2.ebuild b/dev-lang/ghc/ghc-8.4.2.ebuild
index 4fe09376cf4..2b6dbd92fe9 100644
--- a/dev-lang/ghc/ghc-8.4.2.ebuild
+++ b/dev-lang/ghc/ghc-8.4.2.ebuild
@@ -315,6 +315,9 @@ relocate_ghc() {
 		"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
 		"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
 		"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+		"${WORKDIR}/usr/bin/haddock-ghc-${GHC_PV}" \
+		"${WORKDIR}/usr/bin/hp2ps" \
+		"${WORKDIR}/usr/bin/hpc" \
 		"${WORKDIR}/usr/bin/hsc2hs" \
 		"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
 		"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
@@ -473,6 +476,9 @@ src_prepare() {
 		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
 		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
 		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+		eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
+		eapply "${FILESDIR}"/${PN}-8.0.2-binutils-2.30.patch
+		eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
 
 		# a bunch of crosscompiler patches
 		# needs newer version:


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2018-06-10 11:22 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2018-06-10 11:22 UTC (permalink / raw
  To: gentoo-commits

commit:     3d48e4a27481a8d6213fe4f356a9ccfe66b799f8
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 10 11:22:37 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Jun 10 11:22:45 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d48e4a2

dev-lang/ghc: buld amd64 and x86 binaries for 8.4.3

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-lang/ghc/Manifest         | 4 +++-
 dev-lang/ghc/ghc-8.0.2.ebuild | 2 +-
 dev-lang/ghc/ghc-8.4.3.ebuild | 8 ++++----
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 54d2adc8a19..d3d13ededde 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -25,7 +25,7 @@ DIST ghc-bin-7.8.4-x86.tbz2 102312459 BLAKE2B 256cca9b2353af30dd7c239db0e21781d9
 DIST ghc-bin-8.0.2-alpha.tbz2 234361847 BLAKE2B 8e3439f3bbae1d3f6ab71f69669ea065f5f36c9cb4b334f06161cc1b9507aae56297d5eeb8a9cf72916aa012fab0b444a179a0336f00d5f17a8d402d5807c6f8 SHA512 c8b588feeab85f7b8fd60e2e8bf755d46790d4882d2ecf6b2c8b8e02c62a11b7e6453bf0cfbc646bfbf24310fdc775337f3957ba5783675a271b68f0af2e9070
 DIST ghc-bin-8.0.2-arm64.tbz2 191332951 BLAKE2B 305c4d618a6221e1322a5665544883624de4646e0186c6eab56d0b32877645f0b2bad8381848914751fbd2e11598727c46ab136de74c57207b75ecc6cce9572a SHA512 b9cabfda8fc6e851ba99f53274c1a63c5a6a365311a9203f1247ecf90ab843dd94960ad44c4e67032f4690f07d67bfd8bdfbe59f857d6c63344430539e2082fc
 DIST ghc-bin-8.0.2-i686-pc-linux-gnu.tbz2 133679542 BLAKE2B c50597857b53a2bf9d8047c048f86aa1782f74d5d9816d44b7bad7302181b407257ad0b52a03b4ad4936de3a15010b0ff5ca877b9578af6d3e7684dda2284718 SHA512 7f33e0b20a21fe076db142a58a81f68ab8f230ac9ce0167aba31aa0843bce20a9cf4065acc1c0ee2aaa01ea2ad4a8234388b0cf3ef886dccf25d7072602b430b
-DIST ghc-bin-8.0.2-ia64.tbz2 250237654 BLAKE2B e76987717399f4be0a3f99e9976f29416c768a61280bc5a05ca8759d5fbc6273e28d54fac102a5f69b65c7fb50acfd1a3c7505f697f0900cc3f619ffacf9e1bb SHA512 e8cb381de12ccc0a7b513683deb5de555fecea22a735d09b073b0199ab4124305bbd8a093b4710b827513d33fd4224007e7bd210b146508eb183be7dfd283a26
+DIST ghc-bin-8.0.2-ia64-unknown-linux-gnu.tbz2 256581880 BLAKE2B 7a9b41fccf3a097a19e169dcd8f553d38ffb96ebce3a3f0df15af79de77f6e33835a955fb7cc2c373f7bb6bfd3508a45ecf19f8b3e74bb058d2d6cdb6576bc6b SHA512 5d14521cc4f2a8fae1e5f43fce70cb976e4412df468c3bc611c99f57806816c349f4186c8a064c579858a82cc070e5942dd7b0c2d57b88d507215acddcbfcfc1
 DIST ghc-bin-8.0.2-ppc.tbz2 144760090 BLAKE2B 32410f3563f7f2555350806db460d2083c7248c57223c9c681d0b4913df942f023c7c1f5fda145179a524ee7ef105a9b8309ba87c20dc393a9f49151579b6767 SHA512 bc6bf8998064ffc1692c3bb83c44d1787760a3f4a1e6b79dedaefda5fe32b9052049a60f0ddd3c0b0bd24a722fb35e310e0189b3511721ff89d4d02b3d7c14bb
 DIST ghc-bin-8.0.2-ppc64.tbz2 117432068 BLAKE2B cae202f0d6e825127d543996b2fe7ae02578c47325674cbf22fddc53b1c4c9413f45c60d76ec3d07860cb8d0aae1ec792e4141822cc5c08ef9013308c5d29bf5 SHA512 0eaff0557b68649a15bbeb2019f46fa9e9e7b8a916aa210ab56888090a5b887d20d818e7987177bc6a8e7fde503de560026e6bb55fe39679b8b1ee13c6b7c4f9
 DIST ghc-bin-8.0.2-x86_64-pc-linux-gnu.tbz2 130852973 BLAKE2B 24d2032bbfc664d924800c1a317334e2342c8ec1e529178f9d1bb99bb4772a9cc100603bf70111b8cfafa715c1cccc643f115c77cf6adcdfb17d1f1735ee6682 SHA512 c36e0e2600fc7c284562a323d396a03062cb6e8fa63c353e672be61e76d2ec5c7698485e3a370a57cf512db9e5ba6a68338fff2ab404d9fe67b1a468ed72638f
@@ -37,5 +37,7 @@ DIST ghc-bin-8.4.1-i686-pc-linux-gnu.tbz2 116995839 BLAKE2B f94f2206d603d57f7fa6
 DIST ghc-bin-8.4.1-x86_64-pc-linux-gnu.tbz2 117369638 BLAKE2B 583db924a50a3d7d261d2f392a74e0ff487ee662af055ac292ff1943534fb305d6c9f6f0045ba4bdd5afa268d75beb50f64b4760e49cddabe1f56776a5f4769f SHA512 801f4ecd538c7a035a0f573f301769984814fa3ce4cf5b09a914ba012bebe0583b6695a6a93f92c7e6e2b7d58caf812a1214b5b778d7b7835d7eab988ad69ba0
 DIST ghc-bin-8.4.2-i686-pc-linux-gnu.tbz2 117083472 BLAKE2B 7dac18523ed693efb0ec42b31bf7b910e6bb8289cdc13eb309bdb30230fc87fbb060baf41eb4f18af2bb265b42e6aca535ceb70cf0fe09046b0e4650f11bb37c SHA512 f9799bdf7a2a66d1db34b828860203872d7398bab2d667e8982c9ee89301654c3f7f54705b639df2d7adebcfb7a05e071b83d994f5e52a72f604b62098be51cd
 DIST ghc-bin-8.4.2-x86_64-pc-linux-gnu.tbz2 117604406 BLAKE2B 644ef535497eb73a2d1ceaab7ff96228e8d4021c09bc061a3f397dc27b3b86bd6d5300736e478671cee0a160bfaa5aa4611f06012285079b40973f468b59664a SHA512 7bf4bcdce954319422b8b8f09e56294012fac145662ba3de1c7765ed86ae9f8b61dcf6dd8febcf85d60db8d1a26edcaf4e89c3644ffa24c7b5b5c41a14105936
+DIST ghc-bin-8.4.3-i686-pc-linux-gnu.tbz2 117028296 BLAKE2B 0c99a2f6fe4af4a1342d948cbda53b178fe9709673e0d09bc3b6a4e0f3ec4e4b8f77830829f149993f51e490692de39024900fb188116816e41441153eac3622 SHA512 13147ae0d6b941b3bc2f0239071a2f6f854a39cb6a381f0e2fda7069ac29bb2c64fb3ccc6191e7527b5f27fe616bd62f2e487b5d50679789927b401f02c62ad7
+DIST ghc-bin-8.4.3-x86_64-pc-linux-gnu.tbz2 117537996 BLAKE2B 2be0102fcc0f1fef5aae194620a43c1c90538215d4eec2550419634ed9c5bbfb17391d57519c20ab53987a36b42488ac43ff968690a4f65b96c52c3485589d10 SHA512 5f26810ec1f0a483f03ef01f56130eba0287b49b912efba03158336ce521000b611192cf021b72c1a0d902532cc4c9470ca1b3233ccba7c7e7c2ac490c6099fa
 DIST hoopl-3.10.2.0.tar.gz 241940 BLAKE2B 0ed7bf80486767c81415f99da8780a525401c388dea0b3f380bbecceae9cc7f66d8b5d0d7b31f8cb41796309b7a93adb113485efd14882f8af321989ce900a9b SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a
 DIST transformers-0.4.3.0.tar.gz 28632 BLAKE2B 92cabcb654bb11854a3bffbb1262f5cd62eda1aff447157086a61ebc451ebf2fddec53b6a2cc058174f24f0f0e32df671d3717e30a542c8dc90cb87e327d990c SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index d8e84e58f1d..79fad934c2f 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -28,7 +28,7 @@ arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/g
 #arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-arm.tbz2 )"
 arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-arm64.tbz2 )"
 arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64.tbz2 )"
+arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-unknown-linux-gnu.tbz2 )"
 arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
 arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
 #arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"

diff --git a/dev-lang/ghc/ghc-8.4.3.ebuild b/dev-lang/ghc/ghc-8.4.3.ebuild
index 59e9e523932..f7908959c94 100644
--- a/dev-lang/ghc/ghc-8.4.3.ebuild
+++ b/dev-lang/ghc/ghc-8.4.3.ebuild
@@ -26,12 +26,12 @@ arch_binaries=""
 #arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
 #arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
 #arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
 #arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
 #arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
 #arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-#arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
 # various ports:
 #arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
@@ -42,12 +42,12 @@ yet_binary() {
 		#alpha) return 0 ;;
 		#arm64) return 0 ;;
 		#arm) return 0 ;;
-		#amd64) return 0 ;;
+		amd64) return 0 ;;
 		#ia64) return 0 ;;
 		#ppc) return 0 ;;
 		#ppc64) return 0 ;;
 		#sparc) return 0 ;;
-		#x86) return 0 ;;
+		x86) return 0 ;;
 		*) return 1 ;;
 	esac
 }


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2018-06-12  7:52 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2018-06-12  7:52 UTC (permalink / raw
  To: gentoo-commits

commit:     7b5ddf4deb555bf71f082375727496c95a0c03c2
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 12 07:52:16 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Jun 12 07:52:22 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b5ddf4d

dev-lang/ghc: stable 8.0.2 for ia64, bug #631138

Bug: https://bugs.gentoo.org/631138
Package-Manager: Portage-2.3.40, Repoman-2.3.9
RepoMan-Options: --include-arches="ia64"

 dev-lang/ghc/ghc-8.0.2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index 79fad934c2f..b3b16202e37 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -71,7 +71,7 @@ BUMP_LIBRARIES=(
 
 LICENSE="BSD"
 SLOT="0/${PV}"
-KEYWORDS="~alpha amd64 x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~alpha amd64 ia64 x86 ~amd64-linux ~x86-linux"
 IUSE="doc ghcbootstrap ghcmakebinary +gmp +profile"
 IUSE+=" binary"
 


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2018-06-18 18:07 Tobias Klausmann
  0 siblings, 0 replies; 92+ messages in thread
From: Tobias Klausmann @ 2018-06-18 18:07 UTC (permalink / raw
  To: gentoo-commits

commit:     c6d0c94b240449263d3f6052de24df4b2fbf0d71
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 18 11:03:23 2018 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Mon Jun 18 18:07:25 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6d0c94b

dev-lang/ghc-8.0.2-r0: alpha stable

Gentoo-Bug: http://bugs.gentoo.org/631138

 dev-lang/ghc/ghc-8.0.2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index b3b16202e37..6e573c0fff3 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -71,7 +71,7 @@ BUMP_LIBRARIES=(
 
 LICENSE="BSD"
 SLOT="0/${PV}"
-KEYWORDS="~alpha amd64 ia64 x86 ~amd64-linux ~x86-linux"
+KEYWORDS="alpha amd64 ia64 x86 ~amd64-linux ~x86-linux"
 IUSE="doc ghcbootstrap ghcmakebinary +gmp +profile"
 IUSE+=" binary"
 


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2019-03-09 13:16 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2019-03-09 13:16 UTC (permalink / raw
  To: gentoo-commits

commit:     2ede7e10cda8b5c79115462800a9fce69a388f07
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  9 13:16:01 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Mar  9 13:16:25 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ede7e10

dev-lang/ghc: bump up to 8.6.4

Available binaries for amd64 and x86. No keywords yet
as many revdeps will need to be updated.

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/Manifest         |   4 +
 dev-lang/ghc/ghc-8.6.4.ebuild | 775 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 779 insertions(+)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index d3d13ededde..6aafa3726a3 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -8,6 +8,8 @@ DIST ghc-8.2.2-src.tar.xz 10753272 BLAKE2B 6fd792390d3df20f84836466705c3f3c931ba
 DIST ghc-8.4.1-src.tar.xz 11301528 BLAKE2B 6dcf467d04cace856b68315c85b80f19b517dcbc8ae6e2a08c60afa141c9e0261e012738452c9ca208f9fc40c48bd1a0817e5e0fe9f4737383cd7b44ca65c8d9 SHA512 f8ae11f498bf2911fb92635534c6906c96f1fbe5072c7b7447bd3f69e408026b674564515af02a8aaddc57ee6905ce78d10005b12478a39c220580aaec13a9f7
 DIST ghc-8.4.2-src.tar.xz 11313140 BLAKE2B d6fe90f3c68b137c6029bf08918a51ff43c210ba0485aca8d77541cd455f6f9c94287cd011ecd710a8e5a14a27e8a27c04c517417c5748966afd63a5ba6ed19e SHA512 aeb17c986c597762381d9887679eb0eec194c2938a92b5a33e66b4c80002ead02d672b4aa968e1061ab5652b74e46a3c9f9e3d58d5be4a0ae47aa8aed288cf1f
 DIST ghc-8.4.3-src.tar.xz 11315068 BLAKE2B cfb858051aff0c4fb3cdbbe96627cacc82665a6bfc4f863b0353eb3d93d358f7ed4efd7b131280763786f397aabc5c4825f60c3890649303fc97187f2b996d21 SHA512 c6cea84264f32ae888f9931f834a1d721889242f656d14262e787ec54a1793d1862ce76daacaf1006c12b8af12919501afce1dc02571373e24830e4d51803414
+DIST ghc-8.6.4-src.tar.xz 19029904 BLAKE2B 80676923866417cbf674c3cfadc2ecf9a673e9dcefb4561be7125c83edad38990ea9427c302aeeb9ef04b2c3eeea4fa9fabc72d89c742c6714163ea280802122 SHA512 9237e45b26852cc8a6d64c80da2b28c910349bbbed60f6575035f39bcb064a5ce80ec73cd85e2298e4abefead378e19b7d7ec3ffeea09e362f20eb0b09b36798
+DIST ghc-8.6.4-testsuite.tar.xz 1906656 BLAKE2B b0e55b415c885479c3573fe86436338971e685edc95e106043f36e92e1ee6a7e86add9e86a35c8bd685916f18a7bcf08d4a7b845da41dd855132b131ccbc4a37 SHA512 b1bbe1759ec528914cbfa6b3789c596e46b6266568972b9f5d1cf13e31b7206400b65536e7acea698161e46b8ca11285b3282ebd9336d23b68d34feb4f0bf314
 DIST ghc-bin-7.10.3-alpha.tbz2 183558856 BLAKE2B 2bb02aafa49c6a91bec016e8bec2d07257d602e53c9df55792ec6fbbf8e2e46de1d5f3f72c0ccf74d6bd7f7987f53412063ccb02ae85455fce11fa928cbf5291 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230
 DIST ghc-bin-7.10.3-amd64.tbz2 112040431 BLAKE2B 3e59b70ca309a1cd704266c54a7983f9a58362bf700ced89c5649c780c664c650ec091e14026a7b84e339d2ebff39eba1772eebcd9fb4b99b9c99d179453d5cc SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558
 DIST ghc-bin-7.10.3-ia64.tbz2 238680956 BLAKE2B 08593718d376051edfb0c86131e54dafc5c15056757fbeef90c653a7d217e49ff34ffaf7cd4083144c9277e73a290b822a0f889aaf806341375708e4b92654b2 SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5
@@ -39,5 +41,7 @@ DIST ghc-bin-8.4.2-i686-pc-linux-gnu.tbz2 117083472 BLAKE2B 7dac18523ed693efb0ec
 DIST ghc-bin-8.4.2-x86_64-pc-linux-gnu.tbz2 117604406 BLAKE2B 644ef535497eb73a2d1ceaab7ff96228e8d4021c09bc061a3f397dc27b3b86bd6d5300736e478671cee0a160bfaa5aa4611f06012285079b40973f468b59664a SHA512 7bf4bcdce954319422b8b8f09e56294012fac145662ba3de1c7765ed86ae9f8b61dcf6dd8febcf85d60db8d1a26edcaf4e89c3644ffa24c7b5b5c41a14105936
 DIST ghc-bin-8.4.3-i686-pc-linux-gnu.tbz2 117028296 BLAKE2B 0c99a2f6fe4af4a1342d948cbda53b178fe9709673e0d09bc3b6a4e0f3ec4e4b8f77830829f149993f51e490692de39024900fb188116816e41441153eac3622 SHA512 13147ae0d6b941b3bc2f0239071a2f6f854a39cb6a381f0e2fda7069ac29bb2c64fb3ccc6191e7527b5f27fe616bd62f2e487b5d50679789927b401f02c62ad7
 DIST ghc-bin-8.4.3-x86_64-pc-linux-gnu.tbz2 117537996 BLAKE2B 2be0102fcc0f1fef5aae194620a43c1c90538215d4eec2550419634ed9c5bbfb17391d57519c20ab53987a36b42488ac43ff968690a4f65b96c52c3485589d10 SHA512 5f26810ec1f0a483f03ef01f56130eba0287b49b912efba03158336ce521000b611192cf021b72c1a0d902532cc4c9470ca1b3233ccba7c7e7c2ac490c6099fa
+DIST ghc-bin-8.6.4-i686-pc-linux-gnu.tbz2 121639881 BLAKE2B 51d223b654ff23bbdd594801f4ec92b016a58b952ba98007abb56c1c4b184a672e51eb9847b42160febcc4ada0f28f18325cc27f8a025dd9fcf656e3bab73918 SHA512 6b58b080c5fb18ea7b76632b4b48726af61b52d8829f57a2ddd55e6bc109c1fe1a133d2a0ca974a168ffee0013a6dfdc4922577bad01c50a42dad8b9db70e061
+DIST ghc-bin-8.6.4-x86_64-pc-linux-gnu.tbz2 121695747 BLAKE2B 39c745f5f9946bbae622e09bbdabdde4d62eec472fe14e693f37cba6b93ff66e4e56f66df8f0f073686339d252dce71f79f4c2aaef620c3dffbc26a67b1119c3 SHA512 c60bac50e7879bda1d6dcc7c1f12fdac915b18c3ebbfcfad575b2b01fcb57a487496ce7935f7ee4ae934162209ab66370fbcc8a4f021628e5f9a2aa7ef95e119
 DIST hoopl-3.10.2.0.tar.gz 241940 BLAKE2B 0ed7bf80486767c81415f99da8780a525401c388dea0b3f380bbecceae9cc7f66d8b5d0d7b31f8cb41796309b7a93adb113485efd14882f8af321989ce900a9b SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a
 DIST transformers-0.4.3.0.tar.gz 28632 BLAKE2B 92cabcb654bb11854a3bffbb1262f5cd62eda1aff447157086a61ebc451ebf2fddec53b6a2cc058174f24f0f0e32df671d3717e30a542c8dc90cb87e327d990c SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780

diff --git a/dev-lang/ghc/ghc-8.6.4.ebuild b/dev-lang/ghc/ghc-8.6.4.ebuild
new file mode 100644
index 00000000000..e2425f54b11
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.6.4.ebuild
@@ -0,0 +1,775 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+		export CTARGET=${CATEGORY/cross-}
+	fi
+fi
+
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib multiprocessing pax-utils toolchain-funcs versionator prefix
+inherit check-reqs
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="http://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+BIN_PV=${PV}
+# sorted!
+#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+	case "${ARCH}" in
+		#alpha) return 0 ;;
+		#arm64) return 0 ;;
+		#arm) return 0 ;;
+		amd64) return 0 ;;
+		#ia64) return 0 ;;
+		#ppc) return 0 ;;
+		#ppc64) return 0 ;;
+		#sparc) return 0 ;;
+		x86) return 0 ;;
+		*) return 1 ;;
+	esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=8.6.0.20180810 # uncomment only for -alpha, -beta, -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? (
+	http://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
+	test? ( http://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
+)"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+
+BUMP_LIBRARIES=(
+	# "hackage-name          hackage-version"
+)
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+#will need big tree sync
+#KEYWORDS="~amd64 ~x86"
+IUSE="doc ghcbootstrap ghcmakebinary +gmp profile test"
+IUSE+=" binary"
+
+RDEPEND="
+	>=dev-lang/perl-5.6.1
+	dev-libs/gmp:0=
+	sys-libs/ncurses:0=[unicode]
+	!ghcmakebinary? ( virtual/libffi:= )
+"
+
+# This set of dependencies is needed to run
+# prebuilt ghc. We specifically avoid ncurses
+# dependency with:
+#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
+PREBUILT_BINARY_DEPENDS="
+	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+"
+# This set of dependencies is needed to install
+# ghc[binary] in system. terminfo package is linked
+# against ncurses.
+PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
+	sys-libs/ncurses:0/6
+"
+
+RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
+
+DEPEND="${RDEPEND}
+	doc? ( app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5
+		app-text/docbook-xsl-stylesheets
+		dev-python/sphinx
+		>=dev-libs/libxslt-1.1.2 )
+	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
+
+PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
+
+REQUIRED_USE="?? ( ghcbootstrap binary )"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+	[[ ${CHOST} != ${CTARGET} ]]
+}
+
+is_native() {
+	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
+}
+
+# returns tool prefix for crosscompiler.
+# Example:
+#  CTARGET=armv7a-unknown-linux-gnueabi
+#  CHOST=x86_64-pc-linux-gnu
+#    "armv7a-unknown-linux-gnueabi-"
+#  CTARGET=${CHOST}
+#    ""
+# Used in tools and library prefix:
+#    "${ED}"/usr/bin/$(cross)haddock
+#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+
+cross() {
+	if is_crosscompile; then
+		echo "${CTARGET}-"
+	else
+		echo ""
+	fi
+}
+
+append-ghc-cflags() {
+	local persistent compile assemble link
+	local flag ghcflag
+
+	for flag in $*; do
+		case ${flag} in
+			persistent)	persistent="yes";;
+			compile)	compile="yes";;
+			assemble)	assemble="yes";;
+			link)		link="yes";;
+			*)
+				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				;;
+		esac
+	done
+}
+
+# $1 - lib name (under libraries/)
+# $2 - lib version
+# example: bump_lib "transformers" "0.4.2.0"
+bump_lib() {
+	local pn=$1 pv=$2
+	local p=${pn}-${pv}
+	local f
+
+	einfo "Bumping ${pn} up to ${pv}"
+
+	for f in ghc.mk GNUmakefile; do
+		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
+	done
+	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
+	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
+}
+
+update_SRC_URI() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		SRC_URI+=" mirror://hackage/package/${pn}/${pn}-${pv}.tar.gz"
+	done
+}
+
+update_SRC_URI
+
+bump_libs() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		bump_lib "${pn}" "${pv}"
+	done
+}
+
+ghc_setup_cflags() {
+	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
+	if ! is_native; then
+		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
+		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
+		einfo "Crosscompiling mode:"
+		einfo "   CHOST:   ${CHOST}"
+		einfo "   CTARGET: ${CTARGET}"
+		einfo "   CFLAGS:  ${CFLAGS}"
+		einfo "   LDFLAGS: ${LDFLAGS}"
+		einfo "   prefix: $(cross)"
+		return
+	fi
+	# We need to be very careful with the CFLAGS we ask ghc to pass through to
+	# gcc. There are plenty of flags which will make gcc produce output that
+	# breaks ghc in various ways. The main ones we want to pass through are
+	# -mcpu / -march flags. These are important for arches like alpha & sparc.
+	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
+	strip-flags
+	strip-unsupported-flags
+
+	# Cmm can't parse line numbers #482086
+	replace-flags -ggdb[3-9] -ggdb2
+
+	GHC_FLAGS=""
+	GHC_PERSISTENT_FLAGS=""
+	for flag in ${CFLAGS}; do
+		case ${flag} in
+
+			# Ignore extra optimisation (ghc passes -O to gcc anyway)
+			# -O2 and above break on too many systems
+			-O*) ;;
+
+			# Arch and ABI flags are what we're really after
+			-m*) append-ghc-cflags compile assemble ${flag};;
+
+			# Sometimes it's handy to see backtrace of RTS
+			# to get an idea what happens there
+			-g*) append-ghc-cflags compile ${flag};;
+
+			# Ignore all other flags, including all -f* flags
+		esac
+	done
+
+	for flag in ${LDFLAGS}; do
+		append-ghc-cflags link ${flag}
+	done
+
+	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
+	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
+	# options to gcc.
+	if is_native; then
+		# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
+		# are not built with fPIC, bug #606666
+		gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
+		tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
+			# gcc-6.3 has support for -no-pie upstream, but spelling differs from
+			# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
+			# hardened users try '-pie' in USE=ghcbootstrap mode.
+			append-ghc-cflags compile link -no-pie
+		fi
+
+		# prevent from failing to build unregisterised ghc:
+		# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+	fi
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+	local from=$1
+	local   to=$2
+	shift 2
+	local file=
+	for file in "$@"
+	do
+		sed -i -e "s|$from|$to|g" \
+			"$file" || die "path relocation failed for '$file'"
+	done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+	local to=$1 ghc_v=${BIN_PV}
+
+	# libdir for prebuilt binary and for current system may mismatch
+	# It does for prefix installation for example: bug #476998
+	local bin_ghc_prefix=${WORKDIR}/usr
+	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+	# backup original script to use it later after relocation
+	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
+	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+	if [[ ${bin_libdir} != $(get_libdir) ]]; then
+		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+		# moving the dir itself is not strictly needed
+		# but then USE=binary would result in installing
+		# in '${bin_libdir}'
+		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
+			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
+			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
+			"${WORKDIR}/usr/bin/hsc2hs" \
+			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
+			"$gp_back" \
+			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
+	fi
+
+	# Relocate from /usr to ${EPREFIX}/usr
+	relocate_path "/usr" "${to}/usr" \
+		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
+		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
+		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
+		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
+		"${WORKDIR}/usr/bin/hp2ps" \
+		"${WORKDIR}/usr/bin/hpc" \
+		"${WORKDIR}/usr/bin/hsc2hs" \
+		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
+		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
+
+	# this one we will use to regenerate cache
+	# so it should point to current tree location
+	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+	if use prefix; then
+		hprefixify "${bin_libpath}"/${PN}*/settings
+	fi
+
+	# regenerate the binary package cache
+	"$gp_back" recache || die "failed to update cache after relocation"
+	rm "$gp_back"
+}
+
+ghc-check-reqs() {
+	# These are pessimistic values (slightly bigger than worst-case)
+	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
+	# numbers on various arches.
+	CHECKREQS_DISK_BUILD=8G
+	CHECKREQS_DISK_USR=2G
+	# USE=binary roughly takes
+	use binary && CHECKREQS_DISK_BUILD=4G
+
+	"$@"
+}
+
+pkg_pretend() {
+	ghc-check-reqs check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	ghc-check-reqs check-reqs_pkg_setup
+
+	# quiet portage about prebuilt binaries
+	use binary && QA_PREBUILT="*"
+
+	[[ ${MERGE_TYPE} == binary ]] && return
+
+	if use ghcbootstrap; then
+		ewarn "You requested ghc bootstrapping, this is usually only used"
+		ewarn "by Gentoo developers to make binary .tbz2 packages."
+
+		[[ -z $(type -P ghc) ]] && \
+			die "Could not find a ghc to bootstrap with."
+	else
+		if ! yet_binary; then
+			eerror "Please try emerging with USE=ghcbootstrap and report build"
+			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
+			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
+		fi
+	fi
+}
+
+src_unpack() {
+	# Create the ${S} dir if we're using the binary version
+	use binary && mkdir "${S}"
+
+	# the Solaris and Darwin binaries from ghc (maeder) need to be
+	# unpacked separately, so prevent them from being unpacked
+	local ONLYA=${A}
+	case ${CHOST} in
+		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
+	esac
+	unpack ${ONLYA}
+}
+
+src_prepare() {
+	ghc_setup_cflags
+
+	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+		# See bug #313635.
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
+
+		# allow hardened users use vanilla binary to bootstrap ghc
+		# ghci uses mmap with rwx protection at it implements dynamic
+		# linking on it's own (bug #299709)
+		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
+	fi
+
+	if use binary; then
+		if use prefix; then
+			relocate_ghc "${EPREFIX}"
+		fi
+
+		# Move unpacked files to the expected place
+		mv "${WORKDIR}/usr" "${S}"
+		eapply_user
+	else
+		if ! use ghcbootstrap; then
+			case ${CHOST} in
+				*-darwin* | *-solaris*)
+				# UPDATE ME for ghc-7
+				mkdir "${WORKDIR}"/ghc-bin-installer || die
+				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
+				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
+				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
+				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
+				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
+				popd > /dev/null
+
+				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
+				# fix the binaries so they run, on Solaris we need an
+				# LD_LIBRARY_PATH which has our prefix libdirs, on
+				# Darwin we need to replace the frameworks with our libs
+				# from the prefix fix before installation, because some
+				# of the tools are actually used during configure/make
+				if [[ ${CHOST} == *-solaris* ]] ; then
+					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
+				elif [[ ${CHOST} == *-darwin* ]] ; then
+					local readline_framework=GNUreadline.framework/GNUreadline
+					local gmp_framework=/opt/local/lib/libgmp.10.dylib
+					local ncurses_file=/opt/local/lib/libncurses.5.dylib
+					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
+						install_name_tool -change \
+							${readline_framework} \
+							"${EPREFIX}"/lib/libreadline.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${gmp_framework} \
+							"${EPREFIX}"/usr/lib/libgmp.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${ncurses_file} \
+							"${EPREFIX}"/usr/lib/libncurses.dylib \
+							${binary} || die
+					done
+					# we don't do frameworks!
+					sed -i \
+						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
+						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
+						rts/package.conf.in || die
+				fi
+
+				# it is autoconf, but we really don't want to give it too
+				# many arguments, in fact we do the make in-place anyway
+				./configure --prefix="${WORKDIR}"/usr || die
+				make install || die
+				popd > /dev/null
+				;;
+				*)
+				relocate_ghc "${WORKDIR}"
+				;;
+			esac
+		fi
+
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${S}/ghc/ghc.wrapper"
+
+		cd "${S}" # otherwise eapply will break
+
+		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
+		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+		eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
+		eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
+
+		# a bunch of crosscompiler patches
+		# needs newer version:
+		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+
+		# mingw32 target
+		pushd "${S}/libraries/Win32"
+			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
+		popd
+
+		bump_libs
+
+		eapply_user
+		# as we have changed the build system
+		eautoreconf
+	fi
+}
+
+src_configure() {
+	if ! use binary; then
+		# initialize build.mk
+		echo '# Gentoo changes' > mk/build.mk
+
+		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
+		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+
+		# We also need to use the GHC_FLAGS flags when building ghc itself
+		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
+		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
+		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
+		# Speed up initial Cabal bootstrap
+		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
+
+		# We can't depend on haddock except when bootstrapping when we
+		# must build docs and include them into the binary .tbz2 package
+		# app-text/dblatex is not in portage, can not build PDF or PS
+		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
+		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
+		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
+
+		# this controls presence on 'xhtml' and 'haddock' in final install
+		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
+
+		# not used outside of ghc's test
+		if [[ -n ${GHC_BUILD_DPH} ]]; then
+				echo "BUILD_DPH = YES" >> mk/build.mk
+			else
+				echo "BUILD_DPH = NO" >> mk/build.mk
+		fi
+
+		# Any non-native build has to skip as it needs
+		# target haddock binary to be runnabine.
+		if ! is_native; then
+			# disable docs generation as it requires running stage2
+			echo "HADDOCK_DOCS=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
+		fi
+
+		if is_crosscompile; then
+			# Install ghc-stage1 crosscompiler instead of
+			# ghc-stage2 cross-built compiler.
+			echo "Stage1Only=YES" >> mk/build.mk
+		fi
+
+		# allows overriding build flavours for libraries:
+		# v   - vanilla (static libs)
+		# p   - profiled
+		# dyn - shared libraries
+		# example: GHC_LIBRARY_WAYS="v dyn"
+		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
+			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
+		fi
+		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
+
+		# Get ghc from the unpacked binary .tbz2
+		# except when bootstrapping we just pick ghc up off the path
+		if ! use ghcbootstrap; then
+			export PATH="${WORKDIR}/usr/bin:${PATH}"
+		fi
+
+		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
+
+		# don't strip anything. Very useful when stage2 SIGSEGVs on you
+		echo "STRIP_CMD = :" >> mk/build.mk
+
+		local econf_args=()
+
+		# GHC embeds toolchain it was built by and uses it later.
+		# Don't allow things like ccache or versioned binary slip.
+		# We use stable thing across gcc upgrades.
+		# User can use EXTRA_ECONF=CC=... to override this default.
+		econf_args+=(
+			AR=${CTARGET}-ar
+			CC=${CTARGET}-gcc
+			# these should be inferred by GHC but ghc defaults
+			# to using bundled tools on windows.
+			Windres=${CTARGET}-windres
+			DllWrap=${CTARGET}-dllwrap
+			# we set the linker explicitly below
+			--disable-ld-override
+		)
+		case ${CTARGET} in
+			arm*)
+				# ld.bfd-2.28 does not work for ghc. Force ld.gold
+				# instead. This should be removed once gentoo gets
+				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
+				econf_args+=(LD=${CTARGET}-ld.gold)
+			;;
+			sparc*)
+				# ld.gold-2.28 does not work for ghc. Force ld.bfd
+				# instead. This should be removed once gentoo gets
+				# a fix for missing --no-relax support bug:
+				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
+				econf_args+=(LD=${CTARGET}-ld.bfd)
+			;;
+			*)
+				econf_args+=(LD=${CTARGET}-ld)
+		esac
+
+		if [[ ${CBUILD} != ${CHOST} ]]; then
+			# GHC bug: ghc claims not to support cross-building.
+			# It does, but does not distinct --host= value
+			# for stage1 and stage2 compiler.
+			econf_args+=(--host=${CBUILD})
+		fi
+
+		if use ghcmakebinary; then
+			# When building booting libary we are trying to
+			# bundle or restrict most of external depends
+			# with unstable ABI:
+			#  - embed libffi (default GHC behaviour)
+			#  - disable ncurses support for ghci (via haskeline)
+			#    https://bugs.gentoo.org/557478
+			#  - disable ncurses support for ghc-pkg
+			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
+			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
+		elif is_native; then
+			# using ${GTARGET}'s libffi is not supported yet:
+			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
+			econf_args+=(--with-system-libffi)
+			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+		fi
+
+		einfo "Final mk/build.mk:"
+		cat mk/build.mk || die
+
+		econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
+
+		if [[ ${PV} == *9999* ]]; then
+			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+			GHC_P=${PN}-${GHC_PV}
+		fi
+	fi # ! use binary
+}
+
+src_compile() {
+	if ! use binary; then
+		# Stage1Only crosscompiler does not build stage2
+		if ! is_crosscompile; then
+			# 1. build/pax-mark compiler binary first
+			emake ghc/stage2/build/tmp/ghc-stage2
+			# 2. pax-mark (bug #516430)
+			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
+			# 2. build/pax-mark haddock using ghc-stage2
+			if is_native; then
+				# non-native build does not build haddock
+				# due to HADDOCK_DOCS=NO, but it could.
+				emake utils/haddock/dist/build/tmp/haddock
+				pax-mark -m utils/haddock/dist/build/tmp/haddock
+			fi
+		fi
+		# 3. and then all the rest
+		emake all
+	fi # ! use binary
+}
+
+src_test() {
+	# TODO: deal with:
+	#    - sandbox (pollutes environment)
+	#    - extra packages (to extend testsuite coverage)
+	# bits are taken from 'validate'
+	local make_test_target='test' # can be fulltest
+	# not 'emake' as testsuite uses '$MAKE' without jobserver available
+	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
+}
+
+src_install() {
+	if use binary; then
+		use prefix && mkdir -p "${ED}"
+		mv "${S}/usr" "${ED}"
+	else
+		[[ -f VERSION ]] || emake VERSION
+
+		# -j1 due to a rare race in install script:
+		#    make --no-print-directory -f ghc.mk phase=final install
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
+		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
+		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
+		#    /usr/bin/install: cannot create regular file \
+		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
+		emake -j1 install DESTDIR="${D}"
+
+		# Skip for cross-targets as they all share target location:
+		# /usr/share/doc/ghc-9999/
+		if ! is_crosscompile; then
+			dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
+		fi
+
+		# rename ghc-shipped files to avoid collision
+		# of external packages. Motivating example:
+		#  user had installed:
+		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
+		#      dev-haskell/transformers-0.4.2.0
+		#  then user tried to update to
+		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
+		#  this will lead to single .conf file collision.
+		local shipped_conf renamed_conf
+		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+		for shipped_conf in "${package_confdir}"/*.conf; do
+			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
+			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
+			mv "${shipped_conf}" "${renamed_conf}" || die
+		done
+
+		# remove link, but leave 'haddock-${GHC_P}'
+		rm -f "${ED}"/usr/bin/$(cross)haddock
+
+		if ! is_crosscompile; then
+			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
+			newbashcomp utils/completion/ghc.bash         ghc
+		fi
+	fi
+
+	# path to the package.cache
+	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+	PKGCACHE="${package_confdir}"/package.cache
+	# copy the package.conf.d, including timestamp, save it so we can help
+	# users that have a broken package.conf.d
+	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
+
+	# copy the package.conf, including timestamp, save it so we later can put it
+	# back before uninstalling, or when upgrading.
+	cp -p "${PKGCACHE}"{,.shipped} \
+		|| die "failed to copy package.conf.d/package.cache"
+}
+
+pkg_preinst() {
+	# have we got an earlier version of ghc installed?
+	if has_version "<${CATEGORY}/${PF}"; then
+		haskell_updater_warn="1"
+	fi
+}
+
+pkg_postinst() {
+	ghc-reregister
+
+	# path to the package.cache
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+
+	# give the cache a new timestamp, it must be as recent as
+	# the package.conf.d directory.
+	touch "${PKGCACHE}"
+
+	if [[ "${haskell_updater_warn}" == "1" ]]; then
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+		ewarn "You have just upgraded from an older version of GHC."
+		ewarn "You may have to run"
+		ewarn "      'haskell-updater'"
+		ewarn "to rebuild all ghc-based Haskell libraries."
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+	fi
+}
+
+pkg_prerm() {
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+	rm -rf "${PKGCACHE}"
+
+	cp -p "${PKGCACHE}"{.shipped,}
+}
+
+pkg_postrm() {
+	ghc-package_pkg_postrm
+}


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2019-07-01  7:55 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2019-07-01  7:55 UTC (permalink / raw
  To: gentoo-commits

commit:     5f0f533fa143b3b98ba29a419b403616188d5308
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  1 07:55:09 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Jul  1 07:55:18 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f0f533f

dev-lang/ghc: bump up to 8.6.5, no binaries yet

Package-Manager: Portage-2.3.68, Repoman-2.3.16
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/Manifest         |   2 +
 dev-lang/ghc/ghc-8.6.5.ebuild | 774 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 776 insertions(+)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 6aafa3726a3..a24d54bce4a 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -10,6 +10,8 @@ DIST ghc-8.4.2-src.tar.xz 11313140 BLAKE2B d6fe90f3c68b137c6029bf08918a51ff43c21
 DIST ghc-8.4.3-src.tar.xz 11315068 BLAKE2B cfb858051aff0c4fb3cdbbe96627cacc82665a6bfc4f863b0353eb3d93d358f7ed4efd7b131280763786f397aabc5c4825f60c3890649303fc97187f2b996d21 SHA512 c6cea84264f32ae888f9931f834a1d721889242f656d14262e787ec54a1793d1862ce76daacaf1006c12b8af12919501afce1dc02571373e24830e4d51803414
 DIST ghc-8.6.4-src.tar.xz 19029904 BLAKE2B 80676923866417cbf674c3cfadc2ecf9a673e9dcefb4561be7125c83edad38990ea9427c302aeeb9ef04b2c3eeea4fa9fabc72d89c742c6714163ea280802122 SHA512 9237e45b26852cc8a6d64c80da2b28c910349bbbed60f6575035f39bcb064a5ce80ec73cd85e2298e4abefead378e19b7d7ec3ffeea09e362f20eb0b09b36798
 DIST ghc-8.6.4-testsuite.tar.xz 1906656 BLAKE2B b0e55b415c885479c3573fe86436338971e685edc95e106043f36e92e1ee6a7e86add9e86a35c8bd685916f18a7bcf08d4a7b845da41dd855132b131ccbc4a37 SHA512 b1bbe1759ec528914cbfa6b3789c596e46b6266568972b9f5d1cf13e31b7206400b65536e7acea698161e46b8ca11285b3282ebd9336d23b68d34feb4f0bf314
+DIST ghc-8.6.5-src.tar.xz 19092168 BLAKE2B 2ac0926b186c43fd179170a0690492129e9ffb6651608875db7167113becf324dcf99a82f56e578c67051f813007c0ffa32ca5b12588f0d370330c8274a2d74d SHA512 c08a7480200cb99e1ffbe4ce7669f552b1054054966f7e7efcbc5f98af8032e1249fa391c4fc4c7d62cc8e0be5d17fa05845177f3cea3dbcf86e6c92d40fc0f9
+DIST ghc-8.6.5-testsuite.tar.xz 1910060 BLAKE2B 71136207e3eccb4ec6756661ffa64c0a82475704c071cd8f060855a9f40d7d1fc4be2da7ff265df38fb918b8ee2ce21a54ee4b224aacaa3026ad1ddb1e1e4ab2 SHA512 980f3934bb18876cc80b80a0eb64a9ca1dfaa7f4d8b0761f5d733a6583053e38b231445388b992b26ec1ad5f569b6385dbe60f96381794f5577964979c253e16
 DIST ghc-bin-7.10.3-alpha.tbz2 183558856 BLAKE2B 2bb02aafa49c6a91bec016e8bec2d07257d602e53c9df55792ec6fbbf8e2e46de1d5f3f72c0ccf74d6bd7f7987f53412063ccb02ae85455fce11fa928cbf5291 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230
 DIST ghc-bin-7.10.3-amd64.tbz2 112040431 BLAKE2B 3e59b70ca309a1cd704266c54a7983f9a58362bf700ced89c5649c780c664c650ec091e14026a7b84e339d2ebff39eba1772eebcd9fb4b99b9c99d179453d5cc SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558
 DIST ghc-bin-7.10.3-ia64.tbz2 238680956 BLAKE2B 08593718d376051edfb0c86131e54dafc5c15056757fbeef90c653a7d217e49ff34ffaf7cd4083144c9277e73a290b822a0f889aaf806341375708e4b92654b2 SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5

diff --git a/dev-lang/ghc/ghc-8.6.5.ebuild b/dev-lang/ghc/ghc-8.6.5.ebuild
new file mode 100644
index 00000000000..04327fdfc43
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.6.5.ebuild
@@ -0,0 +1,774 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+		export CTARGET=${CATEGORY/cross-}
+	fi
+fi
+
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib multiprocessing pax-utils toolchain-funcs versionator prefix
+inherit check-reqs
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="http://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+BIN_PV=${PV}
+# sorted!
+#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+#arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+	case "${ARCH}" in
+		#alpha) return 0 ;;
+		#arm64) return 0 ;;
+		#arm) return 0 ;;
+		#amd64) return 0 ;;
+		#ia64) return 0 ;;
+		#ppc) return 0 ;;
+		#ppc64) return 0 ;;
+		#sparc) return 0 ;;
+		#x86) return 0 ;;
+		*) return 1 ;;
+	esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=8.6.0.20180810 # uncomment only for -alpha, -beta, -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? (
+	http://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
+	test? ( http://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
+)"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+
+BUMP_LIBRARIES=(
+	# "hackage-name          hackage-version"
+)
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS=""
+IUSE="doc ghcbootstrap ghcmakebinary +gmp profile test"
+IUSE+=" binary"
+
+RDEPEND="
+	>=dev-lang/perl-5.6.1
+	dev-libs/gmp:0=
+	sys-libs/ncurses:0=[unicode]
+	!ghcmakebinary? ( virtual/libffi:= )
+"
+
+# This set of dependencies is needed to run
+# prebuilt ghc. We specifically avoid ncurses
+# dependency with:
+#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
+PREBUILT_BINARY_DEPENDS="
+	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+"
+# This set of dependencies is needed to install
+# ghc[binary] in system. terminfo package is linked
+# against ncurses.
+PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
+	sys-libs/ncurses:0/6
+"
+
+RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
+
+DEPEND="${RDEPEND}
+	doc? ( app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5
+		app-text/docbook-xsl-stylesheets
+		dev-python/sphinx
+		>=dev-libs/libxslt-1.1.2 )
+	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
+
+PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
+
+REQUIRED_USE="?? ( ghcbootstrap binary )"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+	[[ ${CHOST} != ${CTARGET} ]]
+}
+
+is_native() {
+	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
+}
+
+# returns tool prefix for crosscompiler.
+# Example:
+#  CTARGET=armv7a-unknown-linux-gnueabi
+#  CHOST=x86_64-pc-linux-gnu
+#    "armv7a-unknown-linux-gnueabi-"
+#  CTARGET=${CHOST}
+#    ""
+# Used in tools and library prefix:
+#    "${ED}"/usr/bin/$(cross)haddock
+#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+
+cross() {
+	if is_crosscompile; then
+		echo "${CTARGET}-"
+	else
+		echo ""
+	fi
+}
+
+append-ghc-cflags() {
+	local persistent compile assemble link
+	local flag ghcflag
+
+	for flag in $*; do
+		case ${flag} in
+			persistent)	persistent="yes";;
+			compile)	compile="yes";;
+			assemble)	assemble="yes";;
+			link)		link="yes";;
+			*)
+				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				;;
+		esac
+	done
+}
+
+# $1 - lib name (under libraries/)
+# $2 - lib version
+# example: bump_lib "transformers" "0.4.2.0"
+bump_lib() {
+	local pn=$1 pv=$2
+	local p=${pn}-${pv}
+	local f
+
+	einfo "Bumping ${pn} up to ${pv}"
+
+	for f in ghc.mk GNUmakefile; do
+		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
+	done
+	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
+	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
+}
+
+update_SRC_URI() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		SRC_URI+=" mirror://hackage/package/${pn}/${pn}-${pv}.tar.gz"
+	done
+}
+
+update_SRC_URI
+
+bump_libs() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		bump_lib "${pn}" "${pv}"
+	done
+}
+
+ghc_setup_cflags() {
+	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
+	if ! is_native; then
+		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
+		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
+		einfo "Crosscompiling mode:"
+		einfo "   CHOST:   ${CHOST}"
+		einfo "   CTARGET: ${CTARGET}"
+		einfo "   CFLAGS:  ${CFLAGS}"
+		einfo "   LDFLAGS: ${LDFLAGS}"
+		einfo "   prefix: $(cross)"
+		return
+	fi
+	# We need to be very careful with the CFLAGS we ask ghc to pass through to
+	# gcc. There are plenty of flags which will make gcc produce output that
+	# breaks ghc in various ways. The main ones we want to pass through are
+	# -mcpu / -march flags. These are important for arches like alpha & sparc.
+	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
+	strip-flags
+	strip-unsupported-flags
+
+	# Cmm can't parse line numbers #482086
+	replace-flags -ggdb[3-9] -ggdb2
+
+	GHC_FLAGS=""
+	GHC_PERSISTENT_FLAGS=""
+	for flag in ${CFLAGS}; do
+		case ${flag} in
+
+			# Ignore extra optimisation (ghc passes -O to gcc anyway)
+			# -O2 and above break on too many systems
+			-O*) ;;
+
+			# Arch and ABI flags are what we're really after
+			-m*) append-ghc-cflags compile assemble ${flag};;
+
+			# Sometimes it's handy to see backtrace of RTS
+			# to get an idea what happens there
+			-g*) append-ghc-cflags compile ${flag};;
+
+			# Ignore all other flags, including all -f* flags
+		esac
+	done
+
+	for flag in ${LDFLAGS}; do
+		append-ghc-cflags link ${flag}
+	done
+
+	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
+	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
+	# options to gcc.
+	if is_native; then
+		# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
+		# are not built with fPIC, bug #606666
+		gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
+		tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
+			# gcc-6.3 has support for -no-pie upstream, but spelling differs from
+			# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
+			# hardened users try '-pie' in USE=ghcbootstrap mode.
+			append-ghc-cflags compile link -no-pie
+		fi
+
+		# prevent from failing to build unregisterised ghc:
+		# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+	fi
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+	local from=$1
+	local   to=$2
+	shift 2
+	local file=
+	for file in "$@"
+	do
+		sed -i -e "s|$from|$to|g" \
+			"$file" || die "path relocation failed for '$file'"
+	done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+	local to=$1 ghc_v=${BIN_PV}
+
+	# libdir for prebuilt binary and for current system may mismatch
+	# It does for prefix installation for example: bug #476998
+	local bin_ghc_prefix=${WORKDIR}/usr
+	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+	# backup original script to use it later after relocation
+	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
+	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+	if [[ ${bin_libdir} != $(get_libdir) ]]; then
+		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+		# moving the dir itself is not strictly needed
+		# but then USE=binary would result in installing
+		# in '${bin_libdir}'
+		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
+			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
+			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
+			"${WORKDIR}/usr/bin/hsc2hs" \
+			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
+			"$gp_back" \
+			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
+	fi
+
+	# Relocate from /usr to ${EPREFIX}/usr
+	relocate_path "/usr" "${to}/usr" \
+		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
+		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
+		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
+		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
+		"${WORKDIR}/usr/bin/hp2ps" \
+		"${WORKDIR}/usr/bin/hpc" \
+		"${WORKDIR}/usr/bin/hsc2hs" \
+		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
+		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
+
+	# this one we will use to regenerate cache
+	# so it should point to current tree location
+	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+	if use prefix; then
+		hprefixify "${bin_libpath}"/${PN}*/settings
+	fi
+
+	# regenerate the binary package cache
+	"$gp_back" recache || die "failed to update cache after relocation"
+	rm "$gp_back"
+}
+
+ghc-check-reqs() {
+	# These are pessimistic values (slightly bigger than worst-case)
+	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
+	# numbers on various arches.
+	CHECKREQS_DISK_BUILD=8G
+	CHECKREQS_DISK_USR=2G
+	# USE=binary roughly takes
+	use binary && CHECKREQS_DISK_BUILD=4G
+
+	"$@"
+}
+
+pkg_pretend() {
+	ghc-check-reqs check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	ghc-check-reqs check-reqs_pkg_setup
+
+	# quiet portage about prebuilt binaries
+	use binary && QA_PREBUILT="*"
+
+	[[ ${MERGE_TYPE} == binary ]] && return
+
+	if use ghcbootstrap; then
+		ewarn "You requested ghc bootstrapping, this is usually only used"
+		ewarn "by Gentoo developers to make binary .tbz2 packages."
+
+		[[ -z $(type -P ghc) ]] && \
+			die "Could not find a ghc to bootstrap with."
+	else
+		if ! yet_binary; then
+			eerror "Please try emerging with USE=ghcbootstrap and report build"
+			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
+			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
+		fi
+	fi
+}
+
+src_unpack() {
+	# Create the ${S} dir if we're using the binary version
+	use binary && mkdir "${S}"
+
+	# the Solaris and Darwin binaries from ghc (maeder) need to be
+	# unpacked separately, so prevent them from being unpacked
+	local ONLYA=${A}
+	case ${CHOST} in
+		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
+	esac
+	unpack ${ONLYA}
+}
+
+src_prepare() {
+	ghc_setup_cflags
+
+	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+		# See bug #313635.
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
+
+		# allow hardened users use vanilla binary to bootstrap ghc
+		# ghci uses mmap with rwx protection at it implements dynamic
+		# linking on it's own (bug #299709)
+		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
+	fi
+
+	if use binary; then
+		if use prefix; then
+			relocate_ghc "${EPREFIX}"
+		fi
+
+		# Move unpacked files to the expected place
+		mv "${WORKDIR}/usr" "${S}"
+		eapply_user
+	else
+		if ! use ghcbootstrap; then
+			case ${CHOST} in
+				*-darwin* | *-solaris*)
+				# UPDATE ME for ghc-7
+				mkdir "${WORKDIR}"/ghc-bin-installer || die
+				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
+				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
+				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
+				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
+				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
+				popd > /dev/null
+
+				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
+				# fix the binaries so they run, on Solaris we need an
+				# LD_LIBRARY_PATH which has our prefix libdirs, on
+				# Darwin we need to replace the frameworks with our libs
+				# from the prefix fix before installation, because some
+				# of the tools are actually used during configure/make
+				if [[ ${CHOST} == *-solaris* ]] ; then
+					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
+				elif [[ ${CHOST} == *-darwin* ]] ; then
+					local readline_framework=GNUreadline.framework/GNUreadline
+					local gmp_framework=/opt/local/lib/libgmp.10.dylib
+					local ncurses_file=/opt/local/lib/libncurses.5.dylib
+					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
+						install_name_tool -change \
+							${readline_framework} \
+							"${EPREFIX}"/lib/libreadline.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${gmp_framework} \
+							"${EPREFIX}"/usr/lib/libgmp.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${ncurses_file} \
+							"${EPREFIX}"/usr/lib/libncurses.dylib \
+							${binary} || die
+					done
+					# we don't do frameworks!
+					sed -i \
+						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
+						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
+						rts/package.conf.in || die
+				fi
+
+				# it is autoconf, but we really don't want to give it too
+				# many arguments, in fact we do the make in-place anyway
+				./configure --prefix="${WORKDIR}"/usr || die
+				make install || die
+				popd > /dev/null
+				;;
+				*)
+				relocate_ghc "${WORKDIR}"
+				;;
+			esac
+		fi
+
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${S}/ghc/ghc.wrapper"
+
+		cd "${S}" # otherwise eapply will break
+
+		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
+		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+		eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
+		eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
+
+		# a bunch of crosscompiler patches
+		# needs newer version:
+		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+
+		# mingw32 target
+		pushd "${S}/libraries/Win32"
+			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
+		popd
+
+		bump_libs
+
+		eapply_user
+		# as we have changed the build system
+		eautoreconf
+	fi
+}
+
+src_configure() {
+	if ! use binary; then
+		# initialize build.mk
+		echo '# Gentoo changes' > mk/build.mk
+
+		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
+		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+
+		# We also need to use the GHC_FLAGS flags when building ghc itself
+		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
+		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
+		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
+		# Speed up initial Cabal bootstrap
+		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
+
+		# We can't depend on haddock except when bootstrapping when we
+		# must build docs and include them into the binary .tbz2 package
+		# app-text/dblatex is not in portage, can not build PDF or PS
+		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
+		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
+		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
+
+		# this controls presence on 'xhtml' and 'haddock' in final install
+		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
+
+		# not used outside of ghc's test
+		if [[ -n ${GHC_BUILD_DPH} ]]; then
+				echo "BUILD_DPH = YES" >> mk/build.mk
+			else
+				echo "BUILD_DPH = NO" >> mk/build.mk
+		fi
+
+		# Any non-native build has to skip as it needs
+		# target haddock binary to be runnabine.
+		if ! is_native; then
+			# disable docs generation as it requires running stage2
+			echo "HADDOCK_DOCS=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
+		fi
+
+		if is_crosscompile; then
+			# Install ghc-stage1 crosscompiler instead of
+			# ghc-stage2 cross-built compiler.
+			echo "Stage1Only=YES" >> mk/build.mk
+		fi
+
+		# allows overriding build flavours for libraries:
+		# v   - vanilla (static libs)
+		# p   - profiled
+		# dyn - shared libraries
+		# example: GHC_LIBRARY_WAYS="v dyn"
+		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
+			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
+		fi
+		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
+
+		# Get ghc from the unpacked binary .tbz2
+		# except when bootstrapping we just pick ghc up off the path
+		if ! use ghcbootstrap; then
+			export PATH="${WORKDIR}/usr/bin:${PATH}"
+		fi
+
+		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
+
+		# don't strip anything. Very useful when stage2 SIGSEGVs on you
+		echo "STRIP_CMD = :" >> mk/build.mk
+
+		local econf_args=()
+
+		# GHC embeds toolchain it was built by and uses it later.
+		# Don't allow things like ccache or versioned binary slip.
+		# We use stable thing across gcc upgrades.
+		# User can use EXTRA_ECONF=CC=... to override this default.
+		econf_args+=(
+			AR=${CTARGET}-ar
+			CC=${CTARGET}-gcc
+			# these should be inferred by GHC but ghc defaults
+			# to using bundled tools on windows.
+			Windres=${CTARGET}-windres
+			DllWrap=${CTARGET}-dllwrap
+			# we set the linker explicitly below
+			--disable-ld-override
+		)
+		case ${CTARGET} in
+			arm*)
+				# ld.bfd-2.28 does not work for ghc. Force ld.gold
+				# instead. This should be removed once gentoo gets
+				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
+				econf_args+=(LD=${CTARGET}-ld.gold)
+			;;
+			sparc*)
+				# ld.gold-2.28 does not work for ghc. Force ld.bfd
+				# instead. This should be removed once gentoo gets
+				# a fix for missing --no-relax support bug:
+				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
+				econf_args+=(LD=${CTARGET}-ld.bfd)
+			;;
+			*)
+				econf_args+=(LD=${CTARGET}-ld)
+		esac
+
+		if [[ ${CBUILD} != ${CHOST} ]]; then
+			# GHC bug: ghc claims not to support cross-building.
+			# It does, but does not distinct --host= value
+			# for stage1 and stage2 compiler.
+			econf_args+=(--host=${CBUILD})
+		fi
+
+		if use ghcmakebinary; then
+			# When building booting libary we are trying to
+			# bundle or restrict most of external depends
+			# with unstable ABI:
+			#  - embed libffi (default GHC behaviour)
+			#  - disable ncurses support for ghci (via haskeline)
+			#    https://bugs.gentoo.org/557478
+			#  - disable ncurses support for ghc-pkg
+			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
+			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
+		elif is_native; then
+			# using ${GTARGET}'s libffi is not supported yet:
+			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
+			econf_args+=(--with-system-libffi)
+			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+		fi
+
+		einfo "Final mk/build.mk:"
+		cat mk/build.mk || die
+
+		econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
+
+		if [[ ${PV} == *9999* ]]; then
+			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+			GHC_P=${PN}-${GHC_PV}
+		fi
+	fi # ! use binary
+}
+
+src_compile() {
+	if ! use binary; then
+		# Stage1Only crosscompiler does not build stage2
+		if ! is_crosscompile; then
+			# 1. build/pax-mark compiler binary first
+			emake ghc/stage2/build/tmp/ghc-stage2
+			# 2. pax-mark (bug #516430)
+			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
+			# 2. build/pax-mark haddock using ghc-stage2
+			if is_native; then
+				# non-native build does not build haddock
+				# due to HADDOCK_DOCS=NO, but it could.
+				emake utils/haddock/dist/build/tmp/haddock
+				pax-mark -m utils/haddock/dist/build/tmp/haddock
+			fi
+		fi
+		# 3. and then all the rest
+		emake all
+	fi # ! use binary
+}
+
+src_test() {
+	# TODO: deal with:
+	#    - sandbox (pollutes environment)
+	#    - extra packages (to extend testsuite coverage)
+	# bits are taken from 'validate'
+	local make_test_target='test' # can be fulltest
+	# not 'emake' as testsuite uses '$MAKE' without jobserver available
+	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
+}
+
+src_install() {
+	if use binary; then
+		use prefix && mkdir -p "${ED}"
+		mv "${S}/usr" "${ED}"
+	else
+		[[ -f VERSION ]] || emake VERSION
+
+		# -j1 due to a rare race in install script:
+		#    make --no-print-directory -f ghc.mk phase=final install
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
+		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
+		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
+		#    /usr/bin/install: cannot create regular file \
+		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
+		emake -j1 install DESTDIR="${D}"
+
+		# Skip for cross-targets as they all share target location:
+		# /usr/share/doc/ghc-9999/
+		if ! is_crosscompile; then
+			dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
+		fi
+
+		# rename ghc-shipped files to avoid collision
+		# of external packages. Motivating example:
+		#  user had installed:
+		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
+		#      dev-haskell/transformers-0.4.2.0
+		#  then user tried to update to
+		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
+		#  this will lead to single .conf file collision.
+		local shipped_conf renamed_conf
+		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+		for shipped_conf in "${package_confdir}"/*.conf; do
+			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
+			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
+			mv "${shipped_conf}" "${renamed_conf}" || die
+		done
+
+		# remove link, but leave 'haddock-${GHC_P}'
+		rm -f "${ED}"/usr/bin/$(cross)haddock
+
+		if ! is_crosscompile; then
+			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
+			newbashcomp utils/completion/ghc.bash         ghc
+		fi
+	fi
+
+	# path to the package.cache
+	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+	PKGCACHE="${package_confdir}"/package.cache
+	# copy the package.conf.d, including timestamp, save it so we can help
+	# users that have a broken package.conf.d
+	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
+
+	# copy the package.conf, including timestamp, save it so we later can put it
+	# back before uninstalling, or when upgrading.
+	cp -p "${PKGCACHE}"{,.shipped} \
+		|| die "failed to copy package.conf.d/package.cache"
+}
+
+pkg_preinst() {
+	# have we got an earlier version of ghc installed?
+	if has_version "<${CATEGORY}/${PF}"; then
+		haskell_updater_warn="1"
+	fi
+}
+
+pkg_postinst() {
+	ghc-reregister
+
+	# path to the package.cache
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+
+	# give the cache a new timestamp, it must be as recent as
+	# the package.conf.d directory.
+	touch "${PKGCACHE}"
+
+	if [[ "${haskell_updater_warn}" == "1" ]]; then
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+		ewarn "You have just upgraded from an older version of GHC."
+		ewarn "You may have to run"
+		ewarn "      'haskell-updater'"
+		ewarn "to rebuild all ghc-based Haskell libraries."
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+	fi
+}
+
+pkg_prerm() {
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+	rm -rf "${PKGCACHE}"
+
+	cp -p "${PKGCACHE}"{.shipped,}
+}
+
+pkg_postrm() {
+	ghc-package_pkg_postrm
+}


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2019-07-17 21:05 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2019-07-17 21:05 UTC (permalink / raw
  To: gentoo-commits

commit:     a5434e5130e1cde63875406c47abda480646f22e
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 17 21:05:16 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Jul 17 21:05:33 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5434e51

dev-lang/ghc: add amd64 and x86 binaries

Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/Manifest         |  2 ++
 dev-lang/ghc/ghc-8.6.5.ebuild | 11 ++++++-----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index a24d54bce4a..b0480697f5f 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -45,5 +45,7 @@ DIST ghc-bin-8.4.3-i686-pc-linux-gnu.tbz2 117028296 BLAKE2B 0c99a2f6fe4af4a1342d
 DIST ghc-bin-8.4.3-x86_64-pc-linux-gnu.tbz2 117537996 BLAKE2B 2be0102fcc0f1fef5aae194620a43c1c90538215d4eec2550419634ed9c5bbfb17391d57519c20ab53987a36b42488ac43ff968690a4f65b96c52c3485589d10 SHA512 5f26810ec1f0a483f03ef01f56130eba0287b49b912efba03158336ce521000b611192cf021b72c1a0d902532cc4c9470ca1b3233ccba7c7e7c2ac490c6099fa
 DIST ghc-bin-8.6.4-i686-pc-linux-gnu.tbz2 121639881 BLAKE2B 51d223b654ff23bbdd594801f4ec92b016a58b952ba98007abb56c1c4b184a672e51eb9847b42160febcc4ada0f28f18325cc27f8a025dd9fcf656e3bab73918 SHA512 6b58b080c5fb18ea7b76632b4b48726af61b52d8829f57a2ddd55e6bc109c1fe1a133d2a0ca974a168ffee0013a6dfdc4922577bad01c50a42dad8b9db70e061
 DIST ghc-bin-8.6.4-x86_64-pc-linux-gnu.tbz2 121695747 BLAKE2B 39c745f5f9946bbae622e09bbdabdde4d62eec472fe14e693f37cba6b93ff66e4e56f66df8f0f073686339d252dce71f79f4c2aaef620c3dffbc26a67b1119c3 SHA512 c60bac50e7879bda1d6dcc7c1f12fdac915b18c3ebbfcfad575b2b01fcb57a487496ce7935f7ee4ae934162209ab66370fbcc8a4f021628e5f9a2aa7ef95e119
+DIST ghc-bin-8.6.5-i686-pc-linux-gnu.tbz2 121938050 BLAKE2B 17b6d15af21390e28a025505da76d39a2f8656f74c88a81fc75e7c8e799e54171c0d964d8a977c01576603a781c139b5363ea79eeaa2252622913d2a08a79f0e SHA512 9eb33b4670ee15f53c988885a119f3ef7be896ddcb318019628cdd04e21ec0c61876e08466d9d10d6cb1e16d89cd318e0ba42f0f0ae512f48590fe87483739cd
+DIST ghc-bin-8.6.5-x86_64-pc-linux-gnu.tbz2 121728723 BLAKE2B 6620b2a116b5696dd2d776350a43251c093e117338a4407ae8c41ae27763a4614d7e761b2684b90aa9317dafe7cb67481a6bc141c812d335d5231724ae3db2a7 SHA512 69681eab137f6713339f8912d0d92f6af865630053bcd7a32cb8a31e01628e969951db976533196794fe39e0e57f0fcd8778d9fc9fed4f4231e965b9a603dd8e
 DIST hoopl-3.10.2.0.tar.gz 241940 BLAKE2B 0ed7bf80486767c81415f99da8780a525401c388dea0b3f380bbecceae9cc7f66d8b5d0d7b31f8cb41796309b7a93adb113485efd14882f8af321989ce900a9b SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a
 DIST transformers-0.4.3.0.tar.gz 28632 BLAKE2B 92cabcb654bb11854a3bffbb1262f5cd62eda1aff447157086a61ebc451ebf2fddec53b6a2cc058174f24f0f0e32df671d3717e30a542c8dc90cb87e327d990c SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780

diff --git a/dev-lang/ghc/ghc-8.6.5.ebuild b/dev-lang/ghc/ghc-8.6.5.ebuild
index 04327fdfc43..379ebf395c3 100644
--- a/dev-lang/ghc/ghc-8.6.5.ebuild
+++ b/dev-lang/ghc/ghc-8.6.5.ebuild
@@ -27,12 +27,12 @@ BIN_PV=${PV}
 #arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
 #arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
 #arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
 #arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
 #arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
 #arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-#arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
 # various ports:
 #arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
@@ -43,12 +43,12 @@ yet_binary() {
 		#alpha) return 0 ;;
 		#arm64) return 0 ;;
 		#arm) return 0 ;;
-		#amd64) return 0 ;;
+		amd64) return 0 ;;
 		#ia64) return 0 ;;
 		#ppc) return 0 ;;
 		#ppc64) return 0 ;;
 		#sparc) return 0 ;;
-		#x86) return 0 ;;
+		x86) return 0 ;;
 		*) return 1 ;;
 	esac
 }
@@ -71,7 +71,8 @@ BUMP_LIBRARIES=(
 
 LICENSE="BSD"
 SLOT="0/${PV}"
-KEYWORDS=""
+# to be rekeyworded when most of revdeps are updated
+#KEYWORDS="~amd64 ~x86"
 IUSE="doc ghcbootstrap ghcmakebinary +gmp profile test"
 IUSE+=" binary"
 


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2019-10-01 19:14 Michał Górny
  0 siblings, 0 replies; 92+ messages in thread
From: Michał Górny @ 2019-10-01 19:14 UTC (permalink / raw
  To: gentoo-commits

commit:     ea4e989817fb8baa3e331fe60bbf6ab04d1610f4
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 23 06:10:42 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Oct  1 19:13:48 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea4e9898

dev-lang/ghc: Update for sys-libs/ncurses-compat

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-lang/ghc/ghc-7.10.3.ebuild | 4 ++--
 dev-lang/ghc/ghc-7.8.4.ebuild  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
index 43a286feca8..9e88b9a14fa 100644
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -95,7 +95,7 @@ PREBUILT_BINARY_DEPENDS="
 # ghc[binary] in system. terminfo package is linked
 # against ncurses.
 PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:5/5
+	sys-libs/ncurses-compat:5
 "
 
 RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"

diff --git a/dev-lang/ghc/ghc-7.8.4.ebuild b/dev-lang/ghc/ghc-7.8.4.ebuild
index 49995a58d35..dcd7b0f8a08 100644
--- a/dev-lang/ghc/ghc-7.8.4.ebuild
+++ b/dev-lang/ghc/ghc-7.8.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -79,7 +79,7 @@ RDEPEND="
 
 PREBUILT_BINARY_DEPENDS="
 	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-	sys-libs/ncurses:5/5
+	sys-libs/ncurses-compat:5
 "
 
 RDEPEND+="binary? ( ${PREBUILT_BINARY_DEPENDS} )"


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2019-11-10 15:14 Michał Górny
  0 siblings, 0 replies; 92+ messages in thread
From: Michał Górny @ 2019-11-10 15:14 UTC (permalink / raw
  To: gentoo-commits

commit:     9e1cc91fd89b0008c8b1531750e07906e7a70f64
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  8 20:51:07 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Nov 10 15:13:50 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e1cc91f

dev-lang/ghc: Switch/update remaining URLs

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-lang/ghc/ghc-7.10.3.ebuild | 10 +++++-----
 dev-lang/ghc/ghc-7.8.4.ebuild  |  8 ++++----
 dev-lang/ghc/ghc-8.0.2.ebuild  |  8 ++++----
 dev-lang/ghc/ghc-8.2.1.ebuild  |  8 ++++----
 dev-lang/ghc/ghc-8.2.2.ebuild  |  8 ++++----
 dev-lang/ghc/ghc-8.4.1.ebuild  |  8 ++++----
 dev-lang/ghc/ghc-8.4.2.ebuild  |  8 ++++----
 dev-lang/ghc/ghc-8.4.3.ebuild  |  8 ++++----
 dev-lang/ghc/ghc-8.6.4.ebuild  | 10 +++++-----
 dev-lang/ghc/ghc-8.6.5.ebuild  | 10 +++++-----
 dev-lang/ghc/ghc-8.8.1.ebuild  | 10 +++++-----
 11 files changed, 48 insertions(+), 48 deletions(-)

diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
index 8181b1c9324..7726e119c3c 100644
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -18,7 +18,7 @@ inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib pax-utils toolchain-funcs versionator prefix
 
 DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="http://www.haskell.org/ghc/"
+HOMEPAGE="https://www.haskell.org/ghc/"
 
 # we don't have any binaries yet
 arch_binaries=""
@@ -58,7 +58,7 @@ GHC_PV=${PV}
 #GHC_PV=7.10.2.20151030 # uncomment only for -rc ebuilds
 GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
 
-SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.bz2 )"
+SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.bz2 )"
 S="${WORKDIR}"/${GHC_P}
 
 [[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
@@ -182,7 +182,7 @@ update_SRC_URI() {
 		set -- $p
 		pn=$1 pv=$2
 
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}/${pn}-${pv}.tar.gz"
+		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
 	done
 }
 
@@ -257,11 +257,11 @@ ghc_setup_cflags() {
 	gcc-specs-ssp && append-ghc-cflags persistent compile      -fno-stack-protector
 
 	# prevent from failind building unregisterised ghc:
-	# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+	# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
 	use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
 	# fix the similar issue as ppc64 TOC on ia64. ia64 has limited size of small data
 	# currently ghc fails to build haddock
-	# http://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
+	# https://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
 	use ia64 && append-ghc-cflags persistent compile -G0
 }
 

diff --git a/dev-lang/ghc/ghc-7.8.4.ebuild b/dev-lang/ghc/ghc-7.8.4.ebuild
index dcd7b0f8a08..937d25bc4fa 100644
--- a/dev-lang/ghc/ghc-7.8.4.ebuild
+++ b/dev-lang/ghc/ghc-7.8.4.ebuild
@@ -18,7 +18,7 @@ inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib pax-utils toolchain-funcs versionator
 
 DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="http://www.haskell.org/ghc/"
+HOMEPAGE="https://www.haskell.org/ghc/"
 
 # we don't have any binaries yet
 arch_binaries=""
@@ -58,7 +58,7 @@ GHC_PV=${PV}
 #GHC_PV=7.8.3.20141119 # uncomment only for -rc ebuilds
 GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
 
-SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.bz2 )"
+SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.bz2 )"
 S="${WORKDIR}"/${GHC_P}
 
 [[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
@@ -177,11 +177,11 @@ ghc_setup_cflags() {
 	gcc-specs-ssp && append-ghc-cflags persistent compile      -fno-stack-protector
 
 	# prevent from failind building unregisterised ghc:
-	# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+	# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
 	use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
 	# fix the similar issue as ppc64 TOC on ia64. ia64 has limited size of small data
 	# currently ghc fails to build haddock
-	# http://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
+	# https://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
 	use ia64 && append-ghc-cflags persistent compile -G0
 }
 

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index 394a1597211..6fe47f61c5f 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -18,7 +18,7 @@ inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib pax-utils toolchain-funcs versionator prefix
 inherit check-reqs
 DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="http://www.haskell.org/ghc/"
+HOMEPAGE="https://www.haskell.org/ghc/"
 
 # we don't have any binaries yet
 arch_binaries=""
@@ -60,7 +60,7 @@ GHC_PV=${PV}
 #GHC_PV=8.0.1.20161213 # uncomment only for -rc ebuilds
 GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
 
-SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.xz )"
+SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.xz )"
 S="${WORKDIR}"/${GHC_P}
 
 [[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
@@ -181,7 +181,7 @@ update_SRC_URI() {
 		set -- $p
 		pn=$1 pv=$2
 
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}/${pn}-${pv}.tar.gz"
+		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
 	done
 }
 
@@ -255,7 +255,7 @@ ghc_setup_cflags() {
 	fi
 
 	# prevent from failind building unregisterised ghc:
-	# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+	# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
 	use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
 }
 

diff --git a/dev-lang/ghc/ghc-8.2.1.ebuild b/dev-lang/ghc/ghc-8.2.1.ebuild
index ca642a3830f..266b59e2bfe 100644
--- a/dev-lang/ghc/ghc-8.2.1.ebuild
+++ b/dev-lang/ghc/ghc-8.2.1.ebuild
@@ -17,7 +17,7 @@ inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib pax-utils toolchain-funcs versionator prefix
 inherit check-reqs
 DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="http://www.haskell.org/ghc/"
+HOMEPAGE="https://www.haskell.org/ghc/"
 
 # we don't have any binaries yet
 arch_binaries=""
@@ -56,7 +56,7 @@ GHC_PV=${PV}
 #GHC_PV=8.2.0.20170704 # uncomment only for -rc ebuilds
 GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
 
-SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.xz )"
+SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.xz )"
 S="${WORKDIR}"/${GHC_P}
 
 [[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
@@ -181,7 +181,7 @@ update_SRC_URI() {
 		set -- $p
 		pn=$1 pv=$2
 
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}/${pn}-${pv}.tar.gz"
+		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
 	done
 }
 
@@ -260,7 +260,7 @@ ghc_setup_cflags() {
 		fi
 
 		# prevent from failing to build unregisterised ghc:
-		# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
 		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
 	fi
 }

diff --git a/dev-lang/ghc/ghc-8.2.2.ebuild b/dev-lang/ghc/ghc-8.2.2.ebuild
index 4de85c302b7..6db8290ea34 100644
--- a/dev-lang/ghc/ghc-8.2.2.ebuild
+++ b/dev-lang/ghc/ghc-8.2.2.ebuild
@@ -17,7 +17,7 @@ inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib pax-utils toolchain-funcs versionator prefix
 inherit check-reqs
 DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="http://www.haskell.org/ghc/"
+HOMEPAGE="https://www.haskell.org/ghc/"
 
 # we don't have any binaries yet
 arch_binaries=""
@@ -56,7 +56,7 @@ GHC_PV=${PV}
 #GHC_PV=8.2.1.20171108 # uncomment only for -rc ebuilds
 GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
 
-SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.xz )"
+SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.xz )"
 S="${WORKDIR}"/${GHC_P}
 
 [[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
@@ -181,7 +181,7 @@ update_SRC_URI() {
 		set -- $p
 		pn=$1 pv=$2
 
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}/${pn}-${pv}.tar.gz"
+		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
 	done
 }
 
@@ -260,7 +260,7 @@ ghc_setup_cflags() {
 		fi
 
 		# prevent from failing to build unregisterised ghc:
-		# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
 		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
 	fi
 }

diff --git a/dev-lang/ghc/ghc-8.4.1.ebuild b/dev-lang/ghc/ghc-8.4.1.ebuild
index bbff8dde263..2fb1025b91f 100644
--- a/dev-lang/ghc/ghc-8.4.1.ebuild
+++ b/dev-lang/ghc/ghc-8.4.1.ebuild
@@ -17,7 +17,7 @@ inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib pax-utils toolchain-funcs versionator prefix
 inherit check-reqs
 DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="http://www.haskell.org/ghc/"
+HOMEPAGE="https://www.haskell.org/ghc/"
 
 # we don't have any binaries yet
 arch_binaries=""
@@ -56,7 +56,7 @@ GHC_PV=${PV}
 #GHC_PV=8.4.0.20180224 # uncomment only for -alpha, -beta, -rc ebuilds
 GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
 
-SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz )"
+SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz )"
 S="${WORKDIR}"/${GHC_P}
 
 [[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
@@ -181,7 +181,7 @@ update_SRC_URI() {
 		set -- $p
 		pn=$1 pv=$2
 
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}/${pn}-${pv}.tar.gz"
+		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
 	done
 }
 
@@ -260,7 +260,7 @@ ghc_setup_cflags() {
 		fi
 
 		# prevent from failing to build unregisterised ghc:
-		# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
 		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
 	fi
 }

diff --git a/dev-lang/ghc/ghc-8.4.2.ebuild b/dev-lang/ghc/ghc-8.4.2.ebuild
index 7c0065d00fe..529e6682ff9 100644
--- a/dev-lang/ghc/ghc-8.4.2.ebuild
+++ b/dev-lang/ghc/ghc-8.4.2.ebuild
@@ -17,7 +17,7 @@ inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib pax-utils toolchain-funcs versionator prefix
 inherit check-reqs
 DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="http://www.haskell.org/ghc/"
+HOMEPAGE="https://www.haskell.org/ghc/"
 
 # we don't have any binaries yet
 arch_binaries=""
@@ -56,7 +56,7 @@ GHC_PV=${PV}
 #GHC_PV=8.4.1.20180329 # uncomment only for -alpha, -beta, -rc ebuilds
 GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
 
-SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz )"
+SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz )"
 S="${WORKDIR}"/${GHC_P}
 
 [[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
@@ -181,7 +181,7 @@ update_SRC_URI() {
 		set -- $p
 		pn=$1 pv=$2
 
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}/${pn}-${pv}.tar.gz"
+		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
 	done
 }
 
@@ -260,7 +260,7 @@ ghc_setup_cflags() {
 		fi
 
 		# prevent from failing to build unregisterised ghc:
-		# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
 		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
 	fi
 }

diff --git a/dev-lang/ghc/ghc-8.4.3.ebuild b/dev-lang/ghc/ghc-8.4.3.ebuild
index e315edb423e..23888261337 100644
--- a/dev-lang/ghc/ghc-8.4.3.ebuild
+++ b/dev-lang/ghc/ghc-8.4.3.ebuild
@@ -17,7 +17,7 @@ inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib pax-utils toolchain-funcs versionator prefix
 inherit check-reqs
 DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="http://www.haskell.org/ghc/"
+HOMEPAGE="https://www.haskell.org/ghc/"
 
 # we don't have any binaries yet
 arch_binaries=""
@@ -56,7 +56,7 @@ GHC_PV=${PV}
 #GHC_PV=8.4.1.20180329 # uncomment only for -alpha, -beta, -rc ebuilds
 GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
 
-SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz )"
+SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz )"
 S="${WORKDIR}"/${GHC_P}
 
 [[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
@@ -181,7 +181,7 @@ update_SRC_URI() {
 		set -- $p
 		pn=$1 pv=$2
 
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}/${pn}-${pv}.tar.gz"
+		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
 	done
 }
 
@@ -260,7 +260,7 @@ ghc_setup_cflags() {
 		fi
 
 		# prevent from failing to build unregisterised ghc:
-		# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
 		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
 	fi
 }

diff --git a/dev-lang/ghc/ghc-8.6.4.ebuild b/dev-lang/ghc/ghc-8.6.4.ebuild
index 03eca516b7e..85887f1f738 100644
--- a/dev-lang/ghc/ghc-8.6.4.ebuild
+++ b/dev-lang/ghc/ghc-8.6.4.ebuild
@@ -17,7 +17,7 @@ inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib multiprocessing pax-utils toolchain-funcs versionator prefix
 inherit check-reqs
 DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="http://www.haskell.org/ghc/"
+HOMEPAGE="https://www.haskell.org/ghc/"
 
 # we don't have any binaries yet
 arch_binaries=""
@@ -58,8 +58,8 @@ GHC_PV=${PV}
 GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
 
 SRC_URI="!binary? (
-	http://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
-	test? ( http://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
+	https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
+	test? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
 )"
 S="${WORKDIR}"/${GHC_P}
 
@@ -186,7 +186,7 @@ update_SRC_URI() {
 		set -- $p
 		pn=$1 pv=$2
 
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}/${pn}-${pv}.tar.gz"
+		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
 	done
 }
 
@@ -265,7 +265,7 @@ ghc_setup_cflags() {
 		fi
 
 		# prevent from failing to build unregisterised ghc:
-		# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
 		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
 	fi
 }

diff --git a/dev-lang/ghc/ghc-8.6.5.ebuild b/dev-lang/ghc/ghc-8.6.5.ebuild
index 34f42ebdb24..9ef1702b9c5 100644
--- a/dev-lang/ghc/ghc-8.6.5.ebuild
+++ b/dev-lang/ghc/ghc-8.6.5.ebuild
@@ -17,7 +17,7 @@ inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib multiprocessing pax-utils toolchain-funcs versionator prefix
 inherit check-reqs
 DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="http://www.haskell.org/ghc/"
+HOMEPAGE="https://www.haskell.org/ghc/"
 
 # we don't have any binaries yet
 arch_binaries=""
@@ -58,8 +58,8 @@ GHC_PV=${PV}
 GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
 
 SRC_URI="!binary? (
-	http://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
-	test? ( http://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
+	https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
+	test? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
 )"
 S="${WORKDIR}"/${GHC_P}
 
@@ -186,7 +186,7 @@ update_SRC_URI() {
 		set -- $p
 		pn=$1 pv=$2
 
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}/${pn}-${pv}.tar.gz"
+		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
 	done
 }
 
@@ -265,7 +265,7 @@ ghc_setup_cflags() {
 		fi
 
 		# prevent from failing to build unregisterised ghc:
-		# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
 		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
 	fi
 }

diff --git a/dev-lang/ghc/ghc-8.8.1.ebuild b/dev-lang/ghc/ghc-8.8.1.ebuild
index c53fccaeb53..571fd3176d3 100644
--- a/dev-lang/ghc/ghc-8.8.1.ebuild
+++ b/dev-lang/ghc/ghc-8.8.1.ebuild
@@ -17,7 +17,7 @@ inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib multiprocessing pax-utils toolchain-funcs prefix
 inherit check-reqs
 DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="http://www.haskell.org/ghc/"
+HOMEPAGE="https://www.haskell.org/ghc/"
 
 # we don't have any binaries yet
 arch_binaries=""
@@ -58,8 +58,8 @@ GHC_PV=${PV}
 GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
 
 SRC_URI="!binary? (
-	http://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
-	test? ( http://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
+	https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
+	test? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
 )"
 S="${WORKDIR}"/${GHC_P}
 
@@ -189,7 +189,7 @@ update_SRC_URI() {
 		set -- $p
 		pn=$1 pv=$2
 
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}/${pn}-${pv}.tar.gz"
+		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
 	done
 }
 
@@ -268,7 +268,7 @@ ghc_setup_cflags() {
 		fi
 
 		# prevent from failing to build unregisterised ghc:
-		# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
 		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
 	fi
 }


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2020-01-10 20:09 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2020-01-10 20:09 UTC (permalink / raw
  To: gentoo-commits

commit:     0defa5f02f34b540eafcfd9b8ec9faaa80189cde
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 10 20:08:15 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Jan 10 20:08:15 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0defa5f0

dev-lang/ghc: add powerpc64le binary for ghc-8.8.1

Bug: https://bugs.gentoo.org/654034
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/Manifest         |  1 +
 dev-lang/ghc/ghc-8.8.1.ebuild | 12 +++++++-----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index bfde022be70..c599d04a592 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -50,6 +50,7 @@ DIST ghc-bin-8.6.4-x86_64-pc-linux-gnu.tbz2 121695747 BLAKE2B 39c745f5f9946bbae6
 DIST ghc-bin-8.6.5-i686-pc-linux-gnu.tbz2 121938050 BLAKE2B 17b6d15af21390e28a025505da76d39a2f8656f74c88a81fc75e7c8e799e54171c0d964d8a977c01576603a781c139b5363ea79eeaa2252622913d2a08a79f0e SHA512 9eb33b4670ee15f53c988885a119f3ef7be896ddcb318019628cdd04e21ec0c61876e08466d9d10d6cb1e16d89cd318e0ba42f0f0ae512f48590fe87483739cd
 DIST ghc-bin-8.6.5-x86_64-pc-linux-gnu.tbz2 121728723 BLAKE2B 6620b2a116b5696dd2d776350a43251c093e117338a4407ae8c41ae27763a4614d7e761b2684b90aa9317dafe7cb67481a6bc141c812d335d5231724ae3db2a7 SHA512 69681eab137f6713339f8912d0d92f6af865630053bcd7a32cb8a31e01628e969951db976533196794fe39e0e57f0fcd8778d9fc9fed4f4231e965b9a603dd8e
 DIST ghc-bin-8.8.1-i686-pc-linux-gnu.tbz2 120789855 BLAKE2B 386f37696d956078fad5cad50cbf5b9d9d7765615a1d9cc91a376fb5394648afe8ca956e24ef210f2ff0e51f339b63b16a50f6dc35f30babf019aa57de50b27b SHA512 193c29889693befba863d3c5a26d38d8182bb7e1932b61115dc0a21b6582f818b05db144a9fae5aee06af2044ea59f884825cf1081b62a1c67feb3041d184d3a
+DIST ghc-bin-8.8.1-powerpc64le-unknown-linux-gnu.tbz2 173653088 BLAKE2B 6c29777b596b35fee8e3a17f965e6a21dc40dc2387988f55d4ca5fef0ea9677b558ed210054216a6578b93fbf844df9e407770df184f707f8203f846f4929d2d SHA512 d338b8912c1632410c43a0df75ce69f961924a7c51049a3ac27c22f7c6cfc07388815813713d594fc38b721127df80b65f72b1b0cc6fbf0e10fa15970b8b6f46
 DIST ghc-bin-8.8.1-x86_64-pc-linux-gnu.tbz2 119317594 BLAKE2B 98f0fb262ac485dcfd6a8a67304912ffad2bf2634111fcc3b60346697a836867006bbacaab1e1be0cd5be34b4595d12bec13af644c451c10f7e3843ebaf5922f SHA512 e6acb11755db18fd86a346de642b8579a6b48b303c19795949757f5e351ad3b8892906e989dc57a7fd4471d0efe30fc8175df5bac741d7faecfe42a855a67980
 DIST hoopl-3.10.2.0.tar.gz 241940 BLAKE2B 0ed7bf80486767c81415f99da8780a525401c388dea0b3f380bbecceae9cc7f66d8b5d0d7b31f8cb41796309b7a93adb113485efd14882f8af321989ce900a9b SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a
 DIST transformers-0.4.3.0.tar.gz 28632 BLAKE2B 92cabcb654bb11854a3bffbb1262f5cd62eda1aff447157086a61ebc451ebf2fddec53b6a2cc058174f24f0f0e32df671d3717e30a542c8dc90cb87e327d990c SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780

diff --git a/dev-lang/ghc/ghc-8.8.1.ebuild b/dev-lang/ghc/ghc-8.8.1.ebuild
index b91c9d0ba44..7144fcb04da 100644
--- a/dev-lang/ghc/ghc-8.8.1.ebuild
+++ b/dev-lang/ghc/ghc-8.8.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -30,7 +30,7 @@ BIN_PV=${PV}
 arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
 #arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
 #arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
 arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
@@ -46,7 +46,10 @@ yet_binary() {
 		amd64) return 0 ;;
 		#ia64) return 0 ;;
 		#ppc) return 0 ;;
-		#ppc64) return 0 ;;
+		ppc64)
+			use big-endian && return 1
+			return 0
+			;;
 		#sparc) return 0 ;;
 		x86) return 0 ;;
 		*) return 1 ;;
@@ -72,8 +75,7 @@ BUMP_LIBRARIES=(
 LICENSE="BSD"
 SLOT="0/${PV}"
 KEYWORDS=""
-IUSE="doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-RESTRICT="!test? ( test )"
+IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
 IUSE+=" binary"
 
 RDEPEND="


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2020-01-11 18:58 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2020-01-11 18:58 UTC (permalink / raw
  To: gentoo-commits

commit:     a25d39ed354344f05971b2fc9edc7cda48847cda
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 11 18:57:05 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Jan 11 18:58:09 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a25d39ed

dev-lang/ghc: restore RESTRICT="!test? ( test )"

Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/ghc-8.6.5.ebuild | 2 +-
 dev-lang/ghc/ghc-8.8.1.ebuild | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/dev-lang/ghc/ghc-8.6.5.ebuild b/dev-lang/ghc/ghc-8.6.5.ebuild
index 01a7fa8dbb3..2e4e523c095 100644
--- a/dev-lang/ghc/ghc-8.6.5.ebuild
+++ b/dev-lang/ghc/ghc-8.6.5.ebuild
@@ -77,8 +77,8 @@ SLOT="0/${PV}"
 # to be rekeyworded when most of revdeps are updated
 #KEYWORDS="~amd64 ~x86"
 IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-RESTRICT="!test? ( test )"
 IUSE+=" binary"
+RESTRICT="!test? ( test )"
 
 RDEPEND="
 	>=dev-lang/perl-5.6.1

diff --git a/dev-lang/ghc/ghc-8.8.1.ebuild b/dev-lang/ghc/ghc-8.8.1.ebuild
index 7144fcb04da..7b8c9321190 100644
--- a/dev-lang/ghc/ghc-8.8.1.ebuild
+++ b/dev-lang/ghc/ghc-8.8.1.ebuild
@@ -77,6 +77,7 @@ SLOT="0/${PV}"
 KEYWORDS=""
 IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
 IUSE+=" binary"
+RESTRICT="!test? ( test )"
 
 RDEPEND="
 	>=dev-lang/perl-5.6.1


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2020-01-11 18:58 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2020-01-11 18:58 UTC (permalink / raw
  To: gentoo-commits

commit:     ae822c6a643103428de23fa18fa0be867983cbcd
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 11 18:55:06 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Jan 11 18:58:09 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae822c6a

dev-lang/ghc: add powerpc64le binary for ghc-8.6.5

Bug: https://bugs.gentoo.org/654034
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/Manifest         |  1 +
 dev-lang/ghc/ghc-8.6.5.ebuild | 19 ++++++++++++++-----
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index c599d04a592..f3999afb3a1 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -48,6 +48,7 @@ DIST ghc-bin-8.4.3-x86_64-pc-linux-gnu.tbz2 117537996 BLAKE2B 2be0102fcc0f1fef5a
 DIST ghc-bin-8.6.4-i686-pc-linux-gnu.tbz2 121639881 BLAKE2B 51d223b654ff23bbdd594801f4ec92b016a58b952ba98007abb56c1c4b184a672e51eb9847b42160febcc4ada0f28f18325cc27f8a025dd9fcf656e3bab73918 SHA512 6b58b080c5fb18ea7b76632b4b48726af61b52d8829f57a2ddd55e6bc109c1fe1a133d2a0ca974a168ffee0013a6dfdc4922577bad01c50a42dad8b9db70e061
 DIST ghc-bin-8.6.4-x86_64-pc-linux-gnu.tbz2 121695747 BLAKE2B 39c745f5f9946bbae622e09bbdabdde4d62eec472fe14e693f37cba6b93ff66e4e56f66df8f0f073686339d252dce71f79f4c2aaef620c3dffbc26a67b1119c3 SHA512 c60bac50e7879bda1d6dcc7c1f12fdac915b18c3ebbfcfad575b2b01fcb57a487496ce7935f7ee4ae934162209ab66370fbcc8a4f021628e5f9a2aa7ef95e119
 DIST ghc-bin-8.6.5-i686-pc-linux-gnu.tbz2 121938050 BLAKE2B 17b6d15af21390e28a025505da76d39a2f8656f74c88a81fc75e7c8e799e54171c0d964d8a977c01576603a781c139b5363ea79eeaa2252622913d2a08a79f0e SHA512 9eb33b4670ee15f53c988885a119f3ef7be896ddcb318019628cdd04e21ec0c61876e08466d9d10d6cb1e16d89cd318e0ba42f0f0ae512f48590fe87483739cd
+DIST ghc-bin-8.6.5-powerpc64le-unknown-linux-gnu.tbz2 173549697 BLAKE2B 296bf4e0745f56dfefc3ffc96b4e492ddbfd8bcbbc28a8bc9b3172c616d0e7da1081834384ab69e387808331b607104f015632d59963a87f4e257f290ff286c3 SHA512 81261614a7939adb0ffad3657cd33588ff729bb1e3a7dd228cf869afc1f21b74cb4dce6369a4c4cdc9f45f8d8ae64f25d71cd0f2dc34f36d3022afc149538a78
 DIST ghc-bin-8.6.5-x86_64-pc-linux-gnu.tbz2 121728723 BLAKE2B 6620b2a116b5696dd2d776350a43251c093e117338a4407ae8c41ae27763a4614d7e761b2684b90aa9317dafe7cb67481a6bc141c812d335d5231724ae3db2a7 SHA512 69681eab137f6713339f8912d0d92f6af865630053bcd7a32cb8a31e01628e969951db976533196794fe39e0e57f0fcd8778d9fc9fed4f4231e965b9a603dd8e
 DIST ghc-bin-8.8.1-i686-pc-linux-gnu.tbz2 120789855 BLAKE2B 386f37696d956078fad5cad50cbf5b9d9d7765615a1d9cc91a376fb5394648afe8ca956e24ef210f2ff0e51f339b63b16a50f6dc35f30babf019aa57de50b27b SHA512 193c29889693befba863d3c5a26d38d8182bb7e1932b61115dc0a21b6582f818b05db144a9fae5aee06af2044ea59f884825cf1081b62a1c67feb3041d184d3a
 DIST ghc-bin-8.8.1-powerpc64le-unknown-linux-gnu.tbz2 173653088 BLAKE2B 6c29777b596b35fee8e3a17f965e6a21dc40dc2387988f55d4ca5fef0ea9677b558ed210054216a6578b93fbf844df9e407770df184f707f8203f846f4929d2d SHA512 d338b8912c1632410c43a0df75ce69f961924a7c51049a3ac27c22f7c6cfc07388815813713d594fc38b721127df80b65f72b1b0cc6fbf0e10fa15970b8b6f46

diff --git a/dev-lang/ghc/ghc-8.6.5.ebuild b/dev-lang/ghc/ghc-8.6.5.ebuild
index 63cc1241c21..01a7fa8dbb3 100644
--- a/dev-lang/ghc/ghc-8.6.5.ebuild
+++ b/dev-lang/ghc/ghc-8.6.5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -30,7 +30,7 @@ BIN_PV=${PV}
 arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
 #arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
 #arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
 arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
@@ -46,7 +46,10 @@ yet_binary() {
 		amd64) return 0 ;;
 		#ia64) return 0 ;;
 		#ppc) return 0 ;;
-		#ppc64) return 0 ;;
+		ppc64)
+			use big-endian && return 1
+			return 0
+			;;
 		#sparc) return 0 ;;
 		x86) return 0 ;;
 		*) return 1 ;;
@@ -73,7 +76,7 @@ LICENSE="BSD"
 SLOT="0/${PV}"
 # to be rekeyworded when most of revdeps are updated
 #KEYWORDS="~amd64 ~x86"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp profile test"
+IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
 RESTRICT="!test? ( test )"
 IUSE+=" binary"
 
@@ -81,7 +84,9 @@ RDEPEND="
 	>=dev-lang/perl-5.6.1
 	dev-libs/gmp:0=
 	sys-libs/ncurses:0=[unicode]
+	elfutils? ( dev-libs/elfutils )
 	!ghcmakebinary? ( virtual/libffi:= )
+	numa? ( sys-process/numactl )
 "
 
 # This set of dependencies is needed to run
@@ -484,6 +489,7 @@ src_prepare() {
 		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
 		eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
 		eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
+		eapply "${FILESDIR}"/${PN}-8.6.5-numa.patch
 
 		# a bunch of crosscompiler patches
 		# needs newer version:
@@ -632,7 +638,10 @@ src_configure() {
 		einfo "Final mk/build.mk:"
 		cat mk/build.mk || die
 
-		econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
+		econf ${econf_args[@]} \
+			--enable-bootstrap-with-devel-snapshot \
+			$(use elfutils && echo --enable-dwarf-unwind) \
+			$(use_enable numa)
 
 		if [[ ${PV} == *9999* ]]; then
 			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2020-01-19 14:59 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2020-01-19 14:59 UTC (permalink / raw
  To: gentoo-commits

commit:     95867688692574a6bd976509714a65e8c1148c3c
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 19 14:58:49 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Jan 19 14:58:56 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95867688

dev-lang/ghc: bump up to 8.8.2

Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/Manifest         |   4 +
 dev-lang/ghc/ghc-8.8.2.ebuild | 804 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 808 insertions(+)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index f3999afb3a1..bd2437f9012 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -14,6 +14,8 @@ DIST ghc-8.6.5-src.tar.xz 19092168 BLAKE2B 2ac0926b186c43fd179170a0690492129e9ff
 DIST ghc-8.6.5-testsuite.tar.xz 1910060 BLAKE2B 71136207e3eccb4ec6756661ffa64c0a82475704c071cd8f060855a9f40d7d1fc4be2da7ff265df38fb918b8ee2ce21a54ee4b224aacaa3026ad1ddb1e1e4ab2 SHA512 980f3934bb18876cc80b80a0eb64a9ca1dfaa7f4d8b0761f5d733a6583053e38b231445388b992b26ec1ad5f569b6385dbe60f96381794f5577964979c253e16
 DIST ghc-8.8.1-src.tar.xz 28634672 BLAKE2B 3a012db5d9798efddf806542a88cd9fef1d0972f7f025d377c247961cf8d8071fcf390aa130ac11f1a5556fb572499b9288a8698c49bbd594f0bb5fec4130a2f SHA512 7268b012c3a6c34e7eac05c7d6959de6005651d33e870860bbfe589295502e8794a76580130b8f4da2f88032b68116dbbdbc4c1e900e0c862aaa9891fa788bef
 DIST ghc-8.8.1-testsuite.tar.xz 1959220 BLAKE2B 8606a6439f7d5b4c837b2325c4ef5705dbcea17c4b59daf7aafd0de68e55179bb2c03ce7a4f376398b185b6dbfb361d18592756558461ee43722d2142370d815 SHA512 e13b651c60deb86522efbfe8aa42679cc81a413475f70580d9ef28dbb711617c523951441a30fb46f3be9418c4c0bb4dbc522b04aaa51313afd2d39027696c30
+DIST ghc-8.8.2-src.tar.xz 19365816 BLAKE2B 85dbd2a4696755f43c28ec578d5ecfe706b27ba7f640f66b464b7aa7b959ca5f02b8b51d130299c30d024c46b9ce6a115606bde46be400fb8ee221ff18177d65 SHA512 11eec0bc03254ea848a5c86bc3e2da317801a1227dd91406a157e11cb675891d77d61177b740b6df88bd823063f6cb2af5a928a7540e25392d9d0769ea121069
+DIST ghc-8.8.2-testsuite.tar.xz 1976924 BLAKE2B cec6c5dab1782332aca6364f995cffc1e9f3506649c3410b6eaa220e665b66f033dfad8ab6cae7677e15a6a1bd51237ed491b7fd04a19fa1d4f9cd8904617c64 SHA512 0fc41a0b3cb5f172442863c8a3b1cf549f2f660a070965e6083baa2c90c27b6a7c17550625105799010f4329dc189f4e392c86991844a9704a3e3a72a6d4e2f5
 DIST ghc-bin-7.10.3-alpha.tbz2 183558856 BLAKE2B 2bb02aafa49c6a91bec016e8bec2d07257d602e53c9df55792ec6fbbf8e2e46de1d5f3f72c0ccf74d6bd7f7987f53412063ccb02ae85455fce11fa928cbf5291 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230
 DIST ghc-bin-7.10.3-amd64.tbz2 112040431 BLAKE2B 3e59b70ca309a1cd704266c54a7983f9a58362bf700ced89c5649c780c664c650ec091e14026a7b84e339d2ebff39eba1772eebcd9fb4b99b9c99d179453d5cc SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558
 DIST ghc-bin-7.10.3-ia64.tbz2 238680956 BLAKE2B 08593718d376051edfb0c86131e54dafc5c15056757fbeef90c653a7d217e49ff34ffaf7cd4083144c9277e73a290b822a0f889aaf806341375708e4b92654b2 SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5
@@ -53,5 +55,7 @@ DIST ghc-bin-8.6.5-x86_64-pc-linux-gnu.tbz2 121728723 BLAKE2B 6620b2a116b5696dd2
 DIST ghc-bin-8.8.1-i686-pc-linux-gnu.tbz2 120789855 BLAKE2B 386f37696d956078fad5cad50cbf5b9d9d7765615a1d9cc91a376fb5394648afe8ca956e24ef210f2ff0e51f339b63b16a50f6dc35f30babf019aa57de50b27b SHA512 193c29889693befba863d3c5a26d38d8182bb7e1932b61115dc0a21b6582f818b05db144a9fae5aee06af2044ea59f884825cf1081b62a1c67feb3041d184d3a
 DIST ghc-bin-8.8.1-powerpc64le-unknown-linux-gnu.tbz2 173653088 BLAKE2B 6c29777b596b35fee8e3a17f965e6a21dc40dc2387988f55d4ca5fef0ea9677b558ed210054216a6578b93fbf844df9e407770df184f707f8203f846f4929d2d SHA512 d338b8912c1632410c43a0df75ce69f961924a7c51049a3ac27c22f7c6cfc07388815813713d594fc38b721127df80b65f72b1b0cc6fbf0e10fa15970b8b6f46
 DIST ghc-bin-8.8.1-x86_64-pc-linux-gnu.tbz2 119317594 BLAKE2B 98f0fb262ac485dcfd6a8a67304912ffad2bf2634111fcc3b60346697a836867006bbacaab1e1be0cd5be34b4595d12bec13af644c451c10f7e3843ebaf5922f SHA512 e6acb11755db18fd86a346de642b8579a6b48b303c19795949757f5e351ad3b8892906e989dc57a7fd4471d0efe30fc8175df5bac741d7faecfe42a855a67980
+DIST ghc-bin-8.8.2-i686-pc-linux-gnu.tbz2 120289601 BLAKE2B df65bc6aa4ee22c979b9d8eda29f51188c96700d61fb4cf141ebad8a55e26b6cd959fce3ec0b8d780b68e7baf15a1ce7654dc4ef084aa4671fe05f00f9c4e9aa SHA512 da059f3fea00e14df346143e714da6484ae51d362d9e237607817791e02ec81e29e1ff7f9929fac44044f63196b395287c42f5829884c34391289179b4f6e204
+DIST ghc-bin-8.8.2-x86_64-pc-linux-gnu.tbz2 118957404 BLAKE2B cddedbb0fe8d38e9821bd8f51f5177d35922b25bf4fc8a537e921443560f141cdef44e54a0b4ef2dde07dbe33d9c1cba2e67ba80db4313f67e9bac089d967f56 SHA512 b0b801dd6abe9f5e6217e18568e2911dbfea11b1b45ff526950e87c73a34bcd597afc5105fcff2dc46bb13cf95e63db90c0d24ca9babf174b397a53001e8e0ac
 DIST hoopl-3.10.2.0.tar.gz 241940 BLAKE2B 0ed7bf80486767c81415f99da8780a525401c388dea0b3f380bbecceae9cc7f66d8b5d0d7b31f8cb41796309b7a93adb113485efd14882f8af321989ce900a9b SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a
 DIST transformers-0.4.3.0.tar.gz 28632 BLAKE2B 92cabcb654bb11854a3bffbb1262f5cd62eda1aff447157086a61ebc451ebf2fddec53b6a2cc058174f24f0f0e32df671d3717e30a542c8dc90cb87e327d990c SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780

diff --git a/dev-lang/ghc/ghc-8.8.2.ebuild b/dev-lang/ghc/ghc-8.8.2.ebuild
new file mode 100644
index 00000000000..0726cf1c9bc
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.8.2.ebuild
@@ -0,0 +1,804 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+		export CTARGET=${CATEGORY/cross-}
+	fi
+fi
+
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib multiprocessing pax-utils toolchain-funcs prefix
+inherit check-reqs
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="https://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+BIN_PV=${PV}
+# sorted!
+#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+	case "${ARCH}" in
+		#alpha) return 0 ;;
+		#arm64) return 0 ;;
+		#arm) return 0 ;;
+		amd64) return 0 ;;
+		#ia64) return 0 ;;
+		#ppc) return 0 ;;
+		#ppc64)
+		#	use big-endian && return 1
+		#	return 0
+		#	;;
+		#sparc) return 0 ;;
+		x86) return 0 ;;
+		*) return 1 ;;
+	esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=8.6.0.20180810 # uncomment only for -alpha, -beta, -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? (
+	https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
+	test? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
+)"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+
+BUMP_LIBRARIES=(
+	# "hackage-name          hackage-version"
+)
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS=""
+IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
+IUSE+=" binary"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	>=dev-lang/perl-5.6.1
+	dev-libs/gmp:0=
+	sys-libs/ncurses:0=[unicode]
+	elfutils? ( dev-libs/elfutils )
+	!ghcmakebinary? ( virtual/libffi:= )
+	numa? ( sys-process/numactl )
+"
+
+# This set of dependencies is needed to run
+# prebuilt ghc. We specifically avoid ncurses
+# dependency with:
+#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
+PREBUILT_BINARY_DEPENDS="
+	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+"
+# This set of dependencies is needed to install
+# ghc[binary] in system. terminfo package is linked
+# against ncurses.
+PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
+	sys-libs/ncurses:0/6
+"
+
+RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
+
+DEPEND="${RDEPEND}
+	doc? ( app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5
+		app-text/docbook-xsl-stylesheets
+		dev-python/sphinx
+		>=dev-libs/libxslt-1.1.2 )
+	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
+
+REQUIRED_USE="?? ( ghcbootstrap binary )"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+	[[ ${CHOST} != ${CTARGET} ]]
+}
+
+is_native() {
+	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
+}
+
+if ! is_crosscompile; then
+	PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
+fi
+
+# returns tool prefix for crosscompiler.
+# Example:
+#  CTARGET=armv7a-unknown-linux-gnueabi
+#  CHOST=x86_64-pc-linux-gnu
+#    "armv7a-unknown-linux-gnueabi-"
+#  CTARGET=${CHOST}
+#    ""
+# Used in tools and library prefix:
+#    "${ED}"/usr/bin/$(cross)haddock
+#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+
+cross() {
+	if is_crosscompile; then
+		echo "${CTARGET}-"
+	else
+		echo ""
+	fi
+}
+
+append-ghc-cflags() {
+	local persistent compile assemble link
+	local flag ghcflag
+
+	for flag in $*; do
+		case ${flag} in
+			persistent)	persistent="yes";;
+			compile)	compile="yes";;
+			assemble)	assemble="yes";;
+			link)		link="yes";;
+			*)
+				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				;;
+		esac
+	done
+}
+
+# $1 - lib name (under libraries/)
+# $2 - lib version
+# example: bump_lib "transformers" "0.4.2.0"
+bump_lib() {
+	local pn=$1 pv=$2
+	local p=${pn}-${pv}
+	local f
+
+	einfo "Bumping ${pn} up to ${pv}"
+
+	for f in ghc.mk GNUmakefile; do
+		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
+	done
+	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
+	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
+}
+
+update_SRC_URI() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
+	done
+}
+
+update_SRC_URI
+
+bump_libs() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		bump_lib "${pn}" "${pv}"
+	done
+}
+
+ghc_setup_cflags() {
+	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
+	if ! is_native; then
+		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
+		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
+		einfo "Crosscompiling mode:"
+		einfo "   CHOST:   ${CHOST}"
+		einfo "   CTARGET: ${CTARGET}"
+		einfo "   CFLAGS:  ${CFLAGS}"
+		einfo "   LDFLAGS: ${LDFLAGS}"
+		einfo "   prefix: $(cross)"
+		return
+	fi
+	# We need to be very careful with the CFLAGS we ask ghc to pass through to
+	# gcc. There are plenty of flags which will make gcc produce output that
+	# breaks ghc in various ways. The main ones we want to pass through are
+	# -mcpu / -march flags. These are important for arches like alpha & sparc.
+	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
+	strip-flags
+	strip-unsupported-flags
+
+	# Cmm can't parse line numbers #482086
+	replace-flags -ggdb[3-9] -ggdb2
+
+	GHC_FLAGS=""
+	GHC_PERSISTENT_FLAGS=""
+	for flag in ${CFLAGS}; do
+		case ${flag} in
+
+			# Ignore extra optimisation (ghc passes -O to gcc anyway)
+			# -O2 and above break on too many systems
+			-O*) ;;
+
+			# Arch and ABI flags are what we're really after
+			-m*) append-ghc-cflags compile assemble ${flag};;
+
+			# Sometimes it's handy to see backtrace of RTS
+			# to get an idea what happens there
+			-g*) append-ghc-cflags compile ${flag};;
+
+			# Ignore all other flags, including all -f* flags
+		esac
+	done
+
+	for flag in ${LDFLAGS}; do
+		append-ghc-cflags link ${flag}
+	done
+
+	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
+	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
+	# options to gcc.
+	if is_native; then
+		# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
+		# are not built with fPIC, bug #606666
+		gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
+		tc-is-gcc && ver_test $(gcc-version) -ge 6.3 && if ! use ghcbootstrap; then
+			# gcc-6.3 has support for -no-pie upstream, but spelling differs from
+			# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
+			# hardened users try '-pie' in USE=ghcbootstrap mode.
+			append-ghc-cflags compile link -no-pie
+		fi
+
+		# prevent from failing to build unregisterised ghc:
+		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+	fi
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+	local from=$1
+	local   to=$2
+	shift 2
+	local file=
+	for file in "$@"
+	do
+		sed -i -e "s|$from|$to|g" \
+			"$file" || die "path relocation failed for '$file'"
+	done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+	local to=$1 ghc_v=${BIN_PV}
+
+	# libdir for prebuilt binary and for current system may mismatch
+	# It does for prefix installation for example: bug #476998
+	local bin_ghc_prefix=${WORKDIR}/usr
+	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+	# backup original script to use it later after relocation
+	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
+	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+	if [[ ${bin_libdir} != $(get_libdir) ]]; then
+		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+		# moving the dir itself is not strictly needed
+		# but then USE=binary would result in installing
+		# in '${bin_libdir}'
+		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
+			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
+			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
+			"${WORKDIR}/usr/bin/hsc2hs" \
+			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
+			"$gp_back" \
+			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
+	fi
+
+	# Relocate from /usr to ${EPREFIX}/usr
+	relocate_path "/usr" "${to}/usr" \
+		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
+		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
+		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
+		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
+		"${WORKDIR}/usr/bin/hp2ps" \
+		"${WORKDIR}/usr/bin/hpc" \
+		"${WORKDIR}/usr/bin/hsc2hs" \
+		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
+		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
+
+	# this one we will use to regenerate cache
+	# so it should point to current tree location
+	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+	if use prefix; then
+		hprefixify "${bin_libpath}"/${PN}*/settings
+	fi
+
+	# regenerate the binary package cache
+	"$gp_back" recache || die "failed to update cache after relocation"
+	rm "$gp_back"
+}
+
+ghc-check-reqs() {
+	# These are pessimistic values (slightly bigger than worst-case)
+	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
+	# numbers on various arches.
+	CHECKREQS_DISK_BUILD=8G
+	CHECKREQS_DISK_USR=2G
+	# USE=binary roughly takes
+	use binary && CHECKREQS_DISK_BUILD=4G
+
+	"$@"
+}
+
+pkg_pretend() {
+	ghc-check-reqs check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	ghc-check-reqs check-reqs_pkg_setup
+
+	# quiet portage about prebuilt binaries
+	use binary && QA_PREBUILT="*"
+
+	[[ ${MERGE_TYPE} == binary ]] && return
+
+	if use ghcbootstrap; then
+		ewarn "You requested ghc bootstrapping, this is usually only used"
+		ewarn "by Gentoo developers to make binary .tbz2 packages."
+
+		[[ -z $(type -P ghc) ]] && \
+			die "Could not find a ghc to bootstrap with."
+	else
+		if ! yet_binary; then
+			eerror "Please try emerging with USE=ghcbootstrap and report build"
+			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
+			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
+		fi
+	fi
+}
+
+src_unpack() {
+	# Create the ${S} dir if we're using the binary version
+	use binary && mkdir "${S}"
+
+	# the Solaris and Darwin binaries from ghc (maeder) need to be
+	# unpacked separately, so prevent them from being unpacked
+	local ONLYA=${A}
+	case ${CHOST} in
+		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
+	esac
+	unpack ${ONLYA}
+}
+
+src_prepare() {
+	ghc_setup_cflags
+
+	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+		# See bug #313635.
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
+
+		# allow hardened users use vanilla binary to bootstrap ghc
+		# ghci uses mmap with rwx protection at it implements dynamic
+		# linking on it's own (bug #299709)
+		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
+	fi
+
+	if use binary; then
+		if use prefix; then
+			relocate_ghc "${EPREFIX}"
+		fi
+
+		# Move unpacked files to the expected place
+		mv "${WORKDIR}/usr" "${S}"
+		eapply_user
+	else
+		if ! use ghcbootstrap; then
+			case ${CHOST} in
+				*-darwin* | *-solaris*)
+				# UPDATE ME for ghc-7
+				mkdir "${WORKDIR}"/ghc-bin-installer || die
+				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
+				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
+				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
+				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
+				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
+				popd > /dev/null
+
+				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
+				# fix the binaries so they run, on Solaris we need an
+				# LD_LIBRARY_PATH which has our prefix libdirs, on
+				# Darwin we need to replace the frameworks with our libs
+				# from the prefix fix before installation, because some
+				# of the tools are actually used during configure/make
+				if [[ ${CHOST} == *-solaris* ]] ; then
+					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
+				elif [[ ${CHOST} == *-darwin* ]] ; then
+					local readline_framework=GNUreadline.framework/GNUreadline
+					local gmp_framework=/opt/local/lib/libgmp.10.dylib
+					local ncurses_file=/opt/local/lib/libncurses.5.dylib
+					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
+						install_name_tool -change \
+							${readline_framework} \
+							"${EPREFIX}"/lib/libreadline.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${gmp_framework} \
+							"${EPREFIX}"/usr/lib/libgmp.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${ncurses_file} \
+							"${EPREFIX}"/usr/lib/libncurses.dylib \
+							${binary} || die
+					done
+					# we don't do frameworks!
+					sed -i \
+						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
+						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
+						rts/package.conf.in || die
+				fi
+
+				# it is autoconf, but we really don't want to give it too
+				# many arguments, in fact we do the make in-place anyway
+				./configure --prefix="${WORKDIR}"/usr || die
+				make install || die
+				popd > /dev/null
+				;;
+				*)
+				relocate_ghc "${WORKDIR}"
+				;;
+			esac
+		fi
+
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${S}/ghc/ghc.wrapper"
+
+		cd "${S}" # otherwise eapply will break
+
+		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
+		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+		eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
+		eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
+		eapply "${FILESDIR}"/${PN}-8.6.5-numa.patch
+		eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
+
+		# a bunch of crosscompiler patches
+		# needs newer version:
+		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+
+		# mingw32 target
+		pushd "${S}/libraries/Win32"
+			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
+		popd
+
+		bump_libs
+
+		eapply_user
+		# as we have changed the build system
+		eautoreconf
+	fi
+}
+
+src_configure() {
+	if ! use binary; then
+		# initialize build.mk
+		echo '# Gentoo changes' > mk/build.mk
+
+		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
+		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+
+		# We also need to use the GHC_FLAGS flags when building ghc itself
+		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
+		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
+		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
+		# Speed up initial Cabal bootstrap
+		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
+
+		# We can't depend on haddock except when bootstrapping when we
+		# must build docs and include them into the binary .tbz2 package
+		# app-text/dblatex is not in portage, can not build PDF or PS
+		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
+		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
+		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
+
+		# this controls presence on 'xhtml' and 'haddock' in final install
+		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
+
+		# not used outside of ghc's test
+		if [[ -n ${GHC_BUILD_DPH} ]]; then
+				echo "BUILD_DPH = YES" >> mk/build.mk
+			else
+				echo "BUILD_DPH = NO" >> mk/build.mk
+		fi
+
+		# Any non-native build has to skip as it needs
+		# target haddock binary to be runnabine.
+		if ! is_native; then
+			# disable docs generation as it requires running stage2
+			echo "HADDOCK_DOCS=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
+		fi
+
+		if is_crosscompile; then
+			# Install ghc-stage1 crosscompiler instead of
+			# ghc-stage2 cross-built compiler.
+			echo "Stage1Only=YES" >> mk/build.mk
+		fi
+
+		# allows overriding build flavours for libraries:
+		# v   - vanilla (static libs)
+		# p   - profiled
+		# dyn - shared libraries
+		# example: GHC_LIBRARY_WAYS="v dyn"
+		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
+			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
+		fi
+		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
+
+		# Get ghc from the unpacked binary .tbz2
+		# except when bootstrapping we just pick ghc up off the path
+		if ! use ghcbootstrap; then
+			export PATH="${WORKDIR}/usr/bin:${PATH}"
+		fi
+
+		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
+
+		# don't strip anything. Very useful when stage2 SIGSEGVs on you
+		echo "STRIP_CMD = :" >> mk/build.mk
+
+		local econf_args=()
+
+		# GHC embeds toolchain it was built by and uses it later.
+		# Don't allow things like ccache or versioned binary slip.
+		# We use stable thing across gcc upgrades.
+		# User can use EXTRA_ECONF=CC=... to override this default.
+		econf_args+=(
+			AR=${CTARGET}-ar
+			CC=${CTARGET}-gcc
+			# these should be inferred by GHC but ghc defaults
+			# to using bundled tools on windows.
+			Windres=${CTARGET}-windres
+			DllWrap=${CTARGET}-dllwrap
+			# we set the linker explicitly below
+			--disable-ld-override
+		)
+		case ${CTARGET} in
+			arm*)
+				# ld.bfd-2.28 does not work for ghc. Force ld.gold
+				# instead. This should be removed once gentoo gets
+				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
+				econf_args+=(LD=${CTARGET}-ld.gold)
+			;;
+			sparc*)
+				# ld.gold-2.28 does not work for ghc. Force ld.bfd
+				# instead. This should be removed once gentoo gets
+				# a fix for missing --no-relax support bug:
+				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
+				econf_args+=(LD=${CTARGET}-ld.bfd)
+			;;
+			*)
+				econf_args+=(LD=${CTARGET}-ld)
+		esac
+
+		if [[ ${CBUILD} != ${CHOST} ]]; then
+			# GHC bug: ghc claims not to support cross-building.
+			# It does, but does not distinct --host= value
+			# for stage1 and stage2 compiler.
+			econf_args+=(--host=${CBUILD})
+		fi
+
+		if use ghcmakebinary; then
+			# When building booting libary we are trying to
+			# bundle or restrict most of external depends
+			# with unstable ABI:
+			#  - embed libffi (default GHC behaviour)
+			#  - disable ncurses support for ghci (via haskeline)
+			#    https://bugs.gentoo.org/557478
+			#  - disable ncurses support for ghc-pkg
+			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
+			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
+		elif is_native; then
+			# using ${GTARGET}'s libffi is not supported yet:
+			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
+			econf_args+=(--with-system-libffi)
+			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+		fi
+
+		einfo "Final mk/build.mk:"
+		cat mk/build.mk || die
+
+		econf ${econf_args[@]} \
+			--enable-bootstrap-with-devel-snapshot \
+			$(use elfutils && echo --enable-dwarf-unwind) \
+			$(use_enable numa)
+
+		if [[ ${PV} == *9999* ]]; then
+			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+			GHC_P=${PN}-${GHC_PV}
+		fi
+	fi # ! use binary
+}
+
+src_compile() {
+	if ! use binary; then
+		# Stage1Only crosscompiler does not build stage2
+		if ! is_crosscompile; then
+			# 1. build/pax-mark compiler binary first
+			emake ghc/stage2/build/tmp/ghc-stage2
+			# 2. pax-mark (bug #516430)
+			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
+			# 2. build/pax-mark haddock using ghc-stage2
+			if is_native; then
+				# non-native build does not build haddock
+				# due to HADDOCK_DOCS=NO, but it could.
+				emake utils/haddock/dist/build/tmp/haddock
+				pax-mark -m utils/haddock/dist/build/tmp/haddock
+			fi
+		fi
+		# 3. and then all the rest
+		emake all
+	fi # ! use binary
+}
+
+src_test() {
+	# TODO: deal with:
+	#    - sandbox (pollutes environment)
+	#    - extra packages (to extend testsuite coverage)
+	# bits are taken from 'validate'
+	local make_test_target='test' # can be fulltest
+	# not 'emake' as testsuite uses '$MAKE' without jobserver available
+	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
+}
+
+src_install() {
+	if use binary; then
+		use prefix && mkdir -p "${ED}"
+		mv "${S}/usr" "${ED}"
+	else
+		[[ -f VERSION ]] || emake VERSION
+
+		# -j1 due to a rare race in install script:
+		#    make --no-print-directory -f ghc.mk phase=final install
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
+		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
+		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
+		#    /usr/bin/install: cannot create regular file \
+		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
+		emake -j1 install DESTDIR="${D}"
+
+		# Skip for cross-targets as they all share target location:
+		# /usr/share/doc/ghc-9999/
+		if ! is_crosscompile; then
+			dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
+		fi
+
+		# rename ghc-shipped files to avoid collision
+		# of external packages. Motivating example:
+		#  user had installed:
+		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
+		#      dev-haskell/transformers-0.4.2.0
+		#  then user tried to update to
+		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
+		#  this will lead to single .conf file collision.
+		local shipped_conf renamed_conf
+		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+		for shipped_conf in "${package_confdir}"/*.conf; do
+			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
+			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
+			mv "${shipped_conf}" "${renamed_conf}" || die
+		done
+
+		# remove link, but leave 'haddock-${GHC_P}'
+		rm -f "${ED}"/usr/bin/$(cross)haddock
+
+		if ! is_crosscompile; then
+			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
+			newbashcomp utils/completion/ghc.bash         ghc
+		fi
+	fi
+
+	# path to the package.cache
+	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+	PKGCACHE="${package_confdir}"/package.cache
+	# copy the package.conf.d, including timestamp, save it so we can help
+	# users that have a broken package.conf.d
+	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
+
+	# copy the package.conf, including timestamp, save it so we later can put it
+	# back before uninstalling, or when upgrading.
+	cp -p "${PKGCACHE}"{,.shipped} \
+		|| die "failed to copy package.conf.d/package.cache"
+
+	if is_crosscompile; then
+		# When we build a cross-compiler the layout is the following:
+		#     usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
+		# but
+		#     usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
+		# containst host binaries (modulo bugs).
+
+		# Portage's stripping mechanism does not skip stripping
+		# foreign binaries. This frequently causes binaries to be
+		# broken.
+		#
+		# Thus below we disable stripping of target libraries and allow
+		# stripping hosts executables.
+		dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
+		dostrip    "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
+	fi
+}
+
+pkg_preinst() {
+	# have we got an earlier version of ghc installed?
+	if has_version "<${CATEGORY}/${PF}"; then
+		haskell_updater_warn="1"
+	fi
+}
+
+pkg_postinst() {
+	ghc-reregister
+
+	# path to the package.cache
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+
+	# give the cache a new timestamp, it must be as recent as
+	# the package.conf.d directory.
+	touch "${PKGCACHE}"
+
+	if [[ "${haskell_updater_warn}" == "1" ]]; then
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+		ewarn "You have just upgraded from an older version of GHC."
+		ewarn "You may have to run"
+		ewarn "      'haskell-updater'"
+		ewarn "to rebuild all ghc-based Haskell libraries."
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+	fi
+}
+
+pkg_prerm() {
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+	rm -rf "${PKGCACHE}"
+
+	cp -p "${PKGCACHE}"{.shipped,}
+}
+
+pkg_postrm() {
+	ghc-package_pkg_postrm
+}


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2020-03-17  3:00 Matt Turner
  0 siblings, 0 replies; 92+ messages in thread
From: Matt Turner @ 2020-03-17  3:00 UTC (permalink / raw
  To: gentoo-commits

commit:     b171e42ecc2668ce265d8612b8c7713cdbc1b452
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 17 02:59:59 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Mar 17 03:00:34 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b171e42e

dev-lang/ghc: Drop alpha keywords

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 dev-lang/ghc/ghc-7.10.3.ebuild | 2 +-
 dev-lang/ghc/ghc-7.8.4.ebuild  | 2 +-
 dev-lang/ghc/ghc-8.0.2.ebuild  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
index 7726e119c3c..54f5392481a 100644
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -72,7 +72,7 @@ BUMP_LIBRARIES=(
 
 LICENSE="BSD"
 SLOT="0/${PV}"
-KEYWORDS="~alpha amd64 ~ia64 ~ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
+KEYWORDS="amd64 ~ia64 ~ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
 IUSE="doc ghcbootstrap ghcmakebinary +gmp"
 IUSE+=" binary"
 IUSE+=" elibc_glibc" # system stuff

diff --git a/dev-lang/ghc/ghc-7.8.4.ebuild b/dev-lang/ghc/ghc-7.8.4.ebuild
index b368f87ec19..b8865b2c70e 100644
--- a/dev-lang/ghc/ghc-7.8.4.ebuild
+++ b/dev-lang/ghc/ghc-7.8.4.ebuild
@@ -65,7 +65,7 @@ S="${WORKDIR}"/${GHC_P}
 SRC_URI+=" https://dev.gentoo.org/~slyfox/distfiles/${P}-ia64-CLOSUREs-regenerated.patch.gz"
 LICENSE="BSD"
 SLOT="0/${PV}"
-KEYWORDS="~alpha amd64 ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
+KEYWORDS="amd64 ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
 IUSE="doc ghcbootstrap ghcmakebinary +gmp"
 IUSE+=" binary"
 IUSE+=" elibc_glibc" # system stuff

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index 85381737627..f9488abb75c 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -71,7 +71,7 @@ BUMP_LIBRARIES=(
 
 LICENSE="BSD"
 SLOT="0/${PV}"
-KEYWORDS="~alpha amd64 ia64 x86 ~amd64-linux ~x86-linux"
+KEYWORDS="amd64 ia64 x86 ~amd64-linux ~x86-linux"
 IUSE="doc ghcbootstrap ghcmakebinary +gmp +profile"
 IUSE+=" binary"
 


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2020-03-25 22:31 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2020-03-25 22:31 UTC (permalink / raw
  To: gentoo-commits

commit:     82f70e8a235f8afe4d81aedee458a2586acee452
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 25 22:31:26 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Mar 25 22:31:26 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82f70e8a

dev-lang/ghc: switch virtual/libffi to dev-libs/libffi

Package-Manager: Portage-2.3.95, Repoman-2.3.21
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/ghc-7.10.3.ebuild | 4 ++--
 dev-lang/ghc/ghc-7.8.4.ebuild  | 2 +-
 dev-lang/ghc/ghc-8.0.2.ebuild  | 2 +-
 dev-lang/ghc/ghc-8.10.1.ebuild | 2 +-
 dev-lang/ghc/ghc-8.2.1.ebuild  | 4 ++--
 dev-lang/ghc/ghc-8.2.2.ebuild  | 4 ++--
 dev-lang/ghc/ghc-8.4.1.ebuild  | 4 ++--
 dev-lang/ghc/ghc-8.4.2.ebuild  | 4 ++--
 dev-lang/ghc/ghc-8.4.3.ebuild  | 4 ++--
 dev-lang/ghc/ghc-8.6.4.ebuild  | 4 ++--
 dev-lang/ghc/ghc-8.6.5.ebuild  | 2 +-
 dev-lang/ghc/ghc-8.8.1.ebuild  | 2 +-
 dev-lang/ghc/ghc-8.8.2.ebuild  | 2 +-
 13 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
index 54f5392481a..88f76929978 100644
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -81,7 +81,7 @@ RDEPEND="
 	>=dev-lang/perl-5.6.1
 	>=dev-libs/gmp-5:=
 	sys-libs/ncurses:0=[unicode]
-	!ghcmakebinary? ( virtual/libffi:= )
+	!ghcmakebinary? ( dev-libs/libffi:= )
 "
 
 # This set of dependencies is needed to run

diff --git a/dev-lang/ghc/ghc-7.8.4.ebuild b/dev-lang/ghc/ghc-7.8.4.ebuild
index b8865b2c70e..f15723770fd 100644
--- a/dev-lang/ghc/ghc-7.8.4.ebuild
+++ b/dev-lang/ghc/ghc-7.8.4.ebuild
@@ -74,7 +74,7 @@ RDEPEND="
 	>=dev-lang/perl-5.6.1
 	>=dev-libs/gmp-5:=
 	sys-libs/ncurses:0=[unicode]
-	!ghcmakebinary? ( virtual/libffi:= )
+	!ghcmakebinary? ( dev-libs/libffi:= )
 "
 
 PREBUILT_BINARY_DEPENDS="

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index f9488abb75c..4c292fda10a 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -79,7 +79,7 @@ RDEPEND="
 	>=dev-lang/perl-5.6.1
 	dev-libs/gmp:0=
 	sys-libs/ncurses:0=[unicode]
-	!ghcmakebinary? ( virtual/libffi:= )
+	!ghcmakebinary? ( dev-libs/libffi:= )
 "
 
 # This set of dependencies is needed to run

diff --git a/dev-lang/ghc/ghc-8.10.1.ebuild b/dev-lang/ghc/ghc-8.10.1.ebuild
index c1bb998ba2c..574e2aaec41 100644
--- a/dev-lang/ghc/ghc-8.10.1.ebuild
+++ b/dev-lang/ghc/ghc-8.10.1.ebuild
@@ -85,7 +85,7 @@ RDEPEND="
 	dev-libs/gmp:0=
 	sys-libs/ncurses:0=[unicode]
 	elfutils? ( dev-libs/elfutils )
-	!ghcmakebinary? ( virtual/libffi:= )
+	!ghcmakebinary? ( dev-libs/libffi:= )
 	numa? ( sys-process/numactl )
 "
 

diff --git a/dev-lang/ghc/ghc-8.2.1.ebuild b/dev-lang/ghc/ghc-8.2.1.ebuild
index 266b59e2bfe..c701609e940 100644
--- a/dev-lang/ghc/ghc-8.2.1.ebuild
+++ b/dev-lang/ghc/ghc-8.2.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -75,7 +75,7 @@ RDEPEND="
 	>=dev-lang/perl-5.6.1
 	dev-libs/gmp:0=
 	sys-libs/ncurses:0=[unicode]
-	!ghcmakebinary? ( virtual/libffi:= )
+	!ghcmakebinary? ( dev-libs/libffi:= )
 "
 
 # This set of dependencies is needed to run

diff --git a/dev-lang/ghc/ghc-8.2.2.ebuild b/dev-lang/ghc/ghc-8.2.2.ebuild
index 6db8290ea34..7304fe4bcc2 100644
--- a/dev-lang/ghc/ghc-8.2.2.ebuild
+++ b/dev-lang/ghc/ghc-8.2.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -75,7 +75,7 @@ RDEPEND="
 	>=dev-lang/perl-5.6.1
 	dev-libs/gmp:0=
 	sys-libs/ncurses:0=[unicode]
-	!ghcmakebinary? ( virtual/libffi:= )
+	!ghcmakebinary? ( dev-libs/libffi:= )
 "
 
 # This set of dependencies is needed to run

diff --git a/dev-lang/ghc/ghc-8.4.1.ebuild b/dev-lang/ghc/ghc-8.4.1.ebuild
index 2fb1025b91f..bb77c83651a 100644
--- a/dev-lang/ghc/ghc-8.4.1.ebuild
+++ b/dev-lang/ghc/ghc-8.4.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -75,7 +75,7 @@ RDEPEND="
 	>=dev-lang/perl-5.6.1
 	dev-libs/gmp:0=
 	sys-libs/ncurses:0=[unicode]
-	!ghcmakebinary? ( virtual/libffi:= )
+	!ghcmakebinary? ( dev-libs/libffi:= )
 "
 
 # This set of dependencies is needed to run

diff --git a/dev-lang/ghc/ghc-8.4.2.ebuild b/dev-lang/ghc/ghc-8.4.2.ebuild
index 529e6682ff9..1560843584d 100644
--- a/dev-lang/ghc/ghc-8.4.2.ebuild
+++ b/dev-lang/ghc/ghc-8.4.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -75,7 +75,7 @@ RDEPEND="
 	>=dev-lang/perl-5.6.1
 	dev-libs/gmp:0=
 	sys-libs/ncurses:0=[unicode]
-	!ghcmakebinary? ( virtual/libffi:= )
+	!ghcmakebinary? ( dev-libs/libffi:= )
 "
 
 # This set of dependencies is needed to run

diff --git a/dev-lang/ghc/ghc-8.4.3.ebuild b/dev-lang/ghc/ghc-8.4.3.ebuild
index 23888261337..8d8af426473 100644
--- a/dev-lang/ghc/ghc-8.4.3.ebuild
+++ b/dev-lang/ghc/ghc-8.4.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -75,7 +75,7 @@ RDEPEND="
 	>=dev-lang/perl-5.6.1
 	dev-libs/gmp:0=
 	sys-libs/ncurses:0=[unicode]
-	!ghcmakebinary? ( virtual/libffi:= )
+	!ghcmakebinary? ( dev-libs/libffi:= )
 "
 
 # This set of dependencies is needed to run

diff --git a/dev-lang/ghc/ghc-8.6.4.ebuild b/dev-lang/ghc/ghc-8.6.4.ebuild
index 9400b701afb..2d192b4e58e 100644
--- a/dev-lang/ghc/ghc-8.6.4.ebuild
+++ b/dev-lang/ghc/ghc-8.6.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -81,7 +81,7 @@ RDEPEND="
 	>=dev-lang/perl-5.6.1
 	dev-libs/gmp:0=
 	sys-libs/ncurses:0=[unicode]
-	!ghcmakebinary? ( virtual/libffi:= )
+	!ghcmakebinary? ( dev-libs/libffi:= )
 "
 
 # This set of dependencies is needed to run

diff --git a/dev-lang/ghc/ghc-8.6.5.ebuild b/dev-lang/ghc/ghc-8.6.5.ebuild
index 2e4e523c095..e95768813ea 100644
--- a/dev-lang/ghc/ghc-8.6.5.ebuild
+++ b/dev-lang/ghc/ghc-8.6.5.ebuild
@@ -85,7 +85,7 @@ RDEPEND="
 	dev-libs/gmp:0=
 	sys-libs/ncurses:0=[unicode]
 	elfutils? ( dev-libs/elfutils )
-	!ghcmakebinary? ( virtual/libffi:= )
+	!ghcmakebinary? ( dev-libs/libffi:= )
 	numa? ( sys-process/numactl )
 "
 

diff --git a/dev-lang/ghc/ghc-8.8.1.ebuild b/dev-lang/ghc/ghc-8.8.1.ebuild
index 7b8c9321190..8d13a22eea7 100644
--- a/dev-lang/ghc/ghc-8.8.1.ebuild
+++ b/dev-lang/ghc/ghc-8.8.1.ebuild
@@ -84,7 +84,7 @@ RDEPEND="
 	dev-libs/gmp:0=
 	sys-libs/ncurses:0=[unicode]
 	elfutils? ( dev-libs/elfutils )
-	!ghcmakebinary? ( virtual/libffi:= )
+	!ghcmakebinary? ( dev-libs/libffi:= )
 	numa? ( sys-process/numactl )
 "
 

diff --git a/dev-lang/ghc/ghc-8.8.2.ebuild b/dev-lang/ghc/ghc-8.8.2.ebuild
index 0726cf1c9bc..4d206d287dd 100644
--- a/dev-lang/ghc/ghc-8.8.2.ebuild
+++ b/dev-lang/ghc/ghc-8.8.2.ebuild
@@ -84,7 +84,7 @@ RDEPEND="
 	dev-libs/gmp:0=
 	sys-libs/ncurses:0=[unicode]
 	elfutils? ( dev-libs/elfutils )
-	!ghcmakebinary? ( virtual/libffi:= )
+	!ghcmakebinary? ( dev-libs/libffi:= )
 	numa? ( sys-process/numactl )
 "
 


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2020-04-11  8:12 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2020-04-11  8:12 UTC (permalink / raw
  To: gentoo-commits

commit:     31f9719907f18e63ae2bab0de942fa6007701885
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 11 08:11:05 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Apr 11 08:12:10 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31f97199

dev-lang/ghc: bump up to 8.8.3

Package-Manager: Portage-2.3.98, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/Manifest         |   2 +
 dev-lang/ghc/ghc-8.8.3.ebuild | 805 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 807 insertions(+)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 31b52d5da13..5569ea1b8f2 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -18,6 +18,8 @@ DIST ghc-8.8.1-src.tar.xz 28634672 BLAKE2B 3a012db5d9798efddf806542a88cd9fef1d09
 DIST ghc-8.8.1-testsuite.tar.xz 1959220 BLAKE2B 8606a6439f7d5b4c837b2325c4ef5705dbcea17c4b59daf7aafd0de68e55179bb2c03ce7a4f376398b185b6dbfb361d18592756558461ee43722d2142370d815 SHA512 e13b651c60deb86522efbfe8aa42679cc81a413475f70580d9ef28dbb711617c523951441a30fb46f3be9418c4c0bb4dbc522b04aaa51313afd2d39027696c30
 DIST ghc-8.8.2-src.tar.xz 19365816 BLAKE2B 85dbd2a4696755f43c28ec578d5ecfe706b27ba7f640f66b464b7aa7b959ca5f02b8b51d130299c30d024c46b9ce6a115606bde46be400fb8ee221ff18177d65 SHA512 11eec0bc03254ea848a5c86bc3e2da317801a1227dd91406a157e11cb675891d77d61177b740b6df88bd823063f6cb2af5a928a7540e25392d9d0769ea121069
 DIST ghc-8.8.2-testsuite.tar.xz 1976924 BLAKE2B cec6c5dab1782332aca6364f995cffc1e9f3506649c3410b6eaa220e665b66f033dfad8ab6cae7677e15a6a1bd51237ed491b7fd04a19fa1d4f9cd8904617c64 SHA512 0fc41a0b3cb5f172442863c8a3b1cf549f2f660a070965e6083baa2c90c27b6a7c17550625105799010f4329dc189f4e392c86991844a9704a3e3a72a6d4e2f5
+DIST ghc-8.8.3-src.tar.xz 19343672 BLAKE2B 4b33b4a386926f0ee625c7c18a3997f02bf664b8f553d7cdfb231553bf9510f44f72c0b46911539f6209f28ecab52ee520e61e2c9e750cc217b170b3596ffca0 SHA512 7db0d820a288e56bd32935cc03584295900605f6e7cac6fe6adcb3ec6c24d8d2cebf7a8efa421f2d2fa192602d7f24dfad1ddeeba252455e4cb8baa9889dcaa9
+DIST ghc-8.8.3-testsuite.tar.xz 1965236 BLAKE2B 9cd10769336513284d8e0fbca1c3fce9e298ec67eb63eb10d41087fccba0f6281f1509aee684778fd23710ffe65843c43b4042e6692940af67766056c4503273 SHA512 4ebf3eabcd7591762dfcf45716b06293fb14c00b51307f7788c90dcf4e01f67e6bbb7a887b74d8d30272919486441ac236b42a54c4874aac69d90391b76f81c9
 DIST ghc-bin-7.10.3-alpha.tbz2 183558856 BLAKE2B 2bb02aafa49c6a91bec016e8bec2d07257d602e53c9df55792ec6fbbf8e2e46de1d5f3f72c0ccf74d6bd7f7987f53412063ccb02ae85455fce11fa928cbf5291 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230
 DIST ghc-bin-7.10.3-amd64.tbz2 112040431 BLAKE2B 3e59b70ca309a1cd704266c54a7983f9a58362bf700ced89c5649c780c664c650ec091e14026a7b84e339d2ebff39eba1772eebcd9fb4b99b9c99d179453d5cc SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558
 DIST ghc-bin-7.10.3-ia64.tbz2 238680956 BLAKE2B 08593718d376051edfb0c86131e54dafc5c15056757fbeef90c653a7d217e49ff34ffaf7cd4083144c9277e73a290b822a0f889aaf806341375708e4b92654b2 SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5

diff --git a/dev-lang/ghc/ghc-8.8.3.ebuild b/dev-lang/ghc/ghc-8.8.3.ebuild
new file mode 100644
index 00000000000..d78855842ff
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.8.3.ebuild
@@ -0,0 +1,805 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+		export CTARGET=${CATEGORY/cross-}
+	fi
+fi
+
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib multiprocessing pax-utils toolchain-funcs prefix
+inherit check-reqs
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="https://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+BIN_PV=${PV}
+# sorted!
+#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+#arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+	case "${ARCH}" in
+		#alpha) return 0 ;;
+		#arm64) return 0 ;;
+		#arm) return 0 ;;
+		#amd64) return 0 ;;
+		#ia64) return 0 ;;
+		#ppc) return 0 ;;
+		#ppc64)
+		#	use big-endian && return 1
+		#	return 0
+		#	;;
+		#sparc) return 0 ;;
+		#x86) return 0 ;;
+		*) return 1 ;;
+	esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=8.6.0.20180810 # uncomment only for -alpha, -beta, -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? (
+	https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
+	test? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
+)"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+
+BUMP_LIBRARIES=(
+	# "hackage-name          hackage-version"
+)
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS=""
+IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
+IUSE+=" binary"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	>=dev-lang/perl-5.6.1
+	dev-libs/gmp:0=
+	sys-libs/ncurses:0=[unicode]
+	elfutils? ( dev-libs/elfutils )
+	!ghcmakebinary? ( dev-libs/libffi:= )
+	numa? ( sys-process/numactl )
+"
+
+# This set of dependencies is needed to run
+# prebuilt ghc. We specifically avoid ncurses
+# dependency with:
+#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
+PREBUILT_BINARY_DEPENDS="
+	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+"
+# This set of dependencies is needed to install
+# ghc[binary] in system. terminfo package is linked
+# against ncurses.
+PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
+	sys-libs/ncurses:0/6
+"
+
+RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
+
+DEPEND="${RDEPEND}
+	doc? ( app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5
+		app-text/docbook-xsl-stylesheets
+		dev-python/sphinx
+		>=dev-libs/libxslt-1.1.2 )
+	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
+
+REQUIRED_USE="?? ( ghcbootstrap binary )"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+	[[ ${CHOST} != ${CTARGET} ]]
+}
+
+is_native() {
+	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
+}
+
+if ! is_crosscompile; then
+	PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
+fi
+
+# returns tool prefix for crosscompiler.
+# Example:
+#  CTARGET=armv7a-unknown-linux-gnueabi
+#  CHOST=x86_64-pc-linux-gnu
+#    "armv7a-unknown-linux-gnueabi-"
+#  CTARGET=${CHOST}
+#    ""
+# Used in tools and library prefix:
+#    "${ED}"/usr/bin/$(cross)haddock
+#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+
+cross() {
+	if is_crosscompile; then
+		echo "${CTARGET}-"
+	else
+		echo ""
+	fi
+}
+
+append-ghc-cflags() {
+	local persistent compile assemble link
+	local flag ghcflag
+
+	for flag in $*; do
+		case ${flag} in
+			persistent)	persistent="yes";;
+			compile)	compile="yes";;
+			assemble)	assemble="yes";;
+			link)		link="yes";;
+			*)
+				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				;;
+		esac
+	done
+}
+
+# $1 - lib name (under libraries/)
+# $2 - lib version
+# example: bump_lib "transformers" "0.4.2.0"
+bump_lib() {
+	local pn=$1 pv=$2
+	local p=${pn}-${pv}
+	local f
+
+	einfo "Bumping ${pn} up to ${pv}"
+
+	for f in ghc.mk GNUmakefile; do
+		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
+	done
+	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
+	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
+}
+
+update_SRC_URI() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
+	done
+}
+
+update_SRC_URI
+
+bump_libs() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		bump_lib "${pn}" "${pv}"
+	done
+}
+
+ghc_setup_cflags() {
+	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
+	if ! is_native; then
+		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
+		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
+		einfo "Crosscompiling mode:"
+		einfo "   CHOST:   ${CHOST}"
+		einfo "   CTARGET: ${CTARGET}"
+		einfo "   CFLAGS:  ${CFLAGS}"
+		einfo "   LDFLAGS: ${LDFLAGS}"
+		einfo "   prefix: $(cross)"
+		return
+	fi
+	# We need to be very careful with the CFLAGS we ask ghc to pass through to
+	# gcc. There are plenty of flags which will make gcc produce output that
+	# breaks ghc in various ways. The main ones we want to pass through are
+	# -mcpu / -march flags. These are important for arches like alpha & sparc.
+	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
+	strip-flags
+	strip-unsupported-flags
+
+	# Cmm can't parse line numbers #482086
+	replace-flags -ggdb[3-9] -ggdb2
+
+	GHC_FLAGS=""
+	GHC_PERSISTENT_FLAGS=""
+	for flag in ${CFLAGS}; do
+		case ${flag} in
+
+			# Ignore extra optimisation (ghc passes -O to gcc anyway)
+			# -O2 and above break on too many systems
+			-O*) ;;
+
+			# Arch and ABI flags are what we're really after
+			-m*) append-ghc-cflags compile assemble ${flag};;
+
+			# Sometimes it's handy to see backtrace of RTS
+			# to get an idea what happens there
+			-g*) append-ghc-cflags compile ${flag};;
+
+			# Ignore all other flags, including all -f* flags
+		esac
+	done
+
+	for flag in ${LDFLAGS}; do
+		append-ghc-cflags link ${flag}
+	done
+
+	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
+	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
+	# options to gcc.
+	if is_native; then
+		# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
+		# are not built with fPIC, bug #606666
+		gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
+		tc-is-gcc && ver_test $(gcc-version) -ge 6.3 && if ! use ghcbootstrap; then
+			# gcc-6.3 has support for -no-pie upstream, but spelling differs from
+			# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
+			# hardened users try '-pie' in USE=ghcbootstrap mode.
+			append-ghc-cflags compile link -no-pie
+		fi
+
+		# prevent from failing to build unregisterised ghc:
+		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+	fi
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+	local from=$1
+	local   to=$2
+	shift 2
+	local file=
+	for file in "$@"
+	do
+		sed -i -e "s|$from|$to|g" \
+			"$file" || die "path relocation failed for '$file'"
+	done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+	local to=$1 ghc_v=${BIN_PV}
+
+	# libdir for prebuilt binary and for current system may mismatch
+	# It does for prefix installation for example: bug #476998
+	local bin_ghc_prefix=${WORKDIR}/usr
+	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+	# backup original script to use it later after relocation
+	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
+	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+	if [[ ${bin_libdir} != $(get_libdir) ]]; then
+		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+		# moving the dir itself is not strictly needed
+		# but then USE=binary would result in installing
+		# in '${bin_libdir}'
+		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
+			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
+			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
+			"${WORKDIR}/usr/bin/hsc2hs" \
+			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
+			"$gp_back" \
+			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
+	fi
+
+	# Relocate from /usr to ${EPREFIX}/usr
+	relocate_path "/usr" "${to}/usr" \
+		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
+		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
+		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
+		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
+		"${WORKDIR}/usr/bin/hp2ps" \
+		"${WORKDIR}/usr/bin/hpc" \
+		"${WORKDIR}/usr/bin/hsc2hs" \
+		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
+		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
+
+	# this one we will use to regenerate cache
+	# so it should point to current tree location
+	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+	if use prefix; then
+		hprefixify "${bin_libpath}"/${PN}*/settings
+	fi
+
+	# regenerate the binary package cache
+	"$gp_back" recache || die "failed to update cache after relocation"
+	rm "$gp_back"
+}
+
+ghc-check-reqs() {
+	# These are pessimistic values (slightly bigger than worst-case)
+	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
+	# numbers on various arches.
+	CHECKREQS_DISK_BUILD=8G
+	CHECKREQS_DISK_USR=2G
+	# USE=binary roughly takes
+	use binary && CHECKREQS_DISK_BUILD=4G
+
+	"$@"
+}
+
+pkg_pretend() {
+	ghc-check-reqs check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	ghc-check-reqs check-reqs_pkg_setup
+
+	# quiet portage about prebuilt binaries
+	use binary && QA_PREBUILT="*"
+
+	[[ ${MERGE_TYPE} == binary ]] && return
+
+	if use ghcbootstrap; then
+		ewarn "You requested ghc bootstrapping, this is usually only used"
+		ewarn "by Gentoo developers to make binary .tbz2 packages."
+
+		[[ -z $(type -P ghc) ]] && \
+			die "Could not find a ghc to bootstrap with."
+	else
+		if ! yet_binary; then
+			eerror "Please try emerging with USE=ghcbootstrap and report build"
+			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
+			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
+		fi
+	fi
+}
+
+src_unpack() {
+	# Create the ${S} dir if we're using the binary version
+	use binary && mkdir "${S}"
+
+	# the Solaris and Darwin binaries from ghc (maeder) need to be
+	# unpacked separately, so prevent them from being unpacked
+	local ONLYA=${A}
+	case ${CHOST} in
+		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
+	esac
+	unpack ${ONLYA}
+}
+
+src_prepare() {
+	ghc_setup_cflags
+
+	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+		# See bug #313635.
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
+
+		# allow hardened users use vanilla binary to bootstrap ghc
+		# ghci uses mmap with rwx protection at it implements dynamic
+		# linking on it's own (bug #299709)
+		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
+	fi
+
+	if use binary; then
+		if use prefix; then
+			relocate_ghc "${EPREFIX}"
+		fi
+
+		# Move unpacked files to the expected place
+		mv "${WORKDIR}/usr" "${S}"
+		eapply_user
+	else
+		if ! use ghcbootstrap; then
+			case ${CHOST} in
+				*-darwin* | *-solaris*)
+				# UPDATE ME for ghc-7
+				mkdir "${WORKDIR}"/ghc-bin-installer || die
+				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
+				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
+				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
+				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
+				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
+				popd > /dev/null
+
+				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
+				# fix the binaries so they run, on Solaris we need an
+				# LD_LIBRARY_PATH which has our prefix libdirs, on
+				# Darwin we need to replace the frameworks with our libs
+				# from the prefix fix before installation, because some
+				# of the tools are actually used during configure/make
+				if [[ ${CHOST} == *-solaris* ]] ; then
+					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
+				elif [[ ${CHOST} == *-darwin* ]] ; then
+					local readline_framework=GNUreadline.framework/GNUreadline
+					local gmp_framework=/opt/local/lib/libgmp.10.dylib
+					local ncurses_file=/opt/local/lib/libncurses.5.dylib
+					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
+						install_name_tool -change \
+							${readline_framework} \
+							"${EPREFIX}"/lib/libreadline.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${gmp_framework} \
+							"${EPREFIX}"/usr/lib/libgmp.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${ncurses_file} \
+							"${EPREFIX}"/usr/lib/libncurses.dylib \
+							${binary} || die
+					done
+					# we don't do frameworks!
+					sed -i \
+						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
+						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
+						rts/package.conf.in || die
+				fi
+
+				# it is autoconf, but we really don't want to give it too
+				# many arguments, in fact we do the make in-place anyway
+				./configure --prefix="${WORKDIR}"/usr || die
+				make install || die
+				popd > /dev/null
+				;;
+				*)
+				relocate_ghc "${WORKDIR}"
+				;;
+			esac
+		fi
+
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${S}/ghc/ghc.wrapper"
+
+		cd "${S}" # otherwise eapply will break
+
+		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
+		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+		eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
+		eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
+		eapply "${FILESDIR}"/${PN}-8.6.5-numa.patch
+		# rumors say this is fixed properly in 8.8.3. Let's check!
+		#eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
+
+		# a bunch of crosscompiler patches
+		# needs newer version:
+		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+
+		# mingw32 target
+		pushd "${S}/libraries/Win32"
+			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
+		popd
+
+		bump_libs
+
+		eapply_user
+		# as we have changed the build system
+		eautoreconf
+	fi
+}
+
+src_configure() {
+	if ! use binary; then
+		# initialize build.mk
+		echo '# Gentoo changes' > mk/build.mk
+
+		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
+		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+
+		# We also need to use the GHC_FLAGS flags when building ghc itself
+		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
+		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
+		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
+		# Speed up initial Cabal bootstrap
+		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
+
+		# We can't depend on haddock except when bootstrapping when we
+		# must build docs and include them into the binary .tbz2 package
+		# app-text/dblatex is not in portage, can not build PDF or PS
+		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
+		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
+		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
+
+		# this controls presence on 'xhtml' and 'haddock' in final install
+		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
+
+		# not used outside of ghc's test
+		if [[ -n ${GHC_BUILD_DPH} ]]; then
+				echo "BUILD_DPH = YES" >> mk/build.mk
+			else
+				echo "BUILD_DPH = NO" >> mk/build.mk
+		fi
+
+		# Any non-native build has to skip as it needs
+		# target haddock binary to be runnabine.
+		if ! is_native; then
+			# disable docs generation as it requires running stage2
+			echo "HADDOCK_DOCS=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
+		fi
+
+		if is_crosscompile; then
+			# Install ghc-stage1 crosscompiler instead of
+			# ghc-stage2 cross-built compiler.
+			echo "Stage1Only=YES" >> mk/build.mk
+		fi
+
+		# allows overriding build flavours for libraries:
+		# v   - vanilla (static libs)
+		# p   - profiled
+		# dyn - shared libraries
+		# example: GHC_LIBRARY_WAYS="v dyn"
+		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
+			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
+		fi
+		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
+
+		# Get ghc from the unpacked binary .tbz2
+		# except when bootstrapping we just pick ghc up off the path
+		if ! use ghcbootstrap; then
+			export PATH="${WORKDIR}/usr/bin:${PATH}"
+		fi
+
+		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
+
+		# don't strip anything. Very useful when stage2 SIGSEGVs on you
+		echo "STRIP_CMD = :" >> mk/build.mk
+
+		local econf_args=()
+
+		# GHC embeds toolchain it was built by and uses it later.
+		# Don't allow things like ccache or versioned binary slip.
+		# We use stable thing across gcc upgrades.
+		# User can use EXTRA_ECONF=CC=... to override this default.
+		econf_args+=(
+			AR=${CTARGET}-ar
+			CC=${CTARGET}-gcc
+			# these should be inferred by GHC but ghc defaults
+			# to using bundled tools on windows.
+			Windres=${CTARGET}-windres
+			DllWrap=${CTARGET}-dllwrap
+			# we set the linker explicitly below
+			--disable-ld-override
+		)
+		case ${CTARGET} in
+			arm*)
+				# ld.bfd-2.28 does not work for ghc. Force ld.gold
+				# instead. This should be removed once gentoo gets
+				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
+				econf_args+=(LD=${CTARGET}-ld.gold)
+			;;
+			sparc*)
+				# ld.gold-2.28 does not work for ghc. Force ld.bfd
+				# instead. This should be removed once gentoo gets
+				# a fix for missing --no-relax support bug:
+				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
+				econf_args+=(LD=${CTARGET}-ld.bfd)
+			;;
+			*)
+				econf_args+=(LD=${CTARGET}-ld)
+		esac
+
+		if [[ ${CBUILD} != ${CHOST} ]]; then
+			# GHC bug: ghc claims not to support cross-building.
+			# It does, but does not distinct --host= value
+			# for stage1 and stage2 compiler.
+			econf_args+=(--host=${CBUILD})
+		fi
+
+		if use ghcmakebinary; then
+			# When building booting libary we are trying to
+			# bundle or restrict most of external depends
+			# with unstable ABI:
+			#  - embed libffi (default GHC behaviour)
+			#  - disable ncurses support for ghci (via haskeline)
+			#    https://bugs.gentoo.org/557478
+			#  - disable ncurses support for ghc-pkg
+			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
+			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
+		elif is_native; then
+			# using ${GTARGET}'s libffi is not supported yet:
+			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
+			econf_args+=(--with-system-libffi)
+			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+		fi
+
+		einfo "Final mk/build.mk:"
+		cat mk/build.mk || die
+
+		econf ${econf_args[@]} \
+			--enable-bootstrap-with-devel-snapshot \
+			$(use elfutils && echo --enable-dwarf-unwind) \
+			$(use_enable numa)
+
+		if [[ ${PV} == *9999* ]]; then
+			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+			GHC_P=${PN}-${GHC_PV}
+		fi
+	fi # ! use binary
+}
+
+src_compile() {
+	if ! use binary; then
+		# Stage1Only crosscompiler does not build stage2
+		if ! is_crosscompile; then
+			# 1. build/pax-mark compiler binary first
+			emake ghc/stage2/build/tmp/ghc-stage2
+			# 2. pax-mark (bug #516430)
+			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
+			# 2. build/pax-mark haddock using ghc-stage2
+			if is_native; then
+				# non-native build does not build haddock
+				# due to HADDOCK_DOCS=NO, but it could.
+				emake utils/haddock/dist/build/tmp/haddock
+				pax-mark -m utils/haddock/dist/build/tmp/haddock
+			fi
+		fi
+		# 3. and then all the rest
+		emake all
+	fi # ! use binary
+}
+
+src_test() {
+	# TODO: deal with:
+	#    - sandbox (pollutes environment)
+	#    - extra packages (to extend testsuite coverage)
+	# bits are taken from 'validate'
+	local make_test_target='test' # can be fulltest
+	# not 'emake' as testsuite uses '$MAKE' without jobserver available
+	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
+}
+
+src_install() {
+	if use binary; then
+		use prefix && mkdir -p "${ED}"
+		mv "${S}/usr" "${ED}"
+	else
+		[[ -f VERSION ]] || emake VERSION
+
+		# -j1 due to a rare race in install script:
+		#    make --no-print-directory -f ghc.mk phase=final install
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
+		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
+		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
+		#    /usr/bin/install: cannot create regular file \
+		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
+		emake -j1 install DESTDIR="${D}"
+
+		# Skip for cross-targets as they all share target location:
+		# /usr/share/doc/ghc-9999/
+		if ! is_crosscompile; then
+			dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
+		fi
+
+		# rename ghc-shipped files to avoid collision
+		# of external packages. Motivating example:
+		#  user had installed:
+		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
+		#      dev-haskell/transformers-0.4.2.0
+		#  then user tried to update to
+		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
+		#  this will lead to single .conf file collision.
+		local shipped_conf renamed_conf
+		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+		for shipped_conf in "${package_confdir}"/*.conf; do
+			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
+			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
+			mv "${shipped_conf}" "${renamed_conf}" || die
+		done
+
+		# remove link, but leave 'haddock-${GHC_P}'
+		rm -f "${ED}"/usr/bin/$(cross)haddock
+
+		if ! is_crosscompile; then
+			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
+			newbashcomp utils/completion/ghc.bash         ghc
+		fi
+	fi
+
+	# path to the package.cache
+	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+	PKGCACHE="${package_confdir}"/package.cache
+	# copy the package.conf.d, including timestamp, save it so we can help
+	# users that have a broken package.conf.d
+	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
+
+	# copy the package.conf, including timestamp, save it so we later can put it
+	# back before uninstalling, or when upgrading.
+	cp -p "${PKGCACHE}"{,.shipped} \
+		|| die "failed to copy package.conf.d/package.cache"
+
+	if is_crosscompile; then
+		# When we build a cross-compiler the layout is the following:
+		#     usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
+		# but
+		#     usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
+		# containst host binaries (modulo bugs).
+
+		# Portage's stripping mechanism does not skip stripping
+		# foreign binaries. This frequently causes binaries to be
+		# broken.
+		#
+		# Thus below we disable stripping of target libraries and allow
+		# stripping hosts executables.
+		dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
+		dostrip    "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
+	fi
+}
+
+pkg_preinst() {
+	# have we got an earlier version of ghc installed?
+	if has_version "<${CATEGORY}/${PF}"; then
+		haskell_updater_warn="1"
+	fi
+}
+
+pkg_postinst() {
+	ghc-reregister
+
+	# path to the package.cache
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+
+	# give the cache a new timestamp, it must be as recent as
+	# the package.conf.d directory.
+	touch "${PKGCACHE}"
+
+	if [[ "${haskell_updater_warn}" == "1" ]]; then
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+		ewarn "You have just upgraded from an older version of GHC."
+		ewarn "You may have to run"
+		ewarn "      'haskell-updater'"
+		ewarn "to rebuild all ghc-based Haskell libraries."
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+	fi
+}
+
+pkg_prerm() {
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+	rm -rf "${PKGCACHE}"
+
+	cp -p "${PKGCACHE}"{.shipped,}
+}
+
+pkg_postrm() {
+	ghc-package_pkg_postrm
+}


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2020-04-11 11:05 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2020-04-11 11:05 UTC (permalink / raw
  To: gentoo-commits

commit:     2abbf115887292dea02551e7945dd04412133d55
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 11 11:05:09 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Apr 11 11:05:09 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2abbf115

dev-lang/ghc: add x86 and amd64 binaries for 8.8.3 and 8.10.1

Package-Manager: Portage-2.3.98, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/Manifest          | 4 ++++
 dev-lang/ghc/ghc-8.10.1.ebuild | 8 ++++----
 dev-lang/ghc/ghc-8.8.3.ebuild  | 8 ++++----
 3 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 5569ea1b8f2..7822721586b 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -41,6 +41,8 @@ DIST ghc-bin-8.0.2-ia64-unknown-linux-gnu.tbz2 256581880 BLAKE2B 7a9b41fccf3a097
 DIST ghc-bin-8.0.2-ppc.tbz2 144760090 BLAKE2B 32410f3563f7f2555350806db460d2083c7248c57223c9c681d0b4913df942f023c7c1f5fda145179a524ee7ef105a9b8309ba87c20dc393a9f49151579b6767 SHA512 bc6bf8998064ffc1692c3bb83c44d1787760a3f4a1e6b79dedaefda5fe32b9052049a60f0ddd3c0b0bd24a722fb35e310e0189b3511721ff89d4d02b3d7c14bb
 DIST ghc-bin-8.0.2-ppc64.tbz2 117432068 BLAKE2B cae202f0d6e825127d543996b2fe7ae02578c47325674cbf22fddc53b1c4c9413f45c60d76ec3d07860cb8d0aae1ec792e4141822cc5c08ef9013308c5d29bf5 SHA512 0eaff0557b68649a15bbeb2019f46fa9e9e7b8a916aa210ab56888090a5b887d20d818e7987177bc6a8e7fde503de560026e6bb55fe39679b8b1ee13c6b7c4f9
 DIST ghc-bin-8.0.2-x86_64-pc-linux-gnu.tbz2 130852973 BLAKE2B 24d2032bbfc664d924800c1a317334e2342c8ec1e529178f9d1bb99bb4772a9cc100603bf70111b8cfafa715c1cccc643f115c77cf6adcdfb17d1f1735ee6682 SHA512 c36e0e2600fc7c284562a323d396a03062cb6e8fa63c353e672be61e76d2ec5c7698485e3a370a57cf512db9e5ba6a68338fff2ab404d9fe67b1a468ed72638f
+DIST ghc-bin-8.10.1-i686-pc-linux-gnu.tbz2 123398571 BLAKE2B 3650f9dbaaa5af684abad589953bcef5b1684a91a4cc2695d0ef735536057bb031231fe3d73dd74bc38a199f0890ef91764b551e5e158c120affc0d7bc3175b7 SHA512 52cc172de08ef30d6e89384e86eda1b8bbdef2bbff526041eb47d85d77b70ab49314ac7f33f18b40864c16fa546256f1b4c7964e65aa5d3cfbb7f9cbec505dc9
+DIST ghc-bin-8.10.1-x86_64-pc-linux-gnu.tbz2 122227601 BLAKE2B 84340866c70044eb1444a70b0cbed6814808037b697db28f567d2b14bb791cbe7d9bf2a327cc47ae85ce3c4970ba039854b4a6df44eb85cdc18040c5a4d15f4f SHA512 81df9de95aec47d60ad8d699756ad323eb525c3a16536fac8c6717e1754272061bd8d7d70cd38f5c509a2fc323305333e4f898c9b6dc27645521bb29ee218bdb
 DIST ghc-bin-8.2.1-i686-pc-linux-gnu.tbz2 96157437 BLAKE2B 2b9608845db8cea78db07209fa054b3b05085d5c3ac07cbe3de02a93c87fb0cff12b1820f08757221c59c8a0a9e7a5563c44266b181525d916825e5cf5bac34c SHA512 e891e76557fa61853e28829b8bedc4a6abb92954f90cc1ebcf22a13cc137556bbe9262e7398b7e1aedbabeb997916b008bf1561a52f16a569f3d58ea9404f41e
 DIST ghc-bin-8.2.1-x86_64-pc-linux-gnu.tbz2 97490496 BLAKE2B 3666ea70cb8b3645db071040d2069fe244042c11954b34e5d92aaa90132d2316c0ee8c176cd4e674772bea3b99df150404f62bd8745c046cdaf102ecf0a0fa54 SHA512 52630a185d0eab56bce0469a612a54109895bfee041ec362ced59a9b35ba3b9c185e86bc7dbf0a5939081d3626baa19fbb3306e36d1857530248a7b9bfc100bb
 DIST ghc-bin-8.2.2-i686-pc-linux-gnu.tbz2 96638908 BLAKE2B b470f838e77330969f162196b0f1035fa764f5d123687fbf67c14323280bfe55216af0e16f8b79c62f290905d96abc8bfafee650f8d27c81608853e78329b2c9 SHA512 15b1525890477539878385efc15ce5f1cf2f126cc785c42923be958cabe3298cebe73526a2370cf4c630124160a7ca0f0f9062aebbf035dce807a0374eaddd14
@@ -61,5 +63,7 @@ DIST ghc-bin-8.8.1-powerpc64le-unknown-linux-gnu.tbz2 173653088 BLAKE2B 6c29777b
 DIST ghc-bin-8.8.1-x86_64-pc-linux-gnu.tbz2 119317594 BLAKE2B 98f0fb262ac485dcfd6a8a67304912ffad2bf2634111fcc3b60346697a836867006bbacaab1e1be0cd5be34b4595d12bec13af644c451c10f7e3843ebaf5922f SHA512 e6acb11755db18fd86a346de642b8579a6b48b303c19795949757f5e351ad3b8892906e989dc57a7fd4471d0efe30fc8175df5bac741d7faecfe42a855a67980
 DIST ghc-bin-8.8.2-i686-pc-linux-gnu.tbz2 120289601 BLAKE2B df65bc6aa4ee22c979b9d8eda29f51188c96700d61fb4cf141ebad8a55e26b6cd959fce3ec0b8d780b68e7baf15a1ce7654dc4ef084aa4671fe05f00f9c4e9aa SHA512 da059f3fea00e14df346143e714da6484ae51d362d9e237607817791e02ec81e29e1ff7f9929fac44044f63196b395287c42f5829884c34391289179b4f6e204
 DIST ghc-bin-8.8.2-x86_64-pc-linux-gnu.tbz2 118957404 BLAKE2B cddedbb0fe8d38e9821bd8f51f5177d35922b25bf4fc8a537e921443560f141cdef44e54a0b4ef2dde07dbe33d9c1cba2e67ba80db4313f67e9bac089d967f56 SHA512 b0b801dd6abe9f5e6217e18568e2911dbfea11b1b45ff526950e87c73a34bcd597afc5105fcff2dc46bb13cf95e63db90c0d24ca9babf174b397a53001e8e0ac
+DIST ghc-bin-8.8.3-i686-pc-linux-gnu.tbz2 120243899 BLAKE2B 7f932523a71dcfd4cdd468bf67f470a942c314888c0093c21c211d54b3e158f45f051f027c78644a651047d81e809e1422bbaa5043e8559c6a4622ac0472f7e4 SHA512 12bf08b85652fd061849b9adb528d7a5c6fe9c2260cf02b92fab470fff16c3121bcb4e0f7044d05f252012083d622a1a490fa7f7c949142a3b5d03ccf0dd3ebc
+DIST ghc-bin-8.8.3-x86_64-pc-linux-gnu.tbz2 118988294 BLAKE2B 4e5aa3844934ae2726bf9c8690acd5a887f10cd49386ffadbc536f9309d33b3894b49507964eaf0d8a052747eb33aeabbe4d2cd22493297c295cf9414fcb766c SHA512 dd656157fe744c1df1c8ed34d1129ec358b26f3042c6da68e704e0f6a45d8114789000479e28a06dc16961afb283b3c666b427025590498a3d2da9b741b435c7
 DIST hoopl-3.10.2.0.tar.gz 241940 BLAKE2B 0ed7bf80486767c81415f99da8780a525401c388dea0b3f380bbecceae9cc7f66d8b5d0d7b31f8cb41796309b7a93adb113485efd14882f8af321989ce900a9b SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a
 DIST transformers-0.4.3.0.tar.gz 28632 BLAKE2B 92cabcb654bb11854a3bffbb1262f5cd62eda1aff447157086a61ebc451ebf2fddec53b6a2cc058174f24f0f0e32df671d3717e30a542c8dc90cb87e327d990c SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780

diff --git a/dev-lang/ghc/ghc-8.10.1.ebuild b/dev-lang/ghc/ghc-8.10.1.ebuild
index 574e2aaec41..b9624ca1fcc 100644
--- a/dev-lang/ghc/ghc-8.10.1.ebuild
+++ b/dev-lang/ghc/ghc-8.10.1.ebuild
@@ -27,13 +27,13 @@ BIN_PV=${PV}
 #arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
 #arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
 #arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
 #arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
 #arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
 #arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
 #arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-#arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
 # various ports:
 #arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
@@ -44,7 +44,7 @@ yet_binary() {
 		#alpha) return 0 ;;
 		#arm64) return 0 ;;
 		#arm) return 0 ;;
-		#amd64) return 0 ;;
+		amd64) return 0 ;;
 		#ia64) return 0 ;;
 		#ppc) return 0 ;;
 		#ppc64)
@@ -52,7 +52,7 @@ yet_binary() {
 		#	return 0
 		#	;;
 		#sparc) return 0 ;;
-		#x86) return 0 ;;
+		x86) return 0 ;;
 		*) return 1 ;;
 	esac
 }

diff --git a/dev-lang/ghc/ghc-8.8.3.ebuild b/dev-lang/ghc/ghc-8.8.3.ebuild
index d78855842ff..5d6e67ece45 100644
--- a/dev-lang/ghc/ghc-8.8.3.ebuild
+++ b/dev-lang/ghc/ghc-8.8.3.ebuild
@@ -27,12 +27,12 @@ BIN_PV=${PV}
 #arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
 #arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
 #arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
 #arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
 #arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
 #arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-#arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
 # various ports:
 #arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
@@ -43,7 +43,7 @@ yet_binary() {
 		#alpha) return 0 ;;
 		#arm64) return 0 ;;
 		#arm) return 0 ;;
-		#amd64) return 0 ;;
+		amd64) return 0 ;;
 		#ia64) return 0 ;;
 		#ppc) return 0 ;;
 		#ppc64)
@@ -51,7 +51,7 @@ yet_binary() {
 		#	return 0
 		#	;;
 		#sparc) return 0 ;;
-		#x86) return 0 ;;
+		x86) return 0 ;;
 		*) return 1 ;;
 	esac
 }


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2020-05-23  6:17 Mike Frysinger
  0 siblings, 0 replies; 92+ messages in thread
From: Mike Frysinger @ 2020-05-23  6:17 UTC (permalink / raw
  To: gentoo-commits

commit:     a434c06e0cc970f1a507bb9f8f1a147accf79040
Author:     Mike Frysinger <vapier <AT> chromium <DOT> org>
AuthorDate: Sat May 23 01:58:41 2020 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat May 23 06:17:29 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a434c06e

dev-lang/ghc: fix hardcoded pkg-config

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 dev-lang/ghc/ghc-7.10.3.ebuild | 2 +-
 dev-lang/ghc/ghc-7.8.4.ebuild  | 2 +-
 dev-lang/ghc/ghc-8.0.2.ebuild  | 2 +-
 dev-lang/ghc/ghc-8.10.1.ebuild | 2 +-
 dev-lang/ghc/ghc-8.2.1.ebuild  | 2 +-
 dev-lang/ghc/ghc-8.2.2.ebuild  | 2 +-
 dev-lang/ghc/ghc-8.4.1.ebuild  | 2 +-
 dev-lang/ghc/ghc-8.4.2.ebuild  | 2 +-
 dev-lang/ghc/ghc-8.4.3.ebuild  | 2 +-
 dev-lang/ghc/ghc-8.6.4.ebuild  | 2 +-
 dev-lang/ghc/ghc-8.6.5.ebuild  | 2 +-
 dev-lang/ghc/ghc-8.8.1.ebuild  | 2 +-
 dev-lang/ghc/ghc-8.8.2.ebuild  | 2 +-
 dev-lang/ghc/ghc-8.8.3.ebuild  | 2 +-
 14 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
index 1b8e5de541d..1112d5068ae 100644
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -555,7 +555,7 @@ src_configure() {
 			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
 		else
 			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
 		fi
 
 		elog "Final mk/build.mk:"

diff --git a/dev-lang/ghc/ghc-7.8.4.ebuild b/dev-lang/ghc/ghc-7.8.4.ebuild
index 09a0b30498d..a8b740d67a7 100644
--- a/dev-lang/ghc/ghc-7.8.4.ebuild
+++ b/dev-lang/ghc/ghc-7.8.4.ebuild
@@ -466,7 +466,7 @@ src_configure() {
 
 		if ! use ghcmakebinary; then
 			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
 		fi
 
 		econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index aceb46dd71e..8003bfbdd7a 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -551,7 +551,7 @@ src_configure() {
 			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
 		else
 			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
 		fi
 
 		elog "Final mk/build.mk:"

diff --git a/dev-lang/ghc/ghc-8.10.1.ebuild b/dev-lang/ghc/ghc-8.10.1.ebuild
index b9624ca1fcc..7845cce005c 100644
--- a/dev-lang/ghc/ghc-8.10.1.ebuild
+++ b/dev-lang/ghc/ghc-8.10.1.ebuild
@@ -624,7 +624,7 @@ src_configure() {
 			# using ${GTARGET}'s libffi is not supported yet:
 			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
 			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
 		fi
 
 		einfo "Final mk/build.mk:"

diff --git a/dev-lang/ghc/ghc-8.2.1.ebuild b/dev-lang/ghc/ghc-8.2.1.ebuild
index c701609e940..90df1309d8c 100644
--- a/dev-lang/ghc/ghc-8.2.1.ebuild
+++ b/dev-lang/ghc/ghc-8.2.1.ebuild
@@ -615,7 +615,7 @@ src_configure() {
 			# using ${GTARGET}'s libffi is not supported yet:
 			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
 			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
 		fi
 
 		einfo "Final mk/build.mk:"

diff --git a/dev-lang/ghc/ghc-8.2.2.ebuild b/dev-lang/ghc/ghc-8.2.2.ebuild
index 7304fe4bcc2..83918fa3f68 100644
--- a/dev-lang/ghc/ghc-8.2.2.ebuild
+++ b/dev-lang/ghc/ghc-8.2.2.ebuild
@@ -616,7 +616,7 @@ src_configure() {
 			# using ${GTARGET}'s libffi is not supported yet:
 			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
 			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
 		fi
 
 		einfo "Final mk/build.mk:"

diff --git a/dev-lang/ghc/ghc-8.4.1.ebuild b/dev-lang/ghc/ghc-8.4.1.ebuild
index bb77c83651a..49cb782a2de 100644
--- a/dev-lang/ghc/ghc-8.4.1.ebuild
+++ b/dev-lang/ghc/ghc-8.4.1.ebuild
@@ -616,7 +616,7 @@ src_configure() {
 			# using ${GTARGET}'s libffi is not supported yet:
 			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
 			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
 		fi
 
 		einfo "Final mk/build.mk:"

diff --git a/dev-lang/ghc/ghc-8.4.2.ebuild b/dev-lang/ghc/ghc-8.4.2.ebuild
index 1560843584d..75e81360795 100644
--- a/dev-lang/ghc/ghc-8.4.2.ebuild
+++ b/dev-lang/ghc/ghc-8.4.2.ebuild
@@ -621,7 +621,7 @@ src_configure() {
 			# using ${GTARGET}'s libffi is not supported yet:
 			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
 			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
 		fi
 
 		einfo "Final mk/build.mk:"

diff --git a/dev-lang/ghc/ghc-8.4.3.ebuild b/dev-lang/ghc/ghc-8.4.3.ebuild
index 8d8af426473..0c291814a78 100644
--- a/dev-lang/ghc/ghc-8.4.3.ebuild
+++ b/dev-lang/ghc/ghc-8.4.3.ebuild
@@ -620,7 +620,7 @@ src_configure() {
 			# using ${GTARGET}'s libffi is not supported yet:
 			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
 			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
 		fi
 
 		einfo "Final mk/build.mk:"

diff --git a/dev-lang/ghc/ghc-8.6.4.ebuild b/dev-lang/ghc/ghc-8.6.4.ebuild
index 2d192b4e58e..5a1785491a9 100644
--- a/dev-lang/ghc/ghc-8.6.4.ebuild
+++ b/dev-lang/ghc/ghc-8.6.4.ebuild
@@ -626,7 +626,7 @@ src_configure() {
 			# using ${GTARGET}'s libffi is not supported yet:
 			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
 			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
 		fi
 
 		einfo "Final mk/build.mk:"

diff --git a/dev-lang/ghc/ghc-8.6.5.ebuild b/dev-lang/ghc/ghc-8.6.5.ebuild
index e95768813ea..afbbcaccf02 100644
--- a/dev-lang/ghc/ghc-8.6.5.ebuild
+++ b/dev-lang/ghc/ghc-8.6.5.ebuild
@@ -632,7 +632,7 @@ src_configure() {
 			# using ${GTARGET}'s libffi is not supported yet:
 			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
 			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
 		fi
 
 		einfo "Final mk/build.mk:"

diff --git a/dev-lang/ghc/ghc-8.8.1.ebuild b/dev-lang/ghc/ghc-8.8.1.ebuild
index 8d13a22eea7..ca9d69ec96c 100644
--- a/dev-lang/ghc/ghc-8.8.1.ebuild
+++ b/dev-lang/ghc/ghc-8.8.1.ebuild
@@ -635,7 +635,7 @@ src_configure() {
 			# using ${GTARGET}'s libffi is not supported yet:
 			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
 			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
 		fi
 
 		einfo "Final mk/build.mk:"

diff --git a/dev-lang/ghc/ghc-8.8.2.ebuild b/dev-lang/ghc/ghc-8.8.2.ebuild
index 4d206d287dd..9abdb5cf242 100644
--- a/dev-lang/ghc/ghc-8.8.2.ebuild
+++ b/dev-lang/ghc/ghc-8.8.2.ebuild
@@ -634,7 +634,7 @@ src_configure() {
 			# using ${GTARGET}'s libffi is not supported yet:
 			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
 			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
 		fi
 
 		einfo "Final mk/build.mk:"

diff --git a/dev-lang/ghc/ghc-8.8.3.ebuild b/dev-lang/ghc/ghc-8.8.3.ebuild
index 5d6e67ece45..16906855953 100644
--- a/dev-lang/ghc/ghc-8.8.3.ebuild
+++ b/dev-lang/ghc/ghc-8.8.3.ebuild
@@ -635,7 +635,7 @@ src_configure() {
 			# using ${GTARGET}'s libffi is not supported yet:
 			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
 			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
 		fi
 
 		einfo "Final mk/build.mk:"


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2020-07-24  7:06 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2020-07-24  7:06 UTC (permalink / raw
  To: gentoo-commits

commit:     a0b0d239bac1317b7c72cbc152301b29a686a290
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 24 07:06:30 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Jul 24 07:06:54 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0b0d239

dev-lang/ghc: bump up to 8.8.4

Package-Manager: Portage-3.0.0, Repoman-2.3.23
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/Manifest         |   4 +
 dev-lang/ghc/ghc-8.8.4.ebuild | 806 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 810 insertions(+)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 7822721586b..0f7b4fe5d55 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -20,6 +20,8 @@ DIST ghc-8.8.2-src.tar.xz 19365816 BLAKE2B 85dbd2a4696755f43c28ec578d5ecfe706b27
 DIST ghc-8.8.2-testsuite.tar.xz 1976924 BLAKE2B cec6c5dab1782332aca6364f995cffc1e9f3506649c3410b6eaa220e665b66f033dfad8ab6cae7677e15a6a1bd51237ed491b7fd04a19fa1d4f9cd8904617c64 SHA512 0fc41a0b3cb5f172442863c8a3b1cf549f2f660a070965e6083baa2c90c27b6a7c17550625105799010f4329dc189f4e392c86991844a9704a3e3a72a6d4e2f5
 DIST ghc-8.8.3-src.tar.xz 19343672 BLAKE2B 4b33b4a386926f0ee625c7c18a3997f02bf664b8f553d7cdfb231553bf9510f44f72c0b46911539f6209f28ecab52ee520e61e2c9e750cc217b170b3596ffca0 SHA512 7db0d820a288e56bd32935cc03584295900605f6e7cac6fe6adcb3ec6c24d8d2cebf7a8efa421f2d2fa192602d7f24dfad1ddeeba252455e4cb8baa9889dcaa9
 DIST ghc-8.8.3-testsuite.tar.xz 1965236 BLAKE2B 9cd10769336513284d8e0fbca1c3fce9e298ec67eb63eb10d41087fccba0f6281f1509aee684778fd23710ffe65843c43b4042e6692940af67766056c4503273 SHA512 4ebf3eabcd7591762dfcf45716b06293fb14c00b51307f7788c90dcf4e01f67e6bbb7a887b74d8d30272919486441ac236b42a54c4874aac69d90391b76f81c9
+DIST ghc-8.8.4-src.tar.xz 19395252 BLAKE2B 6fa898b9552398a724f0452f5cc88ba073264a5645288c73507258959efec40ce5a56a0eaafdabe58f15c5a9210b2c9da5954411dff5c81c52e061569d6a350a SHA512 efd23bd819f7429486696a3a929a040471db7ea8a2d1f1d832e4cf0825b9e1e0c5e6ecad0ab8376f58b74e9c28c1d2f773bd126596d6d853c9e57d57e5ceb090
+DIST ghc-8.8.4-testsuite.tar.xz 1965820 BLAKE2B 3b715700561788b8abdc986961d533b91399461d57a1686ededb4ccc36881503cdc3fc126b9a7b204a728c24b9a9ca97320142348644367aca9b47c87a5b3b51 SHA512 79d8fb0ba8de0fb48c938bd54c8c3278f1895d8ce5c700ce8cf6b3fc550073bb757208e85d4f9818400ebecca96f51d9248b8bbdac9eb2995671756164d08c16
 DIST ghc-bin-7.10.3-alpha.tbz2 183558856 BLAKE2B 2bb02aafa49c6a91bec016e8bec2d07257d602e53c9df55792ec6fbbf8e2e46de1d5f3f72c0ccf74d6bd7f7987f53412063ccb02ae85455fce11fa928cbf5291 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230
 DIST ghc-bin-7.10.3-amd64.tbz2 112040431 BLAKE2B 3e59b70ca309a1cd704266c54a7983f9a58362bf700ced89c5649c780c664c650ec091e14026a7b84e339d2ebff39eba1772eebcd9fb4b99b9c99d179453d5cc SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558
 DIST ghc-bin-7.10.3-ia64.tbz2 238680956 BLAKE2B 08593718d376051edfb0c86131e54dafc5c15056757fbeef90c653a7d217e49ff34ffaf7cd4083144c9277e73a290b822a0f889aaf806341375708e4b92654b2 SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5
@@ -65,5 +67,7 @@ DIST ghc-bin-8.8.2-i686-pc-linux-gnu.tbz2 120289601 BLAKE2B df65bc6aa4ee22c979b9
 DIST ghc-bin-8.8.2-x86_64-pc-linux-gnu.tbz2 118957404 BLAKE2B cddedbb0fe8d38e9821bd8f51f5177d35922b25bf4fc8a537e921443560f141cdef44e54a0b4ef2dde07dbe33d9c1cba2e67ba80db4313f67e9bac089d967f56 SHA512 b0b801dd6abe9f5e6217e18568e2911dbfea11b1b45ff526950e87c73a34bcd597afc5105fcff2dc46bb13cf95e63db90c0d24ca9babf174b397a53001e8e0ac
 DIST ghc-bin-8.8.3-i686-pc-linux-gnu.tbz2 120243899 BLAKE2B 7f932523a71dcfd4cdd468bf67f470a942c314888c0093c21c211d54b3e158f45f051f027c78644a651047d81e809e1422bbaa5043e8559c6a4622ac0472f7e4 SHA512 12bf08b85652fd061849b9adb528d7a5c6fe9c2260cf02b92fab470fff16c3121bcb4e0f7044d05f252012083d622a1a490fa7f7c949142a3b5d03ccf0dd3ebc
 DIST ghc-bin-8.8.3-x86_64-pc-linux-gnu.tbz2 118988294 BLAKE2B 4e5aa3844934ae2726bf9c8690acd5a887f10cd49386ffadbc536f9309d33b3894b49507964eaf0d8a052747eb33aeabbe4d2cd22493297c295cf9414fcb766c SHA512 dd656157fe744c1df1c8ed34d1129ec358b26f3042c6da68e704e0f6a45d8114789000479e28a06dc16961afb283b3c666b427025590498a3d2da9b741b435c7
+DIST ghc-bin-8.8.4-i686-pc-linux-gnu.tbz2 120336081 BLAKE2B 55dfbb90d5e55c2af5e93c69249828a85cd9171c164b80dfdaf86512972b2c6854c8e4f07426af4ab52a5fb1a85d96a58c2cf003fb02372c55428001cfaea491 SHA512 ad3b83344349976d3253934195b2dc6299648391572b13735943c5ea2239c031c19b0cafd86c16cfb0c061e73bc72e9248f9c1731494a9a15fbe188f02913c12
+DIST ghc-bin-8.8.4-x86_64-pc-linux-gnu.tbz2 118897883 BLAKE2B a180b2dd1a3bc222044ece809ad700aee29d0c3e75b57ee9af3ca33c9c0f59dbf36f68202f746d99f80915cb717a9c41fc12db507f1cb469981732703a06b9cc SHA512 9d4be02dbd9704c93ef18feb92ea30bd5d590df31f288bf1b364818424c5019ca9ada26eec88418199f90ae8f4459d0a9352104e3f3186bbdc241891eb1b66c4
 DIST hoopl-3.10.2.0.tar.gz 241940 BLAKE2B 0ed7bf80486767c81415f99da8780a525401c388dea0b3f380bbecceae9cc7f66d8b5d0d7b31f8cb41796309b7a93adb113485efd14882f8af321989ce900a9b SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a
 DIST transformers-0.4.3.0.tar.gz 28632 BLAKE2B 92cabcb654bb11854a3bffbb1262f5cd62eda1aff447157086a61ebc451ebf2fddec53b6a2cc058174f24f0f0e32df671d3717e30a542c8dc90cb87e327d990c SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780

diff --git a/dev-lang/ghc/ghc-8.8.4.ebuild b/dev-lang/ghc/ghc-8.8.4.ebuild
new file mode 100644
index 00000000000..cd4edbc6001
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.8.4.ebuild
@@ -0,0 +1,806 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+		export CTARGET=${CATEGORY/cross-}
+	fi
+fi
+
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib multiprocessing pax-utils toolchain-funcs prefix
+inherit check-reqs
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="https://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+BIN_PV=${PV}
+# sorted!
+#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+	case "${ARCH}" in
+		#alpha) return 0 ;;
+		#arm64) return 0 ;;
+		#arm) return 0 ;;
+		amd64) return 0 ;;
+		#ia64) return 0 ;;
+		#ppc) return 0 ;;
+		#ppc64)
+		#	use big-endian && return 1
+		#	return 0
+		#	;;
+		#sparc) return 0 ;;
+		x86) return 0 ;;
+		*) return 1 ;;
+	esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=8.6.0.20180810 # uncomment only for -alpha, -beta, -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? (
+	https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
+	test? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
+)"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+
+BUMP_LIBRARIES=(
+	# "hackage-name          hackage-version"
+)
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS=""
+IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
+IUSE+=" binary"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	>=dev-lang/perl-5.6.1
+	dev-libs/gmp:0=
+	sys-libs/ncurses:0=[unicode]
+	elfutils? ( dev-libs/elfutils )
+	!ghcmakebinary? ( dev-libs/libffi:= )
+	numa? ( sys-process/numactl )
+"
+
+# This set of dependencies is needed to run
+# prebuilt ghc. We specifically avoid ncurses
+# dependency with:
+#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
+PREBUILT_BINARY_DEPENDS="
+	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+"
+# This set of dependencies is needed to install
+# ghc[binary] in system. terminfo package is linked
+# against ncurses.
+PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
+	sys-libs/ncurses:0/6
+"
+
+RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
+
+DEPEND="${RDEPEND}
+	doc? ( app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5
+		app-text/docbook-xsl-stylesheets
+		dev-python/sphinx
+		>=dev-libs/libxslt-1.1.2 )
+	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
+
+REQUIRED_USE="?? ( ghcbootstrap binary )"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+	[[ ${CHOST} != ${CTARGET} ]]
+}
+
+is_native() {
+	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
+}
+
+if ! is_crosscompile; then
+	PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
+fi
+
+# returns tool prefix for crosscompiler.
+# Example:
+#  CTARGET=armv7a-unknown-linux-gnueabi
+#  CHOST=x86_64-pc-linux-gnu
+#    "armv7a-unknown-linux-gnueabi-"
+#  CTARGET=${CHOST}
+#    ""
+# Used in tools and library prefix:
+#    "${ED}"/usr/bin/$(cross)haddock
+#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+
+cross() {
+	if is_crosscompile; then
+		echo "${CTARGET}-"
+	else
+		echo ""
+	fi
+}
+
+append-ghc-cflags() {
+	local persistent compile assemble link
+	local flag ghcflag
+
+	for flag in $*; do
+		case ${flag} in
+			persistent)	persistent="yes";;
+			compile)	compile="yes";;
+			assemble)	assemble="yes";;
+			link)		link="yes";;
+			*)
+				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				;;
+		esac
+	done
+}
+
+# $1 - lib name (under libraries/)
+# $2 - lib version
+# example: bump_lib "transformers" "0.4.2.0"
+bump_lib() {
+	local pn=$1 pv=$2
+	local p=${pn}-${pv}
+	local f
+
+	einfo "Bumping ${pn} up to ${pv}"
+
+	for f in ghc.mk GNUmakefile; do
+		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
+	done
+	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
+	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
+}
+
+update_SRC_URI() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
+	done
+}
+
+update_SRC_URI
+
+bump_libs() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		bump_lib "${pn}" "${pv}"
+	done
+}
+
+ghc_setup_cflags() {
+	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
+	if ! is_native; then
+		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
+		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
+		einfo "Crosscompiling mode:"
+		einfo "   CHOST:   ${CHOST}"
+		einfo "   CTARGET: ${CTARGET}"
+		einfo "   CFLAGS:  ${CFLAGS}"
+		einfo "   LDFLAGS: ${LDFLAGS}"
+		einfo "   prefix: $(cross)"
+		return
+	fi
+	# We need to be very careful with the CFLAGS we ask ghc to pass through to
+	# gcc. There are plenty of flags which will make gcc produce output that
+	# breaks ghc in various ways. The main ones we want to pass through are
+	# -mcpu / -march flags. These are important for arches like alpha & sparc.
+	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
+	strip-flags
+	strip-unsupported-flags
+
+	# Cmm can't parse line numbers #482086
+	replace-flags -ggdb[3-9] -ggdb2
+
+	GHC_FLAGS=""
+	GHC_PERSISTENT_FLAGS=""
+	for flag in ${CFLAGS}; do
+		case ${flag} in
+
+			# Ignore extra optimisation (ghc passes -O to gcc anyway)
+			# -O2 and above break on too many systems
+			-O*) ;;
+
+			# Arch and ABI flags are what we're really after
+			-m*) append-ghc-cflags compile assemble ${flag};;
+
+			# Sometimes it's handy to see backtrace of RTS
+			# to get an idea what happens there
+			-g*) append-ghc-cflags compile ${flag};;
+
+			# Ignore all other flags, including all -f* flags
+		esac
+	done
+
+	for flag in ${LDFLAGS}; do
+		append-ghc-cflags link ${flag}
+	done
+
+	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
+	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
+	# options to gcc.
+	if is_native; then
+		# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
+		# are not built with fPIC, bug #606666
+		gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
+		tc-is-gcc && ver_test $(gcc-version) -ge 6.3 && if ! use ghcbootstrap; then
+			# gcc-6.3 has support for -no-pie upstream, but spelling differs from
+			# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
+			# hardened users try '-pie' in USE=ghcbootstrap mode.
+			append-ghc-cflags compile link -no-pie
+		fi
+
+		# prevent from failing to build unregisterised ghc:
+		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+	fi
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+	local from=$1
+	local   to=$2
+	shift 2
+	local file=
+	for file in "$@"
+	do
+		sed -i -e "s|$from|$to|g" \
+			"$file" || die "path relocation failed for '$file'"
+	done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+	local to=$1 ghc_v=${BIN_PV}
+
+	# libdir for prebuilt binary and for current system may mismatch
+	# It does for prefix installation for example: bug #476998
+	local bin_ghc_prefix=${WORKDIR}/usr
+	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+	# backup original script to use it later after relocation
+	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
+	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+	if [[ ${bin_libdir} != $(get_libdir) ]]; then
+		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+		# moving the dir itself is not strictly needed
+		# but then USE=binary would result in installing
+		# in '${bin_libdir}'
+		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
+			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
+			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
+			"${WORKDIR}/usr/bin/hsc2hs" \
+			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
+			"$gp_back" \
+			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
+	fi
+
+	# Relocate from /usr to ${EPREFIX}/usr
+	relocate_path "/usr" "${to}/usr" \
+		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
+		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
+		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
+		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
+		"${WORKDIR}/usr/bin/hp2ps" \
+		"${WORKDIR}/usr/bin/hpc" \
+		"${WORKDIR}/usr/bin/hsc2hs" \
+		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
+		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
+
+	# this one we will use to regenerate cache
+	# so it should point to current tree location
+	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+	if use prefix; then
+		hprefixify "${bin_libpath}"/${PN}*/settings
+	fi
+
+	# regenerate the binary package cache
+	"$gp_back" recache || die "failed to update cache after relocation"
+	rm "$gp_back"
+}
+
+ghc-check-reqs() {
+	# These are pessimistic values (slightly bigger than worst-case)
+	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
+	# numbers on various arches.
+	CHECKREQS_DISK_BUILD=8G
+	CHECKREQS_DISK_USR=2G
+	# USE=binary roughly takes
+	use binary && CHECKREQS_DISK_BUILD=4G
+
+	"$@"
+}
+
+pkg_pretend() {
+	ghc-check-reqs check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	ghc-check-reqs check-reqs_pkg_setup
+
+	# quiet portage about prebuilt binaries
+	use binary && QA_PREBUILT="*"
+
+	[[ ${MERGE_TYPE} == binary ]] && return
+
+	if use ghcbootstrap; then
+		ewarn "You requested ghc bootstrapping, this is usually only used"
+		ewarn "by Gentoo developers to make binary .tbz2 packages."
+
+		[[ -z $(type -P ghc) ]] && \
+			die "Could not find a ghc to bootstrap with."
+	else
+		if ! yet_binary; then
+			eerror "Please try emerging with USE=ghcbootstrap and report build"
+			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
+			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
+		fi
+	fi
+}
+
+src_unpack() {
+	# Create the ${S} dir if we're using the binary version
+	use binary && mkdir "${S}"
+
+	# the Solaris and Darwin binaries from ghc (maeder) need to be
+	# unpacked separately, so prevent them from being unpacked
+	local ONLYA=${A}
+	case ${CHOST} in
+		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
+	esac
+	unpack ${ONLYA}
+}
+
+src_prepare() {
+	ghc_setup_cflags
+
+	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+		# See bug #313635.
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
+
+		# allow hardened users use vanilla binary to bootstrap ghc
+		# ghci uses mmap with rwx protection at it implements dynamic
+		# linking on it's own (bug #299709)
+		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
+	fi
+
+	if use binary; then
+		if use prefix; then
+			relocate_ghc "${EPREFIX}"
+		fi
+
+		# Move unpacked files to the expected place
+		mv "${WORKDIR}/usr" "${S}"
+		eapply_user
+	else
+		if ! use ghcbootstrap; then
+			case ${CHOST} in
+				*-darwin* | *-solaris*)
+				# UPDATE ME for ghc-7
+				mkdir "${WORKDIR}"/ghc-bin-installer || die
+				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
+				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
+				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
+				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
+				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
+				popd > /dev/null
+
+				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
+				# fix the binaries so they run, on Solaris we need an
+				# LD_LIBRARY_PATH which has our prefix libdirs, on
+				# Darwin we need to replace the frameworks with our libs
+				# from the prefix fix before installation, because some
+				# of the tools are actually used during configure/make
+				if [[ ${CHOST} == *-solaris* ]] ; then
+					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
+				elif [[ ${CHOST} == *-darwin* ]] ; then
+					local readline_framework=GNUreadline.framework/GNUreadline
+					local gmp_framework=/opt/local/lib/libgmp.10.dylib
+					local ncurses_file=/opt/local/lib/libncurses.5.dylib
+					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
+						install_name_tool -change \
+							${readline_framework} \
+							"${EPREFIX}"/lib/libreadline.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${gmp_framework} \
+							"${EPREFIX}"/usr/lib/libgmp.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${ncurses_file} \
+							"${EPREFIX}"/usr/lib/libncurses.dylib \
+							${binary} || die
+					done
+					# we don't do frameworks!
+					sed -i \
+						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
+						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
+						rts/package.conf.in || die
+				fi
+
+				# it is autoconf, but we really don't want to give it too
+				# many arguments, in fact we do the make in-place anyway
+				./configure --prefix="${WORKDIR}"/usr || die
+				make install || die
+				popd > /dev/null
+				;;
+				*)
+				relocate_ghc "${WORKDIR}"
+				;;
+			esac
+		fi
+
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${S}/ghc/ghc.wrapper"
+
+		cd "${S}" # otherwise eapply will break
+
+		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
+		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+		eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
+		eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
+		# fixed in 8.8.4. See https://gitlab.haskell.org/ghc/ghc/-/blob/ghc-8.8.4-release/configure.ac#L1273
+		# eapply "${FILESDIR}"/${PN}-8.6.5-numa.patch
+		# rumors say this is fixed properly in 8.8.3. Let's check!
+		#eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
+
+		# a bunch of crosscompiler patches
+		# needs newer version:
+		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+
+		# mingw32 target
+		pushd "${S}/libraries/Win32"
+			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
+		popd
+
+		bump_libs
+
+		eapply_user
+		# as we have changed the build system
+		eautoreconf
+	fi
+}
+
+src_configure() {
+	if ! use binary; then
+		# initialize build.mk
+		echo '# Gentoo changes' > mk/build.mk
+
+		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
+		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+
+		# We also need to use the GHC_FLAGS flags when building ghc itself
+		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
+		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
+		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
+		# Speed up initial Cabal bootstrap
+		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
+
+		# We can't depend on haddock except when bootstrapping when we
+		# must build docs and include them into the binary .tbz2 package
+		# app-text/dblatex is not in portage, can not build PDF or PS
+		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
+		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
+		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
+
+		# this controls presence on 'xhtml' and 'haddock' in final install
+		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
+
+		# not used outside of ghc's test
+		if [[ -n ${GHC_BUILD_DPH} ]]; then
+				echo "BUILD_DPH = YES" >> mk/build.mk
+			else
+				echo "BUILD_DPH = NO" >> mk/build.mk
+		fi
+
+		# Any non-native build has to skip as it needs
+		# target haddock binary to be runnabine.
+		if ! is_native; then
+			# disable docs generation as it requires running stage2
+			echo "HADDOCK_DOCS=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
+		fi
+
+		if is_crosscompile; then
+			# Install ghc-stage1 crosscompiler instead of
+			# ghc-stage2 cross-built compiler.
+			echo "Stage1Only=YES" >> mk/build.mk
+		fi
+
+		# allows overriding build flavours for libraries:
+		# v   - vanilla (static libs)
+		# p   - profiled
+		# dyn - shared libraries
+		# example: GHC_LIBRARY_WAYS="v dyn"
+		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
+			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
+		fi
+		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
+
+		# Get ghc from the unpacked binary .tbz2
+		# except when bootstrapping we just pick ghc up off the path
+		if ! use ghcbootstrap; then
+			export PATH="${WORKDIR}/usr/bin:${PATH}"
+		fi
+
+		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
+
+		# don't strip anything. Very useful when stage2 SIGSEGVs on you
+		echo "STRIP_CMD = :" >> mk/build.mk
+
+		local econf_args=()
+
+		# GHC embeds toolchain it was built by and uses it later.
+		# Don't allow things like ccache or versioned binary slip.
+		# We use stable thing across gcc upgrades.
+		# User can use EXTRA_ECONF=CC=... to override this default.
+		econf_args+=(
+			AR=${CTARGET}-ar
+			CC=${CTARGET}-gcc
+			# these should be inferred by GHC but ghc defaults
+			# to using bundled tools on windows.
+			Windres=${CTARGET}-windres
+			DllWrap=${CTARGET}-dllwrap
+			# we set the linker explicitly below
+			--disable-ld-override
+		)
+		case ${CTARGET} in
+			arm*)
+				# ld.bfd-2.28 does not work for ghc. Force ld.gold
+				# instead. This should be removed once gentoo gets
+				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
+				econf_args+=(LD=${CTARGET}-ld.gold)
+			;;
+			sparc*)
+				# ld.gold-2.28 does not work for ghc. Force ld.bfd
+				# instead. This should be removed once gentoo gets
+				# a fix for missing --no-relax support bug:
+				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
+				econf_args+=(LD=${CTARGET}-ld.bfd)
+			;;
+			*)
+				econf_args+=(LD=${CTARGET}-ld)
+		esac
+
+		if [[ ${CBUILD} != ${CHOST} ]]; then
+			# GHC bug: ghc claims not to support cross-building.
+			# It does, but does not distinct --host= value
+			# for stage1 and stage2 compiler.
+			econf_args+=(--host=${CBUILD})
+		fi
+
+		if use ghcmakebinary; then
+			# When building booting libary we are trying to
+			# bundle or restrict most of external depends
+			# with unstable ABI:
+			#  - embed libffi (default GHC behaviour)
+			#  - disable ncurses support for ghci (via haskeline)
+			#    https://bugs.gentoo.org/557478
+			#  - disable ncurses support for ghc-pkg
+			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
+			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
+		elif is_native; then
+			# using ${GTARGET}'s libffi is not supported yet:
+			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
+			econf_args+=(--with-system-libffi)
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
+		fi
+
+		einfo "Final mk/build.mk:"
+		cat mk/build.mk || die
+
+		econf ${econf_args[@]} \
+			--enable-bootstrap-with-devel-snapshot \
+			$(use elfutils && echo --enable-dwarf-unwind) \
+			$(use_enable numa)
+
+		if [[ ${PV} == *9999* ]]; then
+			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+			GHC_P=${PN}-${GHC_PV}
+		fi
+	fi # ! use binary
+}
+
+src_compile() {
+	if ! use binary; then
+		# Stage1Only crosscompiler does not build stage2
+		if ! is_crosscompile; then
+			# 1. build/pax-mark compiler binary first
+			emake ghc/stage2/build/tmp/ghc-stage2
+			# 2. pax-mark (bug #516430)
+			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
+			# 2. build/pax-mark haddock using ghc-stage2
+			if is_native; then
+				# non-native build does not build haddock
+				# due to HADDOCK_DOCS=NO, but it could.
+				emake utils/haddock/dist/build/tmp/haddock
+				pax-mark -m utils/haddock/dist/build/tmp/haddock
+			fi
+		fi
+		# 3. and then all the rest
+		emake all
+	fi # ! use binary
+}
+
+src_test() {
+	# TODO: deal with:
+	#    - sandbox (pollutes environment)
+	#    - extra packages (to extend testsuite coverage)
+	# bits are taken from 'validate'
+	local make_test_target='test' # can be fulltest
+	# not 'emake' as testsuite uses '$MAKE' without jobserver available
+	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
+}
+
+src_install() {
+	if use binary; then
+		use prefix && mkdir -p "${ED}"
+		mv "${S}/usr" "${ED}"
+	else
+		[[ -f VERSION ]] || emake VERSION
+
+		# -j1 due to a rare race in install script:
+		#    make --no-print-directory -f ghc.mk phase=final install
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
+		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
+		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
+		#    /usr/bin/install: cannot create regular file \
+		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
+		emake -j1 install DESTDIR="${D}"
+
+		# Skip for cross-targets as they all share target location:
+		# /usr/share/doc/ghc-9999/
+		if ! is_crosscompile; then
+			dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
+		fi
+
+		# rename ghc-shipped files to avoid collision
+		# of external packages. Motivating example:
+		#  user had installed:
+		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
+		#      dev-haskell/transformers-0.4.2.0
+		#  then user tried to update to
+		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
+		#  this will lead to single .conf file collision.
+		local shipped_conf renamed_conf
+		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+		for shipped_conf in "${package_confdir}"/*.conf; do
+			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
+			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
+			mv "${shipped_conf}" "${renamed_conf}" || die
+		done
+
+		# remove link, but leave 'haddock-${GHC_P}'
+		rm -f "${ED}"/usr/bin/$(cross)haddock
+
+		if ! is_crosscompile; then
+			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
+			newbashcomp utils/completion/ghc.bash         ghc
+		fi
+	fi
+
+	# path to the package.cache
+	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+	PKGCACHE="${package_confdir}"/package.cache
+	# copy the package.conf.d, including timestamp, save it so we can help
+	# users that have a broken package.conf.d
+	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
+
+	# copy the package.conf, including timestamp, save it so we later can put it
+	# back before uninstalling, or when upgrading.
+	cp -p "${PKGCACHE}"{,.shipped} \
+		|| die "failed to copy package.conf.d/package.cache"
+
+	if is_crosscompile; then
+		# When we build a cross-compiler the layout is the following:
+		#     usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
+		# but
+		#     usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
+		# containst host binaries (modulo bugs).
+
+		# Portage's stripping mechanism does not skip stripping
+		# foreign binaries. This frequently causes binaries to be
+		# broken.
+		#
+		# Thus below we disable stripping of target libraries and allow
+		# stripping hosts executables.
+		dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
+		dostrip    "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
+	fi
+}
+
+pkg_preinst() {
+	# have we got an earlier version of ghc installed?
+	if has_version "<${CATEGORY}/${PF}"; then
+		haskell_updater_warn="1"
+	fi
+}
+
+pkg_postinst() {
+	ghc-reregister
+
+	# path to the package.cache
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+
+	# give the cache a new timestamp, it must be as recent as
+	# the package.conf.d directory.
+	touch "${PKGCACHE}"
+
+	if [[ "${haskell_updater_warn}" == "1" ]]; then
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+		ewarn "You have just upgraded from an older version of GHC."
+		ewarn "You may have to run"
+		ewarn "      'haskell-updater'"
+		ewarn "to rebuild all ghc-based Haskell libraries."
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+	fi
+}
+
+pkg_prerm() {
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+	rm -rf "${PKGCACHE}"
+
+	cp -p "${PKGCACHE}"{.shipped,}
+}
+
+pkg_postrm() {
+	ghc-package_pkg_postrm
+}


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2020-08-02  8:23 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2020-08-02  8:23 UTC (permalink / raw
  To: gentoo-commits

commit:     2d49f0964fc067682ce320132d2773d6bc7d0e5a
Author:     Jan Ziak <0xe2.0x9a.0x9b <AT> gmail <DOT> com>
AuthorDate: Sat Aug  1 16:55:13 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Aug  2 08:23:06 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d49f096

dev-lang/ghc: fix typo in flag description

Signed-off-by: Jan Ziak <0xe2.0x9a.0x9b <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/16933
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/metadata.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-lang/ghc/metadata.xml b/dev-lang/ghc/metadata.xml
index 5169f69026c..eef249cad28 100644
--- a/dev-lang/ghc/metadata.xml
+++ b/dev-lang/ghc/metadata.xml
@@ -7,10 +7,10 @@
 	</maintainer>
 	<use>
 		<flag name="binary">Install the binary version directly, rather than using it to build the source version.</flag>
-		<flag name="elfutils">Enable DWARF-based baclktraces using <pkg>dev-libs/elfutils</pkg>.</flag>
+		<flag name="elfutils">Enable DWARF-based backtraces using <pkg>dev-libs/elfutils</pkg>.</flag>
 		<flag name="ghcbootstrap">Internal: Bootstrap GHC from an existing GHC installation.</flag>
 		<flag name="ghcmakebinary">Internal: Build binary friendly for redistribution.</flag>
-		<flag name="gmp">use <pkg>dev-libs/gmp</pkg> for integer operations (works faster, but an external depend).</flag>
+		<flag name="gmp">Use <pkg>dev-libs/gmp</pkg> for integer operations (works faster, but an external depend).</flag>
 		<flag name="numa">Enable NUMA thread balancing policy using <pkg>sys-process/numactl</pkg>.</flag>
 	</use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2020-09-05  8:11 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2020-09-05  8:11 UTC (permalink / raw
  To: gentoo-commits

commit:     e790d862c726d8910aa37f9ed63a02a05f57cfea
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  5 08:08:45 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Sep  5 08:10:56 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e790d862

dev-lang/ghc: make USE=binary and USE=profile mutually exclusive

We prebuild binaries without profiling support in Gentoo.

Reported-by: Toralf Förster
Closes: https://bugs.gentoo.org/740236
Package-Manager: Portage-3.0.5, Repoman-3.0.1
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/ghc-8.10.1.ebuild | 6 +++++-
 dev-lang/ghc/ghc-8.8.3.ebuild  | 6 +++++-
 dev-lang/ghc/ghc-8.8.4.ebuild  | 6 +++++-
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/dev-lang/ghc/ghc-8.10.1.ebuild b/dev-lang/ghc/ghc-8.10.1.ebuild
index 7845cce005c..9749ccd0b25 100644
--- a/dev-lang/ghc/ghc-8.10.1.ebuild
+++ b/dev-lang/ghc/ghc-8.10.1.ebuild
@@ -113,7 +113,11 @@ DEPEND="${RDEPEND}
 		>=dev-libs/libxslt-1.1.2 )
 	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
 
-REQUIRED_USE="?? ( ghcbootstrap binary )"
+# we build binaries without profiling support
+REQUIRED_USE="
+	?? ( ghcbootstrap binary )
+	?? ( profile binary )
+"
 
 # haskell libraries built with cabal in configure mode, #515354
 QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"

diff --git a/dev-lang/ghc/ghc-8.8.3.ebuild b/dev-lang/ghc/ghc-8.8.3.ebuild
index 16906855953..f59a40a4139 100644
--- a/dev-lang/ghc/ghc-8.8.3.ebuild
+++ b/dev-lang/ghc/ghc-8.8.3.ebuild
@@ -112,7 +112,11 @@ DEPEND="${RDEPEND}
 		>=dev-libs/libxslt-1.1.2 )
 	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
 
-REQUIRED_USE="?? ( ghcbootstrap binary )"
+# we build binaries without profiling support
+REQUIRED_USE="
+	?? ( ghcbootstrap binary )
+	?? ( profile binary )
+"
 
 # haskell libraries built with cabal in configure mode, #515354
 QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"

diff --git a/dev-lang/ghc/ghc-8.8.4.ebuild b/dev-lang/ghc/ghc-8.8.4.ebuild
index 9ada4d7c1c1..5d1674fac8d 100644
--- a/dev-lang/ghc/ghc-8.8.4.ebuild
+++ b/dev-lang/ghc/ghc-8.8.4.ebuild
@@ -112,7 +112,11 @@ DEPEND="${RDEPEND}
 		>=dev-libs/libxslt-1.1.2 )
 	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
 
-REQUIRED_USE="?? ( ghcbootstrap binary )"
+# we build binaries without profiling support
+REQUIRED_USE="
+	?? ( ghcbootstrap binary )
+	?? ( profile binary )
+"
 
 # haskell libraries built with cabal in configure mode, #515354
 QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2020-12-20 22:26 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2020-12-20 22:26 UTC (permalink / raw
  To: gentoo-commits

commit:     130ceae359e9f9d3b2956aaaee1e6b663e8db82d
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 20 22:26:30 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Dec 20 22:26:37 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=130ceae3

dev-lang/ghc: 8.10.2: add x86 binary built by Jack

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/Manifest          | 1 +
 dev-lang/ghc/ghc-8.10.2.ebuild | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index ba190adce3d..d00bed22b5b 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -47,6 +47,7 @@ DIST ghc-bin-8.0.2-ppc64.tbz2 117432068 BLAKE2B cae202f0d6e825127d543996b2fe7ae0
 DIST ghc-bin-8.0.2-x86_64-pc-linux-gnu.tbz2 130852973 BLAKE2B 24d2032bbfc664d924800c1a317334e2342c8ec1e529178f9d1bb99bb4772a9cc100603bf70111b8cfafa715c1cccc643f115c77cf6adcdfb17d1f1735ee6682 SHA512 c36e0e2600fc7c284562a323d396a03062cb6e8fa63c353e672be61e76d2ec5c7698485e3a370a57cf512db9e5ba6a68338fff2ab404d9fe67b1a468ed72638f
 DIST ghc-bin-8.10.1-i686-pc-linux-gnu.tbz2 123398571 BLAKE2B 3650f9dbaaa5af684abad589953bcef5b1684a91a4cc2695d0ef735536057bb031231fe3d73dd74bc38a199f0890ef91764b551e5e158c120affc0d7bc3175b7 SHA512 52cc172de08ef30d6e89384e86eda1b8bbdef2bbff526041eb47d85d77b70ab49314ac7f33f18b40864c16fa546256f1b4c7964e65aa5d3cfbb7f9cbec505dc9
 DIST ghc-bin-8.10.1-x86_64-pc-linux-gnu.tbz2 122227601 BLAKE2B 84340866c70044eb1444a70b0cbed6814808037b697db28f567d2b14bb791cbe7d9bf2a327cc47ae85ce3c4970ba039854b4a6df44eb85cdc18040c5a4d15f4f SHA512 81df9de95aec47d60ad8d699756ad323eb525c3a16536fac8c6717e1754272061bd8d7d70cd38f5c509a2fc323305333e4f898c9b6dc27645521bb29ee218bdb
+DIST ghc-bin-8.10.2-i686-pc-linux-gnu.tbz2 123683156 BLAKE2B a486076ea6e67f124c850e037be0e63a873181c3fd746f437861f7367a968e0df6723afc934c966432274a55936c0fe48a9a43a48199840b37636843da4caccc SHA512 29cc1703bbdbfcbef8aa2a5a563b83b0663970f5902a1fc70230515a128ef47e27a3a6df2b47a01009c3976b4936cf8e64e5da4dfdda0c1bcf73ab7ea5ac0b6d
 DIST ghc-bin-8.10.2-x86_64-pc-linux-gnu.tbz2 122818630 BLAKE2B 030a68e2aca0eb0a273e0d48a3e180d92b219b2d1826d1d58fa133d0a6cae1316b3ccceadb55a4fa5870f87c3df85df2998e7611b93dbc1fea592437748b2daf SHA512 23bf47ee45fae54a843de9e6991b67fccb79c14ad8d08eff9f38a68a3530496c8ce4bc8cae8a731bb690ddd6cd0bf36d6d5bf37eb68ddae8ce646a0bf3916d8f
 DIST ghc-bin-8.2.1-i686-pc-linux-gnu.tbz2 96157437 BLAKE2B 2b9608845db8cea78db07209fa054b3b05085d5c3ac07cbe3de02a93c87fb0cff12b1820f08757221c59c8a0a9e7a5563c44266b181525d916825e5cf5bac34c SHA512 e891e76557fa61853e28829b8bedc4a6abb92954f90cc1ebcf22a13cc137556bbe9262e7398b7e1aedbabeb997916b008bf1561a52f16a569f3d58ea9404f41e
 DIST ghc-bin-8.2.1-x86_64-pc-linux-gnu.tbz2 97490496 BLAKE2B 3666ea70cb8b3645db071040d2069fe244042c11954b34e5d92aaa90132d2316c0ee8c176cd4e674772bea3b99df150404f62bd8745c046cdaf102ecf0a0fa54 SHA512 52630a185d0eab56bce0469a612a54109895bfee041ec362ced59a9b35ba3b9c185e86bc7dbf0a5939081d3626baa19fbb3306e36d1857530248a7b9bfc100bb

diff --git a/dev-lang/ghc/ghc-8.10.2.ebuild b/dev-lang/ghc/ghc-8.10.2.ebuild
index 567a3225311..8f5cdd922f3 100644
--- a/dev-lang/ghc/ghc-8.10.2.ebuild
+++ b/dev-lang/ghc/ghc-8.10.2.ebuild
@@ -33,7 +33,7 @@ arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/g
 #arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
 #arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
 #arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-#arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
 # various ports:
 #arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
@@ -52,7 +52,7 @@ yet_binary() {
 		#	return 0
 		#	;;
 		#sparc) return 0 ;;
-		#x86) return 0 ;;
+		x86) return 0 ;;
 		*) return 1 ;;
 	esac
 }


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2020-12-24  8:28 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2020-12-24  8:28 UTC (permalink / raw
  To: gentoo-commits

commit:     536c0a08f4b135da5bee8a8b50c2301e2b8fd299
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 24 08:28:05 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Dec 24 08:28:05 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=536c0a08

dev-lang/ghc: bump up to 8.10.3, no keywords yet

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/Manifest          |   3 +
 dev-lang/ghc/ghc-8.10.3.ebuild | 797 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 800 insertions(+)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index d00bed22b5b..77789f96fa7 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -7,6 +7,8 @@ DIST ghc-8.10.1-src.tar.xz 19781652 BLAKE2B 61ff73d3a895cfa0c836e25a684d7a31cf09
 DIST ghc-8.10.1-testsuite.tar.xz 2091988 BLAKE2B 88796f0fb6ea2bdd749161c84ec88768f3bf87063d2224a083db24f69282e615227626fe3c7b41d4abec10883e22042abed6a231582bab4ea530feffd683ed0b SHA512 35147f98301c5bfb6c939e108de48b2a1133adc1028aaa720ce49d60faa06a4b486a9eded658295e3f203731b4dd53475b57e8213491c45b05959430030be269
 DIST ghc-8.10.2-src.tar.xz 21880680 BLAKE2B 0c1b67c1576cfd1067d11838301f96041cabf66b94cfd546cfe6bef57babe940fc3814918ff9327e59fe73a8e230fa1d62d7816d7c6cae274dd8c53de6e81736 SHA512 6c3f1311feab3665419a301b17fcb09d303ec822f8eb8c4021edfacff00d9b52e71895bed0e58f11d8f7970415bd8c6f95ffde1294afe795e15607199b20cefc
 DIST ghc-8.10.2-testsuite.tar.xz 2101788 BLAKE2B 0d4528223471dfd68cadcda47931d53508c9eafa415716ca5990ea519eb89bfa2bdd444280057be33467382dd3d178887262d54ef633aa8ce88ea91eb9d58ece SHA512 043faaf2f0dc34a868c481b284b94afd78aa1ec1a4056d1f3c97ca3f7dadb3e9cff0517a4cfb378fe5187389db7c9027763bf066328e7dcfd264b737f6d09e41
+DIST ghc-8.10.3-src.tar.xz 19872356 BLAKE2B 043f41a21becc826b3cd13ee81b138cf2edfa18484f98361dc85b12f784df85571522347d5fafe40a19ea8ddf12390cd766db8fc21cf4971e797bc61404304cc SHA512 6f3248e728d3677dfddf2f02609167c67a194750418f2a5e34ed68f1135960761c5a5768255bfc8b2ef5640395609424878375184d2dde8e2d69021a3baf9ec8
+DIST ghc-8.10.3-testsuite.tar.xz 2261376 BLAKE2B cd03d569c30637d531d9a13fa926a28f854a37d48ef0d4e2fde684664ae000f3c941b5113ccafd42fec019428bafb5344b1ddf8f84a71b21bca8831ed4784907 SHA512 4c9d20a27ed71eb7c73bd86c1049ea5adcc8a0b12040386b7d0dddb46b3cf704c52a3392e19ae4ff1c76b8868665c599391d47e47dba516fcadf8abbc30e28df
 DIST ghc-8.2.1-src.tar.xz 10736016 BLAKE2B 60993cfc9569e83b0c383591ef30a7280e0138fbb7bd696ad62d87e68dcbccf31c0b8ba211b6647922b8595c7aec2c783648f12c67da53e0766b71c7d7c923fc SHA512 d9aa2aa7f9414db8f4e51d6c275694b46df515e68331a1a2b6018256333a2c63ebd877b75ee90407ecce5be672ec9afc6bebd62aadbf8ae06b94f1760d1736be
 DIST ghc-8.2.2-src.tar.xz 10753272 BLAKE2B 6fd792390d3df20f84836466705c3f3c931ba2d594dcbe2b808ea0ae284460000b443df8aae74903eabf05ff9064d68a303086cf888ea68222eb1c60959c8f21 SHA512 6549416f470b599973d409fa45f59c25b07e6a94798cef1a19ad432547dc225338cf4dbc4a4793114b4a417798a3b59b122b92b020251074405c5302b7ffe799
 DIST ghc-8.4.1-src.tar.xz 11301528 BLAKE2B 6dcf467d04cace856b68315c85b80f19b517dcbc8ae6e2a08c60afa141c9e0261e012738452c9ca208f9fc40c48bd1a0817e5e0fe9f4737383cd7b44ca65c8d9 SHA512 f8ae11f498bf2911fb92635534c6906c96f1fbe5072c7b7447bd3f69e408026b674564515af02a8aaddc57ee6905ce78d10005b12478a39c220580aaec13a9f7
@@ -49,6 +51,7 @@ DIST ghc-bin-8.10.1-i686-pc-linux-gnu.tbz2 123398571 BLAKE2B 3650f9dbaaa5af684ab
 DIST ghc-bin-8.10.1-x86_64-pc-linux-gnu.tbz2 122227601 BLAKE2B 84340866c70044eb1444a70b0cbed6814808037b697db28f567d2b14bb791cbe7d9bf2a327cc47ae85ce3c4970ba039854b4a6df44eb85cdc18040c5a4d15f4f SHA512 81df9de95aec47d60ad8d699756ad323eb525c3a16536fac8c6717e1754272061bd8d7d70cd38f5c509a2fc323305333e4f898c9b6dc27645521bb29ee218bdb
 DIST ghc-bin-8.10.2-i686-pc-linux-gnu.tbz2 123683156 BLAKE2B a486076ea6e67f124c850e037be0e63a873181c3fd746f437861f7367a968e0df6723afc934c966432274a55936c0fe48a9a43a48199840b37636843da4caccc SHA512 29cc1703bbdbfcbef8aa2a5a563b83b0663970f5902a1fc70230515a128ef47e27a3a6df2b47a01009c3976b4936cf8e64e5da4dfdda0c1bcf73ab7ea5ac0b6d
 DIST ghc-bin-8.10.2-x86_64-pc-linux-gnu.tbz2 122818630 BLAKE2B 030a68e2aca0eb0a273e0d48a3e180d92b219b2d1826d1d58fa133d0a6cae1316b3ccceadb55a4fa5870f87c3df85df2998e7611b93dbc1fea592437748b2daf SHA512 23bf47ee45fae54a843de9e6991b67fccb79c14ad8d08eff9f38a68a3530496c8ce4bc8cae8a731bb690ddd6cd0bf36d6d5bf37eb68ddae8ce646a0bf3916d8f
+DIST ghc-bin-8.10.3-x86_64-pc-linux-gnu.tbz2 122993247 BLAKE2B e3395ebc7e87b4ae8f66dbbd9441c214c4d9535e55bfb14f78ebb92d30b1e100efc4893b3cdc65564d47bd53a21cb30106572b3fce13be022946171112c3218e SHA512 2ea4295bcaf6e3fd0db54ba67465e979cd85d3370c6c49f2381478ae9824ad89df53d7d93ccf06bdff5f4849f14306c9f50c13e6f6ba45f79e5b8c13ad63ae4f
 DIST ghc-bin-8.2.1-i686-pc-linux-gnu.tbz2 96157437 BLAKE2B 2b9608845db8cea78db07209fa054b3b05085d5c3ac07cbe3de02a93c87fb0cff12b1820f08757221c59c8a0a9e7a5563c44266b181525d916825e5cf5bac34c SHA512 e891e76557fa61853e28829b8bedc4a6abb92954f90cc1ebcf22a13cc137556bbe9262e7398b7e1aedbabeb997916b008bf1561a52f16a569f3d58ea9404f41e
 DIST ghc-bin-8.2.1-x86_64-pc-linux-gnu.tbz2 97490496 BLAKE2B 3666ea70cb8b3645db071040d2069fe244042c11954b34e5d92aaa90132d2316c0ee8c176cd4e674772bea3b99df150404f62bd8745c046cdaf102ecf0a0fa54 SHA512 52630a185d0eab56bce0469a612a54109895bfee041ec362ced59a9b35ba3b9c185e86bc7dbf0a5939081d3626baa19fbb3306e36d1857530248a7b9bfc100bb
 DIST ghc-bin-8.2.2-i686-pc-linux-gnu.tbz2 96638908 BLAKE2B b470f838e77330969f162196b0f1035fa764f5d123687fbf67c14323280bfe55216af0e16f8b79c62f290905d96abc8bfafee650f8d27c81608853e78329b2c9 SHA512 15b1525890477539878385efc15ce5f1cf2f126cc785c42923be958cabe3298cebe73526a2370cf4c630124160a7ca0f0f9062aebbf035dce807a0374eaddd14

diff --git a/dev-lang/ghc/ghc-8.10.3.ebuild b/dev-lang/ghc/ghc-8.10.3.ebuild
new file mode 100644
index 00000000000..93c697bbc6d
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.10.3.ebuild
@@ -0,0 +1,797 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+		export CTARGET=${CATEGORY/cross-}
+	fi
+fi
+
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib multiprocessing pax-utils toolchain-funcs prefix
+inherit check-reqs
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="https://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+BIN_PV=${PV}
+# sorted!
+#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+#arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+	case "${ARCH}" in
+		#alpha) return 0 ;;
+		#arm64) return 0 ;;
+		#arm) return 0 ;;
+		amd64) return 0 ;;
+		#ia64) return 0 ;;
+		#ppc) return 0 ;;
+		#ppc64)
+		#	use big-endian && return 0
+		#	return 0
+		#	;;
+		#sparc) return 0 ;;
+		#x86) return 0 ;;
+		*) return 1 ;;
+	esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=8.10.0.20200123 # uncomment only for -alpha, -beta, -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? (
+	https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-src.tar.xz
+	test? ( https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
+)"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+
+BUMP_LIBRARIES=(
+	# "hackage-name          hackage-version"
+)
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+#KEYWORDS="~amd64 ~x86"
+IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
+IUSE+=" binary"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	>=dev-lang/perl-5.6.1
+	dev-libs/gmp:0=
+	sys-libs/ncurses:0=[unicode]
+	elfutils? ( dev-libs/elfutils )
+	!ghcmakebinary? ( dev-libs/libffi:= )
+	numa? ( sys-process/numactl )
+"
+
+# This set of dependencies is needed to run
+# prebuilt ghc. We specifically avoid ncurses
+# dependency with:
+#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
+PREBUILT_BINARY_DEPENDS="
+	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+"
+# This set of dependencies is needed to install
+# ghc[binary] in system. terminfo package is linked
+# against ncurses.
+PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
+	sys-libs/ncurses:0/6
+"
+
+RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
+
+DEPEND="${RDEPEND}
+	doc? ( app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5
+		app-text/docbook-xsl-stylesheets
+		dev-python/sphinx
+		>=dev-libs/libxslt-1.1.2 )
+	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
+
+# we build binaries without profiling support
+REQUIRED_USE="
+	?? ( ghcbootstrap binary )
+	?? ( profile binary )
+"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+	[[ ${CHOST} != ${CTARGET} ]]
+}
+
+is_native() {
+	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
+}
+
+if ! is_crosscompile; then
+	PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
+fi
+
+# returns tool prefix for crosscompiler.
+# Example:
+#  CTARGET=armv7a-unknown-linux-gnueabi
+#  CHOST=x86_64-pc-linux-gnu
+#    "armv7a-unknown-linux-gnueabi-"
+#  CTARGET=${CHOST}
+#    ""
+# Used in tools and library prefix:
+#    "${ED}"/usr/bin/$(cross)haddock
+#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+
+cross() {
+	if is_crosscompile; then
+		echo "${CTARGET}-"
+	else
+		echo ""
+	fi
+}
+
+append-ghc-cflags() {
+	local persistent compile assemble link
+	local flag ghcflag
+
+	for flag in $*; do
+		case ${flag} in
+			persistent)	persistent="yes";;
+			compile)	compile="yes";;
+			assemble)	assemble="yes";;
+			link)		link="yes";;
+			*)
+				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				;;
+		esac
+	done
+}
+
+# $1 - lib name (under libraries/)
+# $2 - lib version
+# example: bump_lib "transformers" "0.4.2.0"
+bump_lib() {
+	local pn=$1 pv=$2
+	local p=${pn}-${pv}
+	local f
+
+	einfo "Bumping ${pn} up to ${pv}"
+
+	for f in ghc.mk GNUmakefile; do
+		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
+	done
+	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
+	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
+}
+
+update_SRC_URI() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
+	done
+}
+
+update_SRC_URI
+
+bump_libs() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		bump_lib "${pn}" "${pv}"
+	done
+}
+
+ghc_setup_cflags() {
+	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
+	if ! is_native; then
+		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
+		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
+		einfo "Crosscompiling mode:"
+		einfo "   CHOST:   ${CHOST}"
+		einfo "   CTARGET: ${CTARGET}"
+		einfo "   CFLAGS:  ${CFLAGS}"
+		einfo "   LDFLAGS: ${LDFLAGS}"
+		einfo "   prefix: $(cross)"
+		return
+	fi
+	# We need to be very careful with the CFLAGS we ask ghc to pass through to
+	# gcc. There are plenty of flags which will make gcc produce output that
+	# breaks ghc in various ways. The main ones we want to pass through are
+	# -mcpu / -march flags. These are important for arches like alpha & sparc.
+	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
+	strip-flags
+	strip-unsupported-flags
+
+	# Cmm can't parse line numbers #482086
+	replace-flags -ggdb[3-9] -ggdb2
+
+	GHC_FLAGS=""
+	GHC_PERSISTENT_FLAGS=""
+	for flag in ${CFLAGS}; do
+		case ${flag} in
+
+			# Ignore extra optimisation (ghc passes -O to gcc anyway)
+			# -O2 and above break on too many systems
+			-O*) ;;
+
+			# Arch and ABI flags are what we're really after
+			-m*) append-ghc-cflags compile assemble ${flag};;
+
+			# Sometimes it's handy to see backtrace of RTS
+			# to get an idea what happens there
+			-g*) append-ghc-cflags compile ${flag};;
+
+			# Ignore all other flags, including all -f* flags
+		esac
+	done
+
+	for flag in ${LDFLAGS}; do
+		append-ghc-cflags link ${flag}
+	done
+
+	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
+	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
+	# options to gcc.
+	if is_native; then
+		# prevent from failing to build unregisterised ghc:
+		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+	fi
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+	local from=$1
+	local   to=$2
+	shift 2
+	local file=
+	for file in "$@"
+	do
+		sed -i -e "s|$from|$to|g" \
+			"$file" || die "path relocation failed for '$file'"
+	done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+	local to=$1 ghc_v=${BIN_PV}
+
+	# libdir for prebuilt binary and for current system may mismatch
+	# It does for prefix installation for example: bug #476998
+	local bin_ghc_prefix=${WORKDIR}/usr
+	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+	# backup original script to use it later after relocation
+	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
+	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+	if [[ ${bin_libdir} != $(get_libdir) ]]; then
+		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+		# moving the dir itself is not strictly needed
+		# but then USE=binary would result in installing
+		# in '${bin_libdir}'
+		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
+			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
+			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
+			"${WORKDIR}/usr/bin/hsc2hs" \
+			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
+			"$gp_back" \
+			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
+	fi
+
+	# Relocate from /usr to ${EPREFIX}/usr
+	relocate_path "/usr" "${to}/usr" \
+		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
+		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
+		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
+		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
+		"${WORKDIR}/usr/bin/hp2ps" \
+		"${WORKDIR}/usr/bin/hpc" \
+		"${WORKDIR}/usr/bin/hsc2hs" \
+		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
+		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
+
+	# this one we will use to regenerate cache
+	# so it should point to current tree location
+	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+	if use prefix; then
+		hprefixify "${bin_libpath}"/${PN}*/settings
+	fi
+
+	# regenerate the binary package cache
+	"$gp_back" recache || die "failed to update cache after relocation"
+	rm "$gp_back"
+}
+
+ghc-check-reqs() {
+	# These are pessimistic values (slightly bigger than worst-case)
+	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
+	# numbers on various arches.
+	CHECKREQS_DISK_BUILD=8G
+	CHECKREQS_DISK_USR=2G
+	# USE=binary roughly takes
+	use binary && CHECKREQS_DISK_BUILD=4G
+
+	"$@"
+}
+
+pkg_pretend() {
+	ghc-check-reqs check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	ghc-check-reqs check-reqs_pkg_setup
+
+	# quiet portage about prebuilt binaries
+	use binary && QA_PREBUILT="*"
+
+	[[ ${MERGE_TYPE} == binary ]] && return
+
+	if use ghcbootstrap; then
+		ewarn "You requested ghc bootstrapping, this is usually only used"
+		ewarn "by Gentoo developers to make binary .tbz2 packages."
+
+		[[ -z $(type -P ghc) ]] && \
+			die "Could not find a ghc to bootstrap with."
+	else
+		if ! yet_binary; then
+			eerror "Please try emerging with USE=ghcbootstrap and report build"
+			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
+			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
+		fi
+	fi
+}
+
+src_unpack() {
+	# Create the ${S} dir if we're using the binary version
+	use binary && mkdir "${S}"
+
+	# the Solaris and Darwin binaries from ghc (maeder) need to be
+	# unpacked separately, so prevent them from being unpacked
+	local ONLYA=${A}
+	case ${CHOST} in
+		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
+	esac
+	unpack ${ONLYA}
+}
+
+src_prepare() {
+	ghc_setup_cflags
+
+	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+		# See bug #313635.
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
+
+		# allow hardened users use vanilla binary to bootstrap ghc
+		# ghci uses mmap with rwx protection at it implements dynamic
+		# linking on it's own (bug #299709)
+		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
+	fi
+
+	if use binary; then
+		if use prefix; then
+			relocate_ghc "${EPREFIX}"
+		fi
+
+		# Move unpacked files to the expected place
+		mv "${WORKDIR}/usr" "${S}"
+		eapply_user
+	else
+		if ! use ghcbootstrap; then
+			case ${CHOST} in
+				*-darwin* | *-solaris*)
+				# UPDATE ME for ghc-7
+				mkdir "${WORKDIR}"/ghc-bin-installer || die
+				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
+				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
+				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
+				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
+				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
+				popd > /dev/null
+
+				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
+				# fix the binaries so they run, on Solaris we need an
+				# LD_LIBRARY_PATH which has our prefix libdirs, on
+				# Darwin we need to replace the frameworks with our libs
+				# from the prefix fix before installation, because some
+				# of the tools are actually used during configure/make
+				if [[ ${CHOST} == *-solaris* ]] ; then
+					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
+				elif [[ ${CHOST} == *-darwin* ]] ; then
+					local readline_framework=GNUreadline.framework/GNUreadline
+					local gmp_framework=/opt/local/lib/libgmp.10.dylib
+					local ncurses_file=/opt/local/lib/libncurses.5.dylib
+					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
+						install_name_tool -change \
+							${readline_framework} \
+							"${EPREFIX}"/lib/libreadline.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${gmp_framework} \
+							"${EPREFIX}"/usr/lib/libgmp.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${ncurses_file} \
+							"${EPREFIX}"/usr/lib/libncurses.dylib \
+							${binary} || die
+					done
+					# we don't do frameworks!
+					sed -i \
+						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
+						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
+						rts/package.conf.in || die
+				fi
+
+				# it is autoconf, but we really don't want to give it too
+				# many arguments, in fact we do the make in-place anyway
+				./configure --prefix="${WORKDIR}"/usr || die
+				make install || die
+				popd > /dev/null
+				;;
+				*)
+				relocate_ghc "${WORKDIR}"
+				;;
+			esac
+		fi
+
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${S}/ghc/ghc.wrapper"
+
+		cd "${S}" # otherwise eapply will break
+
+		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
+		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+		eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
+		eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch
+
+		# a bunch of crosscompiler patches
+		# needs newer version:
+		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+
+		# mingw32 target
+		pushd "${S}/libraries/Win32"
+			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
+		popd
+
+		bump_libs
+
+		eapply_user
+		# as we have changed the build system
+		eautoreconf
+	fi
+}
+
+src_configure() {
+	if ! use binary; then
+		# initialize build.mk
+		echo '# Gentoo changes' > mk/build.mk
+
+		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
+		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+
+		# We also need to use the GHC_FLAGS flags when building ghc itself
+		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
+		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
+		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
+		# Speed up initial Cabal bootstrap
+		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
+
+		# We can't depend on haddock except when bootstrapping when we
+		# must build docs and include them into the binary .tbz2 package
+		# app-text/dblatex is not in portage, can not build PDF or PS
+		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
+		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
+		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
+
+		# this controls presence on 'xhtml' and 'haddock' in final install
+		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
+
+		# not used outside of ghc's test
+		if [[ -n ${GHC_BUILD_DPH} ]]; then
+				echo "BUILD_DPH = YES" >> mk/build.mk
+			else
+				echo "BUILD_DPH = NO" >> mk/build.mk
+		fi
+
+		# Any non-native build has to skip as it needs
+		# target haddock binary to be runnabine.
+		if ! is_native; then
+			# disable docs generation as it requires running stage2
+			echo "HADDOCK_DOCS=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
+		fi
+
+		if is_crosscompile; then
+			# Install ghc-stage1 crosscompiler instead of
+			# ghc-stage2 cross-built compiler.
+			echo "Stage1Only=YES" >> mk/build.mk
+		fi
+
+		# allows overriding build flavours for libraries:
+		# v   - vanilla (static libs)
+		# p   - profiled
+		# dyn - shared libraries
+		# example: GHC_LIBRARY_WAYS="v dyn"
+		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
+			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
+		fi
+		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
+
+		# Get ghc from the unpacked binary .tbz2
+		# except when bootstrapping we just pick ghc up off the path
+		if ! use ghcbootstrap; then
+			export PATH="${WORKDIR}/usr/bin:${PATH}"
+		fi
+
+		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
+
+		# don't strip anything. Very useful when stage2 SIGSEGVs on you
+		echo "STRIP_CMD = :" >> mk/build.mk
+
+		local econf_args=()
+
+		# GHC embeds toolchain it was built by and uses it later.
+		# Don't allow things like ccache or versioned binary slip.
+		# We use stable thing across gcc upgrades.
+		# User can use EXTRA_ECONF=CC=... to override this default.
+		econf_args+=(
+			AR=${CTARGET}-ar
+			CC=${CTARGET}-gcc
+			# these should be inferred by GHC but ghc defaults
+			# to using bundled tools on windows.
+			Windres=${CTARGET}-windres
+			DllWrap=${CTARGET}-dllwrap
+			# we set the linker explicitly below
+			--disable-ld-override
+		)
+		case ${CTARGET} in
+			arm*)
+				# ld.bfd-2.28 does not work for ghc. Force ld.gold
+				# instead. This should be removed once gentoo gets
+				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
+				econf_args+=(LD=${CTARGET}-ld.gold)
+			;;
+			sparc*)
+				# ld.gold-2.28 does not work for ghc. Force ld.bfd
+				# instead. This should be removed once gentoo gets
+				# a fix for missing --no-relax support bug:
+				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
+				econf_args+=(LD=${CTARGET}-ld.bfd)
+			;;
+			*)
+				econf_args+=(LD=${CTARGET}-ld)
+		esac
+
+		if [[ ${CBUILD} != ${CHOST} ]]; then
+			# GHC bug: ghc claims not to support cross-building.
+			# It does, but does not distinct --host= value
+			# for stage1 and stage2 compiler.
+			econf_args+=(--host=${CBUILD})
+		fi
+
+		if use ghcmakebinary; then
+			# When building booting libary we are trying to
+			# bundle or restrict most of external depends
+			# with unstable ABI:
+			#  - embed libffi (default GHC behaviour)
+			#  - disable ncurses support for ghci (via haskeline)
+			#    https://bugs.gentoo.org/557478
+			#  - disable ncurses support for ghc-pkg
+			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
+			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
+		elif is_native; then
+			# using ${GTARGET}'s libffi is not supported yet:
+			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
+			econf_args+=(--with-system-libffi)
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
+		fi
+
+		einfo "Final mk/build.mk:"
+		cat mk/build.mk || die
+
+		econf ${econf_args[@]} \
+			--enable-bootstrap-with-devel-snapshot \
+			$(use_enable elfutils dwarf-unwind) \
+			$(use_enable numa)
+
+		if [[ ${PV} == *9999* ]]; then
+			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+			GHC_P=${PN}-${GHC_PV}
+		fi
+	fi # ! use binary
+}
+
+src_compile() {
+	if ! use binary; then
+		# Stage1Only crosscompiler does not build stage2
+		if ! is_crosscompile; then
+			# 1. build/pax-mark compiler binary first
+			emake ghc/stage2/build/tmp/ghc-stage2
+			# 2. pax-mark (bug #516430)
+			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
+			# 2. build/pax-mark haddock using ghc-stage2
+			if is_native; then
+				# non-native build does not build haddock
+				# due to HADDOCK_DOCS=NO, but it could.
+				emake utils/haddock/dist/build/tmp/haddock
+				pax-mark -m utils/haddock/dist/build/tmp/haddock
+			fi
+		fi
+		# 3. and then all the rest
+		emake all
+	fi # ! use binary
+}
+
+src_test() {
+	# TODO: deal with:
+	#    - sandbox (pollutes environment)
+	#    - extra packages (to extend testsuite coverage)
+	# bits are taken from 'validate'
+	local make_test_target='test' # can be fulltest
+	# not 'emake' as testsuite uses '$MAKE' without jobserver available
+	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
+}
+
+src_install() {
+	if use binary; then
+		use prefix && mkdir -p "${ED}"
+		mv "${S}/usr" "${ED}"
+	else
+		[[ -f VERSION ]] || emake VERSION
+
+		# -j1 due to a rare race in install script:
+		#    make --no-print-directory -f ghc.mk phase=final install
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
+		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
+		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
+		#    /usr/bin/install: cannot create regular file \
+		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
+		emake -j1 install DESTDIR="${D}"
+
+		# Skip for cross-targets as they all share target location:
+		# /usr/share/doc/ghc-9999/
+		if ! is_crosscompile; then
+			dodoc "distrib/README" "LICENSE" "VERSION"
+		fi
+
+		# rename ghc-shipped files to avoid collision
+		# of external packages. Motivating example:
+		#  user had installed:
+		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
+		#      dev-haskell/transformers-0.4.2.0
+		#  then user tried to update to
+		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
+		#  this will lead to single .conf file collision.
+		local shipped_conf renamed_conf
+		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+		for shipped_conf in "${package_confdir}"/*.conf; do
+			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
+			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
+			mv "${shipped_conf}" "${renamed_conf}" || die
+		done
+
+		# remove link, but leave 'haddock-${GHC_P}'
+		rm -f "${ED}"/usr/bin/$(cross)haddock
+
+		if ! is_crosscompile; then
+			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
+			newbashcomp utils/completion/ghc.bash         ghc
+		fi
+	fi
+
+	# path to the package.cache
+	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+	PKGCACHE="${package_confdir}"/package.cache
+	# copy the package.conf.d, including timestamp, save it so we can help
+	# users that have a broken package.conf.d
+	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
+
+	# copy the package.conf, including timestamp, save it so we later can put it
+	# back before uninstalling, or when upgrading.
+	cp -p "${PKGCACHE}"{,.shipped} \
+		|| die "failed to copy package.conf.d/package.cache"
+
+	if is_crosscompile; then
+		# When we build a cross-compiler the layout is the following:
+		#     usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
+		# but
+		#     usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
+		# containst host binaries (modulo bugs).
+
+		# Portage's stripping mechanism does not skip stripping
+		# foreign binaries. This frequently causes binaries to be
+		# broken.
+		#
+		# Thus below we disable stripping of target libraries and allow
+		# stripping hosts executables.
+		dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
+		dostrip    "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
+	fi
+}
+
+pkg_preinst() {
+	# have we got an earlier version of ghc installed?
+	if has_version "<${CATEGORY}/${PF}"; then
+		haskell_updater_warn="1"
+	fi
+}
+
+pkg_postinst() {
+	ghc-reregister
+
+	# path to the package.cache
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+
+	# give the cache a new timestamp, it must be as recent as
+	# the package.conf.d directory.
+	touch "${PKGCACHE}"
+
+	if [[ "${haskell_updater_warn}" == "1" ]]; then
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+		ewarn "You have just upgraded from an older version of GHC."
+		ewarn "You may have to run"
+		ewarn "      'haskell-updater'"
+		ewarn "to rebuild all ghc-based Haskell libraries."
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+	fi
+}
+
+pkg_prerm() {
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+	rm -rf "${PKGCACHE}"
+
+	cp -p "${PKGCACHE}"{.shipped,}
+}
+
+pkg_postrm() {
+	ghc-package_pkg_postrm
+}


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2020-12-24 22:40 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2020-12-24 22:40 UTC (permalink / raw
  To: gentoo-commits

commit:     d16dffd44d45cd378b7dad35651d1996ffe8e75d
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 24 22:40:14 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Dec 24 22:40:22 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d16dffd4

dev-lang/ghc: 8.10.3: add x86 binary built by Jack

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/Manifest          | 1 +
 dev-lang/ghc/ghc-8.10.3.ebuild | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 77789f96fa7..9ec9e69c069 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -51,6 +51,7 @@ DIST ghc-bin-8.10.1-i686-pc-linux-gnu.tbz2 123398571 BLAKE2B 3650f9dbaaa5af684ab
 DIST ghc-bin-8.10.1-x86_64-pc-linux-gnu.tbz2 122227601 BLAKE2B 84340866c70044eb1444a70b0cbed6814808037b697db28f567d2b14bb791cbe7d9bf2a327cc47ae85ce3c4970ba039854b4a6df44eb85cdc18040c5a4d15f4f SHA512 81df9de95aec47d60ad8d699756ad323eb525c3a16536fac8c6717e1754272061bd8d7d70cd38f5c509a2fc323305333e4f898c9b6dc27645521bb29ee218bdb
 DIST ghc-bin-8.10.2-i686-pc-linux-gnu.tbz2 123683156 BLAKE2B a486076ea6e67f124c850e037be0e63a873181c3fd746f437861f7367a968e0df6723afc934c966432274a55936c0fe48a9a43a48199840b37636843da4caccc SHA512 29cc1703bbdbfcbef8aa2a5a563b83b0663970f5902a1fc70230515a128ef47e27a3a6df2b47a01009c3976b4936cf8e64e5da4dfdda0c1bcf73ab7ea5ac0b6d
 DIST ghc-bin-8.10.2-x86_64-pc-linux-gnu.tbz2 122818630 BLAKE2B 030a68e2aca0eb0a273e0d48a3e180d92b219b2d1826d1d58fa133d0a6cae1316b3ccceadb55a4fa5870f87c3df85df2998e7611b93dbc1fea592437748b2daf SHA512 23bf47ee45fae54a843de9e6991b67fccb79c14ad8d08eff9f38a68a3530496c8ce4bc8cae8a731bb690ddd6cd0bf36d6d5bf37eb68ddae8ce646a0bf3916d8f
+DIST ghc-bin-8.10.3-i686-pc-linux-gnu.tbz2 123802832 BLAKE2B a770dd43bee7a1d60fec2eb9aaa7de715eed01c19d9514e04678801827879977a5c91f5e191d026ca83aa5e5fc5f518593053b2e78b27b08df64b39058dbaec3 SHA512 f810432a56ddcd773e6118f038cdacd2f5e3a508d87bfa468ee861aef0cfc434ec5766a8a74360d8cec6cb9c664928290901c025496100e7c8465408635227f5
 DIST ghc-bin-8.10.3-x86_64-pc-linux-gnu.tbz2 122993247 BLAKE2B e3395ebc7e87b4ae8f66dbbd9441c214c4d9535e55bfb14f78ebb92d30b1e100efc4893b3cdc65564d47bd53a21cb30106572b3fce13be022946171112c3218e SHA512 2ea4295bcaf6e3fd0db54ba67465e979cd85d3370c6c49f2381478ae9824ad89df53d7d93ccf06bdff5f4849f14306c9f50c13e6f6ba45f79e5b8c13ad63ae4f
 DIST ghc-bin-8.2.1-i686-pc-linux-gnu.tbz2 96157437 BLAKE2B 2b9608845db8cea78db07209fa054b3b05085d5c3ac07cbe3de02a93c87fb0cff12b1820f08757221c59c8a0a9e7a5563c44266b181525d916825e5cf5bac34c SHA512 e891e76557fa61853e28829b8bedc4a6abb92954f90cc1ebcf22a13cc137556bbe9262e7398b7e1aedbabeb997916b008bf1561a52f16a569f3d58ea9404f41e
 DIST ghc-bin-8.2.1-x86_64-pc-linux-gnu.tbz2 97490496 BLAKE2B 3666ea70cb8b3645db071040d2069fe244042c11954b34e5d92aaa90132d2316c0ee8c176cd4e674772bea3b99df150404f62bd8745c046cdaf102ecf0a0fa54 SHA512 52630a185d0eab56bce0469a612a54109895bfee041ec362ced59a9b35ba3b9c185e86bc7dbf0a5939081d3626baa19fbb3306e36d1857530248a7b9bfc100bb

diff --git a/dev-lang/ghc/ghc-8.10.3.ebuild b/dev-lang/ghc/ghc-8.10.3.ebuild
index 93c697bbc6d..1f1c51fca85 100644
--- a/dev-lang/ghc/ghc-8.10.3.ebuild
+++ b/dev-lang/ghc/ghc-8.10.3.ebuild
@@ -33,7 +33,7 @@ arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/g
 #arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
 #arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
 #arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-#arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
 # various ports:
 #arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
@@ -52,7 +52,7 @@ yet_binary() {
 		#	return 0
 		#	;;
 		#sparc) return 0 ;;
-		#x86) return 0 ;;
+		x86) return 0 ;;
 		*) return 1 ;;
 	esac
 }


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2021-01-07  8:20 Fabian Groffen
  0 siblings, 0 replies; 92+ messages in thread
From: Fabian Groffen @ 2021-01-07  8:20 UTC (permalink / raw
  To: gentoo-commits

commit:     072db761acea8638c30d8f869bd82a82d36dd28b
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  7 08:16:01 2021 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Jan  7 08:16:01 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=072db761

dev-lang/ghc: drop handling for x86-macos

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 dev-lang/ghc/ghc-7.10.3.ebuild | 3 +--
 dev-lang/ghc/ghc-7.8.4.ebuild  | 3 +--
 dev-lang/ghc/ghc-8.0.2.ebuild  | 3 +--
 dev-lang/ghc/ghc-8.10.1.ebuild | 3 +--
 dev-lang/ghc/ghc-8.10.2.ebuild | 3 +--
 dev-lang/ghc/ghc-8.10.3.ebuild | 3 +--
 dev-lang/ghc/ghc-8.2.1.ebuild  | 3 +--
 dev-lang/ghc/ghc-8.2.2.ebuild  | 3 +--
 dev-lang/ghc/ghc-8.4.1.ebuild  | 3 +--
 dev-lang/ghc/ghc-8.4.2.ebuild  | 3 +--
 dev-lang/ghc/ghc-8.4.3.ebuild  | 3 +--
 dev-lang/ghc/ghc-8.6.4.ebuild  | 3 +--
 dev-lang/ghc/ghc-8.6.5.ebuild  | 3 +--
 dev-lang/ghc/ghc-8.8.1.ebuild  | 3 +--
 dev-lang/ghc/ghc-8.8.2.ebuild  | 3 +--
 dev-lang/ghc/ghc-8.8.3.ebuild  | 3 +--
 dev-lang/ghc/ghc-8.8.4.ebuild  | 3 +--
 17 files changed, 17 insertions(+), 34 deletions(-)

diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
index 3baf85185f3..590b6e0a913 100644
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -405,7 +405,6 @@ src_prepare() {
 				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
 				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
 				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
 				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
 				popd > /dev/null
 

diff --git a/dev-lang/ghc/ghc-7.8.4.ebuild b/dev-lang/ghc/ghc-7.8.4.ebuild
index dd6149e21e7..89b41d25871 100644
--- a/dev-lang/ghc/ghc-7.8.4.ebuild
+++ b/dev-lang/ghc/ghc-7.8.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -321,7 +321,6 @@ src_prepare() {
 				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
 				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
 				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
 				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
 				popd > /dev/null
 

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index 8003bfbdd7a..ede481d98ea 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -410,7 +410,6 @@ src_prepare() {
 				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
 				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
 				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
 				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
 				popd > /dev/null
 

diff --git a/dev-lang/ghc/ghc-8.10.1.ebuild b/dev-lang/ghc/ghc-8.10.1.ebuild
index 9749ccd0b25..1db40de3428 100644
--- a/dev-lang/ghc/ghc-8.10.1.ebuild
+++ b/dev-lang/ghc/ghc-8.10.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -426,7 +426,6 @@ src_prepare() {
 				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
 				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
 				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
 				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
 				popd > /dev/null
 

diff --git a/dev-lang/ghc/ghc-8.10.2.ebuild b/dev-lang/ghc/ghc-8.10.2.ebuild
index 8f5cdd922f3..fc819806ed0 100644
--- a/dev-lang/ghc/ghc-8.10.2.ebuild
+++ b/dev-lang/ghc/ghc-8.10.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -426,7 +426,6 @@ src_prepare() {
 				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
 				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
 				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
 				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
 				popd > /dev/null
 

diff --git a/dev-lang/ghc/ghc-8.10.3.ebuild b/dev-lang/ghc/ghc-8.10.3.ebuild
index 1f1c51fca85..4b91c85afe9 100644
--- a/dev-lang/ghc/ghc-8.10.3.ebuild
+++ b/dev-lang/ghc/ghc-8.10.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -426,7 +426,6 @@ src_prepare() {
 				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
 				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
 				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
 				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
 				popd > /dev/null
 

diff --git a/dev-lang/ghc/ghc-8.2.1.ebuild b/dev-lang/ghc/ghc-8.2.1.ebuild
index 90df1309d8c..aa2a45cf962 100644
--- a/dev-lang/ghc/ghc-8.2.1.ebuild
+++ b/dev-lang/ghc/ghc-8.2.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -415,7 +415,6 @@ src_prepare() {
 				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
 				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
 				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
 				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
 				popd > /dev/null
 

diff --git a/dev-lang/ghc/ghc-8.2.2.ebuild b/dev-lang/ghc/ghc-8.2.2.ebuild
index 83918fa3f68..1338261d87d 100644
--- a/dev-lang/ghc/ghc-8.2.2.ebuild
+++ b/dev-lang/ghc/ghc-8.2.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -416,7 +416,6 @@ src_prepare() {
 				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
 				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
 				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
 				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
 				popd > /dev/null
 

diff --git a/dev-lang/ghc/ghc-8.4.1.ebuild b/dev-lang/ghc/ghc-8.4.1.ebuild
index 49cb782a2de..0e86ec36e7d 100644
--- a/dev-lang/ghc/ghc-8.4.1.ebuild
+++ b/dev-lang/ghc/ghc-8.4.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -416,7 +416,6 @@ src_prepare() {
 				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
 				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
 				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
 				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
 				popd > /dev/null
 

diff --git a/dev-lang/ghc/ghc-8.4.2.ebuild b/dev-lang/ghc/ghc-8.4.2.ebuild
index 75e81360795..f6d8c953ac9 100644
--- a/dev-lang/ghc/ghc-8.4.2.ebuild
+++ b/dev-lang/ghc/ghc-8.4.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -419,7 +419,6 @@ src_prepare() {
 				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
 				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
 				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
 				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
 				popd > /dev/null
 

diff --git a/dev-lang/ghc/ghc-8.4.3.ebuild b/dev-lang/ghc/ghc-8.4.3.ebuild
index 0c291814a78..58e642364d0 100644
--- a/dev-lang/ghc/ghc-8.4.3.ebuild
+++ b/dev-lang/ghc/ghc-8.4.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -419,7 +419,6 @@ src_prepare() {
 				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
 				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
 				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
 				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
 				popd > /dev/null
 

diff --git a/dev-lang/ghc/ghc-8.6.4.ebuild b/dev-lang/ghc/ghc-8.6.4.ebuild
index 5a1785491a9..52d995e6081 100644
--- a/dev-lang/ghc/ghc-8.6.4.ebuild
+++ b/dev-lang/ghc/ghc-8.6.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -425,7 +425,6 @@ src_prepare() {
 				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
 				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
 				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
 				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
 				popd > /dev/null
 

diff --git a/dev-lang/ghc/ghc-8.6.5.ebuild b/dev-lang/ghc/ghc-8.6.5.ebuild
index afbbcaccf02..89e16a5acd9 100644
--- a/dev-lang/ghc/ghc-8.6.5.ebuild
+++ b/dev-lang/ghc/ghc-8.6.5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -430,7 +430,6 @@ src_prepare() {
 				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
 				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
 				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
 				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
 				popd > /dev/null
 

diff --git a/dev-lang/ghc/ghc-8.8.1.ebuild b/dev-lang/ghc/ghc-8.8.1.ebuild
index ca9d69ec96c..00ce5686261 100644
--- a/dev-lang/ghc/ghc-8.8.1.ebuild
+++ b/dev-lang/ghc/ghc-8.8.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -431,7 +431,6 @@ src_prepare() {
 				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
 				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
 				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
 				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
 				popd > /dev/null
 

diff --git a/dev-lang/ghc/ghc-8.8.2.ebuild b/dev-lang/ghc/ghc-8.8.2.ebuild
index 9abdb5cf242..61b81fb8fb2 100644
--- a/dev-lang/ghc/ghc-8.8.2.ebuild
+++ b/dev-lang/ghc/ghc-8.8.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -431,7 +431,6 @@ src_prepare() {
 				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
 				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
 				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
 				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
 				popd > /dev/null
 

diff --git a/dev-lang/ghc/ghc-8.8.3.ebuild b/dev-lang/ghc/ghc-8.8.3.ebuild
index f59a40a4139..eb0ede0ad7f 100644
--- a/dev-lang/ghc/ghc-8.8.3.ebuild
+++ b/dev-lang/ghc/ghc-8.8.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -435,7 +435,6 @@ src_prepare() {
 				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
 				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
 				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
 				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
 				popd > /dev/null
 

diff --git a/dev-lang/ghc/ghc-8.8.4.ebuild b/dev-lang/ghc/ghc-8.8.4.ebuild
index 5d1674fac8d..0ad88139e25 100644
--- a/dev-lang/ghc/ghc-8.8.4.ebuild
+++ b/dev-lang/ghc/ghc-8.8.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -435,7 +435,6 @@ src_prepare() {
 				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
 				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
 				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
 				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
 				popd > /dev/null
 


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2021-02-28 20:20 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2021-02-28 20:20 UTC (permalink / raw
  To: gentoo-commits

commit:     a683100561aeca5afb935114bfb3fcb53c4fb891
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 28 20:20:09 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Feb 28 20:20:47 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6831005

dev-lang/ghc: bump up to 9.0.1 (no keywords yet)

Package-Manager: Portage-3.0.16, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/Manifest         |   4 +
 dev-lang/ghc/ghc-9.0.1.ebuild | 798 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 802 insertions(+)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index ed19e2f59d9..7b0db8c3e02 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -28,6 +28,8 @@ DIST ghc-8.8.3-src.tar.xz 19343672 BLAKE2B 4b33b4a386926f0ee625c7c18a3997f02bf66
 DIST ghc-8.8.3-testsuite.tar.xz 1965236 BLAKE2B 9cd10769336513284d8e0fbca1c3fce9e298ec67eb63eb10d41087fccba0f6281f1509aee684778fd23710ffe65843c43b4042e6692940af67766056c4503273 SHA512 4ebf3eabcd7591762dfcf45716b06293fb14c00b51307f7788c90dcf4e01f67e6bbb7a887b74d8d30272919486441ac236b42a54c4874aac69d90391b76f81c9
 DIST ghc-8.8.4-src.tar.xz 19395252 BLAKE2B 6fa898b9552398a724f0452f5cc88ba073264a5645288c73507258959efec40ce5a56a0eaafdabe58f15c5a9210b2c9da5954411dff5c81c52e061569d6a350a SHA512 efd23bd819f7429486696a3a929a040471db7ea8a2d1f1d832e4cf0825b9e1e0c5e6ecad0ab8376f58b74e9c28c1d2f773bd126596d6d853c9e57d57e5ceb090
 DIST ghc-8.8.4-testsuite.tar.xz 1965820 BLAKE2B 3b715700561788b8abdc986961d533b91399461d57a1686ededb4ccc36881503cdc3fc126b9a7b204a728c24b9a9ca97320142348644367aca9b47c87a5b3b51 SHA512 79d8fb0ba8de0fb48c938bd54c8c3278f1895d8ce5c700ce8cf6b3fc550073bb757208e85d4f9818400ebecca96f51d9248b8bbdac9eb2995671756164d08c16
+DIST ghc-9.0.1-src.tar.xz 20782336 BLAKE2B 53eaf903081d705d641459fbc1e6fa7387a6039f9cd466b4708bda86e81252a84d80878d6eb956ec2e1e5b721a313e68eeb796f8345244ca62f536a7a3f0c6df SHA512 bee7950a5118be8d8cefe0db5070139a5a93ca21c5bc6f8bf453429831f0c44f5e0fb5ee569865d6b8b92749044ee4123be06920928ac7a1ec9cffa9404a3e53
+DIST ghc-9.0.1-testsuite.tar.xz 2322432 BLAKE2B 350df763c607dd89ba58ad6e856d815556159a9f088dc0b069de48ae87c1e874a45fad51159e65a3c9a9beed68602eeb2a2728dbce86277bd287455f46f6c53a SHA512 13fbe0f0ab5e2426820d0fb37f0a75e1198ef2a660398508806e8ef094fd23647ca3d386815a2118168d12253d8df3273043678dbb37cf3924c689dd0fd1932e
 DIST ghc-bin-7.10.3-alpha.tbz2 183558856 BLAKE2B 2bb02aafa49c6a91bec016e8bec2d07257d602e53c9df55792ec6fbbf8e2e46de1d5f3f72c0ccf74d6bd7f7987f53412063ccb02ae85455fce11fa928cbf5291 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230
 DIST ghc-bin-7.10.3-amd64.tbz2 112040431 BLAKE2B 3e59b70ca309a1cd704266c54a7983f9a58362bf700ced89c5649c780c664c650ec091e14026a7b84e339d2ebff39eba1772eebcd9fb4b99b9c99d179453d5cc SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558
 DIST ghc-bin-7.10.3-ia64.tbz2 238680956 BLAKE2B 08593718d376051edfb0c86131e54dafc5c15056757fbeef90c653a7d217e49ff34ffaf7cd4083144c9277e73a290b822a0f889aaf806341375708e4b92654b2 SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5
@@ -81,5 +83,7 @@ DIST ghc-bin-8.8.3-i686-pc-linux-gnu.tbz2 120243899 BLAKE2B 7f932523a71dcfd4cdd4
 DIST ghc-bin-8.8.3-x86_64-pc-linux-gnu.tbz2 118988294 BLAKE2B 4e5aa3844934ae2726bf9c8690acd5a887f10cd49386ffadbc536f9309d33b3894b49507964eaf0d8a052747eb33aeabbe4d2cd22493297c295cf9414fcb766c SHA512 dd656157fe744c1df1c8ed34d1129ec358b26f3042c6da68e704e0f6a45d8114789000479e28a06dc16961afb283b3c666b427025590498a3d2da9b741b435c7
 DIST ghc-bin-8.8.4-i686-pc-linux-gnu.tbz2 120336081 BLAKE2B 55dfbb90d5e55c2af5e93c69249828a85cd9171c164b80dfdaf86512972b2c6854c8e4f07426af4ab52a5fb1a85d96a58c2cf003fb02372c55428001cfaea491 SHA512 ad3b83344349976d3253934195b2dc6299648391572b13735943c5ea2239c031c19b0cafd86c16cfb0c061e73bc72e9248f9c1731494a9a15fbe188f02913c12
 DIST ghc-bin-8.8.4-x86_64-pc-linux-gnu.tbz2 118897883 BLAKE2B a180b2dd1a3bc222044ece809ad700aee29d0c3e75b57ee9af3ca33c9c0f59dbf36f68202f746d99f80915cb717a9c41fc12db507f1cb469981732703a06b9cc SHA512 9d4be02dbd9704c93ef18feb92ea30bd5d590df31f288bf1b364818424c5019ca9ada26eec88418199f90ae8f4459d0a9352104e3f3186bbdc241891eb1b66c4
+DIST ghc-bin-9.0.1-i686-pc-linux-gnu.tbz2 122955511 BLAKE2B b870f46cc78fcc1d715aafe7108951582cfd12495b4e9d804d4b66562c66a6a2b2d9513031aedc8f3630a0cdbb3257943304b05732301a084f89487452f2f2d9 SHA512 aafd4233c40f93b71e6ac1acc8a75e30d49b826e4bce6d9832836966fd5f6c4898963bd4c2f34577f4199c1d9a3f537ac1e7d87eab11e9fb5e849573580ed3fb
+DIST ghc-bin-9.0.1-x86_64-pc-linux-gnu.tbz2 121542968 BLAKE2B 837870e68138f8d97dc8b2aae90090cf02416628602ca4ba4417ac92b49155f10028b05ac465665b8872b32372a5cee075616983f2eacdebb0188bd2ce6a93d2 SHA512 0e8c6d2e6f32fac95588f7323a4e02dddfc9ec2476a82b97bf5a106d3810f7e638fda7124c53b5bbc563fce70f4436553c282d8ea2f1f5fdf4fcccfb15a2b079
 DIST hoopl-3.10.2.0.tar.gz 241940 BLAKE2B 0ed7bf80486767c81415f99da8780a525401c388dea0b3f380bbecceae9cc7f66d8b5d0d7b31f8cb41796309b7a93adb113485efd14882f8af321989ce900a9b SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a
 DIST transformers-0.4.3.0.tar.gz 28632 BLAKE2B 92cabcb654bb11854a3bffbb1262f5cd62eda1aff447157086a61ebc451ebf2fddec53b6a2cc058174f24f0f0e32df671d3717e30a542c8dc90cb87e327d990c SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780

diff --git a/dev-lang/ghc/ghc-9.0.1.ebuild b/dev-lang/ghc/ghc-9.0.1.ebuild
new file mode 100644
index 00000000000..e9b2703051b
--- /dev/null
+++ b/dev-lang/ghc/ghc-9.0.1.ebuild
@@ -0,0 +1,798 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+		export CTARGET=${CATEGORY/cross-}
+	fi
+fi
+
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib multiprocessing pax-utils toolchain-funcs prefix
+inherit check-reqs
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="https://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+BIN_PV=${PV}
+# sorted!
+#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+	case "${ARCH}" in
+		#alpha) return 0 ;;
+		#arm64) return 0 ;;
+		#arm) return 0 ;;
+		amd64) return 0 ;;
+		#ia64) return 0 ;;
+		#ppc) return 0 ;;
+		#ppc64)
+		#	use big-endian && return 0
+		#	return 0
+		#	;;
+		#sparc) return 0 ;;
+		x86) return 0 ;;
+		*) return 1 ;;
+	esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=8.10.0.20200123 # uncomment only for -alpha, -beta, -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? (
+	https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-src.tar.xz
+	test? ( https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
+)"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+
+BUMP_LIBRARIES=(
+	# "hackage-name          hackage-version"
+)
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS=""
+IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
+IUSE+=" binary"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	>=dev-lang/perl-5.6.1
+	dev-libs/gmp:0=
+	sys-libs/ncurses:0=[unicode]
+	elfutils? ( dev-libs/elfutils )
+	!ghcmakebinary? ( dev-libs/libffi:= )
+	numa? ( sys-process/numactl )
+"
+
+# This set of dependencies is needed to run
+# prebuilt ghc. We specifically avoid ncurses
+# dependency with:
+#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
+PREBUILT_BINARY_DEPENDS="
+	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+"
+# This set of dependencies is needed to install
+# ghc[binary] in system. terminfo package is linked
+# against ncurses.
+PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
+	sys-libs/ncurses:0/6
+"
+
+RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
+
+DEPEND="${RDEPEND}
+	doc? ( app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5
+		app-text/docbook-xsl-stylesheets
+		dev-python/sphinx
+		>=dev-libs/libxslt-1.1.2 )
+	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
+
+# we build binaries without profiling support
+REQUIRED_USE="
+	?? ( ghcbootstrap binary )
+	?? ( profile binary )
+"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+	[[ ${CHOST} != ${CTARGET} ]]
+}
+
+is_native() {
+	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
+}
+
+if ! is_crosscompile; then
+	PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
+fi
+
+# returns tool prefix for crosscompiler.
+# Example:
+#  CTARGET=armv7a-unknown-linux-gnueabi
+#  CHOST=x86_64-pc-linux-gnu
+#    "armv7a-unknown-linux-gnueabi-"
+#  CTARGET=${CHOST}
+#    ""
+# Used in tools and library prefix:
+#    "${ED}"/usr/bin/$(cross)haddock
+#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+
+cross() {
+	if is_crosscompile; then
+		echo "${CTARGET}-"
+	else
+		echo ""
+	fi
+}
+
+append-ghc-cflags() {
+	local persistent compile assemble link
+	local flag ghcflag
+
+	for flag in $*; do
+		case ${flag} in
+			persistent)	persistent="yes";;
+			compile)	compile="yes";;
+			assemble)	assemble="yes";;
+			link)		link="yes";;
+			*)
+				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				;;
+		esac
+	done
+}
+
+# $1 - lib name (under libraries/)
+# $2 - lib version
+# example: bump_lib "transformers" "0.4.2.0"
+bump_lib() {
+	local pn=$1 pv=$2
+	local p=${pn}-${pv}
+	local f
+
+	einfo "Bumping ${pn} up to ${pv}"
+
+	for f in ghc.mk GNUmakefile; do
+		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
+	done
+	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
+	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
+}
+
+update_SRC_URI() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
+	done
+}
+
+update_SRC_URI
+
+bump_libs() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		bump_lib "${pn}" "${pv}"
+	done
+}
+
+ghc_setup_cflags() {
+	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
+	if ! is_native; then
+		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
+		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
+		einfo "Crosscompiling mode:"
+		einfo "   CHOST:   ${CHOST}"
+		einfo "   CTARGET: ${CTARGET}"
+		einfo "   CFLAGS:  ${CFLAGS}"
+		einfo "   LDFLAGS: ${LDFLAGS}"
+		einfo "   prefix: $(cross)"
+		return
+	fi
+	# We need to be very careful with the CFLAGS we ask ghc to pass through to
+	# gcc. There are plenty of flags which will make gcc produce output that
+	# breaks ghc in various ways. The main ones we want to pass through are
+	# -mcpu / -march flags. These are important for arches like alpha & sparc.
+	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
+	strip-flags
+	strip-unsupported-flags
+
+	# Cmm can't parse line numbers #482086
+	replace-flags -ggdb[3-9] -ggdb2
+
+	GHC_FLAGS=""
+	GHC_PERSISTENT_FLAGS=""
+	for flag in ${CFLAGS}; do
+		case ${flag} in
+
+			# Ignore extra optimisation (ghc passes -O to gcc anyway)
+			# -O2 and above break on too many systems
+			-O*) ;;
+
+			# Arch and ABI flags are what we're really after
+			-m*) append-ghc-cflags compile assemble ${flag};;
+
+			# Sometimes it's handy to see backtrace of RTS
+			# to get an idea what happens there
+			-g*) append-ghc-cflags compile ${flag};;
+
+			# Ignore all other flags, including all -f* flags
+		esac
+	done
+
+	for flag in ${LDFLAGS}; do
+		append-ghc-cflags link ${flag}
+	done
+
+	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
+	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
+	# options to gcc.
+	if is_native; then
+		# prevent from failing to build unregisterised ghc:
+		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+	fi
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+	local from=$1
+	local   to=$2
+	shift 2
+	local file=
+	for file in "$@"
+	do
+		sed -i -e "s|$from|$to|g" \
+			"$file" || die "path relocation failed for '$file'"
+	done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+	local to=$1 ghc_v=${BIN_PV}
+
+	# libdir for prebuilt binary and for current system may mismatch
+	# It does for prefix installation for example: bug #476998
+	local bin_ghc_prefix=${WORKDIR}/usr
+	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+	# backup original script to use it later after relocation
+	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
+	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+	if [[ ${bin_libdir} != $(get_libdir) ]]; then
+		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+		# moving the dir itself is not strictly needed
+		# but then USE=binary would result in installing
+		# in '${bin_libdir}'
+		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
+			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
+			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
+			"${WORKDIR}/usr/bin/hsc2hs" \
+			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
+			"$gp_back" \
+			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
+	fi
+
+	# Relocate from /usr to ${EPREFIX}/usr
+	relocate_path "/usr" "${to}/usr" \
+		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
+		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
+		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
+		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
+		"${WORKDIR}/usr/bin/hp2ps" \
+		"${WORKDIR}/usr/bin/hpc" \
+		"${WORKDIR}/usr/bin/hsc2hs" \
+		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
+		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
+
+	# this one we will use to regenerate cache
+	# so it should point to current tree location
+	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+	if use prefix; then
+		hprefixify "${bin_libpath}"/${PN}*/settings
+	fi
+
+	# regenerate the binary package cache
+	"$gp_back" recache || die "failed to update cache after relocation"
+	rm "$gp_back"
+}
+
+ghc-check-reqs() {
+	# These are pessimistic values (slightly bigger than worst-case)
+	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
+	# numbers on various arches.
+	CHECKREQS_DISK_BUILD=8G
+	CHECKREQS_DISK_USR=2G
+	# USE=binary roughly takes
+	use binary && CHECKREQS_DISK_BUILD=4G
+
+	"$@"
+}
+
+pkg_pretend() {
+	ghc-check-reqs check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	ghc-check-reqs check-reqs_pkg_setup
+
+	# quiet portage about prebuilt binaries
+	use binary && QA_PREBUILT="*"
+
+	[[ ${MERGE_TYPE} == binary ]] && return
+
+	if use ghcbootstrap; then
+		ewarn "You requested ghc bootstrapping, this is usually only used"
+		ewarn "by Gentoo developers to make binary .tbz2 packages."
+
+		[[ -z $(type -P ghc) ]] && \
+			die "Could not find a ghc to bootstrap with."
+	else
+		if ! yet_binary; then
+			eerror "Please try emerging with USE=ghcbootstrap and report build"
+			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
+			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
+		fi
+	fi
+}
+
+src_unpack() {
+	# Create the ${S} dir if we're using the binary version
+	use binary && mkdir "${S}"
+
+	# the Solaris and Darwin binaries from ghc (maeder) need to be
+	# unpacked separately, so prevent them from being unpacked
+	local ONLYA=${A}
+	case ${CHOST} in
+		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
+	esac
+	unpack ${ONLYA}
+}
+
+src_prepare() {
+	ghc_setup_cflags
+
+	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+		# See bug #313635.
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
+
+		# allow hardened users use vanilla binary to bootstrap ghc
+		# ghci uses mmap with rwx protection at it implements dynamic
+		# linking on it's own (bug #299709)
+		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
+	fi
+
+	if use binary; then
+		if use prefix; then
+			relocate_ghc "${EPREFIX}"
+		fi
+
+		# Move unpacked files to the expected place
+		mv "${WORKDIR}/usr" "${S}"
+		eapply_user
+	else
+		if ! use ghcbootstrap; then
+			case ${CHOST} in
+				*-darwin* | *-solaris*)
+				# UPDATE ME for ghc-7
+				mkdir "${WORKDIR}"/ghc-bin-installer || die
+				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
+				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
+				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
+				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
+				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
+				popd > /dev/null
+
+				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
+				# fix the binaries so they run, on Solaris we need an
+				# LD_LIBRARY_PATH which has our prefix libdirs, on
+				# Darwin we need to replace the frameworks with our libs
+				# from the prefix fix before installation, because some
+				# of the tools are actually used during configure/make
+				if [[ ${CHOST} == *-solaris* ]] ; then
+					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
+				elif [[ ${CHOST} == *-darwin* ]] ; then
+					local readline_framework=GNUreadline.framework/GNUreadline
+					local gmp_framework=/opt/local/lib/libgmp.10.dylib
+					local ncurses_file=/opt/local/lib/libncurses.5.dylib
+					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
+						install_name_tool -change \
+							${readline_framework} \
+							"${EPREFIX}"/lib/libreadline.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${gmp_framework} \
+							"${EPREFIX}"/usr/lib/libgmp.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${ncurses_file} \
+							"${EPREFIX}"/usr/lib/libncurses.dylib \
+							${binary} || die
+					done
+					# we don't do frameworks!
+					sed -i \
+						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
+						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
+						rts/package.conf.in || die
+				fi
+
+				# it is autoconf, but we really don't want to give it too
+				# many arguments, in fact we do the make in-place anyway
+				./configure --prefix="${WORKDIR}"/usr || die
+				make install || die
+				popd > /dev/null
+				;;
+				*)
+				relocate_ghc "${WORKDIR}"
+				;;
+			esac
+		fi
+
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${S}/ghc/ghc.wrapper"
+
+		cd "${S}" # otherwise eapply will break
+
+		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
+		#needs a port?
+		#eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
+		eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch
+		eapply "${FILESDIR}"/${PN}-8.10.3-C99-typo-ac270.patch
+
+		# a bunch of crosscompiler patches
+		# needs newer version:
+		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+
+		# mingw32 target
+		pushd "${S}/libraries/Win32"
+			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
+		popd
+
+		bump_libs
+
+		eapply_user
+		# as we have changed the build system
+		eautoreconf
+	fi
+}
+
+src_configure() {
+	if ! use binary; then
+		# initialize build.mk
+		echo '# Gentoo changes' > mk/build.mk
+
+		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
+		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+
+		# We also need to use the GHC_FLAGS flags when building ghc itself
+		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
+		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
+		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
+		# Speed up initial Cabal bootstrap
+		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
+
+		# We can't depend on haddock except when bootstrapping when we
+		# must build docs and include them into the binary .tbz2 package
+		# app-text/dblatex is not in portage, can not build PDF or PS
+		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
+		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
+		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
+
+		# this controls presence on 'xhtml' and 'haddock' in final install
+		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
+
+		# not used outside of ghc's test
+		if [[ -n ${GHC_BUILD_DPH} ]]; then
+				echo "BUILD_DPH = YES" >> mk/build.mk
+			else
+				echo "BUILD_DPH = NO" >> mk/build.mk
+		fi
+
+		# Any non-native build has to skip as it needs
+		# target haddock binary to be runnabine.
+		if ! is_native; then
+			# disable docs generation as it requires running stage2
+			echo "HADDOCK_DOCS=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
+		fi
+
+		if is_crosscompile; then
+			# Install ghc-stage1 crosscompiler instead of
+			# ghc-stage2 cross-built compiler.
+			echo "Stage1Only=YES" >> mk/build.mk
+		fi
+
+		# allows overriding build flavours for libraries:
+		# v   - vanilla (static libs)
+		# p   - profiled
+		# dyn - shared libraries
+		# example: GHC_LIBRARY_WAYS="v dyn"
+		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
+			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
+		fi
+		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
+
+		# Get ghc from the unpacked binary .tbz2
+		# except when bootstrapping we just pick ghc up off the path
+		if ! use ghcbootstrap; then
+			export PATH="${WORKDIR}/usr/bin:${PATH}"
+		fi
+
+		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
+
+		# don't strip anything. Very useful when stage2 SIGSEGVs on you
+		echo "STRIP_CMD = :" >> mk/build.mk
+
+		local econf_args=()
+
+		# GHC embeds toolchain it was built by and uses it later.
+		# Don't allow things like ccache or versioned binary slip.
+		# We use stable thing across gcc upgrades.
+		# User can use EXTRA_ECONF=CC=... to override this default.
+		econf_args+=(
+			AR=${CTARGET}-ar
+			CC=${CTARGET}-gcc
+			# these should be inferred by GHC but ghc defaults
+			# to using bundled tools on windows.
+			Windres=${CTARGET}-windres
+			DllWrap=${CTARGET}-dllwrap
+			# we set the linker explicitly below
+			--disable-ld-override
+		)
+		case ${CTARGET} in
+			arm*)
+				# ld.bfd-2.28 does not work for ghc. Force ld.gold
+				# instead. This should be removed once gentoo gets
+				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
+				econf_args+=(LD=${CTARGET}-ld.gold)
+			;;
+			sparc*)
+				# ld.gold-2.28 does not work for ghc. Force ld.bfd
+				# instead. This should be removed once gentoo gets
+				# a fix for missing --no-relax support bug:
+				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
+				econf_args+=(LD=${CTARGET}-ld.bfd)
+			;;
+			*)
+				econf_args+=(LD=${CTARGET}-ld)
+		esac
+
+		if [[ ${CBUILD} != ${CHOST} ]]; then
+			# GHC bug: ghc claims not to support cross-building.
+			# It does, but does not distinct --host= value
+			# for stage1 and stage2 compiler.
+			econf_args+=(--host=${CBUILD})
+		fi
+
+		if use ghcmakebinary; then
+			# When building booting libary we are trying to
+			# bundle or restrict most of external depends
+			# with unstable ABI:
+			#  - embed libffi (default GHC behaviour)
+			#  - disable ncurses support for ghci (via haskeline)
+			#    https://bugs.gentoo.org/557478
+			#  - disable ncurses support for ghc-pkg
+			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
+			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
+		elif is_native; then
+			# using ${GTARGET}'s libffi is not supported yet:
+			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
+			econf_args+=(--with-system-libffi)
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
+		fi
+
+		einfo "Final mk/build.mk:"
+		cat mk/build.mk || die
+
+		econf ${econf_args[@]} \
+			--enable-bootstrap-with-devel-snapshot \
+			$(use_enable elfutils dwarf-unwind) \
+			$(use_enable numa)
+
+		if [[ ${PV} == *9999* ]]; then
+			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+			GHC_P=${PN}-${GHC_PV}
+		fi
+	fi # ! use binary
+}
+
+src_compile() {
+	if ! use binary; then
+		# Stage1Only crosscompiler does not build stage2
+		if ! is_crosscompile; then
+			# 1. build/pax-mark compiler binary first
+			emake ghc/stage2/build/tmp/ghc-stage2
+			# 2. pax-mark (bug #516430)
+			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
+			# 2. build/pax-mark haddock using ghc-stage2
+			if is_native; then
+				# non-native build does not build haddock
+				# due to HADDOCK_DOCS=NO, but it could.
+				emake utils/haddock/dist/build/tmp/haddock
+				pax-mark -m utils/haddock/dist/build/tmp/haddock
+			fi
+		fi
+		# 3. and then all the rest
+		emake all
+	fi # ! use binary
+}
+
+src_test() {
+	# TODO: deal with:
+	#    - sandbox (pollutes environment)
+	#    - extra packages (to extend testsuite coverage)
+	# bits are taken from 'validate'
+	local make_test_target='test' # can be fulltest
+	# not 'emake' as testsuite uses '$MAKE' without jobserver available
+	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
+}
+
+src_install() {
+	if use binary; then
+		use prefix && mkdir -p "${ED}"
+		mv "${S}/usr" "${ED}"
+	else
+		[[ -f VERSION ]] || emake VERSION
+
+		# -j1 due to a rare race in install script:
+		#    make --no-print-directory -f ghc.mk phase=final install
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
+		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
+		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
+		#    /usr/bin/install: cannot create regular file \
+		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
+		emake -j1 install DESTDIR="${D}"
+
+		# Skip for cross-targets as they all share target location:
+		# /usr/share/doc/ghc-9999/
+		if ! is_crosscompile; then
+			dodoc "distrib/README" "LICENSE" "VERSION"
+		fi
+
+		# rename ghc-shipped files to avoid collision
+		# of external packages. Motivating example:
+		#  user had installed:
+		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
+		#      dev-haskell/transformers-0.4.2.0
+		#  then user tried to update to
+		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
+		#  this will lead to single .conf file collision.
+		local shipped_conf renamed_conf
+		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+		for shipped_conf in "${package_confdir}"/*.conf; do
+			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
+			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
+			mv "${shipped_conf}" "${renamed_conf}" || die
+		done
+
+		# remove link, but leave 'haddock-${GHC_P}'
+		rm -f "${ED}"/usr/bin/$(cross)haddock
+
+		if ! is_crosscompile; then
+			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
+			newbashcomp utils/completion/ghc.bash         ghc
+		fi
+	fi
+
+	# path to the package.cache
+	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+	PKGCACHE="${package_confdir}"/package.cache
+	# copy the package.conf.d, including timestamp, save it so we can help
+	# users that have a broken package.conf.d
+	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
+
+	# copy the package.conf, including timestamp, save it so we later can put it
+	# back before uninstalling, or when upgrading.
+	cp -p "${PKGCACHE}"{,.shipped} \
+		|| die "failed to copy package.conf.d/package.cache"
+
+	if is_crosscompile; then
+		# When we build a cross-compiler the layout is the following:
+		#     usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
+		# but
+		#     usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
+		# containst host binaries (modulo bugs).
+
+		# Portage's stripping mechanism does not skip stripping
+		# foreign binaries. This frequently causes binaries to be
+		# broken.
+		#
+		# Thus below we disable stripping of target libraries and allow
+		# stripping hosts executables.
+		dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
+		dostrip    "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
+	fi
+}
+
+pkg_preinst() {
+	# have we got an earlier version of ghc installed?
+	if has_version "<${CATEGORY}/${PF}"; then
+		haskell_updater_warn="1"
+	fi
+}
+
+pkg_postinst() {
+	ghc-reregister
+
+	# path to the package.cache
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+
+	# give the cache a new timestamp, it must be as recent as
+	# the package.conf.d directory.
+	touch "${PKGCACHE}"
+
+	if [[ "${haskell_updater_warn}" == "1" ]]; then
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+		ewarn "You have just upgraded from an older version of GHC."
+		ewarn "You may have to run"
+		ewarn "      'haskell-updater'"
+		ewarn "to rebuild all ghc-based Haskell libraries."
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+	fi
+}
+
+pkg_prerm() {
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+	rm -rf "${PKGCACHE}"
+
+	cp -p "${PKGCACHE}"{.shipped,}
+}
+
+pkg_postrm() {
+	ghc-package_pkg_postrm
+}


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2021-03-14  8:47 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2021-03-14  8:47 UTC (permalink / raw
  To: gentoo-commits

commit:     a61fdd5032cc815f2a5720c9cb744ab269ebfa1b
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 14 08:46:21 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Mar 14 08:47:52 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a61fdd50

dev-lang/ghc: drop old

Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/Manifest          |  77 ----
 dev-lang/ghc/ghc-7.10.3.ebuild | 674 ----------------------------------
 dev-lang/ghc/ghc-7.8.4.ebuild  | 600 ------------------------------
 dev-lang/ghc/ghc-8.0.2.ebuild  | 672 ----------------------------------
 dev-lang/ghc/ghc-8.10.1.ebuild | 797 ----------------------------------------
 dev-lang/ghc/ghc-8.10.2.ebuild | 797 ----------------------------------------
 dev-lang/ghc/ghc-8.10.3.ebuild | 796 ----------------------------------------
 dev-lang/ghc/ghc-8.2.1.ebuild  | 754 --------------------------------------
 dev-lang/ghc/ghc-8.2.2.ebuild  | 755 --------------------------------------
 dev-lang/ghc/ghc-8.4.1.ebuild  | 755 --------------------------------------
 dev-lang/ghc/ghc-8.4.2.ebuild  | 760 --------------------------------------
 dev-lang/ghc/ghc-8.4.3.ebuild  | 759 --------------------------------------
 dev-lang/ghc/ghc-8.6.4.ebuild  | 775 ---------------------------------------
 dev-lang/ghc/ghc-8.6.5.ebuild  | 784 ---------------------------------------
 dev-lang/ghc/ghc-8.8.1.ebuild  | 804 ----------------------------------------
 dev-lang/ghc/ghc-8.8.2.ebuild  | 803 ----------------------------------------
 dev-lang/ghc/ghc-8.8.3.ebuild  | 808 -----------------------------------------
 17 files changed, 12170 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 7b0db8c3e02..c89f4740694 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -1,89 +1,12 @@
-DIST binary-0.7.6.1.tar.gz 47086 BLAKE2B 7d81b9c254902d5ff2bafbef4c31a6f6f0396202d8585690c1ae3b63ae6ed157db7221d65a62e393ee8f6725ffd5d80e51030c0351e954b06004fcb70e5867cd SHA512 655daa93a52b845a85d440810452933d7bc3398ad1b51e1e955b2d19a0a32679325a0d1751ad50d252531e493528262e14dab32af4b9a515855fe7f64e0730b2
-DIST ghc-7.10.3-src.tar.bz2 13281867 BLAKE2B 51b0a94cc63269926fd5d04c0fb0871266c45b3168187b891127db71980d180668fb8ef7adc51a7a3df947ecc93b4d4a06965ccf9ef53eb74ed063c54adfebde SHA512 97a8282d8a75399c78d85d6faab7ac253a993dc69f1840358572f1878b8fd1a527c28801e5823c8200b5690e268e4a0c00941945ada13790852c75a83b612c17
-DIST ghc-7.8.4-ia64-CLOSUREs-regenerated.patch.gz 13268 BLAKE2B 35af21163e3a46ee340e29eb88daf617eeb094f02da7fdcb80e947c1d26234232b12d9eb2c38c02c3207c047573521fef3ac5e7b87609e66f0c57072fef1038e SHA512 a655713e06324b56f0041edf70837487e296d28e6f3ee35fe116b9938765aaf3469d25e92645e0940655ed3607dff27d3826fe0f995c84e81b51bfc956816e7d
-DIST ghc-7.8.4-src.tar.bz2 10600755 BLAKE2B 6cf27f663178513b25032b648cf36b016e01361966725dbfc219079961e8eb9b1ab3531427c7012dc599e8e102dc87ed6dd43b31e7bd4e231e2d989936eb2c66 SHA512 079a53891d8ebd8d9b88da96170e60981608a619f8282e4b7948f35244e99bd87277649ac7fcebc227a61a4d21960db8d5e5b9e92f2c69c82d8d68d7fd0a41d3
-DIST ghc-8.0.2-src.tar.xz 10687760 BLAKE2B 3b2a487c115680342ce308ff1a42d2b6fa6fb1f31e2670b27a305b4d44160056611b77273c9d47f2e37a1ef01b1aba59c36e76b65c83142a5f09812bf3b1ea02 SHA512 58ea3853cd93b556ecdc4abd0be079b2621171b8491f59004ea4e036a4cba4470aaafe6591b942e0a50a64bdc47540e01fe6900212a1ef7087850112d9bfc5ef
-DIST ghc-8.10.1-src.tar.xz 19781652 BLAKE2B 61ff73d3a895cfa0c836e25a684d7a31cf099dcc33d1f308eaf56aa4b2a75b8f38cf963197c11dad9d027270845af20e00a7d81e5417b0fb8b4a98ddbadd53d8 SHA512 e6bb5c326f8354f0892324586c164c6e04168215d8bfeccb594173a838a535e37bac38db6fbdb01fb37150099c12842c53be5e912dfb6a6feeae3c75d4ae24d0
-DIST ghc-8.10.1-testsuite.tar.xz 2091988 BLAKE2B 88796f0fb6ea2bdd749161c84ec88768f3bf87063d2224a083db24f69282e615227626fe3c7b41d4abec10883e22042abed6a231582bab4ea530feffd683ed0b SHA512 35147f98301c5bfb6c939e108de48b2a1133adc1028aaa720ce49d60faa06a4b486a9eded658295e3f203731b4dd53475b57e8213491c45b05959430030be269
-DIST ghc-8.10.2-src.tar.xz 21880680 BLAKE2B 0c1b67c1576cfd1067d11838301f96041cabf66b94cfd546cfe6bef57babe940fc3814918ff9327e59fe73a8e230fa1d62d7816d7c6cae274dd8c53de6e81736 SHA512 6c3f1311feab3665419a301b17fcb09d303ec822f8eb8c4021edfacff00d9b52e71895bed0e58f11d8f7970415bd8c6f95ffde1294afe795e15607199b20cefc
-DIST ghc-8.10.2-testsuite.tar.xz 2101788 BLAKE2B 0d4528223471dfd68cadcda47931d53508c9eafa415716ca5990ea519eb89bfa2bdd444280057be33467382dd3d178887262d54ef633aa8ce88ea91eb9d58ece SHA512 043faaf2f0dc34a868c481b284b94afd78aa1ec1a4056d1f3c97ca3f7dadb3e9cff0517a4cfb378fe5187389db7c9027763bf066328e7dcfd264b737f6d09e41
-DIST ghc-8.10.3-src.tar.xz 19872356 BLAKE2B 043f41a21becc826b3cd13ee81b138cf2edfa18484f98361dc85b12f784df85571522347d5fafe40a19ea8ddf12390cd766db8fc21cf4971e797bc61404304cc SHA512 6f3248e728d3677dfddf2f02609167c67a194750418f2a5e34ed68f1135960761c5a5768255bfc8b2ef5640395609424878375184d2dde8e2d69021a3baf9ec8
-DIST ghc-8.10.3-testsuite.tar.xz 2261376 BLAKE2B cd03d569c30637d531d9a13fa926a28f854a37d48ef0d4e2fde684664ae000f3c941b5113ccafd42fec019428bafb5344b1ddf8f84a71b21bca8831ed4784907 SHA512 4c9d20a27ed71eb7c73bd86c1049ea5adcc8a0b12040386b7d0dddb46b3cf704c52a3392e19ae4ff1c76b8868665c599391d47e47dba516fcadf8abbc30e28df
 DIST ghc-8.10.4-src.tar.xz 19818108 BLAKE2B 069dd8436c373ccf73c20d8b577243792ffdd3a031e869edd612fe1e273126e60803326542695012dbe62e57654ada18af9342bbe1a741b2bebb41cdb0d86035 SHA512 9bb078cb72535a352243b83b671c871392564efd09e478549f27ae58fc6f46e337a0782f5500d26d5704ad96eace22e77bb36031a1fe9b7e175f265b0b9c028b
 DIST ghc-8.10.4-testsuite.tar.xz 2236932 BLAKE2B 17d0520ad5c6daa0cc60530279ae7e617e4d79328b9f436abbe75e72f0803d9a997fb9e1ae61425326b070f45794a488d8507957fec9a6ed49eea86d30a1e579 SHA512 1bf129c8d872e3ceff7c19929605adc5d68daab9ded9aa2e5109b0de162089631472c66f04993adf8481291f8128bf804fe64a9d344c81e257f1b962ba5e382c
-DIST ghc-8.2.1-src.tar.xz 10736016 BLAKE2B 60993cfc9569e83b0c383591ef30a7280e0138fbb7bd696ad62d87e68dcbccf31c0b8ba211b6647922b8595c7aec2c783648f12c67da53e0766b71c7d7c923fc SHA512 d9aa2aa7f9414db8f4e51d6c275694b46df515e68331a1a2b6018256333a2c63ebd877b75ee90407ecce5be672ec9afc6bebd62aadbf8ae06b94f1760d1736be
-DIST ghc-8.2.2-src.tar.xz 10753272 BLAKE2B 6fd792390d3df20f84836466705c3f3c931ba2d594dcbe2b808ea0ae284460000b443df8aae74903eabf05ff9064d68a303086cf888ea68222eb1c60959c8f21 SHA512 6549416f470b599973d409fa45f59c25b07e6a94798cef1a19ad432547dc225338cf4dbc4a4793114b4a417798a3b59b122b92b020251074405c5302b7ffe799
-DIST ghc-8.4.1-src.tar.xz 11301528 BLAKE2B 6dcf467d04cace856b68315c85b80f19b517dcbc8ae6e2a08c60afa141c9e0261e012738452c9ca208f9fc40c48bd1a0817e5e0fe9f4737383cd7b44ca65c8d9 SHA512 f8ae11f498bf2911fb92635534c6906c96f1fbe5072c7b7447bd3f69e408026b674564515af02a8aaddc57ee6905ce78d10005b12478a39c220580aaec13a9f7
-DIST ghc-8.4.2-src.tar.xz 11313140 BLAKE2B d6fe90f3c68b137c6029bf08918a51ff43c210ba0485aca8d77541cd455f6f9c94287cd011ecd710a8e5a14a27e8a27c04c517417c5748966afd63a5ba6ed19e SHA512 aeb17c986c597762381d9887679eb0eec194c2938a92b5a33e66b4c80002ead02d672b4aa968e1061ab5652b74e46a3c9f9e3d58d5be4a0ae47aa8aed288cf1f
-DIST ghc-8.4.3-src.tar.xz 11315068 BLAKE2B cfb858051aff0c4fb3cdbbe96627cacc82665a6bfc4f863b0353eb3d93d358f7ed4efd7b131280763786f397aabc5c4825f60c3890649303fc97187f2b996d21 SHA512 c6cea84264f32ae888f9931f834a1d721889242f656d14262e787ec54a1793d1862ce76daacaf1006c12b8af12919501afce1dc02571373e24830e4d51803414
-DIST ghc-8.6.4-src.tar.xz 19029904 BLAKE2B 80676923866417cbf674c3cfadc2ecf9a673e9dcefb4561be7125c83edad38990ea9427c302aeeb9ef04b2c3eeea4fa9fabc72d89c742c6714163ea280802122 SHA512 9237e45b26852cc8a6d64c80da2b28c910349bbbed60f6575035f39bcb064a5ce80ec73cd85e2298e4abefead378e19b7d7ec3ffeea09e362f20eb0b09b36798
-DIST ghc-8.6.4-testsuite.tar.xz 1906656 BLAKE2B b0e55b415c885479c3573fe86436338971e685edc95e106043f36e92e1ee6a7e86add9e86a35c8bd685916f18a7bcf08d4a7b845da41dd855132b131ccbc4a37 SHA512 b1bbe1759ec528914cbfa6b3789c596e46b6266568972b9f5d1cf13e31b7206400b65536e7acea698161e46b8ca11285b3282ebd9336d23b68d34feb4f0bf314
-DIST ghc-8.6.5-src.tar.xz 19092168 BLAKE2B 2ac0926b186c43fd179170a0690492129e9ffb6651608875db7167113becf324dcf99a82f56e578c67051f813007c0ffa32ca5b12588f0d370330c8274a2d74d SHA512 c08a7480200cb99e1ffbe4ce7669f552b1054054966f7e7efcbc5f98af8032e1249fa391c4fc4c7d62cc8e0be5d17fa05845177f3cea3dbcf86e6c92d40fc0f9
-DIST ghc-8.6.5-testsuite.tar.xz 1910060 BLAKE2B 71136207e3eccb4ec6756661ffa64c0a82475704c071cd8f060855a9f40d7d1fc4be2da7ff265df38fb918b8ee2ce21a54ee4b224aacaa3026ad1ddb1e1e4ab2 SHA512 980f3934bb18876cc80b80a0eb64a9ca1dfaa7f4d8b0761f5d733a6583053e38b231445388b992b26ec1ad5f569b6385dbe60f96381794f5577964979c253e16
-DIST ghc-8.8.1-src.tar.xz 28634672 BLAKE2B 3a012db5d9798efddf806542a88cd9fef1d0972f7f025d377c247961cf8d8071fcf390aa130ac11f1a5556fb572499b9288a8698c49bbd594f0bb5fec4130a2f SHA512 7268b012c3a6c34e7eac05c7d6959de6005651d33e870860bbfe589295502e8794a76580130b8f4da2f88032b68116dbbdbc4c1e900e0c862aaa9891fa788bef
-DIST ghc-8.8.1-testsuite.tar.xz 1959220 BLAKE2B 8606a6439f7d5b4c837b2325c4ef5705dbcea17c4b59daf7aafd0de68e55179bb2c03ce7a4f376398b185b6dbfb361d18592756558461ee43722d2142370d815 SHA512 e13b651c60deb86522efbfe8aa42679cc81a413475f70580d9ef28dbb711617c523951441a30fb46f3be9418c4c0bb4dbc522b04aaa51313afd2d39027696c30
-DIST ghc-8.8.2-src.tar.xz 19365816 BLAKE2B 85dbd2a4696755f43c28ec578d5ecfe706b27ba7f640f66b464b7aa7b959ca5f02b8b51d130299c30d024c46b9ce6a115606bde46be400fb8ee221ff18177d65 SHA512 11eec0bc03254ea848a5c86bc3e2da317801a1227dd91406a157e11cb675891d77d61177b740b6df88bd823063f6cb2af5a928a7540e25392d9d0769ea121069
-DIST ghc-8.8.2-testsuite.tar.xz 1976924 BLAKE2B cec6c5dab1782332aca6364f995cffc1e9f3506649c3410b6eaa220e665b66f033dfad8ab6cae7677e15a6a1bd51237ed491b7fd04a19fa1d4f9cd8904617c64 SHA512 0fc41a0b3cb5f172442863c8a3b1cf549f2f660a070965e6083baa2c90c27b6a7c17550625105799010f4329dc189f4e392c86991844a9704a3e3a72a6d4e2f5
-DIST ghc-8.8.3-src.tar.xz 19343672 BLAKE2B 4b33b4a386926f0ee625c7c18a3997f02bf664b8f553d7cdfb231553bf9510f44f72c0b46911539f6209f28ecab52ee520e61e2c9e750cc217b170b3596ffca0 SHA512 7db0d820a288e56bd32935cc03584295900605f6e7cac6fe6adcb3ec6c24d8d2cebf7a8efa421f2d2fa192602d7f24dfad1ddeeba252455e4cb8baa9889dcaa9
-DIST ghc-8.8.3-testsuite.tar.xz 1965236 BLAKE2B 9cd10769336513284d8e0fbca1c3fce9e298ec67eb63eb10d41087fccba0f6281f1509aee684778fd23710ffe65843c43b4042e6692940af67766056c4503273 SHA512 4ebf3eabcd7591762dfcf45716b06293fb14c00b51307f7788c90dcf4e01f67e6bbb7a887b74d8d30272919486441ac236b42a54c4874aac69d90391b76f81c9
 DIST ghc-8.8.4-src.tar.xz 19395252 BLAKE2B 6fa898b9552398a724f0452f5cc88ba073264a5645288c73507258959efec40ce5a56a0eaafdabe58f15c5a9210b2c9da5954411dff5c81c52e061569d6a350a SHA512 efd23bd819f7429486696a3a929a040471db7ea8a2d1f1d832e4cf0825b9e1e0c5e6ecad0ab8376f58b74e9c28c1d2f773bd126596d6d853c9e57d57e5ceb090
 DIST ghc-8.8.4-testsuite.tar.xz 1965820 BLAKE2B 3b715700561788b8abdc986961d533b91399461d57a1686ededb4ccc36881503cdc3fc126b9a7b204a728c24b9a9ca97320142348644367aca9b47c87a5b3b51 SHA512 79d8fb0ba8de0fb48c938bd54c8c3278f1895d8ce5c700ce8cf6b3fc550073bb757208e85d4f9818400ebecca96f51d9248b8bbdac9eb2995671756164d08c16
 DIST ghc-9.0.1-src.tar.xz 20782336 BLAKE2B 53eaf903081d705d641459fbc1e6fa7387a6039f9cd466b4708bda86e81252a84d80878d6eb956ec2e1e5b721a313e68eeb796f8345244ca62f536a7a3f0c6df SHA512 bee7950a5118be8d8cefe0db5070139a5a93ca21c5bc6f8bf453429831f0c44f5e0fb5ee569865d6b8b92749044ee4123be06920928ac7a1ec9cffa9404a3e53
 DIST ghc-9.0.1-testsuite.tar.xz 2322432 BLAKE2B 350df763c607dd89ba58ad6e856d815556159a9f088dc0b069de48ae87c1e874a45fad51159e65a3c9a9beed68602eeb2a2728dbce86277bd287455f46f6c53a SHA512 13fbe0f0ab5e2426820d0fb37f0a75e1198ef2a660398508806e8ef094fd23647ca3d386815a2118168d12253d8df3273043678dbb37cf3924c689dd0fd1932e
-DIST ghc-bin-7.10.3-alpha.tbz2 183558856 BLAKE2B 2bb02aafa49c6a91bec016e8bec2d07257d602e53c9df55792ec6fbbf8e2e46de1d5f3f72c0ccf74d6bd7f7987f53412063ccb02ae85455fce11fa928cbf5291 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230
-DIST ghc-bin-7.10.3-amd64.tbz2 112040431 BLAKE2B 3e59b70ca309a1cd704266c54a7983f9a58362bf700ced89c5649c780c664c650ec091e14026a7b84e339d2ebff39eba1772eebcd9fb4b99b9c99d179453d5cc SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558
-DIST ghc-bin-7.10.3-ia64.tbz2 238680956 BLAKE2B 08593718d376051edfb0c86131e54dafc5c15056757fbeef90c653a7d217e49ff34ffaf7cd4083144c9277e73a290b822a0f889aaf806341375708e4b92654b2 SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5
-DIST ghc-bin-7.10.3-ppc.tbz2 125832171 BLAKE2B cbf9c87200062606fddc6fa705666aeabceef954dad17166e24e181d210d7d86aad684e9af5ca05abcc89c947bea295dec3223735a6a915b680667ad32d850a5 SHA512 4eb111e3686656a83515f59d4ace8bc28806dcabfcee5201ce29aee38b8efcefaaf70c50bee55202c2d2abbfbf231a6b41df8b13199332c53055adb1754a3191
-DIST ghc-bin-7.10.3-ppc64.tbz2 142469712 BLAKE2B 05e6ca2498180399dd8a1a209843dd1229a1668d7504c424b9182fff00f78ec9aa2848d562f293dd388dc983851e0e28d481b12f0ae860b5c3a36eb616c3f1cf SHA512 eb59d3abc8b10010311d59df9473c5ea649eb0dd7f9ad41a1929a540a0ef8c20abaccd68254f8abab037fb1fc94d824f474e18e4316b8f2a7a954d0645a2a2a4
-DIST ghc-bin-7.10.3-sparc.tbz2 163105069 BLAKE2B 4a535472bf9ed83164f4da8280215a156b973a3a1f93a742a46050a112b7073d0a5f252686ee2ebde97140748cf3f164f33f1ba9df0b11fe2b35a86a7211b3a5 SHA512 d467a42487378d7dee311eb33aa1c151f5c16a6e7a4ab5bd8177df229f474adf19da3e1ca1064943a40abafcab6852b0589dd34413da82b33a03ede1ac17bf5d
-DIST ghc-bin-7.10.3-x86.tbz2 113877175 BLAKE2B 2f3064174f82f3ad6fda615d1f47f30b11f9dbd4a4b721673e5db49013a11ba80e850a0f392460651408fd3b31f8e677f1488fe2c94160881ab34740846b0390 SHA512 75096fe9106d975c15e646b0a559c544621fd02791f491bce54926efabf0e55b97150069ddfa7a9f02cc30bb6975d3d3121a82207a9f67b8dda5ebfe17ec4744
-DIST ghc-bin-7.8.4-alpha.tbz2 210691009 BLAKE2B 7a59cd1dbbe76fcf37ec7d1b2e81a76bd35f268c10614890cc8a39dcd846f6e5fb524ce1851036c315a9e5fe219d3abbb78d55f3e93f4ab5ad1dbf6c946146b7 SHA512 f08230de82f0c4112da9d0b48227ca74d5d0b4a84046d746b023557b7aeeb9678f5ac037fe89a863178df4b9036e5c5c63182d14dfbb42c772011de883e3966f
-DIST ghc-bin-7.8.4-amd64.tbz2 100573133 BLAKE2B da6bfb26eac8ef6c996ed10a56da9c535fb5fff4c69474de2cd979fe185876059f9e87940d24db8c52a0f04e81cf312982da75d04f3b96e7a11f2f134b512058 SHA512 e4416d6dae3c644f74bafb3aecf1a123f985427aba32d0e0c43143a137d64a9220fc5947cd9bde8a3bc44555ae71184fc06a3f7df7976aadd065ad5681b90954
-DIST ghc-bin-7.8.4-ia64.tbz2 222789275 BLAKE2B 2e0fc3ea11885b739156dcfbb4d52ded6492bf992ea18be2f91302d82e541a4de52e4bbe215f4d0cdbe54b32aa59e142ad10ae2fb20e8f0dfea22368a88620dd SHA512 2d8b89e399cbe9bfeae29cf3ceea736bfaa65ea21483fa2ee95d9814e122fcfbb67ce22ad8175493fab088e9a9d0139610c67e9d5c8b4f797b5e14846df32b6e
-DIST ghc-bin-7.8.4-ppc.tbz2 112803496 BLAKE2B fa60eda8b87dca0e23cbb971bc1f361f280735846cbe628e632981dc86baba0e877112e5c03d09fbb7f256cc078f8bf3248007c013208dab41c5205a82fab494 SHA512 9581f55a088e53edcc969960e45c9ad7227d71198ce2d241a4a066a138450a879287e55e7d2210e86143670539711387e36c7f60660c4422dc1b4122278fe4a0
-DIST ghc-bin-7.8.4-ppc64.tbz2 129284515 BLAKE2B 2e9a1e70830930dda7dcbd696ef3c27e7b64d571042cc0fc26bed42d13b9707ffeb337ffab38e2e04a7dabc56d8305fd77df508928d61fd0c653945afac8984d SHA512 53974e15c26cf6b62d8f838607abd209ec57cf0f45fcc48b90ad62736f5e4e7ff263dcd326ae03d8d5557a22eb9730e5eb8ae4eda55e52dd3d973bc73c84935e
-DIST ghc-bin-7.8.4-sparc.tbz2 147340595 BLAKE2B 8e39d6b144f4fce5196ad758f89887476e0482e8b98a012874d293d5e57756659cb9acb897476593a28f98f5c859548efa2e130f3806bfa2bb9e74795078a506 SHA512 ee5f0b2f1cf2693a0f2be9df71ef61b52bc2327225d40b8be955c1584b9901ffc6aaab63c1e46bf9bb352633b605c98378f8fd3e6cd71aef1c089007e4110217
-DIST ghc-bin-7.8.4-x86.tbz2 102312459 BLAKE2B 256cca9b2353af30dd7c239db0e21781d9d8aa352e38b3dd678b1429be6251e81f8955ac6ee0f766cc55f4de71c68acd98bc7b9434c3ea4b056d446ca59adc97 SHA512 cabc5bd6d8760ce4120e7053f6c1dffca7d161ba454b6201087760096c037c932e3ff8c82e53346c8278855bf0cff1c2f5fb8046242ca4d8307355b060a9556e
-DIST ghc-bin-8.0.2-alpha.tbz2 234361847 BLAKE2B 8e3439f3bbae1d3f6ab71f69669ea065f5f36c9cb4b334f06161cc1b9507aae56297d5eeb8a9cf72916aa012fab0b444a179a0336f00d5f17a8d402d5807c6f8 SHA512 c8b588feeab85f7b8fd60e2e8bf755d46790d4882d2ecf6b2c8b8e02c62a11b7e6453bf0cfbc646bfbf24310fdc775337f3957ba5783675a271b68f0af2e9070
-DIST ghc-bin-8.0.2-arm64.tbz2 191332951 BLAKE2B 305c4d618a6221e1322a5665544883624de4646e0186c6eab56d0b32877645f0b2bad8381848914751fbd2e11598727c46ab136de74c57207b75ecc6cce9572a SHA512 b9cabfda8fc6e851ba99f53274c1a63c5a6a365311a9203f1247ecf90ab843dd94960ad44c4e67032f4690f07d67bfd8bdfbe59f857d6c63344430539e2082fc
-DIST ghc-bin-8.0.2-i686-pc-linux-gnu.tbz2 133679542 BLAKE2B c50597857b53a2bf9d8047c048f86aa1782f74d5d9816d44b7bad7302181b407257ad0b52a03b4ad4936de3a15010b0ff5ca877b9578af6d3e7684dda2284718 SHA512 7f33e0b20a21fe076db142a58a81f68ab8f230ac9ce0167aba31aa0843bce20a9cf4065acc1c0ee2aaa01ea2ad4a8234388b0cf3ef886dccf25d7072602b430b
-DIST ghc-bin-8.0.2-ia64-unknown-linux-gnu.tbz2 256581880 BLAKE2B 7a9b41fccf3a097a19e169dcd8f553d38ffb96ebce3a3f0df15af79de77f6e33835a955fb7cc2c373f7bb6bfd3508a45ecf19f8b3e74bb058d2d6cdb6576bc6b SHA512 5d14521cc4f2a8fae1e5f43fce70cb976e4412df468c3bc611c99f57806816c349f4186c8a064c579858a82cc070e5942dd7b0c2d57b88d507215acddcbfcfc1
-DIST ghc-bin-8.0.2-ppc.tbz2 144760090 BLAKE2B 32410f3563f7f2555350806db460d2083c7248c57223c9c681d0b4913df942f023c7c1f5fda145179a524ee7ef105a9b8309ba87c20dc393a9f49151579b6767 SHA512 bc6bf8998064ffc1692c3bb83c44d1787760a3f4a1e6b79dedaefda5fe32b9052049a60f0ddd3c0b0bd24a722fb35e310e0189b3511721ff89d4d02b3d7c14bb
-DIST ghc-bin-8.0.2-ppc64.tbz2 117432068 BLAKE2B cae202f0d6e825127d543996b2fe7ae02578c47325674cbf22fddc53b1c4c9413f45c60d76ec3d07860cb8d0aae1ec792e4141822cc5c08ef9013308c5d29bf5 SHA512 0eaff0557b68649a15bbeb2019f46fa9e9e7b8a916aa210ab56888090a5b887d20d818e7987177bc6a8e7fde503de560026e6bb55fe39679b8b1ee13c6b7c4f9
-DIST ghc-bin-8.0.2-x86_64-pc-linux-gnu.tbz2 130852973 BLAKE2B 24d2032bbfc664d924800c1a317334e2342c8ec1e529178f9d1bb99bb4772a9cc100603bf70111b8cfafa715c1cccc643f115c77cf6adcdfb17d1f1735ee6682 SHA512 c36e0e2600fc7c284562a323d396a03062cb6e8fa63c353e672be61e76d2ec5c7698485e3a370a57cf512db9e5ba6a68338fff2ab404d9fe67b1a468ed72638f
-DIST ghc-bin-8.10.1-i686-pc-linux-gnu.tbz2 123398571 BLAKE2B 3650f9dbaaa5af684abad589953bcef5b1684a91a4cc2695d0ef735536057bb031231fe3d73dd74bc38a199f0890ef91764b551e5e158c120affc0d7bc3175b7 SHA512 52cc172de08ef30d6e89384e86eda1b8bbdef2bbff526041eb47d85d77b70ab49314ac7f33f18b40864c16fa546256f1b4c7964e65aa5d3cfbb7f9cbec505dc9
-DIST ghc-bin-8.10.1-x86_64-pc-linux-gnu.tbz2 122227601 BLAKE2B 84340866c70044eb1444a70b0cbed6814808037b697db28f567d2b14bb791cbe7d9bf2a327cc47ae85ce3c4970ba039854b4a6df44eb85cdc18040c5a4d15f4f SHA512 81df9de95aec47d60ad8d699756ad323eb525c3a16536fac8c6717e1754272061bd8d7d70cd38f5c509a2fc323305333e4f898c9b6dc27645521bb29ee218bdb
-DIST ghc-bin-8.10.2-i686-pc-linux-gnu.tbz2 123683156 BLAKE2B a486076ea6e67f124c850e037be0e63a873181c3fd746f437861f7367a968e0df6723afc934c966432274a55936c0fe48a9a43a48199840b37636843da4caccc SHA512 29cc1703bbdbfcbef8aa2a5a563b83b0663970f5902a1fc70230515a128ef47e27a3a6df2b47a01009c3976b4936cf8e64e5da4dfdda0c1bcf73ab7ea5ac0b6d
-DIST ghc-bin-8.10.2-x86_64-pc-linux-gnu.tbz2 122818630 BLAKE2B 030a68e2aca0eb0a273e0d48a3e180d92b219b2d1826d1d58fa133d0a6cae1316b3ccceadb55a4fa5870f87c3df85df2998e7611b93dbc1fea592437748b2daf SHA512 23bf47ee45fae54a843de9e6991b67fccb79c14ad8d08eff9f38a68a3530496c8ce4bc8cae8a731bb690ddd6cd0bf36d6d5bf37eb68ddae8ce646a0bf3916d8f
-DIST ghc-bin-8.10.3-i686-pc-linux-gnu.tbz2 123802832 BLAKE2B a770dd43bee7a1d60fec2eb9aaa7de715eed01c19d9514e04678801827879977a5c91f5e191d026ca83aa5e5fc5f518593053b2e78b27b08df64b39058dbaec3 SHA512 f810432a56ddcd773e6118f038cdacd2f5e3a508d87bfa468ee861aef0cfc434ec5766a8a74360d8cec6cb9c664928290901c025496100e7c8465408635227f5
-DIST ghc-bin-8.10.3-x86_64-pc-linux-gnu.tbz2 122993247 BLAKE2B e3395ebc7e87b4ae8f66dbbd9441c214c4d9535e55bfb14f78ebb92d30b1e100efc4893b3cdc65564d47bd53a21cb30106572b3fce13be022946171112c3218e SHA512 2ea4295bcaf6e3fd0db54ba67465e979cd85d3370c6c49f2381478ae9824ad89df53d7d93ccf06bdff5f4849f14306c9f50c13e6f6ba45f79e5b8c13ad63ae4f
 DIST ghc-bin-8.10.4-i686-pc-linux-gnu.tbz2 123831294 BLAKE2B 1ca4c1b5c34c948011049a73d409c741db89658d10e311cffbe464c631c3733278fc7dede6ad27474832295ded2c26fd4d6419c760505255e29f7cb232a670a4 SHA512 1f87cf63651f7c0e5f7f55d1f4d7d7c48b0a911cc6673a899d4b92190d765b359f9c7d73c329969c1b76f1af102b7e2c18a80382c81d5dade9ac7dd57de4ef65
 DIST ghc-bin-8.10.4-x86_64-pc-linux-gnu.tbz2 122558873 BLAKE2B 9f07c7bdc3beccfa629d28b2524ccd2f4688a5c0036a45408f5ace2d530a2a0e42f95b3cda5037ebb365317999e1ae776c6f9d21692867abfe85e33f2892b1be SHA512 68bd70f94961547746a696aa2839e156c95858fda0c7ec5b2ecf802070724ab7102b0aa86bcbf93432170d521cce4af10f46b851b470e5dc49dfa5b07380f46d
-DIST ghc-bin-8.2.1-i686-pc-linux-gnu.tbz2 96157437 BLAKE2B 2b9608845db8cea78db07209fa054b3b05085d5c3ac07cbe3de02a93c87fb0cff12b1820f08757221c59c8a0a9e7a5563c44266b181525d916825e5cf5bac34c SHA512 e891e76557fa61853e28829b8bedc4a6abb92954f90cc1ebcf22a13cc137556bbe9262e7398b7e1aedbabeb997916b008bf1561a52f16a569f3d58ea9404f41e
-DIST ghc-bin-8.2.1-x86_64-pc-linux-gnu.tbz2 97490496 BLAKE2B 3666ea70cb8b3645db071040d2069fe244042c11954b34e5d92aaa90132d2316c0ee8c176cd4e674772bea3b99df150404f62bd8745c046cdaf102ecf0a0fa54 SHA512 52630a185d0eab56bce0469a612a54109895bfee041ec362ced59a9b35ba3b9c185e86bc7dbf0a5939081d3626baa19fbb3306e36d1857530248a7b9bfc100bb
-DIST ghc-bin-8.2.2-i686-pc-linux-gnu.tbz2 96638908 BLAKE2B b470f838e77330969f162196b0f1035fa764f5d123687fbf67c14323280bfe55216af0e16f8b79c62f290905d96abc8bfafee650f8d27c81608853e78329b2c9 SHA512 15b1525890477539878385efc15ce5f1cf2f126cc785c42923be958cabe3298cebe73526a2370cf4c630124160a7ca0f0f9062aebbf035dce807a0374eaddd14
-DIST ghc-bin-8.2.2-x86_64-pc-linux-gnu.tbz2 97696152 BLAKE2B b481cfea186220ee402f9f215dd48b002288766b643f3d8352579735347136c6349d242a9a56728d88ce80f72367dc9fdb6e40c47a0331910dadbb9a4998e17b SHA512 531df6505e8987fb5c5cc0aac59adc6aa153a4757b96936d3f09f27f3614589ff41c227568b780114b2e87c6c8656f2c88683cce86925628d12723f14b893eff
-DIST ghc-bin-8.4.1-i686-pc-linux-gnu.tbz2 116995839 BLAKE2B f94f2206d603d57f7fa64bdf63bcd2528019284fbf6641273ea1d8c62324e2f0b26b2cfa50c6ef96e12beba550bcedd17aa824e7cf9a27c794e962526326e105 SHA512 8167ea80fa627a1b55d28363513ac79985229326019288e7334cc87c3017d39781f4d129081d62da112420152a41d23d2dffb0c13721b80cca72d2a21fbd2c0a
-DIST ghc-bin-8.4.1-x86_64-pc-linux-gnu.tbz2 117369638 BLAKE2B 583db924a50a3d7d261d2f392a74e0ff487ee662af055ac292ff1943534fb305d6c9f6f0045ba4bdd5afa268d75beb50f64b4760e49cddabe1f56776a5f4769f SHA512 801f4ecd538c7a035a0f573f301769984814fa3ce4cf5b09a914ba012bebe0583b6695a6a93f92c7e6e2b7d58caf812a1214b5b778d7b7835d7eab988ad69ba0
-DIST ghc-bin-8.4.2-i686-pc-linux-gnu.tbz2 117083472 BLAKE2B 7dac18523ed693efb0ec42b31bf7b910e6bb8289cdc13eb309bdb30230fc87fbb060baf41eb4f18af2bb265b42e6aca535ceb70cf0fe09046b0e4650f11bb37c SHA512 f9799bdf7a2a66d1db34b828860203872d7398bab2d667e8982c9ee89301654c3f7f54705b639df2d7adebcfb7a05e071b83d994f5e52a72f604b62098be51cd
-DIST ghc-bin-8.4.2-x86_64-pc-linux-gnu.tbz2 117604406 BLAKE2B 644ef535497eb73a2d1ceaab7ff96228e8d4021c09bc061a3f397dc27b3b86bd6d5300736e478671cee0a160bfaa5aa4611f06012285079b40973f468b59664a SHA512 7bf4bcdce954319422b8b8f09e56294012fac145662ba3de1c7765ed86ae9f8b61dcf6dd8febcf85d60db8d1a26edcaf4e89c3644ffa24c7b5b5c41a14105936
-DIST ghc-bin-8.4.3-i686-pc-linux-gnu.tbz2 117028296 BLAKE2B 0c99a2f6fe4af4a1342d948cbda53b178fe9709673e0d09bc3b6a4e0f3ec4e4b8f77830829f149993f51e490692de39024900fb188116816e41441153eac3622 SHA512 13147ae0d6b941b3bc2f0239071a2f6f854a39cb6a381f0e2fda7069ac29bb2c64fb3ccc6191e7527b5f27fe616bd62f2e487b5d50679789927b401f02c62ad7
-DIST ghc-bin-8.4.3-x86_64-pc-linux-gnu.tbz2 117537996 BLAKE2B 2be0102fcc0f1fef5aae194620a43c1c90538215d4eec2550419634ed9c5bbfb17391d57519c20ab53987a36b42488ac43ff968690a4f65b96c52c3485589d10 SHA512 5f26810ec1f0a483f03ef01f56130eba0287b49b912efba03158336ce521000b611192cf021b72c1a0d902532cc4c9470ca1b3233ccba7c7e7c2ac490c6099fa
-DIST ghc-bin-8.6.4-i686-pc-linux-gnu.tbz2 121639881 BLAKE2B 51d223b654ff23bbdd594801f4ec92b016a58b952ba98007abb56c1c4b184a672e51eb9847b42160febcc4ada0f28f18325cc27f8a025dd9fcf656e3bab73918 SHA512 6b58b080c5fb18ea7b76632b4b48726af61b52d8829f57a2ddd55e6bc109c1fe1a133d2a0ca974a168ffee0013a6dfdc4922577bad01c50a42dad8b9db70e061
-DIST ghc-bin-8.6.4-x86_64-pc-linux-gnu.tbz2 121695747 BLAKE2B 39c745f5f9946bbae622e09bbdabdde4d62eec472fe14e693f37cba6b93ff66e4e56f66df8f0f073686339d252dce71f79f4c2aaef620c3dffbc26a67b1119c3 SHA512 c60bac50e7879bda1d6dcc7c1f12fdac915b18c3ebbfcfad575b2b01fcb57a487496ce7935f7ee4ae934162209ab66370fbcc8a4f021628e5f9a2aa7ef95e119
-DIST ghc-bin-8.6.5-i686-pc-linux-gnu.tbz2 121938050 BLAKE2B 17b6d15af21390e28a025505da76d39a2f8656f74c88a81fc75e7c8e799e54171c0d964d8a977c01576603a781c139b5363ea79eeaa2252622913d2a08a79f0e SHA512 9eb33b4670ee15f53c988885a119f3ef7be896ddcb318019628cdd04e21ec0c61876e08466d9d10d6cb1e16d89cd318e0ba42f0f0ae512f48590fe87483739cd
-DIST ghc-bin-8.6.5-powerpc64le-unknown-linux-gnu.tbz2 173549697 BLAKE2B 296bf4e0745f56dfefc3ffc96b4e492ddbfd8bcbbc28a8bc9b3172c616d0e7da1081834384ab69e387808331b607104f015632d59963a87f4e257f290ff286c3 SHA512 81261614a7939adb0ffad3657cd33588ff729bb1e3a7dd228cf869afc1f21b74cb4dce6369a4c4cdc9f45f8d8ae64f25d71cd0f2dc34f36d3022afc149538a78
-DIST ghc-bin-8.6.5-x86_64-pc-linux-gnu.tbz2 121728723 BLAKE2B 6620b2a116b5696dd2d776350a43251c093e117338a4407ae8c41ae27763a4614d7e761b2684b90aa9317dafe7cb67481a6bc141c812d335d5231724ae3db2a7 SHA512 69681eab137f6713339f8912d0d92f6af865630053bcd7a32cb8a31e01628e969951db976533196794fe39e0e57f0fcd8778d9fc9fed4f4231e965b9a603dd8e
-DIST ghc-bin-8.8.1-i686-pc-linux-gnu.tbz2 120789855 BLAKE2B 386f37696d956078fad5cad50cbf5b9d9d7765615a1d9cc91a376fb5394648afe8ca956e24ef210f2ff0e51f339b63b16a50f6dc35f30babf019aa57de50b27b SHA512 193c29889693befba863d3c5a26d38d8182bb7e1932b61115dc0a21b6582f818b05db144a9fae5aee06af2044ea59f884825cf1081b62a1c67feb3041d184d3a
-DIST ghc-bin-8.8.1-powerpc64le-unknown-linux-gnu.tbz2 173653088 BLAKE2B 6c29777b596b35fee8e3a17f965e6a21dc40dc2387988f55d4ca5fef0ea9677b558ed210054216a6578b93fbf844df9e407770df184f707f8203f846f4929d2d SHA512 d338b8912c1632410c43a0df75ce69f961924a7c51049a3ac27c22f7c6cfc07388815813713d594fc38b721127df80b65f72b1b0cc6fbf0e10fa15970b8b6f46
-DIST ghc-bin-8.8.1-x86_64-pc-linux-gnu.tbz2 119317594 BLAKE2B 98f0fb262ac485dcfd6a8a67304912ffad2bf2634111fcc3b60346697a836867006bbacaab1e1be0cd5be34b4595d12bec13af644c451c10f7e3843ebaf5922f SHA512 e6acb11755db18fd86a346de642b8579a6b48b303c19795949757f5e351ad3b8892906e989dc57a7fd4471d0efe30fc8175df5bac741d7faecfe42a855a67980
-DIST ghc-bin-8.8.2-i686-pc-linux-gnu.tbz2 120289601 BLAKE2B df65bc6aa4ee22c979b9d8eda29f51188c96700d61fb4cf141ebad8a55e26b6cd959fce3ec0b8d780b68e7baf15a1ce7654dc4ef084aa4671fe05f00f9c4e9aa SHA512 da059f3fea00e14df346143e714da6484ae51d362d9e237607817791e02ec81e29e1ff7f9929fac44044f63196b395287c42f5829884c34391289179b4f6e204
-DIST ghc-bin-8.8.2-x86_64-pc-linux-gnu.tbz2 118957404 BLAKE2B cddedbb0fe8d38e9821bd8f51f5177d35922b25bf4fc8a537e921443560f141cdef44e54a0b4ef2dde07dbe33d9c1cba2e67ba80db4313f67e9bac089d967f56 SHA512 b0b801dd6abe9f5e6217e18568e2911dbfea11b1b45ff526950e87c73a34bcd597afc5105fcff2dc46bb13cf95e63db90c0d24ca9babf174b397a53001e8e0ac
-DIST ghc-bin-8.8.3-i686-pc-linux-gnu.tbz2 120243899 BLAKE2B 7f932523a71dcfd4cdd468bf67f470a942c314888c0093c21c211d54b3e158f45f051f027c78644a651047d81e809e1422bbaa5043e8559c6a4622ac0472f7e4 SHA512 12bf08b85652fd061849b9adb528d7a5c6fe9c2260cf02b92fab470fff16c3121bcb4e0f7044d05f252012083d622a1a490fa7f7c949142a3b5d03ccf0dd3ebc
-DIST ghc-bin-8.8.3-x86_64-pc-linux-gnu.tbz2 118988294 BLAKE2B 4e5aa3844934ae2726bf9c8690acd5a887f10cd49386ffadbc536f9309d33b3894b49507964eaf0d8a052747eb33aeabbe4d2cd22493297c295cf9414fcb766c SHA512 dd656157fe744c1df1c8ed34d1129ec358b26f3042c6da68e704e0f6a45d8114789000479e28a06dc16961afb283b3c666b427025590498a3d2da9b741b435c7
 DIST ghc-bin-8.8.4-i686-pc-linux-gnu.tbz2 120336081 BLAKE2B 55dfbb90d5e55c2af5e93c69249828a85cd9171c164b80dfdaf86512972b2c6854c8e4f07426af4ab52a5fb1a85d96a58c2cf003fb02372c55428001cfaea491 SHA512 ad3b83344349976d3253934195b2dc6299648391572b13735943c5ea2239c031c19b0cafd86c16cfb0c061e73bc72e9248f9c1731494a9a15fbe188f02913c12
 DIST ghc-bin-8.8.4-x86_64-pc-linux-gnu.tbz2 118897883 BLAKE2B a180b2dd1a3bc222044ece809ad700aee29d0c3e75b57ee9af3ca33c9c0f59dbf36f68202f746d99f80915cb717a9c41fc12db507f1cb469981732703a06b9cc SHA512 9d4be02dbd9704c93ef18feb92ea30bd5d590df31f288bf1b364818424c5019ca9ada26eec88418199f90ae8f4459d0a9352104e3f3186bbdc241891eb1b66c4
 DIST ghc-bin-9.0.1-i686-pc-linux-gnu.tbz2 122955511 BLAKE2B b870f46cc78fcc1d715aafe7108951582cfd12495b4e9d804d4b66562c66a6a2b2d9513031aedc8f3630a0cdbb3257943304b05732301a084f89487452f2f2d9 SHA512 aafd4233c40f93b71e6ac1acc8a75e30d49b826e4bce6d9832836966fd5f6c4898963bd4c2f34577f4199c1d9a3f537ac1e7d87eab11e9fb5e849573580ed3fb
 DIST ghc-bin-9.0.1-x86_64-pc-linux-gnu.tbz2 121542968 BLAKE2B 837870e68138f8d97dc8b2aae90090cf02416628602ca4ba4417ac92b49155f10028b05ac465665b8872b32372a5cee075616983f2eacdebb0188bd2ce6a93d2 SHA512 0e8c6d2e6f32fac95588f7323a4e02dddfc9ec2476a82b97bf5a106d3810f7e638fda7124c53b5bbc563fce70f4436553c282d8ea2f1f5fdf4fcccfb15a2b079
-DIST hoopl-3.10.2.0.tar.gz 241940 BLAKE2B 0ed7bf80486767c81415f99da8780a525401c388dea0b3f380bbecceae9cc7f66d8b5d0d7b31f8cb41796309b7a93adb113485efd14882f8af321989ce900a9b SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a
-DIST transformers-0.4.3.0.tar.gz 28632 BLAKE2B 92cabcb654bb11854a3bffbb1262f5cd62eda1aff447157086a61ebc451ebf2fddec53b6a2cc058174f24f0f0e32df671d3717e30a542c8dc90cb87e327d990c SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780

diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
deleted file mode 100644
index 590b6e0a913..00000000000
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ /dev/null
@@ -1,674 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-#
-# 'CTARGET' definition and 'is_crosscompile' are taken from 'toolchain.eclass'
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib pax-utils toolchain-funcs versionator prefix
-
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# sorted!
-arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-arm.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PVR}-amd64.tbz2 )"
-arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64.tbz2 )"
-arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PVR}-x86.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		alpha) return 0 ;;
-		#arm)
-		#	ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
-		#	return 0
-		#;;
-		amd64) return 0 ;;
-		ia64) return 0 ;;
-		ppc) return 0 ;;
-		ppc64) return 0 ;;
-		sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=7.10.2.20151030 # uncomment only for -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.bz2 )"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-	"binary                  0.7.6.1"
-	"hoopl                   3.10.2.0"
-	"transformers            0.4.3.0"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp"
-IUSE+=" binary"
-IUSE+=" elibc_glibc" # system stuff
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	>=dev-libs/gmp-5:=
-	sys-libs/ncurses:0=[unicode]
-	!ghcmakebinary? ( dev-libs/libffi:= )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses-compat:5
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	if is_crosscompile; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
-	# are not built with fPIC, bug #606666
-	gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
-	tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
-		# gcc-6.3 has support for -no-pie upstream, but spelling differs from
-		# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
-		# hardened users try '-pie' in USE=ghcbootstrap mode.
-		append-ghc-cflags compile link -no-pie
-	fi
-	gcc-specs-ssp && append-ghc-cflags persistent compile      -fno-stack-protector
-
-	# prevent from failind building unregisterised ghc:
-	# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-	use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	# fix the similar issue as ppc64 TOC on ia64. ia64 has limited size of small data
-	# currently ghc fails to build haddock
-	# https://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
-	use ia64 && append-ghc-cflags persistent compile -G0
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
-	cp "${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/$(cross)hsc2hs" \
-			"${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/$(cross)hsc2hs" \
-		"${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
-		"${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-pkg_setup() {
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.bz2  ;;
-	esac
-	unpack ${ONLYA}
-
-	if [[ -d "${S}"/libraries/dph ]]; then
-		# Sometimes dph libs get accidentally shipped with ghc
-		# but they are not installed unless user requests it.
-		# We never install them.
-		elog "Removing 'libraries/dph'"
-		rm -rf "${S}"/libraries/dph
-	fi
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# much arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise epatch will break
-
-		epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-
-		epatch "${FILESDIR}"/${PN}-7.8.2-cgen-constify.patch
-		epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		epatch "${FILESDIR}"/${PN}-7.10.1-rc3-ghc-7.10-bootstrap.patch
-		epatch "${FILESDIR}"/${PN}-7.10.3-relnotes.patch
-		epatch "${FILESDIR}"/${PN}-7.10.3-hardfloat.patch
-
-		# Since ${S}/packages does not include base, etc. add them to gen_contents_index
-		sed -e 's@\(for REPO in .*\)@\1 base integer-gmp integer-gmp2 integer-simple template-haskell@' \
-			-i libraries/gen_contents_index || die
-
-		if use prefix; then
-			# Make configure find docbook-xsl-stylesheets from Prefix
-			sed -e '/^FP_DIR_DOCBOOK_XSL/s:\[.*\]:['"${EPREFIX}"'/usr/share/sgml/docbook/xsl-stylesheets/]:' \
-				-i utils/haddock/doc/configure.ac || die
-		fi
-
-		bump_libs
-
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_DOCBOOK_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_DOCBOOK_PS   = NO"  >> mk/build.mk
-		if use doc; then
-			echo "BUILD_DOCBOOK_HTML = YES" >> mk/build.mk
-		else
-			echo "BUILD_DOCBOOK_HTML = NO" >> mk/build.mk
-		fi
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		if use gmp; then
-			echo "INTEGER_LIBRARY=integer-gmp2" >> mk/build.mk
-		else
-			echo "INTEGER_LIBRARY=integer-simple" >> mk/build.mk
-		fi
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds 'gcc' it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		is_crosscompile || econf_args+=(--with-gcc=${CHOST}-gcc)
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		else
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		elog "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# 1. build compiler binary first
-		emake ghc/stage2/build/tmp/ghc-stage2
-		# 2. pax-mark (bug #516430)
-		pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-
-		emake -j1 install DESTDIR="${D}"
-		dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if [[ ! -f "${S}/VERSION" ]]; then
-			echo "${GHC_PV}" > "${S}/VERSION" \
-				|| die "Could not create file ${S}/VERSION"
-		fi
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}

diff --git a/dev-lang/ghc/ghc-7.8.4.ebuild b/dev-lang/ghc/ghc-7.8.4.ebuild
deleted file mode 100644
index 89b41d25871..00000000000
--- a/dev-lang/ghc/ghc-7.8.4.ebuild
+++ /dev/null
@@ -1,600 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-#
-# 'CTARGET' definition and 'is_crosscompile' are taken from 'toolchain.eclass'
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib pax-utils toolchain-funcs versionator
-
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# sorted!
-arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-arm.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-amd64.tbz2 )"
-arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64.tbz2 )"
-arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		alpha) return 0 ;;
-		#arm)
-		#	ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
-		#	return 0
-		#;;
-		amd64) return 0 ;;
-		ia64) return 0 ;;
-		ppc) return 0 ;;
-		ppc64) return 0 ;;
-		sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=7.8.3.20141119 # uncomment only for -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.bz2 )"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-SRC_URI+=" https://dev.gentoo.org/~slyfox/distfiles/${P}-ia64-CLOSUREs-regenerated.patch.gz"
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp"
-IUSE+=" binary"
-IUSE+=" elibc_glibc" # system stuff
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	>=dev-libs/gmp-5:=
-	sys-libs/ncurses:0=[unicode]
-	!ghcmakebinary? ( dev-libs/libffi:= )
-"
-
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-	sys-libs/ncurses-compat:5
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-DEPEND="${RDEPEND}
-	ghcbootstrap? (
-		doc? ( app-text/docbook-xml-dtd:4.2
-			app-text/docbook-xml-dtd:4.5
-			app-text/docbook-xsl-stylesheets
-			>=dev-libs/libxslt-1.1.2 ) )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-ghc_setup_cflags() {
-	if is_crosscompile; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# hardened-gcc needs to be disabled, because the mangler doesn't accept
-	# its output.
-	gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
-	gcc-specs-ssp && append-ghc-cflags persistent compile      -fno-stack-protector
-
-	# prevent from failind building unregisterised ghc:
-	# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-	use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	# fix the similar issue as ppc64 TOC on ia64. ia64 has limited size of small data
-	# currently ghc fails to build haddock
-	# https://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
-	use ia64 && append-ghc-cflags persistent compile -G0
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
-	cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/hsc2hs" \
-		"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
-		"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-pkg_setup() {
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.bz2  ;;
-	esac
-	unpack ${ONLYA}
-
-	if [[ -d "${S}"/libraries/dph ]]; then
-		# Sometimes dph libs get accidentally shipped with ghc
-		# but they are not installed unless user requests it.
-		# We never install them.
-		elog "Removing 'libraries/dph'"
-		rm -rf "${S}"/libraries/dph
-	fi
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/ghc-${GHC_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# much arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise epatch will break
-
-		epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-
-		epatch "${FILESDIR}"/${PN}-7.8.1_rc1-libbfd.patch
-
-		epatch "${FILESDIR}"/${PN}-7.8.2-cgen-constify.patch
-		epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		# bug 518734
-		epatch "${FILESDIR}"/${PN}-7.6.3-preserve-inplace-xattr.patch
-		# fix threaded runtime on ia64
-		epatch "${FILESDIR}"/${PN}-7.8.4-ia64-CLOSUREs.patch
-		epatch "${WORKDIR}"/${PN}-7.8.4-ia64-CLOSUREs-regenerated.patch
-
-		# upstream backports
-		epatch "${FILESDIR}"/${PN}-7.8.3-linker-warn.patch
-		epatch "${FILESDIR}"/${PN}-7.8.3-pic-sparc.patch
-		epatch "${FILESDIR}"/${PN}-7.8.3-ppc32-fPIC.patch
-		epatch "${FILESDIR}"/${PN}-7.8.4-gold.patch
-
-		if use prefix; then
-			# Make configure find docbook-xsl-stylesheets from Prefix
-			sed -e '/^FP_DIR_DOCBOOK_XSL/s:\[.*\]:['"${EPREFIX}"'/usr/share/sgml/docbook/xsl-stylesheets/]:' \
-				-i utils/haddock/doc/configure.ac || die
-		fi
-
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		if use ghcbootstrap && use doc; then
-			echo "BUILD_DOCBOOK_PDF  = NO"  >> mk/build.mk
-			echo "BUILD_DOCBOOK_PS   = NO"  >> mk/build.mk
-			echo "BUILD_DOCBOOK_HTML = YES" >> mk/build.mk
-			echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-		else
-			echo "BUILD_DOCBOOK_PDF  = NO" >> mk/build.mk
-			echo "BUILD_DOCBOOK_PS   = NO" >> mk/build.mk
-			echo "BUILD_DOCBOOK_HTML = NO" >> mk/build.mk
-			echo "HADDOCK_DOCS       = NO" >> mk/build.mk
-		fi
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		if use gmp; then
-			echo "INTEGER_LIBRARY=integer-gmp" >> mk/build.mk
-		else
-			echo "INTEGER_LIBRARY=integer-simple" >> mk/build.mk
-		fi
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds 'gcc' it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		is_crosscompile || econf_args+=(--with-gcc=${CHOST}-gcc)
-
-		if ! use ghcmakebinary; then
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-		GHC_TPF="$(grep 'S\[\"TargetPlatformFull\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# 1. build compiler binary first
-		emake ghc/stage2/build/tmp/ghc-stage2
-		# 2. pax-mark (bug #516430)
-		pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-
-		# Remove the docs if not requested
-		if ! use doc; then
-			rm -rf "${ED}/usr/share/doc/${P}/*/" \
-				"${ED}/usr/share/doc/${P}/*.html" \
-				|| die "could not remove docs (P vs PF revision mismatch?)"
-		fi
-	else
-		# We only build docs if we were bootstrapping, otherwise
-		# we copy them out of the unpacked binary .tbz2
-		if use doc && ! use ghcbootstrap; then
-			mkdir -p "${ED}/usr/share/doc"
-			mv "${WORKDIR}/usr/share/doc/${P}" "${ED}/usr/share/doc" \
-				|| die "failed to copy docs"
-		else
-			dodoc "${S}/distrib/README" "${S}/ANNOUNCE" "${S}/LICENSE" "${S}/VERSION"
-		fi
-
-		emake -j1 install DESTDIR="${D}"
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/haddock
-
-		if [[ ! -f "${S}/VERSION" ]]; then
-			echo "${GHC_PV}" > "${S}/VERSION" \
-				|| die "Could not create file ${S}/VERSION"
-		fi
-		newbashcomp "${FILESDIR}/ghc-bash-completion" ghc-pkg
-
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater --upgrade'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	# Be very careful here... Call order when upgrading is (according to PMS):
-	# * src_install for new package
-	# * pkg_preinst for new package
-	# * pkg_postinst for new package
-	# * pkg_prerm for the package being replaced
-	# * pkg_postrm for the package being replaced
-	# so you'll actually be touching the new packages files, not the one you
-	# uninstall, due to that or installation directory ${GHC_P} will be the same for
-	# both packages.
-
-	# Call order for reinstalling is (according to PMS):
-	# * src_install
-	# * pkg_preinst
-	# * pkg_prerm for the package being replaced
-	# * pkg_postrm for the package being replaced
-	# * pkg_postinst
-
-	# Overwrite the modified package.cache with a copy of the
-	# original one, so that it will be removed during uninstall.
-
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}

diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
deleted file mode 100644
index ede481d98ea..00000000000
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ /dev/null
@@ -1,672 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-#
-# 'CTARGET' definition and 'is_crosscompile' are taken from 'toolchain.eclass'
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib pax-utils toolchain-funcs versionator prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# sorted!
-arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-arm.tbz2 )"
-arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-arm64.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		alpha) return 0 ;;
-		arm64) return 0 ;;
-		#arm)
-		#	ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
-		#	return 0
-		#;;
-		amd64) return 0 ;;
-		ia64) return 0 ;;
-		ppc) return 0 ;;
-		ppc64) return 0 ;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.0.1.20161213 # uncomment only for -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.xz )"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp +profile"
-IUSE+=" binary"
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	dev-libs/gmp:0=
-	sys-libs/ncurses:0=[unicode]
-	!ghcmakebinary? ( dev-libs/libffi:= )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		dev-python/sphinx
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	if is_crosscompile; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
-	# are not built with fPIC, bug #606666
-	gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
-	tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
-		# gcc-6.3 has support for -no-pie upstream, but spelling differs from
-		# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
-		# hardened users try '-pie' in USE=ghcbootstrap mode.
-		append-ghc-cflags compile link -no-pie
-	fi
-
-	# prevent from failind building unregisterised ghc:
-	# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-	use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
-	cp "${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-		bin_libpath=${bin_ghc_prefix}/$(get_libdir)
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/$(cross)hsc2hs" \
-			"${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/$(cross)hsc2hs" \
-		"${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
-		"${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-ghc-check-reqs() {
-	# These are pessimistic values (slightly bigger than worst-case)
-	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
-	# numbers on various arches.
-	CHECKREQS_DISK_BUILD=8G
-	CHECKREQS_DISK_USR=2G
-	# USE=binary roughly takes
-	use binary && CHECKREQS_DISK_BUILD=4G
-
-	"$@"
-}
-
-pkg_pretend() {
-	ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	ghc-check-reqs check-reqs_pkg_setup
-
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
-	esac
-	unpack ${ONLYA}
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# much arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise epatch will break
-
-		epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-
-		epatch "${FILESDIR}"/${PN}-8.0.1_rc1-cgen-constify.patch
-		epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		epatch "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
-
-		epatch "${FILESDIR}"/${PN}-8.0.1-limit-jN.patch
-		epatch "${FILESDIR}"/${PN}-8.0.1-ww-args-limit.patch
-		epatch "${FILESDIR}"/${PN}-8.0.1-par-g0-on-A32.patch
-		epatch "${FILESDIR}"/${PN}-8.0.2_rc2-old-sphinx.patch
-		epatch "${FILESDIR}"/${PN}-8.0.2-libffi-alpha.patch
-		epatch "${FILESDIR}"/${PN}-8.0.2-O2-unreg.patch
-		epatch "${FILESDIR}"/${PN}-8.0.2-binutils-2.30.patch
-
-		bump_libs
-
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-		# Speed up initial Cabal bootstrap
-		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
-		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds 'gcc' it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		is_crosscompile || econf_args+=(--with-gcc=${CHOST}-gcc)
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		else
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		elog "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# 1. build/pax-mark compiler binary first
-		emake ghc/stage2/build/tmp/ghc-stage2
-		pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-		# 2. build/pax-mark haddock using ghc-stage2
-		emake utils/haddock/dist/build/tmp/haddock
-		pax-mark -m utils/haddock/dist/build/tmp/haddock
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-
-		emake -j1 install DESTDIR="${D}"
-		dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if [[ ! -f "${S}/VERSION" ]]; then
-			echo "${GHC_PV}" > "${S}/VERSION" \
-				|| die "Could not create file ${S}/VERSION"
-		fi
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}

diff --git a/dev-lang/ghc/ghc-8.10.1.ebuild b/dev-lang/ghc/ghc-8.10.1.ebuild
deleted file mode 100644
index 1db40de3428..00000000000
--- a/dev-lang/ghc/ghc-8.10.1.ebuild
+++ /dev/null
@@ -1,797 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-BIN_PV=${PV}
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		#arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		#ppc64)
-		#	use big-endian && return 0
-		#	return 0
-		#	;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.10.0.20200123 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
-	https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-src.tar.xz
-	test? ( https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS=""
-IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-IUSE+=" binary"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	dev-libs/gmp:0=
-	sys-libs/ncurses:0=[unicode]
-	elfutils? ( dev-libs/elfutils )
-	!ghcmakebinary? ( dev-libs/libffi:= )
-	numa? ( sys-process/numactl )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		dev-python/sphinx
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-# we build binaries without profiling support
-REQUIRED_USE="
-	?? ( ghcbootstrap binary )
-	?? ( profile binary )
-"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
-	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-if ! is_crosscompile; then
-	PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-fi
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
-	if ! is_native; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
-	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
-	# options to gcc.
-	if is_native; then
-		# prevent from failing to build unregisterised ghc:
-		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	fi
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1 ghc_v=${BIN_PV}
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
-	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/hp2ps" \
-		"${WORKDIR}/usr/bin/hpc" \
-		"${WORKDIR}/usr/bin/hsc2hs" \
-		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-ghc-check-reqs() {
-	# These are pessimistic values (slightly bigger than worst-case)
-	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
-	# numbers on various arches.
-	CHECKREQS_DISK_BUILD=8G
-	CHECKREQS_DISK_USR=2G
-	# USE=binary roughly takes
-	use binary && CHECKREQS_DISK_BUILD=4G
-
-	"$@"
-}
-
-pkg_pretend() {
-	ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	ghc-check-reqs check-reqs_pkg_setup
-
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
-	esac
-	unpack ${ONLYA}
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-		eapply_user
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# many arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise eapply will break
-
-		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
-		eapply "${FILESDIR}"/${PN}-8.10.1-no-relax-everywhere.patch
-		eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch
-
-		# a bunch of crosscompiler patches
-		# needs newer version:
-		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
-		# mingw32 target
-		pushd "${S}/libraries/Win32"
-			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
-		popd
-
-		bump_libs
-
-		eapply_user
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-		# Speed up initial Cabal bootstrap
-		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
-		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# not used outside of ghc's test
-		if [[ -n ${GHC_BUILD_DPH} ]]; then
-				echo "BUILD_DPH = YES" >> mk/build.mk
-			else
-				echo "BUILD_DPH = NO" >> mk/build.mk
-		fi
-
-		# Any non-native build has to skip as it needs
-		# target haddock binary to be runnabine.
-		if ! is_native; then
-			# disable docs generation as it requires running stage2
-			echo "HADDOCK_DOCS=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
-		fi
-
-		if is_crosscompile; then
-			# Install ghc-stage1 crosscompiler instead of
-			# ghc-stage2 cross-built compiler.
-			echo "Stage1Only=YES" >> mk/build.mk
-		fi
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds toolchain it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		# User can use EXTRA_ECONF=CC=... to override this default.
-		econf_args+=(
-			AR=${CTARGET}-ar
-			CC=${CTARGET}-gcc
-			# these should be inferred by GHC but ghc defaults
-			# to using bundled tools on windows.
-			Windres=${CTARGET}-windres
-			DllWrap=${CTARGET}-dllwrap
-			# we set the linker explicitly below
-			--disable-ld-override
-		)
-		case ${CTARGET} in
-			arm*)
-				# ld.bfd-2.28 does not work for ghc. Force ld.gold
-				# instead. This should be removed once gentoo gets
-				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
-				econf_args+=(LD=${CTARGET}-ld.gold)
-			;;
-			sparc*)
-				# ld.gold-2.28 does not work for ghc. Force ld.bfd
-				# instead. This should be removed once gentoo gets
-				# a fix for missing --no-relax support bug:
-				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
-				econf_args+=(LD=${CTARGET}-ld.bfd)
-			;;
-			*)
-				econf_args+=(LD=${CTARGET}-ld)
-		esac
-
-		if [[ ${CBUILD} != ${CHOST} ]]; then
-			# GHC bug: ghc claims not to support cross-building.
-			# It does, but does not distinct --host= value
-			# for stage1 and stage2 compiler.
-			econf_args+=(--host=${CBUILD})
-		fi
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		elif is_native; then
-			# using ${GTARGET}'s libffi is not supported yet:
-			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		einfo "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} \
-			--enable-bootstrap-with-devel-snapshot \
-			$(use_enable elfutils dwarf-unwind) \
-			$(use_enable numa)
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# Stage1Only crosscompiler does not build stage2
-		if ! is_crosscompile; then
-			# 1. build/pax-mark compiler binary first
-			emake ghc/stage2/build/tmp/ghc-stage2
-			# 2. pax-mark (bug #516430)
-			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-			# 2. build/pax-mark haddock using ghc-stage2
-			if is_native; then
-				# non-native build does not build haddock
-				# due to HADDOCK_DOCS=NO, but it could.
-				emake utils/haddock/dist/build/tmp/haddock
-				pax-mark -m utils/haddock/dist/build/tmp/haddock
-			fi
-		fi
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_test() {
-	# TODO: deal with:
-	#    - sandbox (pollutes environment)
-	#    - extra packages (to extend testsuite coverage)
-	# bits are taken from 'validate'
-	local make_test_target='test' # can be fulltest
-	# not 'emake' as testsuite uses '$MAKE' without jobserver available
-	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-		[[ -f VERSION ]] || emake VERSION
-
-		# -j1 due to a rare race in install script:
-		#    make --no-print-directory -f ghc.mk phase=final install
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
-		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
-		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
-		#    /usr/bin/install: cannot create regular file \
-		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
-		emake -j1 install DESTDIR="${D}"
-
-		# Skip for cross-targets as they all share target location:
-		# /usr/share/doc/ghc-9999/
-		if ! is_crosscompile; then
-			dodoc "distrib/README" "LICENSE" "VERSION"
-		fi
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-
-	if is_crosscompile; then
-		# When we build a cross-compiler the layout is the following:
-		#     usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
-		# but
-		#     usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
-		# containst host binaries (modulo bugs).
-
-		# Portage's stripping mechanism does not skip stripping
-		# foreign binaries. This frequently causes binaries to be
-		# broken.
-		#
-		# Thus below we disable stripping of target libraries and allow
-		# stripping hosts executables.
-		dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
-		dostrip    "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
-	fi
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}

diff --git a/dev-lang/ghc/ghc-8.10.2.ebuild b/dev-lang/ghc/ghc-8.10.2.ebuild
deleted file mode 100644
index fc819806ed0..00000000000
--- a/dev-lang/ghc/ghc-8.10.2.ebuild
+++ /dev/null
@@ -1,797 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-BIN_PV=${PV}
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		#arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		#ppc64)
-		#	use big-endian && return 0
-		#	return 0
-		#	;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.10.0.20200123 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
-	https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-src.tar.xz
-	test? ( https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS=""
-IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-IUSE+=" binary"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	dev-libs/gmp:0=
-	sys-libs/ncurses:0=[unicode]
-	elfutils? ( dev-libs/elfutils )
-	!ghcmakebinary? ( dev-libs/libffi:= )
-	numa? ( sys-process/numactl )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		dev-python/sphinx
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-# we build binaries without profiling support
-REQUIRED_USE="
-	?? ( ghcbootstrap binary )
-	?? ( profile binary )
-"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
-	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-if ! is_crosscompile; then
-	PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-fi
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
-	if ! is_native; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
-	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
-	# options to gcc.
-	if is_native; then
-		# prevent from failing to build unregisterised ghc:
-		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	fi
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1 ghc_v=${BIN_PV}
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
-	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/hp2ps" \
-		"${WORKDIR}/usr/bin/hpc" \
-		"${WORKDIR}/usr/bin/hsc2hs" \
-		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-ghc-check-reqs() {
-	# These are pessimistic values (slightly bigger than worst-case)
-	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
-	# numbers on various arches.
-	CHECKREQS_DISK_BUILD=8G
-	CHECKREQS_DISK_USR=2G
-	# USE=binary roughly takes
-	use binary && CHECKREQS_DISK_BUILD=4G
-
-	"$@"
-}
-
-pkg_pretend() {
-	ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	ghc-check-reqs check-reqs_pkg_setup
-
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
-	esac
-	unpack ${ONLYA}
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-		eapply_user
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# many arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise eapply will break
-
-		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
-		eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch
-		eapply "${FILESDIR}"/${PN}-8.10.2-revert-linker-rtsSymbols_more_linker_symbols.patch
-
-		# a bunch of crosscompiler patches
-		# needs newer version:
-		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
-		# mingw32 target
-		pushd "${S}/libraries/Win32"
-			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
-		popd
-
-		bump_libs
-
-		eapply_user
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-		# Speed up initial Cabal bootstrap
-		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
-		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# not used outside of ghc's test
-		if [[ -n ${GHC_BUILD_DPH} ]]; then
-				echo "BUILD_DPH = YES" >> mk/build.mk
-			else
-				echo "BUILD_DPH = NO" >> mk/build.mk
-		fi
-
-		# Any non-native build has to skip as it needs
-		# target haddock binary to be runnabine.
-		if ! is_native; then
-			# disable docs generation as it requires running stage2
-			echo "HADDOCK_DOCS=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
-		fi
-
-		if is_crosscompile; then
-			# Install ghc-stage1 crosscompiler instead of
-			# ghc-stage2 cross-built compiler.
-			echo "Stage1Only=YES" >> mk/build.mk
-		fi
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds toolchain it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		# User can use EXTRA_ECONF=CC=... to override this default.
-		econf_args+=(
-			AR=${CTARGET}-ar
-			CC=${CTARGET}-gcc
-			# these should be inferred by GHC but ghc defaults
-			# to using bundled tools on windows.
-			Windres=${CTARGET}-windres
-			DllWrap=${CTARGET}-dllwrap
-			# we set the linker explicitly below
-			--disable-ld-override
-		)
-		case ${CTARGET} in
-			arm*)
-				# ld.bfd-2.28 does not work for ghc. Force ld.gold
-				# instead. This should be removed once gentoo gets
-				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
-				econf_args+=(LD=${CTARGET}-ld.gold)
-			;;
-			sparc*)
-				# ld.gold-2.28 does not work for ghc. Force ld.bfd
-				# instead. This should be removed once gentoo gets
-				# a fix for missing --no-relax support bug:
-				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
-				econf_args+=(LD=${CTARGET}-ld.bfd)
-			;;
-			*)
-				econf_args+=(LD=${CTARGET}-ld)
-		esac
-
-		if [[ ${CBUILD} != ${CHOST} ]]; then
-			# GHC bug: ghc claims not to support cross-building.
-			# It does, but does not distinct --host= value
-			# for stage1 and stage2 compiler.
-			econf_args+=(--host=${CBUILD})
-		fi
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		elif is_native; then
-			# using ${GTARGET}'s libffi is not supported yet:
-			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		einfo "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} \
-			--enable-bootstrap-with-devel-snapshot \
-			$(use_enable elfutils dwarf-unwind) \
-			$(use_enable numa)
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# Stage1Only crosscompiler does not build stage2
-		if ! is_crosscompile; then
-			# 1. build/pax-mark compiler binary first
-			emake ghc/stage2/build/tmp/ghc-stage2
-			# 2. pax-mark (bug #516430)
-			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-			# 2. build/pax-mark haddock using ghc-stage2
-			if is_native; then
-				# non-native build does not build haddock
-				# due to HADDOCK_DOCS=NO, but it could.
-				emake utils/haddock/dist/build/tmp/haddock
-				pax-mark -m utils/haddock/dist/build/tmp/haddock
-			fi
-		fi
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_test() {
-	# TODO: deal with:
-	#    - sandbox (pollutes environment)
-	#    - extra packages (to extend testsuite coverage)
-	# bits are taken from 'validate'
-	local make_test_target='test' # can be fulltest
-	# not 'emake' as testsuite uses '$MAKE' without jobserver available
-	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-		[[ -f VERSION ]] || emake VERSION
-
-		# -j1 due to a rare race in install script:
-		#    make --no-print-directory -f ghc.mk phase=final install
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
-		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
-		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
-		#    /usr/bin/install: cannot create regular file \
-		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
-		emake -j1 install DESTDIR="${D}"
-
-		# Skip for cross-targets as they all share target location:
-		# /usr/share/doc/ghc-9999/
-		if ! is_crosscompile; then
-			dodoc "distrib/README" "LICENSE" "VERSION"
-		fi
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-
-	if is_crosscompile; then
-		# When we build a cross-compiler the layout is the following:
-		#     usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
-		# but
-		#     usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
-		# containst host binaries (modulo bugs).
-
-		# Portage's stripping mechanism does not skip stripping
-		# foreign binaries. This frequently causes binaries to be
-		# broken.
-		#
-		# Thus below we disable stripping of target libraries and allow
-		# stripping hosts executables.
-		dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
-		dostrip    "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
-	fi
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}

diff --git a/dev-lang/ghc/ghc-8.10.3.ebuild b/dev-lang/ghc/ghc-8.10.3.ebuild
deleted file mode 100644
index 4b91c85afe9..00000000000
--- a/dev-lang/ghc/ghc-8.10.3.ebuild
+++ /dev/null
@@ -1,796 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-BIN_PV=${PV}
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		#arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		#ppc64)
-		#	use big-endian && return 0
-		#	return 0
-		#	;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.10.0.20200123 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
-	https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-src.tar.xz
-	test? ( https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-#KEYWORDS="~amd64 ~x86"
-IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-IUSE+=" binary"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	dev-libs/gmp:0=
-	sys-libs/ncurses:0=[unicode]
-	elfutils? ( dev-libs/elfutils )
-	!ghcmakebinary? ( dev-libs/libffi:= )
-	numa? ( sys-process/numactl )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		dev-python/sphinx
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-# we build binaries without profiling support
-REQUIRED_USE="
-	?? ( ghcbootstrap binary )
-	?? ( profile binary )
-"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
-	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-if ! is_crosscompile; then
-	PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-fi
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
-	if ! is_native; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
-	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
-	# options to gcc.
-	if is_native; then
-		# prevent from failing to build unregisterised ghc:
-		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	fi
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1 ghc_v=${BIN_PV}
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
-	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/hp2ps" \
-		"${WORKDIR}/usr/bin/hpc" \
-		"${WORKDIR}/usr/bin/hsc2hs" \
-		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-ghc-check-reqs() {
-	# These are pessimistic values (slightly bigger than worst-case)
-	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
-	# numbers on various arches.
-	CHECKREQS_DISK_BUILD=8G
-	CHECKREQS_DISK_USR=2G
-	# USE=binary roughly takes
-	use binary && CHECKREQS_DISK_BUILD=4G
-
-	"$@"
-}
-
-pkg_pretend() {
-	ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	ghc-check-reqs check-reqs_pkg_setup
-
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
-	esac
-	unpack ${ONLYA}
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-		eapply_user
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# many arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise eapply will break
-
-		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
-		eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch
-
-		# a bunch of crosscompiler patches
-		# needs newer version:
-		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
-		# mingw32 target
-		pushd "${S}/libraries/Win32"
-			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
-		popd
-
-		bump_libs
-
-		eapply_user
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-		# Speed up initial Cabal bootstrap
-		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
-		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# not used outside of ghc's test
-		if [[ -n ${GHC_BUILD_DPH} ]]; then
-				echo "BUILD_DPH = YES" >> mk/build.mk
-			else
-				echo "BUILD_DPH = NO" >> mk/build.mk
-		fi
-
-		# Any non-native build has to skip as it needs
-		# target haddock binary to be runnabine.
-		if ! is_native; then
-			# disable docs generation as it requires running stage2
-			echo "HADDOCK_DOCS=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
-		fi
-
-		if is_crosscompile; then
-			# Install ghc-stage1 crosscompiler instead of
-			# ghc-stage2 cross-built compiler.
-			echo "Stage1Only=YES" >> mk/build.mk
-		fi
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds toolchain it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		# User can use EXTRA_ECONF=CC=... to override this default.
-		econf_args+=(
-			AR=${CTARGET}-ar
-			CC=${CTARGET}-gcc
-			# these should be inferred by GHC but ghc defaults
-			# to using bundled tools on windows.
-			Windres=${CTARGET}-windres
-			DllWrap=${CTARGET}-dllwrap
-			# we set the linker explicitly below
-			--disable-ld-override
-		)
-		case ${CTARGET} in
-			arm*)
-				# ld.bfd-2.28 does not work for ghc. Force ld.gold
-				# instead. This should be removed once gentoo gets
-				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
-				econf_args+=(LD=${CTARGET}-ld.gold)
-			;;
-			sparc*)
-				# ld.gold-2.28 does not work for ghc. Force ld.bfd
-				# instead. This should be removed once gentoo gets
-				# a fix for missing --no-relax support bug:
-				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
-				econf_args+=(LD=${CTARGET}-ld.bfd)
-			;;
-			*)
-				econf_args+=(LD=${CTARGET}-ld)
-		esac
-
-		if [[ ${CBUILD} != ${CHOST} ]]; then
-			# GHC bug: ghc claims not to support cross-building.
-			# It does, but does not distinct --host= value
-			# for stage1 and stage2 compiler.
-			econf_args+=(--host=${CBUILD})
-		fi
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		elif is_native; then
-			# using ${GTARGET}'s libffi is not supported yet:
-			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		einfo "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} \
-			--enable-bootstrap-with-devel-snapshot \
-			$(use_enable elfutils dwarf-unwind) \
-			$(use_enable numa)
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# Stage1Only crosscompiler does not build stage2
-		if ! is_crosscompile; then
-			# 1. build/pax-mark compiler binary first
-			emake ghc/stage2/build/tmp/ghc-stage2
-			# 2. pax-mark (bug #516430)
-			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-			# 2. build/pax-mark haddock using ghc-stage2
-			if is_native; then
-				# non-native build does not build haddock
-				# due to HADDOCK_DOCS=NO, but it could.
-				emake utils/haddock/dist/build/tmp/haddock
-				pax-mark -m utils/haddock/dist/build/tmp/haddock
-			fi
-		fi
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_test() {
-	# TODO: deal with:
-	#    - sandbox (pollutes environment)
-	#    - extra packages (to extend testsuite coverage)
-	# bits are taken from 'validate'
-	local make_test_target='test' # can be fulltest
-	# not 'emake' as testsuite uses '$MAKE' without jobserver available
-	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-		[[ -f VERSION ]] || emake VERSION
-
-		# -j1 due to a rare race in install script:
-		#    make --no-print-directory -f ghc.mk phase=final install
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
-		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
-		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
-		#    /usr/bin/install: cannot create regular file \
-		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
-		emake -j1 install DESTDIR="${D}"
-
-		# Skip for cross-targets as they all share target location:
-		# /usr/share/doc/ghc-9999/
-		if ! is_crosscompile; then
-			dodoc "distrib/README" "LICENSE" "VERSION"
-		fi
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-
-	if is_crosscompile; then
-		# When we build a cross-compiler the layout is the following:
-		#     usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
-		# but
-		#     usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
-		# containst host binaries (modulo bugs).
-
-		# Portage's stripping mechanism does not skip stripping
-		# foreign binaries. This frequently causes binaries to be
-		# broken.
-		#
-		# Thus below we disable stripping of target libraries and allow
-		# stripping hosts executables.
-		dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
-		dostrip    "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
-	fi
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}

diff --git a/dev-lang/ghc/ghc-8.2.1.ebuild b/dev-lang/ghc/ghc-8.2.1.ebuild
deleted file mode 100644
index aa2a45cf962..00000000000
--- a/dev-lang/ghc/ghc-8.2.1.ebuild
+++ /dev/null
@@ -1,754 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib pax-utils toolchain-funcs versionator prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		#arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		#ppc64) return 0 ;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.2.0.20170704 # uncomment only for -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.xz )"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-#KEYWORDS="~alpha ~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp profile"
-IUSE+=" binary"
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	dev-libs/gmp:0=
-	sys-libs/ncurses:0=[unicode]
-	!ghcmakebinary? ( dev-libs/libffi:= )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		dev-python/sphinx
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
-	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
-	if ! is_native; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
-	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
-	# options to gcc.
-	if is_native; then
-		# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
-		# are not built with fPIC, bug #606666
-		gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
-		tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
-			# gcc-6.3 has support for -no-pie upstream, but spelling differs from
-			# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
-			# hardened users try '-pie' in USE=ghcbootstrap mode.
-			append-ghc-cflags compile link -no-pie
-		fi
-
-		# prevent from failing to build unregisterised ghc:
-		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	fi
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
-	cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/hsc2hs" \
-		"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
-		"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-ghc-check-reqs() {
-	# These are pessimistic values (slightly bigger than worst-case)
-	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
-	# numbers on various arches.
-	CHECKREQS_DISK_BUILD=8G
-	CHECKREQS_DISK_USR=2G
-	# USE=binary roughly takes
-	use binary && CHECKREQS_DISK_BUILD=4G
-
-	"$@"
-}
-
-pkg_pretend() {
-	ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	ghc-check-reqs check-reqs_pkg_setup
-
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
-	esac
-	unpack ${ONLYA}
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/ghc-${GHC_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# much arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise epatch will break
-
-		epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-		epatch "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-
-		epatch "${FILESDIR}"/${PN}-8.2.1_rc1-cgen-constify.patch
-		epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		epatch "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
-
-		epatch "${FILESDIR}"/${PN}-8.2.1_rc2-O2-unreg.patch
-
-		# a bunch of crosscompiler patches
-		epatch "${FILESDIR}"/${PN}-8.2.1_rc1-unphased-cross.patch
-		epatch "${FILESDIR}"/${PN}-8.2.1_rc1-staged-cross.patch
-		epatch "${FILESDIR}"/${PN}-8.2.1_rc1-ghci-cross.patch
-		epatch "${FILESDIR}"/${PN}-8.2.1_rc1-stage2-cross.patch
-		epatch "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-		epatch "${FILESDIR}"/${PN}-8.2.1_rc3-any-vendor.patch
-		epatch "${FILESDIR}"/${PN}-8.2.1_rc3-stginit-data.patch
-
-		# needs a new libffi release
-		epatch "${FILESDIR}"/${PN}-8.0.2-libffi-alpha.patch
-
-		# mingw32 target
-		pushd "${S}/libraries/Win32"
-			epatch "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-1.patch # upstreamed, waits for merge to -HEAD
-			epatch "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
-		popd
-
-		bump_libs
-
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-		# Speed up initial Cabal bootstrap
-		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
-		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# not used outside of ghc's test
-		if [[ -n ${GHC_BUILD_DPH} ]]; then
-				echo "BUILD_DPH = YES" >> mk/build.mk
-			else
-				echo "BUILD_DPH = NO" >> mk/build.mk
-		fi
-
-		# Any non-native build has to skip as it needs
-		# target haddock binary to be runnabine.
-		if ! is_native; then
-			# disable docs generation as it requires running stage2
-			echo "HADDOCK_DOCS=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
-		fi
-
-		if is_crosscompile; then
-			# Install ghc-stage1 crosscompiler instead of
-			# ghc-stage2 cross-built compiler.
-			echo "Stage1Only=YES" >> mk/build.mk
-		fi
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds toolchain it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		# User can use EXTRA_ECONF=CC=... to override this default.
-		econf_args+=(
-			AR=${CTARGET}-ar
-			CC=${CTARGET}-gcc
-			LD=${CTARGET}-ld
-			# these should be inferred by GHC but ghc defaults
-			# to using bundled tools on windows.
-			Windres=${CTARGET}-windres
-			DllWrap=${CTARGET}-dllwrap
-		)
-		if [[ ${CTARGET} == arm* ]] ; then
-			# ld.bfd-2.28 does not work for ghc. Force ld.gold
-			# instead. This should be removed once gentoo gets
-			# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
-			econf_args+=(LD=${CTARGET}-ld.gold)
-		fi
-
-		if [[ ${CBUILD} != ${CHOST} ]]; then
-			# GHC bug: ghc claims not to support cross-building.
-			# It does, but does not distinct --host= value
-			# for stage1 and stage2 compiler.
-			econf_args+=(--host=${CBUILD})
-		fi
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		elif is_native; then
-			# using ${GTARGET}'s libffi is not supported yet:
-			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		einfo "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# Stage1Only crosscompiler does not build stage2
-		if ! is_crosscompile; then
-			# 1. build/pax-mark compiler binary first
-			emake ghc/stage2/build/tmp/ghc-stage2
-			# 2. pax-mark (bug #516430)
-			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-			# 2. build/pax-mark haddock using ghc-stage2
-			if is_native; then
-				# non-native build does not build haddock
-				# due to HADDOCK_DOCS=NO, but it could.
-				emake utils/haddock/dist/build/tmp/haddock
-				pax-mark -m utils/haddock/dist/build/tmp/haddock
-			fi
-		fi
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-		[[ -f VERSION ]] || emake VERSION
-
-		# -j1 due to a rare race in install script:
-		#    make --no-print-directory -f ghc.mk phase=final install
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
-		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
-		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
-		#    /usr/bin/install: cannot create regular file \
-		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
-		emake -j1 install DESTDIR="${D}"
-
-		# Skip for cross-targets as they all share target location:
-		# /usr/share/doc/ghc-9999/
-		if ! is_crosscompile; then
-			dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
-		fi
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}

diff --git a/dev-lang/ghc/ghc-8.2.2.ebuild b/dev-lang/ghc/ghc-8.2.2.ebuild
deleted file mode 100644
index 1338261d87d..00000000000
--- a/dev-lang/ghc/ghc-8.2.2.ebuild
+++ /dev/null
@@ -1,755 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib pax-utils toolchain-funcs versionator prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		#arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		#ppc64) return 0 ;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.2.1.20171108 # uncomment only for -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.xz )"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-#KEYWORDS="~alpha ~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp profile"
-IUSE+=" binary"
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	dev-libs/gmp:0=
-	sys-libs/ncurses:0=[unicode]
-	!ghcmakebinary? ( dev-libs/libffi:= )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		dev-python/sphinx
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
-	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
-	if ! is_native; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
-	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
-	# options to gcc.
-	if is_native; then
-		# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
-		# are not built with fPIC, bug #606666
-		gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
-		tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
-			# gcc-6.3 has support for -no-pie upstream, but spelling differs from
-			# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
-			# hardened users try '-pie' in USE=ghcbootstrap mode.
-			append-ghc-cflags compile link -no-pie
-		fi
-
-		# prevent from failing to build unregisterised ghc:
-		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	fi
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
-	cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/hsc2hs" \
-		"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
-		"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-ghc-check-reqs() {
-	# These are pessimistic values (slightly bigger than worst-case)
-	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
-	# numbers on various arches.
-	CHECKREQS_DISK_BUILD=8G
-	CHECKREQS_DISK_USR=2G
-	# USE=binary roughly takes
-	use binary && CHECKREQS_DISK_BUILD=4G
-
-	"$@"
-}
-
-pkg_pretend() {
-	ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	ghc-check-reqs check-reqs_pkg_setup
-
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
-	esac
-	unpack ${ONLYA}
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/ghc-${GHC_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-		eapply_user
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# much arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise eapply will break
-
-		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-
-		eapply "${FILESDIR}"/${PN}-8.2.1_rc1-cgen-constify.patch
-		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
-
-		eapply "${FILESDIR}"/${PN}-8.2.1_rc2-O2-unreg.patch
-		eapply "${FILESDIR}"/${PN}-8.0.2-binutils-2.30.patch
-
-		# a bunch of crosscompiler patches
-		eapply "${FILESDIR}"/${PN}-8.2.1_rc1-unphased-cross.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1_rc1-staged-cross.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1_rc1-ghci-cross.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1_rc1-stage2-cross.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
-		# needs a new libffi release
-		eapply "${FILESDIR}"/${PN}-8.0.2-libffi-alpha.patch
-
-		# mingw32 target
-		pushd "${S}/libraries/Win32"
-			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-1.patch # upstreamed, waits for merge to -HEAD
-			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
-		popd
-
-		bump_libs
-
-		eapply_user
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-		# Speed up initial Cabal bootstrap
-		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
-		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# not used outside of ghc's test
-		if [[ -n ${GHC_BUILD_DPH} ]]; then
-				echo "BUILD_DPH = YES" >> mk/build.mk
-			else
-				echo "BUILD_DPH = NO" >> mk/build.mk
-		fi
-
-		# Any non-native build has to skip as it needs
-		# target haddock binary to be runnabine.
-		if ! is_native; then
-			# disable docs generation as it requires running stage2
-			echo "HADDOCK_DOCS=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
-		fi
-
-		if is_crosscompile; then
-			# Install ghc-stage1 crosscompiler instead of
-			# ghc-stage2 cross-built compiler.
-			echo "Stage1Only=YES" >> mk/build.mk
-		fi
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds toolchain it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		# User can use EXTRA_ECONF=CC=... to override this default.
-		econf_args+=(
-			AR=${CTARGET}-ar
-			CC=${CTARGET}-gcc
-			LD=${CTARGET}-ld
-			# these should be inferred by GHC but ghc defaults
-			# to using bundled tools on windows.
-			Windres=${CTARGET}-windres
-			DllWrap=${CTARGET}-dllwrap
-		)
-		if [[ ${CTARGET} == arm* ]] ; then
-			# ld.bfd-2.28 does not work for ghc. Force ld.gold
-			# instead. This should be removed once gentoo gets
-			# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
-			econf_args+=(LD=${CTARGET}-ld.gold)
-		fi
-
-		if [[ ${CBUILD} != ${CHOST} ]]; then
-			# GHC bug: ghc claims not to support cross-building.
-			# It does, but does not distinct --host= value
-			# for stage1 and stage2 compiler.
-			econf_args+=(--host=${CBUILD})
-		fi
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		elif is_native; then
-			# using ${GTARGET}'s libffi is not supported yet:
-			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		einfo "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# Stage1Only crosscompiler does not build stage2
-		if ! is_crosscompile; then
-			# 1. build/pax-mark compiler binary first
-			emake ghc/stage2/build/tmp/ghc-stage2
-			# 2. pax-mark (bug #516430)
-			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-			# 2. build/pax-mark haddock using ghc-stage2
-			if is_native; then
-				# non-native build does not build haddock
-				# due to HADDOCK_DOCS=NO, but it could.
-				emake utils/haddock/dist/build/tmp/haddock
-				pax-mark -m utils/haddock/dist/build/tmp/haddock
-			fi
-		fi
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-		[[ -f VERSION ]] || emake VERSION
-
-		# -j1 due to a rare race in install script:
-		#    make --no-print-directory -f ghc.mk phase=final install
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
-		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
-		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
-		#    /usr/bin/install: cannot create regular file \
-		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
-		emake -j1 install DESTDIR="${D}"
-
-		# Skip for cross-targets as they all share target location:
-		# /usr/share/doc/ghc-9999/
-		if ! is_crosscompile; then
-			dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
-		fi
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}

diff --git a/dev-lang/ghc/ghc-8.4.1.ebuild b/dev-lang/ghc/ghc-8.4.1.ebuild
deleted file mode 100644
index 0e86ec36e7d..00000000000
--- a/dev-lang/ghc/ghc-8.4.1.ebuild
+++ /dev/null
@@ -1,755 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib pax-utils toolchain-funcs versionator prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		#arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		#ppc64) return 0 ;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.4.0.20180224 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz )"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-#KEYWORDS="~alpha ~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp profile"
-IUSE+=" binary"
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	dev-libs/gmp:0=
-	sys-libs/ncurses:0=[unicode]
-	!ghcmakebinary? ( dev-libs/libffi:= )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		dev-python/sphinx
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
-	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
-	if ! is_native; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
-	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
-	# options to gcc.
-	if is_native; then
-		# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
-		# are not built with fPIC, bug #606666
-		gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
-		tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
-			# gcc-6.3 has support for -no-pie upstream, but spelling differs from
-			# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
-			# hardened users try '-pie' in USE=ghcbootstrap mode.
-			append-ghc-cflags compile link -no-pie
-		fi
-
-		# prevent from failing to build unregisterised ghc:
-		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	fi
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
-	cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/hsc2hs" \
-		"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
-		"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-ghc-check-reqs() {
-	# These are pessimistic values (slightly bigger than worst-case)
-	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
-	# numbers on various arches.
-	CHECKREQS_DISK_BUILD=8G
-	CHECKREQS_DISK_USR=2G
-	# USE=binary roughly takes
-	use binary && CHECKREQS_DISK_BUILD=4G
-
-	"$@"
-}
-
-pkg_pretend() {
-	ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	ghc-check-reqs check-reqs_pkg_setup
-
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
-	esac
-	unpack ${ONLYA}
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/ghc-${GHC_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-		eapply_user
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# much arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise eapply will break
-
-		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
-
-		# a bunch of crosscompiler patches
-		# needs newer version:
-		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
-		# mingw32 target
-		pushd "${S}/libraries/Win32"
-			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
-		popd
-
-		bump_libs
-
-		eapply_user
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-		# Speed up initial Cabal bootstrap
-		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
-		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# not used outside of ghc's test
-		if [[ -n ${GHC_BUILD_DPH} ]]; then
-				echo "BUILD_DPH = YES" >> mk/build.mk
-			else
-				echo "BUILD_DPH = NO" >> mk/build.mk
-		fi
-
-		# Any non-native build has to skip as it needs
-		# target haddock binary to be runnabine.
-		if ! is_native; then
-			# disable docs generation as it requires running stage2
-			echo "HADDOCK_DOCS=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
-		fi
-
-		if is_crosscompile; then
-			# Install ghc-stage1 crosscompiler instead of
-			# ghc-stage2 cross-built compiler.
-			echo "Stage1Only=YES" >> mk/build.mk
-		fi
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds toolchain it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		# User can use EXTRA_ECONF=CC=... to override this default.
-		econf_args+=(
-			AR=${CTARGET}-ar
-			CC=${CTARGET}-gcc
-			# these should be inferred by GHC but ghc defaults
-			# to using bundled tools on windows.
-			Windres=${CTARGET}-windres
-			DllWrap=${CTARGET}-dllwrap
-			# we set the linker explicitly below
-			--disable-ld-override
-		)
-		case ${CTARGET} in
-			arm*)
-				# ld.bfd-2.28 does not work for ghc. Force ld.gold
-				# instead. This should be removed once gentoo gets
-				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
-				econf_args+=(LD=${CTARGET}-ld.gold)
-			;;
-			sparc*)
-				# ld.gold-2.28 does not work for ghc. Force ld.bfd
-				# instead. This should be removed once gentoo gets
-				# a fix for missing --no-relax support bug:
-				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
-				econf_args+=(LD=${CTARGET}-ld.bfd)
-			;;
-			*)
-				econf_args+=(LD=${CTARGET}-ld)
-		esac
-
-		if [[ ${CBUILD} != ${CHOST} ]]; then
-			# GHC bug: ghc claims not to support cross-building.
-			# It does, but does not distinct --host= value
-			# for stage1 and stage2 compiler.
-			econf_args+=(--host=${CBUILD})
-		fi
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		elif is_native; then
-			# using ${GTARGET}'s libffi is not supported yet:
-			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		einfo "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# Stage1Only crosscompiler does not build stage2
-		if ! is_crosscompile; then
-			# 1. build/pax-mark compiler binary first
-			emake ghc/stage2/build/tmp/ghc-stage2
-			# 2. pax-mark (bug #516430)
-			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-			# 2. build/pax-mark haddock using ghc-stage2
-			if is_native; then
-				# non-native build does not build haddock
-				# due to HADDOCK_DOCS=NO, but it could.
-				emake utils/haddock/dist/build/tmp/haddock
-				pax-mark -m utils/haddock/dist/build/tmp/haddock
-			fi
-		fi
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-		[[ -f VERSION ]] || emake VERSION
-
-		# -j1 due to a rare race in install script:
-		#    make --no-print-directory -f ghc.mk phase=final install
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
-		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
-		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
-		#    /usr/bin/install: cannot create regular file \
-		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
-		emake -j1 install DESTDIR="${D}"
-
-		# Skip for cross-targets as they all share target location:
-		# /usr/share/doc/ghc-9999/
-		if ! is_crosscompile; then
-			dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
-		fi
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}

diff --git a/dev-lang/ghc/ghc-8.4.2.ebuild b/dev-lang/ghc/ghc-8.4.2.ebuild
deleted file mode 100644
index f6d8c953ac9..00000000000
--- a/dev-lang/ghc/ghc-8.4.2.ebuild
+++ /dev/null
@@ -1,760 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib pax-utils toolchain-funcs versionator prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		#arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		#ppc64) return 0 ;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.4.1.20180329 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz )"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-#KEYWORDS="~alpha ~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp profile"
-IUSE+=" binary"
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	dev-libs/gmp:0=
-	sys-libs/ncurses:0=[unicode]
-	!ghcmakebinary? ( dev-libs/libffi:= )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		dev-python/sphinx
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
-	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
-	if ! is_native; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
-	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
-	# options to gcc.
-	if is_native; then
-		# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
-		# are not built with fPIC, bug #606666
-		gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
-		tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
-			# gcc-6.3 has support for -no-pie upstream, but spelling differs from
-			# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
-			# hardened users try '-pie' in USE=ghcbootstrap mode.
-			append-ghc-cflags compile link -no-pie
-		fi
-
-		# prevent from failing to build unregisterised ghc:
-		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	fi
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
-	cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/haddock-ghc-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/hp2ps" \
-		"${WORKDIR}/usr/bin/hpc" \
-		"${WORKDIR}/usr/bin/hsc2hs" \
-		"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
-		"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-ghc-check-reqs() {
-	# These are pessimistic values (slightly bigger than worst-case)
-	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
-	# numbers on various arches.
-	CHECKREQS_DISK_BUILD=8G
-	CHECKREQS_DISK_USR=2G
-	# USE=binary roughly takes
-	use binary && CHECKREQS_DISK_BUILD=4G
-
-	"$@"
-}
-
-pkg_pretend() {
-	ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	ghc-check-reqs check-reqs_pkg_setup
-
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
-	esac
-	unpack ${ONLYA}
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/ghc-${GHC_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-		eapply_user
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# much arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise eapply will break
-
-		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
-		eapply "${FILESDIR}"/${PN}-8.0.2-binutils-2.30.patch
-		eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
-
-		# a bunch of crosscompiler patches
-		# needs newer version:
-		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
-		# mingw32 target
-		pushd "${S}/libraries/Win32"
-			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
-		popd
-
-		bump_libs
-
-		eapply_user
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-		# Speed up initial Cabal bootstrap
-		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
-		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# not used outside of ghc's test
-		if [[ -n ${GHC_BUILD_DPH} ]]; then
-				echo "BUILD_DPH = YES" >> mk/build.mk
-			else
-				echo "BUILD_DPH = NO" >> mk/build.mk
-		fi
-
-		# Any non-native build has to skip as it needs
-		# target haddock binary to be runnabine.
-		if ! is_native; then
-			# disable docs generation as it requires running stage2
-			echo "HADDOCK_DOCS=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
-		fi
-
-		if is_crosscompile; then
-			# Install ghc-stage1 crosscompiler instead of
-			# ghc-stage2 cross-built compiler.
-			echo "Stage1Only=YES" >> mk/build.mk
-		fi
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds toolchain it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		# User can use EXTRA_ECONF=CC=... to override this default.
-		econf_args+=(
-			AR=${CTARGET}-ar
-			CC=${CTARGET}-gcc
-			# these should be inferred by GHC but ghc defaults
-			# to using bundled tools on windows.
-			Windres=${CTARGET}-windres
-			DllWrap=${CTARGET}-dllwrap
-			# we set the linker explicitly below
-			--disable-ld-override
-		)
-		case ${CTARGET} in
-			arm*)
-				# ld.bfd-2.28 does not work for ghc. Force ld.gold
-				# instead. This should be removed once gentoo gets
-				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
-				econf_args+=(LD=${CTARGET}-ld.gold)
-			;;
-			sparc*)
-				# ld.gold-2.28 does not work for ghc. Force ld.bfd
-				# instead. This should be removed once gentoo gets
-				# a fix for missing --no-relax support bug:
-				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
-				econf_args+=(LD=${CTARGET}-ld.bfd)
-			;;
-			*)
-				econf_args+=(LD=${CTARGET}-ld)
-		esac
-
-		if [[ ${CBUILD} != ${CHOST} ]]; then
-			# GHC bug: ghc claims not to support cross-building.
-			# It does, but does not distinct --host= value
-			# for stage1 and stage2 compiler.
-			econf_args+=(--host=${CBUILD})
-		fi
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		elif is_native; then
-			# using ${GTARGET}'s libffi is not supported yet:
-			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		einfo "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# Stage1Only crosscompiler does not build stage2
-		if ! is_crosscompile; then
-			# 1. build/pax-mark compiler binary first
-			emake ghc/stage2/build/tmp/ghc-stage2
-			# 2. pax-mark (bug #516430)
-			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-			# 2. build/pax-mark haddock using ghc-stage2
-			if is_native; then
-				# non-native build does not build haddock
-				# due to HADDOCK_DOCS=NO, but it could.
-				emake utils/haddock/dist/build/tmp/haddock
-				pax-mark -m utils/haddock/dist/build/tmp/haddock
-			fi
-		fi
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-		[[ -f VERSION ]] || emake VERSION
-
-		# -j1 due to a rare race in install script:
-		#    make --no-print-directory -f ghc.mk phase=final install
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
-		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
-		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
-		#    /usr/bin/install: cannot create regular file \
-		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
-		emake -j1 install DESTDIR="${D}"
-
-		# Skip for cross-targets as they all share target location:
-		# /usr/share/doc/ghc-9999/
-		if ! is_crosscompile; then
-			dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
-		fi
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}

diff --git a/dev-lang/ghc/ghc-8.4.3.ebuild b/dev-lang/ghc/ghc-8.4.3.ebuild
deleted file mode 100644
index 58e642364d0..00000000000
--- a/dev-lang/ghc/ghc-8.4.3.ebuild
+++ /dev/null
@@ -1,759 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib pax-utils toolchain-funcs versionator prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		#arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		#ppc64) return 0 ;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.4.1.20180329 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz )"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-#KEYWORDS="~alpha ~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp profile"
-IUSE+=" binary"
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	dev-libs/gmp:0=
-	sys-libs/ncurses:0=[unicode]
-	!ghcmakebinary? ( dev-libs/libffi:= )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		dev-python/sphinx
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
-	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
-	if ! is_native; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
-	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
-	# options to gcc.
-	if is_native; then
-		# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
-		# are not built with fPIC, bug #606666
-		gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
-		tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
-			# gcc-6.3 has support for -no-pie upstream, but spelling differs from
-			# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
-			# hardened users try '-pie' in USE=ghcbootstrap mode.
-			append-ghc-cflags compile link -no-pie
-		fi
-
-		# prevent from failing to build unregisterised ghc:
-		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	fi
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
-	cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/haddock-ghc-${GHC_PV}" \
-		"${WORKDIR}/usr/bin/hp2ps" \
-		"${WORKDIR}/usr/bin/hpc" \
-		"${WORKDIR}/usr/bin/hsc2hs" \
-		"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
-		"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-ghc-check-reqs() {
-	# These are pessimistic values (slightly bigger than worst-case)
-	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
-	# numbers on various arches.
-	CHECKREQS_DISK_BUILD=8G
-	CHECKREQS_DISK_USR=2G
-	# USE=binary roughly takes
-	use binary && CHECKREQS_DISK_BUILD=4G
-
-	"$@"
-}
-
-pkg_pretend() {
-	ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	ghc-check-reqs check-reqs_pkg_setup
-
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
-	esac
-	unpack ${ONLYA}
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/ghc-${GHC_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-		eapply_user
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# much arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise eapply will break
-
-		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
-		eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
-
-		# a bunch of crosscompiler patches
-		# needs newer version:
-		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
-		# mingw32 target
-		pushd "${S}/libraries/Win32"
-			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
-		popd
-
-		bump_libs
-
-		eapply_user
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-		# Speed up initial Cabal bootstrap
-		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
-		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# not used outside of ghc's test
-		if [[ -n ${GHC_BUILD_DPH} ]]; then
-				echo "BUILD_DPH = YES" >> mk/build.mk
-			else
-				echo "BUILD_DPH = NO" >> mk/build.mk
-		fi
-
-		# Any non-native build has to skip as it needs
-		# target haddock binary to be runnabine.
-		if ! is_native; then
-			# disable docs generation as it requires running stage2
-			echo "HADDOCK_DOCS=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
-		fi
-
-		if is_crosscompile; then
-			# Install ghc-stage1 crosscompiler instead of
-			# ghc-stage2 cross-built compiler.
-			echo "Stage1Only=YES" >> mk/build.mk
-		fi
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds toolchain it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		# User can use EXTRA_ECONF=CC=... to override this default.
-		econf_args+=(
-			AR=${CTARGET}-ar
-			CC=${CTARGET}-gcc
-			# these should be inferred by GHC but ghc defaults
-			# to using bundled tools on windows.
-			Windres=${CTARGET}-windres
-			DllWrap=${CTARGET}-dllwrap
-			# we set the linker explicitly below
-			--disable-ld-override
-		)
-		case ${CTARGET} in
-			arm*)
-				# ld.bfd-2.28 does not work for ghc. Force ld.gold
-				# instead. This should be removed once gentoo gets
-				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
-				econf_args+=(LD=${CTARGET}-ld.gold)
-			;;
-			sparc*)
-				# ld.gold-2.28 does not work for ghc. Force ld.bfd
-				# instead. This should be removed once gentoo gets
-				# a fix for missing --no-relax support bug:
-				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
-				econf_args+=(LD=${CTARGET}-ld.bfd)
-			;;
-			*)
-				econf_args+=(LD=${CTARGET}-ld)
-		esac
-
-		if [[ ${CBUILD} != ${CHOST} ]]; then
-			# GHC bug: ghc claims not to support cross-building.
-			# It does, but does not distinct --host= value
-			# for stage1 and stage2 compiler.
-			econf_args+=(--host=${CBUILD})
-		fi
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		elif is_native; then
-			# using ${GTARGET}'s libffi is not supported yet:
-			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		einfo "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# Stage1Only crosscompiler does not build stage2
-		if ! is_crosscompile; then
-			# 1. build/pax-mark compiler binary first
-			emake ghc/stage2/build/tmp/ghc-stage2
-			# 2. pax-mark (bug #516430)
-			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-			# 2. build/pax-mark haddock using ghc-stage2
-			if is_native; then
-				# non-native build does not build haddock
-				# due to HADDOCK_DOCS=NO, but it could.
-				emake utils/haddock/dist/build/tmp/haddock
-				pax-mark -m utils/haddock/dist/build/tmp/haddock
-			fi
-		fi
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-		[[ -f VERSION ]] || emake VERSION
-
-		# -j1 due to a rare race in install script:
-		#    make --no-print-directory -f ghc.mk phase=final install
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
-		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
-		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
-		#    /usr/bin/install: cannot create regular file \
-		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
-		emake -j1 install DESTDIR="${D}"
-
-		# Skip for cross-targets as they all share target location:
-		# /usr/share/doc/ghc-9999/
-		if ! is_crosscompile; then
-			dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
-		fi
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}

diff --git a/dev-lang/ghc/ghc-8.6.4.ebuild b/dev-lang/ghc/ghc-8.6.4.ebuild
deleted file mode 100644
index 52d995e6081..00000000000
--- a/dev-lang/ghc/ghc-8.6.4.ebuild
+++ /dev/null
@@ -1,775 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs versionator prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-BIN_PV=${PV}
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		#arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		#ppc64) return 0 ;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.6.0.20180810 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
-	https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
-	test? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-#will need big tree sync
-#KEYWORDS="~amd64 ~x86"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp profile test"
-RESTRICT="!test? ( test )"
-IUSE+=" binary"
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	dev-libs/gmp:0=
-	sys-libs/ncurses:0=[unicode]
-	!ghcmakebinary? ( dev-libs/libffi:= )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		dev-python/sphinx
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
-	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
-	if ! is_native; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
-	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
-	# options to gcc.
-	if is_native; then
-		# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
-		# are not built with fPIC, bug #606666
-		gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
-		tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
-			# gcc-6.3 has support for -no-pie upstream, but spelling differs from
-			# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
-			# hardened users try '-pie' in USE=ghcbootstrap mode.
-			append-ghc-cflags compile link -no-pie
-		fi
-
-		# prevent from failing to build unregisterised ghc:
-		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	fi
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1 ghc_v=${BIN_PV}
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
-	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/hp2ps" \
-		"${WORKDIR}/usr/bin/hpc" \
-		"${WORKDIR}/usr/bin/hsc2hs" \
-		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-ghc-check-reqs() {
-	# These are pessimistic values (slightly bigger than worst-case)
-	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
-	# numbers on various arches.
-	CHECKREQS_DISK_BUILD=8G
-	CHECKREQS_DISK_USR=2G
-	# USE=binary roughly takes
-	use binary && CHECKREQS_DISK_BUILD=4G
-
-	"$@"
-}
-
-pkg_pretend() {
-	ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	ghc-check-reqs check-reqs_pkg_setup
-
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
-	esac
-	unpack ${ONLYA}
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-		eapply_user
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# many arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise eapply will break
-
-		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
-		eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
-
-		# a bunch of crosscompiler patches
-		# needs newer version:
-		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
-		# mingw32 target
-		pushd "${S}/libraries/Win32"
-			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
-		popd
-
-		bump_libs
-
-		eapply_user
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-		# Speed up initial Cabal bootstrap
-		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
-		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# not used outside of ghc's test
-		if [[ -n ${GHC_BUILD_DPH} ]]; then
-				echo "BUILD_DPH = YES" >> mk/build.mk
-			else
-				echo "BUILD_DPH = NO" >> mk/build.mk
-		fi
-
-		# Any non-native build has to skip as it needs
-		# target haddock binary to be runnabine.
-		if ! is_native; then
-			# disable docs generation as it requires running stage2
-			echo "HADDOCK_DOCS=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
-		fi
-
-		if is_crosscompile; then
-			# Install ghc-stage1 crosscompiler instead of
-			# ghc-stage2 cross-built compiler.
-			echo "Stage1Only=YES" >> mk/build.mk
-		fi
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds toolchain it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		# User can use EXTRA_ECONF=CC=... to override this default.
-		econf_args+=(
-			AR=${CTARGET}-ar
-			CC=${CTARGET}-gcc
-			# these should be inferred by GHC but ghc defaults
-			# to using bundled tools on windows.
-			Windres=${CTARGET}-windres
-			DllWrap=${CTARGET}-dllwrap
-			# we set the linker explicitly below
-			--disable-ld-override
-		)
-		case ${CTARGET} in
-			arm*)
-				# ld.bfd-2.28 does not work for ghc. Force ld.gold
-				# instead. This should be removed once gentoo gets
-				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
-				econf_args+=(LD=${CTARGET}-ld.gold)
-			;;
-			sparc*)
-				# ld.gold-2.28 does not work for ghc. Force ld.bfd
-				# instead. This should be removed once gentoo gets
-				# a fix for missing --no-relax support bug:
-				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
-				econf_args+=(LD=${CTARGET}-ld.bfd)
-			;;
-			*)
-				econf_args+=(LD=${CTARGET}-ld)
-		esac
-
-		if [[ ${CBUILD} != ${CHOST} ]]; then
-			# GHC bug: ghc claims not to support cross-building.
-			# It does, but does not distinct --host= value
-			# for stage1 and stage2 compiler.
-			econf_args+=(--host=${CBUILD})
-		fi
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		elif is_native; then
-			# using ${GTARGET}'s libffi is not supported yet:
-			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		einfo "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# Stage1Only crosscompiler does not build stage2
-		if ! is_crosscompile; then
-			# 1. build/pax-mark compiler binary first
-			emake ghc/stage2/build/tmp/ghc-stage2
-			# 2. pax-mark (bug #516430)
-			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-			# 2. build/pax-mark haddock using ghc-stage2
-			if is_native; then
-				# non-native build does not build haddock
-				# due to HADDOCK_DOCS=NO, but it could.
-				emake utils/haddock/dist/build/tmp/haddock
-				pax-mark -m utils/haddock/dist/build/tmp/haddock
-			fi
-		fi
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_test() {
-	# TODO: deal with:
-	#    - sandbox (pollutes environment)
-	#    - extra packages (to extend testsuite coverage)
-	# bits are taken from 'validate'
-	local make_test_target='test' # can be fulltest
-	# not 'emake' as testsuite uses '$MAKE' without jobserver available
-	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-		[[ -f VERSION ]] || emake VERSION
-
-		# -j1 due to a rare race in install script:
-		#    make --no-print-directory -f ghc.mk phase=final install
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
-		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
-		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
-		#    /usr/bin/install: cannot create regular file \
-		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
-		emake -j1 install DESTDIR="${D}"
-
-		# Skip for cross-targets as they all share target location:
-		# /usr/share/doc/ghc-9999/
-		if ! is_crosscompile; then
-			dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
-		fi
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}

diff --git a/dev-lang/ghc/ghc-8.6.5.ebuild b/dev-lang/ghc/ghc-8.6.5.ebuild
deleted file mode 100644
index 89e16a5acd9..00000000000
--- a/dev-lang/ghc/ghc-8.6.5.ebuild
+++ /dev/null
@@ -1,784 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs versionator prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-BIN_PV=${PV}
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		#arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		ppc64)
-			use big-endian && return 1
-			return 0
-			;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.6.0.20180810 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
-	https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
-	test? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-# to be rekeyworded when most of revdeps are updated
-#KEYWORDS="~amd64 ~x86"
-IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-IUSE+=" binary"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	dev-libs/gmp:0=
-	sys-libs/ncurses:0=[unicode]
-	elfutils? ( dev-libs/elfutils )
-	!ghcmakebinary? ( dev-libs/libffi:= )
-	numa? ( sys-process/numactl )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		dev-python/sphinx
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
-	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
-	if ! is_native; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
-	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
-	# options to gcc.
-	if is_native; then
-		# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
-		# are not built with fPIC, bug #606666
-		gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
-		tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
-			# gcc-6.3 has support for -no-pie upstream, but spelling differs from
-			# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
-			# hardened users try '-pie' in USE=ghcbootstrap mode.
-			append-ghc-cflags compile link -no-pie
-		fi
-
-		# prevent from failing to build unregisterised ghc:
-		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	fi
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1 ghc_v=${BIN_PV}
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
-	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/hp2ps" \
-		"${WORKDIR}/usr/bin/hpc" \
-		"${WORKDIR}/usr/bin/hsc2hs" \
-		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-ghc-check-reqs() {
-	# These are pessimistic values (slightly bigger than worst-case)
-	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
-	# numbers on various arches.
-	CHECKREQS_DISK_BUILD=8G
-	CHECKREQS_DISK_USR=2G
-	# USE=binary roughly takes
-	use binary && CHECKREQS_DISK_BUILD=4G
-
-	"$@"
-}
-
-pkg_pretend() {
-	ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	ghc-check-reqs check-reqs_pkg_setup
-
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
-	esac
-	unpack ${ONLYA}
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-		eapply_user
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# many arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise eapply will break
-
-		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
-		eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
-		eapply "${FILESDIR}"/${PN}-8.6.5-numa.patch
-
-		# a bunch of crosscompiler patches
-		# needs newer version:
-		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
-		# mingw32 target
-		pushd "${S}/libraries/Win32"
-			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
-		popd
-
-		bump_libs
-
-		eapply_user
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-		# Speed up initial Cabal bootstrap
-		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
-		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# not used outside of ghc's test
-		if [[ -n ${GHC_BUILD_DPH} ]]; then
-				echo "BUILD_DPH = YES" >> mk/build.mk
-			else
-				echo "BUILD_DPH = NO" >> mk/build.mk
-		fi
-
-		# Any non-native build has to skip as it needs
-		# target haddock binary to be runnabine.
-		if ! is_native; then
-			# disable docs generation as it requires running stage2
-			echo "HADDOCK_DOCS=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
-		fi
-
-		if is_crosscompile; then
-			# Install ghc-stage1 crosscompiler instead of
-			# ghc-stage2 cross-built compiler.
-			echo "Stage1Only=YES" >> mk/build.mk
-		fi
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds toolchain it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		# User can use EXTRA_ECONF=CC=... to override this default.
-		econf_args+=(
-			AR=${CTARGET}-ar
-			CC=${CTARGET}-gcc
-			# these should be inferred by GHC but ghc defaults
-			# to using bundled tools on windows.
-			Windres=${CTARGET}-windres
-			DllWrap=${CTARGET}-dllwrap
-			# we set the linker explicitly below
-			--disable-ld-override
-		)
-		case ${CTARGET} in
-			arm*)
-				# ld.bfd-2.28 does not work for ghc. Force ld.gold
-				# instead. This should be removed once gentoo gets
-				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
-				econf_args+=(LD=${CTARGET}-ld.gold)
-			;;
-			sparc*)
-				# ld.gold-2.28 does not work for ghc. Force ld.bfd
-				# instead. This should be removed once gentoo gets
-				# a fix for missing --no-relax support bug:
-				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
-				econf_args+=(LD=${CTARGET}-ld.bfd)
-			;;
-			*)
-				econf_args+=(LD=${CTARGET}-ld)
-		esac
-
-		if [[ ${CBUILD} != ${CHOST} ]]; then
-			# GHC bug: ghc claims not to support cross-building.
-			# It does, but does not distinct --host= value
-			# for stage1 and stage2 compiler.
-			econf_args+=(--host=${CBUILD})
-		fi
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		elif is_native; then
-			# using ${GTARGET}'s libffi is not supported yet:
-			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		einfo "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} \
-			--enable-bootstrap-with-devel-snapshot \
-			$(use elfutils && echo --enable-dwarf-unwind) \
-			$(use_enable numa)
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# Stage1Only crosscompiler does not build stage2
-		if ! is_crosscompile; then
-			# 1. build/pax-mark compiler binary first
-			emake ghc/stage2/build/tmp/ghc-stage2
-			# 2. pax-mark (bug #516430)
-			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-			# 2. build/pax-mark haddock using ghc-stage2
-			if is_native; then
-				# non-native build does not build haddock
-				# due to HADDOCK_DOCS=NO, but it could.
-				emake utils/haddock/dist/build/tmp/haddock
-				pax-mark -m utils/haddock/dist/build/tmp/haddock
-			fi
-		fi
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_test() {
-	# TODO: deal with:
-	#    - sandbox (pollutes environment)
-	#    - extra packages (to extend testsuite coverage)
-	# bits are taken from 'validate'
-	local make_test_target='test' # can be fulltest
-	# not 'emake' as testsuite uses '$MAKE' without jobserver available
-	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-		[[ -f VERSION ]] || emake VERSION
-
-		# -j1 due to a rare race in install script:
-		#    make --no-print-directory -f ghc.mk phase=final install
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
-		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
-		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
-		#    /usr/bin/install: cannot create regular file \
-		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
-		emake -j1 install DESTDIR="${D}"
-
-		# Skip for cross-targets as they all share target location:
-		# /usr/share/doc/ghc-9999/
-		if ! is_crosscompile; then
-			dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
-		fi
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}

diff --git a/dev-lang/ghc/ghc-8.8.1.ebuild b/dev-lang/ghc/ghc-8.8.1.ebuild
deleted file mode 100644
index 00ce5686261..00000000000
--- a/dev-lang/ghc/ghc-8.8.1.ebuild
+++ /dev/null
@@ -1,804 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-BIN_PV=${PV}
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		#arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		ppc64)
-			use big-endian && return 1
-			return 0
-			;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.6.0.20180810 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
-	https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
-	test? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS=""
-IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-IUSE+=" binary"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	dev-libs/gmp:0=
-	sys-libs/ncurses:0=[unicode]
-	elfutils? ( dev-libs/elfutils )
-	!ghcmakebinary? ( dev-libs/libffi:= )
-	numa? ( sys-process/numactl )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		dev-python/sphinx
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
-	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-if ! is_crosscompile; then
-	PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-fi
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
-	if ! is_native; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
-	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
-	# options to gcc.
-	if is_native; then
-		# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
-		# are not built with fPIC, bug #606666
-		gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
-		tc-is-gcc && ver_test $(gcc-version) -ge 6.3 && if ! use ghcbootstrap; then
-			# gcc-6.3 has support for -no-pie upstream, but spelling differs from
-			# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
-			# hardened users try '-pie' in USE=ghcbootstrap mode.
-			append-ghc-cflags compile link -no-pie
-		fi
-
-		# prevent from failing to build unregisterised ghc:
-		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	fi
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1 ghc_v=${BIN_PV}
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
-	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/hp2ps" \
-		"${WORKDIR}/usr/bin/hpc" \
-		"${WORKDIR}/usr/bin/hsc2hs" \
-		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-ghc-check-reqs() {
-	# These are pessimistic values (slightly bigger than worst-case)
-	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
-	# numbers on various arches.
-	CHECKREQS_DISK_BUILD=8G
-	CHECKREQS_DISK_USR=2G
-	# USE=binary roughly takes
-	use binary && CHECKREQS_DISK_BUILD=4G
-
-	"$@"
-}
-
-pkg_pretend() {
-	ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	ghc-check-reqs check-reqs_pkg_setup
-
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
-	esac
-	unpack ${ONLYA}
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-		eapply_user
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# many arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise eapply will break
-
-		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
-		eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
-		eapply "${FILESDIR}"/${PN}-8.6.5-numa.patch
-		eapply "${FILESDIR}"/${PN}-8.8.1-no-alex.patch
-		eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
-
-		# a bunch of crosscompiler patches
-		# needs newer version:
-		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
-		# mingw32 target
-		pushd "${S}/libraries/Win32"
-			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
-		popd
-
-		bump_libs
-
-		eapply_user
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-		# Speed up initial Cabal bootstrap
-		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
-		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# not used outside of ghc's test
-		if [[ -n ${GHC_BUILD_DPH} ]]; then
-				echo "BUILD_DPH = YES" >> mk/build.mk
-			else
-				echo "BUILD_DPH = NO" >> mk/build.mk
-		fi
-
-		# Any non-native build has to skip as it needs
-		# target haddock binary to be runnabine.
-		if ! is_native; then
-			# disable docs generation as it requires running stage2
-			echo "HADDOCK_DOCS=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
-		fi
-
-		if is_crosscompile; then
-			# Install ghc-stage1 crosscompiler instead of
-			# ghc-stage2 cross-built compiler.
-			echo "Stage1Only=YES" >> mk/build.mk
-		fi
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds toolchain it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		# User can use EXTRA_ECONF=CC=... to override this default.
-		econf_args+=(
-			AR=${CTARGET}-ar
-			CC=${CTARGET}-gcc
-			# these should be inferred by GHC but ghc defaults
-			# to using bundled tools on windows.
-			Windres=${CTARGET}-windres
-			DllWrap=${CTARGET}-dllwrap
-			# we set the linker explicitly below
-			--disable-ld-override
-		)
-		case ${CTARGET} in
-			arm*)
-				# ld.bfd-2.28 does not work for ghc. Force ld.gold
-				# instead. This should be removed once gentoo gets
-				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
-				econf_args+=(LD=${CTARGET}-ld.gold)
-			;;
-			sparc*)
-				# ld.gold-2.28 does not work for ghc. Force ld.bfd
-				# instead. This should be removed once gentoo gets
-				# a fix for missing --no-relax support bug:
-				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
-				econf_args+=(LD=${CTARGET}-ld.bfd)
-			;;
-			*)
-				econf_args+=(LD=${CTARGET}-ld)
-		esac
-
-		if [[ ${CBUILD} != ${CHOST} ]]; then
-			# GHC bug: ghc claims not to support cross-building.
-			# It does, but does not distinct --host= value
-			# for stage1 and stage2 compiler.
-			econf_args+=(--host=${CBUILD})
-		fi
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		elif is_native; then
-			# using ${GTARGET}'s libffi is not supported yet:
-			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		einfo "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} \
-			--enable-bootstrap-with-devel-snapshot \
-			$(use elfutils && echo --enable-dwarf-unwind) \
-			$(use_enable numa)
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# Stage1Only crosscompiler does not build stage2
-		if ! is_crosscompile; then
-			# 1. build/pax-mark compiler binary first
-			emake ghc/stage2/build/tmp/ghc-stage2
-			# 2. pax-mark (bug #516430)
-			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-			# 2. build/pax-mark haddock using ghc-stage2
-			if is_native; then
-				# non-native build does not build haddock
-				# due to HADDOCK_DOCS=NO, but it could.
-				emake utils/haddock/dist/build/tmp/haddock
-				pax-mark -m utils/haddock/dist/build/tmp/haddock
-			fi
-		fi
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_test() {
-	# TODO: deal with:
-	#    - sandbox (pollutes environment)
-	#    - extra packages (to extend testsuite coverage)
-	# bits are taken from 'validate'
-	local make_test_target='test' # can be fulltest
-	# not 'emake' as testsuite uses '$MAKE' without jobserver available
-	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-		[[ -f VERSION ]] || emake VERSION
-
-		# -j1 due to a rare race in install script:
-		#    make --no-print-directory -f ghc.mk phase=final install
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
-		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
-		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
-		#    /usr/bin/install: cannot create regular file \
-		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
-		emake -j1 install DESTDIR="${D}"
-
-		# Skip for cross-targets as they all share target location:
-		# /usr/share/doc/ghc-9999/
-		if ! is_crosscompile; then
-			dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
-		fi
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-
-	if is_crosscompile; then
-		# When we build a cross-compiler the layout is the following:
-		#     usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
-		# but
-		#     usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
-		# containst host binaries (modulo bugs).
-
-		# Portage's stripping mechanism does not skip stripping
-		# foreign binaries. This frequently causes binaries to be
-		# broken.
-		#
-		# Thus below we disable stripping of target libraries and allow
-		# stripping hosts executables.
-		dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
-		dostrip    "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
-	fi
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}

diff --git a/dev-lang/ghc/ghc-8.8.2.ebuild b/dev-lang/ghc/ghc-8.8.2.ebuild
deleted file mode 100644
index 61b81fb8fb2..00000000000
--- a/dev-lang/ghc/ghc-8.8.2.ebuild
+++ /dev/null
@@ -1,803 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-BIN_PV=${PV}
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		#arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		#ppc64)
-		#	use big-endian && return 1
-		#	return 0
-		#	;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.6.0.20180810 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
-	https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
-	test? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS=""
-IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-IUSE+=" binary"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	dev-libs/gmp:0=
-	sys-libs/ncurses:0=[unicode]
-	elfutils? ( dev-libs/elfutils )
-	!ghcmakebinary? ( dev-libs/libffi:= )
-	numa? ( sys-process/numactl )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		dev-python/sphinx
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
-	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-if ! is_crosscompile; then
-	PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-fi
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
-	if ! is_native; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
-	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
-	# options to gcc.
-	if is_native; then
-		# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
-		# are not built with fPIC, bug #606666
-		gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
-		tc-is-gcc && ver_test $(gcc-version) -ge 6.3 && if ! use ghcbootstrap; then
-			# gcc-6.3 has support for -no-pie upstream, but spelling differs from
-			# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
-			# hardened users try '-pie' in USE=ghcbootstrap mode.
-			append-ghc-cflags compile link -no-pie
-		fi
-
-		# prevent from failing to build unregisterised ghc:
-		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	fi
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1 ghc_v=${BIN_PV}
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
-	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/hp2ps" \
-		"${WORKDIR}/usr/bin/hpc" \
-		"${WORKDIR}/usr/bin/hsc2hs" \
-		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-ghc-check-reqs() {
-	# These are pessimistic values (slightly bigger than worst-case)
-	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
-	# numbers on various arches.
-	CHECKREQS_DISK_BUILD=8G
-	CHECKREQS_DISK_USR=2G
-	# USE=binary roughly takes
-	use binary && CHECKREQS_DISK_BUILD=4G
-
-	"$@"
-}
-
-pkg_pretend() {
-	ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	ghc-check-reqs check-reqs_pkg_setup
-
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
-	esac
-	unpack ${ONLYA}
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-		eapply_user
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# many arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise eapply will break
-
-		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
-		eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
-		eapply "${FILESDIR}"/${PN}-8.6.5-numa.patch
-		eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
-
-		# a bunch of crosscompiler patches
-		# needs newer version:
-		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
-		# mingw32 target
-		pushd "${S}/libraries/Win32"
-			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
-		popd
-
-		bump_libs
-
-		eapply_user
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-		# Speed up initial Cabal bootstrap
-		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
-		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# not used outside of ghc's test
-		if [[ -n ${GHC_BUILD_DPH} ]]; then
-				echo "BUILD_DPH = YES" >> mk/build.mk
-			else
-				echo "BUILD_DPH = NO" >> mk/build.mk
-		fi
-
-		# Any non-native build has to skip as it needs
-		# target haddock binary to be runnabine.
-		if ! is_native; then
-			# disable docs generation as it requires running stage2
-			echo "HADDOCK_DOCS=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
-		fi
-
-		if is_crosscompile; then
-			# Install ghc-stage1 crosscompiler instead of
-			# ghc-stage2 cross-built compiler.
-			echo "Stage1Only=YES" >> mk/build.mk
-		fi
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds toolchain it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		# User can use EXTRA_ECONF=CC=... to override this default.
-		econf_args+=(
-			AR=${CTARGET}-ar
-			CC=${CTARGET}-gcc
-			# these should be inferred by GHC but ghc defaults
-			# to using bundled tools on windows.
-			Windres=${CTARGET}-windres
-			DllWrap=${CTARGET}-dllwrap
-			# we set the linker explicitly below
-			--disable-ld-override
-		)
-		case ${CTARGET} in
-			arm*)
-				# ld.bfd-2.28 does not work for ghc. Force ld.gold
-				# instead. This should be removed once gentoo gets
-				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
-				econf_args+=(LD=${CTARGET}-ld.gold)
-			;;
-			sparc*)
-				# ld.gold-2.28 does not work for ghc. Force ld.bfd
-				# instead. This should be removed once gentoo gets
-				# a fix for missing --no-relax support bug:
-				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
-				econf_args+=(LD=${CTARGET}-ld.bfd)
-			;;
-			*)
-				econf_args+=(LD=${CTARGET}-ld)
-		esac
-
-		if [[ ${CBUILD} != ${CHOST} ]]; then
-			# GHC bug: ghc claims not to support cross-building.
-			# It does, but does not distinct --host= value
-			# for stage1 and stage2 compiler.
-			econf_args+=(--host=${CBUILD})
-		fi
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		elif is_native; then
-			# using ${GTARGET}'s libffi is not supported yet:
-			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		einfo "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} \
-			--enable-bootstrap-with-devel-snapshot \
-			$(use elfutils && echo --enable-dwarf-unwind) \
-			$(use_enable numa)
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# Stage1Only crosscompiler does not build stage2
-		if ! is_crosscompile; then
-			# 1. build/pax-mark compiler binary first
-			emake ghc/stage2/build/tmp/ghc-stage2
-			# 2. pax-mark (bug #516430)
-			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-			# 2. build/pax-mark haddock using ghc-stage2
-			if is_native; then
-				# non-native build does not build haddock
-				# due to HADDOCK_DOCS=NO, but it could.
-				emake utils/haddock/dist/build/tmp/haddock
-				pax-mark -m utils/haddock/dist/build/tmp/haddock
-			fi
-		fi
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_test() {
-	# TODO: deal with:
-	#    - sandbox (pollutes environment)
-	#    - extra packages (to extend testsuite coverage)
-	# bits are taken from 'validate'
-	local make_test_target='test' # can be fulltest
-	# not 'emake' as testsuite uses '$MAKE' without jobserver available
-	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-		[[ -f VERSION ]] || emake VERSION
-
-		# -j1 due to a rare race in install script:
-		#    make --no-print-directory -f ghc.mk phase=final install
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
-		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
-		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
-		#    /usr/bin/install: cannot create regular file \
-		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
-		emake -j1 install DESTDIR="${D}"
-
-		# Skip for cross-targets as they all share target location:
-		# /usr/share/doc/ghc-9999/
-		if ! is_crosscompile; then
-			dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
-		fi
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-
-	if is_crosscompile; then
-		# When we build a cross-compiler the layout is the following:
-		#     usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
-		# but
-		#     usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
-		# containst host binaries (modulo bugs).
-
-		# Portage's stripping mechanism does not skip stripping
-		# foreign binaries. This frequently causes binaries to be
-		# broken.
-		#
-		# Thus below we disable stripping of target libraries and allow
-		# stripping hosts executables.
-		dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
-		dostrip    "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
-	fi
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}

diff --git a/dev-lang/ghc/ghc-8.8.3.ebuild b/dev-lang/ghc/ghc-8.8.3.ebuild
deleted file mode 100644
index eb0ede0ad7f..00000000000
--- a/dev-lang/ghc/ghc-8.8.3.ebuild
+++ /dev/null
@@ -1,808 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-BIN_PV=${PV}
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		#arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		#ppc64)
-		#	use big-endian && return 1
-		#	return 0
-		#	;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.6.0.20180810 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
-	https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
-	test? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS=""
-IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-IUSE+=" binary"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	dev-libs/gmp:0=
-	sys-libs/ncurses:0=[unicode]
-	elfutils? ( dev-libs/elfutils )
-	!ghcmakebinary? ( dev-libs/libffi:= )
-	numa? ( sys-process/numactl )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		dev-python/sphinx
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-# we build binaries without profiling support
-REQUIRED_USE="
-	?? ( ghcbootstrap binary )
-	?? ( profile binary )
-"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
-	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-if ! is_crosscompile; then
-	PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-fi
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
-	if ! is_native; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
-	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
-	# options to gcc.
-	if is_native; then
-		# hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
-		# are not built with fPIC, bug #606666
-		gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
-		tc-is-gcc && ver_test $(gcc-version) -ge 6.3 && if ! use ghcbootstrap; then
-			# gcc-6.3 has support for -no-pie upstream, but spelling differs from
-			# gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
-			# hardened users try '-pie' in USE=ghcbootstrap mode.
-			append-ghc-cflags compile link -no-pie
-		fi
-
-		# prevent from failing to build unregisterised ghc:
-		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	fi
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1 ghc_v=${BIN_PV}
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
-	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/hp2ps" \
-		"${WORKDIR}/usr/bin/hpc" \
-		"${WORKDIR}/usr/bin/hsc2hs" \
-		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-ghc-check-reqs() {
-	# These are pessimistic values (slightly bigger than worst-case)
-	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
-	# numbers on various arches.
-	CHECKREQS_DISK_BUILD=8G
-	CHECKREQS_DISK_USR=2G
-	# USE=binary roughly takes
-	use binary && CHECKREQS_DISK_BUILD=4G
-
-	"$@"
-}
-
-pkg_pretend() {
-	ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	ghc-check-reqs check-reqs_pkg_setup
-
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
-	esac
-	unpack ${ONLYA}
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-		eapply_user
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# many arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise eapply will break
-
-		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
-		eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
-		eapply "${FILESDIR}"/${PN}-8.6.5-numa.patch
-		# rumors say this is fixed properly in 8.8.3. Let's check!
-		#eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
-
-		# a bunch of crosscompiler patches
-		# needs newer version:
-		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
-		# mingw32 target
-		pushd "${S}/libraries/Win32"
-			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
-		popd
-
-		bump_libs
-
-		eapply_user
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-		# Speed up initial Cabal bootstrap
-		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
-		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# not used outside of ghc's test
-		if [[ -n ${GHC_BUILD_DPH} ]]; then
-				echo "BUILD_DPH = YES" >> mk/build.mk
-			else
-				echo "BUILD_DPH = NO" >> mk/build.mk
-		fi
-
-		# Any non-native build has to skip as it needs
-		# target haddock binary to be runnabine.
-		if ! is_native; then
-			# disable docs generation as it requires running stage2
-			echo "HADDOCK_DOCS=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
-		fi
-
-		if is_crosscompile; then
-			# Install ghc-stage1 crosscompiler instead of
-			# ghc-stage2 cross-built compiler.
-			echo "Stage1Only=YES" >> mk/build.mk
-		fi
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds toolchain it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		# User can use EXTRA_ECONF=CC=... to override this default.
-		econf_args+=(
-			AR=${CTARGET}-ar
-			CC=${CTARGET}-gcc
-			# these should be inferred by GHC but ghc defaults
-			# to using bundled tools on windows.
-			Windres=${CTARGET}-windres
-			DllWrap=${CTARGET}-dllwrap
-			# we set the linker explicitly below
-			--disable-ld-override
-		)
-		case ${CTARGET} in
-			arm*)
-				# ld.bfd-2.28 does not work for ghc. Force ld.gold
-				# instead. This should be removed once gentoo gets
-				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
-				econf_args+=(LD=${CTARGET}-ld.gold)
-			;;
-			sparc*)
-				# ld.gold-2.28 does not work for ghc. Force ld.bfd
-				# instead. This should be removed once gentoo gets
-				# a fix for missing --no-relax support bug:
-				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
-				econf_args+=(LD=${CTARGET}-ld.bfd)
-			;;
-			*)
-				econf_args+=(LD=${CTARGET}-ld)
-		esac
-
-		if [[ ${CBUILD} != ${CHOST} ]]; then
-			# GHC bug: ghc claims not to support cross-building.
-			# It does, but does not distinct --host= value
-			# for stage1 and stage2 compiler.
-			econf_args+=(--host=${CBUILD})
-		fi
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		elif is_native; then
-			# using ${GTARGET}'s libffi is not supported yet:
-			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		einfo "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} \
-			--enable-bootstrap-with-devel-snapshot \
-			$(use elfutils && echo --enable-dwarf-unwind) \
-			$(use_enable numa)
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# Stage1Only crosscompiler does not build stage2
-		if ! is_crosscompile; then
-			# 1. build/pax-mark compiler binary first
-			emake ghc/stage2/build/tmp/ghc-stage2
-			# 2. pax-mark (bug #516430)
-			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-			# 2. build/pax-mark haddock using ghc-stage2
-			if is_native; then
-				# non-native build does not build haddock
-				# due to HADDOCK_DOCS=NO, but it could.
-				emake utils/haddock/dist/build/tmp/haddock
-				pax-mark -m utils/haddock/dist/build/tmp/haddock
-			fi
-		fi
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_test() {
-	# TODO: deal with:
-	#    - sandbox (pollutes environment)
-	#    - extra packages (to extend testsuite coverage)
-	# bits are taken from 'validate'
-	local make_test_target='test' # can be fulltest
-	# not 'emake' as testsuite uses '$MAKE' without jobserver available
-	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-		[[ -f VERSION ]] || emake VERSION
-
-		# -j1 due to a rare race in install script:
-		#    make --no-print-directory -f ghc.mk phase=final install
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
-		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
-		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
-		#    /usr/bin/install: cannot create regular file \
-		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
-		emake -j1 install DESTDIR="${D}"
-
-		# Skip for cross-targets as they all share target location:
-		# /usr/share/doc/ghc-9999/
-		if ! is_crosscompile; then
-			dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
-		fi
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-
-	if is_crosscompile; then
-		# When we build a cross-compiler the layout is the following:
-		#     usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
-		# but
-		#     usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
-		# containst host binaries (modulo bugs).
-
-		# Portage's stripping mechanism does not skip stripping
-		# foreign binaries. This frequently causes binaries to be
-		# broken.
-		#
-		# Thus below we disable stripping of target libraries and allow
-		# stripping hosts executables.
-		dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
-		dostrip    "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
-	fi
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2021-03-15 22:33 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2021-03-15 22:33 UTC (permalink / raw
  To: gentoo-commits

commit:     5028316752ed9746551da5e327338f08e1d3e010
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 14 09:09:02 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Mar 15 22:32:49 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50283167

dev-lang/ghc: 8.10: restore keywords

Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/ghc-8.10.4.ebuild | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dev-lang/ghc/ghc-8.10.4.ebuild b/dev-lang/ghc/ghc-8.10.4.ebuild
index a0a3d692f58..7257681ccbe 100644
--- a/dev-lang/ghc/ghc-8.10.4.ebuild
+++ b/dev-lang/ghc/ghc-8.10.4.ebuild
@@ -75,8 +75,7 @@ BUMP_LIBRARIES=(
 
 LICENSE="BSD"
 SLOT="0/${PV}"
-# no binaries yet
-#KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~x86"
 IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
 IUSE+=" binary"
 RESTRICT="!test? ( test )"


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2021-04-20 19:31 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2021-04-20 19:31 UTC (permalink / raw
  To: gentoo-commits

commit:     efe8d14608f9b047bf92652c347fe9eb2a775400
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 20 19:30:38 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Apr 20 19:31:21 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=efe8d146

dev-lang/ghc: use ${EPYTHON}

Reported-by: Agostino Sarubbo
Closes: https://bugs.gentoo.org/774141
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/ghc-8.10.4.ebuild | 19 +++++++++++++++++--
 dev-lang/ghc/ghc-8.8.4.ebuild  | 22 +++++++++++++++++++---
 dev-lang/ghc/ghc-9.0.1.ebuild  | 19 +++++++++++++++++--
 3 files changed, 53 insertions(+), 7 deletions(-)

diff --git a/dev-lang/ghc/ghc-8.10.4.ebuild b/dev-lang/ghc/ghc-8.10.4.ebuild
index 26565839933..3e4cfb0d0db 100644
--- a/dev-lang/ghc/ghc-8.10.4.ebuild
+++ b/dev-lang/ghc/ghc-8.10.4.ebuild
@@ -13,6 +13,8 @@ if [[ ${CTARGET} = ${CHOST} ]] ; then
 	fi
 fi
 
+PYTHON_COMPAT=( python3_{7..9} )
+inherit python-any-r1
 inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib multiprocessing pax-utils toolchain-funcs prefix
 inherit check-reqs
@@ -105,14 +107,23 @@ PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
 
 RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
 
-DEPEND="${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
 	virtual/pkgconfig
 	doc? ( app-text/docbook-xml-dtd:4.2
 		app-text/docbook-xml-dtd:4.5
 		app-text/docbook-xsl-stylesheets
 		dev-python/sphinx
 		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
+	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )
+	test? ( ${PYTHON_DEPS} )
+"
+
+needs_python() {
+	# test driver is written in python
+	use test && return 0
+	return 1
+}
 
 # we build binaries without profiling support
 REQUIRED_USE="
@@ -380,6 +391,10 @@ pkg_setup() {
 			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
 		fi
 	fi
+
+	if needs_python; then
+		python-any-r1_pkg_setup
+	fi
 }
 
 src_unpack() {

diff --git a/dev-lang/ghc/ghc-8.8.4.ebuild b/dev-lang/ghc/ghc-8.8.4.ebuild
index 2b7cd22116b..8bf1fa84bbb 100644
--- a/dev-lang/ghc/ghc-8.8.4.ebuild
+++ b/dev-lang/ghc/ghc-8.8.4.ebuild
@@ -13,6 +13,8 @@ if [[ ${CTARGET} = ${CHOST} ]] ; then
 	fi
 fi
 
+PYTHON_COMPAT=( python3_{7..9} )
+inherit python-any-r1
 inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib multiprocessing pax-utils toolchain-funcs prefix
 inherit check-reqs
@@ -104,14 +106,23 @@ PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
 
 RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
 
-DEPEND="${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
 	virtual/pkgconfig
 	doc? ( app-text/docbook-xml-dtd:4.2
 		app-text/docbook-xml-dtd:4.5
 		app-text/docbook-xsl-stylesheets
 		dev-python/sphinx
 		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
+	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )
+	test? ( ${PYTHON_DEPS} )
+"
+
+needs_python() {
+	# test driver is written in python
+	use test && return 0
+	return 1
+}
 
 # we build binaries without profiling support
 REQUIRED_USE="
@@ -389,6 +400,10 @@ pkg_setup() {
 			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
 		fi
 	fi
+
+	if needs_python; then
+		python-any-r1_pkg_setup
+	fi
 }
 
 src_unpack() {
@@ -436,6 +451,7 @@ src_prepare() {
 				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
 				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
 				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
+				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
 				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
 				popd > /dev/null
 
@@ -640,7 +656,7 @@ src_configure() {
 			# using ${GTARGET}'s libffi is not supported yet:
 			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
 			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
+			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
 		fi
 
 		einfo "Final mk/build.mk:"

diff --git a/dev-lang/ghc/ghc-9.0.1.ebuild b/dev-lang/ghc/ghc-9.0.1.ebuild
index 3a1b5e9d9a8..9f33f2d0b49 100644
--- a/dev-lang/ghc/ghc-9.0.1.ebuild
+++ b/dev-lang/ghc/ghc-9.0.1.ebuild
@@ -13,6 +13,8 @@ if [[ ${CTARGET} = ${CHOST} ]] ; then
 	fi
 fi
 
+PYTHON_COMPAT=( python3_{7..9} )
+inherit python-any-r1
 inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib multiprocessing pax-utils toolchain-funcs prefix
 inherit check-reqs
@@ -105,14 +107,23 @@ PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
 
 RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
 
-DEPEND="${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
 	virtual/pkgconfig
 	doc? ( app-text/docbook-xml-dtd:4.2
 		app-text/docbook-xml-dtd:4.5
 		app-text/docbook-xsl-stylesheets
 		dev-python/sphinx
 		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
+	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )
+	test? ( ${PYTHON_DEPS} )
+"
+
+needs_python() {
+	# test driver is written in python
+	use test && return 0
+	return 1
+}
 
 # we build binaries without profiling support
 REQUIRED_USE="
@@ -380,6 +391,10 @@ pkg_setup() {
 			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
 		fi
 	fi
+
+	if needs_python; then
+		python-any-r1_pkg_setup
+	fi
 }
 
 src_unpack() {


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2021-06-06 13:45 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2021-06-06 13:45 UTC (permalink / raw
  To: gentoo-commits

commit:     bd58031bb1a90bac2fdae9c53ea900ca600055af
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  6 13:45:47 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Jun  6 13:45:54 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd58031b

dev-lang/ghc: bump up to 8.10.5, no keywords yet

Package-Manager: Portage-3.0.19, Repoman-3.0.3
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/Manifest          |   4 +
 dev-lang/ghc/ghc-8.10.5.ebuild | 814 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 818 insertions(+)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index c89f4740694..d072a4397b6 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -1,11 +1,15 @@
 DIST ghc-8.10.4-src.tar.xz 19818108 BLAKE2B 069dd8436c373ccf73c20d8b577243792ffdd3a031e869edd612fe1e273126e60803326542695012dbe62e57654ada18af9342bbe1a741b2bebb41cdb0d86035 SHA512 9bb078cb72535a352243b83b671c871392564efd09e478549f27ae58fc6f46e337a0782f5500d26d5704ad96eace22e77bb36031a1fe9b7e175f265b0b9c028b
 DIST ghc-8.10.4-testsuite.tar.xz 2236932 BLAKE2B 17d0520ad5c6daa0cc60530279ae7e617e4d79328b9f436abbe75e72f0803d9a997fb9e1ae61425326b070f45794a488d8507957fec9a6ed49eea86d30a1e579 SHA512 1bf129c8d872e3ceff7c19929605adc5d68daab9ded9aa2e5109b0de162089631472c66f04993adf8481291f8128bf804fe64a9d344c81e257f1b962ba5e382c
+DIST ghc-8.10.5-src.tar.xz 19920148 BLAKE2B bd3b702fdac4d1c94366bb233a665c2f5677b795d9041c61cc13d813aa43738d5270c3604731f964393035cef90768d4c6e0e401aa35fec6dab61465782f41dc SHA512 b5f39be0accd5c1cecf1cc326ba3142f561d2ac93e9abf366fe46307d7c0712aac244836e659e1a4d9d0fb98299ea96edc8e8a06f3a81b528b14914b94057ffe
+DIST ghc-8.10.5-testsuite.tar.xz 2270504 BLAKE2B 076afc4565c7ba52814547b09313c44bfc3875fc0b05d1af1d3fa702cec9b6b219d86fd56d26a3df07aaa00b37eeb87c58b509162a231bf4e03a07bcc57e9550 SHA512 adae7ff8005c73fc5ded42035c51b1ad6c476beed54de7ba336437a67e81a75d7af8c1be3817516e877b1b2ff0e771fe667d07b93d3a73de8df26a06ed42f334
 DIST ghc-8.8.4-src.tar.xz 19395252 BLAKE2B 6fa898b9552398a724f0452f5cc88ba073264a5645288c73507258959efec40ce5a56a0eaafdabe58f15c5a9210b2c9da5954411dff5c81c52e061569d6a350a SHA512 efd23bd819f7429486696a3a929a040471db7ea8a2d1f1d832e4cf0825b9e1e0c5e6ecad0ab8376f58b74e9c28c1d2f773bd126596d6d853c9e57d57e5ceb090
 DIST ghc-8.8.4-testsuite.tar.xz 1965820 BLAKE2B 3b715700561788b8abdc986961d533b91399461d57a1686ededb4ccc36881503cdc3fc126b9a7b204a728c24b9a9ca97320142348644367aca9b47c87a5b3b51 SHA512 79d8fb0ba8de0fb48c938bd54c8c3278f1895d8ce5c700ce8cf6b3fc550073bb757208e85d4f9818400ebecca96f51d9248b8bbdac9eb2995671756164d08c16
 DIST ghc-9.0.1-src.tar.xz 20782336 BLAKE2B 53eaf903081d705d641459fbc1e6fa7387a6039f9cd466b4708bda86e81252a84d80878d6eb956ec2e1e5b721a313e68eeb796f8345244ca62f536a7a3f0c6df SHA512 bee7950a5118be8d8cefe0db5070139a5a93ca21c5bc6f8bf453429831f0c44f5e0fb5ee569865d6b8b92749044ee4123be06920928ac7a1ec9cffa9404a3e53
 DIST ghc-9.0.1-testsuite.tar.xz 2322432 BLAKE2B 350df763c607dd89ba58ad6e856d815556159a9f088dc0b069de48ae87c1e874a45fad51159e65a3c9a9beed68602eeb2a2728dbce86277bd287455f46f6c53a SHA512 13fbe0f0ab5e2426820d0fb37f0a75e1198ef2a660398508806e8ef094fd23647ca3d386815a2118168d12253d8df3273043678dbb37cf3924c689dd0fd1932e
 DIST ghc-bin-8.10.4-i686-pc-linux-gnu.tbz2 123831294 BLAKE2B 1ca4c1b5c34c948011049a73d409c741db89658d10e311cffbe464c631c3733278fc7dede6ad27474832295ded2c26fd4d6419c760505255e29f7cb232a670a4 SHA512 1f87cf63651f7c0e5f7f55d1f4d7d7c48b0a911cc6673a899d4b92190d765b359f9c7d73c329969c1b76f1af102b7e2c18a80382c81d5dade9ac7dd57de4ef65
 DIST ghc-bin-8.10.4-x86_64-pc-linux-gnu.tbz2 122558873 BLAKE2B 9f07c7bdc3beccfa629d28b2524ccd2f4688a5c0036a45408f5ace2d530a2a0e42f95b3cda5037ebb365317999e1ae776c6f9d21692867abfe85e33f2892b1be SHA512 68bd70f94961547746a696aa2839e156c95858fda0c7ec5b2ecf802070724ab7102b0aa86bcbf93432170d521cce4af10f46b851b470e5dc49dfa5b07380f46d
+DIST ghc-bin-8.10.5-i686-pc-linux-gnu.tbz2 124356781 BLAKE2B 53c5d259a19f11db83d69f7a2f39090d623b07caf1859eb8bf0385183586f538d8eb3eadb06f56f4b7160fa82043eb0f7b8df1632d55af562b8b1cb21c08b4c3 SHA512 58676b4eaeef9e05f69b7c821e115f3a678487b0de696e702ff6378f7d8f23fafda997b0c19d52a730c22bf8012a99c01783d16d00e356fe12532156d5965fc6
+DIST ghc-bin-8.10.5-x86_64-pc-linux-gnu.tbz2 123186918 BLAKE2B 5049514a7c2c58e7f5c929cfb9e818cdc20280f4fc002350cf0cc19f410eb4d4be4d0b46db88205633fde73151e322f3cabd050a9c07e05ccae168c7e6be8be9 SHA512 3a8ef5f0c259ad86adc6a7a5718db419fb0e38a5d1e0bdcc8676e44d1a0130a4b25658ab23572e4e860307b024409da021e08b038fac64a773437c23519b1d0a
 DIST ghc-bin-8.8.4-i686-pc-linux-gnu.tbz2 120336081 BLAKE2B 55dfbb90d5e55c2af5e93c69249828a85cd9171c164b80dfdaf86512972b2c6854c8e4f07426af4ab52a5fb1a85d96a58c2cf003fb02372c55428001cfaea491 SHA512 ad3b83344349976d3253934195b2dc6299648391572b13735943c5ea2239c031c19b0cafd86c16cfb0c061e73bc72e9248f9c1731494a9a15fbe188f02913c12
 DIST ghc-bin-8.8.4-x86_64-pc-linux-gnu.tbz2 118897883 BLAKE2B a180b2dd1a3bc222044ece809ad700aee29d0c3e75b57ee9af3ca33c9c0f59dbf36f68202f746d99f80915cb717a9c41fc12db507f1cb469981732703a06b9cc SHA512 9d4be02dbd9704c93ef18feb92ea30bd5d590df31f288bf1b364818424c5019ca9ada26eec88418199f90ae8f4459d0a9352104e3f3186bbdc241891eb1b66c4
 DIST ghc-bin-9.0.1-i686-pc-linux-gnu.tbz2 122955511 BLAKE2B b870f46cc78fcc1d715aafe7108951582cfd12495b4e9d804d4b66562c66a6a2b2d9513031aedc8f3630a0cdbb3257943304b05732301a084f89487452f2f2d9 SHA512 aafd4233c40f93b71e6ac1acc8a75e30d49b826e4bce6d9832836966fd5f6c4898963bd4c2f34577f4199c1d9a3f537ac1e7d87eab11e9fb5e849573580ed3fb

diff --git a/dev-lang/ghc/ghc-8.10.5.ebuild b/dev-lang/ghc/ghc-8.10.5.ebuild
new file mode 100644
index 00000000000..5c7215a7e76
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.10.5.ebuild
@@ -0,0 +1,814 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+		export CTARGET=${CATEGORY/cross-}
+	fi
+fi
+
+PYTHON_COMPAT=( python3_{7..9} )
+inherit python-any-r1
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib multiprocessing pax-utils toolchain-funcs prefix
+inherit check-reqs
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="https://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+BIN_PV=${PV}
+# sorted!
+#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+	case "${ARCH}" in
+		#alpha) return 0 ;;
+		#arm64) return 0 ;;
+		#arm) return 0 ;;
+		amd64) return 0 ;;
+		#ia64) return 0 ;;
+		#ppc) return 0 ;;
+		#ppc64)
+		#	use big-endian && return 0
+		#	return 0
+		#	;;
+		#sparc) return 0 ;;
+		x86) return 0 ;;
+		*) return 1 ;;
+	esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=8.10.0.20200123 # uncomment only for -alpha, -beta, -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? (
+	https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-src.tar.xz
+	test? ( https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
+)"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+
+BUMP_LIBRARIES=(
+	# "hackage-name          hackage-version"
+)
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS=""
+IUSE="big-endian +doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
+IUSE+=" binary"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	>=dev-lang/perl-5.6.1
+	dev-libs/gmp:0=
+	sys-libs/ncurses:0=[unicode]
+	elfutils? ( dev-libs/elfutils )
+	!ghcmakebinary? ( dev-libs/libffi:= )
+	numa? ( sys-process/numactl )
+"
+
+# This set of dependencies is needed to run
+# prebuilt ghc. We specifically avoid ncurses
+# dependency with:
+#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
+PREBUILT_BINARY_DEPENDS="
+	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+"
+# This set of dependencies is needed to install
+# ghc[binary] in system. terminfo package is linked
+# against ncurses.
+PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
+	sys-libs/ncurses:0/6
+"
+
+RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
+
+DEPEND="${RDEPEND}"
+BDEPEND="
+	virtual/pkgconfig
+	doc? ( app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5
+		app-text/docbook-xsl-stylesheets
+		dev-python/sphinx
+		>=dev-libs/libxslt-1.1.2 )
+	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )
+	test? ( ${PYTHON_DEPS} )
+"
+
+needs_python() {
+	# test driver is written in python
+	use test && return 0
+	return 1
+}
+
+# we build binaries without profiling support
+REQUIRED_USE="
+	?? ( ghcbootstrap binary )
+	?? ( profile binary )
+"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+	[[ ${CHOST} != ${CTARGET} ]]
+}
+
+is_native() {
+	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
+}
+
+if ! is_crosscompile; then
+	PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
+fi
+
+# returns tool prefix for crosscompiler.
+# Example:
+#  CTARGET=armv7a-unknown-linux-gnueabi
+#  CHOST=x86_64-pc-linux-gnu
+#    "armv7a-unknown-linux-gnueabi-"
+#  CTARGET=${CHOST}
+#    ""
+# Used in tools and library prefix:
+#    "${ED}"/usr/bin/$(cross)haddock
+#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+
+cross() {
+	if is_crosscompile; then
+		echo "${CTARGET}-"
+	else
+		echo ""
+	fi
+}
+
+append-ghc-cflags() {
+	local persistent compile assemble link
+	local flag ghcflag
+
+	for flag in $*; do
+		case ${flag} in
+			persistent)	persistent="yes";;
+			compile)	compile="yes";;
+			assemble)	assemble="yes";;
+			link)		link="yes";;
+			*)
+				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+				;;
+		esac
+	done
+}
+
+# $1 - lib name (under libraries/)
+# $2 - lib version
+# example: bump_lib "transformers" "0.4.2.0"
+bump_lib() {
+	local pn=$1 pv=$2
+	local p=${pn}-${pv}
+	local f
+
+	einfo "Bumping ${pn} up to ${pv}"
+
+	for f in ghc.mk GNUmakefile; do
+		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
+	done
+	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
+	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
+}
+
+update_SRC_URI() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
+	done
+}
+
+update_SRC_URI
+
+bump_libs() {
+	local p pn pv
+	for p in "${BUMP_LIBRARIES[@]}"; do
+		set -- $p
+		pn=$1 pv=$2
+
+		bump_lib "${pn}" "${pv}"
+	done
+}
+
+ghc_setup_cflags() {
+	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
+	if ! is_native; then
+		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
+		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
+		einfo "Crosscompiling mode:"
+		einfo "   CHOST:   ${CHOST}"
+		einfo "   CTARGET: ${CTARGET}"
+		einfo "   CFLAGS:  ${CFLAGS}"
+		einfo "   LDFLAGS: ${LDFLAGS}"
+		einfo "   prefix: $(cross)"
+		return
+	fi
+	# We need to be very careful with the CFLAGS we ask ghc to pass through to
+	# gcc. There are plenty of flags which will make gcc produce output that
+	# breaks ghc in various ways. The main ones we want to pass through are
+	# -mcpu / -march flags. These are important for arches like alpha & sparc.
+	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
+	strip-flags
+	strip-unsupported-flags
+
+	# Cmm can't parse line numbers #482086
+	replace-flags -ggdb[3-9] -ggdb2
+
+	GHC_FLAGS=""
+	GHC_PERSISTENT_FLAGS=""
+	for flag in ${CFLAGS}; do
+		case ${flag} in
+
+			# Ignore extra optimisation (ghc passes -O to gcc anyway)
+			# -O2 and above break on too many systems
+			-O*) ;;
+
+			# Arch and ABI flags are what we're really after
+			-m*) append-ghc-cflags compile assemble ${flag};;
+
+			# Sometimes it's handy to see backtrace of RTS
+			# to get an idea what happens there
+			-g*) append-ghc-cflags compile ${flag};;
+
+			# Ignore all other flags, including all -f* flags
+		esac
+	done
+
+	for flag in ${LDFLAGS}; do
+		append-ghc-cflags link ${flag}
+	done
+
+	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
+	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
+	# options to gcc.
+	if is_native; then
+		# prevent from failing to build unregisterised ghc:
+		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+	fi
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+	local from=$1
+	local   to=$2
+	shift 2
+	local file=
+	for file in "$@"
+	do
+		sed -i -e "s|$from|$to|g" \
+			"$file" || die "path relocation failed for '$file'"
+	done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+	local to=$1 ghc_v=${BIN_PV}
+
+	# libdir for prebuilt binary and for current system may mismatch
+	# It does for prefix installation for example: bug #476998
+	local bin_ghc_prefix=${WORKDIR}/usr
+	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+	# backup original script to use it later after relocation
+	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
+	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+	if [[ ${bin_libdir} != $(get_libdir) ]]; then
+		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+		# moving the dir itself is not strictly needed
+		# but then USE=binary would result in installing
+		# in '${bin_libdir}'
+		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
+			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
+			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
+			"${WORKDIR}/usr/bin/hsc2hs" \
+			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
+			"$gp_back" \
+			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
+	fi
+
+	# Relocate from /usr to ${EPREFIX}/usr
+	relocate_path "/usr" "${to}/usr" \
+		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
+		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
+		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
+		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
+		"${WORKDIR}/usr/bin/hp2ps" \
+		"${WORKDIR}/usr/bin/hpc" \
+		"${WORKDIR}/usr/bin/hsc2hs" \
+		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
+		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
+
+	# this one we will use to regenerate cache
+	# so it should point to current tree location
+	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+	if use prefix; then
+		hprefixify "${bin_libpath}"/${PN}*/settings
+	fi
+
+	# regenerate the binary package cache
+	"$gp_back" recache || die "failed to update cache after relocation"
+	rm "$gp_back"
+}
+
+ghc-check-reqs() {
+	# These are pessimistic values (slightly bigger than worst-case)
+	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
+	# numbers on various arches.
+	CHECKREQS_DISK_BUILD=8G
+	CHECKREQS_DISK_USR=2G
+	# USE=binary roughly takes
+	use binary && CHECKREQS_DISK_BUILD=4G
+
+	"$@"
+}
+
+pkg_pretend() {
+	ghc-check-reqs check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	ghc-check-reqs check-reqs_pkg_setup
+
+	# quiet portage about prebuilt binaries
+	use binary && QA_PREBUILT="*"
+
+	[[ ${MERGE_TYPE} == binary ]] && return
+
+	if use ghcbootstrap; then
+		ewarn "You requested ghc bootstrapping, this is usually only used"
+		ewarn "by Gentoo developers to make binary .tbz2 packages."
+
+		[[ -z $(type -P ghc) ]] && \
+			die "Could not find a ghc to bootstrap with."
+	else
+		if ! yet_binary; then
+			eerror "Please try emerging with USE=ghcbootstrap and report build"
+			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
+			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
+		fi
+	fi
+
+	if needs_python; then
+		python-any-r1_pkg_setup
+	fi
+}
+
+src_unpack() {
+	# Create the ${S} dir if we're using the binary version
+	use binary && mkdir "${S}"
+
+	# the Solaris and Darwin binaries from ghc (maeder) need to be
+	# unpacked separately, so prevent them from being unpacked
+	local ONLYA=${A}
+	case ${CHOST} in
+		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
+	esac
+	unpack ${ONLYA}
+}
+
+src_prepare() {
+	ghc_setup_cflags
+
+	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+		# See bug #313635.
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
+
+		# allow hardened users use vanilla binary to bootstrap ghc
+		# ghci uses mmap with rwx protection at it implements dynamic
+		# linking on it's own (bug #299709)
+		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
+	fi
+
+	if use binary; then
+		if use prefix; then
+			relocate_ghc "${EPREFIX}"
+		fi
+
+		# Move unpacked files to the expected place
+		mv "${WORKDIR}/usr" "${S}"
+		eapply_user
+	else
+		if ! use ghcbootstrap; then
+			case ${CHOST} in
+				*-darwin* | *-solaris*)
+				# UPDATE ME for ghc-7
+				mkdir "${WORKDIR}"/ghc-bin-installer || die
+				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
+				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
+				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
+				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
+				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
+				popd > /dev/null
+
+				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
+				# fix the binaries so they run, on Solaris we need an
+				# LD_LIBRARY_PATH which has our prefix libdirs, on
+				# Darwin we need to replace the frameworks with our libs
+				# from the prefix fix before installation, because some
+				# of the tools are actually used during configure/make
+				if [[ ${CHOST} == *-solaris* ]] ; then
+					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
+				elif [[ ${CHOST} == *-darwin* ]] ; then
+					local readline_framework=GNUreadline.framework/GNUreadline
+					local gmp_framework=/opt/local/lib/libgmp.10.dylib
+					local ncurses_file=/opt/local/lib/libncurses.5.dylib
+					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
+						install_name_tool -change \
+							${readline_framework} \
+							"${EPREFIX}"/lib/libreadline.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${gmp_framework} \
+							"${EPREFIX}"/usr/lib/libgmp.dylib \
+							${binary} || die
+						install_name_tool -change \
+							${ncurses_file} \
+							"${EPREFIX}"/usr/lib/libncurses.dylib \
+							${binary} || die
+					done
+					# we don't do frameworks!
+					sed -i \
+						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
+						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
+						rts/package.conf.in || die
+				fi
+
+				# it is autoconf, but we really don't want to give it too
+				# many arguments, in fact we do the make in-place anyway
+				./configure --prefix="${WORKDIR}"/usr || die
+				make install || die
+				popd > /dev/null
+				;;
+				*)
+				relocate_ghc "${WORKDIR}"
+				;;
+			esac
+		fi
+
+		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+			"${S}/ghc/ghc.wrapper"
+
+		cd "${S}" # otherwise eapply will break
+
+		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
+		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+		eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
+		eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch
+		eapply "${FILESDIR}"/${PN}-8.10.4-sphinx-quote.patch
+
+		# a bunch of crosscompiler patches
+		# needs newer version:
+		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+
+		# mingw32 target
+		pushd "${S}/libraries/Win32"
+			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
+		popd
+
+		bump_libs
+
+		eapply_user
+		# as we have changed the build system
+		eautoreconf
+	fi
+}
+
+src_configure() {
+	if ! use binary; then
+		# initialize build.mk
+		echo '# Gentoo changes' > mk/build.mk
+
+		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
+		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+
+		# We also need to use the GHC_FLAGS flags when building ghc itself
+		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
+		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
+		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
+		# Speed up initial Cabal bootstrap
+		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
+
+		# We can't depend on haddock except when bootstrapping when we
+		# must build docs and include them into the binary .tbz2 package
+		# app-text/dblatex is not in portage, can not build PDF or PS
+		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
+		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
+		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
+
+		# this controls presence on 'xhtml' and 'haddock' in final install
+		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
+
+		# not used outside of ghc's test
+		if [[ -n ${GHC_BUILD_DPH} ]]; then
+				echo "BUILD_DPH = YES" >> mk/build.mk
+			else
+				echo "BUILD_DPH = NO" >> mk/build.mk
+		fi
+
+		# Any non-native build has to skip as it needs
+		# target haddock binary to be runnabine.
+		if ! is_native; then
+			# disable docs generation as it requires running stage2
+			echo "HADDOCK_DOCS=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
+			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
+		fi
+
+		if is_crosscompile; then
+			# Install ghc-stage1 crosscompiler instead of
+			# ghc-stage2 cross-built compiler.
+			echo "Stage1Only=YES" >> mk/build.mk
+		fi
+
+		# allows overriding build flavours for libraries:
+		# v   - vanilla (static libs)
+		# p   - profiled
+		# dyn - shared libraries
+		# example: GHC_LIBRARY_WAYS="v dyn"
+		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
+			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
+		fi
+		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
+
+		# Get ghc from the unpacked binary .tbz2
+		# except when bootstrapping we just pick ghc up off the path
+		if ! use ghcbootstrap; then
+			export PATH="${WORKDIR}/usr/bin:${PATH}"
+		fi
+
+		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
+
+		# don't strip anything. Very useful when stage2 SIGSEGVs on you
+		echo "STRIP_CMD = :" >> mk/build.mk
+
+		local econf_args=()
+
+		# GHC embeds toolchain it was built by and uses it later.
+		# Don't allow things like ccache or versioned binary slip.
+		# We use stable thing across gcc upgrades.
+		# User can use EXTRA_ECONF=CC=... to override this default.
+		econf_args+=(
+			AR=${CTARGET}-ar
+			CC=${CTARGET}-gcc
+			# these should be inferred by GHC but ghc defaults
+			# to using bundled tools on windows.
+			Windres=${CTARGET}-windres
+			DllWrap=${CTARGET}-dllwrap
+			# we set the linker explicitly below
+			--disable-ld-override
+		)
+		case ${CTARGET} in
+			arm*)
+				# ld.bfd-2.28 does not work for ghc. Force ld.gold
+				# instead. This should be removed once gentoo gets
+				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
+				econf_args+=(LD=${CTARGET}-ld.gold)
+			;;
+			sparc*)
+				# ld.gold-2.28 does not work for ghc. Force ld.bfd
+				# instead. This should be removed once gentoo gets
+				# a fix for missing --no-relax support bug:
+				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
+				econf_args+=(LD=${CTARGET}-ld.bfd)
+			;;
+			*)
+				econf_args+=(LD=${CTARGET}-ld)
+		esac
+
+		if [[ ${CBUILD} != ${CHOST} ]]; then
+			# GHC bug: ghc claims not to support cross-building.
+			# It does, but does not distinct --host= value
+			# for stage1 and stage2 compiler.
+			econf_args+=(--host=${CBUILD})
+		fi
+
+		if use ghcmakebinary; then
+			# When building booting libary we are trying to
+			# bundle or restrict most of external depends
+			# with unstable ABI:
+			#  - embed libffi (default GHC behaviour)
+			#  - disable ncurses support for ghci (via haskeline)
+			#    https://bugs.gentoo.org/557478
+			#  - disable ncurses support for ghc-pkg
+			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
+			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
+		elif is_native; then
+			# using ${GTARGET}'s libffi is not supported yet:
+			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
+			econf_args+=(--with-system-libffi)
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
+		fi
+
+		einfo "Final mk/build.mk:"
+		cat mk/build.mk || die
+
+		econf ${econf_args[@]} \
+			--enable-bootstrap-with-devel-snapshot \
+			$(use_enable elfutils dwarf-unwind) \
+			$(use_enable numa)
+
+		if [[ ${PV} == *9999* ]]; then
+			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+			GHC_P=${PN}-${GHC_PV}
+		fi
+	fi # ! use binary
+}
+
+src_compile() {
+	if ! use binary; then
+		# Stage1Only crosscompiler does not build stage2
+		if ! is_crosscompile; then
+			# 1. build/pax-mark compiler binary first
+			emake ghc/stage2/build/tmp/ghc-stage2
+			# 2. pax-mark (bug #516430)
+			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
+			# 2. build/pax-mark haddock using ghc-stage2
+			if is_native; then
+				# non-native build does not build haddock
+				# due to HADDOCK_DOCS=NO, but it could.
+				emake utils/haddock/dist/build/tmp/haddock
+				pax-mark -m utils/haddock/dist/build/tmp/haddock
+			fi
+		fi
+		# 3. and then all the rest
+		emake all
+	fi # ! use binary
+}
+
+src_test() {
+	# TODO: deal with:
+	#    - sandbox (pollutes environment)
+	#    - extra packages (to extend testsuite coverage)
+	# bits are taken from 'validate'
+	local make_test_target='test' # can be fulltest
+	# not 'emake' as testsuite uses '$MAKE' without jobserver available
+	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
+}
+
+src_install() {
+	if use binary; then
+		use prefix && mkdir -p "${ED}"
+		mv "${S}/usr" "${ED}"
+	else
+		[[ -f VERSION ]] || emake VERSION
+
+		# -j1 due to a rare race in install script:
+		#    make --no-print-directory -f ghc.mk phase=final install
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
+		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
+		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
+		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
+		#    /usr/bin/install: cannot create regular file \
+		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
+		emake -j1 install DESTDIR="${D}"
+
+		# Skip for cross-targets as they all share target location:
+		# /usr/share/doc/ghc-9999/
+		if ! is_crosscompile; then
+			dodoc "distrib/README" "LICENSE" "VERSION"
+		fi
+
+		# rename ghc-shipped files to avoid collision
+		# of external packages. Motivating example:
+		#  user had installed:
+		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
+		#      dev-haskell/transformers-0.4.2.0
+		#  then user tried to update to
+		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
+		#  this will lead to single .conf file collision.
+		local shipped_conf renamed_conf
+		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+		for shipped_conf in "${package_confdir}"/*.conf; do
+			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
+			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
+			mv "${shipped_conf}" "${renamed_conf}" || die
+		done
+
+		# remove link, but leave 'haddock-${GHC_P}'
+		rm -f "${ED}"/usr/bin/$(cross)haddock
+
+		if ! is_crosscompile; then
+			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
+			newbashcomp utils/completion/ghc.bash         ghc
+		fi
+	fi
+
+	# path to the package.cache
+	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+	PKGCACHE="${package_confdir}"/package.cache
+	# copy the package.conf.d, including timestamp, save it so we can help
+	# users that have a broken package.conf.d
+	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
+
+	# copy the package.conf, including timestamp, save it so we later can put it
+	# back before uninstalling, or when upgrading.
+	cp -p "${PKGCACHE}"{,.shipped} \
+		|| die "failed to copy package.conf.d/package.cache"
+
+	if is_crosscompile; then
+		# When we build a cross-compiler the layout is the following:
+		#     usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
+		# but
+		#     usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
+		# containst host binaries (modulo bugs).
+
+		# Portage's stripping mechanism does not skip stripping
+		# foreign binaries. This frequently causes binaries to be
+		# broken.
+		#
+		# Thus below we disable stripping of target libraries and allow
+		# stripping hosts executables.
+		dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
+		dostrip    "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
+	fi
+}
+
+pkg_preinst() {
+	# have we got an earlier version of ghc installed?
+	if has_version "<${CATEGORY}/${PF}"; then
+		haskell_updater_warn="1"
+	fi
+}
+
+pkg_postinst() {
+	ghc-reregister
+
+	# path to the package.cache
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+
+	# give the cache a new timestamp, it must be as recent as
+	# the package.conf.d directory.
+	touch "${PKGCACHE}"
+
+	if [[ "${haskell_updater_warn}" == "1" ]]; then
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+		ewarn "You have just upgraded from an older version of GHC."
+		ewarn "You may have to run"
+		ewarn "      'haskell-updater'"
+		ewarn "to rebuild all ghc-based Haskell libraries."
+		ewarn
+		ewarn "\e[1;31m************************************************************************\e[0m"
+		ewarn
+	fi
+}
+
+pkg_prerm() {
+	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+	rm -rf "${PKGCACHE}"
+
+	cp -p "${PKGCACHE}"{.shipped,}
+}
+
+pkg_postrm() {
+	ghc-package_pkg_postrm
+}


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2021-06-18 21:07 David Seifert
  0 siblings, 0 replies; 92+ messages in thread
From: David Seifert @ 2021-06-18 21:07 UTC (permalink / raw
  To: gentoo-commits

commit:     3823da028a34af5605d1b662497abf4d421972fd
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 18 21:06:47 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Fri Jun 18 21:06:47 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3823da02

dev-lang/ghc: respect ${PKG_CONFIG}

Package-Manager: Portage-3.0.18-prefix, Repoman-3.0.3
Signed-off-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 dev-lang/ghc/ghc-8.8.4.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-lang/ghc/ghc-8.8.4.ebuild b/dev-lang/ghc/ghc-8.8.4.ebuild
index 8bf1fa84bbb..a9315b6c526 100644
--- a/dev-lang/ghc/ghc-8.8.4.ebuild
+++ b/dev-lang/ghc/ghc-8.8.4.ebuild
@@ -656,7 +656,7 @@ src_configure() {
 			# using ${GTARGET}'s libffi is not supported yet:
 			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
 			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
 		fi
 
 		einfo "Final mk/build.mk:"


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2021-06-19  9:05 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2021-06-19  9:05 UTC (permalink / raw
  To: gentoo-commits

commit:     5f239ee334b89ba21a1dd390d2c1f57f0cf50893
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 19 09:05:17 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Jun 19 09:05:17 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f239ee3

dev-lang/ghc: allow python-3.10

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/ghc-8.10.5.ebuild | 2 +-
 dev-lang/ghc/ghc-9.0.1.ebuild  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-lang/ghc/ghc-8.10.5.ebuild b/dev-lang/ghc/ghc-8.10.5.ebuild
index 5c7215a7e76..6e97c40b457 100644
--- a/dev-lang/ghc/ghc-8.10.5.ebuild
+++ b/dev-lang/ghc/ghc-8.10.5.ebuild
@@ -13,7 +13,7 @@ if [[ ${CTARGET} = ${CHOST} ]] ; then
 	fi
 fi
 
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{7..10} )
 inherit python-any-r1
 inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib multiprocessing pax-utils toolchain-funcs prefix

diff --git a/dev-lang/ghc/ghc-9.0.1.ebuild b/dev-lang/ghc/ghc-9.0.1.ebuild
index 9f33f2d0b49..579bd861424 100644
--- a/dev-lang/ghc/ghc-9.0.1.ebuild
+++ b/dev-lang/ghc/ghc-9.0.1.ebuild
@@ -13,7 +13,7 @@ if [[ ${CTARGET} = ${CHOST} ]] ; then
 	fi
 fi
 
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{7..10} )
 inherit python-any-r1
 inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib multiprocessing pax-utils toolchain-funcs prefix


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2021-07-18  8:58 Sergei Trofimovich
  0 siblings, 0 replies; 92+ messages in thread
From: Sergei Trofimovich @ 2021-07-18  8:58 UTC (permalink / raw
  To: gentoo-commits

commit:     707f933c98950a47f589d97538fb43346e6cd796
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 18 08:52:12 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Jul 18 08:58:27 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=707f933c

dev-lang/ghc: use /usr/share/doc/${PF}

Reported-by: Agostino Sarubbo
Closes: https://bugs.gentoo.org/802699
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ghc/ghc-8.10.4-r1.ebuild | 4 ++--
 dev-lang/ghc/ghc-8.10.5-r1.ebuild | 4 ++--
 dev-lang/ghc/ghc-8.8.4-r1.ebuild  | 4 ++--
 dev-lang/ghc/ghc-9.0.1-r1.ebuild  | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/dev-lang/ghc/ghc-8.10.4-r1.ebuild b/dev-lang/ghc/ghc-8.10.4-r1.ebuild
index 2e9a527ec4b..0e4472b1c7d 100644
--- a/dev-lang/ghc/ghc-8.10.4-r1.ebuild
+++ b/dev-lang/ghc/ghc-8.10.4-r1.ebuild
@@ -527,8 +527,8 @@ src_configure() {
 		echo '# Gentoo changes' > mk/build.mk
 
 		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${PF}" >> mk/build.mk
+		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${PF}" >> mk/build.mk
 
 		# We also need to use the GHC_FLAGS flags when building ghc itself
 		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk

diff --git a/dev-lang/ghc/ghc-8.10.5-r1.ebuild b/dev-lang/ghc/ghc-8.10.5-r1.ebuild
index 9fbc3261778..79ac41c9b9d 100644
--- a/dev-lang/ghc/ghc-8.10.5-r1.ebuild
+++ b/dev-lang/ghc/ghc-8.10.5-r1.ebuild
@@ -526,8 +526,8 @@ src_configure() {
 		echo '# Gentoo changes' > mk/build.mk
 
 		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${PF}" >> mk/build.mk
+		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${PF}" >> mk/build.mk
 
 		# We also need to use the GHC_FLAGS flags when building ghc itself
 		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk

diff --git a/dev-lang/ghc/ghc-8.8.4-r1.ebuild b/dev-lang/ghc/ghc-8.8.4-r1.ebuild
index 02ac100382e..6254a54371a 100644
--- a/dev-lang/ghc/ghc-8.8.4-r1.ebuild
+++ b/dev-lang/ghc/ghc-8.8.4-r1.ebuild
@@ -538,8 +538,8 @@ src_configure() {
 		echo '# Gentoo changes' > mk/build.mk
 
 		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${PF}" >> mk/build.mk
+		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${PF}" >> mk/build.mk
 
 		# We also need to use the GHC_FLAGS flags when building ghc itself
 		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk

diff --git a/dev-lang/ghc/ghc-9.0.1-r1.ebuild b/dev-lang/ghc/ghc-9.0.1-r1.ebuild
index f42fb4d7554..6feaed8be49 100644
--- a/dev-lang/ghc/ghc-9.0.1-r1.ebuild
+++ b/dev-lang/ghc/ghc-9.0.1-r1.ebuild
@@ -526,8 +526,8 @@ src_configure() {
 		echo '# Gentoo changes' > mk/build.mk
 
 		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${PF}" >> mk/build.mk
+		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${PF}" >> mk/build.mk
 
 		# We also need to use the GHC_FLAGS flags when building ghc itself
 		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2022-01-05 10:01 David Seifert
  0 siblings, 0 replies; 92+ messages in thread
From: David Seifert @ 2022-01-05 10:01 UTC (permalink / raw
  To: gentoo-commits

commit:     ff508a33a22d4ea79ada63ca146cc8d8d469b2ec
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  5 10:01:21 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Wed Jan  5 10:01:21 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff508a33

dev-lang/ghc: remove x86-fbsd

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 dev-lang/ghc/ghc-8.10.4-r1.ebuild | 5 +----
 dev-lang/ghc/ghc-8.10.5-r1.ebuild | 5 +----
 dev-lang/ghc/ghc-8.10.6.ebuild    | 5 +----
 dev-lang/ghc/ghc-8.8.4-r1.ebuild  | 5 +----
 dev-lang/ghc/ghc-9.0.1-r1.ebuild  | 5 +----
 5 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/dev-lang/ghc/ghc-8.10.4-r1.ebuild b/dev-lang/ghc/ghc-8.10.4-r1.ebuild
index 0e4472b1c7d4..3ceeddccb9e8 100644
--- a/dev-lang/ghc/ghc-8.10.4-r1.ebuild
+++ b/dev-lang/ghc/ghc-8.10.4-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -37,9 +37,6 @@ arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/g
 #arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
 arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
 # 0 - yet
 yet_binary() {
 	case "${ARCH}" in

diff --git a/dev-lang/ghc/ghc-8.10.5-r1.ebuild b/dev-lang/ghc/ghc-8.10.5-r1.ebuild
index 79ac41c9b9db..a1e43281dd4c 100644
--- a/dev-lang/ghc/ghc-8.10.5-r1.ebuild
+++ b/dev-lang/ghc/ghc-8.10.5-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -37,9 +37,6 @@ arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/g
 #arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
 arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
 # 0 - yet
 yet_binary() {
 	case "${ARCH}" in

diff --git a/dev-lang/ghc/ghc-8.10.6.ebuild b/dev-lang/ghc/ghc-8.10.6.ebuild
index 4276efffd616..1464a3e0dd6c 100644
--- a/dev-lang/ghc/ghc-8.10.6.ebuild
+++ b/dev-lang/ghc/ghc-8.10.6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -37,9 +37,6 @@ arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/g
 #arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
 arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
 # 0 - yet
 yet_binary() {
 	case "${ARCH}" in

diff --git a/dev-lang/ghc/ghc-8.8.4-r1.ebuild b/dev-lang/ghc/ghc-8.8.4-r1.ebuild
index 5803cfac6333..7cb29d4a740c 100644
--- a/dev-lang/ghc/ghc-8.8.4-r1.ebuild
+++ b/dev-lang/ghc/ghc-8.8.4-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -36,9 +36,6 @@ arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/g
 #arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
 arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
 # 0 - yet
 yet_binary() {
 	case "${ARCH}" in

diff --git a/dev-lang/ghc/ghc-9.0.1-r1.ebuild b/dev-lang/ghc/ghc-9.0.1-r1.ebuild
index 6feaed8be49e..6f15fc21247a 100644
--- a/dev-lang/ghc/ghc-9.0.1-r1.ebuild
+++ b/dev-lang/ghc/ghc-9.0.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -37,9 +37,6 @@ arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/g
 #arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
 arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
 # 0 - yet
 yet_binary() {
 	case "${ARCH}" in


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2022-07-22 22:34 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2022-07-22 22:34 UTC (permalink / raw
  To: gentoo-commits

commit:     8269d2a2d3875a3024e75ca712669d8bb5b90223
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 22 22:34:50 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul 22 22:34:50 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8269d2a2

dev-lang/ghc: fix removing debuginfo

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/ghc-9.0.2.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dev-lang/ghc/ghc-9.0.2.ebuild b/dev-lang/ghc/ghc-9.0.2.ebuild
index 0d233e32318e..c3befcb79a29 100644
--- a/dev-lang/ghc/ghc-9.0.2.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2.ebuild
@@ -416,7 +416,9 @@ src_prepare() {
 	fi
 
 	# binpkg may have been built with FEATURES=splitdebug
-	[[ -d "${WORKDIR}/usr/lib/debug" ]] && rm -rf "${WORKDIR}/usr/lib/debug" || die
+	if [[ -d "${WORKDIR}/usr/lib/debug" ]] ; then
+		rm -rf "${WORKDIR}/usr/lib/debug" || die
+	fi
 	find "${WORKDIR}/usr/lib" -type d -empty -delete 2>/dev/null # do not die on failure here
 
 	# ffi headers don't get included in the binpkg for some reason


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2022-07-22 22:36 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2022-07-22 22:36 UTC (permalink / raw
  To: gentoo-commits

commit:     a4c467f8ab89a92842de31140e307e2b76d0f2df
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 22 22:36:23 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul 22 22:36:23 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4c467f8

dev-lang/ghc: drop unnecessary eclasses

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/ghc-9.0.2.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-lang/ghc/ghc-9.0.2.ebuild b/dev-lang/ghc/ghc-9.0.2.ebuild
index c3befcb79a29..49acb75d8338 100644
--- a/dev-lang/ghc/ghc-9.0.2.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2.ebuild
@@ -15,8 +15,8 @@ fi
 
 PYTHON_COMPAT=( python3_{8..10} )
 inherit python-any-r1
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs prefix
+inherit autotools bash-completion-r1 flag-o-matic ghc-package
+inherit multiprocessing pax-utils toolchain-funcs prefix
 inherit check-reqs
 DESCRIPTION="The Glasgow Haskell Compiler"
 HOMEPAGE="https://www.haskell.org/ghc/"


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2022-07-23  2:08 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2022-07-23  2:08 UTC (permalink / raw
  To: gentoo-commits

commit:     0f4fe60b7d09b15c8c7396e79cfd65aafff926f6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 23 02:08:10 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jul 23 02:08:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f4fe60b

dev-lang/ghc: drop 8.10.5-r1, 9.0.1-r1

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/Manifest             |   8 -
 dev-lang/ghc/ghc-8.10.5-r1.ebuild | 811 --------------------------------------
 dev-lang/ghc/ghc-9.0.1-r1.ebuild  | 811 --------------------------------------
 3 files changed, 1630 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 93729b3b026b..42cde67ad2d9 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -1,25 +1,17 @@
 DIST ghc-8.10.4-src.tar.xz 19818108 BLAKE2B 069dd8436c373ccf73c20d8b577243792ffdd3a031e869edd612fe1e273126e60803326542695012dbe62e57654ada18af9342bbe1a741b2bebb41cdb0d86035 SHA512 9bb078cb72535a352243b83b671c871392564efd09e478549f27ae58fc6f46e337a0782f5500d26d5704ad96eace22e77bb36031a1fe9b7e175f265b0b9c028b
 DIST ghc-8.10.4-testsuite.tar.xz 2236932 BLAKE2B 17d0520ad5c6daa0cc60530279ae7e617e4d79328b9f436abbe75e72f0803d9a997fb9e1ae61425326b070f45794a488d8507957fec9a6ed49eea86d30a1e579 SHA512 1bf129c8d872e3ceff7c19929605adc5d68daab9ded9aa2e5109b0de162089631472c66f04993adf8481291f8128bf804fe64a9d344c81e257f1b962ba5e382c
-DIST ghc-8.10.5-src.tar.xz 19920148 BLAKE2B bd3b702fdac4d1c94366bb233a665c2f5677b795d9041c61cc13d813aa43738d5270c3604731f964393035cef90768d4c6e0e401aa35fec6dab61465782f41dc SHA512 b5f39be0accd5c1cecf1cc326ba3142f561d2ac93e9abf366fe46307d7c0712aac244836e659e1a4d9d0fb98299ea96edc8e8a06f3a81b528b14914b94057ffe
-DIST ghc-8.10.5-testsuite.tar.xz 2270504 BLAKE2B 076afc4565c7ba52814547b09313c44bfc3875fc0b05d1af1d3fa702cec9b6b219d86fd56d26a3df07aaa00b37eeb87c58b509162a231bf4e03a07bcc57e9550 SHA512 adae7ff8005c73fc5ded42035c51b1ad6c476beed54de7ba336437a67e81a75d7af8c1be3817516e877b1b2ff0e771fe667d07b93d3a73de8df26a06ed42f334
 DIST ghc-8.10.6-src.tar.xz 19932832 BLAKE2B f5d0c43aa5df87648e32beeb5ed6866b231cbce4f344fb03110db826b36bbac435f5e89d9ffeef3f87c15e830fdee6b95150b7bdcd06906575bfcd9c83797dff SHA512 6314eb9744d47d803b30b621bd12bf6179dad5cc578ec267b3a65b89e9c9b431bdb4913936f040c7ca4fcc71a676a43e78b5f6173d123a844e7f29004405b8b6
 DIST ghc-8.10.6-testsuite.tar.xz 2265044 BLAKE2B 72a1e955acecc92a720ee2747d96cacf56f2968c9deabb254c882a969c154baa0fdb639a857844ec91a4e47ee553dd13b58c3b790202e7e73500095c1ec85ee9 SHA512 f74d743bd8f889c2941be8fd5348e92abcaf75bce48140f7f9cc0c6ce33ba24a8479bef48631ffe2a10397c0ecf166b3bddb6ca8ee905859c029175de5d43f2a
 DIST ghc-8.8.4-src.tar.xz 19395252 BLAKE2B 6fa898b9552398a724f0452f5cc88ba073264a5645288c73507258959efec40ce5a56a0eaafdabe58f15c5a9210b2c9da5954411dff5c81c52e061569d6a350a SHA512 efd23bd819f7429486696a3a929a040471db7ea8a2d1f1d832e4cf0825b9e1e0c5e6ecad0ab8376f58b74e9c28c1d2f773bd126596d6d853c9e57d57e5ceb090
 DIST ghc-8.8.4-testsuite.tar.xz 1965820 BLAKE2B 3b715700561788b8abdc986961d533b91399461d57a1686ededb4ccc36881503cdc3fc126b9a7b204a728c24b9a9ca97320142348644367aca9b47c87a5b3b51 SHA512 79d8fb0ba8de0fb48c938bd54c8c3278f1895d8ce5c700ce8cf6b3fc550073bb757208e85d4f9818400ebecca96f51d9248b8bbdac9eb2995671756164d08c16
-DIST ghc-9.0.1-src.tar.xz 20782336 BLAKE2B 53eaf903081d705d641459fbc1e6fa7387a6039f9cd466b4708bda86e81252a84d80878d6eb956ec2e1e5b721a313e68eeb796f8345244ca62f536a7a3f0c6df SHA512 bee7950a5118be8d8cefe0db5070139a5a93ca21c5bc6f8bf453429831f0c44f5e0fb5ee569865d6b8b92749044ee4123be06920928ac7a1ec9cffa9404a3e53
-DIST ghc-9.0.1-testsuite.tar.xz 2322432 BLAKE2B 350df763c607dd89ba58ad6e856d815556159a9f088dc0b069de48ae87c1e874a45fad51159e65a3c9a9beed68602eeb2a2728dbce86277bd287455f46f6c53a SHA512 13fbe0f0ab5e2426820d0fb37f0a75e1198ef2a660398508806e8ef094fd23647ca3d386815a2118168d12253d8df3273043678dbb37cf3924c689dd0fd1932e
 DIST ghc-9.0.2-src.tar.xz 27270396 BLAKE2B 0a73d910d3ef11161f895849025fe37ce231932f7cde441fdf620cf8c51678060a804467879eb0ee5c0a30413604c56e28e2aa1cde01e45c620b76987d9c0c0e SHA512 32994c7d2b8f47bae604cd825bfcf9c788d79ce26d1d5f58bd73a7093e11ae6c3c17b31dc0c9e454dbf67ca169b942f92213c388d615768cae86055bf6094dee
 DIST ghc-9.0.2-testsuite.tar.xz 2403564 BLAKE2B 0e7f6fefb9c972f94073aca8b15147913ffa8d3cd3ff7fc63ef7e20b4efd8b443cf21f12e1ab0f5044790f6d8af6cf7788bda85a21b2f356ddface86eb896670 SHA512 b2375500ae837d74af8085d099899b5a7a589c59bdcc033ca0bd6e00f33c4f8d90b481e0c7c3de113e607fcfafdfe8edde4713e6d242b2d4ee87df2eb960c9c7
 DIST ghc-bin-8.10.4-i686-pc-linux-gnu.tbz2 123831294 BLAKE2B 1ca4c1b5c34c948011049a73d409c741db89658d10e311cffbe464c631c3733278fc7dede6ad27474832295ded2c26fd4d6419c760505255e29f7cb232a670a4 SHA512 1f87cf63651f7c0e5f7f55d1f4d7d7c48b0a911cc6673a899d4b92190d765b359f9c7d73c329969c1b76f1af102b7e2c18a80382c81d5dade9ac7dd57de4ef65
 DIST ghc-bin-8.10.4-x86_64-pc-linux-gnu.tbz2 122558873 BLAKE2B 9f07c7bdc3beccfa629d28b2524ccd2f4688a5c0036a45408f5ace2d530a2a0e42f95b3cda5037ebb365317999e1ae776c6f9d21692867abfe85e33f2892b1be SHA512 68bd70f94961547746a696aa2839e156c95858fda0c7ec5b2ecf802070724ab7102b0aa86bcbf93432170d521cce4af10f46b851b470e5dc49dfa5b07380f46d
-DIST ghc-bin-8.10.5-i686-pc-linux-gnu.tbz2 124356781 BLAKE2B 53c5d259a19f11db83d69f7a2f39090d623b07caf1859eb8bf0385183586f538d8eb3eadb06f56f4b7160fa82043eb0f7b8df1632d55af562b8b1cb21c08b4c3 SHA512 58676b4eaeef9e05f69b7c821e115f3a678487b0de696e702ff6378f7d8f23fafda997b0c19d52a730c22bf8012a99c01783d16d00e356fe12532156d5965fc6
-DIST ghc-bin-8.10.5-x86_64-pc-linux-gnu.tbz2 123186918 BLAKE2B 5049514a7c2c58e7f5c929cfb9e818cdc20280f4fc002350cf0cc19f410eb4d4be4d0b46db88205633fde73151e322f3cabd050a9c07e05ccae168c7e6be8be9 SHA512 3a8ef5f0c259ad86adc6a7a5718db419fb0e38a5d1e0bdcc8676e44d1a0130a4b25658ab23572e4e860307b024409da021e08b038fac64a773437c23519b1d0a
 DIST ghc-bin-8.10.6-i686-pc-linux-gnu.tbz2 124324289 BLAKE2B afb34984872b35fdedbdedeb8756cc7c33e5b943dba57dd86910b076d483bb643265d0ab0027784dec5dc489eabd65b5ab17474f25fb2ce657925aa0efaa9033 SHA512 4be13e6dba298d12a4d49ae4633eec83cfaaaf22b5f8cfca5f5952aa294ae52fb3601490beed3bda5a7f7b6a5bd81e0ecc9fc39e8df836cc8fd377a0d0b783a0
 DIST ghc-bin-8.10.6-x86_64-pc-linux-gnu.tbz2 122871118 BLAKE2B 527b36abf60390c91f91bc650ee25484d39d377739da87b5b6fd1a752705c1f3bc0ce0c68644657c9a7c1fc9a3b858b9dd7d84b25eab1a89125fccb6eb1f6250 SHA512 42b7fae339e82a6078fae8920efea8d0992e4774ea66b100e22dd9df168be57d8bce52558b8501c3c567c40776389d94bde3f17d26d63535140ce26ac16c27e1
 DIST ghc-bin-8.8.4-i686-pc-linux-gnu.tbz2 120336081 BLAKE2B 55dfbb90d5e55c2af5e93c69249828a85cd9171c164b80dfdaf86512972b2c6854c8e4f07426af4ab52a5fb1a85d96a58c2cf003fb02372c55428001cfaea491 SHA512 ad3b83344349976d3253934195b2dc6299648391572b13735943c5ea2239c031c19b0cafd86c16cfb0c061e73bc72e9248f9c1731494a9a15fbe188f02913c12
 DIST ghc-bin-8.8.4-x86_64-pc-linux-gnu.tbz2 118897883 BLAKE2B a180b2dd1a3bc222044ece809ad700aee29d0c3e75b57ee9af3ca33c9c0f59dbf36f68202f746d99f80915cb717a9c41fc12db507f1cb469981732703a06b9cc SHA512 9d4be02dbd9704c93ef18feb92ea30bd5d590df31f288bf1b364818424c5019ca9ada26eec88418199f90ae8f4459d0a9352104e3f3186bbdc241891eb1b66c4
-DIST ghc-bin-9.0.1-i686-pc-linux-gnu.tbz2 122955511 BLAKE2B b870f46cc78fcc1d715aafe7108951582cfd12495b4e9d804d4b66562c66a6a2b2d9513031aedc8f3630a0cdbb3257943304b05732301a084f89487452f2f2d9 SHA512 aafd4233c40f93b71e6ac1acc8a75e30d49b826e4bce6d9832836966fd5f6c4898963bd4c2f34577f4199c1d9a3f537ac1e7d87eab11e9fb5e849573580ed3fb
-DIST ghc-bin-9.0.1-x86_64-pc-linux-gnu.tbz2 121542968 BLAKE2B 837870e68138f8d97dc8b2aae90090cf02416628602ca4ba4417ac92b49155f10028b05ac465665b8872b32372a5cee075616983f2eacdebb0188bd2ce6a93d2 SHA512 0e8c6d2e6f32fac95588f7323a4e02dddfc9ec2476a82b97bf5a106d3810f7e638fda7124c53b5bbc563fce70f4436553c282d8ea2f1f5fdf4fcccfb15a2b079
 DIST ghc-bin-9.0.2-i686-pc-linux-gnu.tbz2 123509908 BLAKE2B 45614984803a7bfa266f99d4adb4b5f2ab7b9e5e89c6ecd501296fc99a1d96e798ccb9c832f8dcb15fff9725beb918a7b63e62ff13f59b6506a2ef17930c45d2 SHA512 e0b7f4474c16f0763a2f787027fbdfeb3125b48c987fa1196bc189fefad9f0bfa2806da62af46d61ca911f5275b578076e2b326acf39e0894a8daa9deda0843a
 DIST ghc-bin-9.0.2-powerpc64le-unknown-linux-gnu.tar.gz 275228045 BLAKE2B d1c68d8396d675f5d4f3712b2ed5bc3c328a4304f9ae4441be586d24eaf3e7d34c36c6cd3bc4d85def3647919a44c3d97cf9199b43c158e3dcc6a304cfb9220b SHA512 2a277eb854b33d7361b5d93dee2747f81fc93dcc08bb3579d6706634313352675a15429eec0b6f4f19a8bd36e8f51f1c09729a2bf4a3bba34ba35dcf2b37f4e0
 DIST ghc-bin-9.0.2-x86_64-pc-linux-gnu.tbz2 121536759 BLAKE2B 4433e2d266f065d2b2944b711d622ec26288a2187ac03562257a671744b44da35110ce16ac6d76f7062a563488885326be073e0ff03c7e48250051c3b4763d96 SHA512 2de29a9ddbfd0fac797cdd628f3657ff38e6a153151849508bba75d36f84394ed77750435ff5cc1bdfcd30ef2b6e009bde965bd0a83e0496b5027239642f4b6c

diff --git a/dev-lang/ghc/ghc-8.10.5-r1.ebuild b/dev-lang/ghc/ghc-8.10.5-r1.ebuild
deleted file mode 100644
index a1e43281dd4c..000000000000
--- a/dev-lang/ghc/ghc-8.10.5-r1.ebuild
+++ /dev/null
@@ -1,811 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-PYTHON_COMPAT=( python3_{7..10} )
-inherit python-any-r1
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-BIN_PV=${PV}
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		#arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		#ppc64)
-		#	use big-endian && return 0
-		#	return 0
-		#	;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.10.0.20200123 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
-	https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-src.tar.xz
-	test? ( https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS=""
-IUSE="big-endian +doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-IUSE+=" binary"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	dev-libs/gmp:0=
-	sys-libs/ncurses:=[unicode(+)]
-	elfutils? ( dev-libs/elfutils )
-	!ghcmakebinary? ( dev-libs/libffi:= )
-	numa? ( sys-process/numactl )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}"
-BDEPEND="
-	virtual/pkgconfig
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		dev-python/sphinx
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )
-	test? ( ${PYTHON_DEPS} )
-"
-
-needs_python() {
-	# test driver is written in python
-	use test && return 0
-	return 1
-}
-
-# we build binaries without profiling support
-REQUIRED_USE="
-	?? ( ghcbootstrap binary )
-	?? ( profile binary )
-"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
-	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-if ! is_crosscompile; then
-	PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-fi
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
-	if ! is_native; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
-	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
-	# options to gcc.
-	if is_native; then
-		# prevent from failing to build unregisterised ghc:
-		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	fi
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1 ghc_v=${BIN_PV}
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
-	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/hp2ps" \
-		"${WORKDIR}/usr/bin/hpc" \
-		"${WORKDIR}/usr/bin/hsc2hs" \
-		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-ghc-check-reqs() {
-	# These are pessimistic values (slightly bigger than worst-case)
-	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
-	# numbers on various arches.
-	CHECKREQS_DISK_BUILD=8G
-	CHECKREQS_DISK_USR=2G
-	# USE=binary roughly takes
-	use binary && CHECKREQS_DISK_BUILD=4G
-
-	"$@"
-}
-
-pkg_pretend() {
-	ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	ghc-check-reqs check-reqs_pkg_setup
-
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-
-	if needs_python; then
-		python-any-r1_pkg_setup
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
-	esac
-	unpack ${ONLYA}
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-		eapply_user
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# many arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise eapply will break
-
-		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
-		eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch
-		eapply "${FILESDIR}"/${PN}-8.10.4-sphinx-quote.patch
-
-		# a bunch of crosscompiler patches
-		# needs newer version:
-		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
-		# mingw32 target
-		pushd "${S}/libraries/Win32"
-			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
-		popd
-
-		bump_libs
-
-		eapply_user
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${PF}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${PF}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-		# Speed up initial Cabal bootstrap
-		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
-		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# not used outside of ghc's test
-		if [[ -n ${GHC_BUILD_DPH} ]]; then
-				echo "BUILD_DPH = YES" >> mk/build.mk
-			else
-				echo "BUILD_DPH = NO" >> mk/build.mk
-		fi
-
-		# Any non-native build has to skip as it needs
-		# target haddock binary to be runnabine.
-		if ! is_native; then
-			# disable docs generation as it requires running stage2
-			echo "HADDOCK_DOCS=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
-		fi
-
-		if is_crosscompile; then
-			# Install ghc-stage1 crosscompiler instead of
-			# ghc-stage2 cross-built compiler.
-			echo "Stage1Only=YES" >> mk/build.mk
-		fi
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds toolchain it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		# User can use EXTRA_ECONF=CC=... to override this default.
-		econf_args+=(
-			AR=${CTARGET}-ar
-			CC=${CTARGET}-gcc
-			# these should be inferred by GHC but ghc defaults
-			# to using bundled tools on windows.
-			Windres=${CTARGET}-windres
-			DllWrap=${CTARGET}-dllwrap
-			# we set the linker explicitly below
-			--disable-ld-override
-		)
-		case ${CTARGET} in
-			arm*)
-				# ld.bfd-2.28 does not work for ghc. Force ld.gold
-				# instead. This should be removed once gentoo gets
-				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
-				econf_args+=(LD=${CTARGET}-ld.gold)
-			;;
-			sparc*)
-				# ld.gold-2.28 does not work for ghc. Force ld.bfd
-				# instead. This should be removed once gentoo gets
-				# a fix for missing --no-relax support bug:
-				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
-				econf_args+=(LD=${CTARGET}-ld.bfd)
-			;;
-			*)
-				econf_args+=(LD=${CTARGET}-ld)
-		esac
-
-		if [[ ${CBUILD} != ${CHOST} ]]; then
-			# GHC bug: ghc claims not to support cross-building.
-			# It does, but does not distinct --host= value
-			# for stage1 and stage2 compiler.
-			econf_args+=(--host=${CBUILD})
-		fi
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		elif is_native; then
-			# using ${GTARGET}'s libffi is not supported yet:
-			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		einfo "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} \
-			--enable-bootstrap-with-devel-snapshot \
-			$(use_enable elfutils dwarf-unwind) \
-			$(use_enable numa)
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# Stage1Only crosscompiler does not build stage2
-		if ! is_crosscompile; then
-			# 1. build/pax-mark compiler binary first
-			emake ghc/stage2/build/tmp/ghc-stage2
-			# 2. pax-mark (bug #516430)
-			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-			# 2. build/pax-mark haddock using ghc-stage2
-			if is_native; then
-				# non-native build does not build haddock
-				# due to HADDOCK_DOCS=NO, but it could.
-				emake utils/haddock/dist/build/tmp/haddock
-				pax-mark -m utils/haddock/dist/build/tmp/haddock
-			fi
-		fi
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_test() {
-	# TODO: deal with:
-	#    - sandbox (pollutes environment)
-	#    - extra packages (to extend testsuite coverage)
-	# bits are taken from 'validate'
-	local make_test_target='test' # can be fulltest
-	# not 'emake' as testsuite uses '$MAKE' without jobserver available
-	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-		[[ -f VERSION ]] || emake VERSION
-
-		# -j1 due to a rare race in install script:
-		#    make --no-print-directory -f ghc.mk phase=final install
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
-		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
-		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
-		#    /usr/bin/install: cannot create regular file \
-		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
-		emake -j1 install DESTDIR="${D}"
-
-		# Skip for cross-targets as they all share target location:
-		# /usr/share/doc/ghc-9999/
-		if ! is_crosscompile; then
-			dodoc "distrib/README" "LICENSE" "VERSION"
-		fi
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-
-	if is_crosscompile; then
-		# When we build a cross-compiler the layout is the following:
-		#     usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
-		# but
-		#     usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
-		# containst host binaries (modulo bugs).
-
-		# Portage's stripping mechanism does not skip stripping
-		# foreign binaries. This frequently causes binaries to be
-		# broken.
-		#
-		# Thus below we disable stripping of target libraries and allow
-		# stripping hosts executables.
-		dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
-		dostrip    "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
-	fi
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}

diff --git a/dev-lang/ghc/ghc-9.0.1-r1.ebuild b/dev-lang/ghc/ghc-9.0.1-r1.ebuild
deleted file mode 100644
index 6f15fc21247a..000000000000
--- a/dev-lang/ghc/ghc-9.0.1-r1.ebuild
+++ /dev/null
@@ -1,811 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-PYTHON_COMPAT=( python3_{7..10} )
-inherit python-any-r1
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-BIN_PV=${PV}
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		#arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		#ppc64)
-		#	use big-endian && return 0
-		#	return 0
-		#	;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.10.0.20200123 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
-	https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-src.tar.xz
-	test? ( https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS=""
-IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-IUSE+=" binary"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	dev-libs/gmp:0=
-	sys-libs/ncurses:=[unicode(+)]
-	elfutils? ( dev-libs/elfutils )
-	!ghcmakebinary? ( dev-libs/libffi:= )
-	numa? ( sys-process/numactl )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}"
-BDEPEND="
-	virtual/pkgconfig
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		dev-python/sphinx
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )
-	test? ( ${PYTHON_DEPS} )
-"
-
-needs_python() {
-	# test driver is written in python
-	use test && return 0
-	return 1
-}
-
-# we build binaries without profiling support
-REQUIRED_USE="
-	?? ( ghcbootstrap binary )
-	?? ( profile binary )
-"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
-	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-if ! is_crosscompile; then
-	PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-fi
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
-	if ! is_native; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
-	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
-	# options to gcc.
-	if is_native; then
-		# prevent from failing to build unregisterised ghc:
-		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	fi
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1 ghc_v=${BIN_PV}
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
-	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/hp2ps" \
-		"${WORKDIR}/usr/bin/hpc" \
-		"${WORKDIR}/usr/bin/hsc2hs" \
-		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-ghc-check-reqs() {
-	# These are pessimistic values (slightly bigger than worst-case)
-	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
-	# numbers on various arches.
-	CHECKREQS_DISK_BUILD=8G
-	CHECKREQS_DISK_USR=2G
-	# USE=binary roughly takes
-	use binary && CHECKREQS_DISK_BUILD=4G
-
-	"$@"
-}
-
-pkg_pretend() {
-	ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	ghc-check-reqs check-reqs_pkg_setup
-
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-
-	if needs_python; then
-		python-any-r1_pkg_setup
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
-	esac
-	unpack ${ONLYA}
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-		eapply_user
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# many arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise eapply will break
-
-		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-		#needs a port?
-		#eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
-		eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch
-		eapply "${FILESDIR}"/${PN}-8.10.3-C99-typo-ac270.patch
-
-		# a bunch of crosscompiler patches
-		# needs newer version:
-		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
-		# mingw32 target
-		pushd "${S}/libraries/Win32"
-			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
-		popd
-
-		bump_libs
-
-		eapply_user
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${PF}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${PF}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-		# Speed up initial Cabal bootstrap
-		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
-		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# not used outside of ghc's test
-		if [[ -n ${GHC_BUILD_DPH} ]]; then
-				echo "BUILD_DPH = YES" >> mk/build.mk
-			else
-				echo "BUILD_DPH = NO" >> mk/build.mk
-		fi
-
-		# Any non-native build has to skip as it needs
-		# target haddock binary to be runnabine.
-		if ! is_native; then
-			# disable docs generation as it requires running stage2
-			echo "HADDOCK_DOCS=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
-		fi
-
-		if is_crosscompile; then
-			# Install ghc-stage1 crosscompiler instead of
-			# ghc-stage2 cross-built compiler.
-			echo "Stage1Only=YES" >> mk/build.mk
-		fi
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds toolchain it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		# User can use EXTRA_ECONF=CC=... to override this default.
-		econf_args+=(
-			AR=${CTARGET}-ar
-			CC=${CTARGET}-gcc
-			# these should be inferred by GHC but ghc defaults
-			# to using bundled tools on windows.
-			Windres=${CTARGET}-windres
-			DllWrap=${CTARGET}-dllwrap
-			# we set the linker explicitly below
-			--disable-ld-override
-		)
-		case ${CTARGET} in
-			arm*)
-				# ld.bfd-2.28 does not work for ghc. Force ld.gold
-				# instead. This should be removed once gentoo gets
-				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
-				econf_args+=(LD=${CTARGET}-ld.gold)
-			;;
-			sparc*)
-				# ld.gold-2.28 does not work for ghc. Force ld.bfd
-				# instead. This should be removed once gentoo gets
-				# a fix for missing --no-relax support bug:
-				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
-				econf_args+=(LD=${CTARGET}-ld.bfd)
-			;;
-			*)
-				econf_args+=(LD=${CTARGET}-ld)
-		esac
-
-		if [[ ${CBUILD} != ${CHOST} ]]; then
-			# GHC bug: ghc claims not to support cross-building.
-			# It does, but does not distinct --host= value
-			# for stage1 and stage2 compiler.
-			econf_args+=(--host=${CBUILD})
-		fi
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		elif is_native; then
-			# using ${GTARGET}'s libffi is not supported yet:
-			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		einfo "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} \
-			--enable-bootstrap-with-devel-snapshot \
-			$(use_enable elfutils dwarf-unwind) \
-			$(use_enable numa)
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# Stage1Only crosscompiler does not build stage2
-		if ! is_crosscompile; then
-			# 1. build/pax-mark compiler binary first
-			emake ghc/stage2/build/tmp/ghc-stage2
-			# 2. pax-mark (bug #516430)
-			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-			# 2. build/pax-mark haddock using ghc-stage2
-			if is_native; then
-				# non-native build does not build haddock
-				# due to HADDOCK_DOCS=NO, but it could.
-				emake utils/haddock/dist/build/tmp/haddock
-				pax-mark -m utils/haddock/dist/build/tmp/haddock
-			fi
-		fi
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_test() {
-	# TODO: deal with:
-	#    - sandbox (pollutes environment)
-	#    - extra packages (to extend testsuite coverage)
-	# bits are taken from 'validate'
-	local make_test_target='test' # can be fulltest
-	# not 'emake' as testsuite uses '$MAKE' without jobserver available
-	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-		[[ -f VERSION ]] || emake VERSION
-
-		# -j1 due to a rare race in install script:
-		#    make --no-print-directory -f ghc.mk phase=final install
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
-		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
-		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
-		#    /usr/bin/install: cannot create regular file \
-		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
-		emake -j1 install DESTDIR="${D}"
-
-		# Skip for cross-targets as they all share target location:
-		# /usr/share/doc/ghc-9999/
-		if ! is_crosscompile; then
-			dodoc "distrib/README" "LICENSE" "VERSION"
-		fi
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-
-	if is_crosscompile; then
-		# When we build a cross-compiler the layout is the following:
-		#     usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
-		# but
-		#     usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
-		# containst host binaries (modulo bugs).
-
-		# Portage's stripping mechanism does not skip stripping
-		# foreign binaries. This frequently causes binaries to be
-		# broken.
-		#
-		# Thus below we disable stripping of target libraries and allow
-		# stripping hosts executables.
-		dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
-		dostrip    "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
-	fi
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2022-07-29  2:33 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2022-07-29  2:33 UTC (permalink / raw
  To: gentoo-commits

commit:     90db2e94f8740bdae9ccfcb1cb8e4b2014c9274e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 29 02:28:03 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul 29 02:32:48 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90db2e94

dev-lang/ghc: add github upstream metadata

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/metadata.xml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dev-lang/ghc/metadata.xml b/dev-lang/ghc/metadata.xml
index ff7d215d932e..eaaa78bf4cf7 100644
--- a/dev-lang/ghc/metadata.xml
+++ b/dev-lang/ghc/metadata.xml
@@ -13,4 +13,7 @@
 		<flag name="gmp">Use <pkg>dev-libs/gmp</pkg> for integer operations (works faster, but an external depend).</flag>
 		<flag name="numa">Enable NUMA thread balancing policy using <pkg>sys-process/numactl</pkg>.</flag>
 	</use>
+	<upstream>
+		<remote-id type="github">ghc/ghc</remote-id>
+	</upstream>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2022-07-30  9:20 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2022-07-30  9:20 UTC (permalink / raw
  To: gentoo-commits

commit:     f1a9b0bc9d6758d6dd960610a65019022deb04aa
Author:     Jaak Ristioja <jaak <AT> ristioja <DOT> ee>
AuthorDate: Thu Jul 28 22:02:58 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jul 30 09:20:26 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1a9b0bc

dev-lang/ghc: Fixed symlink creation to non-existent directory

[sam: USE=ghcbootstrap as noted by stikonas]

Closes: https://bugs.gentoo.org/860276
Signed-off-by: Jaak Ristioja <jaak <AT> ristioja.ee>
Closes: https://github.com/gentoo/gentoo/pull/26640
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/ghc-9.0.2.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dev-lang/ghc/ghc-9.0.2.ebuild b/dev-lang/ghc/ghc-9.0.2.ebuild
index 49acb75d8338..e943844a1b69 100644
--- a/dev-lang/ghc/ghc-9.0.2.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2.ebuild
@@ -424,6 +424,7 @@ src_prepare() {
 	# ffi headers don't get included in the binpkg for some reason
 	for f in "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/include/"{ffi.h,ffitarget.h}
 	do
+		mkdir -p "$(dirname "${f}")"
 		[[ -e "${f}" ]] || ln -sf "$($(tc-getPKG_CONFIG) --cflags-only-I libffi | sed "s/-I//g" | tr -d " ")/$(basename "${f}")" "${f}" || die
 	done
 


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2022-08-14 21:31 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2022-08-14 21:31 UTC (permalink / raw
  To: gentoo-commits

commit:     837268c60ea049af38f60219cb8361fb066e4df5
Author:     matoro <matoro <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Sun Aug 14 21:10:37 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Aug 14 21:31:14 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=837268c6

dev-lang/ghc: sync 8.10.6 from ::haskell

Closes: https://github.com/gentoo/gentoo/pull/26864
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/ghc-8.10.6.ebuild | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/dev-lang/ghc/ghc-8.10.6.ebuild b/dev-lang/ghc/ghc-8.10.6.ebuild
index 1464a3e0dd6c..e1df48a3cd92 100644
--- a/dev-lang/ghc/ghc-8.10.6.ebuild
+++ b/dev-lang/ghc/ghc-8.10.6.ebuild
@@ -13,7 +13,7 @@ if [[ ${CTARGET} = ${CHOST} ]] ; then
 	fi
 fi
 
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
 inherit python-any-r1
 inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib multiprocessing pax-utils toolchain-funcs prefix
@@ -37,6 +37,9 @@ arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/g
 #arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
 arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
 # 0 - yet
 yet_binary() {
 	case "${ARCH}" in
@@ -74,7 +77,7 @@ BUMP_LIBRARIES=(
 
 LICENSE="BSD"
 SLOT="0/${PV}"
-#KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~x86"
 IUSE="big-endian +doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
 IUSE+=" binary"
 RESTRICT="!test? ( test )"
@@ -408,6 +411,11 @@ src_unpack() {
 }
 
 src_prepare() {
+	# Force the use of C.utf8 locale
+	# <https://github.com/gentoo-haskell/gentoo-haskell/issues/1287>
+	# <https://github.com/gentoo-haskell/gentoo-haskell/issues/1289>
+	export LC_ALL=C.utf8
+
 	ghc_setup_cflags
 
 	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2022-08-31 21:49 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2022-08-31 21:49 UTC (permalink / raw
  To: gentoo-commits

commit:     aa9d13ef6a2f77c7a7e7e16d0723d378b6c3eafe
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 31 21:48:09 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Aug 31 21:48:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa9d13ef

dev-lang/ghc: cleanup obsolete LLVM slots; conditionalise llvm_pkg_setup call

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/ghc-9.0.2.ebuild | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/dev-lang/ghc/ghc-9.0.2.ebuild b/dev-lang/ghc/ghc-9.0.2.ebuild
index d3bdecd30539..dc0d530b0785 100644
--- a/dev-lang/ghc/ghc-9.0.2.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2.ebuild
@@ -90,12 +90,8 @@ RDEPEND="
 	!ghcmakebinary? ( dev-libs/libffi:= )
 	numa? ( sys-process/numactl )
 	llvm? (
-		<sys-devel/llvm-$(("${LLVM_MAX_SLOT}" + 1)):=
+		<sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):=
 		|| (
-			sys-devel/llvm:9
-			sys-devel/llvm:10
-			sys-devel/llvm:11
-			sys-devel/llvm:12
 			sys-devel/llvm:13
 		)
 	)
@@ -406,7 +402,7 @@ pkg_setup() {
 		python-any-r1_pkg_setup
 	fi
 
-	llvm_pkg_setup
+	use llvm && llvm_pkg_setup
 }
 
 src_unpack() {


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2022-10-04 15:34 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2022-10-04 15:34 UTC (permalink / raw
  To: gentoo-commits

commit:     932d457a38d87a79a4ebcd74ba7d9ebe2b3cfe92
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  4 15:16:38 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct  4 15:34:39 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=932d457a

dev-lang/ghc: drop eutils

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/ghc-8.10.6.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-lang/ghc/ghc-8.10.6.ebuild b/dev-lang/ghc/ghc-8.10.6.ebuild
index e1df48a3cd92..cee8a725c06a 100644
--- a/dev-lang/ghc/ghc-8.10.6.ebuild
+++ b/dev-lang/ghc/ghc-8.10.6.ebuild
@@ -15,7 +15,7 @@ fi
 
 PYTHON_COMPAT=( python3_{8..10} )
 inherit python-any-r1
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit autotools bash-completion-r1 flag-o-matic ghc-package
 inherit multilib multiprocessing pax-utils toolchain-funcs prefix
 inherit check-reqs
 DESCRIPTION="The Glasgow Haskell Compiler"


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2022-10-15  0:57 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2022-10-15  0:57 UTC (permalink / raw
  To: gentoo-commits

commit:     dd0927e086d7352675d44ff37500805143f3d380
Author:     Jack Todaro <solpeth <AT> posteo <DOT> org>
AuthorDate: Sat Oct  1 23:44:43 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 15 00:56:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd0927e0

dev-lang/ghc: update bootstrap binary

Updated bootstrap binary has been built with the upstream
ModOrigin patch applied, as is applied when building ghc
using default USE flags.

This should resolve compilation issues for USE=binary users.

Closes: https://bugs.gentoo.org/843968
Signed-off-by: Jack Todaro <solpeth <AT> posteo.org>
Closes: https://github.com/gentoo/gentoo/pull/27565
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/Manifest         | 2 +-
 dev-lang/ghc/ghc-9.0.2.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 936403504661..f3d895e800a6 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -10,4 +10,4 @@ DIST ghc-bin-9.0.2-i686-pc-linux-gnu.tbz2 123509908 BLAKE2B 45614984803a7bfa266f
 DIST ghc-bin-9.0.2-powerpc64-unknown-linux-gnu.tar.gz 235636284 BLAKE2B 878ac300cca5d2cbc5cb21dbb347da755b4027cbf63ec77464740854fa8010569de5e03acef67cd877da13665c906b2fd04e24e226e9eb39b57ba979093c732b SHA512 28f096e965abdac9cc370c882639f10285b9073ba5332f7af215eccff948e41c01c3d6bb3bc8e3b4e809e12867a95b49f82dd76e0090b974088f75ab9d1bc199
 DIST ghc-bin-9.0.2-powerpc64le-unknown-linux-gnu.tar.gz 275226316 BLAKE2B 10ade2359432b0ede7431ee543f0ff47f4b203465d81719da579ad63ca467359eb9fcf7336a12feb6ff75a480f349576ff8ea1b4ebe1094fff228ae4fd00d6e0 SHA512 64b4c84d149358b8d3a6cb29a6d3a75af11e7b14e6d910c9789c9949262e4ed2a17f8a0d1e5dd297121957061fe2395d6f43acae6b4ab28851e3cd414cd9c89c
 DIST ghc-bin-9.0.2-riscv64-unknown-linux-gnu.tar.gz 313475807 BLAKE2B a5e1bbd4630eaff63dd01d79fdcb26a663771c0241d3211aa3a0033cb58addbe8e696177500ac06ae727fc645bfc6f16a3df763a6a0ae039b8823bcbfb9918bb SHA512 5e462f6f9d3f3507b3e09230729faa2a3e1fa92a8024fac602d75b804fff25f27e335871658f4b7b2c671f9e066373ca0285720da315a6c22f6f2c9c3cfea927
-DIST ghc-bin-9.0.2-x86_64-pc-linux-gnu.tbz2 121536759 BLAKE2B 4433e2d266f065d2b2944b711d622ec26288a2187ac03562257a671744b44da35110ce16ac6d76f7062a563488885326be073e0ff03c7e48250051c3b4763d96 SHA512 2de29a9ddbfd0fac797cdd628f3657ff38e6a153151849508bba75d36f84394ed77750435ff5cc1bdfcd30ef2b6e009bde965bd0a83e0496b5027239642f4b6c
+DIST ghc-bin-9.0.2-x86_64-pc-linux-gnu-r1.tbz2 121347519 BLAKE2B 6bd41cdb8ba1661735e46df4709888e6461cff969678716c82681a0a0b0e8d0a32532a070f52efb0ab99ca126207998e8883d01902071e797a7a0f19881d5925 SHA512 c7de43577fd97e6fbde7bbffba4e1d2b83cdda405cff46f95c9eff23260542b426091d8dba75605d81ed41740a793a409e7448538e5adc7a391a901f20e8f2e4

diff --git a/dev-lang/ghc/ghc-9.0.2.ebuild b/dev-lang/ghc/ghc-9.0.2.ebuild
index cadfe300318d..faea36c1c7ba 100644
--- a/dev-lang/ghc/ghc-9.0.2.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2.ebuild
@@ -29,7 +29,7 @@ BIN_PV=${PV}
 #arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
 #arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
 arch_binaries="$arch_binaries arm64? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tar.gz )"
-arch_binaries="$arch_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-gnu-r1.tbz2 )"
 #arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
 arch_binaries="$arch_binaries ppc64? (


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2022-11-25 21:57 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2022-11-25 21:57 UTC (permalink / raw
  To: gentoo-commits

commit:     e01e360c6d4d1fa5311440a558e55ca2ed9b3791
Author:     Jack Todaro <solpeth <AT> posteo <DOT> org>
AuthorDate: Fri Nov 25 20:38:58 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Nov 25 21:56:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e01e360c

dev-lang/ghc: drop 8.10.6

Signed-off-by: Jack Todaro <solpeth <AT> posteo.org>
Closes: https://github.com/gentoo/gentoo/pull/28394
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/ghc-8.10.6.ebuild | 819 -----------------------------------------
 1 file changed, 819 deletions(-)

diff --git a/dev-lang/ghc/ghc-8.10.6.ebuild b/dev-lang/ghc/ghc-8.10.6.ebuild
deleted file mode 100644
index cee8a725c06a..000000000000
--- a/dev-lang/ghc/ghc-8.10.6.ebuild
+++ /dev/null
@@ -1,819 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit python-any-r1
-inherit autotools bash-completion-r1 flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-BIN_PV=${PV}
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		#arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		#ppc64)
-		#	use big-endian && return 0
-		#	return 0
-		#	;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.10.0.20200123 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
-	https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-src.tar.xz
-	test? ( https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS="~amd64 ~x86"
-IUSE="big-endian +doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-IUSE+=" binary"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	dev-libs/gmp:0=
-	sys-libs/ncurses:=[unicode(+)]
-	elfutils? ( dev-libs/elfutils )
-	!ghcmakebinary? ( dev-libs/libffi:= )
-	numa? ( sys-process/numactl )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}"
-BDEPEND="
-	virtual/pkgconfig
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		dev-python/sphinx
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )
-	test? ( ${PYTHON_DEPS} )
-"
-
-needs_python() {
-	# test driver is written in python
-	use test && return 0
-	return 1
-}
-
-# we build binaries without profiling support
-REQUIRED_USE="
-	?? ( ghcbootstrap binary )
-	?? ( profile binary )
-"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
-	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-if ! is_crosscompile; then
-	PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-fi
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
-	if ! is_native; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-
-	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
-	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
-	# options to gcc.
-	if is_native; then
-		# prevent from failing to build unregisterised ghc:
-		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	fi
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1 ghc_v=${BIN_PV}
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
-	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/hp2ps" \
-		"${WORKDIR}/usr/bin/hpc" \
-		"${WORKDIR}/usr/bin/hsc2hs" \
-		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-ghc-check-reqs() {
-	# These are pessimistic values (slightly bigger than worst-case)
-	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
-	# numbers on various arches.
-	CHECKREQS_DISK_BUILD=8G
-	CHECKREQS_DISK_USR=2G
-	# USE=binary roughly takes
-	use binary && CHECKREQS_DISK_BUILD=4G
-
-	"$@"
-}
-
-pkg_pretend() {
-	ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	ghc-check-reqs check-reqs_pkg_setup
-
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-
-	if needs_python; then
-		python-any-r1_pkg_setup
-	fi
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
-	esac
-	unpack ${ONLYA}
-}
-
-src_prepare() {
-	# Force the use of C.utf8 locale
-	# <https://github.com/gentoo-haskell/gentoo-haskell/issues/1287>
-	# <https://github.com/gentoo-haskell/gentoo-haskell/issues/1289>
-	export LC_ALL=C.utf8
-
-	ghc_setup_cflags
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
-	fi
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-		eapply_user
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# many arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise eapply will break
-
-		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
-		eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch
-		eapply "${FILESDIR}"/${PN}-8.10.5-modorigin-verbose-conflict.patch
-
-		# a bunch of crosscompiler patches
-		# needs newer version:
-		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
-		# mingw32 target
-		pushd "${S}/libraries/Win32"
-			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
-		popd
-
-		bump_libs
-
-		eapply_user
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${PF}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${PF}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-		# Speed up initial Cabal bootstrap
-		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
-		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# not used outside of ghc's test
-		if [[ -n ${GHC_BUILD_DPH} ]]; then
-				echo "BUILD_DPH = YES" >> mk/build.mk
-			else
-				echo "BUILD_DPH = NO" >> mk/build.mk
-		fi
-
-		# Any non-native build has to skip as it needs
-		# target haddock binary to be runnabine.
-		if ! is_native; then
-			# disable docs generation as it requires running stage2
-			echo "HADDOCK_DOCS=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
-		fi
-
-		if is_crosscompile; then
-			# Install ghc-stage1 crosscompiler instead of
-			# ghc-stage2 cross-built compiler.
-			echo "Stage1Only=YES" >> mk/build.mk
-		fi
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds toolchain it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		# User can use EXTRA_ECONF=CC=... to override this default.
-		econf_args+=(
-			AR=${CTARGET}-ar
-			CC=${CTARGET}-gcc
-			# these should be inferred by GHC but ghc defaults
-			# to using bundled tools on windows.
-			Windres=${CTARGET}-windres
-			DllWrap=${CTARGET}-dllwrap
-			# we set the linker explicitly below
-			--disable-ld-override
-		)
-		case ${CTARGET} in
-			arm*)
-				# ld.bfd-2.28 does not work for ghc. Force ld.gold
-				# instead. This should be removed once gentoo gets
-				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
-				econf_args+=(LD=${CTARGET}-ld.gold)
-			;;
-			sparc*)
-				# ld.gold-2.28 does not work for ghc. Force ld.bfd
-				# instead. This should be removed once gentoo gets
-				# a fix for missing --no-relax support bug:
-				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
-				econf_args+=(LD=${CTARGET}-ld.bfd)
-			;;
-			*)
-				econf_args+=(LD=${CTARGET}-ld)
-		esac
-
-		if [[ ${CBUILD} != ${CHOST} ]]; then
-			# GHC bug: ghc claims not to support cross-building.
-			# It does, but does not distinct --host= value
-			# for stage1 and stage2 compiler.
-			econf_args+=(--host=${CBUILD})
-		fi
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		elif is_native; then
-			# using ${GTARGET}'s libffi is not supported yet:
-			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		einfo "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} \
-			--enable-bootstrap-with-devel-snapshot \
-			$(use_enable elfutils dwarf-unwind) \
-			$(use_enable numa)
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# Stage1Only crosscompiler does not build stage2
-		if ! is_crosscompile; then
-			# 1. build/pax-mark compiler binary first
-			emake ghc/stage2/build/tmp/ghc-stage2
-			# 2. pax-mark (bug #516430)
-			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-			# 2. build/pax-mark haddock using ghc-stage2
-			if is_native; then
-				# non-native build does not build haddock
-				# due to HADDOCK_DOCS=NO, but it could.
-				emake utils/haddock/dist/build/tmp/haddock
-				pax-mark -m utils/haddock/dist/build/tmp/haddock
-			fi
-		fi
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_test() {
-	# TODO: deal with:
-	#    - sandbox (pollutes environment)
-	#    - extra packages (to extend testsuite coverage)
-	# bits are taken from 'validate'
-	local make_test_target='test' # can be fulltest
-	# not 'emake' as testsuite uses '$MAKE' without jobserver available
-	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-		[[ -f VERSION ]] || emake VERSION
-
-		# -j1 due to a rare race in install script:
-		#    make --no-print-directory -f ghc.mk phase=final install
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
-		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
-		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
-		#    /usr/bin/install: cannot create regular file \
-		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
-		emake -j1 install DESTDIR="${D}"
-
-		# Skip for cross-targets as they all share target location:
-		# /usr/share/doc/ghc-9999/
-		if ! is_crosscompile; then
-			dodoc "distrib/README" "LICENSE" "VERSION"
-		fi
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-
-	if is_crosscompile; then
-		# When we build a cross-compiler the layout is the following:
-		#     usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
-		# but
-		#     usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
-		# containst host binaries (modulo bugs).
-
-		# Portage's stripping mechanism does not skip stripping
-		# foreign binaries. This frequently causes binaries to be
-		# broken.
-		#
-		# Thus below we disable stripping of target libraries and allow
-		# stripping hosts executables.
-		dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
-		dostrip    "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
-	fi
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2022-11-25 21:57 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2022-11-25 21:57 UTC (permalink / raw
  To: gentoo-commits

commit:     4a412cce4f26942482cede28e07126fee8d44648
Author:     Jack Todaro <solpeth <AT> posteo <DOT> org>
AuthorDate: Fri Nov 25 19:50:22 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Nov 25 21:56:35 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a412cce

dev-lang/ghc: drop 9.0.2

Signed-off-by: Jack Todaro <solpeth <AT> posteo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/Manifest         |   4 -
 dev-lang/ghc/ghc-9.0.2.ebuild | 853 ------------------------------------------
 2 files changed, 857 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index f3d895e800a6..3aa657ce7c7e 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -1,10 +1,6 @@
-DIST ghc-8.10.6-src.tar.xz 19932832 BLAKE2B f5d0c43aa5df87648e32beeb5ed6866b231cbce4f344fb03110db826b36bbac435f5e89d9ffeef3f87c15e830fdee6b95150b7bdcd06906575bfcd9c83797dff SHA512 6314eb9744d47d803b30b621bd12bf6179dad5cc578ec267b3a65b89e9c9b431bdb4913936f040c7ca4fcc71a676a43e78b5f6173d123a844e7f29004405b8b6
-DIST ghc-8.10.6-testsuite.tar.xz 2265044 BLAKE2B 72a1e955acecc92a720ee2747d96cacf56f2968c9deabb254c882a969c154baa0fdb639a857844ec91a4e47ee553dd13b58c3b790202e7e73500095c1ec85ee9 SHA512 f74d743bd8f889c2941be8fd5348e92abcaf75bce48140f7f9cc0c6ce33ba24a8479bef48631ffe2a10397c0ecf166b3bddb6ca8ee905859c029175de5d43f2a
 DIST ghc-9.0.2-riscv64-llvm.patch.xz 7148 BLAKE2B 01a0d4036b649f663aebebab06990ac041533e7462d3ee9e143444f1119b736f2f8f2dfc293d61da1fac9f0d3ef12e98bab5b0c9fe8440ed1eab22a1d45fb9d7 SHA512 8afb62d5363d8a1a8f63e85335f3c8fa35b7d22899ebe334218a60ce9519852325c8ce93bb0be794c36cbc3c1cc031b7b1e2f4d7665d71f49e95f737bd91ba1a
 DIST ghc-9.0.2-src.tar.xz 27270396 BLAKE2B 0a73d910d3ef11161f895849025fe37ce231932f7cde441fdf620cf8c51678060a804467879eb0ee5c0a30413604c56e28e2aa1cde01e45c620b76987d9c0c0e SHA512 32994c7d2b8f47bae604cd825bfcf9c788d79ce26d1d5f58bd73a7093e11ae6c3c17b31dc0c9e454dbf67ca169b942f92213c388d615768cae86055bf6094dee
 DIST ghc-9.0.2-testsuite.tar.xz 2403564 BLAKE2B 0e7f6fefb9c972f94073aca8b15147913ffa8d3cd3ff7fc63ef7e20b4efd8b443cf21f12e1ab0f5044790f6d8af6cf7788bda85a21b2f356ddface86eb896670 SHA512 b2375500ae837d74af8085d099899b5a7a589c59bdcc033ca0bd6e00f33c4f8d90b481e0c7c3de113e607fcfafdfe8edde4713e6d242b2d4ee87df2eb960c9c7
-DIST ghc-bin-8.10.6-i686-pc-linux-gnu.tbz2 124324289 BLAKE2B afb34984872b35fdedbdedeb8756cc7c33e5b943dba57dd86910b076d483bb643265d0ab0027784dec5dc489eabd65b5ab17474f25fb2ce657925aa0efaa9033 SHA512 4be13e6dba298d12a4d49ae4633eec83cfaaaf22b5f8cfca5f5952aa294ae52fb3601490beed3bda5a7f7b6a5bd81e0ecc9fc39e8df836cc8fd377a0d0b783a0
-DIST ghc-bin-8.10.6-x86_64-pc-linux-gnu.tbz2 122871118 BLAKE2B 527b36abf60390c91f91bc650ee25484d39d377739da87b5b6fd1a752705c1f3bc0ce0c68644657c9a7c1fc9a3b858b9dd7d84b25eab1a89125fccb6eb1f6250 SHA512 42b7fae339e82a6078fae8920efea8d0992e4774ea66b100e22dd9df168be57d8bce52558b8501c3c567c40776389d94bde3f17d26d63535140ce26ac16c27e1
 DIST ghc-bin-9.0.2-aarch64-unknown-linux-gnu.tar.gz 304621314 BLAKE2B d38b8571d41b5703da6b29f43664293761865166a7e3ab6b9c4b039f1af15faa4aa2013a32eb00059d6e595984895762eadff7b62141157d2dea6eb9b035138d SHA512 94e0e00329a18b494b509b3f8190cf6fed2399a2ac2d2d96fdfd90bf5dbeb8db68b6759f719ad85f8873961b0e983ff0006ce0bf109e96462169cbd9fa7b6784
 DIST ghc-bin-9.0.2-i686-pc-linux-gnu.tbz2 123509908 BLAKE2B 45614984803a7bfa266f99d4adb4b5f2ab7b9e5e89c6ecd501296fc99a1d96e798ccb9c832f8dcb15fff9725beb918a7b63e62ff13f59b6506a2ef17930c45d2 SHA512 e0b7f4474c16f0763a2f787027fbdfeb3125b48c987fa1196bc189fefad9f0bfa2806da62af46d61ca911f5275b578076e2b326acf39e0894a8daa9deda0843a
 DIST ghc-bin-9.0.2-powerpc64-unknown-linux-gnu.tar.gz 235636284 BLAKE2B 878ac300cca5d2cbc5cb21dbb347da755b4027cbf63ec77464740854fa8010569de5e03acef67cd877da13665c906b2fd04e24e226e9eb39b57ba979093c732b SHA512 28f096e965abdac9cc370c882639f10285b9073ba5332f7af215eccff948e41c01c3d6bb3bc8e3b4e809e12867a95b49f82dd76e0090b974088f75ab9d1bc199

diff --git a/dev-lang/ghc/ghc-9.0.2.ebuild b/dev-lang/ghc/ghc-9.0.2.ebuild
deleted file mode 100644
index faea36c1c7ba..000000000000
--- a/dev-lang/ghc/ghc-9.0.2.ebuild
+++ /dev/null
@@ -1,853 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
-		export CTARGET=${CATEGORY/cross-}
-	fi
-fi
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit python-any-r1
-inherit autotools bash-completion-r1 flag-o-matic ghc-package
-inherit multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs llvm
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-BIN_PV=${PV}
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-arch_binaries="$arch_binaries arm64? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tar.gz )"
-arch_binaries="$arch_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-gnu-r1.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-arch_binaries="$arch_binaries ppc64? (
-	big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64-unknown-linux-gnu.tar.gz )
-	!big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tar.gz )
-)"
-arch_binaries="$arch_binaries riscv? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-riscv64-unknown-linux-gnu.tar.gz )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://eidetic.codes/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		ppc64) return 0 ;;
-		riscv) return 0 ;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
-	esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.10.0.20200123 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
-	https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-src.tar.xz
-	test? ( https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-riscv64-llvm.patch.xz"
-
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
-	# "hackage-name          hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
-IUSE="big-endian +doc elfutils ghcbootstrap ghcmakebinary +gmp llvm numa profile test unregisterised"
-IUSE+=" binary"
-RESTRICT="!test? ( test )"
-
-LLVM_MAX_SLOT="13"
-RDEPEND="
-	>=dev-lang/perl-5.6.1
-	dev-libs/gmp:0=
-	sys-libs/ncurses:=[unicode(+)]
-	elfutils? ( dev-libs/elfutils )
-	!ghcmakebinary? ( dev-libs/libffi:= )
-	numa? ( sys-process/numactl )
-	llvm? (
-		<sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):=
-		|| (
-			sys-devel/llvm:13
-		)
-	)
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-#    utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
-	!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
-	sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}"
-BDEPEND="
-	virtual/pkgconfig
-	doc? ( app-text/docbook-xml-dtd:4.2
-		app-text/docbook-xml-dtd:4.5
-		app-text/docbook-xsl-stylesheets
-		dev-python/sphinx
-		>=dev-libs/libxslt-1.1.2 )
-	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )
-	test? ( ${PYTHON_DEPS} )
-"
-
-needs_python() {
-	# test driver is written in python
-	use test && return 0
-	return 1
-}
-
-# we build binaries without profiling support
-REQUIRED_USE="
-	?? ( ghcbootstrap binary )
-	?? ( profile binary )
-	?? ( llvm unregisterised )
-"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
-	[[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
-	[[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-if ! is_crosscompile; then
-	PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-fi
-
-# returns tool prefix for crosscompiler.
-# Example:
-#  CTARGET=armv7a-unknown-linux-gnueabi
-#  CHOST=x86_64-pc-linux-gnu
-#    "armv7a-unknown-linux-gnueabi-"
-#  CTARGET=${CHOST}
-#    ""
-# Used in tools and library prefix:
-#    "${ED}"/usr/bin/$(cross)haddock
-#    "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
-	if is_crosscompile; then
-		echo "${CTARGET}-"
-	else
-		echo ""
-	fi
-}
-
-append-ghc-cflags() {
-	local persistent compile assemble link
-	local flag ghcflag
-
-	for flag in $*; do
-		case ${flag} in
-			persistent)	persistent="yes";;
-			compile)	compile="yes";;
-			assemble)	assemble="yes";;
-			link)		link="yes";;
-			*)
-				[[ ${compile}  ]] && ghcflag="-optc${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${assemble} ]] && ghcflag="-opta${flag}"  CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				[[ ${link}     ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
-					[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
-				;;
-		esac
-	done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
-	local pn=$1 pv=$2
-	local p=${pn}-${pv}
-	local f
-
-	einfo "Bumping ${pn} up to ${pv}"
-
-	for f in ghc.mk GNUmakefile; do
-		mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
-	done
-	mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
-	mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
-	done
-}
-
-update_SRC_URI
-
-bump_libs() {
-	local p pn pv
-	for p in "${BUMP_LIBRARIES[@]}"; do
-		set -- $p
-		pn=$1 pv=$2
-
-		bump_lib "${pn}" "${pv}"
-	done
-}
-
-ghc_setup_cflags() {
-	# TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
-	if ! is_native; then
-		export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
-		export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
-		einfo "Crosscompiling mode:"
-		einfo "   CHOST:   ${CHOST}"
-		einfo "   CTARGET: ${CTARGET}"
-		einfo "   CFLAGS:  ${CFLAGS}"
-		einfo "   LDFLAGS: ${LDFLAGS}"
-		einfo "   prefix: $(cross)"
-		return
-	fi
-	# We need to be very careful with the CFLAGS we ask ghc to pass through to
-	# gcc. There are plenty of flags which will make gcc produce output that
-	# breaks ghc in various ways. The main ones we want to pass through are
-	# -mcpu / -march flags. These are important for arches like alpha & sparc.
-	# We also use these CFLAGS for building the C parts of ghc, ie the rts.
-	strip-flags
-	strip-unsupported-flags
-
-	# Cmm can't parse line numbers #482086
-	replace-flags -ggdb[3-9] -ggdb2
-
-	GHC_FLAGS=""
-	GHC_PERSISTENT_FLAGS=""
-	for flag in ${CFLAGS}; do
-		case ${flag} in
-
-			# Ignore extra optimisation (ghc passes -O to gcc anyway)
-			# -O2 and above break on too many systems
-			-O*) ;;
-
-			# Arch and ABI flags are what we're really after
-			-m*) append-ghc-cflags compile assemble ${flag};;
-
-			# Sometimes it's handy to see backtrace of RTS
-			# to get an idea what happens there
-			-g*) append-ghc-cflags compile ${flag};;
-
-			# Ignore all other flags, including all -f* flags
-		esac
-	done
-
-	for flag in ${LDFLAGS}; do
-		append-ghc-cflags link ${flag}
-	done
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
-	local from=$1
-	local   to=$2
-	shift 2
-	local file=
-	for file in "$@"
-	do
-		sed -i -e "s|$from|$to|g" \
-			"$file" || die "path relocation failed for '$file'"
-	done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
-	local to=$1 ghc_v=${BIN_PV}
-
-	# libdir for prebuilt binary and for current system may mismatch
-	# It does for prefix installation for example: bug #476998
-	local bin_ghc_prefix=${WORKDIR}/usr
-	local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
-	local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
-	# backup original script to use it later after relocation
-	local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
-	cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
-	if [[ ${bin_libdir} != $(get_libdir) ]]; then
-		einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
-		# moving the dir itself is not strictly needed
-		# but then USE=binary would result in installing
-		# in '${bin_libdir}'
-		mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
-		relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
-			"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-			"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-			"${WORKDIR}/usr/bin/hsc2hs" \
-			"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-			"$gp_back" \
-			"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-	fi
-
-	# Relocate from /usr to ${EPREFIX}/usr
-	relocate_path "/usr" "${to}/usr" \
-		"${WORKDIR}/usr/bin/ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghci-${ghc_v}" \
-		"${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
-		"${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
-		"${WORKDIR}/usr/bin/hp2ps" \
-		"${WORKDIR}/usr/bin/hpc" \
-		"${WORKDIR}/usr/bin/hsc2hs" \
-		"${WORKDIR}/usr/bin/runghc-${ghc_v}" \
-		"${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
-	# this one we will use to regenerate cache
-	# so it should point to current tree location
-	relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
-	if use prefix; then
-		hprefixify "${bin_libpath}"/${PN}*/settings
-	fi
-
-	# regenerate the binary package cache
-	"$gp_back" recache || die "failed to update cache after relocation"
-	rm "$gp_back"
-}
-
-ghc-check-reqs() {
-	# These are pessimistic values (slightly bigger than worst-case)
-	# Worst case is UNREG USE=profile ia64. See bug #611866 for some
-	# numbers on various arches.
-	CHECKREQS_DISK_BUILD=8G
-	CHECKREQS_DISK_USR=2G
-	# USE=binary roughly takes
-	use binary && CHECKREQS_DISK_BUILD=4G
-
-	"$@"
-}
-
-llvmize() {
-	[[ -z "${1}" ]] && return
-	( find "${1}" -type f \
-		| file -if- \
-		| grep "text/x-shellscript" \
-		| awk -F: '{print $1}' \
-		| xargs sed -i "s#^exec #PATH=\"$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin:\${PATH}\" exec #") || die
-}
-
-pkg_pretend() {
-	ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	ghc-check-reqs check-reqs_pkg_setup
-
-	# quiet portage about prebuilt binaries
-	use binary && QA_PREBUILT="*"
-
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use ghcbootstrap; then
-		ewarn "You requested ghc bootstrapping, this is usually only used"
-		ewarn "by Gentoo developers to make binary .tbz2 packages."
-
-		[[ -z $(type -P ghc) ]] && \
-			die "Could not find a ghc to bootstrap with."
-	else
-		if ! yet_binary; then
-			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
-			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
-		fi
-	fi
-
-	if needs_python; then
-		python-any-r1_pkg_setup
-	fi
-
-	use llvm && llvm_pkg_setup
-}
-
-src_unpack() {
-	# Create the ${S} dir if we're using the binary version
-	use binary && mkdir "${S}"
-
-	# the Solaris and Darwin binaries from ghc (maeder) need to be
-	# unpacked separately, so prevent them from being unpacked
-	local ONLYA=${A}
-	case ${CHOST} in
-		*-darwin* | *-solaris*)  ONLYA=${GHC_P}-src.tar.xz  ;;
-	esac
-	unpack ${ONLYA}
-}
-
-src_prepare() {
-	ghc_setup_cflags
-
-	# ghc-9.0.2 release anomaly
-	# https://www.mail-archive.com/search?l=ghc-devs@haskell.org&q=subject:%22Re%5C%3A+%5C%5BHaskell%5C%5D+%5C%5BANNOUNCE%5C%5D+GHC+9.0.2+released%22&o=newest&f=1
-	# https://src.fedoraproject.org/rpms/ghc9.0/blob/rawhide/f/ghc9.0.spec#_327
-	rm -rf "libraries/containers/containers/dist-install" || die
-
-	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
-		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
-		# See bug #313635.
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${WORKDIR}/usr/bin/ghc-${BIN_PV}"
-
-		# allow hardened users use vanilla binary to bootstrap ghc
-		# ghci uses mmap with rwx protection at it implements dynamic
-		# linking on it's own (bug #299709)
-		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
-	fi
-
-	use llvm && ! use ghcbootstrap && llvmize "${WORKDIR}/usr/bin"
-
-	# binpkg may have been built with FEATURES=splitdebug
-	if [[ -d "${WORKDIR}/usr/lib/debug" ]] ; then
-		rm -rf "${WORKDIR}/usr/lib/debug" || die
-	fi
-	find "${WORKDIR}/usr/lib" -type d -empty -delete 2>/dev/null # do not die on failure here
-
-	# ffi headers don't get included in the binpkg for some reason
-	for f in "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/include/"{ffi.h,ffitarget.h}
-	do
-		mkdir -p "$(dirname "${f}")"
-		[[ -e "${f}" ]] || ln -sf "$($(tc-getPKG_CONFIG) --cflags-only-I libffi | sed "s/-I//g" | tr -d " ")/$(basename "${f}")" "${f}" || die
-	done
-
-	if use binary; then
-		if use prefix; then
-			relocate_ghc "${EPREFIX}"
-		fi
-
-		# Move unpacked files to the expected place
-		mv "${WORKDIR}/usr" "${S}"
-		eapply_user
-	else
-		if ! use ghcbootstrap; then
-			case ${CHOST} in
-				*-darwin* | *-solaris*)
-				# UPDATE ME for ghc-7
-				mkdir "${WORKDIR}"/ghc-bin-installer || die
-				pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
-				use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
-				use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
-				use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
-				use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
-				popd > /dev/null
-
-				pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
-				# fix the binaries so they run, on Solaris we need an
-				# LD_LIBRARY_PATH which has our prefix libdirs, on
-				# Darwin we need to replace the frameworks with our libs
-				# from the prefix fix before installation, because some
-				# of the tools are actually used during configure/make
-				if [[ ${CHOST} == *-solaris* ]] ; then
-					export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
-				elif [[ ${CHOST} == *-darwin* ]] ; then
-					local readline_framework=GNUreadline.framework/GNUreadline
-					local gmp_framework=/opt/local/lib/libgmp.10.dylib
-					local ncurses_file=/opt/local/lib/libncurses.5.dylib
-					for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
-						install_name_tool -change \
-							${readline_framework} \
-							"${EPREFIX}"/lib/libreadline.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${gmp_framework} \
-							"${EPREFIX}"/usr/lib/libgmp.dylib \
-							${binary} || die
-						install_name_tool -change \
-							${ncurses_file} \
-							"${EPREFIX}"/usr/lib/libncurses.dylib \
-							${binary} || die
-					done
-					# we don't do frameworks!
-					sed -i \
-						-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
-						-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
-						rts/package.conf.in || die
-				fi
-
-				# it is autoconf, but we really don't want to give it too
-				# many arguments, in fact we do the make in-place anyway
-				./configure --prefix="${WORKDIR}"/usr || die
-				make install || die
-				popd > /dev/null
-				;;
-				*)
-				relocate_ghc "${WORKDIR}"
-				;;
-			esac
-		fi
-
-		sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
-			"${S}/ghc/ghc.wrapper"
-
-		cd "${S}" # otherwise eapply will break
-
-		eapply "${FILESDIR}"/${PN}-9.0.2-CHOST-prefix.patch
-		eapply "${FILESDIR}"/${PN}-9.0.2-darwin.patch
-		# Fixes panic when compiling some packages
-		# https://github.com/gentoo-haskell/gentoo-haskell/issues/1250#issuecomment-1044257595
-		# https://gitlab.haskell.org/ghc/ghc/-/issues/21097
-		eapply "${FILESDIR}/${PN}-9.0.2-modorigin-semigroup.patch"
-		# Needed for testing with python-3.10
-		use test && eapply "${FILESDIR}/${PN}-9.0.2-fix-tests-python310.patch"
-		eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch
-		eapply "${FILESDIR}"/${PN}-9.0.2-disable-unboxed-arrays.patch
-		eapply "${FILESDIR}"/${PN}-9.0.2-llvm-13.patch
-		eapply "${FILESDIR}"/latomic-subword
-		eapply "${WORKDIR}"/${P}-riscv64-llvm.patch
-
-		# mingw32 target
-		pushd "${S}/libraries/Win32"
-			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
-		popd
-
-		bump_libs
-
-		eapply_user
-		# as we have changed the build system
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	if ! use binary; then
-		# initialize build.mk
-		echo '# Gentoo changes' > mk/build.mk
-
-		# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
-		echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${PF}" >> mk/build.mk
-		echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${PF}" >> mk/build.mk
-
-		# We also need to use the GHC_FLAGS flags when building ghc itself
-		echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
-		echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
-		echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-		# Speed up initial Cabal bootstrap
-		echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
-		# We can't depend on haddock except when bootstrapping when we
-		# must build docs and include them into the binary .tbz2 package
-		# app-text/dblatex is not in portage, can not build PDF or PS
-		echo "BUILD_SPHINX_PDF  = NO"  >> mk/build.mk
-		echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
-		echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
-		# this controls presence on 'xhtml' and 'haddock' in final install
-		echo "HADDOCK_DOCS       = YES" >> mk/build.mk
-
-		# not used outside of ghc's test
-		if [[ -n ${GHC_BUILD_DPH} ]]; then
-				echo "BUILD_DPH = YES" >> mk/build.mk
-			else
-				echo "BUILD_DPH = NO" >> mk/build.mk
-		fi
-
-		# Any non-native build has to skip as it needs
-		# target haddock binary to be runnabine.
-		if ! is_native; then
-			# disable docs generation as it requires running stage2
-			echo "HADDOCK_DOCS=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
-			echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
-		fi
-
-		if is_crosscompile; then
-			# Install ghc-stage1 crosscompiler instead of
-			# ghc-stage2 cross-built compiler.
-			echo "Stage1Only=YES" >> mk/build.mk
-		fi
-
-		# allows overriding build flavours for libraries:
-		# v   - vanilla (static libs)
-		# p   - profiled
-		# dyn - shared libraries
-		# example: GHC_LIBRARY_WAYS="v dyn"
-		if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
-			echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
-		fi
-		echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
-		# Get ghc from the unpacked binary .tbz2
-		# except when bootstrapping we just pick ghc up off the path
-		if ! use ghcbootstrap; then
-			export PATH="${WORKDIR}/usr/bin:${PATH}"
-		fi
-
-		echo "BIGNUM_BACKEND = $(usex gmp gmp native)" >> mk/build.mk
-
-		# don't strip anything. Very useful when stage2 SIGSEGVs on you
-		echo "STRIP_CMD = :" >> mk/build.mk
-
-		local econf_args=()
-
-		# GHC embeds toolchain it was built by and uses it later.
-		# Don't allow things like ccache or versioned binary slip.
-		# We use stable thing across gcc upgrades.
-		# User can use EXTRA_ECONF=CC=... to override this default.
-		econf_args+=(
-			AR=${CTARGET}-ar
-			CC=${CTARGET}-gcc
-			# these should be inferred by GHC but ghc defaults
-			# to using bundled tools on windows.
-			Windres=${CTARGET}-windres
-			DllWrap=${CTARGET}-dllwrap
-			# we set the linker explicitly below
-			--disable-ld-override
-		)
-		case ${CTARGET} in
-			arm*)
-				# ld.bfd-2.28 does not work for ghc. Force ld.gold
-				# instead. This should be removed once gentoo gets
-				# a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
-				econf_args+=(LD=${CTARGET}-ld.gold)
-			;;
-			sparc*)
-				# ld.gold-2.28 does not work for ghc. Force ld.bfd
-				# instead. This should be removed once gentoo gets
-				# a fix for missing --no-relax support bug:
-				# https://sourceware.org/ml/binutils/2017-07/msg00183.html
-				econf_args+=(LD=${CTARGET}-ld.bfd)
-			;;
-			*)
-				econf_args+=(LD=${CTARGET}-ld)
-		esac
-
-		if [[ ${CBUILD} != ${CHOST} ]]; then
-			# GHC bug: ghc claims not to support cross-building.
-			# It does, but does not distinct --host= value
-			# for stage1 and stage2 compiler.
-			econf_args+=(--host=${CBUILD})
-		fi
-
-		if use ghcmakebinary; then
-			# When building booting libary we are trying to
-			# bundle or restrict most of external depends
-			# with unstable ABI:
-			#  - embed libffi (default GHC behaviour)
-			#  - disable ncurses support for ghci (via haskeline)
-			#    https://bugs.gentoo.org/557478
-			#  - disable ncurses support for ghc-pkg
-			echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
-			echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
-		elif is_native; then
-			# using ${GTARGET}'s libffi is not supported yet:
-			# GHC embeds full path for ffi includes without /usr/${CTARGET} account.
-			econf_args+=(--with-system-libffi)
-			econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
-		fi
-
-		einfo "Final mk/build.mk:"
-		cat mk/build.mk || die
-
-		econf ${econf_args[@]} \
-			--enable-bootstrap-with-devel-snapshot \
-			$(use_enable elfutils dwarf-unwind) \
-			$(use_enable numa) \
-			$(use_enable unregisterised)
-
-		if [[ ${PV} == *9999* ]]; then
-			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
-			GHC_P=${PN}-${GHC_PV}
-		fi
-	fi # ! use binary
-}
-
-src_compile() {
-	if ! use binary; then
-		# Stage1Only crosscompiler does not build stage2
-		if ! is_crosscompile; then
-			# 1. build/pax-mark compiler binary first
-			emake ghc/stage2/build/tmp/ghc-stage2
-			# 2. pax-mark (bug #516430)
-			pax-mark -m ghc/stage2/build/tmp/ghc-stage2
-			# 2. build/pax-mark haddock using ghc-stage2
-			if is_native; then
-				# non-native build does not build haddock
-				# due to HADDOCK_DOCS=NO, but it could.
-				emake utils/haddock/dist/build/tmp/haddock
-				pax-mark -m utils/haddock/dist/build/tmp/haddock
-			fi
-		fi
-		# 3. and then all the rest
-		emake all
-	fi # ! use binary
-}
-
-src_test() {
-	# TODO: deal with:
-	#    - sandbox (pollutes environment)
-	#    - extra packages (to extend testsuite coverage)
-	# bits are taken from 'validate'
-	local make_test_target='test' # can be fulltest
-	# not 'emake' as testsuite uses '$MAKE' without jobserver available
-	make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
-	if use binary; then
-		use prefix && mkdir -p "${ED}"
-		mv "${S}/usr" "${ED}"
-	else
-		[[ -f VERSION ]] || emake VERSION
-
-		# -j1 due to a rare race in install script:
-		#    make --no-print-directory -f ghc.mk phase=final install
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
-		#        -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
-		#    /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644  utils/hsc2hs/template-hsc.h \
-		#           "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
-		#    /usr/bin/install: cannot create regular file \
-		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
-		emake -j1 install DESTDIR="${D}"
-
-		use llvm && llvmize "${ED}/usr/bin"
-
-		# Skip for cross-targets as they all share target location:
-		# /usr/share/doc/ghc-9999/
-		if ! is_crosscompile; then
-			dodoc "distrib/README" "LICENSE" "VERSION"
-		fi
-
-		# rename ghc-shipped files to avoid collision
-		# of external packages. Motivating example:
-		#  user had installed:
-		#      dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
-		#      dev-haskell/transformers-0.4.2.0
-		#  then user tried to update to
-		#      dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
-		#  this will lead to single .conf file collision.
-		local shipped_conf renamed_conf
-		local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-		for shipped_conf in "${package_confdir}"/*.conf; do
-			# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
-			renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
-			mv "${shipped_conf}" "${renamed_conf}" || die
-		done
-
-		# remove link, but leave 'haddock-${GHC_P}'
-		rm -f "${ED}"/usr/bin/$(cross)haddock
-
-		if ! is_crosscompile; then
-			newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
-			newbashcomp utils/completion/ghc.bash         ghc
-		fi
-	fi
-
-	# path to the package.cache
-	local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-	PKGCACHE="${package_confdir}"/package.cache
-	# copy the package.conf.d, including timestamp, save it so we can help
-	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
-	# copy the package.conf, including timestamp, save it so we later can put it
-	# back before uninstalling, or when upgrading.
-	cp -p "${PKGCACHE}"{,.shipped} \
-		|| die "failed to copy package.conf.d/package.cache"
-
-	if is_crosscompile; then
-		# When we build a cross-compiler the layout is the following:
-		#     usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
-		# but
-		#     usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
-		# containst host binaries (modulo bugs).
-
-		# Portage's stripping mechanism does not skip stripping
-		# foreign binaries. This frequently causes binaries to be
-		# broken.
-		#
-		# Thus below we disable stripping of target libraries and allow
-		# stripping hosts executables.
-		dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
-		dostrip    "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
-	fi
-}
-
-pkg_preinst() {
-	# have we got an earlier version of ghc installed?
-	if has_version "<${CATEGORY}/${PF}"; then
-		haskell_updater_warn="1"
-	fi
-}
-
-pkg_postinst() {
-	ghc-reregister
-
-	# path to the package.cache
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
-	# give the cache a new timestamp, it must be as recent as
-	# the package.conf.d directory.
-	touch "${PKGCACHE}"
-
-	if [[ "${haskell_updater_warn}" == "1" ]]; then
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-		ewarn "You have just upgraded from an older version of GHC."
-		ewarn "You may have to run"
-		ewarn "      'haskell-updater'"
-		ewarn "to rebuild all ghc-based Haskell libraries."
-		ewarn
-		ewarn "\e[1;31m************************************************************************\e[0m"
-		ewarn
-	fi
-}
-
-pkg_prerm() {
-	PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-	rm -rf "${PKGCACHE}"
-
-	cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
-	ghc-package_pkg_postrm
-}


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2023-01-21  2:37 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2023-01-21  2:37 UTC (permalink / raw
  To: gentoo-commits

commit:     427ed5358b2f145aa1d87b6eb2503396f41fbd68
Author:     hololeap <hololeap <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Sat Jan 21 01:15:41 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 21 02:36:31 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=427ed535

dev-lang/ghc: depend on libffi[-exec-static-trampoline]

The 8.10 line of ghc needs USE=exec-static-trampoline turned off on
libffi. The fix exists in 9.0.2 and later versions of ghc.

See: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6155
Bug: https://bugs.gentoo.org/801109
Reported-by: Sam James <sam <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/29195
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/{ghc-8.10.6-r1.ebuild => ghc-8.10.6-r2.ebuild} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-lang/ghc/ghc-8.10.6-r1.ebuild b/dev-lang/ghc/ghc-8.10.6-r2.ebuild
similarity index 99%
rename from dev-lang/ghc/ghc-8.10.6-r1.ebuild
rename to dev-lang/ghc/ghc-8.10.6-r2.ebuild
index 32dcc0691043..a6c5e39b7c68 100644
--- a/dev-lang/ghc/ghc-8.10.6-r1.ebuild
+++ b/dev-lang/ghc/ghc-8.10.6-r2.ebuild
@@ -87,7 +87,7 @@ RDEPEND="
 	dev-libs/gmp:0=
 	sys-libs/ncurses:=[unicode(+)]
 	elfutils? ( dev-libs/elfutils )
-	!ghcmakebinary? ( dev-libs/libffi:= )
+	!ghcmakebinary? ( dev-libs/libffi:=[-exec-static-trampoline] )
 	numa? ( sys-process/numactl )
 "
 


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2023-02-05 15:19 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2023-02-05 15:19 UTC (permalink / raw
  To: gentoo-commits

commit:     978a89b79928342990c7da40c43a1cc9b84d3e7e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  5 15:18:33 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb  5 15:18:58 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=978a89b7

dev-lang/ghc: unconditionally apply sphinx patch

Closes: https://bugs.gentoo.org/890563
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/ghc-9.0.2-r3.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dev-lang/ghc/ghc-9.0.2-r3.ebuild b/dev-lang/ghc/ghc-9.0.2-r3.ebuild
index 1cd220d817eb..21f2dedfd9de 100644
--- a/dev-lang/ghc/ghc-9.0.2-r3.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2-r3.ebuild
@@ -458,6 +458,9 @@ src_prepare() {
 		[[ -e "${f}" ]] || ln -sf "$($(tc-getPKG_CONFIG) --cflags-only-I libffi | sed "s/-I//g" | tr -d " ")/$(basename "${f}")" "${f}" || die
 	done
 
+
+	eapply "${FILESDIR}"/${PN}-9.0.2-sphinx-6.patch
+
 	if use binary; then
 		if use prefix; then
 			relocate_ghc "${EPREFIX}"
@@ -544,7 +547,6 @@ src_prepare() {
 		eapply "${FILESDIR}"/latomic-subword
 		eapply "${WORKDIR}"/${P}-riscv64-llvm.patch
 		eapply "${FILESDIR}"/${PN}-9.0.2-fptools.patch # clang-16 workaround
-		eapply "${FILESDIR}"/${PN}-9.0.2-sphinx-6.patch
 
 		# mingw32 target
 		pushd "${S}/libraries/Win32"


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2023-02-21  5:13 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2023-02-21  5:13 UTC (permalink / raw
  To: gentoo-commits

commit:     36bc3a31d2ec1b87aa10fe4239b31838717f82db
Author:     hololeap <hololeap <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Wed Feb  8 01:17:02 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 21 05:13:27 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36bc3a31

dev-lang/ghc: Force C.utf8 locale on all versions

Closes: https://github.com/gentoo-haskell/gentoo-haskell/issues/1289
Signed-off-by: hololeap <hololeap <AT> users.noreply.github.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/ghc-9.0.2-r3.ebuild | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dev-lang/ghc/ghc-9.0.2-r3.ebuild b/dev-lang/ghc/ghc-9.0.2-r3.ebuild
index 21f2dedfd9de..cf9330be391d 100644
--- a/dev-lang/ghc/ghc-9.0.2-r3.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2-r3.ebuild
@@ -424,6 +424,11 @@ src_unpack() {
 }
 
 src_prepare() {
+	# Force the use of C.utf8 locale
+	# <https://github.com/gentoo-haskell/gentoo-haskell/issues/1287>
+	# <https://github.com/gentoo-haskell/gentoo-haskell/issues/1289>
+	export LC_ALL=C.utf8
+
 	ghc_setup_cflags
 
 	# ghc-9.0.2 release anomaly


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2023-02-21  5:13 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2023-02-21  5:13 UTC (permalink / raw
  To: gentoo-commits

commit:     81141d9b9109eb5fa8c6f87a15ae47fa1d137325
Author:     hololeap <hololeap <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Mon Feb 20 19:26:46 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 21 05:13:28 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81141d9b

dev-lang/ghc: Update binaries for ghc-9.0.2

Updates to the amd64 and x86 binaries were built using

    quickpkg =dev-lang/ghc-9.0.2-r4

Keywords and binary packages for arm64, ppc64 and riscv have been
dropped pending new versions. This should prevent anyone on these
platforms who are using USE=binary from accidentally using old binaries
which use the old version of 'process'.

Closes: https://bugs.gentoo.org/893524
Signed-off-by: hololeap <hololeap <AT> users.noreply.github.com>
Closes: https://github.com/gentoo/gentoo/pull/29687
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/Manifest            |  2 ++
 dev-lang/ghc/ghc-9.0.2-r4.ebuild | 22 +++++++++++-----------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index f55ad841e091..dbcaf352afc1 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -6,9 +6,11 @@ DIST ghc-9.0.2-testsuite.tar.xz 2403564 BLAKE2B 0e7f6fefb9c972f94073aca8b1514791
 DIST ghc-bin-8.10.6-i686-pc-linux-gnu.tbz2 124324289 BLAKE2B afb34984872b35fdedbdedeb8756cc7c33e5b943dba57dd86910b076d483bb643265d0ab0027784dec5dc489eabd65b5ab17474f25fb2ce657925aa0efaa9033 SHA512 4be13e6dba298d12a4d49ae4633eec83cfaaaf22b5f8cfca5f5952aa294ae52fb3601490beed3bda5a7f7b6a5bd81e0ecc9fc39e8df836cc8fd377a0d0b783a0
 DIST ghc-bin-8.10.6-x86_64-pc-linux-gnu.tbz2 122871118 BLAKE2B 527b36abf60390c91f91bc650ee25484d39d377739da87b5b6fd1a752705c1f3bc0ce0c68644657c9a7c1fc9a3b858b9dd7d84b25eab1a89125fccb6eb1f6250 SHA512 42b7fae339e82a6078fae8920efea8d0992e4774ea66b100e22dd9df168be57d8bce52558b8501c3c567c40776389d94bde3f17d26d63535140ce26ac16c27e1
 DIST ghc-bin-9.0.2-aarch64-unknown-linux-gnu.tar.gz 304621314 BLAKE2B d38b8571d41b5703da6b29f43664293761865166a7e3ab6b9c4b039f1af15faa4aa2013a32eb00059d6e595984895762eadff7b62141157d2dea6eb9b035138d SHA512 94e0e00329a18b494b509b3f8190cf6fed2399a2ac2d2d96fdfd90bf5dbeb8db68b6759f719ad85f8873961b0e983ff0006ce0bf109e96462169cbd9fa7b6784
+DIST ghc-bin-9.0.2-i686-pc-linux-gnu-r4.tbz2 118374393 BLAKE2B 5fdb0125bc76570923b8c7238d6fd0e4e8a3fb50b4bf7e1921fe43cbb64c23a259627d6d1ce86141462bbf716d0b41a4afda9defd235dc3bc92d389a7e9414ca SHA512 d4b0530d81a01adfd4878e663700b9e444e1194a7a020b42fd8f620c141fafef9bef0f24cd2c90f36680818797e883f61933d8da1adb041aa945a7c4d10c09d7
 DIST ghc-bin-9.0.2-i686-pc-linux-gnu.tbz2 123509908 BLAKE2B 45614984803a7bfa266f99d4adb4b5f2ab7b9e5e89c6ecd501296fc99a1d96e798ccb9c832f8dcb15fff9725beb918a7b63e62ff13f59b6506a2ef17930c45d2 SHA512 e0b7f4474c16f0763a2f787027fbdfeb3125b48c987fa1196bc189fefad9f0bfa2806da62af46d61ca911f5275b578076e2b326acf39e0894a8daa9deda0843a
 DIST ghc-bin-9.0.2-powerpc64-unknown-linux-gnu.tar.gz 235636284 BLAKE2B 878ac300cca5d2cbc5cb21dbb347da755b4027cbf63ec77464740854fa8010569de5e03acef67cd877da13665c906b2fd04e24e226e9eb39b57ba979093c732b SHA512 28f096e965abdac9cc370c882639f10285b9073ba5332f7af215eccff948e41c01c3d6bb3bc8e3b4e809e12867a95b49f82dd76e0090b974088f75ab9d1bc199
 DIST ghc-bin-9.0.2-powerpc64le-unknown-linux-gnu.tar.gz 275226316 BLAKE2B 10ade2359432b0ede7431ee543f0ff47f4b203465d81719da579ad63ca467359eb9fcf7336a12feb6ff75a480f349576ff8ea1b4ebe1094fff228ae4fd00d6e0 SHA512 64b4c84d149358b8d3a6cb29a6d3a75af11e7b14e6d910c9789c9949262e4ed2a17f8a0d1e5dd297121957061fe2395d6f43acae6b4ab28851e3cd414cd9c89c
 DIST ghc-bin-9.0.2-riscv64-unknown-linux-gnu.tar.gz 313475807 BLAKE2B a5e1bbd4630eaff63dd01d79fdcb26a663771c0241d3211aa3a0033cb58addbe8e696177500ac06ae727fc645bfc6f16a3df763a6a0ae039b8823bcbfb9918bb SHA512 5e462f6f9d3f3507b3e09230729faa2a3e1fa92a8024fac602d75b804fff25f27e335871658f4b7b2c671f9e066373ca0285720da315a6c22f6f2c9c3cfea927
 DIST ghc-bin-9.0.2-x86_64-pc-linux-gnu-r1.tbz2 121347519 BLAKE2B 6bd41cdb8ba1661735e46df4709888e6461cff969678716c82681a0a0b0e8d0a32532a070f52efb0ab99ca126207998e8883d01902071e797a7a0f19881d5925 SHA512 c7de43577fd97e6fbde7bbffba4e1d2b83cdda405cff46f95c9eff23260542b426091d8dba75605d81ed41740a793a409e7448538e5adc7a391a901f20e8f2e4
+DIST ghc-bin-9.0.2-x86_64-pc-linux-gnu-r4.tbz2 117160553 BLAKE2B 6314d6ae30f83325cbe5d620399f2517b90b32e6b54d5570acafe0266307013c729afc1de93be092bdb86e1f276f55e7bd19392c74f1a123110a76800982a446 SHA512 f12e0861276f92e23e5fb42ee702cac04f9726895b8dde29e29d549fe41cad417d8f60aa6cb537e64c8de1a3550a31f62f9ce391bf3fc866f05f511b5b2463f1
 DIST process-1.6.16.0.tar.gz 87354 BLAKE2B 8c2977d6801faef8825ed35f058a6207a518f72eb87ac3144f630bc028f4753cefb9ed4d3fc29185438bcb4f38d33f5a45aebec6a8101e4cdc1b3570ada2e5dc SHA512 1663f2746a05a5a4c29d249db54eaa49edbbadfe8d189eab02276c3f6f3d6b84c81cc4333318c42c7a7265638402cb13276f08aeea134a7f5dd98da050a34341

diff --git a/dev-lang/ghc/ghc-9.0.2-r4.ebuild b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
index 73c3cf5af681..4ad8fb52d320 100644
--- a/dev-lang/ghc/ghc-9.0.2-r4.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
@@ -29,19 +29,19 @@ BIN_PV=${PV}
 # Differentiate glibc/musl
 
 #glibc_binaries="$glibc_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-glibc_binaries="$glibc_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-gnu-r1.tbz2 )"
+glibc_binaries="$glibc_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-gnu-r4.tbz2 )"
 #glibc_binaries="$glibc_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-glibc_binaries="$glibc_binaries arm64? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tar.gz )"
+#glibc_binaries="$glibc_binaries arm64? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tar.gz )"
 #glibc_binaries="$glibc_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #glibc_binaries="$glibc_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
 #glibc_binaries="$glibc_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-glibc_binaries="$glibc_binaries ppc64? (
-	big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64-unknown-linux-gnu.tar.gz )
-	!big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tar.gz )
-)"
-glibc_binaries="$glibc_binaries riscv? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-riscv64-unknown-linux-gnu.tar.gz )"
+#glibc_binaries="$glibc_binaries ppc64? (
+#	big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64-unknown-linux-gnu.tar.gz )
+#	!big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tar.gz )
+#)"
+#glibc_binaries="$glibc_binaries riscv? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-riscv64-unknown-linux-gnu.tar.gz )"
 #glibc_binaries="$glibc_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-glibc_binaries="$glibc_binaries x86? ( https://eidetic.codes/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+glibc_binaries="$glibc_binaries x86? ( https://eidetic.codes/ghc-bin-${PV}-i686-pc-linux-gnu-r4.tbz2 )"
 
 #musl_binaries="$musl_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
 #musl_binaries="$musl_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-musl.tbz2 )"
@@ -67,13 +67,13 @@ yet_binary() {
 		glibc)
 			case "${ARCH}" in
 				#alpha) return 0 ;;
-				arm64) return 0 ;;
+				#arm64) return 0 ;;
 				#arm) return 0 ;;
 				amd64) return 0 ;;
 				#ia64) return 0 ;;
 				#ppc) return 0 ;;
-				ppc64) return 0 ;;
-				riscv) return 0 ;;
+				#ppc64) return 0 ;;
+				#riscv) return 0 ;;
 				#sparc) return 0 ;;
 				x86) return 0 ;;
 				*) return 1 ;;


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2023-02-21  5:13 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2023-02-21  5:13 UTC (permalink / raw
  To: gentoo-commits

commit:     24cbad0193c8e1e50bc5d30828e88b0872f6620e
Author:     hololeap <hololeap <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Thu Feb  9 20:08:05 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 21 05:13:28 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24cbad01

dev-lang/ghc: conditionally apply sphinx patch

The sphinx patch only applies to the source code and will cause a
failure if it is applied with USE=binary (this flag disables the
unpacking of the source code).

This reverts commit 978a89b79928342990c7da40c43a1cc9b84d3e7e.

Signed-off-by: hololeap <hololeap <AT> users.noreply.github.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/ghc-9.0.2-r4.ebuild | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/dev-lang/ghc/ghc-9.0.2-r4.ebuild b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
index 9f6a1b7d14d4..73c3cf5af681 100644
--- a/dev-lang/ghc/ghc-9.0.2-r4.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
@@ -503,9 +503,6 @@ src_prepare() {
 		[[ -e "${f}" ]] || ln -sf "$($(tc-getPKG_CONFIG) --cflags-only-I libffi | sed "s/-I//g" | tr -d " ")/$(basename "${f}")" "${f}" || die
 	done
 
-
-	eapply "${FILESDIR}"/${PN}-9.0.2-sphinx-6.patch
-
 	if use binary; then
 		if use prefix; then
 			relocate_ghc "${EPREFIX}"
@@ -592,6 +589,7 @@ src_prepare() {
 		eapply "${FILESDIR}"/latomic-subword
 		eapply "${WORKDIR}"/${P}-riscv64-llvm.patch
 		eapply "${FILESDIR}"/${PN}-9.0.2-fptools.patch # clang-16 workaround
+		eapply "${FILESDIR}"/${PN}-9.0.2-sphinx-6.patch
 
 		# mingw32 target
 		pushd "${S}/libraries/Win32"


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2023-02-21  5:13 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2023-02-21  5:13 UTC (permalink / raw
  To: gentoo-commits

commit:     5c8ee4d0315853e2a0595e2d75316cba5c717c31
Author:     hololeap <hololeap <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Thu Feb  9 19:58:25 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 21 05:13:27 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c8ee4d0

dev-lang/ghc: Upgrade bundled process package

Use process-1.6.16.0 on all versions of ghc

There have been recent bug fixes in the process package which are
now required by the 3.8 branch of cabal-install.

See: https://github.com/haskell/cabal/commit/ad9e4dc3c63a293bbd89444fc356294e64766556
See: https://github.com/haskell/process/issues/226
Signed-off-by: hololeap <hololeap <AT> users.noreply.github.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/Manifest                              |   1 +
 .../{ghc-8.10.6-r2.ebuild => ghc-8.10.6-r3.ebuild} |   1 +
 .../{ghc-8.10.6-r2.ebuild => ghc-9.0.2-r4.ebuild}  | 121 ++++++++++++++-------
 3 files changed, 86 insertions(+), 37 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index f3d895e800a6..f55ad841e091 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -11,3 +11,4 @@ DIST ghc-bin-9.0.2-powerpc64-unknown-linux-gnu.tar.gz 235636284 BLAKE2B 878ac300
 DIST ghc-bin-9.0.2-powerpc64le-unknown-linux-gnu.tar.gz 275226316 BLAKE2B 10ade2359432b0ede7431ee543f0ff47f4b203465d81719da579ad63ca467359eb9fcf7336a12feb6ff75a480f349576ff8ea1b4ebe1094fff228ae4fd00d6e0 SHA512 64b4c84d149358b8d3a6cb29a6d3a75af11e7b14e6d910c9789c9949262e4ed2a17f8a0d1e5dd297121957061fe2395d6f43acae6b4ab28851e3cd414cd9c89c
 DIST ghc-bin-9.0.2-riscv64-unknown-linux-gnu.tar.gz 313475807 BLAKE2B a5e1bbd4630eaff63dd01d79fdcb26a663771c0241d3211aa3a0033cb58addbe8e696177500ac06ae727fc645bfc6f16a3df763a6a0ae039b8823bcbfb9918bb SHA512 5e462f6f9d3f3507b3e09230729faa2a3e1fa92a8024fac602d75b804fff25f27e335871658f4b7b2c671f9e066373ca0285720da315a6c22f6f2c9c3cfea927
 DIST ghc-bin-9.0.2-x86_64-pc-linux-gnu-r1.tbz2 121347519 BLAKE2B 6bd41cdb8ba1661735e46df4709888e6461cff969678716c82681a0a0b0e8d0a32532a070f52efb0ab99ca126207998e8883d01902071e797a7a0f19881d5925 SHA512 c7de43577fd97e6fbde7bbffba4e1d2b83cdda405cff46f95c9eff23260542b426091d8dba75605d81ed41740a793a409e7448538e5adc7a391a901f20e8f2e4
+DIST process-1.6.16.0.tar.gz 87354 BLAKE2B 8c2977d6801faef8825ed35f058a6207a518f72eb87ac3144f630bc028f4753cefb9ed4d3fc29185438bcb4f38d33f5a45aebec6a8101e4cdc1b3570ada2e5dc SHA512 1663f2746a05a5a4c29d249db54eaa49edbbadfe8d189eab02276c3f6f3d6b84c81cc4333318c42c7a7265638402cb13276f08aeea134a7f5dd98da050a34341

diff --git a/dev-lang/ghc/ghc-8.10.6-r2.ebuild b/dev-lang/ghc/ghc-8.10.6-r3.ebuild
similarity index 99%
copy from dev-lang/ghc/ghc-8.10.6-r2.ebuild
copy to dev-lang/ghc/ghc-8.10.6-r3.ebuild
index d3def7c1d0a9..2478db3c35bd 100644
--- a/dev-lang/ghc/ghc-8.10.6-r2.ebuild
+++ b/dev-lang/ghc/ghc-8.10.6-r3.ebuild
@@ -109,6 +109,7 @@ S="${WORKDIR}"/${GHC_P}
 
 BUMP_LIBRARIES=(
 	# "hackage-name          hackage-version"
+	"process          1.6.16.0"
 )
 
 LICENSE="BSD"

diff --git a/dev-lang/ghc/ghc-8.10.6-r2.ebuild b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
similarity index 86%
rename from dev-lang/ghc/ghc-8.10.6-r2.ebuild
rename to dev-lang/ghc/ghc-9.0.2-r4.ebuild
index d3def7c1d0a9..9f6a1b7d14d4 100644
--- a/dev-lang/ghc/ghc-8.10.6-r2.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
@@ -16,8 +16,8 @@ fi
 PYTHON_COMPAT=( python3_{9..10} )
 inherit python-any-r1
 inherit autotools bash-completion-r1 flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs
+inherit multiprocessing pax-utils toolchain-funcs prefix
+inherit check-reqs llvm
 DESCRIPTION="The Glasgow Haskell Compiler"
 HOMEPAGE="https://www.haskell.org/ghc/"
 
@@ -29,26 +29,31 @@ BIN_PV=${PV}
 # Differentiate glibc/musl
 
 #glibc_binaries="$glibc_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-glibc_binaries="$glibc_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+glibc_binaries="$glibc_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-gnu-r1.tbz2 )"
 #glibc_binaries="$glibc_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#glibc_binaries="$glibc_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+glibc_binaries="$glibc_binaries arm64? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tar.gz )"
 #glibc_binaries="$glibc_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #glibc_binaries="$glibc_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
 #glibc_binaries="$glibc_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#glibc_binaries="$glibc_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
+glibc_binaries="$glibc_binaries ppc64? (
+	big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64-unknown-linux-gnu.tar.gz )
+	!big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tar.gz )
+)"
+glibc_binaries="$glibc_binaries riscv? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-riscv64-unknown-linux-gnu.tar.gz )"
 #glibc_binaries="$glibc_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-glibc_binaries="$glibc_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+glibc_binaries="$glibc_binaries x86? ( https://eidetic.codes/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
 #musl_binaries="$musl_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#musl_binaries="$musl_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-musl.tbz2 )"
+#musl_binaries="$musl_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-musl.tbz2 )"
 #musl_binaries="$musl_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-musl.tbz2 )"
 #musl_binaries="$musl_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-musl.tbz2 )"
 #musl_binaries="$musl_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #musl_binaries="$musl_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
 #musl_binaries="$musl_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#musl_binaries="$musl_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-musl.tbz2 ) )"
+#musl_binaries="$musl_binaries ppc64? ( !big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64le-unknown-linux-musl.tar.gz ) )"
+#musl_binaries="$musl_binaries riscv? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-riscv64-unknown-linux-musl.tar.gz )"
 #musl_binaries="$musl_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-#musl_binaries="$musl_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-musl.tbz2 )"
+#musl_binaries="$musl_binaries x86? ( https://eidetic.codes/ghc-bin-${PV}-i686-pc-linux-musl.tbz2 )"
 
 [[ -n $glibc_binaries ]] && arch_binaries="$arch_binaries elibc_glibc? ( $glibc_binaries )"
 [[ -n $musl_binaries ]] && arch_binaries="$arch_binaries elibc_musl? ( $musl_binaries )"
@@ -62,14 +67,13 @@ yet_binary() {
 		glibc)
 			case "${ARCH}" in
 				#alpha) return 0 ;;
-				#arm64) return 0 ;;
+				arm64) return 0 ;;
 				#arm) return 0 ;;
 				amd64) return 0 ;;
 				#ia64) return 0 ;;
 				#ppc) return 0 ;;
-				#ppc64)
-				#	use big-endian || return 0
-				#	;;
+				ppc64) return 0 ;;
+				riscv) return 0 ;;
 				#sparc) return 0 ;;
 				x86) return 0 ;;
 				*) return 1 ;;
@@ -86,12 +90,12 @@ yet_binary() {
 				#ppc64)
 				#	use big-endian || return 0
 				#	;;
+				#riscv) return 0 ;;
 				#sparc) return 0 ;;
 				#x86) return 0 ;;
 				*) return 1 ;;
 			esac
 			;;
-		*) return 1 ;;
 	esac
 }
 
@@ -103,28 +107,38 @@ SRC_URI="!binary? (
 	https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-src.tar.xz
 	test? ( https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
 )"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-riscv64-llvm.patch.xz"
+
 S="${WORKDIR}"/${GHC_P}
 
 [[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
 
 BUMP_LIBRARIES=(
 	# "hackage-name          hackage-version"
+	"process          1.6.16.0"
 )
 
 LICENSE="BSD"
 SLOT="0/${PV}"
 KEYWORDS="~amd64 ~x86"
-IUSE="big-endian +doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
+IUSE="big-endian +doc elfutils ghcbootstrap ghcmakebinary +gmp llvm numa profile test unregisterised"
 IUSE+=" binary"
 RESTRICT="!test? ( test )"
 
+LLVM_MAX_SLOT="14"
 RDEPEND="
 	>=dev-lang/perl-5.6.1
 	dev-libs/gmp:0=
 	sys-libs/ncurses:=[unicode(+)]
 	elfutils? ( dev-libs/elfutils )
-	!ghcmakebinary? ( dev-libs/libffi:=[-exec-static-trampoline] )
+	!ghcmakebinary? ( dev-libs/libffi:= )
 	numa? ( sys-process/numactl )
+	llvm? (
+		<sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):=
+		|| (
+			sys-devel/llvm:14
+		)
+	)
 "
 
 # This set of dependencies is needed to run
@@ -165,6 +179,7 @@ needs_python() {
 REQUIRED_USE="
 	?? ( ghcbootstrap binary )
 	?? ( profile binary )
+	?? ( llvm unregisterised )
 "
 
 # haskell libraries built with cabal in configure mode, #515354
@@ -309,15 +324,6 @@ ghc_setup_cflags() {
 	for flag in ${LDFLAGS}; do
 		append-ghc-cflags link ${flag}
 	done
-
-	# GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
-	# Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
-	# options to gcc.
-	if is_native; then
-		# prevent from failing to build unregisterised ghc:
-		# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
-		use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-	fi
 }
 
 # substitutes string $1 to $2 in files $3 $4 ...
@@ -402,6 +408,15 @@ ghc-check-reqs() {
 	"$@"
 }
 
+llvmize() {
+	[[ -z "${1}" ]] && return
+	( find "${1}" -type f \
+		| file -if- \
+		| grep "text/x-shellscript" \
+		| awk -F: '{print $1}' \
+		| xargs sed -i "s#^exec #PATH=\"$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin:\${PATH}\" exec #") || die
+}
+
 pkg_pretend() {
 	ghc-check-reqs check-reqs_pkg_pretend
 }
@@ -431,6 +446,8 @@ pkg_setup() {
 	if needs_python; then
 		python-any-r1_pkg_setup
 	fi
+
+	use llvm && llvm_pkg_setup
 }
 
 src_unpack() {
@@ -454,6 +471,11 @@ src_prepare() {
 
 	ghc_setup_cflags
 
+	# ghc-9.0.2 release anomaly
+	# https://www.mail-archive.com/search?l=ghc-devs@haskell.org&q=subject:%22Re%5C%3A+%5C%5BHaskell%5C%5D+%5C%5BANNOUNCE%5C%5D+GHC+9.0.2+released%22&o=newest&f=1
+	# https://src.fedoraproject.org/rpms/ghc9.0/blob/rawhide/f/ghc9.0.spec#_327
+	rm -rf "libraries/containers/containers/dist-install" || die
+
 	if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
 		# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
 		# See bug #313635.
@@ -466,6 +488,24 @@ src_prepare() {
 		pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
 	fi
 
+	use llvm && ! use ghcbootstrap && llvmize "${WORKDIR}/usr/bin"
+
+	# binpkg may have been built with FEATURES=splitdebug
+	if [[ -d "${WORKDIR}/usr/lib/debug" ]] ; then
+		rm -rf "${WORKDIR}/usr/lib/debug" || die
+	fi
+	find "${WORKDIR}/usr/lib" -type d -empty -delete 2>/dev/null # do not die on failure here
+
+	# ffi headers don't get included in the binpkg for some reason
+	for f in "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/include/"{ffi.h,ffitarget.h}
+	do
+		mkdir -p "$(dirname "${f}")"
+		[[ -e "${f}" ]] || ln -sf "$($(tc-getPKG_CONFIG) --cflags-only-I libffi | sed "s/-I//g" | tr -d " ")/$(basename "${f}")" "${f}" || die
+	done
+
+
+	eapply "${FILESDIR}"/${PN}-9.0.2-sphinx-6.patch
+
 	if use binary; then
 		if use prefix; then
 			relocate_ghc "${EPREFIX}"
@@ -537,17 +577,21 @@ src_prepare() {
 
 		cd "${S}" # otherwise eapply will break
 
-		eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-		eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-		eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
-		eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
+		eapply "${FILESDIR}"/${PN}-9.0.2-CHOST-prefix.patch
+		eapply "${FILESDIR}"/${PN}-9.0.2-darwin.patch
+		# Fixes panic when compiling some packages
+		# https://github.com/gentoo-haskell/gentoo-haskell/issues/1250#issuecomment-1044257595
+		# https://gitlab.haskell.org/ghc/ghc/-/issues/21097
+		eapply "${FILESDIR}/${PN}-9.0.2-modorigin-semigroup.patch"
+		# Needed for testing with python-3.10
+		use test && eapply "${FILESDIR}/${PN}-9.0.2-fix-tests-python310.patch"
 		eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch
-		eapply "${FILESDIR}"/${PN}-8.10.5-modorigin-verbose-conflict.patch
-		eapply "${FILESDIR}"/${PN}-8.10.6-aclocal.patch
-
-		# a bunch of crosscompiler patches
-		# needs newer version:
-		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+		eapply "${FILESDIR}"/${PN}-9.0.2-disable-unboxed-arrays.patch
+		eapply "${FILESDIR}"/${PN}-9.0.2-llvm-13.patch
+		eapply "${FILESDIR}"/${PN}-9.0.2-llvm-14.patch
+		eapply "${FILESDIR}"/latomic-subword
+		eapply "${WORKDIR}"/${P}-riscv64-llvm.patch
+		eapply "${FILESDIR}"/${PN}-9.0.2-fptools.patch # clang-16 workaround
 
 		# mingw32 target
 		pushd "${S}/libraries/Win32"
@@ -626,7 +670,7 @@ src_configure() {
 			export PATH="${WORKDIR}/usr/bin:${PATH}"
 		fi
 
-		echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
+		echo "BIGNUM_BACKEND = $(usex gmp gmp native)" >> mk/build.mk
 
 		# don't strip anything. Very useful when stage2 SIGSEGVs on you
 		echo "STRIP_CMD = :" >> mk/build.mk
@@ -695,7 +739,8 @@ src_configure() {
 		econf ${econf_args[@]} \
 			--enable-bootstrap-with-devel-snapshot \
 			$(use_enable elfutils dwarf-unwind) \
-			$(use_enable numa)
+			$(use_enable numa) \
+			$(use_enable unregisterised)
 
 		if [[ ${PV} == *9999* ]]; then
 			GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
@@ -752,6 +797,8 @@ src_install() {
 		#           '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
 		emake -j1 install DESTDIR="${D}"
 
+		use llvm && llvmize "${ED}/usr/bin"
+
 		# Skip for cross-targets as they all share target location:
 		# /usr/share/doc/ghc-9999/
 		if ! is_crosscompile; then


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2023-02-21  5:13 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2023-02-21  5:13 UTC (permalink / raw
  To: gentoo-commits

commit:     2c82a2b2c99a1c872ae3905c8a867fa576159523
Author:     hololeap <hololeap <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Wed Feb  8 01:11:09 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 21 05:13:27 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c82a2b2

dev-lang/ghc: Differentiate glibc vs musl binaries

GHC binaries built for glibc do not seem to play nice on musl systems.
This separates the two so musl binaries can later be built/uploaded.

Bug: https://github.com/gentoo-haskell/gentoo-haskell/issues/1368
Signed-off-by: hololeap <hololeap <AT> users.noreply.github.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/ghc-8.10.6-r2.ebuild | 84 +++++++++++++++++++++++++++-----------
 dev-lang/ghc/ghc-9.0.2-r3.ebuild  | 85 ++++++++++++++++++++++++++++-----------
 2 files changed, 122 insertions(+), 47 deletions(-)

diff --git a/dev-lang/ghc/ghc-8.10.6-r2.ebuild b/dev-lang/ghc/ghc-8.10.6-r2.ebuild
index a6c5e39b7c68..d3def7c1d0a9 100644
--- a/dev-lang/ghc/ghc-8.10.6-r2.ebuild
+++ b/dev-lang/ghc/ghc-8.10.6-r2.ebuild
@@ -25,36 +25,72 @@ HOMEPAGE="https://www.haskell.org/ghc/"
 arch_binaries=""
 
 BIN_PV=${PV}
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# Differentiate glibc/musl
+
+#glibc_binaries="$glibc_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+glibc_binaries="$glibc_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#glibc_binaries="$glibc_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#glibc_binaries="$glibc_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+#glibc_binaries="$glibc_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#glibc_binaries="$glibc_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#glibc_binaries="$glibc_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#glibc_binaries="$glibc_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
+#glibc_binaries="$glibc_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+glibc_binaries="$glibc_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+#musl_binaries="$musl_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#musl_binaries="$musl_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-musl.tbz2 )"
+#musl_binaries="$musl_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-musl.tbz2 )"
+#musl_binaries="$musl_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-musl.tbz2 )"
+#musl_binaries="$musl_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#musl_binaries="$musl_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#musl_binaries="$musl_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#musl_binaries="$musl_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-musl.tbz2 ) )"
+#musl_binaries="$musl_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+#musl_binaries="$musl_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-musl.tbz2 )"
+
+[[ -n $glibc_binaries ]] && arch_binaries="$arch_binaries elibc_glibc? ( $glibc_binaries )"
+[[ -n $musl_binaries ]] && arch_binaries="$arch_binaries elibc_musl? ( $musl_binaries )"
 
 # various ports:
 #arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
 
 # 0 - yet
 yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		#arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		#ppc64)
-		#	use big-endian && return 0
-		#	return 0
-		#	;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
+	case "${ELIBC}" in
+		glibc)
+			case "${ARCH}" in
+				#alpha) return 0 ;;
+				#arm64) return 0 ;;
+				#arm) return 0 ;;
+				amd64) return 0 ;;
+				#ia64) return 0 ;;
+				#ppc) return 0 ;;
+				#ppc64)
+				#	use big-endian || return 0
+				#	;;
+				#sparc) return 0 ;;
+				x86) return 0 ;;
+				*) return 1 ;;
+			esac
+			;;
+		musl)
+			case "${ARCH}" in
+				#alpha) return 0 ;;
+				#arm64) return 0 ;;
+				#arm) return 0 ;;
+				#amd64) return 0 ;;
+				#ia64) return 0 ;;
+				#ppc) return 0 ;;
+				#ppc64)
+				#	use big-endian || return 0
+				#	;;
+				#sparc) return 0 ;;
+				#x86) return 0 ;;
+				*) return 1 ;;
+			esac
+			;;
 		*) return 1 ;;
 	esac
 }

diff --git a/dev-lang/ghc/ghc-9.0.2-r3.ebuild b/dev-lang/ghc/ghc-9.0.2-r3.ebuild
index cf9330be391d..fc779d53836d 100644
--- a/dev-lang/ghc/ghc-9.0.2-r3.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2-r3.ebuild
@@ -25,38 +25,77 @@ HOMEPAGE="https://www.haskell.org/ghc/"
 arch_binaries=""
 
 BIN_PV=${PV}
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-arch_binaries="$arch_binaries arm64? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tar.gz )"
-arch_binaries="$arch_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-gnu-r1.tbz2 )"
-#arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-arch_binaries="$arch_binaries ppc64? (
+
+# Differentiate glibc/musl
+
+#glibc_binaries="$glibc_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+glibc_binaries="$glibc_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-gnu-r1.tbz2 )"
+#glibc_binaries="$glibc_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+glibc_binaries="$glibc_binaries arm64? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tar.gz )"
+#glibc_binaries="$glibc_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#glibc_binaries="$glibc_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#glibc_binaries="$glibc_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+glibc_binaries="$glibc_binaries ppc64? (
 	big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64-unknown-linux-gnu.tar.gz )
 	!big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tar.gz )
 )"
-arch_binaries="$arch_binaries riscv? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-riscv64-unknown-linux-gnu.tar.gz )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://eidetic.codes/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+glibc_binaries="$glibc_binaries riscv? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-riscv64-unknown-linux-gnu.tar.gz )"
+#glibc_binaries="$glibc_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+glibc_binaries="$glibc_binaries x86? ( https://eidetic.codes/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+#musl_binaries="$musl_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#musl_binaries="$musl_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-musl.tbz2 )"
+#musl_binaries="$musl_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-musl.tbz2 )"
+#musl_binaries="$musl_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-musl.tbz2 )"
+#musl_binaries="$musl_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#musl_binaries="$musl_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#musl_binaries="$musl_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#musl_binaries="$musl_binaries ppc64? ( !big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64le-unknown-linux-musl.tar.gz ) )"
+#musl_binaries="$musl_binaries riscv? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-riscv64-unknown-linux-musl.tar.gz )"
+#musl_binaries="$musl_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+#musl_binaries="$musl_binaries x86? ( https://eidetic.codes/ghc-bin-${PV}-i686-pc-linux-musl.tbz2 )"
+
+[[ -n $glibc_binaries ]] && arch_binaries="$arch_binaries elibc_glibc? ( $glibc_binaries )"
+[[ -n $musl_binaries ]] && arch_binaries="$arch_binaries elibc_musl? ( $musl_binaries )"
 
 # various ports:
 #arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
 
 # 0 - yet
 yet_binary() {
-	case "${ARCH}" in
-		#alpha) return 0 ;;
-		arm64) return 0 ;;
-		#arm) return 0 ;;
-		amd64) return 0 ;;
-		#ia64) return 0 ;;
-		#ppc) return 0 ;;
-		ppc64) return 0 ;;
-		riscv) return 0 ;;
-		#sparc) return 0 ;;
-		x86) return 0 ;;
-		*) return 1 ;;
+	case "${ELIBC}" in
+		glibc)
+			case "${ARCH}" in
+				#alpha) return 0 ;;
+				arm64) return 0 ;;
+				#arm) return 0 ;;
+				amd64) return 0 ;;
+				#ia64) return 0 ;;
+				#ppc) return 0 ;;
+				ppc64) return 0 ;;
+				riscv) return 0 ;;
+				#sparc) return 0 ;;
+				x86) return 0 ;;
+				*) return 1 ;;
+			esac
+			;;
+		musl)
+			case "${ARCH}" in
+				#alpha) return 0 ;;
+				#arm64) return 0 ;;
+				#arm) return 0 ;;
+				#amd64) return 0 ;;
+				#ia64) return 0 ;;
+				#ppc) return 0 ;;
+				#ppc64)
+				#	use big-endian || return 0
+				#	;;
+				#riscv) return 0 ;;
+				#sparc) return 0 ;;
+				#x86) return 0 ;;
+				*) return 1 ;;
+			esac
+			;;
 	esac
 }
 


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2023-03-17 18:23 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2023-03-17 18:23 UTC (permalink / raw
  To: gentoo-commits

commit:     1f63cdb1fb9d4f895d79d531b0fd3206760d75cc
Author:     hololeap <hololeap <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Wed Mar 15 23:45:16 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 17 18:22:26 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f63cdb1

dev-lang/ghc: Stabilize for amd64

Signed-off-by: hololeap <hololeap <AT> users.noreply.github.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/ghc-9.0.2-r4.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-lang/ghc/ghc-9.0.2-r4.ebuild b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
index 49fe791713c5..4095e9d55bf9 100644
--- a/dev-lang/ghc/ghc-9.0.2-r4.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
@@ -122,7 +122,7 @@ BUMP_LIBRARIES=(
 
 LICENSE="BSD"
 SLOT="0/${PV}"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="amd64 ~x86"
 IUSE="big-endian +doc elfutils ghcbootstrap ghcmakebinary +gmp llvm numa profile test unregisterised"
 IUSE+=" binary"
 RESTRICT="!test? ( test )"


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2023-03-17 21:54 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2023-03-17 21:54 UTC (permalink / raw
  To: gentoo-commits

commit:     493985779d8fcaeadc2085253fb53fee4a828904
Author:     Matoro Mahri <matoro <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Wed Mar 15 14:47:03 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 17 21:51:49 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49398577

dev-lang/ghc: add arm64, ppc64, riscv binaries for 9.0.2-r4

Bug: https://bugs.gentoo.org/893524
Signed-off-by: Matoro Mahri <matoro <AT> users.noreply.github.com>
Closes: https://github.com/gentoo/gentoo/pull/30136
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/Manifest            |  4 ++++
 dev-lang/ghc/ghc-9.0.2-r4.ebuild | 21 ++++++++++-----------
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 67e7a921c719..9b587a8666a5 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -5,12 +5,16 @@ DIST ghc-9.0.2-src.tar.xz 27270396 BLAKE2B 0a73d910d3ef11161f895849025fe37ce2319
 DIST ghc-9.0.2-testsuite.tar.xz 2403564 BLAKE2B 0e7f6fefb9c972f94073aca8b15147913ffa8d3cd3ff7fc63ef7e20b4efd8b443cf21f12e1ab0f5044790f6d8af6cf7788bda85a21b2f356ddface86eb896670 SHA512 b2375500ae837d74af8085d099899b5a7a589c59bdcc033ca0bd6e00f33c4f8d90b481e0c7c3de113e607fcfafdfe8edde4713e6d242b2d4ee87df2eb960c9c7
 DIST ghc-bin-8.10.6-r3-i686-pc-linux-gnu.gpkg.tar 73062400 BLAKE2B c0701c16434ae5918f5ec1c55ab06aa036b98947f0f68c58aaa59b2a23ebb408f60f1886c76271351f2e99a334d6e1feeb47b6c4c14c09040b197eebbbcf3142 SHA512 d75bb6d06d32a5f60b020e9d8d77485ea8c391fd88a4583d0ddfd33a0e75506dc23b736fa6a15da25116c6c90c53b2d75dae38935581c5145d5b247d3c19f2a6
 DIST ghc-bin-8.10.6-r3-x86_64-pc-linux-gnu.gpkg.tar 123996160 BLAKE2B 3279a3f312225cae30196467b6f61b749f8ea037b2b65adaafdea1668c81a5ed402bd3acedc02aaee371a6d27c3c01c0f4c837bb9058a0ed8b61715afab5ccc9 SHA512 ea24551137b5057a2c29e0bd9a22ce247669dc38bcebac7ff3bac746b1fc9bd46b1fe2d894fd862745bb97af0d92be2a0563c18fc29e7565c5506552edb0c3e1
+DIST ghc-bin-9.0.2-aarch64-unknown-linux-gnu-r4.tar.gz 219367919 BLAKE2B 5aefb9e8bd391d14c33e1eb1429d85a92ae81d32d70505bd11acdd972380bca0a901e3a3ecedec76e7ca45b0c3fb68912919246174f45d32b9d694fd3862f995 SHA512 a49361001d5be9163326c6b3461fa3492dbe61a0e398309421bda1a2c9c92a06be829d3075a9722d787aad22b0a4e3c96e13e7dc2103cc4c4116d73306a2cd88
 DIST ghc-bin-9.0.2-aarch64-unknown-linux-gnu.tar.gz 304621314 BLAKE2B d38b8571d41b5703da6b29f43664293761865166a7e3ab6b9c4b039f1af15faa4aa2013a32eb00059d6e595984895762eadff7b62141157d2dea6eb9b035138d SHA512 94e0e00329a18b494b509b3f8190cf6fed2399a2ac2d2d96fdfd90bf5dbeb8db68b6759f719ad85f8873961b0e983ff0006ce0bf109e96462169cbd9fa7b6784
 DIST ghc-bin-9.0.2-i686-pc-linux-gnu.tbz2 123509908 BLAKE2B 45614984803a7bfa266f99d4adb4b5f2ab7b9e5e89c6ecd501296fc99a1d96e798ccb9c832f8dcb15fff9725beb918a7b63e62ff13f59b6506a2ef17930c45d2 SHA512 e0b7f4474c16f0763a2f787027fbdfeb3125b48c987fa1196bc189fefad9f0bfa2806da62af46d61ca911f5275b578076e2b326acf39e0894a8daa9deda0843a
+DIST ghc-bin-9.0.2-powerpc64-unknown-linux-gnu-r4.tar.gz 233090744 BLAKE2B 50c911551b1b9d3ff7cca7fea59fafce394b0f0159ef2cd397842cc577297d743487458ab30b07e382d07b08b4b4da4b079a18902acafb37e84aab4390741b1e SHA512 ad10c59e587d46ca5a4e59bf63551d1a0858b37ee8b0f4e376f5b689baa600095e48b5653758f14487a82d5972f934dcac120f3c3e5ddf562f50dcfc0abd2065
 DIST ghc-bin-9.0.2-powerpc64-unknown-linux-gnu.tar.gz 235636284 BLAKE2B 878ac300cca5d2cbc5cb21dbb347da755b4027cbf63ec77464740854fa8010569de5e03acef67cd877da13665c906b2fd04e24e226e9eb39b57ba979093c732b SHA512 28f096e965abdac9cc370c882639f10285b9073ba5332f7af215eccff948e41c01c3d6bb3bc8e3b4e809e12867a95b49f82dd76e0090b974088f75ab9d1bc199
+DIST ghc-bin-9.0.2-powerpc64le-unknown-linux-gnu-r4.tar.gz 209612394 BLAKE2B 8523996fb7e551c302a0432367086cc04d55e5030f913db9d8bb83d48878bff1912cd7c7850503369c3881ff9d64b16dd313446c33bcd90acd7a22b4821d0a5b SHA512 f05bc0da23b650b410958e33e934c68e77f01d225051103aa7bfaeb54254d7978d836ce3b246f8958d1d80c88c5e6f25330a9b3345690367a69da614e8b2d25b
 DIST ghc-bin-9.0.2-powerpc64le-unknown-linux-gnu.tar.gz 275226316 BLAKE2B 10ade2359432b0ede7431ee543f0ff47f4b203465d81719da579ad63ca467359eb9fcf7336a12feb6ff75a480f349576ff8ea1b4ebe1094fff228ae4fd00d6e0 SHA512 64b4c84d149358b8d3a6cb29a6d3a75af11e7b14e6d910c9789c9949262e4ed2a17f8a0d1e5dd297121957061fe2395d6f43acae6b4ab28851e3cd414cd9c89c
 DIST ghc-bin-9.0.2-r4-i686-pc-linux-gnu.gpkg.tar 81059840 BLAKE2B 655405cd402cc7af424baf5b715f64af3ce97d474c883c618cd8e6fae40274dc6f584872c607cbe3553141a199729df98ddbdb5947a50520b67f53946f20d25a SHA512 401ab9ae646e18519ba1b06705944862d3f802068c4eae19fc019899eb14ceef95fa57e51b5527e5c5314c2433aff7e418e1d35c2de425c142c34e8fa21a5f46
 DIST ghc-bin-9.0.2-r4-x86_64-pc-linux-gnu.gpkg.tar 123955200 BLAKE2B b1f45eea658f496997e63c21e3ef190749c122ee3a058d5f25fd90a2e2c33841817c540b9bf87e27e6981d9fb28d9201454217fa8ba9c1d9fc4ccf3d20652158 SHA512 06a240f7117f30179073e075634510d9ffe880010de16c93a001dce7b3020666b0b26d51c2c08cdaee7fc6513d9ffc7082f20b233d62b9149419abba2b4bd4ee
+DIST ghc-bin-9.0.2-riscv64-unknown-linux-gnu-r4.tar.gz 314508381 BLAKE2B 8895c2126d6f5768f58d153005fe4c375c84d9fffa2c57da2186399b18e4da2c287b5e4351e94961b55490a1856c27c4c325c514bbba9afa06b8d7f90f1e241d SHA512 a7b609c10e96dc36d10f576c76317be91da848bfd7b7069e099325e99fd38232a6269deef9ca6556ee3b1b63fae2b530b67ef13ead486d8056b75e3005e94283
 DIST ghc-bin-9.0.2-riscv64-unknown-linux-gnu.tar.gz 313475807 BLAKE2B a5e1bbd4630eaff63dd01d79fdcb26a663771c0241d3211aa3a0033cb58addbe8e696177500ac06ae727fc645bfc6f16a3df763a6a0ae039b8823bcbfb9918bb SHA512 5e462f6f9d3f3507b3e09230729faa2a3e1fa92a8024fac602d75b804fff25f27e335871658f4b7b2c671f9e066373ca0285720da315a6c22f6f2c9c3cfea927
 DIST ghc-bin-9.0.2-x86_64-pc-linux-gnu-r1.tbz2 121347519 BLAKE2B 6bd41cdb8ba1661735e46df4709888e6461cff969678716c82681a0a0b0e8d0a32532a070f52efb0ab99ca126207998e8883d01902071e797a7a0f19881d5925 SHA512 c7de43577fd97e6fbde7bbffba4e1d2b83cdda405cff46f95c9eff23260542b426091d8dba75605d81ed41740a793a409e7448538e5adc7a391a901f20e8f2e4
 DIST process-1.6.16.0.tar.gz 87354 BLAKE2B 8c2977d6801faef8825ed35f058a6207a518f72eb87ac3144f630bc028f4753cefb9ed4d3fc29185438bcb4f38d33f5a45aebec6a8101e4cdc1b3570ada2e5dc SHA512 1663f2746a05a5a4c29d249db54eaa49edbbadfe8d189eab02276c3f6f3d6b84c81cc4333318c42c7a7265638402cb13276f08aeea134a7f5dd98da050a34341

diff --git a/dev-lang/ghc/ghc-9.0.2-r4.ebuild b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
index 4095e9d55bf9..967df05f1f6d 100644
--- a/dev-lang/ghc/ghc-9.0.2-r4.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
@@ -32,15 +32,14 @@ BIN_PV=${PV}
 #glibc_binaries="$glibc_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
 glibc_binaries+=" amd64? ( https://eidetic.codes/${PN}-bin-${PVR}-x86_64-pc-linux-gnu.gpkg.tar )"
 #glibc_binaries="$glibc_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#glibc_binaries="$glibc_binaries arm64? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tar.gz )"
+glibc_binaries="$glibc_binaries arm64? ( https://github.com/matoro/ghc/releases/download/${PVR}/ghc-bin-${PV}-aarch64-unknown-linux-gnu-r4.tar.gz )"
 #glibc_binaries="$glibc_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #glibc_binaries="$glibc_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#glibc_binaries="$glibc_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#glibc_binaries="$glibc_binaries ppc64? (
-#	big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64-unknown-linux-gnu.tar.gz )
-#	!big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tar.gz )
-#)"
-#glibc_binaries="$glibc_binaries riscv? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-riscv64-unknown-linux-gnu.tar.gz )"
+glibc_binaries="$glibc_binaries ppc64? (
+	big-endian? ( https://github.com/matoro/ghc/releases/download/${PVR}/ghc-bin-${PV}-powerpc64-unknown-linux-gnu-r4.tar.gz )
+	!big-endian? ( https://github.com/matoro/ghc/releases/download/${PVR}/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu-r4.tar.gz )
+)"
+glibc_binaries="$glibc_binaries riscv? ( https://github.com/matoro/ghc/releases/download/${PVR}/ghc-bin-${PV}-riscv64-unknown-linux-gnu-r4.tar.gz )"
 #glibc_binaries="$glibc_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
 glibc_binaries+=" x86? ( https://eidetic.codes/${PN}-bin-${PVR}-i686-pc-linux-gnu.gpkg.tar )"
 
@@ -68,13 +67,13 @@ yet_binary() {
 		glibc)
 			case "${ARCH}" in
 				#alpha) return 0 ;;
-				#arm64) return 0 ;;
+				arm64) return 0 ;;
 				#arm) return 0 ;;
 				amd64) return 0 ;;
 				#ia64) return 0 ;;
 				#ppc) return 0 ;;
-				#ppc64) return 0 ;;
-				#riscv) return 0 ;;
+				ppc64) return 0 ;;
+				riscv) return 0 ;;
 				#sparc) return 0 ;;
 				x86) return 0 ;;
 				*) return 1 ;;
@@ -122,7 +121,7 @@ BUMP_LIBRARIES=(
 
 LICENSE="BSD"
 SLOT="0/${PV}"
-KEYWORDS="amd64 ~x86"
+KEYWORDS="amd64 ~arm64 ~ppc64 ~riscv ~x86"
 IUSE="big-endian +doc elfutils ghcbootstrap ghcmakebinary +gmp llvm numa profile test unregisterised"
 IUSE+=" binary"
 RESTRICT="!test? ( test )"


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2023-04-10  5:09 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2023-04-10  5:09 UTC (permalink / raw
  To: gentoo-commits

commit:     9e204b058c45370d31b4ea68e59bae65990fc2cc
Author:     Matoro Mahri <matoro <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Mon Mar 27 00:16:04 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Apr 10 05:08:30 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e204b05

dev-lang/ghc: repack arm64, ppc64, riscv tarballs

The new gpkg changes actually changed the expexted structure of the
bootstrap binpkgs, now under ${P}/image.

Closes: https://bugs.gentoo.org/902007
Signed-off-by: Matoro Mahri <matoro <AT> users.noreply.github.com>
Closes: https://github.com/gentoo/gentoo/pull/30358
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/Manifest            | 8 ++++----
 dev-lang/ghc/ghc-9.0.2-r4.ebuild | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 9b587a8666a5..9e19de846f92 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -5,16 +5,16 @@ DIST ghc-9.0.2-src.tar.xz 27270396 BLAKE2B 0a73d910d3ef11161f895849025fe37ce2319
 DIST ghc-9.0.2-testsuite.tar.xz 2403564 BLAKE2B 0e7f6fefb9c972f94073aca8b15147913ffa8d3cd3ff7fc63ef7e20b4efd8b443cf21f12e1ab0f5044790f6d8af6cf7788bda85a21b2f356ddface86eb896670 SHA512 b2375500ae837d74af8085d099899b5a7a589c59bdcc033ca0bd6e00f33c4f8d90b481e0c7c3de113e607fcfafdfe8edde4713e6d242b2d4ee87df2eb960c9c7
 DIST ghc-bin-8.10.6-r3-i686-pc-linux-gnu.gpkg.tar 73062400 BLAKE2B c0701c16434ae5918f5ec1c55ab06aa036b98947f0f68c58aaa59b2a23ebb408f60f1886c76271351f2e99a334d6e1feeb47b6c4c14c09040b197eebbbcf3142 SHA512 d75bb6d06d32a5f60b020e9d8d77485ea8c391fd88a4583d0ddfd33a0e75506dc23b736fa6a15da25116c6c90c53b2d75dae38935581c5145d5b247d3c19f2a6
 DIST ghc-bin-8.10.6-r3-x86_64-pc-linux-gnu.gpkg.tar 123996160 BLAKE2B 3279a3f312225cae30196467b6f61b749f8ea037b2b65adaafdea1668c81a5ed402bd3acedc02aaee371a6d27c3c01c0f4c837bb9058a0ed8b61715afab5ccc9 SHA512 ea24551137b5057a2c29e0bd9a22ce247669dc38bcebac7ff3bac746b1fc9bd46b1fe2d894fd862745bb97af0d92be2a0563c18fc29e7565c5506552edb0c3e1
-DIST ghc-bin-9.0.2-aarch64-unknown-linux-gnu-r4.tar.gz 219367919 BLAKE2B 5aefb9e8bd391d14c33e1eb1429d85a92ae81d32d70505bd11acdd972380bca0a901e3a3ecedec76e7ca45b0c3fb68912919246174f45d32b9d694fd3862f995 SHA512 a49361001d5be9163326c6b3461fa3492dbe61a0e398309421bda1a2c9c92a06be829d3075a9722d787aad22b0a4e3c96e13e7dc2103cc4c4116d73306a2cd88
 DIST ghc-bin-9.0.2-aarch64-unknown-linux-gnu.tar.gz 304621314 BLAKE2B d38b8571d41b5703da6b29f43664293761865166a7e3ab6b9c4b039f1af15faa4aa2013a32eb00059d6e595984895762eadff7b62141157d2dea6eb9b035138d SHA512 94e0e00329a18b494b509b3f8190cf6fed2399a2ac2d2d96fdfd90bf5dbeb8db68b6759f719ad85f8873961b0e983ff0006ce0bf109e96462169cbd9fa7b6784
 DIST ghc-bin-9.0.2-i686-pc-linux-gnu.tbz2 123509908 BLAKE2B 45614984803a7bfa266f99d4adb4b5f2ab7b9e5e89c6ecd501296fc99a1d96e798ccb9c832f8dcb15fff9725beb918a7b63e62ff13f59b6506a2ef17930c45d2 SHA512 e0b7f4474c16f0763a2f787027fbdfeb3125b48c987fa1196bc189fefad9f0bfa2806da62af46d61ca911f5275b578076e2b326acf39e0894a8daa9deda0843a
-DIST ghc-bin-9.0.2-powerpc64-unknown-linux-gnu-r4.tar.gz 233090744 BLAKE2B 50c911551b1b9d3ff7cca7fea59fafce394b0f0159ef2cd397842cc577297d743487458ab30b07e382d07b08b4b4da4b079a18902acafb37e84aab4390741b1e SHA512 ad10c59e587d46ca5a4e59bf63551d1a0858b37ee8b0f4e376f5b689baa600095e48b5653758f14487a82d5972f934dcac120f3c3e5ddf562f50dcfc0abd2065
 DIST ghc-bin-9.0.2-powerpc64-unknown-linux-gnu.tar.gz 235636284 BLAKE2B 878ac300cca5d2cbc5cb21dbb347da755b4027cbf63ec77464740854fa8010569de5e03acef67cd877da13665c906b2fd04e24e226e9eb39b57ba979093c732b SHA512 28f096e965abdac9cc370c882639f10285b9073ba5332f7af215eccff948e41c01c3d6bb3bc8e3b4e809e12867a95b49f82dd76e0090b974088f75ab9d1bc199
-DIST ghc-bin-9.0.2-powerpc64le-unknown-linux-gnu-r4.tar.gz 209612394 BLAKE2B 8523996fb7e551c302a0432367086cc04d55e5030f913db9d8bb83d48878bff1912cd7c7850503369c3881ff9d64b16dd313446c33bcd90acd7a22b4821d0a5b SHA512 f05bc0da23b650b410958e33e934c68e77f01d225051103aa7bfaeb54254d7978d836ce3b246f8958d1d80c88c5e6f25330a9b3345690367a69da614e8b2d25b
 DIST ghc-bin-9.0.2-powerpc64le-unknown-linux-gnu.tar.gz 275226316 BLAKE2B 10ade2359432b0ede7431ee543f0ff47f4b203465d81719da579ad63ca467359eb9fcf7336a12feb6ff75a480f349576ff8ea1b4ebe1094fff228ae4fd00d6e0 SHA512 64b4c84d149358b8d3a6cb29a6d3a75af11e7b14e6d910c9789c9949262e4ed2a17f8a0d1e5dd297121957061fe2395d6f43acae6b4ab28851e3cd414cd9c89c
+DIST ghc-bin-9.0.2-r4-aarch64-unknown-linux-gnu.tar.gz 221699967 BLAKE2B c6e34b23a9664b6dc7d13f939063c34665c558b2596e3446abd9a8f90e9ad586f515e1703c36d269f7fb4a36a85f497e9f4d356f01ede7a7a614b3cd4fbf0dbe SHA512 d9f381b417ee740c9bba9508d5ccca2a6bffdd32c6262d76f254a21cf7505d2aaa5695c0354ee9e8fb672b90ae67af6205cdd2fe6ad6aa5d610c760d59392b62
 DIST ghc-bin-9.0.2-r4-i686-pc-linux-gnu.gpkg.tar 81059840 BLAKE2B 655405cd402cc7af424baf5b715f64af3ce97d474c883c618cd8e6fae40274dc6f584872c607cbe3553141a199729df98ddbdb5947a50520b67f53946f20d25a SHA512 401ab9ae646e18519ba1b06705944862d3f802068c4eae19fc019899eb14ceef95fa57e51b5527e5c5314c2433aff7e418e1d35c2de425c142c34e8fa21a5f46
+DIST ghc-bin-9.0.2-r4-powerpc64-unknown-linux-gnu.tar.gz 233834058 BLAKE2B 32ee779c4567472799f985102cdf0a6a5dfb3984795b6efafe6a6326933e1d0128260012cbe5e0e20c71becd4d2e589e32f43882e66b479ef4c34358d7bd8e93 SHA512 be56a92c2f5f00f1f0b22f02745d836ac3706fc207932c71277c1076515ed4fd1875372844b4cbb0996afec5fc122255103ac03c65c99d087615005f1aa63732
+DIST ghc-bin-9.0.2-r4-powerpc64le-unknown-linux-gnu.tar.gz 210668658 BLAKE2B fe33a43ea38e5fe17a003e60f29458f0dc5115f92db311dff11b2ce3fa1a9fc0304ad93c76535fb8e4ce44bb703f8a18638149f36b076c84f5c44385486722bd SHA512 12e04c29873ddd80ff259998121b3ce4b9dcdd1157cbb38ce8ac0234c6aaa0c156b0cc78f95af86288e6f595f9e010a1db88ba737e27773b404ed6129e58044f
+DIST ghc-bin-9.0.2-r4-riscv64-unknown-linux-gnu.tar.gz 315182159 BLAKE2B 95ee2f82eb706b42a0a3303038cf28166ac1e766a5f38402f833830c311f02773881b5341d6d7a1772fdc616522b1448a740caf34e4e534b5d00fedeb23604de SHA512 dd143f8b379e8ca04ab6254aa19978a3a8caf61322e2e3b2bae7488025949845aa5d5fc0e3124ff360172c2b47e4a33df4d1d55c8a976c96b552cd3c930b2fad
 DIST ghc-bin-9.0.2-r4-x86_64-pc-linux-gnu.gpkg.tar 123955200 BLAKE2B b1f45eea658f496997e63c21e3ef190749c122ee3a058d5f25fd90a2e2c33841817c540b9bf87e27e6981d9fb28d9201454217fa8ba9c1d9fc4ccf3d20652158 SHA512 06a240f7117f30179073e075634510d9ffe880010de16c93a001dce7b3020666b0b26d51c2c08cdaee7fc6513d9ffc7082f20b233d62b9149419abba2b4bd4ee
-DIST ghc-bin-9.0.2-riscv64-unknown-linux-gnu-r4.tar.gz 314508381 BLAKE2B 8895c2126d6f5768f58d153005fe4c375c84d9fffa2c57da2186399b18e4da2c287b5e4351e94961b55490a1856c27c4c325c514bbba9afa06b8d7f90f1e241d SHA512 a7b609c10e96dc36d10f576c76317be91da848bfd7b7069e099325e99fd38232a6269deef9ca6556ee3b1b63fae2b530b67ef13ead486d8056b75e3005e94283
 DIST ghc-bin-9.0.2-riscv64-unknown-linux-gnu.tar.gz 313475807 BLAKE2B a5e1bbd4630eaff63dd01d79fdcb26a663771c0241d3211aa3a0033cb58addbe8e696177500ac06ae727fc645bfc6f16a3df763a6a0ae039b8823bcbfb9918bb SHA512 5e462f6f9d3f3507b3e09230729faa2a3e1fa92a8024fac602d75b804fff25f27e335871658f4b7b2c671f9e066373ca0285720da315a6c22f6f2c9c3cfea927
 DIST ghc-bin-9.0.2-x86_64-pc-linux-gnu-r1.tbz2 121347519 BLAKE2B 6bd41cdb8ba1661735e46df4709888e6461cff969678716c82681a0a0b0e8d0a32532a070f52efb0ab99ca126207998e8883d01902071e797a7a0f19881d5925 SHA512 c7de43577fd97e6fbde7bbffba4e1d2b83cdda405cff46f95c9eff23260542b426091d8dba75605d81ed41740a793a409e7448538e5adc7a391a901f20e8f2e4
 DIST process-1.6.16.0.tar.gz 87354 BLAKE2B 8c2977d6801faef8825ed35f058a6207a518f72eb87ac3144f630bc028f4753cefb9ed4d3fc29185438bcb4f38d33f5a45aebec6a8101e4cdc1b3570ada2e5dc SHA512 1663f2746a05a5a4c29d249db54eaa49edbbadfe8d189eab02276c3f6f3d6b84c81cc4333318c42c7a7265638402cb13276f08aeea134a7f5dd98da050a34341

diff --git a/dev-lang/ghc/ghc-9.0.2-r4.ebuild b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
index 967df05f1f6d..b8d9e731fed2 100644
--- a/dev-lang/ghc/ghc-9.0.2-r4.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
@@ -32,14 +32,14 @@ BIN_PV=${PV}
 #glibc_binaries="$glibc_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
 glibc_binaries+=" amd64? ( https://eidetic.codes/${PN}-bin-${PVR}-x86_64-pc-linux-gnu.gpkg.tar )"
 #glibc_binaries="$glibc_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-glibc_binaries="$glibc_binaries arm64? ( https://github.com/matoro/ghc/releases/download/${PVR}/ghc-bin-${PV}-aarch64-unknown-linux-gnu-r4.tar.gz )"
+glibc_binaries="$glibc_binaries arm64? ( https://github.com/matoro/ghc/releases/download/${PVR}/ghc-bin-${PVR}-aarch64-unknown-linux-gnu.tar.gz )"
 #glibc_binaries="$glibc_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #glibc_binaries="$glibc_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
 glibc_binaries="$glibc_binaries ppc64? (
-	big-endian? ( https://github.com/matoro/ghc/releases/download/${PVR}/ghc-bin-${PV}-powerpc64-unknown-linux-gnu-r4.tar.gz )
-	!big-endian? ( https://github.com/matoro/ghc/releases/download/${PVR}/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu-r4.tar.gz )
+	big-endian? ( https://github.com/matoro/ghc/releases/download/${PVR}/ghc-bin-${PVR}-powerpc64-unknown-linux-gnu.tar.gz )
+	!big-endian? ( https://github.com/matoro/ghc/releases/download/${PVR}/ghc-bin-${PVR}-powerpc64le-unknown-linux-gnu.tar.gz )
 )"
-glibc_binaries="$glibc_binaries riscv? ( https://github.com/matoro/ghc/releases/download/${PVR}/ghc-bin-${PV}-riscv64-unknown-linux-gnu-r4.tar.gz )"
+glibc_binaries="$glibc_binaries riscv? ( https://github.com/matoro/ghc/releases/download/${PVR}/ghc-bin-${PVR}-riscv64-unknown-linux-gnu.tar.gz )"
 #glibc_binaries="$glibc_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
 glibc_binaries+=" x86? ( https://eidetic.codes/${PN}-bin-${PVR}-i686-pc-linux-gnu.gpkg.tar )"
 


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2023-05-27 15:29 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2023-05-27 15:29 UTC (permalink / raw
  To: gentoo-commits

commit:     7d3de77c8a4e3def6a8a085387e63bf670dab245
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat May 27 15:23:13 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat May 27 15:23:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d3de77c

dev-lang/ghc: fix DoubleEmptyLine

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/ghc-9.0.2-r3.ebuild | 1 -
 1 file changed, 1 deletion(-)

diff --git a/dev-lang/ghc/ghc-9.0.2-r3.ebuild b/dev-lang/ghc/ghc-9.0.2-r3.ebuild
index fc779d53836d..1891e727ac90 100644
--- a/dev-lang/ghc/ghc-9.0.2-r3.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2-r3.ebuild
@@ -502,7 +502,6 @@ src_prepare() {
 		[[ -e "${f}" ]] || ln -sf "$($(tc-getPKG_CONFIG) --cflags-only-I libffi | sed "s/-I//g" | tr -d " ")/$(basename "${f}")" "${f}" || die
 	done
 
-
 	eapply "${FILESDIR}"/${PN}-9.0.2-sphinx-6.patch
 
 	if use binary; then


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2023-10-14  0:47 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2023-10-14  0:47 UTC (permalink / raw
  To: gentoo-commits

commit:     d53d537ffcafbf92c3d364db95427303ecf6aed1
Author:     hololeap <hololeap <AT> protonmail <DOT> com>
AuthorDate: Sun Oct  8 19:56:47 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 14 00:47:05 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d53d537f

dev-lang/ghc: Use system sphinx-rtd-theme

This allows sphinx-7 to build the GHC user's guide

The upstream rtd-theme that is bundled with GHC has been updated but
none of our GHC versions contain this fix.

See: https://gitlab.haskell.org/ghc/ghc/-/commit/70526f5bd8886126f49833ef20604a2c6477780a
Closes: https://bugs.gentoo.org/906784
Signed-off-by: hololeap <hololeap <AT> protonmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/ghc-9.0.2-r4.ebuild | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/dev-lang/ghc/ghc-9.0.2-r4.ebuild b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
index 1691ba87bc87..b3d72fb4d5eb 100644
--- a/dev-lang/ghc/ghc-9.0.2-r4.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
@@ -165,6 +165,7 @@ BDEPEND="
 		app-text/docbook-xml-dtd:4.5
 		app-text/docbook-xsl-stylesheets
 		dev-python/sphinx
+		dev-python/sphinx-rtd-theme
 		>=dev-libs/libxslt-1.1.2 )
 	!ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )
 	test? ( ${PYTHON_DEPS} )
@@ -597,6 +598,22 @@ src_prepare() {
 		eapply "${FILESDIR}"/${PN}-9.0.2-fptools.patch # clang-16 workaround
 		eapply "${FILESDIR}"/${PN}-9.0.2-sphinx-6.patch
 
+		# FIXME: A hack that allows dev-python/sphinx-7 to build the docs
+		#
+		# GHC has updated the bundled version here:
+		# <https://gitlab.haskell.org/ghc/ghc/-/commit/70526f5bd8886126f49833ef20604a2c6477780a>
+		# However, the patch is difficult to apply and our versions of GHC don't
+		# have the update, so we symlink to the system version instead.
+		if use doc; then
+			local python_str="import sphinx_rtd_theme; print(sphinx_rtd_theme.__file__)"
+			local rtd_theme_dir="$(dirname $("${EPYTHON}" -c "$python_str"))"
+			local orig_rtd_theme_dir="${S}/docs/users_guide/rtd-theme"
+
+			einfo "Replacing bundled rtd-theme with dev-python/sphinx-rtd-theme"
+			rm -r "${orig_rtd_theme_dir}" || die
+			ln -s "${rtd_theme_dir}" "${orig_rtd_theme_dir}" || die
+		fi
+
 		# mingw32 target
 		pushd "${S}/libraries/Win32"
 			eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2023-10-14  0:47 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2023-10-14  0:47 UTC (permalink / raw
  To: gentoo-commits

commit:     307c665cebec04fc97c708f4215fe11344291400
Author:     hololeap <hololeap <AT> protonmail <DOT> com>
AuthorDate: Tue Oct  3 05:03:58 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 14 00:47:04 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=307c665c

dev-lang/ghc: Update PYTHON_COMPAT

Signed-off-by: hololeap <hololeap <AT> protonmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/ghc-8.10.6-r3.ebuild | 2 +-
 dev-lang/ghc/ghc-9.0.2-r3.ebuild  | 2 +-
 dev-lang/ghc/ghc-9.0.2-r4.ebuild  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev-lang/ghc/ghc-8.10.6-r3.ebuild b/dev-lang/ghc/ghc-8.10.6-r3.ebuild
index f6e13533829c..37a70a60888b 100644
--- a/dev-lang/ghc/ghc-8.10.6-r3.ebuild
+++ b/dev-lang/ghc/ghc-8.10.6-r3.ebuild
@@ -13,7 +13,7 @@ if [[ ${CTARGET} = ${CHOST} ]] ; then
 	fi
 fi
 
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{9..12} )
 inherit python-any-r1
 inherit autotools bash-completion-r1 flag-o-matic ghc-package
 inherit multiprocessing pax-utils toolchain-funcs prefix

diff --git a/dev-lang/ghc/ghc-9.0.2-r3.ebuild b/dev-lang/ghc/ghc-9.0.2-r3.ebuild
index efff65d4dd9a..6adec687c250 100644
--- a/dev-lang/ghc/ghc-9.0.2-r3.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2-r3.ebuild
@@ -13,7 +13,7 @@ if [[ ${CTARGET} = ${CHOST} ]] ; then
 	fi
 fi
 
-PYTHON_COMPAT=( python3_{9..10} )
+PYTHON_COMPAT=( python3_{9..12} )
 inherit python-any-r1
 inherit autotools bash-completion-r1 flag-o-matic ghc-package
 inherit multiprocessing pax-utils toolchain-funcs prefix

diff --git a/dev-lang/ghc/ghc-9.0.2-r4.ebuild b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
index a0423ff8e661..1691ba87bc87 100644
--- a/dev-lang/ghc/ghc-9.0.2-r4.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
@@ -13,7 +13,7 @@ if [[ ${CTARGET} = ${CHOST} ]] ; then
 	fi
 fi
 
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{9..12} )
 inherit python-any-r1
 inherit autotools bash-completion-r1 flag-o-matic ghc-package
 inherit multiprocessing pax-utils toolchain-funcs prefix


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2023-10-14  0:47 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2023-10-14  0:47 UTC (permalink / raw
  To: gentoo-commits

commit:     f6cdfe59ec13e0d30a22750ebbdd97e7693ab2b5
Author:     hololeap <hololeap <AT> protonmail <DOT> com>
AuthorDate: Tue Oct  3 05:03:54 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 14 00:46:55 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6cdfe59

dev-lang/ghc: Turn USE=doc off by default

This flag has been turned on by default historically, but has been
causing problems due to compatibility issues with newer sphinx.

Other packages in dev-lang do not have USE=doc turned on by default.

Bug: https://bugs.gentoo.org/906784
Signed-off-by: hololeap <hololeap <AT> protonmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/ghc-8.10.6-r3.ebuild | 2 +-
 dev-lang/ghc/ghc-9.0.2-r3.ebuild  | 2 +-
 dev-lang/ghc/ghc-9.0.2-r4.ebuild  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev-lang/ghc/ghc-8.10.6-r3.ebuild b/dev-lang/ghc/ghc-8.10.6-r3.ebuild
index e7ea76723be7..f6e13533829c 100644
--- a/dev-lang/ghc/ghc-8.10.6-r3.ebuild
+++ b/dev-lang/ghc/ghc-8.10.6-r3.ebuild
@@ -121,7 +121,7 @@ BUMP_LIBRARIES=(
 LICENSE="BSD"
 SLOT="0/${PV}"
 KEYWORDS="~amd64 ~x86"
-IUSE="big-endian +doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
+IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
 IUSE+=" binary"
 RESTRICT="!test? ( test )"
 

diff --git a/dev-lang/ghc/ghc-9.0.2-r3.ebuild b/dev-lang/ghc/ghc-9.0.2-r3.ebuild
index 906bca62bde6..efff65d4dd9a 100644
--- a/dev-lang/ghc/ghc-9.0.2-r3.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2-r3.ebuild
@@ -120,7 +120,7 @@ BUMP_LIBRARIES=(
 LICENSE="BSD"
 SLOT="0/${PV}"
 KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
-IUSE="big-endian +doc elfutils ghcbootstrap ghcmakebinary +gmp llvm numa profile test unregisterised"
+IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp llvm numa profile test unregisterised"
 IUSE+=" binary"
 RESTRICT="!test? ( test )"
 

diff --git a/dev-lang/ghc/ghc-9.0.2-r4.ebuild b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
index f954a9396acc..a0423ff8e661 100644
--- a/dev-lang/ghc/ghc-9.0.2-r4.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
@@ -122,7 +122,7 @@ BUMP_LIBRARIES=(
 LICENSE="BSD"
 SLOT="0/${PV}"
 KEYWORDS="amd64 ~arm64 ~ppc64 ~riscv ~x86"
-IUSE="big-endian +doc elfutils ghcbootstrap ghcmakebinary +gmp llvm numa profile test unregisterised"
+IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp llvm numa profile test unregisterised"
 IUSE+=" binary"
 RESTRICT="!test? ( test )"
 


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2023-10-14  0:47 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2023-10-14  0:47 UTC (permalink / raw
  To: gentoo-commits

commit:     f93e2f3e676dcf8d5fefeb7fa61874a3737a7840
Author:     hololeap <hololeap <AT> protonmail <DOT> com>
AuthorDate: Sun Oct  8 19:58:00 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 14 00:47:05 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f93e2f3e

dev-lang/ghc: Fix spelling errors

Signed-off-by: hololeap <hololeap <AT> protonmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/ghc-9.0.2-r4.ebuild | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev-lang/ghc/ghc-9.0.2-r4.ebuild b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
index b3d72fb4d5eb..140c6cdfed30 100644
--- a/dev-lang/ghc/ghc-9.0.2-r4.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
@@ -440,7 +440,7 @@ pkg_setup() {
 	else
 		if ! yet_binary; then
 			eerror "Please try emerging with USE=ghcbootstrap and report build"
-			eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
+			eerror "success or failure to the haskell team (haskell@gentoo.org)"
 			die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
 		fi
 	fi
@@ -738,7 +738,7 @@ src_configure() {
 		fi
 
 		if use ghcmakebinary; then
-			# When building booting libary we are trying to
+			# When building booting library we are trying to
 			# bundle or restrict most of external depends
 			# with unstable ABI:
 			#  - embed libffi (default GHC behaviour)
@@ -856,7 +856,7 @@ src_install() {
 	PKGCACHE="${package_confdir}"/package.cache
 	# copy the package.conf.d, including timestamp, save it so we can help
 	# users that have a broken package.conf.d
-	cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
+	cp -pR "${package_confdir}"{,.initial} || die "failed to backup initial package.conf.d"
 
 	# copy the package.conf, including timestamp, save it so we later can put it
 	# back before uninstalling, or when upgrading.


^ permalink raw reply related	[flat|nested] 92+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
@ 2023-11-20  7:36 Sam James
  0 siblings, 0 replies; 92+ messages in thread
From: Sam James @ 2023-11-20  7:36 UTC (permalink / raw
  To: gentoo-commits

commit:     a8b4b1ee3e226ed92520015f07c9a05f08178ac7
Author:     hololeap <hololeap <AT> protonmail <DOT> com>
AuthorDate: Sun Nov 19 21:29:42 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Nov 20 07:35:21 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8b4b1ee

dev-lang/ghc: Add binaries for less common arches

Add binaries for arm64, ppc64, and riscv

Add code to handle discrepencies between binaries uploaded by hololeap
and binaries uploaded by matoro.

Thanks-to: Matoro Mahri <matoro_gentoo <AT> matoro.tk>
Signed-off-by: hololeap <hololeap <AT> protonmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/Manifest         |  4 ++++
 dev-lang/ghc/ghc-9.2.8.ebuild | 39 ++++++++++++++++++++++++---------------
 2 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 7762a4280397..a7a87d51806f 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -9,6 +9,10 @@ DIST ghc-bin-9.0.2-r4-powerpc64-unknown-linux-gnu.tar.gz 233834058 BLAKE2B 32ee7
 DIST ghc-bin-9.0.2-r4-powerpc64le-unknown-linux-gnu.tar.gz 210668658 BLAKE2B fe33a43ea38e5fe17a003e60f29458f0dc5115f92db311dff11b2ce3fa1a9fc0304ad93c76535fb8e4ce44bb703f8a18638149f36b076c84f5c44385486722bd SHA512 12e04c29873ddd80ff259998121b3ce4b9dcdd1157cbb38ce8ac0234c6aaa0c156b0cc78f95af86288e6f595f9e010a1db88ba737e27773b404ed6129e58044f
 DIST ghc-bin-9.0.2-r4-riscv64-unknown-linux-gnu.tar.gz 315182159 BLAKE2B 95ee2f82eb706b42a0a3303038cf28166ac1e766a5f38402f833830c311f02773881b5341d6d7a1772fdc616522b1448a740caf34e4e534b5d00fedeb23604de SHA512 dd143f8b379e8ca04ab6254aa19978a3a8caf61322e2e3b2bae7488025949845aa5d5fc0e3124ff360172c2b47e4a33df4d1d55c8a976c96b552cd3c930b2fad
 DIST ghc-bin-9.0.2-r4-x86_64-pc-linux-gnu.gpkg.tar 123955200 BLAKE2B b1f45eea658f496997e63c21e3ef190749c122ee3a058d5f25fd90a2e2c33841817c540b9bf87e27e6981d9fb28d9201454217fa8ba9c1d9fc4ccf3d20652158 SHA512 06a240f7117f30179073e075634510d9ffe880010de16c93a001dce7b3020666b0b26d51c2c08cdaee7fc6513d9ffc7082f20b233d62b9149419abba2b4bd4ee
+DIST ghc-bin-9.2.8-aarch64-unknown-linux-gnu.gpkg.tar 147927040 BLAKE2B 83aeea2797b6c3a2d12ee191266a6241ed55a87130db1062dfe0e9ad81d7546fdf1ed91efbca3fa3fef67befbc7e4dc3541701e5e5ae53339115567d4ca9a436 SHA512 57112c28f2154e8255437c9a0a0f098b5fd61687fc6d0bb7c9f98895cca0cc744c1543cefcfd0525a46a73c869d377d95e768d41e4652f1e4f65b6db64aa1858
 DIST ghc-bin-9.2.8-i686-pc-linux-gnu.gpkg.tar 105441280 BLAKE2B 76d5fdb846d91d37b0b5706f1efbdd2833aac2d926fb4036845e36470fcfc6ad0143c492908c6cc5190dc3951c647e0584956395fca51b8f357b365ad23b496a SHA512 c19819bc4d8f1208fa28acc054cbb2d490b2b1c55bf55f8d4069474b4d58c931ff1999b593000b7f0b5b7169e6b71ad26d5d0d3480d8ecdbcc5e2c58116ec3d5
+DIST ghc-bin-9.2.8-powerpc64-unknown-linux-gnu.gpkg.tar 213811200 BLAKE2B f8bda2cb88500b9122d838579b94dd3f77f3ae0df8617e1fc394a73c31d2586bd887c3a879aa166c19f38bfce50868f8381c3624f839b1da963d4f6f7ddc1bce SHA512 ca736cd3532a02acc2f19a177fe2572abc99dd405a60380ed4968905823174373bd5c79966b2d3e03ff9b67859868e74bfba625e69bb3951d11a23affd84ae2b
+DIST ghc-bin-9.2.8-powerpc64le-unknown-linux-gnu.gpkg.tar 188190720 BLAKE2B bf6517284b7aeac483f9bd9afc366536ef42ad6dace5d146b2700e88dcb18ef805e4b8bbeaca91c7c779449c2317f13e894f0f80811396334148a0884a8b5ccf SHA512 758838295f88e78b14087185ad28e5b17804e651440e8a926ebff7c661a4592e8821961711b9fca7f13249830e255097dd4e6958418e99ebd008f5e6cff588cd
+DIST ghc-bin-9.2.8-riscv64-unknown-linux-gnu.gpkg.tar 269434880 BLAKE2B 2a1f42a9a4cd757513e59d86d4ccc68922ee9e9ef30abafc648cc4b5dbe3c850f865f6cea92edbdb1e44b8b21f7372740d44de7a6ebc3a48a3259b9eb9b73ab1 SHA512 809868ecd794764530e80d5c1e74b216580d0730b305949db5bd1e89a64f4bf3ce3330c618e641ce3cc252b0de36ed908c9e8690f262f4044e9d579c2225e8df
 DIST ghc-bin-9.2.8-x86_64-pc-linux-gnu.gpkg.tar 85432320 BLAKE2B ab649a6da5120720fc388dc98685a796415f7e2d664de17887f5bdadf5c9fe6192c4a6ac1bdbbe6e635ebf77b56e1f195367444e6febe01db32e38897dad5cb9 SHA512 fb868c87714aae791b4c19eaf3780707000ff61b240daebbfe2331d5e992dd20376060239df9aaf3daa54266eb10ad7a365804a09a5f6e9b1f5ee80717a16a17
 DIST process-1.6.16.0.tar.gz 87354 BLAKE2B 8c2977d6801faef8825ed35f058a6207a518f72eb87ac3144f630bc028f4753cefb9ed4d3fc29185438bcb4f38d33f5a45aebec6a8101e4cdc1b3570ada2e5dc SHA512 1663f2746a05a5a4c29d249db54eaa49edbbadfe8d189eab02276c3f6f3d6b84c81cc4333318c42c7a7265638402cb13276f08aeea134a7f5dd98da050a34341

diff --git a/dev-lang/ghc/ghc-9.2.8.ebuild b/dev-lang/ghc/ghc-9.2.8.ebuild
index 2b6f84b93c7f..46a009b37d2c 100644
--- a/dev-lang/ghc/ghc-9.2.8.ebuild
+++ b/dev-lang/ghc/ghc-9.2.8.ebuild
@@ -30,30 +30,39 @@ BUILD_BIN_PV=9.0.2
 BUILD_BIN_REV=r4
 BUILD_BIN_PVR="${BUILD_BIN_PV}${BUILD_BIN_REV:+-${BUILD_BIN_REV}}"
 
-DEFAULT_SRC_HOST="https://eidetic.codes"
+# Binaries created and uploaded by hololeap
+SRC_URL_HOLOLEAP="https://eidetic.codes"
+ghc_binaries_hololeap() {
+	echo "
+		binary? ( ${SRC_URL_HOLOLEAP}/${PN}-bin-${BIN_PVR}-${1}.gpkg.tar )
+		!binary? ( ${SRC_URL_HOLOLEAP}/${PN}-bin-${BUILD_BIN_PVR}-${1}.gpkg.tar )
+	"
+}
 
-ghc_binaries() {
+# Binaries created and uploaded by matoro
+SRC_URL_MATORO="https://github.com/matoro/${PN}/releases/download"
+ghc_binaries_matoro() {
 	echo "
-		binary? ( ${DEFAULT_SRC_HOST}/${PN}-bin-${BIN_PVR}-${1}.gpkg.tar )
-		!binary? ( ${DEFAULT_SRC_HOST}/${PN}-bin-${BUILD_BIN_PVR}-${1}.gpkg.tar )
+		binary? ( ${SRC_URL_MATORO}/${BIN_PVR}/${PN}-bin-${BIN_PVR}-${1}.gpkg.tar )
+		!binary? ( ${SRC_URL_MATORO}/${BUILD_BIN_PVR}/${PN}-bin-${BUILD_BIN_PVR}-${1}.tar.gz )
 	"
 }
 
 # Differentiate glibc/musl
 
 #glibc_binaries="$glibc_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-glibc_binaries+=" amd64? ( $(ghc_binaries x86_64-pc-linux-gnu) )"
+glibc_binaries+=" amd64? ( $(ghc_binaries_hololeap x86_64-pc-linux-gnu) )"
 #glibc_binaries="$glibc_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#glibc_binaries+=" arm64? ( $(ghc_binaries_gz_build_bin aarch64-unknown-linux-gnu) )"
+glibc_binaries+=" arm64? ( $(ghc_binaries_matoro aarch64-unknown-linux-gnu) )"
 #glibc_binaries="$glibc_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #glibc_binaries="$glibc_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#glibc_binaries+=" ppc64? (
-#	big-endian? ( $(ghc_binaries_gz_build_bin powerpc64-unknown-linux-gnu) )
-#	!big-endian? ( $(ghc_binaries_gz_build_bin powerpc64le-unknown-linux-gnu) )
-#)"
-#glibc_binaries+=" riscv? ( $(ghc_binaries_gz_build_bin riscv64-unknown-linux-gnu) )"
+glibc_binaries+=" ppc64? (
+	big-endian? ( $(ghc_binaries_matoro powerpc64-unknown-linux-gnu) )
+	!big-endian? ( $(ghc_binaries_matoro powerpc64le-unknown-linux-gnu) )
+)"
+glibc_binaries+=" riscv? ( $(ghc_binaries_matoro riscv64-unknown-linux-gnu) )"
 #glibc_binaries="$glibc_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-glibc_binaries+=" x86? ( $(ghc_binaries i686-pc-linux-gnu) )"
+glibc_binaries+=" x86? ( $(ghc_binaries_hololeap i686-pc-linux-gnu) )"
 
 #musl_binaries="$musl_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
 #musl_binaries="$musl_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-musl.tbz2 )"
@@ -79,13 +88,13 @@ yet_binary() {
 		glibc)
 			case "${ARCH}" in
 				#alpha) return 0 ;;
-				#arm64) return 0 ;;
+				arm64) return 0 ;;
 				#arm) return 0 ;;
 				amd64) return 0 ;;
 				#ia64) return 0 ;;
 				#ppc) return 0 ;;
-				#ppc64) return 0 ;;
-				#riscv) return 0 ;;
+				ppc64) return 0 ;;
+				riscv) return 0 ;;
 				#sparc) return 0 ;;
 				x86) return 0 ;;
 				*) return 1 ;;


^ permalink raw reply related	[flat|nested] 92+ messages in thread

end of thread, other threads:[~2023-11-20  7:36 UTC | newest]

Thread overview: 92+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-22 22:34 [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2023-11-20  7:36 Sam James
2023-10-14  0:47 Sam James
2023-10-14  0:47 Sam James
2023-10-14  0:47 Sam James
2023-10-14  0:47 Sam James
2023-05-27 15:29 Sam James
2023-04-10  5:09 Sam James
2023-03-17 21:54 Sam James
2023-03-17 18:23 Sam James
2023-02-21  5:13 Sam James
2023-02-21  5:13 Sam James
2023-02-21  5:13 Sam James
2023-02-21  5:13 Sam James
2023-02-21  5:13 Sam James
2023-02-05 15:19 Sam James
2023-01-21  2:37 Sam James
2022-11-25 21:57 Sam James
2022-11-25 21:57 Sam James
2022-10-15  0:57 Sam James
2022-10-04 15:34 Sam James
2022-08-31 21:49 Sam James
2022-08-14 21:31 Sam James
2022-07-30  9:20 Sam James
2022-07-29  2:33 Sam James
2022-07-23  2:08 Sam James
2022-07-22 22:36 Sam James
2022-01-05 10:01 David Seifert
2021-07-18  8:58 Sergei Trofimovich
2021-06-19  9:05 Sergei Trofimovich
2021-06-18 21:07 David Seifert
2021-06-06 13:45 Sergei Trofimovich
2021-04-20 19:31 Sergei Trofimovich
2021-03-15 22:33 Sergei Trofimovich
2021-03-14  8:47 Sergei Trofimovich
2021-02-28 20:20 Sergei Trofimovich
2021-01-07  8:20 Fabian Groffen
2020-12-24 22:40 Sergei Trofimovich
2020-12-24  8:28 Sergei Trofimovich
2020-12-20 22:26 Sergei Trofimovich
2020-09-05  8:11 Sergei Trofimovich
2020-08-02  8:23 Sergei Trofimovich
2020-07-24  7:06 Sergei Trofimovich
2020-05-23  6:17 Mike Frysinger
2020-04-11 11:05 Sergei Trofimovich
2020-04-11  8:12 Sergei Trofimovich
2020-03-25 22:31 Sergei Trofimovich
2020-03-17  3:00 Matt Turner
2020-01-19 14:59 Sergei Trofimovich
2020-01-11 18:58 Sergei Trofimovich
2020-01-11 18:58 Sergei Trofimovich
2020-01-10 20:09 Sergei Trofimovich
2019-11-10 15:14 Michał Górny
2019-10-01 19:14 Michał Górny
2019-07-17 21:05 Sergei Trofimovich
2019-07-01  7:55 Sergei Trofimovich
2019-03-09 13:16 Sergei Trofimovich
2018-06-18 18:07 Tobias Klausmann
2018-06-12  7:52 Sergei Trofimovich
2018-06-10 11:22 Sergei Trofimovich
2018-06-09 19:09 Sergei Trofimovich
2018-05-09 18:37 Sergei Trofimovich
2018-03-09 22:36 Sergei Trofimovich
2018-01-22  0:01 Sergei Trofimovich
2017-12-26 12:30 Sergei Trofimovich
2017-11-25 14:14 Sergei Trofimovich
2017-11-24  8:01 Sergei Trofimovich
2017-11-24  7:52 Sergei Trofimovich
2017-09-02 20:50 Sergei Trofimovich
2017-09-02 20:29 Sergei Trofimovich
2017-07-12 20:16 Sergei Trofimovich
2017-07-11 21:57 Sergei Trofimovich
2017-07-11 20:45 Sergei Trofimovich
2017-07-08 13:18 Sergei Trofimovich
2017-07-08 11:59 Sergei Trofimovich
2017-07-03 19:57 Sergei Trofimovich
2017-06-20 21:56 Sergei Trofimovich
2017-05-28  0:41 Benda XU
2017-03-19 10:28 Sergei Trofimovich
2017-02-18 12:12 Sergei Trofimovich
2017-02-18 12:12 Sergei Trofimovich
2017-02-14 22:59 Sergei Trofimovich
2017-02-14 22:16 Sergei Trofimovich
2017-02-14 22:16 Sergei Trofimovich
2017-01-20 10:21 Sergei Trofimovich
2016-12-28 22:49 Sergei Trofimovich
2016-12-28 21:14 Sergei Trofimovich
2016-07-26  9:07 Benda XU
2016-04-04 20:32 Sergei Trofimovich
2016-02-10 23:04 Sergei Trofimovich
2015-08-28 21:50 Sergei Trofimovich
2015-08-27 22:24 Sergei Trofimovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox