diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-12-04 20:12:41 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-12-04 20:12:41 +0100 |
commit | 33b59c1a3edbb81735e8d4e977b107f3ba1c2f9f (patch) | |
tree | 79ee86a29266d0a32ec0d0aa790ee5904b1098b8 /gnu/packages/code.scm | |
parent | 936aa05209402dd399869ffae188db5dd5f67d69 (diff) | |
parent | d733a469d74f74734825f1ce777956fb4cac5534 (diff) |
Merge branch 'staging'
Diffstat (limited to 'gnu/packages/code.scm')
-rw-r--r-- | gnu/packages/code.scm | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm index 20726cfebc..021181bd8f 100644 --- a/gnu/packages/code.scm +++ b/gnu/packages/code.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2019 Hartmut Goebel <h.goebel@goebel-consult.de> ;;; ;;; This file is part of GNU Guix. ;;; @@ -597,21 +598,38 @@ Objective@tie{}C, D, Java, Pawn, and Vala). Features: #:make-flags (list (string-append "prefix=" %output) "INSTALL=install" "all") + #:modules ((guix build gnu-build-system) ;; FIXME use %default-modules + (guix build utils) + (ice-9 regex)) #:phases (modify-phases %standard-phases (replace 'configure (lambda _ (chdir "build/gcc") #t)) (add-after 'install 'install-libs (lambda* (#:key outputs #:allow-other-keys) - ;; Libraries are not installed by default + ;; Libraries and includes are not installed by default (let* ((output (assoc-ref outputs "out")) + (incdir (string-append output "/include")) (libdir (string-append output "/lib"))) - (begin - (mkdir-p libdir) - (for-each (lambda (l) - (copy-file - l (string-append libdir "/" (basename l)))) - (find-files "bin" "lib*")))) + (define (make-so-link sofile strip-pattern) + (symlink + (basename sofile) + (regexp-substitute #f + (string-match strip-pattern sofile) + 'pre))) + (mkdir-p incdir) + (copy-file "../../src/astyle.h" + (string-append incdir "/astyle.h")) + (mkdir-p libdir) + (for-each (lambda (l) + (copy-file + l (string-append libdir "/" (basename l)))) + (find-files "bin" "lib*")) + (for-each + (lambda (sofile) + (make-so-link sofile "(\\.[0-9]){3}$") ;; link .so + (make-so-link sofile "(\\.[0-9]){2}$")) ;; link .so.3 + (find-files libdir "lib.*\\.so\\..*"))) #t))))) (home-page "http://astyle.sourceforge.net/") (synopsis "Source code indenter, formatter, and beautifier") |