diff options
Diffstat (limited to 'testing/ghc-bootstrap/APKBUILD')
-rw-r--r-- | testing/ghc-bootstrap/APKBUILD | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/testing/ghc-bootstrap/APKBUILD b/testing/ghc-bootstrap/APKBUILD index 8578ae579b..7642dfb600 100644 --- a/testing/ghc-bootstrap/APKBUILD +++ b/testing/ghc-bootstrap/APKBUILD @@ -3,20 +3,24 @@ # # Build/bootstrap ghc similarly to the go package. # Caveat: bootstrapping isn't a commonly tested piece of ghc. +# +# Note: This only exists to build the native ghc. It is +# huge in size and slow and also intentionally lacks modules +# in the native compiler. pkgname=ghc-bootstrap -pkgver=8.0.1 +pkgver=8.0.2 pkgrel=0 pkgdesc="The Glasgow haskell compiler (bootstrapped)" arch="x86_64 armhf" license="custom:bsd3" -url='https://github.com/mitchty/alpine-linux-ghc-bootstrap' +url="https://haskell.org" depends="bash libffi musl zlib gcc binutils-gold llvm3.7" install="" subpackages="" makedepends="" source=" - http://dev.alpinelinux.org/archive/ghc-bootstrap/ghc-$pkgver-x86_64-unknown-linux-musl.tar.xz - http://dev.alpinelinux.org/archive/ghc-bootstrap/ghc-$pkgver-arm-unknown-linux-musleabihf.tar.xz + http://dev.alpinelinux.org/archive/ghc-bootstrap/ghc-$pkgver-armhf.tar.xz + http://dev.alpinelinux.org/archive/ghc-bootstrap/ghc-$pkgver-x86_64.tar.xz " # The bootstrap process uses docker to build ghc from a debian glibc host @@ -27,30 +31,24 @@ source=" # Note, these docker images are large, ~10G the dockerfiles weren't built # to be small. Once built the containers should likely be removed. snapshot() { - local x86_64_tar="ghc-${pkgver}-x86_64-pc-linux-musl.tar.xz" - local arm_tar="ghc-${pkgver}-arm-unknown-linux-musleabihf.tar.xz" - - docker build -t alpine-ghc-bootstrap:x86_64 \ - -f bootstrap/x86_64/Dockerfile . - docker run -a stdout alpine-ghc-bootstrap:x86_64 \ - /bin/cat "/tmp/$x86_64_tar" > $x86_64_tar - - docker build -t alpine-ghc-bootstrap:armhf \ - -f bootstrap/armhf/Dockerfile . - docker run -a stdout alpine-ghc-bootstrap:armhf \ - /bin/cat "/tmp/$arm_tar" > $arm_tar + for x in $(echo ${arch}); do + docker build -t alpine-ghc-bootstrap:${x} \ + -f Dockerfile.${x} . || return 1 + docker run -a stdout alpine-ghc-bootstrap:${x} \ + /bin/cat "/tmp/ghc-${pkgver}-${x}.tar.xz" > ghc-${pkgver}-${x}.tar.xz || return 1 + done } package() { cd "$srcdir/$CARCH" install -d "$pkgdir" || return 1 mv usr "$pkgdir" || return 1 - settings=$(find "$pkgdir" -name settings -type f) + local settings="$(find $pkgdir -name settings -type f)" + sed -i 's/C compiler supports -no-pie\"\, \"NO\"/C compiler supports -no-pie\"\, \"YES\"/' "$settings" || return 1 + sed -i 's|/usr/.*-gcc|gcc|' "$settings" || return 1 + sed -i 's|/usr/.*-ar|ar|' "$settings" || return 1 + sed -i 's|/usr/.*-ld.gold|ld.gold|' "$settings" || return 1 + sed -i 's|/usr/.*-ld|ld.gold|' "$settings" || return 1 + sed -i 's|/usr/.*/llc|llc-3.7|' "$settings" || return 1 + sed -i 's|/usr/.*/opt|opt-3.7|' "$settings" || return 1 } - -md5sums="ec34cc6bebe490f765bc73961fd72460 ghc-8.0.1-x86_64-unknown-linux-musl.tar.xz -b0901df3305b49b6044607b5ccde5f03 ghc-8.0.1-arm-unknown-linux-musleabihf.tar.xz" -sha256sums="b917c130597ed7a5dcf2d387c1b598b088f644566fc47f95d859a03a55529bd2 ghc-8.0.1-x86_64-unknown-linux-musl.tar.xz -54d5e8067b087b1d426e01469162749f1f2c417dc2b8b0f6577acbf0c19aba5e ghc-8.0.1-arm-unknown-linux-musleabihf.tar.xz" -sha512sums="4214ab4b3431c695b91429de6a7359cd607c4ca2d04e51afa111757da41b97912d46d3b4b251b717e175baf11186023c133af1ce1d5b95299bd34a85dd9f40b3 ghc-8.0.1-x86_64-unknown-linux-musl.tar.xz -ab920e198a2c779e8ad3f6e3f9e9485c8742254c5a914875a6cd106957bb6e0720e90707aabe822295535922d55fc66898660bf7cbf8a7c88c231eceafe358e4 ghc-8.0.1-arm-unknown-linux-musleabihf.tar.xz" |