gnu: recutils: Adjust to Bash 4.4.
authorLudovic Courtès <ludo@gnu.org>
Mon, 17 Oct 2016 19:36:25 +0000 (21:36 +0200)
committerLudovic Courtès <ludo@gnu.org>
Mon, 17 Oct 2016 20:06:44 +0000 (22:06 +0200)
* gnu/packages/databases.scm (recutils)[arguments]: Add
'set-bash4.4-header-location' phase.

gnu/packages/databases.scm

index b7bd1f0..5219766 100644 (file)
@@ -405,7 +405,24 @@ pictures, sounds, or video.")
                  #:configure-flags
                  (list (string-append "--with-bash-headers="
                                       (assoc-ref %build-inputs "bash:include")
-                                      "/include/bash"))))
+                                      "/include/bash"))
+
+                 #:phases (modify-phases %standard-phases
+                            (add-before 'build 'set-bash4.4-header-location
+                              (lambda _
+                                (substitute* "bash/Makefile.in"
+                                  ;; Adjust the header search path for Bash
+                                  ;; 4.4 in accordance with 'bash.pc'.
+                                  (("AM_CPPFLAGS = (.*)$" _ rest)
+                                   (string-append "AM_CPPFLAGS = "
+                                                  "-I$(BASH_HEADERS)/include "
+                                                  rest))
+
+                                  ;; Install to PREFIX/lib/bash to match Bash
+                                  ;; 4.4's search path.
+                                  (("^libdir = .*$")
+                                   "libdir = @libdir@/bash\n"))
+                                #t)))))
 
     (native-inputs `(("emacs" ,emacs-minimal)
                      ("bc" ,bc)