aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-06-11 01:12:07 +0200
committerJakub Jirutka <jakub@jirutka.cz>2016-06-11 02:47:13 +0200
commit007ce56363d0642086272be6c0fbff0b5ecece7a (patch)
treea46b9cb195ac80ca8bd8e69c1917525bed339a88 /testing
parent026a9ad1a5dce76d0715721da8c190f7aaf7f98d (diff)
downloadaports-007ce56363d0642086272be6c0fbff0b5ecece7a.tar.bz2
aports-007ce56363d0642086272be6c0fbff0b5ecece7a.tar.xz
testing/mruby: new abuild
http://mruby.org Lightweight Ruby
Diffstat (limited to 'testing')
-rw-r--r--testing/mruby/APKBUILD47
-rw-r--r--testing/mruby/build_config.rb19
2 files changed, 66 insertions, 0 deletions
diff --git a/testing/mruby/APKBUILD b/testing/mruby/APKBUILD
new file mode 100644
index 0000000000..0b2fdd4a39
--- /dev/null
+++ b/testing/mruby/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=mruby
+pkgver=1.2.0
+pkgrel=0
+pkgdesc="Lightweight Ruby"
+url="http://mruby.org"
+arch="all"
+license="MIT"
+depends=""
+makedepends="$depends_dev bison ruby"
+subpackages="$pkgname-tools $pkgname-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/mruby/mruby/archive/$pkgver.tar.gz
+ build_config.rb"
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ MRUBY_CONFIG="$srcdir/build_config.rb" ./minirake --verbose
+}
+
+package() {
+ cd "$builddir"
+
+ install -d "$pkgdir"/usr/bin
+ cp build/host-debug/bin/* "$pkgdir"/usr/bin/ || return 1
+ cp build/host/bin/* "$pkgdir"/usr/bin/ || return 1
+
+ install -d "$pkgdir"/usr/lib
+ cp build/host/lib/*.a "$pkgdir"/usr/lib/
+}
+
+tools() {
+ pkgdesc="$pkgdesc (tools)"
+
+ install -d "$subpkgdir"/usr/bin
+
+ mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin/ \
+ && mv "$subpkgdir"/usr/bin/mruby "$pkgdir"/usr/bin/
+}
+
+md5sums="b5a3b7962d9db8cb8fb8105aa914d16c mruby-1.2.0.tar.gz
+c8acedbcf9a8a68b21bc9a32c20cb961 build_config.rb"
+sha256sums="05ad0135a9c34158ff0cfd4631f4fbaed28cbb8243680d2c97ffdb9c246b1f3d mruby-1.2.0.tar.gz
+ed5291921f77e98517722a1692160a6e264bd9a181a31fbf6932e95efe790adf build_config.rb"
+sha512sums="bd5de32ba52b6642358752755329fa45a954082122a8983012930056c286ac328fb52fbdd11f34ff7c80af2c0e9a6348abcd5214602aca1150f2e7ae25cad1f2 mruby-1.2.0.tar.gz
+9c51108d9766e3e3129ac89d76fc7dcc797b206bcc5660d60e89426adb93707fcf5acdffb24cd3438b3eabfcc02e3767a17e9233c25e0762ebe2ddab9f159252 build_config.rb"
diff --git a/testing/mruby/build_config.rb b/testing/mruby/build_config.rb
new file mode 100644
index 0000000000..c3d032d523
--- /dev/null
+++ b/testing/mruby/build_config.rb
@@ -0,0 +1,19 @@
+MRuby::Build.new do |conf|
+ toolchain :gcc
+
+ # include the default GEMs
+ conf.gembox 'default'
+end
+
+MRuby::Build.new('host-debug') do |conf|
+ toolchain :gcc
+
+ # include the default GEMs
+ conf.gembox 'default'
+
+ # C compiler settings
+ conf.cc.defines = %w(MRB_ENABLE_DEBUG_HOOK)
+
+ # Generate mruby debugger command (require mruby-eval)
+ conf.gem :core => "mruby-bin-debugger"
+end