mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-28 23:32:24 -05:00
gnu: astyle: Use G-expressions.
* gnu/packages/code.scm (astyle)[arguments]: Rewrite as G-expressions.
This commit is contained in:
parent
4658173ea4
commit
cf6bbf185d
1 changed files with 36 additions and 34 deletions
|
@ -845,42 +845,44 @@ (define-public astyle
|
||||||
(base32 "1ms54wcs7hg1bsywqwf2lhdfizgbk7qxc9ghasxk8i99jvwlrk6b"))))
|
(base32 "1ms54wcs7hg1bsywqwf2lhdfizgbk7qxc9ghasxk8i99jvwlrk6b"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ;no tests
|
(list
|
||||||
#:make-flags (list (string-append "prefix=" %output)
|
#:tests? #f ;no tests
|
||||||
"INSTALL=install"
|
#:make-flags
|
||||||
"all")
|
#~(list (string-append "prefix=" #$output)
|
||||||
#:modules ((guix build gnu-build-system) ;; FIXME use %default-modules
|
"INSTALL=install"
|
||||||
|
"all")
|
||||||
|
#:modules '((guix build gnu-build-system) ;FIXME use %default-modules
|
||||||
(guix build utils)
|
(guix build utils)
|
||||||
(ice-9 regex))
|
(ice-9 regex))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(replace 'configure
|
(replace 'configure
|
||||||
(lambda _ (chdir "build/gcc")))
|
(lambda _
|
||||||
(add-after 'install 'install-libs
|
(chdir "build/gcc")))
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(add-after 'install 'install-more
|
||||||
;; Libraries and includes are not installed by default
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((output (assoc-ref outputs "out"))
|
;; Libraries and headers aren't installed by default.
|
||||||
(incdir (string-append output "/include"))
|
(let ((include (string-append #$output "/include"))
|
||||||
(libdir (string-append output "/lib")))
|
(lib (string-append #$output "/lib")))
|
||||||
(define (make-so-link sofile strip-pattern)
|
(define (link.so file strip-pattern)
|
||||||
(symlink
|
(symlink
|
||||||
(basename sofile)
|
(basename file)
|
||||||
(regexp-substitute #f
|
(regexp-substitute #f
|
||||||
(string-match strip-pattern sofile)
|
(string-match strip-pattern file)
|
||||||
'pre)))
|
'pre)))
|
||||||
(mkdir-p incdir)
|
(mkdir-p include)
|
||||||
(copy-file "../../src/astyle.h"
|
(copy-file "../../src/astyle.h"
|
||||||
(string-append incdir "/astyle.h"))
|
(string-append include "/astyle.h"))
|
||||||
(mkdir-p libdir)
|
(mkdir-p lib)
|
||||||
(for-each (lambda (l)
|
(for-each (lambda (l)
|
||||||
(copy-file
|
(copy-file
|
||||||
l (string-append libdir "/" (basename l))))
|
l (string-append lib "/" (basename l))))
|
||||||
(find-files "bin" "^lib.*\\.so"))
|
(find-files "bin" "^lib.*\\.so"))
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (sofile)
|
(lambda (file)
|
||||||
(make-so-link sofile "(\\.[0-9]){3}$") ;; link .so
|
(link.so file "(\\.[0-9]+){3}$") ;.so
|
||||||
(make-so-link sofile "(\\.[0-9]){2}$")) ;; link .so.3
|
(link.so file "(\\.[0-9]+){2}$")) ;.so.3
|
||||||
(find-files libdir "lib.*\\.so\\..*"))))))))
|
(find-files lib "lib.*\\.so\\..*"))))))))
|
||||||
(home-page "https://astyle.sourceforge.net/")
|
(home-page "https://astyle.sourceforge.net/")
|
||||||
(synopsis "Source code indenter, formatter, and beautifier")
|
(synopsis "Source code indenter, formatter, and beautifier")
|
||||||
(description
|
(description
|
||||||
|
|
Loading…
Reference in a new issue