guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: Add static-abseil-cpp.


From: guix-commits
Subject: 01/02: gnu: Add static-abseil-cpp.
Date: Mon, 30 Oct 2023 07:26:49 -0400 (EDT)

rekado pushed a commit to branch master
in repository guix.

commit 6797aac408793598db0050d85391b01dc3916b7f
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Mon Oct 30 11:33:32 2023 +0100

    gnu: Add static-abseil-cpp.
    
    * gnu/packages/cpp.scm (static-abseil-cpp): New variable.
    (make-static-abseil-cpp): New procedure.
    
    Change-Id: I0b0b17b31461baf1189d7c818a82c99baad253c1
---
 gnu/packages/cpp.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 9a02de6334..0ce60c49de 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1254,12 +1254,25 @@ Google's C++ code base.")
                                      (number->string version))
                     #$flags))))))))
 
+(define (make-static-abseil-cpp version)
+  (let ((base abseil-cpp))
+    (hidden-package
+     (package/inherit base
+       (arguments
+        (substitute-keyword-arguments (package-arguments base)
+          ((#:configure-flags flags)
+           #~(cons* "-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
+                    (delete "-DBUILD_SHARED_LIBS=ON" #$flags)))))))))
+
 (define-public abseil-cpp-cxxstd17
   (abseil-cpp-for-c++-standard 17))             ;XXX: the default with GCC 11?
 
 (define-public abseil-cpp-cxxstd11
   (abseil-cpp-for-c++-standard 11))
 
+(define-public static-abseil-cpp
+  (make-static-abseil-cpp abseil-cpp))
+
 (define-public pegtl
   (package
     (name "pegtl")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]