-
Notifications
You must be signed in to change notification settings - Fork 19
[WIP] Support mruby 1.4.1 #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,8 +14,9 @@ | |
| # * compile, linker & archiver | ||
| # * unzip | ||
|
|
||
| VERSION=1.2.0 | ||
| VERSION=1.4.1 | ||
| CURRENT=$PWD | ||
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | ||
|
|
||
| # Checks is /tmp/mruby needs cleaning or creation. | ||
|
|
||
|
|
@@ -35,6 +36,9 @@ mkdir -p mruby-out/src/mrbgems | |
|
|
||
| cd mruby-$VERSION | ||
|
|
||
| # Use only supported gems. | ||
| cat $DIR/mrusty.gembox > mrbgems/default.gembox | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needed for |
||
|
|
||
| # minirake compiles the compiler and rb files to C. | ||
|
|
||
| ./minirake | ||
|
|
@@ -64,11 +68,30 @@ rm -rf build/host/mrbgems/mruby-bin* | |
| rm -rf mrbgems/mruby-test | ||
| rm -rf build/host/mrbgems/mruby-test | ||
|
|
||
| rm -rf mrbgems/mruby-io* | ||
| rm -rf build/host/mrbgems/mruby-io* | ||
|
|
||
| rm -rf mrbgems/mruby-socket* | ||
| rm -rf build/host/mrbgems/mruby-socket* | ||
|
|
||
| # Copies all gems. | ||
|
|
||
| cp -R mrbgems/* ../mruby-out/src/mrbgems | ||
| cp -R build/host/mrbgems/* ../mruby-out/src/mrbgems | ||
|
|
||
| # String needs additional mruby header. | ||
|
|
||
| sed -i -e $'s/#include "common.h"/#include "mruby.h"\\\n#include "common.h"/g' include/mruby/string.h | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Strange thing, |
||
|
|
||
| # Copies header files so they will be available in top level includes. | ||
|
|
||
| find include/mruby -type f -name '*.h' -exec cp {} ../mruby-out/include \; | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| # Copies ext header files required by gems. | ||
|
|
||
| mkdir -p ../mruby-out/include/mruby/ext | ||
| find mrbgems -path '*/ext/*' -name '*.h' -exec cp {} ../mruby-out/include/mruby/ext \; | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently, copies only |
||
|
|
||
| cd .. | ||
|
|
||
| tar -cf $CURRENT/mruby-out.tar mruby-out | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| MRuby::GemBox.new do |conf| | ||
| # Use standard IO/File class | ||
| # conf.gem :core => "mruby-io" | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one was problematic. |
||
|
|
||
| # Use standard Array#pack, String#unpack methods | ||
| conf.gem :core => "mruby-pack" | ||
|
|
||
| # Use standard Kernel#sprintf method | ||
| conf.gem :core => "mruby-sprintf" | ||
|
|
||
| # Use standard print/puts/p | ||
| conf.gem :core => "mruby-print" | ||
|
|
||
| # Use standard Math module | ||
| conf.gem :core => "mruby-math" | ||
|
|
||
| # Use standard Time class | ||
| conf.gem :core => "mruby-time" | ||
|
|
||
| # Use standard Struct class | ||
| conf.gem :core => "mruby-struct" | ||
|
|
||
| # Use Comparable module extension | ||
| conf.gem :core => "mruby-compar-ext" | ||
|
|
||
| # Use Enumerable module extension | ||
| conf.gem :core => "mruby-enum-ext" | ||
|
|
||
| # Use String class extension | ||
| conf.gem :core => "mruby-string-ext" | ||
|
|
||
| # Use Numeric class extension | ||
| conf.gem :core => "mruby-numeric-ext" | ||
|
|
||
| # Use Array class extension | ||
| conf.gem :core => "mruby-array-ext" | ||
|
|
||
| # Use Hash class extension | ||
| conf.gem :core => "mruby-hash-ext" | ||
|
|
||
| # Use Range class extension | ||
| conf.gem :core => "mruby-range-ext" | ||
|
|
||
| # Use Proc class extension | ||
| conf.gem :core => "mruby-proc-ext" | ||
|
|
||
| # Use Symbol class extension | ||
| conf.gem :core => "mruby-symbol-ext" | ||
|
|
||
| # Use Random class | ||
| conf.gem :core => "mruby-random" | ||
|
|
||
| # Use Object class extension | ||
| conf.gem :core => "mruby-object-ext" | ||
|
|
||
| # Use ObjectSpace class | ||
| conf.gem :core => "mruby-objectspace" | ||
|
|
||
| # Use Fiber class | ||
| conf.gem :core => "mruby-fiber" | ||
|
|
||
| # Use Enumerator class (require mruby-fiber) | ||
| conf.gem :core => "mruby-enumerator" | ||
|
|
||
| # Use Enumerator::Lazy class (require mruby-enumerator) | ||
| conf.gem :core => "mruby-enum-lazy" | ||
|
|
||
| # Use toplevel object (main) methods extension | ||
| conf.gem :core => "mruby-toplevel-ext" | ||
|
|
||
| # Generate mirb command | ||
| # conf.gem :core => "mruby-bin-mirb" | ||
|
|
||
| # Generate mruby command | ||
| # conf.gem :core => "mruby-bin-mruby" | ||
|
|
||
| # Generate mruby-strip command | ||
| # conf.gem :core => "mruby-bin-strip" | ||
|
|
||
| # Use Kernel module extension | ||
| conf.gem :core => "mruby-kernel-ext" | ||
|
|
||
| # Use class/module extension | ||
| conf.gem :core => "mruby-class-ext" | ||
|
|
||
| # Use mruby-compiler to build other mrbgems | ||
| conf.gem :core => "mruby-compiler" | ||
| end | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function has been dropped in favour of
RARRAY_LEN