Skip to content

Commit 6c3e365

Browse files
authored
Merge pull request #166 from OpenBrickProtocolFoundation/wrappers_submodules
Move Wrappers to submodules
2 parents 7040319 + afc705f commit 6c3e365

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+54
-10901
lines changed

.github/workflows/wrapper.yml

Lines changed: 0 additions & 124 deletions
This file was deleted.

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "wrapper/javascript"]
2+
path = wrapper/javascript
3+
url = https://github.com/Totto16/oopetris_wrapper_js.git
4+
[submodule "wrapper/c"]
5+
path = wrapper/c
6+
url = https://github.com/Totto16/oopetris_wrapper_c.git

meson.options

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,3 @@ option(
2525
value: false,
2626
description: 'if you only want to build the libs, enable this',
2727
)
28-

src/libs/core/meson.build

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,18 @@ liboopetris_core = library(
2222
install: true,
2323
)
2424

25+
## remove '-stdlib=libc++' from the list, if it's present
26+
core_dep_compile_args = []
27+
foreach value : core_lib.get('compile_args')
28+
if value != '-stdlib=libc++'
29+
core_dep_compile_args += value
30+
endif
31+
endforeach
32+
2533
liboopetris_core_dep = declare_dependency(
2634
link_with: liboopetris_core,
2735
include_directories: core_lib.get('inc_dirs'),
28-
compile_args: core_lib.get('compile_args'),
36+
compile_args: core_dep_compile_args,
2937
dependencies: core_lib.get('deps'),
3038
version: meson.project_version(),
3139
)

tools/dependencies/meson.build

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@ only_allow_native_libs = false
33
if meson.is_cross_build()
44
if host_machine.system() == 'switch' or host_machine.system() == '3ds'
55
# we do not link to code that was compiled with gcc 10.1 / gcc 7.1, the code we link with is all compiled with gcc 13.2
6+
7+
temp = core_lib.get('compile_args')
8+
temp += '-Wno-psabi'
9+
610
core_lib += {
7-
'compile_args': [core_lib.get('compile_args'), '-Wno-psabi'],
11+
'compile_args': temp,
812
}
13+
temp = 0
914

1015
only_allow_native_libs = true
1116

@@ -76,10 +81,14 @@ if not have_std_expected
7681
message('Compiler doesn\'t support std::expected, using fallback')
7782

7883
tl_exp_dep = dependency('tl-expected', required: true)
84+
85+
temp = core_lib.get('compile_args')
86+
temp += '-D_USE_TL_EXPECTED'
7987
core_lib += {
80-
'compile_args': [core_lib.get('compile_args'), '-D_USE_TL_EXPECTED'],
88+
'compile_args': temp,
8189
'deps': [core_lib.get('deps'), tl_exp_dep],
8290
}
91+
temp = 0
8392
endif
8493

8594
# check std::optional support
@@ -285,20 +294,20 @@ if build_application
285294

286295
endif
287296

288-
core_lib += {
289-
'compile_args': [
290-
core_lib.get('compile_args'),
291-
'-DBUILD_INSTALLER',
292-
],
293-
}
297+
temp = core_lib.get('compile_args')
298+
temp += '-DBUILD_INSTALLER'
299+
core_lib += {'compile_args': temp}
300+
temp = 0
294301

295302
endif
296303

297304
if is_flatpak_build
298305
app_name = 'com.github.mgerhold.OOPetris'
299-
core_lib += {
300-
'compile_args': [core_lib.get('compile_args'), '-DFLATPAK_BUILD'],
301-
}
306+
307+
temp = core_lib.get('compile_args')
308+
temp += '-DFLATPAK_BUILD'
309+
core_lib += {'compile_args': temp}
310+
temp = 0
302311
endif
303312

304313
have_file_dialogs = false

tools/options/meson.build

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ graphics_lib = {
2626
}
2727

2828
if meson.is_cross_build() and host_machine.system() == 'serenity'
29-
core_lib += {
30-
'compile_args': [
31-
core_lib.get('compile_args'),
32-
'-D__SERENITY__',
33-
'-DINSTALL_FILES',
34-
'-DINSTALL_LOCATION=' + get_option('prefix'),
35-
],
36-
}
29+
temp = core_lib.get('compile_args')
30+
temp += [
31+
'-D__SERENITY__',
32+
'-DINSTALL_FILES',
33+
'-DINSTALL_LOCATION=' + get_option('prefix'),
34+
]
35+
core_lib += {'compile_args': temp}
36+
temp = 0
3737
endif
3838

3939
cpp = meson.get_compiler('cpp')
@@ -68,14 +68,18 @@ elif cpp.get_id() == 'clang'
6868

6969
if build_with_libcpp
7070

71+
temp = core_lib.get('compile_args')
72+
temp += '-stdlib=libc++'
73+
7174
core_lib += {
72-
'compile_args': [core_lib.get('compile_args'), '-stdlib=libc++'],
75+
'compile_args': temp,
7376
'deps': [
7477
core_lib.get('deps'),
7578
cpp.find_library('c++'),
7679
cpp.find_library('c++abi'),
7780
],
7881
}
82+
temp = 0
7983

8084
if not meson.is_subproject()
8185
add_global_link_arguments('-stdlib=libc++', language: ['cpp'])
@@ -87,7 +91,7 @@ elif cpp.get_id() == 'clang'
8791
endif
8892

8993
else
90-
# TODO: once clang with libstdc++ (gcc c++ stdlib) supports std::expectedt, remove this special behaviour
94+
# TODO: once clang with libstdc++ (gcc c++ stdlib) supports std::expected, remove this special behaviour
9195
allow_tl_expected_fallback = true
9296
endif
9397

wrapper/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
## What is this
44

5-
This are wrappers of some OOPEtris functionaility in other languages
5+
This are wrappers of some OOPEtris functionaility in other languages.
6+
They are all in submodules alias in a seperate git repo.
67

78
They currently wrap this:
89
- OOPetris Recordings
@@ -20,6 +21,7 @@ Current:
2021
Planned:
2122
- Python
2223
- Lua
24+
- Java
2325
- Haskell
2426

2527
## Other

wrapper/c

Submodule c added at dd9876b

wrapper/c/README.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)