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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38098 in the body.
You can then email your comments to 38098 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#38098; Package guix-patches. (Thu, 07 Nov 2019 10:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hartmut Goebel <h.goebel <at> crazy-compilers.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 07 Nov 2019 10:17:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/2] Fix build for astyle
Date: Thu,  7 Nov 2019 11:16:04 +0100
- header files have been not been installed
- The Makefile only creates files with a versioned extension (".so.3.1.0").
  To make cmake's `find_libarary()` and phase `verify-runpath` happy,
  add symlinks for ".so" and ".so.3".

Thus is a revised patchset for http://issues.guix.gnu.org/issue/38090.

Hartmut Goebel (2):
  gnu: astyle: Create symlinks for .so files, too.
  gnu: astyle: Install header file, too.

 gnu/packages/code.scm | 32 +++++++++++++++++++++++++-------
 1 file changed, 25 insertions(+), 7 deletions(-)

-- 
2.21.0





Information forwarded to guix-patches <at> gnu.org:
bug#38098; Package guix-patches. (Thu, 07 Nov 2019 10:19:01 GMT) Full text and rfc822 format available.

Message #8 received at 38098 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 38098 <at> debbugs.gnu.org
Subject: [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





Information forwarded to guix-patches <at> gnu.org:
bug#38098; Package guix-patches. (Thu, 07 Nov 2019 10:19:02 GMT) Full text and rfc822 format available.

Message #11 received at 38098 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 38098 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: astyle: Install header file, too.
Date: Thu,  7 Nov 2019 11:18:10 +0100
* gnu/packages/code.scm(astyle)[arguments]<phases>{install-libs}: Also
  install header file.
---
 gnu/packages/code.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index a277434b36..ba350b98e5 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -609,8 +609,9 @@ Objective <at> 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
@@ -618,6 +619,9 @@ Objective <at> 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
-- 
2.21.0





Reply sent to Hartmut Goebel <h.goebel <at> crazy-compilers.com>:
You have taken responsibility. (Thu, 21 Nov 2019 18:01:01 GMT) Full text and rfc822 format available.

Notification sent to Hartmut Goebel <h.goebel <at> crazy-compilers.com>:
bug acknowledged by developer. (Thu, 21 Nov 2019 18:01:02 GMT) Full text and rfc822 format available.

Message #16 received at 38098-close <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 38098-close <at> debbugs.gnu.org
Subject: Re: bug#38098: Acknowledgement ([PATCH 0/2] Fix build for astyle)
Date: Thu, 21 Nov 2019 19:00:31 +0100
Pushed as 0c6ab52243353e3417e5a9733bb089e4771cc86e




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 20 Dec 2019 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 122 days ago.

Previous Next


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