From ebca413c0a3e885ac1901bd555e127476c40b057 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Fri, 24 May 2024 01:19:08 +0200 Subject: [PATCH] Cleaning up the wren dependency --- .gitignore | 1 + .gitmodules | 3 - .../{ => packagefiles}/wren/find_scripts.py | 0 .../wren/guess_test_outcome.py | 0 .../{ => packagefiles}/wren/meson.build | 66 +++++++++---------- .../{ => packagefiles}/wren/meson_options.txt | 0 subprojects/wren.wrap | 8 +++ subprojects/wren/wren | 1 - 8 files changed, 42 insertions(+), 37 deletions(-) rename subprojects/{ => packagefiles}/wren/find_scripts.py (100%) rename subprojects/{ => packagefiles}/wren/guess_test_outcome.py (100%) rename subprojects/{ => packagefiles}/wren/meson.build (65%) rename subprojects/{ => packagefiles}/wren/meson_options.txt (100%) create mode 100644 subprojects/wren.wrap delete mode 160000 subprojects/wren/wren diff --git a/.gitignore b/.gitignore index f8f1c27..a8292dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ tags compile_commands.json +subprojects/wren/ diff --git a/.gitmodules b/.gitmodules index ce67337..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "subprojects/wren/wren"] - path = subprojects/wren/wren - url = https://github.com/wren-lang/wren.git diff --git a/subprojects/wren/find_scripts.py b/subprojects/packagefiles/wren/find_scripts.py similarity index 100% rename from subprojects/wren/find_scripts.py rename to subprojects/packagefiles/wren/find_scripts.py diff --git a/subprojects/wren/guess_test_outcome.py b/subprojects/packagefiles/wren/guess_test_outcome.py similarity index 100% rename from subprojects/wren/guess_test_outcome.py rename to subprojects/packagefiles/wren/guess_test_outcome.py diff --git a/subprojects/wren/meson.build b/subprojects/packagefiles/wren/meson.build similarity index 65% rename from subprojects/wren/meson.build rename to subprojects/packagefiles/wren/meson.build index 0f0026f..c02838b 100644 --- a/subprojects/wren/meson.build +++ b/subprojects/packagefiles/wren/meson.build @@ -17,27 +17,27 @@ else c_opts += '-DWREN_OPT_META=0' endif -wren_incl = include_directories('wren/src/include', is_system: true) -wren_pvt_incl = include_directories('wren/src/vm', 'wren/src/optional') -test_incl = include_directories('wren/test') +wren_incl = include_directories('src/include', is_system: true) +wren_pvt_incl = include_directories('src/vm', 'src/optional') +test_incl = include_directories('test') threads_dep = dependency('threads') libuv_dep = c_compiler.find_library('libuv', required: true) m_dep = c_compiler.find_library('m', required: true) opt_src = [ - 'wren/src/optional/wren_opt_random.c', - 'wren/src/optional/wren_opt_meta.c', + 'src/optional/wren_opt_random.c', + 'src/optional/wren_opt_meta.c', ] vm_src = [ - 'wren/src/vm/wren_compiler.c', - 'wren/src/vm/wren_core.c', - 'wren/src/vm/wren_debug.c', - 'wren/src/vm/wren_primitive.c', - 'wren/src/vm/wren_utils.c', - 'wren/src/vm/wren_value.c', - 'wren/src/vm/wren_vm.c', + 'src/vm/wren_compiler.c', + 'src/vm/wren_core.c', + 'src/vm/wren_debug.c', + 'src/vm/wren_primitive.c', + 'src/vm/wren_utils.c', + 'src/vm/wren_value.c', + 'src/vm/wren_vm.c', ] force_static = meson.is_subproject() @@ -69,24 +69,24 @@ if get_option('build_testing') fs = import('fs') test_src = [ - 'wren/test/api/api_tests.c', - 'wren/test/api/benchmark.c', - 'wren/test/api/call.c', - 'wren/test/api/call_calls_foreign.c', - 'wren/test/api/call_wren_call_root.c', - 'wren/test/api/error.c', - 'wren/test/api/foreign_class.c', - 'wren/test/api/get_variable.c', - 'wren/test/api/handle.c', - 'wren/test/api/lists.c', - 'wren/test/api/new_vm.c', - 'wren/test/api/reset_stack_after_call_abort.c', - 'wren/test/api/reset_stack_after_foreign_construct.c', - 'wren/test/api/resolution.c', - 'wren/test/api/slots.c', - 'wren/test/api/user_data.c', - 'wren/test/main.c', - 'wren/test/test.c', + 'test/api/api_tests.c', + 'test/api/benchmark.c', + 'test/api/call.c', + 'test/api/call_calls_foreign.c', + 'test/api/call_wren_call_root.c', + 'test/api/error.c', + 'test/api/foreign_class.c', + 'test/api/get_variable.c', + 'test/api/handle.c', + 'test/api/lists.c', + 'test/api/new_vm.c', + 'test/api/reset_stack_after_call_abort.c', + 'test/api/reset_stack_after_foreign_construct.c', + 'test/api/resolution.c', + 'test/api/slots.c', + 'test/api/user_data.c', + 'test/main.c', + 'test/test.c', ] test_script_paths = [ @@ -103,7 +103,7 @@ if get_option('build_testing') test_scripts = run_command( files('find_scripts.py'), - meson.current_source_dir() / 'wren/test', + meson.current_source_dir() / 'test', test_script_paths, ).stdout().strip().split('\n') @@ -135,7 +135,7 @@ endif if not force_static install_headers( - 'wren/src/include/wren.h', - 'wren/src/include/wren.hpp', + 'src/include/wren.h', + 'src/include/wren.hpp', ) endif diff --git a/subprojects/wren/meson_options.txt b/subprojects/packagefiles/wren/meson_options.txt similarity index 100% rename from subprojects/wren/meson_options.txt rename to subprojects/packagefiles/wren/meson_options.txt diff --git a/subprojects/wren.wrap b/subprojects/wren.wrap new file mode 100644 index 0000000..ff9e96b --- /dev/null +++ b/subprojects/wren.wrap @@ -0,0 +1,8 @@ +[wrap-git] +url = https://github.com/wren-lang/wren.git +revision = 4a18fc489f9ea3d253b20dd40f4cdad0d6bb40eb +patch_directory = wren + +[provide] +dependency_names = wren-0.4.0 +wren = wren_dep diff --git a/subprojects/wren/wren b/subprojects/wren/wren deleted file mode 160000 index 4a18fc4..0000000 --- a/subprojects/wren/wren +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4a18fc489f9ea3d253b20dd40f4cdad0d6bb40eb