GNU bug report logs - #38098
[PATCH 0/2] Fix build for astyle

Previous Next

Package: guix-patches;

Reported by: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Date: Thu, 7 Nov 2019 10:17:01 UTC

Severity: normal

Tags: patch

Done: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 38098 <at> debbugs.gnu.org
Subject: [bug#38098] [PATCH 1/2] gnu: astyle: Create symlinks for .so files, too.
Date: Thu,  7 Nov 2019 11:18:09 +0100
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]<modules>: New element.
  <phases>{install-libs}: Add creating symlinks.
---
 gnu/packages/code.scm | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index 512ca5d365..a277434b36 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2014 Eric Bavier <bavier <at> member.fsf.org>
 ;;; Copyright © 2013 Andreas Enge <andreas <at> enge.fr>
 ;;; Copyright © 2014 Mark H Weaver <mhw <at> netris.org>
+;;; Copyright © 2019 Hartmut Goebel <h.goebel <at> goebel-consult.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -599,6 +600,9 @@ Objective <at> 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
@@ -608,12 +612,22 @@ Objective <at> 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")
-- 
2.21.0





This bug report was last modified 5 years and 184 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.