fix(boost)!: migrate boost to 1.86 (#3256)
Some checks failed
CI / GitHub Env Debug (push) Waiting to run
CI / Setup Release (push) Waiting to run
CI / Setup Flatpak Matrix (push) Waiting to run
CI / Linux Flatpak (push) Blocked by required conditions
CI / Linux ${{ matrix.type }} (--appimage-build, 22.04, AppImage) (push) Blocked by required conditions
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 13) (push) Blocked by required conditions
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 14) (push) Blocked by required conditions
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (ubuntu, latest) (push) Blocked by required conditions
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (ubuntu, latest, true) (push) Blocked by required conditions
CI / Macports (macOS-${{ matrix.os_version }}) (13, true) (push) Blocked by required conditions
CI / Macports (macOS-${{ matrix.os_version }}) (14) (push) Blocked by required conditions
CI / Windows (push) Blocked by required conditions
CI Docker / Check Dockerfiles (push) Waiting to run
CI Docker / Setup Release (push) Blocked by required conditions
CI Docker / Docker${{ matrix.tag }} (push) Blocked by required conditions
CodeQL / Get language matrix (push) Waiting to run
CodeQL / Analyze (${{ matrix.name }}) (push) Blocked by required conditions
Build GH-Pages / update_pages (push) Waiting to run
localize / Update Localization (push) Has been cancelled

This commit is contained in:
Lukas Senionis 2024-10-04 04:42:16 +03:00 committed by GitHub
parent 2c050d1cb0
commit e90b71ce62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 31 additions and 29 deletions

View File

@ -7,6 +7,7 @@ pacman --noconfirm -Syu
# install dependencies
dependencies=(
"git"
"mingw-w64-ucrt-x86_64-boost"
"mingw-w64-ucrt-x86_64-cmake"
"mingw-w64-ucrt-x86_64-cppwinrt"
"mingw-w64-ucrt-x86_64-curl-winssl"

View File

@ -1021,6 +1021,7 @@ jobs:
update: true
install: >-
git
mingw-w64-ucrt-x86_64-boost
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-cppwinrt
mingw-w64-ucrt-x86_64-curl-winssl

View File

@ -3,7 +3,7 @@
#
include_guard(GLOBAL)
set(BOOST_VERSION 1.85)
set(BOOST_VERSION 1.86)
set(BOOST_COMPONENTS
filesystem
locale
@ -15,7 +15,7 @@ if(BOOST_USE_STATIC)
set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103
endif()
find_package(Boost ${BOOST_VERSION} COMPONENTS ${BOOST_COMPONENTS})
find_package(Boost CONFIG ${BOOST_VERSION} COMPONENTS ${BOOST_COMPONENTS})
if(NOT Boost_FOUND)
message(STATUS "Boost v${BOOST_VERSION}.x package not found in the system. Falling back to FetchContent.")
include(FetchContent)
@ -39,9 +39,9 @@ if(NOT Boost_FOUND)
set(BOOST_INCLUDE_LIBRARIES
${BOOST_COMPONENTS})
set(BOOST_URL
"https://github.com/boostorg/boost/releases/download/boost-1.85.0/boost-1.85.0-cmake.tar.xz")
"https://github.com/boostorg/boost/releases/download/boost-1.86.0/boost-1.86.0-cmake.tar.xz")
set(BOOST_HASH
"MD5=BADEA970931766604D4D5F8F4090B176")
"MD5=D02759931CEDC02ADED80402906C5EB6")
if(CMAKE_VERSION VERSION_LESS "3.24.0")
FetchContent_Declare(

View File

@ -47,13 +47,13 @@ namespace boost {
namespace filesystem {
class path;
}
namespace process {
namespace process::inline v1 {
class child;
class group;
template <typename Char>
class basic_environment;
typedef basic_environment<char> environment;
} // namespace process
} // namespace process::inline v1
} // namespace boost
#endif
namespace video {
@ -597,8 +597,8 @@ namespace platf {
bool
needs_encoder_reenumeration();
boost::process::child
run_command(bool elevated, bool interactive, const std::string &cmd, boost::filesystem::path &working_dir, const boost::process::environment &env, FILE *file, std::error_code &ec, boost::process::group *group);
boost::process::v1::child
run_command(bool elevated, bool interactive, const std::string &cmd, boost::filesystem::path &working_dir, const boost::process::v1::environment &env, FILE *file, std::error_code &ec, boost::process::v1::group *group);
enum class thread_priority_e : int {
low, ///< Low priority

View File

@ -15,7 +15,7 @@
// lib includes
#include <arpa/inet.h>
#include <boost/asio/ip/address.hpp>
#include <boost/process.hpp>
#include <boost/process/v1.hpp>
#include <dlfcn.h>
#include <fcntl.h>
#include <ifaddrs.h>
@ -269,7 +269,7 @@ namespace platf {
auto working_dir = boost::filesystem::path(std::getenv("HOME"));
std::string cmd = R"(xdg-open ")" + url + R"(")";
boost::process::environment _env = boost::this_process::environment();
boost::process::v1::environment _env = boost::this_process::environment();
std::error_code ec;
auto child = run_command(false, false, cmd, working_dir, _env, nullptr, ec, nullptr);
if (ec) {

View File

@ -23,7 +23,7 @@
#include "src/platform/common.h"
#include <boost/asio/ip/address.hpp>
#include <boost/process.hpp>
#include <boost/process/v1.hpp>
using namespace std::literals;
namespace fs = std::filesystem;
@ -197,7 +197,7 @@ namespace platf {
boost::filesystem::path working_dir;
std::string cmd = R"(open ")" + url + R"(")";
boost::process::environment _env = boost::this_process::environment();
boost::process::v1::environment _env = boost::this_process::environment();
std::error_code ec;
auto child = run_command(false, false, cmd, working_dir, _env, nullptr, ec, nullptr);
if (ec) {

View File

@ -7,9 +7,9 @@
#include <thread>
#include <boost/algorithm/string/join.hpp>
#include <boost/process.hpp>
#include <boost/process/v1.hpp>
// We have to include boost/process.hpp before display.h due to WinSock.h,
// We have to include boost/process/v1.hpp before display.h due to WinSock.h,
// but that prevents the definition of NTSTATUS so we must define it ourself.
typedef long NTSTATUS;

View File

@ -10,7 +10,7 @@
#include <boost/algorithm/string.hpp>
#include <boost/asio/ip/address.hpp>
#include <boost/process.hpp>
#include <boost/process/v1.hpp>
#include <boost/program_options/parsers.hpp>
// prevent clang format from "optimizing" the header include order
@ -1071,7 +1071,7 @@ namespace platf {
*/
void
open_url(const std::string &url) {
boost::process::environment _env = boost::this_process::environment();
boost::process::v1::environment _env = boost::this_process::environment();
auto working_dir = boost::filesystem::path();
std::error_code ec;

View File

@ -57,7 +57,7 @@ namespace proc {
}
void
terminate_process_group(boost::process::child &proc, boost::process::group &group, std::chrono::seconds exit_timeout) {
terminate_process_group(boost::process::v1::child &proc, boost::process::v1::group &group, std::chrono::seconds exit_timeout) {
if (group.valid() && platf::process_group_running((std::uintptr_t) group.native_handle())) {
if (exit_timeout.count() > 0) {
// Request processes in the group to exit gracefully
@ -98,7 +98,7 @@ namespace proc {
}
boost::filesystem::path
find_working_directory(const std::string &cmd, boost::process::environment &env) {
find_working_directory(const std::string &cmd, boost::process::v1::environment &env) {
// Parse the raw command string into parts to get the actual command portion
#ifdef _WIN32
auto parts = boost::program_options::split_winmain(cmd);
@ -120,7 +120,7 @@ namespace proc {
// If the cmd path is not an absolute path, resolve it using our PATH variable
boost::filesystem::path cmd_path(parts.at(0));
if (!cmd_path.is_absolute()) {
cmd_path = boost::process::search_path(parts.at(0));
cmd_path = boost::process::v1::search_path(parts.at(0));
if (cmd_path.empty()) {
BOOST_LOG(error) << "Unable to find executable ["sv << parts.at(0) << "]. Is it in your PATH?"sv;
return boost::filesystem::path();
@ -301,8 +301,8 @@ namespace proc {
std::error_code ec;
placebo = false;
terminate_process_group(_process, _process_group, _app.exit_timeout);
_process = boost::process::child();
_process_group = boost::process::group();
_process = boost::process::v1::child();
_process_group = boost::process::v1::group();
for (; _app_prep_it != _app_prep_begin; --_app_prep_it) {
auto &cmd = *(_app_prep_it - 1);
@ -403,7 +403,7 @@ namespace proc {
}
std::string
parse_env_val(boost::process::native_environment &env, const std::string_view &val_raw) {
parse_env_val(boost::process::v1::native_environment &env, const std::string_view &val_raw) {
auto pos = std::begin(val_raw);
auto dollar = std::find(pos, std::end(val_raw), '$');

View File

@ -11,7 +11,7 @@
#include <optional>
#include <unordered_map>
#include <boost/process.hpp>
#include <boost/process/v1.hpp>
#include "config.h"
#include "platform/common.h"
@ -68,7 +68,7 @@ namespace proc {
KITTY_DEFAULT_CONSTR_MOVE_THROW(proc_t)
proc_t(
boost::process::environment &&env,
boost::process::v1::environment &&env,
std::vector<ctx_t> &&apps):
_app_id(0),
_env(std::move(env)),
@ -99,7 +99,7 @@ namespace proc {
private:
int _app_id;
boost::process::environment _env;
boost::process::v1::environment _env;
std::vector<ctx_t> _apps;
ctx_t _app;
std::chrono::steady_clock::time_point _app_launch_time;
@ -107,8 +107,8 @@ namespace proc {
// If no command associated with _app_id, yet it's still running
bool placebo {};
boost::process::child _process;
boost::process::group _process_group;
boost::process::v1::child _process;
boost::process::v1::group _process_group;
file_t _pipe;
std::vector<cmd_t>::const_iterator _app_prep_it;
@ -143,7 +143,7 @@ namespace proc {
* @param exit_timeout The timeout to wait for the process group to gracefully exit.
*/
void
terminate_process_group(boost::process::child &proc, boost::process::group &group, std::chrono::seconds exit_timeout);
terminate_process_group(boost::process::v1::child &proc, boost::process::v1::group &group, std::chrono::seconds exit_timeout);
extern proc_t proc;
} // namespace proc

View File

@ -33,7 +33,7 @@
// lib includes
#include "tray/src/tray.h"
#include <boost/filesystem.hpp>
#include <boost/process/environment.hpp>
#include <boost/process/v1/environment.hpp>
// local includes
#include "confighttp.h"