diff --git a/gvsbuild/patches/abseil-cpp/0001-Revert-Raise-the-MSVC-floor-to-MSVC-2019-16.0-in-acc.patch b/gvsbuild/patches/abseil-cpp/0001-Revert-Raise-the-MSVC-floor-to-MSVC-2019-16.0-in-acc.patch new file mode 100644 index 000000000..cd864bbc2 --- /dev/null +++ b/gvsbuild/patches/abseil-cpp/0001-Revert-Raise-the-MSVC-floor-to-MSVC-2019-16.0-in-acc.patch @@ -0,0 +1,32 @@ +From 990724b6130411d9e41afe8a90627413c43cee2f Mon Sep 17 00:00:00 2001 +From: Alessandro Bono +Date: Wed, 13 Dec 2023 11:26:02 +0100 +Subject: [PATCH] Revert "Raise the MSVC floor to MSVC 2019 (16.0) in + accordance with" + +This reverts commit dc51d35fe719b3a3c49f895c149b0920a3745cc4. +--- + absl/base/policy_checks.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/absl/base/policy_checks.h b/absl/base/policy_checks.h +index 372e848d..b8cd4c94 100644 +--- a/absl/base/policy_checks.h ++++ b/absl/base/policy_checks.h +@@ -44,10 +44,10 @@ + // Toolchain Check + // ----------------------------------------------------------------------------- + +-// We support Visual Studio 2019 (MSVC++ 16.0) and later. ++// We support Visual Studio 2017 (MSVC++ 15.0) and later. + // This minimum will go up. +-#if defined(_MSC_VER) && _MSC_VER < 1920 && !defined(__clang__) +-#error "This package requires Visual Studio 2019 (MSVC++ 16.0) or higher." ++#if defined(_MSC_VER) && _MSC_VER < 1910 && !defined(__clang__) ++#error "This package requires Visual Studio 2017 (MSVC++ 15.0) or higher." + #endif + + // We support GCC 7 and later. +-- +2.34.1 + diff --git a/gvsbuild/projects/__init__.py b/gvsbuild/projects/__init__.py index 499671b6c..743e24b76 100644 --- a/gvsbuild/projects/__init__.py +++ b/gvsbuild/projects/__init__.py @@ -1,5 +1,6 @@ # flake8: noqa +from gvsbuild.projects.abseil import AbseilCpp from gvsbuild.projects.adwaita_icon_theme import AdwaitaIconTheme from gvsbuild.projects.atk import Atk from gvsbuild.projects.boringssl import BoringSSL diff --git a/gvsbuild/projects/abseil.py b/gvsbuild/projects/abseil.py new file mode 100644 index 000000000..27464dd6f --- /dev/null +++ b/gvsbuild/projects/abseil.py @@ -0,0 +1,45 @@ +# Copyright (C) 2016 The Gvsbuild Authors +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . + +from gvsbuild.utils.base_builders import CmakeProject +from gvsbuild.utils.base_expanders import Tarball +from gvsbuild.utils.base_project import Project, project_add + + +@project_add +class AbseilCpp(Tarball, CmakeProject): + def __init__(self): + Project.__init__( + self, + "abseil-cpp", + version="20230802.1", + archive_url="https://github.com/abseil/abseil-cpp/archive/refs/tags/{version}.tar.gz", + hash="987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed", + dependencies=[ + "cmake", + "zlib", + "ninja", + ], + patches=[ + "0001-Revert-Raise-the-MSVC-floor-to-MSVC-2019-16.0-in-acc.patch", + ], + ) + + def build(self): + CmakeProject.build( + self, + cmake_params=r'-DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_STANDARD=14', + use_ninja=True, + )