abseil-cpp: update to 20230802.0
This commit is contained in:
committed by
مهدي شينون (Mehdi Chinoune)
parent
492c138605
commit
bb104f0bdb
37
mingw-w64-abseil-cpp/0003-fix-linking-abseil_dll.patch
Normal file
37
mingw-w64-abseil-cpp/0003-fix-linking-abseil_dll.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
--- a/CMake/AbseilDll.cmake
|
||||
+++ b/CMake/AbseilDll.cmake
|
||||
@@ -732,7 +732,11 @@
|
||||
else()
|
||||
set(_dll "abseil_dll")
|
||||
set(_dll_files ${ABSL_INTERNAL_DLL_FILES})
|
||||
- set(_dll_libs "")
|
||||
+ if(MINGW)
|
||||
+ set(_dll_libs Threads::Threads bcrypt dbghelp)
|
||||
+ else()
|
||||
+ set(_dll_libs "")
|
||||
+ endif()
|
||||
set(_dll_compile_definitions "")
|
||||
set(_dll_includes "")
|
||||
set(_dll_consume "ABSL_CONSUME_DLL")
|
||||
--- a/absl/synchronization/internal/pthread_waiter.h
|
||||
+++ b/absl/synchronization/internal/pthread_waiter.h
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifndef ABSL_SYNCHRONIZATION_INTERNAL_PTHREAD_WAITER_H_
|
||||
#define ABSL_SYNCHRONIZATION_INTERNAL_PTHREAD_WAITER_H_
|
||||
|
||||
-#ifndef _WIN32
|
||||
+#ifndef _MSC_VER
|
||||
#include <pthread.h>
|
||||
|
||||
#include "absl/base/config.h"
|
||||
--- a/absl/synchronization/internal/win32_waiter.h
|
||||
+++ b/absl/synchronization/internal/win32_waiter.h
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <sdkddkver.h>
|
||||
#endif
|
||||
|
||||
-#if defined(_WIN32) && _WIN32_WINNT >= _WIN32_WINNT_VISTA
|
||||
+#if defined(_MSC_VER) && _WIN32_WINNT >= _WIN32_WINNT_VISTA
|
||||
|
||||
#include "absl/base/config.h"
|
||||
#include "absl/synchronization/internal/kernel_timeout.h"
|
||||
@@ -3,7 +3,7 @@
|
||||
_realname=abseil-cpp
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=20230125.3
|
||||
pkgver=20230802.0
|
||||
pkgrel=1
|
||||
pkgdesc="Abseil Common Libraries (C++) from Google (mingw-w64)"
|
||||
arch=('any')
|
||||
@@ -17,10 +17,12 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
||||
"${MINGW_PACKAGE_PREFIX}-ninja")
|
||||
source=("https://github.com/abseil/abseil-cpp/archive/$pkgver/$_realname-$pkgver.tar.gz"
|
||||
"0001-abseil-Fix-compiler-warnings.patch"
|
||||
"0002-abseil-Remove-librt-library.patch")
|
||||
sha256sums=('5366d7e7fa7ba0d915014d387b66d0d002c03236448e1ba9ef98122c13b35c36'
|
||||
"0002-abseil-Remove-librt-library.patch"
|
||||
"0003-fix-linking-abseil_dll.patch")
|
||||
sha256sums=('59d2976af9d6ecf001a81a35749a6e551a335b949d34918cfade07737b9d93c5'
|
||||
'30fb7526d1c89f722dd0ce0c467e034370140fbf07a1ad4f91df301c7f442551'
|
||||
'8946282db6a225b385729deb345b57e3ee75f4e859dbbc49ab7bc5604d71192f')
|
||||
'8946282db6a225b385729deb345b57e3ee75f4e859dbbc49ab7bc5604d71192f'
|
||||
'6f175cb4107db551efdce57267ac66a4d7f3a2ee7ecf4c084978e17ffc695fd0')
|
||||
|
||||
apply_patch_with_msg() {
|
||||
for _patch in "$@"
|
||||
@@ -35,26 +37,28 @@ prepare() {
|
||||
|
||||
apply_patch_with_msg \
|
||||
0001-abseil-Fix-compiler-warnings.patch \
|
||||
0002-abseil-Remove-librt-library.patch
|
||||
0002-abseil-Remove-librt-library.patch \
|
||||
0003-fix-linking-abseil_dll.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
|
||||
|
||||
declare -a extra_config
|
||||
declare -a _extra_config
|
||||
if check_option "debug" "n"; then
|
||||
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
|
||||
_extra_config+=("-DCMAKE_BUILD_TYPE=Release")
|
||||
else
|
||||
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
|
||||
_extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
|
||||
fi
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
|
||||
${MINGW_PREFIX}/bin/cmake \
|
||||
-GNinja \
|
||||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
|
||||
"${extra_config[@]}" \
|
||||
"${_extra_config[@]}" \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DCMAKE_CXX_STANDARD=17 \
|
||||
-DCMAKE_DLL_NAME_WITH_SOVERSION=ON \
|
||||
-DABSL_PROPAGATE_CXX_STD=ON \
|
||||
../${_realname}-${pkgver}
|
||||
|
||||
${MINGW_PREFIX}/bin/cmake --build .
|
||||
|
||||
Reference in New Issue
Block a user