Skip to content

Instantly share code, notes, and snippets.

@zeldin
Created August 21, 2022 09:02
Show Gist options
  • Save zeldin/2c3708093e6c99102aba39cddc9fd498 to your computer and use it in GitHub Desktop.
Save zeldin/2c3708093e6c99102aba39cddc9fd498 to your computer and use it in GitHub Desktop.
#!/bin/sh
version="$@"
if [ -z "$version" ]; then
version="`equery l -F '$fullversion' -p dev-lang/ghc | tail -1`"
fi
PKGDIR="/tmp/`uname -m`/packages"
[ -d "$PKGDIR" ] || mkdir -p "$PKGDIR"
export PKGDIR
CFLAGS="-O2 -pipe"
export CFLAGS
CXXFLAGS="$CFLAGS"
export CXXFLAGS
USE="-* -bindist sqlite gmp doc ghcbootstrap ghcmakebinary"
export USE
FEATURES="-* -test -strict -stricter -noman -noinfo -nodoc"
export FEATURES
exec emerge -1aB `for v in $version; do echo =dev-lang/ghc-"$v"; done`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment