guix-commits
[Top][All Lists]
Advanced

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

04/07: gnu: re2: Use G-expressions.


From: guix-commits
Subject: 04/07: gnu: re2: Use G-expressions.
Date: Fri, 11 Feb 2022 18:00:40 -0500 (EST)

mbakke pushed a commit to branch master
in repository guix.

commit c5aaf1d071da799f6b3b4e87521a2a33d7ae41c2
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Fri Feb 11 00:55:55 2022 +0100

    gnu: re2: Use G-expressions.
    
    * gnu/packages/regex.scm (re2)[arguments]: Rewrite with gexps.  Simplify
    cross-compilation fix by using CXX-FOR-TARGET.
---
 gnu/packages/regex.scm | 37 +++++++++++++------------------------
 1 file changed, 13 insertions(+), 24 deletions(-)

diff --git a/gnu/packages/regex.scm b/gnu/packages/regex.scm
index 662bf435db..616c56cc6e 100644
--- a/gnu/packages/regex.scm
+++ b/gnu/packages/regex.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 John Darrington
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2016, 2020, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
 ;;;
@@ -25,6 +25,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix gexp)
   #:use-module (guix build-system gnu)
   #:use-module (guix utils))
 
@@ -42,29 +43,17 @@
                  "1gzdqy5a0ln9rwd8kmwbgis6qin63hapicwb35xkbnj3y84jj6yx"))))
      (build-system gnu-build-system)
      (arguments
-      `(#:modules ((guix build gnu-build-system)
-                   (guix build utils)
-                   (srfi srfi-1))
-        #:test-target "test"
-        ;; There is no configure step, but the Makefile respects a prefix.
-        ;; As ./configure does not know anything about the target CXX
-        ;; we need to specify TARGET-g++ explicitly.
-        #:make-flags (list (string-append "prefix=" %output)
-                           (string-append
-                             "CXX=" ,(string-append
-                                       (if (%current-target-system)
-                                           (string-append
-                                             (%current-target-system) "-")
-                                           "")
-                                       "g++")))
-        #:phases
-        (modify-phases %standard-phases
-          (delete 'configure)
-          (add-after 'install 'delete-static-library
-            (lambda* (#:key outputs #:allow-other-keys)
-              ;; No make target for shared-only; delete the static version.
-              (delete-file (string-append (assoc-ref outputs "out")
-                                          "/lib/libre2.a")))))))
+      (list #:test-target "test"
+            ;; There is no configure step, but the Makefile respects a prefix.
+            #:make-flags #~(list (string-append "prefix=" #$output)
+                                 (string-append "CXX=" #$(cxx-for-target)))
+            #:phases
+            #~(modify-phases %standard-phases
+                (delete 'configure)
+                (add-after 'install 'delete-static-library
+                  (lambda _
+                    ;; No make target for shared-only; delete the static 
version.
+                    (delete-file (string-append #$output "/lib/libre2.a")))))))
      (synopsis "Fast, safe, thread-friendly regular expression engine")
      (description "RE2 is a fast, safe, thread-friendly alternative to
 backtracking regular expression engines like those used in PCRE, Perl and



reply via email to

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