1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 19:17:44 +00:00

Ports: Add port for mruby

This commit is contained in:
Dante Catalfamo 2021-08-20 00:38:31 -04:00 committed by Andreas Kling
parent 16ad297078
commit 0f3f814945
4 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,10 @@
--- mruby-3.0.0/mrbgems/mruby-io/src/io.c 2021-08-20 00:27:04.837317416 -0400
+++ mruby-3.0.0.serenity/mrbgems/mruby-io/src/io.c 2021-08-20 00:28:51.960390750 -0400
@@ -49,6 +49,7 @@
#include <sys/wait.h>
#include <sys/time.h>
#include <unistd.h>
+ #include <sys/select.h>
typedef size_t fsize_t;
typedef time_t ftime_t;
typedef suseconds_t fsuseconds_t;

View file

@ -0,0 +1,19 @@
--- /dev/null 2021-08-20 13:32:02.136545596 -0400
+++ mruby-3.0.0/build_config/serenity.rb 2021-08-20 14:18:09.673875364 -0400
@@ -0,0 +1,16 @@
+MRuby::CrossBuild.new('serenity') do |conf|
+ conf.toolchain :gcc
+
+ conf.archiver.command = "#{ENV['SERENITY_ARCH']}-pc-serenity-ar"
+ conf.linker.command = "#{ENV['SERENITY_ARCH']}-pc-serenity-g++"
+
+ conf.cxx.command = "#{ENV['SERENITY_ARCH']}-pc-serenity-g++"
+ conf.cxx.defines << (ENV['SERENITY_ARCH'].include?('64') ? 'MRB_64BIT' : 'MRB_32BIT')
+
+ conf.cc.command = "#{ENV['SERENITY_ARCH']}-pc-serenity-gcc"
+ conf.cc.defines << (ENV['SERENITY_ARCH'].include?('64') ? 'MRB_64BIT' : 'MRB_32BIT')
+
+ conf.gembox 'full-core'
+
+ conf.test_runner.command = 'env'
+end