diff options
author | Greg Hogan <code@greghogan.com> | 2023-11-27 19:19:03 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-12-04 22:26:36 +0100 |
commit | af2735e874232d0ba46e2e943f0ba4697c42f70f (patch) | |
tree | fac2674574db3ea222d126ca9d25ae7d017190c3 /gnu/packages | |
parent | 49c009aabb42969ce6da3b6a31dd1d644c0a3ade (diff) | |
download | guix-af2735e874232d0ba46e2e943f0ba4697c42f70f.tar guix-af2735e874232d0ba46e2e943f0ba4697c42f70f.tar.gz |
gnu: abseil-cpp: Update to 20230802.1.
* gnu/packages/cpp.scm (abseil-cpp): Update to 20230802.1.
[arguments]<#:phases>: Add phase to set timezone environment variable.
* gnu/packages/cpp.scm (abseil-cpp-20220623.1): Keep old version.
* gnu/packages/cpp.scm (abseil-cpp-for-c++-standard): Accept package to
inherit from.
* gnu/packages/cpp.scm (abseil-cpp-cxxstd11, abseil-cpp-cxxstd17):
Inherit from latest supported version.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Change-Id: I7c29e1cd980b04496000eeb038529cdc6f636cb7
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/cpp.scm | 50 |
1 files changed, 37 insertions, 13 deletions
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 2b32a2becf..0d5be7d171 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -1263,7 +1263,7 @@ Google's C++ code base.") ((#:configure-flags flags) #~(cons* "-DCMAKE_CXX_STANDARD=11" #$flags))))))) -(define-public abseil-cpp +(define-public abseil-cpp-20220623.1 (let ((base abseil-cpp-20200923.3)) (package (inherit base) @@ -1284,16 +1284,40 @@ Google's C++ code base.") `(cons* "-DABSL_BUILD_TESTING=ON" (delete "-DABSL_RUN_TESTS=ON" ,flags)))))))) -(define (abseil-cpp-for-c++-standard version) - (let ((base abseil-cpp)) - (hidden-package - (package/inherit base - (arguments - (substitute-keyword-arguments (package-arguments base) - ((#:configure-flags flags) - #~(cons* #$(string-append "-DCMAKE_CXX_STANDARD=" - (number->string version)) - #$flags)))))))) +(define-public abseil-cpp + (let ((base abseil-cpp-20220623.1)) + (package + (inherit base) + (name "abseil-cpp") + (version "20230802.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/abseil/abseil-cpp") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1ydkkbanrpkp5i814arzsk973kyzhhjhagnp392rq6rrv16apldq")))) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + #~(modify-phases #$phases + (add-before 'check 'set-env-vars + (lambda* (#:key inputs #:allow-other-keys) + ;; absl_time_test requires this environment variable. + (setenv "TZDIR" (string-append #$(package-source base) + "/absl/time/internal/cctz/testdata/zoneinfo"))))))))))) + +(define (abseil-cpp-for-c++-standard base version) + (hidden-package + (package/inherit base + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:configure-flags flags) + #~(cons* #$(string-append "-DCMAKE_CXX_STANDARD=" + (number->string version)) + #$flags))))))) (define (make-static-abseil-cpp version) (let ((base abseil-cpp)) @@ -1306,10 +1330,10 @@ Google's C++ code base.") (delete "-DBUILD_SHARED_LIBS=ON" #$flags))))))))) (define-public abseil-cpp-cxxstd17 - (abseil-cpp-for-c++-standard 17)) ;XXX: the default with GCC 11? + (abseil-cpp-for-c++-standard abseil-cpp 17)) ;XXX: the default with GCC 11? (define-public abseil-cpp-cxxstd11 - (abseil-cpp-for-c++-standard 11)) + (abseil-cpp-for-c++-standard abseil-cpp-20220623.1 11)) ;last version on C++11 (define-public static-abseil-cpp (make-static-abseil-cpp abseil-cpp)) |