From 33aa372eecaf274e5542228623194d27744d3cd3 Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Wed, 4 Mar 2020 15:03:29 +0100 Subject: gnu: Add abseil-cpp. * gnu/packages/cpp.scm (abseil-cpp): New variable. Signed-off-by: Pierre Neidhardt --- gnu/packages/cpp.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 8b32c3f0a9..dba9ec75f6 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2019 Pierre Neidhardt ;;; Copyright © 2019 Jan Wielkiewicz ;;; Copyright © 2020 Nicolò Balzarotti +;;; Copyright © 2020 Roel Janssen ;;; ;;; This file is part of GNU Guix. ;;; @@ -439,3 +440,47 @@ create fluid interpolations when animating position, scale, rotation, frames or other values of screen objects, by setting their values as the tween starting point and then, after each tween step, plugging back the result.") (license license:expat))) + +(define-public abseil-cpp + (package + (name "abseil-cpp") + (version "20200225") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/abseil/abseil-cpp.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0wb04pszzrl39ny1pz9jvvq8lbbm355dd60jspcyqfwxnk6njgd1")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON" + "-DABSL_RUN_TESTS=ON" + ;; Needed, else we get errors like: + ;; + ;; ld: CMakeFiles/absl_periodic_sampler_test.dir/internal/periodic_sampler_test.cc.o: + ;; undefined reference to symbol '_ZN7testing4Mock16UnregisterLockedEPNS_8internal25UntypedFunctionMockerBaseE' + ;; ld: /gnu/store/bxapb1f1l8frjpbjckk3zdxhmcig3xzk-googletest-1.10.0/lib/libgmock.so: + ;; error adding symbols: DSO missing from command line + ;; collect2: error: ld returned 1 exit status + "-DCMAKE_EXE_LINKER_FLAGS=-lgtest -lpthread -lgmock") + #:phases + (modify-phases %standard-phases + (add-before 'configure 'remove-gtest-check + ;; The CMakeLists fails to find our googletest for some reason, but + ;; it works nonetheless. + (lambda _ + (substitute* "CMakeLists.txt" + (("check_target\\(gtest\\)") "") + (("check_target\\(gtest_main\\)") "") + (("check_target\\(gmock\\)") ""))))))) + (native-inputs + `(("googletest" ,googletest))) + (home-page "https://abseil.io") + (synopsis "Augmented C++ standard library") + (description "Abseil is a collection of C++ library code designed to +augment the C++ standard library. The Abseil library code is collected from +Google's C++ code base.") + (license license:asl2.0))) -- cgit 1.4.1