From bf75581b4d51e0b9086a9a4297814f9186a01764 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Mon, 29 Aug 2016 15:42:29 +0200 Subject: community/mruby: move from testing --- community/mruby/APKBUILD | 47 +++++++++++++++++++++++++++++++++++++++++ community/mruby/build_config.rb | 19 +++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 community/mruby/APKBUILD create mode 100644 community/mruby/build_config.rb (limited to 'community') diff --git a/community/mruby/APKBUILD b/community/mruby/APKBUILD new file mode 100644 index 0000000000..0b2fdd4a39 --- /dev/null +++ b/community/mruby/APKBUILD @@ -0,0 +1,47 @@ +# Contributor: Jakub Jirutka +# Maintainer: Jakub Jirutka +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/community/mruby/build_config.rb b/community/mruby/build_config.rb new file mode 100644 index 0000000000..c3d032d523 --- /dev/null +++ b/community/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 -- cgit v1.2.3