diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-01 01:28:40 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-01 01:31:31 +0200 |
commit | 6cd0c89e3970f1f86b2ebaf6e31d9f055cdfd115 (patch) | |
tree | fe2efb30ec1b0c87faa26133e04fb9965d4ac473 /testing | |
parent | 4d8d14ddb09892cc0905eb4a7958be074bc5581a (diff) | |
download | aports-6cd0c89e3970f1f86b2ebaf6e31d9f055cdfd115.tar.bz2 aports-6cd0c89e3970f1f86b2ebaf6e31d9f055cdfd115.tar.xz |
testing/ponyc: new aport
An open-source, actor-model, capabilities-secure, high performance programming language
https://www.ponylang.org/
Diffstat (limited to 'testing')
-rw-r--r-- | testing/ponyc/APKBUILD | 83 | ||||
-rw-r--r-- | testing/ponyc/fix-tests.patch | 11 | ||||
-rw-r--r-- | testing/ponyc/makefile-no-mtune.patch | 22 |
3 files changed, 116 insertions, 0 deletions
diff --git a/testing/ponyc/APKBUILD b/testing/ponyc/APKBUILD new file mode 100644 index 0000000000..2d7554b009 --- /dev/null +++ b/testing/ponyc/APKBUILD @@ -0,0 +1,83 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=ponyc +pkgver=0.21.3 +pkgrel=0 +pkgdesc="An open-source, actor-model, capabilities-secure, high performance programming language" +url="https://www.ponylang.org" +arch="x86_64" # TODO: enable aarch64, armhf +license="BSD-2-Clause" +_llvmver=3.9 +depends="binutils-gold gcc" +checkdepends="libressl-dev pcre2-dev" +makedepends="libexecinfo-dev llvm$_llvmver-dev ncurses-dev paxmark zlib-dev" +subpackages="$pkgname-dev $pkgname-doc" +source="$pkgname-$pkgver.tar.gz::https://github.com/ponylang/$pkgname/archive/$pkgver.tar.gz + makefile-no-mtune.patch + fix-tests.patch" +builddir="$srcdir/$pkgname-$pkgver" + +_arch="$CARCH" +case "$CARCH" in + x86_64) _arch=x86-64;; + arm*) _arch=armv7;; +esac + +_make_opts="arch=$_arch + config=release + default_pic=1 + llvm_version=$_llvmver + prefix=/usr + verbose=1 + " + +build() { + cd "$builddir" + + make $_make_opts + + paxmark m build/release/ponyc \ + build/release/libponyc.tests + + mkdir docs + build/release/ponyc packages/stdlib -rexpr -g -o docs +} + +check() { + cd "$builddir" + make test -j1 $_make_opts +} + +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/ + + 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. +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 +} + +sha512sums="f89389142d77e93038c77d3fbe9e64c13ce76b9737430969fcdf2916023d0b7195f4d551895eab999798594352b40848be8dcc63af6927e8cc62b7c7000be65d ponyc-0.21.3.tar.gz +2bb535b0dad3ea9aab02192c131980e5363db348bdc7f993a8e52d08fb5b08223d93c0713a9c1d420844545b5528b80403b9fdba3e0c34dd59f13366db9088c7 makefile-no-mtune.patch +46c0125b60cd1db89d7ae958602b087acb2ae1fd8298cd9141828999693a9e39b60d2dac338853406081fc1c138e506243357618197ffd118fe4ac9737bd1565 fix-tests.patch" diff --git a/testing/ponyc/fix-tests.patch b/testing/ponyc/fix-tests.patch new file mode 100644 index 0000000000..4b4046079c --- /dev/null +++ b/testing/ponyc/fix-tests.patch @@ -0,0 +1,11 @@ +--- a/packages/process/_test.pony ++++ b/packages/process/_test.pony +@@ -63,7 +63,7 @@ + + fun ref apply(h: TestHelper) => + let notifier: ProcessNotify iso = _ProcessClient(0, +- "cat: file_does_not_exist: No such file or directory\n", 1, h) ++ "cat: can't open 'file_does_not_exist': No such file or directory\n", 1, h) + try + let path = FilePath(h.env.root as AmbientAuth, "/bin/cat")? + let args: Array[String] iso = recover Array[String](2) end diff --git a/testing/ponyc/makefile-no-mtune.patch b/testing/ponyc/makefile-no-mtune.patch new file mode 100644 index 0000000000..4c6c2b6303 --- /dev/null +++ b/testing/ponyc/makefile-no-mtune.patch @@ -0,0 +1,22 @@ +--- a/Makefile ++++ b/Makefile +@@ -40,7 +40,6 @@ + # Default settings (silent release build). + config ?= release + arch ?= native +-tune ?= generic + bits ?= $(shell getconf LONG_BIT) + + ifndef verbose +@@ -90,9 +89,9 @@ + destdir ?= $(prefix)/lib/pony/$(tag) + + LIB_EXT ?= a +-BUILD_FLAGS = -march=$(arch) -mtune=$(tune) -Werror -Wconversion \ ++BUILD_FLAGS = -march=$(arch) -Werror -Wconversion \ + -Wno-sign-conversion -Wextra -Wall +-LINKER_FLAGS = -march=$(arch) -mtune=$(tune) ++LINKER_FLAGS = -march=$(arch) + AR_FLAGS ?= rcs + ALL_CFLAGS = -std=gnu11 -fexceptions \ + -DPONY_VERSION=\"$(tag)\" -DLLVM_VERSION=\"$(llvm_version)\" \ |