Skip to content

Commit

Permalink
Bump boost to 1.83
Browse files Browse the repository at this point in the history
  • Loading branch information
CoffeeFlux authored and arch1t3cht committed May 30, 2024
1 parent 29c8054 commit c7cabcb
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 90 deletions.
16 changes: 5 additions & 11 deletions libaegisub/common/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,15 @@
#include "libaegisub/color.h"
#include "libaegisub/ass/dialogue_parser.h"

#include <boost/phoenix/core.hpp>
#include <boost/phoenix/operator.hpp>
#include <boost/phoenix/fusion.hpp>
#include <boost/phoenix/statement.hpp>

#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_operator.hpp>
#include <boost/spirit/include/phoenix_fusion.hpp>
#include <boost/fusion/include/adapt_struct.hpp>
#include <boost/spirit/include/lex_lexertl.hpp>

// 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 <boost/spirit/home/phoenix/statement.hpp>
#else
#include <boost/phoenix/statement.hpp>
#endif

BOOST_FUSION_ADAPT_STRUCT(
agi::Color,
(unsigned char, r)
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
4 changes: 0 additions & 4 deletions src/colour_button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@

#include "dialogs.h"

#if BOOST_VERSION >= 106900
#include <boost/gil.hpp>
#else
#include <boost/gil/gil_all.hpp>
#endif

AGI_DEFINE_EVENT(EVT_COLOR, agi::Color);

Expand Down
4 changes: 0 additions & 4 deletions src/subtitles_provider_libass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@
#include <libaegisub/util.h>

#include <atomic>
#if BOOST_VERSION >= 106900
#include <boost/gil.hpp>
#else
#include <boost/gil/gil_all.hpp>
#endif
#include <memory>
#include <mutex>

Expand Down
4 changes: 0 additions & 4 deletions src/video_frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@

#include "video_frame.h"

#if BOOST_VERSION >= 106900
#include <boost/gil.hpp>
#else
#include <boost/gil/gil_all.hpp>
#endif
#include <wx/image.h>

namespace {
Expand Down
4 changes: 0 additions & 4 deletions src/video_provider_dummy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@
#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem/path.hpp>
#include <libaegisub/format.h>
#if BOOST_VERSION >= 106900
#include <boost/gil.hpp>
#else
#include <boost/gil/gil_all.hpp>
#endif

DummyVideoProvider::DummyVideoProvider(double fps, int frames, int width, int height, agi::Color colour, bool pattern)
: framecount(frames)
Expand Down
8 changes: 4 additions & 4 deletions subprojects/boost.wrap
Original file line number Diff line number Diff line change
@@ -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
7 changes: 6 additions & 1 deletion subprojects/packagefiles/boost/libs/filesystem/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
93 changes: 50 additions & 43 deletions subprojects/packagefiles/boost/libs/locale/meson.build
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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')
19 changes: 6 additions & 13 deletions subprojects/packagefiles/boost/libs/regex/meson.build
Original file line number Diff line number Diff line change
@@ -1,33 +1,26 @@
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

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')
2 changes: 1 addition & 1 deletion subprojects/packagefiles/boost/meson.build
Original file line number Diff line number Diff line change
@@ -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')
Expand Down

0 comments on commit c7cabcb

Please sign in to comment.