diff --git a/recipes-musicians/zyn/mruby-zest-native.bb b/recipes-musicians/zyn/mruby-zest-native.bb index 8392611..3c92414 100644 --- a/recipes-musicians/zyn/mruby-zest-native.bb +++ b/recipes-musicians/zyn/mruby-zest-native.bb @@ -6,9 +6,7 @@ DEPENDS += " \ libuv-native \ " -SRC_URI += "file://0004-Native-Do-not-build-X11-dependent-zest-libzest.so.patch" - do_install() { install -d ${D}${bindir} - install -m 755 ${B}/mruby/build/host/bin/mrbc ${D}${bindir}/mrbc-zest + install -m 755 ${B}/mruby/build/host-debug/bin/mrbc ${D}${bindir}/mrbc-zest } diff --git a/recipes-musicians/zyn/mruby-zest.bb b/recipes-musicians/zyn/mruby-zest.bb index 4fbae41..2109f57 100644 --- a/recipes-musicians/zyn/mruby-zest.bb +++ b/recipes-musicians/zyn/mruby-zest.bb @@ -10,6 +10,7 @@ SRC_URI += " \ file://0007-Load-schema-from-usr-share-zyn-fusion-schema.patch \ file://0008-Do-not-require-dummy-MainWindow.qml.patch \ file://0009-Avoid-glGenerateMipmap-for-GLES2-either.patch \ + file://0010-Do-not-run-mruby-file-stat-s-configure-at-copmpile-t.patch \ " DEPENDS += " \ @@ -34,18 +35,10 @@ do_configure_prepend() { sed -i -- 's/GL2/GLES2/g' ${WORKDIR}/git/src/mruby-widget-lib/src/gem.c sed -i -- 's/MRUBY_NANOVG_GL2/MRUBY_NANOVG_GLES2/g' ${WORKDIR}/git/build_config.rb sed -i '/idiot/d' ${WORKDIR}/git/deps/mruby-nanovg/src/nvg_impl.h - - # Fetch ruby gems. Although unexpected it starts building happily and - # breaks so ignore that. - cd mruby - MRUBY_CONFIG=../build_config.rb ruby minirake --pull-gems || true - - # ensure config.h is created at the right place... - cd build/host/mrbgems/mruby-file-stat/src } do_configure_append() { - cp -f ${S}/mruby/build/host/mrbgems/mruby-file-stat/src/config.h ${S}/deps/mruby-file-stat/src/ + cp -f ${S}/config.h ${S}/deps/mruby-file-stat/src/ } do_install() { diff --git a/recipes-musicians/zyn/mruby-zest.inc b/recipes-musicians/zyn/mruby-zest.inc index d59b344..a00cf10 100644 --- a/recipes-musicians/zyn/mruby-zest.inc +++ b/recipes-musicians/zyn/mruby-zest.inc @@ -8,7 +8,7 @@ SRC_URI = " \ file://0002-mruby-zest-Align-build-to-our-needs.patch \ file://0003-src-osc-bridge-Align-build-to-our-needs.patch \ " -SRCREV = "4eb88250f22ee684acac95d4d1f114df504e37a7" +SRCREV = "69349cd0f09895160a61aad5d2a4ef9377af748e" PV = "3.0.5+git${SRCPV}" PE = "1" S = "${WORKDIR}/git" diff --git a/recipes-musicians/zyn/mruby-zest/0001-mruby-Align-build-to-our-needs.patch b/recipes-musicians/zyn/mruby-zest/0001-mruby-Align-build-to-our-needs.patch index 7f5a02d..fee7a6b 100644 --- a/recipes-musicians/zyn/mruby-zest/0001-mruby-Align-build-to-our-needs.patch +++ b/recipes-musicians/zyn/mruby-zest/0001-mruby-Align-build-to-our-needs.patch @@ -1,7 +1,10 @@ From 84ec8305a0e4c67277929a812e6796d9f054cb02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= -Date: Wed, 13 Mar 2019 22:26:35 +0100 +Date: Wed, 10 Mar 2021 21:48:41 +0100 Subject: [PATCH 1/2] mruby: Align build to our needs +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit * Add build flags @@ -10,38 +13,39 @@ Upstream-Status: Inappropriate [embedded specific] Signed-off-by: Andreas Müller --- build_config.rb | 11 ++++++++++- - mruby/tasks/toolchains/gcc.rake | 2 +- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build_config.rb b/build_config.rb -index 664e84a..fda7fd7 100644 +index 87e4e95..6c49a3d 100644 --- a/build_config.rb +++ b/build_config.rb -@@ -102,18 +102,22 @@ build_type.new(build_name) do |conf| +@@ -125,6 +125,8 @@ build_type.new(build_name) do |conf| cc.flags << "-mstackrealign" if windows cc.flags << "-mwindows" if windows cc.flags << "-Wno-declaration-after-statement" + cc.flags << ENV['CFLAGS'] + cc.command = ENV['CC'] + cc.defines << "UI_HOTLOAD" if ENV.include?("UI_HOTLOAD") cc.defines << "DEMO_MODE=#{demo_mode ? '1':'0'}" - end - - conf.linker do |linker| - #linker.library_paths << "#{`pwd`.strip}/../deps/nanovg/build/" - #linker.library_paths << "#{`pwd`.strip}/../deps/rtosc/build/" -+ linker.command = ENV['CC'] -+ linker.flags = [ENV['LDFLAGS'] || []] + cc.defines << "MRB_NO_BOXING" +@@ -134,13 +136,15 @@ build_type.new(build_name) do |conf| linker.library_paths << "#{`pwd`.strip}/../src/osc-bridge/" linker.libraries << 'osc-bridge' - linker.flags_after_libraries << "#{`pwd`.strip}/../deps/pugl/build/libpugl-0.a" linker.flags_after_libraries << "#{`pwd`.strip}/../deps/libnanovg.a" ++ linker.command = ENV['CC'] ++ linker.flags = [ENV['LDFLAGS'] || []] if(!windows) -- linker.flags_after_libraries << "#{`pwd`.strip}/../deps/libuv.a" -+ linker.flags_after_libraries << "-luv" - if(ENV['OS'] != "Mac") + if(!mac) linker.libraries << 'GL' linker.libraries << 'X11' -@@ -135,6 +139,11 @@ build_type.new(build_name) do |conf| + linker.flags_after_libraries << `pkg-config --libs libuv`.strip + else +- linker.flags_after_libraries << "#{`pwd`.strip}/../deps/libuv.a" ++ linker.flags_after_libraries << "-luv" + end + linker.flags_after_libraries << "-lpthread -ldl -lm" + else +@@ -159,6 +163,11 @@ build_type.new(build_name) do |conf| conf.gem 'src/mruby-widget-lib' #conf.gem 'deps/mruby-profiler' @@ -57,15 +61,15 @@ diff --git a/mruby/tasks/toolchains/gcc.rake b/mruby/tasks/toolchains/gcc.rake index f370c0ab..a2ab5ed4 100644 --- a/mruby/tasks/toolchains/gcc.rake +++ b/mruby/tasks/toolchains/gcc.rake -@@ -22,7 +22,7 @@ MRuby::Toolchain.new(:gcc) do |conf, _params| +@@ -23,7 +23,7 @@ MRuby::Toolchain.new(:gcc) do |conf, params| end conf.linker do |linker| -- linker.command = ENV['LD'] || ENV['CXX'] || ENV['CC'] || 'gcc' +- linker.command = ENV['LD'] || ENV['CXX'] || ENV['CC'] || default_command + linker.command = ENV['CC'] linker.flags = [ENV['LDFLAGS'] || %w()] linker.libraries = %w(m) linker.library_paths = [] -- -2.20.1 +2.26.1 diff --git a/recipes-musicians/zyn/mruby-zest/0002-mruby-zest-Align-build-to-our-needs.patch b/recipes-musicians/zyn/mruby-zest/0002-mruby-zest-Align-build-to-our-needs.patch index b193c7f..b988066 100644 --- a/recipes-musicians/zyn/mruby-zest/0002-mruby-zest-Align-build-to-our-needs.patch +++ b/recipes-musicians/zyn/mruby-zest/0002-mruby-zest-Align-build-to-our-needs.patch @@ -1,6 +1,6 @@ From 368ece5a84a3972ae7e2635e4fa53a1dce0383f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= -Date: Wed, 12 Sep 2018 21:19:55 +0200 +Date: Wed, 10 Mar 2021 22:02:50 +0100 Subject: [PATCH] mruby-zest: Align build to our needs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -14,35 +14,35 @@ Upstream-Status: Inappropriate [embedded specific] Signed-off-by: Andreas Müller --- Makefile | 8 ++++---- - 2 files changed, 6 insertions(+), 6 deletions(-) + 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile -index c0d8cc1..7ce309a 100644 +index 5f110db..3000ca2 100644 --- a/Makefile +++ b/Makefile -@@ -5,18 +5,18 @@ UV_URL = http://dist.libuv.org/dist/v1.9.1/$(UV_FILE) +@@ -1,7 +1,7 @@ all: ruby ./rebuild-fcache.rb - cd deps/nanovg/src && $(CC) nanovg.c -c -fPIC + cd deps/nanovg/src && $(CC) $(CFLAGS) nanovg.c -c -fPIC $(AR) rc deps/libnanovg.a deps/nanovg/src/*.o - # cd deps/pugl && python2 ./waf configure --no-cairo --static - cd deps/pugl && python2 ./waf configure --no-cairo --static --debug - cd deps/pugl && python2 ./waf -- cd src/osc-bridge && CFLAGS="-I ../../deps/$(UV_DIR)/include " make lib -+ cd src/osc-bridge && make lib - cd mruby && MRUBY_CONFIG=../build_config.rb rake - $(CC) -shared -o libzest.so `find mruby/build/host -type f | grep -e "\.o$$" | grep -v bin` ./deps/libnanovg.a \ + cd deps/mruby-file-stat/src && ../configure + cd src/osc-bridge && make lib +@@ -10,10 +10,10 @@ all: + $(CC) -shared -o libzest.so `find mruby/build/host -type f | grep -v mrbc | grep -e "\.o$$" | grep -v bin` ./deps/libnanovg.a \ ./deps/libnanovg.a \ src/osc-bridge/libosc-bridge.a \ -- ./deps/$(UV_DIR)/.libs/libuv.a -lm -lX11 -lGL -lpthread -- $(CC) test-libversion.c deps/pugl/build/libpugl-0.a -ldl -o zest -lX11 -lGL -lpthread -I deps/pugl -std=gnu99 -+ $(LDFLAGS) -lpcre -luv -lm -lX11 -lGL -lpthread -+ $(CC) $(CFLAGS) test-libversion.c deps/pugl/build/libpugl-0.a -ldl -o zest $(LDFLAGS) -lX11 -lGL -lpthread -I deps/pugl -std=gnu99 +- `pkg-config --libs libuv` -lm -lX11 -lGL -lpthread +- $(CC) test-libversion.c deps/pugl/pugl/pugl_x11.c \ ++ $(LDFLAGS) `pkg-config --libs libuv` -lm -lX11 -lGL -lpthread ++ $(CC) $(CFLAGS) test-libversion.c deps/pugl/pugl/pugl_x11.c \ + -DPUGL_HAVE_GL \ +- -ldl -o zest -lX11 -lGL -lpthread -I deps/pugl -std=gnu99 -Wno-trigraphs ++ -ldl -o zest $(LDFLAGS) -lX11 -lGL -lpthread -I deps/pugl -std=gnu99 -Wno-trigraphs - osx: + osx: deps/libuv.a ruby ./rebuild-fcache.rb -- -2.14.4 +2.26.2 diff --git a/recipes-musicians/zyn/mruby-zest/0004-Native-Do-not-build-X11-dependent-zest-libzest.so.patch b/recipes-musicians/zyn/mruby-zest/0004-Native-Do-not-build-X11-dependent-zest-libzest.so.patch deleted file mode 100644 index 8e71e73..0000000 --- a/recipes-musicians/zyn/mruby-zest/0004-Native-Do-not-build-X11-dependent-zest-libzest.so.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 6ff4dcce6aa865f96af7273e875c722edbceb83e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= -Date: Thu, 13 Sep 2018 21:27:40 +0200 -Subject: [PATCH] Native: Do not build X11 dependent zest/libzest.so -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Andreas Müller ---- - Makefile | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/Makefile b/Makefile -index 7ce309a..9d38910 100644 ---- a/Makefile -+++ b/Makefile -@@ -12,11 +12,6 @@ all: - cd deps/pugl && python2 ./waf - cd src/osc-bridge && make lib - cd mruby && MRUBY_CONFIG=../build_config.rb rake -- $(CC) -shared -o libzest.so `find mruby/build/host -type f | grep -e "\.o$$" | grep -v bin` ./deps/libnanovg.a \ -- ./deps/libnanovg.a \ -- src/osc-bridge/libosc-bridge.a \ -- $(LDFLAGS) -lpcre -luv -lm -lX11 -lGL -lpthread -- $(CC) $(CFLAGS) test-libversion.c deps/pugl/build/libpugl-0.a -ldl -o zest $(LDFLAGS) -lX11 -lGL -lpthread -I deps/pugl -std=gnu99 - - osx: - ruby ./rebuild-fcache.rb --- -2.14.4 - diff --git a/recipes-musicians/zyn/mruby-zest/0005-mruby-Use-native-mrbc.patch b/recipes-musicians/zyn/mruby-zest/0005-mruby-Use-native-mrbc.patch index 6403083..8103266 100644 --- a/recipes-musicians/zyn/mruby-zest/0005-mruby-Use-native-mrbc.patch +++ b/recipes-musicians/zyn/mruby-zest/0005-mruby-Use-native-mrbc.patch @@ -17,15 +17,15 @@ diff --git a/mruby/lib/mruby/build/command.rb b/mruby/lib/mruby/build/command.rb index d4354225e..e80a74c2b 100644 --- a/mruby/lib/mruby/build/command.rb +++ b/mruby/lib/mruby/build/command.rb -@@ -313,7 +313,7 @@ module MRuby +@@ -325,7 +325,7 @@ module MRuby end - def run(out, infiles, funcname) + def run(out, infiles, funcname, cdump = true) - @command ||= @build.mrbcfile + @command ||= "mrbc-zest" infiles = [infiles].flatten - infiles.each do |f| - _pp "MRBC", f.relative_path, nil, :indent => 2 + infiles.each_with_index do |f, i| + _pp i == 0 ? "MRBC" : "", f.relative_path, indent: 2 -- 2.21.0 diff --git a/recipes-musicians/zyn/mruby-zest/0010-Do-not-run-mruby-file-stat-s-configure-at-copmpile-t.patch b/recipes-musicians/zyn/mruby-zest/0010-Do-not-run-mruby-file-stat-s-configure-at-copmpile-t.patch new file mode 100644 index 0000000..eb96951 --- /dev/null +++ b/recipes-musicians/zyn/mruby-zest/0010-Do-not-run-mruby-file-stat-s-configure-at-copmpile-t.patch @@ -0,0 +1,30 @@ +From 5f96d2062de40de85840bd91a729d4424573bfc7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Sun, 4 Apr 2021 23:45:51 +0200 +Subject: [PATCH 2/2] Do not run mruby-file-stat's configure at copmpile time +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Andreas Müller +--- + Makefile | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 3000ca2..198e3ed 100644 +--- a/Makefile ++++ b/Makefile +@@ -3,7 +3,6 @@ all: + ruby ./rebuild-fcache.rb + cd deps/nanovg/src && $(CC) $(CFLAGS) nanovg.c -c -fPIC + $(AR) rc deps/libnanovg.a deps/nanovg/src/*.o +- cd deps/mruby-file-stat/src && ../configure + cd src/osc-bridge && make lib + # cd mruby && UI_HOTLOAD=1 MRUBY_CONFIG=../build_config.rb rake + cd mruby && MRUBY_CONFIG=../build_config.rb rake +-- +2.26.2 +