summaryrefslogtreecommitdiff
path: root/skip/ghc/ghc.xibuild
blob: ecd9adfd2aad79dd9bbbb6e53a05e122a20e8253 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh

NAME="ghc"
DESC="The Glasgow Haskell Compiler"

MAKEDEPS="make "
DEPS="sbase gcc gmp libffi llvm musl ncurses perl "

PKG_VER=9.0.1
SOURCE="https://downloads.haskell.org/~ghc/$PKG_VER/ghc-$PKG_VER-src.tar.xz"
ADDITIONAL="tests-use-iterable-from-collections-abc.patch skip-tests.patch 0006-Optimiser-Correctly-deal-with-strings-starting-with-unicode.patch 0005-buildpath-abi-stability.patch 0005-Set-min-LLVM-version-to-9-and-make-version-checking-.patch 0004-Fix-autoconf-after-6d6edb1bbb.patch 0003-llvmGen-Accept-range-of-LLVM-versions.patch 0002-configure-fix-the-use-of-some-obsolete-macros-19189.patch 0001-Replace-more-autotools-obsolete-macros-19189.patch 0000-bootstrap.patch "

prepare () {
    apply_patches

	cp mk/build.mk.sample mk/build.mk

	cat >> mk/build.mk <<-EOF
		BuildFlavour         = perf-llvm
	EOF
    autoreconf -fi
}

build () {
    ./configure \
        --prefix=/usr \
        --bindir=/usr/bin \
        --sysconfdir=/etc \
        --with-system-libffi \
		--disable-ld-override
    make
}

package () {
    make DESTDIR=$PKG_DEST install
}