guix-commits
[Top][All Lists]
Advanced

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

04/06: gnu: iniparser: Use 'modify-phases'.


From: Efraim Flashner
Subject: 04/06: gnu: iniparser: Use 'modify-phases'.
Date: Sun, 24 Jul 2016 12:44:30 +0000 (UTC)

efraim pushed a commit to branch master
in repository guix.

commit 2af56bfa1ec73c412f874d46b771075bf332f337
Author: Efraim Flashner <address@hidden>
Date:   Sun Jul 24 11:23:01 2016 +0300

    gnu: iniparser: Use 'modify-phases'.
    
    * gnu/packages/samba.scm (iniparser)[arguments]: Use 'modify-phases'
    syntax.
---
 gnu/packages/samba.scm |   77 +++++++++++++++++++++++-------------------------
 1 file changed, 37 insertions(+), 40 deletions(-)

diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm
index 136ab24..d089167 100644
--- a/gnu/packages/samba.scm
+++ b/gnu/packages/samba.scm
@@ -50,46 +50,43 @@
                "1flj7srvh2hp9ls96qz922bklyhw7f27mmn23b16839zpdjddfz0"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:phases (alist-replace
-                 'configure
-                 (lambda* (#:key outputs #:allow-other-keys)
-                   (substitute* '("Makefile" "test/Makefile")
-                     (("/usr/lib")
-                      (string-append (assoc-ref outputs "out") "/lib"))
-                     (("\\?= gcc") "= gcc")))
-                 (alist-replace
-                  'build
-                  (lambda _
-                    (and (zero? (system* "make" "libiniparser.so"))
-                         (symlink "libiniparser.so.0" "libiniparser.so")))
-                  (alist-replace
-                   'install
-                   (lambda* (#:key outputs #:allow-other-keys)
-                     (let* ((out  (assoc-ref outputs "out"))
-                            (lib  (string-append out "/lib"))
-                            (inc  (string-append out "/include"))
-                            (doc  (string-append out "/share/doc"))
-                            (html (string-append doc "/html")))
-                       (define (copy dir)
-                         (lambda (file)
-                           (copy-file file
-                                      (string-append dir "/"
-                                                     (basename file)))))
-                       (mkdir-p lib)
-                       (for-each (copy lib)
-                                 (find-files "." "^lib.*\\.(so\\.|a)"))
-                       (with-directory-excursion lib
-                         (symlink "libiniparser.so.0" "libiniparser.so"))
-                       (mkdir-p inc)
-                       (for-each (copy inc)
-                                 (find-files "src" "\\.h$"))
-                       (mkdir-p html)
-                       (for-each (copy html)
-                                 (find-files "html" ".*"))
-                       (for-each (copy doc)
-                                 '("AUTHORS" "INSTALL" "LICENSE"
-                                   "README.md"))))
-                   %standard-phases)))))
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* '("Makefile" "test/Makefile")
+               (("/usr/lib")
+                (string-append (assoc-ref outputs "out") "/lib"))
+               (("\\?= gcc") "= gcc"))))
+         (replace 'build
+           (lambda _
+             (and (zero? (system* "make" "libiniparser.so"))
+                         (symlink "libiniparser.so.0" "libiniparser.so"))))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out  (assoc-ref outputs "out"))
+                    (lib  (string-append out "/lib"))
+                    (inc  (string-append out "/include"))
+                    (doc  (string-append out "/share/doc"))
+                    (html (string-append doc "/html")))
+               (define (copy dir)
+                 (lambda (file)
+                   (copy-file file
+                              (string-append dir "/"
+                                             (basename file)))))
+               (mkdir-p lib)
+               (for-each (copy lib)
+                         (find-files "." "^lib.*\\.(so\\.|a)"))
+               (with-directory-excursion lib
+                 (symlink "libiniparser.so.0" "libiniparser.so"))
+               (mkdir-p inc)
+               (for-each (copy inc)
+                         (find-files "src" "\\.h$"))
+               (mkdir-p html)
+               (for-each (copy html)
+                         (find-files "html" ".*"))
+               (for-each (copy doc)
+                         '("AUTHORS" "INSTALL" "LICENSE" "README.md"))))))))
     (home-page "http://ndevilla.free.fr/iniparser";)
     (synopsis "Standalone ini file parsing library")
     (description



reply via email to

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