mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:17:35 +00:00
Ports: Add port for mruby
This commit is contained in:
parent
16ad297078
commit
0f3f814945
4 changed files with 55 additions and 0 deletions
|
@ -97,6 +97,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
|
||||||
| [`milkytracker`](milkytracker/) | milkytracker | 1.03.00 | https://github.com/milkytracker/MilkyTracker |
|
| [`milkytracker`](milkytracker/) | milkytracker | 1.03.00 | https://github.com/milkytracker/MilkyTracker |
|
||||||
| [`mpc`](mpc/) | GNU Multiple Precision Complex Library (MPC) | 1.2.1 | http://www.multiprecision.org/mpc/ |
|
| [`mpc`](mpc/) | GNU Multiple Precision Complex Library (MPC) | 1.2.1 | http://www.multiprecision.org/mpc/ |
|
||||||
| [`mpfr`](mpfr/) | GNU Multiple Precision Floating-Point Reliable Library (MPFR) | 4.1.0 | https://www.mpfr.org/ |
|
| [`mpfr`](mpfr/) | GNU Multiple Precision Floating-Point Reliable Library (MPFR) | 4.1.0 | https://www.mpfr.org/ |
|
||||||
|
| [`mruby`](mruby/) | mruby | 3.0.0 | https://mruby.org/ |
|
||||||
| [`mrsh`](mrsh/) | mrsh | d9763a3 | https://mrsh.sh/ |
|
| [`mrsh`](mrsh/) | mrsh | d9763a3 | https://mrsh.sh/ |
|
||||||
| [`mysthous`](mysthous/) | Hi-Res Adventure #1: Mystery House | 1.0 | https://www.scummvm.org/games/#games-hires1 |
|
| [`mysthous`](mysthous/) | Hi-Res Adventure #1: Mystery House | 1.0 | https://www.scummvm.org/games/#games-hires1 |
|
||||||
| [`nano`](nano/) | GNU nano | 5.8 | https://www.nano-editor.org/ |
|
| [`nano`](nano/) | GNU nano | 5.8 | https://www.nano-editor.org/ |
|
||||||
|
|
25
Ports/mruby/package.sh
Executable file
25
Ports/mruby/package.sh
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/env -S bash ../.port_include.sh
|
||||||
|
port=mruby
|
||||||
|
version=3.0.0
|
||||||
|
files="https://github.com/mruby/mruby/archive/refs/tags/${version}.tar.gz mruby-${version}.tar.gz 95b798cdd931ef29d388e2b0b267cba4dc469e8722c37d4ef8ee5248bc9075b0"
|
||||||
|
auth_type="sha256"
|
||||||
|
|
||||||
|
build_config="serenity"
|
||||||
|
build_dir="build/${build_config}"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
unset CC
|
||||||
|
unset AR
|
||||||
|
unset LD
|
||||||
|
unset CXX
|
||||||
|
export MRUBY_CONFIG="$build_config"
|
||||||
|
run rake
|
||||||
|
}
|
||||||
|
|
||||||
|
install() {
|
||||||
|
run cp "${build_dir}/bin/mirb" "${SERENITY_INSTALL_ROOT}/bin/"
|
||||||
|
run cp "${build_dir}/bin/mrbc" "${SERENITY_INSTALL_ROOT}/bin/"
|
||||||
|
run cp "${build_dir}/bin/mruby" "${SERENITY_INSTALL_ROOT}/bin/"
|
||||||
|
run cp "${build_dir}/lib/libmruby.a" "${SERENITY_INSTALL_ROOT}/usr/lib/"
|
||||||
|
run cp "${build_dir}/lib/libmruby_core.a" "${SERENITY_INSTALL_ROOT}/usr/lib/"
|
||||||
|
}
|
10
Ports/mruby/patches/include-sys-select-h.patch
Normal file
10
Ports/mruby/patches/include-sys-select-h.patch
Normal 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;
|
19
Ports/mruby/patches/serenity-build-conf.patch
Normal file
19
Ports/mruby/patches/serenity-build-conf.patch
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue