aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ponyc/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/ponyc/APKBUILD')
-rw-r--r--testing/ponyc/APKBUILD113
1 files changed, 43 insertions, 70 deletions
diff --git a/testing/ponyc/APKBUILD b/testing/ponyc/APKBUILD
index 6f61a0622d..da2700f1c4 100644
--- a/testing/ponyc/APKBUILD
+++ b/testing/ponyc/APKBUILD
@@ -1,55 +1,34 @@
+# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
-# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=ponyc
-pkgver=0.21.3
-pkgrel=2
+pkgver=0.28.1
+pkgrel=0
pkgdesc="An open-source, actor-model, capabilities-secure, high performance programming language"
url="https://www.ponylang.org"
-arch="x86_64 aarch64"
+arch="all"
license="BSD-2-Clause"
-# LLVM 5 support is denoted as experimental, but libponyc.tests segfault on
-# LLVM 3.9.1 and 4.0.0 (see https://github.com/ponylang/ponyc/issues/2689).
-case "$CARCH" in
- aarch64) _llvmver=5;;
- *) _llvmver=3.9;;
-esac
-depends="binutils-gold clang"
-checkdepends="libressl-dev pcre2-dev"
-makedepends="clang-dev libexecinfo-dev libunwind-dev llvm$_llvmver-dev
- ncurses-dev paxmark zlib-dev"
+_llvmver=6
+depends="binutils-gold"
+checkdepends="openssl-dev pcre2-dev"
+# Ponyc _is_ compatible with LLVM7, but LLVM7 is pretty buggy on musl.
+makedepends="libexecinfo-dev llvm${_llvmver}-dev ncurses-dev paxmark
+ zlib-dev linux-headers"
+options="!check"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/ponylang/$pkgname/archive/$pkgver.tar.gz
- disable-avx512f-for-x86-only.patch
- fix-aarch64.patch
- fix-atomic-initializer.patch
- makefile-remove-march-mtune.patch
- fix-tests.patch"
-builddir="$srcdir/$pkgname-$pkgver"
+ more-portable-ln.patch
+ makefile-remove-march-mtune.patch"
-# arch per gcc, used only to define PONY_ARCH.
-_arch="$CARCH"
-case "$CARCH" in
- x86_64) _arch=x86-64;;
- armhf) _arch=armv6zk;;
- aarch64) _arch=armv8-a;;
-esac
-
-_make_opts="arch=$_arch
- config=release
- default_pic=true
- prefix=/usr
- verbose=true
- LLVM_CONFIG=/usr/lib/llvm$_llvmver/bin/llvm-config
- "
-
-# gcc 6.4.0 doesn't support flag -mcx16 which ponyc needs on aarch64.
-export CC=clang
-export CXX=clang++
+export LLVM_CONFIG=/usr/lib/llvm${_llvmver}/bin/llvm-config
+# Required to not crash gold: https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+export CFLAGS="$CFLAGS -fPIE"
build() {
- cd "$builddir"
-
- make $_make_opts CFLAGS="-Wno-error"
+ make \
+ config=release \
+ default_pic=true \
+ verbose=true
paxmark m build/release/ponyc \
build/release/libponyc.tests
@@ -58,46 +37,40 @@ build() {
build/release/ponyc packages/stdlib -rexpr -g -o docs
}
-# NOTE: libponyc.tests segfaults on some aarch64 machines when libnuma is
-# installed (e.g. on our 96cores machine).
check() {
- cd "$builddir"
- make test -j1 $_make_opts
+ make test
}
package() {
- cd "$builddir"/build/release
-
- # ponyc expects the standard packages to be in the same directory.
- install -m 755 -D ponyc "$pkgdir"/usr/lib/pony/$pkgver/bin/ponyc
- mkdir -p "$pkgdir"/usr/bin
- ln -sf ../lib/pony/$pkgver/bin/ponyc "$pkgdir"/usr/bin/ponyc
-
- mkdir -p "$pkgdir"/usr/lib
- cp libponyc.a libponyrt.a libponyrt-pic.a "$pkgdir"/usr/lib/
-
- cd ../..
-
- cp -r packages "$pkgdir"/usr/lib/pony/$pkgver/
+ make \
+ config=release \
+ default_pic=true \
+ ponydir="$pkgdir"/usr/lib/pony/$pkgver \
+ prefix="$pkgdir"/usr \
+ install
+
+ # links to $pkgdir
+ ln -sf /usr/lib/pony/$pkgver/lib/native/libponyrt.a "$pkgdir"/usr/lib/libponyrt.a
+ ln -sf /usr/lib/pony/$pkgver/lib/native/libponyrt-pic.a "$pkgdir"/usr/lib/libponyrt-pic.a
+ ln -sf /usr/lib/pony/$pkgver/lib/native/libponyc.a "$pkgdir"/usr/lib/libponyc.a
+ ln -sf /usr/lib/pony/$pkgver/bin/ponyc "$pkgdir"/usr/bin/ponyc
+
+ # We install these manually in dev()
+ rm -r "$pkgdir"/usr/include/
mkdir -p "$pkgdir"/usr/share/doc/$pkgname
cp -r docs/stdlib-docs/docs "$pkgdir"/usr/share/doc/$pkgname/stdlib
}
-# Note: libponyrt*.a and probably even libponyc.a are needed in runtime.
+# Note: libponyrt*.a and libponyc.a are needed in runtime.
dev() {
pkgdesc="$pkgdesc (development files)"
depends="$pkgname=$pkgver-r$pkgrel"
- cd "$builddir"
- install -m 644 -D src/libponyrt/pony.h "$subpkgdir"/usr/include/pony.h
- install -m 644 -D src/common/pony/detail/atomics.h \
- "$subpkgdir"/usr/include/pony/detail/atomics.h
+ mkdir -p "$subpkgdir"/usr/
+ mv "$pkgdir"/usr/lib/pony/$pkgver/include "$subpkgdir"/usr
}
-sha512sums="f89389142d77e93038c77d3fbe9e64c13ce76b9737430969fcdf2916023d0b7195f4d551895eab999798594352b40848be8dcc63af6927e8cc62b7c7000be65d ponyc-0.21.3.tar.gz
-0f1d7e45639db17343db675a740922b2c1ef1317fd1a7678a0d30040407c91c930b7439dc12282541384336da1af5f0bc143ea0f5725eb8aa2ab3646b1cf00f7 disable-avx512f-for-x86-only.patch
-4ff47633e878890d9400b7ab7d7fad42119707d8b1f69c0192266f4b2d386be698bb0e8f2accae9b440bcfece39e1c6baf10047436dc184b1c3885c2ac33d569 fix-aarch64.patch
-f78ff44de59fe486bdfa8a7fbde14786825e549b23759ef798ba7632d556203de49b522562a04cfcab1ef3ef323e226ff9217abebafcb414e647ebd17877b67d fix-atomic-initializer.patch
-0dac51826c0fcd47e6d4e7fe9928a5221c66da2f24d7931d7c53e591d325375b88e98cc0b3b6d538f9ec9bcbba906de7c00fff5434e427c94cea4bd2fb0477f6 makefile-remove-march-mtune.patch
-46c0125b60cd1db89d7ae958602b087acb2ae1fd8298cd9141828999693a9e39b60d2dac338853406081fc1c138e506243357618197ffd118fe4ac9737bd1565 fix-tests.patch"
+sha512sums="5d8ea9da967a79ecaadc4a498e8af78cb6ba43745f825499b1677c0a262c2891fde003d1674e242369b7dd425dbff2f107544be07aeab859bf91caa4f0e3df31 ponyc-0.28.1.tar.gz
+38aa40f6000dcb823be7b542cdad8d04b6ac4cd0a4fff1a472520a7cb71631fb34e5bee74914fe559674594dd901aede91390809e143dd96c5d68a16f8ac196c more-portable-ln.patch
+c78156bc68332705c41e7f4f8ff65bb77a778d8ee1685e9376473041c9c0b815e96ebc4cfd68b03c5c5c9d53cff8e6c0deba0fc19a9bcb29b7f91caaa15a0803 makefile-remove-march-mtune.patch"