Skip to content

Commit

Permalink
[abseil] Update to the latest and fix link failure error using StrCat (
Browse files Browse the repository at this point in the history
…#9367)

* [abseil] Update to the latest and fix link failure for StrCat with > 4 arguments

* Remove message from vcpkg_fail_port_install

* Update lnk2019-error patch
  • Loading branch information
NancyLi1013 authored and dan-shaw committed Dec 23, 2019
1 parent 2ee03ba commit 6723668
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 43 deletions.
2 changes: 1 addition & 1 deletion ports/abseil/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: abseil
Version: 2019-05-08-1
Version: 2019-12-19
Homepage: https://github.com/abseil/abseil-cpp
Description: an open-source collection designed to augment the C++ standard library.
Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.
Expand Down
26 changes: 0 additions & 26 deletions ports/abseil/fix-config.patch

This file was deleted.

39 changes: 39 additions & 0 deletions ports/abseil/fix-lnk2019-error.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
diff --git a/absl/base/options.h b/absl/base/options.h
index 3961e63..d4f21ec 100644
--- a/absl/base/options.h
+++ b/absl/base/options.h
@@ -94,7 +94,7 @@
// User code should not inspect this macro. To check in the preprocessor if
// absl::any is a typedef of std::any, use the feature macro ABSL_USES_STD_ANY.

-#define ABSL_OPTION_USE_STD_ANY 2
+#define ABSL_OPTION_USE_STD_ANY 0


// ABSL_OPTION_USE_STD_OPTIONAL
@@ -129,7 +129,7 @@
// absl::optional is a typedef of std::optional, use the feature macro
// ABSL_USES_STD_OPTIONAL.

-#define ABSL_OPTION_USE_STD_OPTIONAL 2
+#define ABSL_OPTION_USE_STD_OPTIONAL 0


// ABSL_OPTION_USE_STD_STRING_VIEW
@@ -156,7 +156,7 @@
// absl::string_view is a typedef of std::string_view, use the feature macro
// ABSL_USES_STD_STRING_VIEW.

-#define ABSL_OPTION_USE_STD_STRING_VIEW 2
+#define ABSL_OPTION_USE_STD_STRING_VIEW 0


// ABSL_OPTION_USE_STD_VARIANT
@@ -183,6 +183,6 @@
// absl::variant is a typedef of std::variant, use the feature macro
// ABSL_USES_STD_VARIANT.

-#define ABSL_OPTION_USE_STD_VARIANT 2
+#define ABSL_OPTION_USE_STD_VARIANT 0

#endif // ABSL_BASE_OPTIONS_H_
13 changes: 6 additions & 7 deletions ports/abseil/fix-usage-lnk-error.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
diff --git a/absl/strings/ascii.cc b/absl/strings/ascii.cc
index c9481e8..5c155e1 100644
index abea3e4..16d0bcc 100644
--- a/absl/strings/ascii.cc
+++ b/absl/strings/ascii.cc
@@ -49,109 +49,6 @@ namespace ascii_internal {
// print ' //', Hex2(i & 0x78)
@@ -51,108 +51,6 @@ namespace ascii_internal {
// elif i % 16 == 15:
// print
-
-// clang-format off
-// Array of bitfields holding character information. Each bit value corresponds
-// to a particular character feature. For readability, and because the value
Expand Down Expand Up @@ -113,11 +112,11 @@ index c9481e8..5c155e1 100644

void AsciiStrToLower(std::string* s) {
diff --git a/absl/strings/ascii.h b/absl/strings/ascii.h
index 48a9da2..9d70382 100644
index 792aabe..989e464 100644
--- a/absl/strings/ascii.h
+++ b/absl/strings/ascii.h
@@ -61,14 +61,105 @@
namespace absl {
@@ -62,14 +62,105 @@ namespace absl {
ABSL_NAMESPACE_BEGIN
namespace ascii_internal {

-// Declaration for an array of bitfields holding character information.
Expand Down
14 changes: 5 additions & 9 deletions ports/abseil/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
include(vcpkg_common_functions)

if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "Abseil currently only supports being built for desktop")
endif()
vcpkg_fail_port_install(ON_TARGET "UWP")

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO abseil/abseil-cpp
REF aa468ad75539619b47979911297efbb629c52e44
SHA512 4254d8599103d8f06b03f60a0386eba07f314184217d0bca404d41fc0bd0a8df287fe6d07158d10cde096af3097aff2ecc1a5e8f7c3046ecf956b5fde709ad1d
REF 29235139149790f5afc430c11cec8f1eb1677607 #commit 2019-12-19
SHA512 be34c782eb6cdb3355ab56f1592e692435a63bf19a0364980d498c75db267e986e60a3e425bd3b9c57b7f8afdb7c642eb68386165ec147a6d5b448570bbe756a
HEAD_REF master
PATCHES
fix-usage-lnk-error.patch
fix-config.patch
fix-lnk2019-error.patch
)

vcpkg_configure_cmake(
Expand All @@ -27,7 +23,7 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/absl TARGET_PATH share/absl)

vcpkg_copy_pdbs()

file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/abseil RENAME copyright)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share
${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/include/absl/copts
Expand Down

0 comments on commit 6723668

Please sign in to comment.