Skip to content

Commit

Permalink
Add AbseilCpp project
Browse files Browse the repository at this point in the history
Include a revert of a commit[1] that bumps the minimum required Virtual
Studio version to 2019. Since we still support vesion 2017.

[1] abseil/abseil-cpp@dc51d35

Closes: wingtk#1174
  • Loading branch information
AlessandroBono committed Dec 13, 2023
1 parent ed01590 commit 86cb8fc
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From 990724b6130411d9e41afe8a90627413c43cee2f Mon Sep 17 00:00:00 2001
From: Alessandro Bono <[email protected]>
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

1 change: 1 addition & 0 deletions gvsbuild/projects/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
45 changes: 45 additions & 0 deletions gvsbuild/projects/abseil.py
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.

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,
)

0 comments on commit 86cb8fc

Please sign in to comment.