Update tomlplusplus to version 3.3.0

Arch tries to build yabridge against this version, and some things are
now broken. We need to more forcefully hack tomlplusplus into thinking
its running on Linux, and shared library mode also needs to be
explicitly disabled.
This commit is contained in:
Robbert van der Helm
2023-02-21 13:52:40 +01:00
parent bf4ab15788
commit 83022726fc
4 changed files with 46 additions and 8 deletions
+1
View File
@@ -21,6 +21,7 @@ Versioning](https://semver.org/spec/v2.0.0.html).
### Packaging notes
- The CLAP dependency has been updated to target version 1.1.7.
- The tomlplusplus dependency has been updated to target version 3.3.0.
## [5.0.3] - 2022-12-23
+1 -1
View File
@@ -266,7 +266,7 @@ function2_dep = dependency('function2', version : '>=4.0.0')
ghc_filesystem_dep = dependency('ghc_filesystem', modules : 'ghcFilesystem::ghc_filesystem', version : '>=1.5.0')
threads_dep = dependency('threads')
# Tomlplusplus recently added a shraed library version. We don't want to link to that.
tomlplusplus_dep = dependency('tomlplusplus', version : '>=3.0.0').partial_dependency(compile_args : true, includes : true)
tomlplusplus_dep = dependency('tomlplusplus', version : '>=3.3.0').partial_dependency(compile_args : true, includes : true)
dl_dep = declare_dependency(link_args : '-ldl')
rt_dep = declare_dependency(link_args : '-lrt')
+42 -5
View File
@@ -16,14 +16,51 @@
#include "configuration.h"
// tomlplusplus recently got some Windows fixes, but they cause compilation
// errors and we don't need them so we'll just disable them outright
#define TOML_WINDOWS_COMPAT 0
#include <fnmatch.h>
#include <toml++/toml.h>
#include <fstream>
// By default tomlplusplus is no longer headers when using the package config
// file. We don't want to link against third party shared libraries in yabridge.
#ifdef TOML_SHARED_LIB
#undef TOML_SHARED_LIB
#undef TOML_HEADER_ONLY
#define TOML_HEADER_ONLY 1
#endif
// tomlplusplus recently got some Windows fixes, but they cause compilation
// errors and we don't need them so we'll just disable them outright. Disabling
// `TOML_ENABLE_WINDOWS_COMPAT` is no longer enough, and you can't disable
// `TOML_WINDOWS` directly. This is the same trick used in `use-asio-linux.h`.
#ifdef __WINE__
#pragma push_macro("WIN32")
#pragma push_macro("_WIN32")
#pragma push_macro("__WIN32__")
#pragma push_macro("__NT__")
#pragma push_macro("__CYGWIN__")
#undef WIN32
#undef _WIN32
#undef __WIN32__
#undef __NT__
#undef __CYGWIN__
#endif
#include <toml++/toml.h>
#ifdef __WINE__
#pragma pop_macro("WIN32")
#pragma pop_macro("_WIN32")
#pragma pop_macro("__WIN32__")
#pragma pop_macro("__NT__")
#pragma pop_macro("__CYGWIN__")
#endif
#include "utils.h"
namespace fs = ghc::filesystem;
+2 -2
View File
@@ -1,7 +1,7 @@
[wrap-git]
url = https://github.com/marzer/tomlplusplus.git
# Tag v3.0.1
revision = 8e669aa6990e0ed219c169d491472d749f54c393
# Tag v3.3.0
revision = c635f21
depth = 1
[provide]