diff --git a/libaegisub/common/parser.cpp b/libaegisub/common/parser.cpp index ef53ed0d2..89d05628c 100644 --- a/libaegisub/common/parser.cpp +++ b/libaegisub/common/parser.cpp @@ -19,21 +19,15 @@ #include "libaegisub/color.h" #include "libaegisub/ass/dialogue_parser.h" +#include +#include +#include +#include + #include -#include -#include -#include #include #include -// We have to use the copy of pheonix within spirit if it exists, as the -// standalone copy has different header guards -#ifdef HAVE_BOOST_SPIRIT_HOME_PHOENIX_VERSION_HPP -#include -#else -#include -#endif - BOOST_FUSION_ADAPT_STRUCT( agi::Color, (unsigned char, r) diff --git a/meson.build b/meson.build index 4e7ce2fcb..7cfae29ca 100644 --- a/meson.build +++ b/meson.build @@ -91,7 +91,7 @@ deps += dependency('libass', version: '>=0.9.7', boost_modules = ['chrono', 'filesystem', 'thread', 'locale', 'regex'] if not get_option('local_boost') - boost_dep = dependency('boost', version: '>=1.50.0', + boost_dep = dependency('boost', version: '>=1.70.0', modules: boost_modules + ['system'], required: false, static: get_option('default_library') == 'static') diff --git a/src/colour_button.cpp b/src/colour_button.cpp index 83671ebf3..48a87856c 100644 --- a/src/colour_button.cpp +++ b/src/colour_button.cpp @@ -18,11 +18,7 @@ #include "dialogs.h" -#if BOOST_VERSION >= 106900 #include -#else -#include -#endif AGI_DEFINE_EVENT(EVT_COLOR, agi::Color); diff --git a/src/subtitles_provider_libass.cpp b/src/subtitles_provider_libass.cpp index f497bdb34..e0f7b8d5d 100644 --- a/src/subtitles_provider_libass.cpp +++ b/src/subtitles_provider_libass.cpp @@ -46,11 +46,7 @@ #include #include -#if BOOST_VERSION >= 106900 #include -#else -#include -#endif #include #include diff --git a/src/video_frame.cpp b/src/video_frame.cpp index c7957d964..c51f929ac 100644 --- a/src/video_frame.cpp +++ b/src/video_frame.cpp @@ -16,11 +16,7 @@ #include "video_frame.h" -#if BOOST_VERSION >= 106900 #include -#else -#include -#endif #include namespace { diff --git a/src/video_provider_dummy.cpp b/src/video_provider_dummy.cpp index 17a1508b5..eca5ac261 100644 --- a/src/video_provider_dummy.cpp +++ b/src/video_provider_dummy.cpp @@ -45,11 +45,7 @@ #include #include #include -#if BOOST_VERSION >= 106900 #include -#else -#include -#endif DummyVideoProvider::DummyVideoProvider(double fps, int frames, int width, int height, agi::Color colour, bool pattern) : framecount(frames) diff --git a/subprojects/boost.wrap b/subprojects/boost.wrap index 1b2019981..58900fa72 100644 --- a/subprojects/boost.wrap +++ b/subprojects/boost.wrap @@ -1,6 +1,6 @@ [wrap-file] -directory = boost_1_74_0 -source_url = https://boostorg.jfrog.io/artifactory/main/release/1.74.0/source/boost_1_74_0.tar.gz -source_filename = boost_1_74_0.tar.gz -source_hash = afff36d392885120bcac079148c177d1f6f7730ec3d47233aa51b0afa4db94a5 +directory = boost_1_83_0 +source_url = https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.gz +source_filename = boost_1_83_0.tar.gz +source_hash = c0685b68dd44cc46574cce86c4e17c0f611b15e195be9848dfd0769a0a207628 patch_directory = boost diff --git a/subprojects/packagefiles/boost/libs/filesystem/meson.build b/subprojects/packagefiles/boost/libs/filesystem/meson.build index b255d4c97..aa533794b 100644 --- a/subprojects/packagefiles/boost/libs/filesystem/meson.build +++ b/subprojects/packagefiles/boost/libs/filesystem/meson.build @@ -8,14 +8,19 @@ filesystem_sources = files([ 'src/portability.cpp', 'src/unique_path.cpp', 'src/utf8_codecvt_facet.cpp', - 'src/windows_file_codecvt.cpp', ]) filesystem_args = ['-DBOOST_FILESYSTEM_SOURCE', + # normally involves a check for std::atomic_ref + '-DBOOST_FILESYSTEM_NO_CXX20_ATOMIC_REF=1', is_static ? '-DBOOST_FILESYSTEM_STATIC_LINK=1' : '-DBOOST_FILESYSTEM_DYN_LINK=1'] filesystem_deps = [] if host_machine.system() == 'windows' + filesystem_sources += ['src/windows_file_codecvt.cpp'] + filesystem_args += ['-DBOOST_USE_WINDOWS_H', '-DWIN32_LEAN_AND_MEAN', '-DNOMINMAX'] + filesystem_args += ['-D_SCL_SECURE_NO_WARNINGS', '-D_SCL_SECURE_NO_DEPRECATE', '-D_CRT_SECURE_NO_WARNINGS', '-D_CRT_SECURE_NO_DEPRECATE'] + bcrypt_dep = dependency('bcrypt', required: false) if bcrypt_dep.found() filesystem_deps += bcrypt_dep diff --git a/subprojects/packagefiles/boost/libs/locale/meson.build b/subprojects/packagefiles/boost/libs/locale/meson.build index c52b18f7a..e0cb437d2 100644 --- a/subprojects/packagefiles/boost/libs/locale/meson.build +++ b/subprojects/packagefiles/boost/libs/locale/meson.build @@ -1,39 +1,46 @@ locale_sources = files([ - 'src/encoding/codepage.cpp', - 'src/shared/date_time.cpp', - 'src/shared/format.cpp', - 'src/shared/formatting.cpp', - 'src/shared/generator.cpp', - 'src/shared/ids.cpp', - 'src/shared/localization_backend.cpp', - 'src/shared/message.cpp', - 'src/shared/mo_lambda.cpp', - 'src/util/codecvt_converter.cpp', - 'src/util/default_locale.cpp', - 'src/util/info.cpp', - 'src/util/locale_data.cpp', + 'src/boost/locale/encoding/codepage.cpp', + 'src/boost/locale/shared/date_time.cpp', + 'src/boost/locale/shared/format.cpp', + 'src/boost/locale/shared/formatting.cpp', + 'src/boost/locale/shared/generator.cpp', + 'src/boost/locale/shared/iconv_codecvt.cpp', + 'src/boost/locale/shared/ids.cpp', + 'src/boost/locale/shared/localization_backend.cpp', + 'src/boost/locale/shared/message.cpp', + 'src/boost/locale/shared/mo_lambda.cpp', + 'src/boost/locale/util/codecvt_converter.cpp', + 'src/boost/locale/util/default_locale.cpp', + 'src/boost/locale/util/encoding.cpp', + 'src/boost/locale/util/info.cpp', + 'src/boost/locale/util/locale_data.cpp', # icu - 'src/icu/boundary.cpp', - 'src/icu/codecvt.cpp', - 'src/icu/collator.cpp', - 'src/icu/conversion.cpp', - 'src/icu/date_time.cpp', - 'src/icu/formatter.cpp', - 'src/icu/icu_backend.cpp', - 'src/icu/numeric.cpp', - 'src/icu/time_zone.cpp', - # std - docs say disabled by default on windows and solaris, - # but jamfile seemingly only disables on solaris - 'src/std/codecvt.cpp', - 'src/std/collate.cpp', - 'src/std/converter.cpp', - 'src/std/numeric.cpp', - 'src/std/std_backend.cpp', + 'src/boost/locale/icu/boundary.cpp', + 'src/boost/locale/icu/codecvt.cpp', + 'src/boost/locale/icu/collator.cpp', + 'src/boost/locale/icu/conversion.cpp', + 'src/boost/locale/icu/date_time.cpp', + 'src/boost/locale/icu/formatter.cpp', + 'src/boost/locale/icu/formatters_cache.cpp', + 'src/boost/locale/icu/icu_backend.cpp', + 'src/boost/locale/icu/numeric.cpp', + 'src/boost/locale/icu/time_zone.cpp', + # std + 'src/boost/locale/std/codecvt.cpp', + 'src/boost/locale/std/collate.cpp', + 'src/boost/locale/std/converter.cpp', + 'src/boost/locale/std/numeric.cpp', + 'src/boost/locale/std/std_backend.cpp', # included if using posix, win32 or std backend (ie always) - 'src/util/gregorian.cpp', + 'src/boost/locale/util/gregorian.cpp', ]) -locale_args = ['-DBOOST_THREAD_NO_LIB=1'] +locale_args = [ + '-DBOOST_THREAD_NO_LIB=1', + '-DBOOST_LOCALE_SOURCE', + '-D_CRT_SECURE_NO_WARNINGS', + '-D_SCL_SECURE_NO_WARNINGS', +] locale_deps = [] if not is_static @@ -42,21 +49,21 @@ endif if host_machine.system() == 'windows' locale_sources += files([ - 'src/win32/collate.cpp', - 'src/win32/converter.cpp', - 'src/win32/numeric.cpp', - 'src/win32/win_backend.cpp', + 'src/boost/locale/win32/collate.cpp', + 'src/boost/locale/win32/converter.cpp', + 'src/boost/locale/win32/numeric.cpp', + 'src/boost/locale/win32/win_backend.cpp', # included on windows/cygwin if std *or* win32 included - 'src/win32/lcid.cpp', + 'src/boost/locale/win32/lcid.cpp', ]) locale_args += '-DBOOST_LOCALE_NO_POSIX_BACKEND=1' else locale_sources += files([ - 'src/posix/collate.cpp', - 'src/posix/converter.cpp', - 'src/posix/numeric.cpp', - 'src/posix/codecvt.cpp', - 'src/posix/posix_backend.cpp', + 'src/boost/locale/posix/collate.cpp', + 'src/boost/locale/posix/converter.cpp', + 'src/boost/locale/posix/numeric.cpp', + 'src/boost/locale/posix/codecvt.cpp', + 'src/boost/locale/posix/posix_backend.cpp', ]) locale_args += '-DBOOST_LOCALE_NO_WINAPI_BACKEND=1' endif @@ -73,9 +80,9 @@ locale_deps += icu_deps locale_args += '-DBOOST_LOCALE_WITH_ICU=1' boost_locale = library('boost_locale', locale_sources, - include_directories: inc, + include_directories: [inc, 'src'], cpp_args: locale_args, dependencies: [thread_dep, locale_deps, boost_thread_dep]) -boost_locale_dep = declare_dependency(link_with: boost_locale, include_directories: inc, +boost_locale_dep = declare_dependency(link_with: boost_locale, include_directories: [inc, 'src'], compile_args: '-DBOOST_ALL_NO_LIB=1') diff --git a/subprojects/packagefiles/boost/libs/regex/meson.build b/subprojects/packagefiles/boost/libs/regex/meson.build index f073f33d8..91d05e060 100644 --- a/subprojects/packagefiles/boost/libs/regex/meson.build +++ b/subprojects/packagefiles/boost/libs/regex/meson.build @@ -1,25 +1,18 @@ regex_sources = files([ - 'src/c_regex_traits.cpp', - 'src/cpp_regex_traits.cpp', - 'src/cregex.cpp', - 'src/fileiter.cpp', - 'src/icu.cpp', - 'src/instances.cpp', 'src/posix_api.cpp', 'src/regex.cpp', 'src/regex_debug.cpp', - 'src/regex_raw_buffer.cpp', - 'src/regex_traits_defaults.cpp', 'src/static_mutex.cpp', - 'src/w32_regex_traits.cpp', - 'src/wc_regex_traits.cpp', 'src/wide_posix_api.cpp', - 'src/winstances.cpp', - 'src/usinstances.cpp', ]) regex_args = ['-DBOOST_HAS_ICU=1'] +regex_deps = [] +if host_machine.system() == 'windows' + regex_deps += cpp.find_library('advapi32') +endif + if not is_static regex_args += '-DBOOST_REGEX_DYN_LINK=1' endif @@ -27,7 +20,7 @@ endif boost_regex = library('boost_regex', regex_sources, include_directories: inc, cpp_args: regex_args, - dependencies: [thread_dep, icu_deps]) + dependencies: [thread_dep, icu_deps, regex_deps]) boost_regex_dep = declare_dependency(link_with: boost_regex, include_directories: inc, compile_args: '-DBOOST_ALL_NO_LIB=1') diff --git a/subprojects/packagefiles/boost/meson.build b/subprojects/packagefiles/boost/meson.build index a0a9881d8..9431ea1bb 100644 --- a/subprojects/packagefiles/boost/meson.build +++ b/subprojects/packagefiles/boost/meson.build @@ -1,5 +1,5 @@ project('boost', 'cpp', - version: '1.74.0', + version: '1.83.0', meson_version: '>=0.55.0') cpp = meson.get_compiler('cpp')