From 62b8ae1a910d4b89287ead11bd2c18325e660bdf Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Wed, 6 Nov 2019 22:45:23 +0100 Subject: gnu: astyle: Create symlinks for .so files, too. The Makefile only creates files with a versioned extension (.so.3.1.0), which are not picked up be cmake's `find_libarary()`. (Instead cmake picks up the static .a library.) Symlinks for .so.3 are required to avoid phase `verify-runpath` fails. * gnu/packages/code.scm(astyle)[argumements]: New element. {install-libs}: Add creating symlinks. --- gnu/packages/code.scm | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'gnu/packages/code.scm') diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm index 20726cfebc..7656ee8739 100644 --- a/gnu/packages/code.scm +++ b/gnu/packages/code.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2013 Andreas Enge ;;; Copyright © 2014 Mark H Weaver +;;; Copyright © 2019 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -597,6 +598,9 @@ 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 @@ -606,12 +610,22 @@ Objective@tie{}C, D, Java, Pawn, and Vala). Features: ;; Libraries are not installed by default (let* ((output (assoc-ref outputs "out")) (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 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") -- cgit v1.2.3 From 0c6ab52243353e3417e5a9733bb089e4771cc86e Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Wed, 6 Nov 2019 22:50:31 +0100 Subject: gnu: astyle: Install header file, too. * gnu/packages/code.scm(astyle)[arguments]{install-libs}: Also install header file. --- gnu/packages/code.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gnu/packages/code.scm') diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm index 7656ee8739..021181bd8f 100644 --- a/gnu/packages/code.scm +++ b/gnu/packages/code.scm @@ -607,8 +607,9 @@ Objective@tie{}C, D, Java, Pawn, and Vala). Features: (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"))) (define (make-so-link sofile strip-pattern) (symlink @@ -616,6 +617,9 @@ Objective@tie{}C, D, Java, Pawn, and Vala). Features: (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 -- cgit v1.2.3