Subject: bug#67632: [PATCH 1/2] gnu: Add static-abseil-cpp-20220623.1.

From: Greg Hogan <[email-masked]>
Date: Tue, 5 Dec 2023 19:48:02 +0000

* gnu/packages/cpp.scm (static-abseil-cpp-20220623.1): New variable.
(make-static-abseil-cpp): Parameterize base.

Change-Id: I9667914de031f431524bf195818e8d2f316e8553
---
 gnu/packages/cpp.scm | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index f7549cb22a..c451033287 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1320,15 +1320,14 @@ (define (abseil-cpp-for-c++-standard base version)
                                    (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 (make-static-abseil-cpp base)
+  (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 abseil-cpp 17))  ;XXX: the default with GCC 11?
@@ -1339,6 +1338,9 @@ (define-public abseil-cpp-cxxstd11
 (define-public static-abseil-cpp
   (make-static-abseil-cpp abseil-cpp))
 
+(define-public static-abseil-cpp-20220623.1
+  (make-static-abseil-cpp abseil-cpp-20220623.1))
+
 (define-public pegtl
   (package
     (name "pegtl")

-- 
2.40.1