[PATCH 0/2] Fix build for astyle

  • Done
  • quality assurance status badge
Details
One participant
  • Hartmut Goebel
Owner
unassigned
Submitted by
Hartmut Goebel
Severity
normal
H
H
Hartmut Goebel wrote on 6 Nov 2019 17:39
(address . guix-patches@gnu.org)
20191106163942.9546-1-h.goebel@crazy-compilers.com
- header files have been missing
- 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.)

I stepped over these when updating kdevelop.

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

gnu/packages/code.scm | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)

--
2.21.0
H
H
Hartmut Goebel wrote on 6 Nov 2019 17:40
[PATCH 1/2] gnu: astyle: Install header file, too.
(address . 38090@debbugs.gnu.org)
20191106164038.10010-1-h.goebel@crazy-compilers.com
* gnu/packages/code.scm(astyle)[arguments]<phases>{install-libs}: Also install
header file.
---
gnu/packages/code.scm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

Toggle diff (30 lines)
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index 512ca5d365..d1c3540bd4 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.
;;;
@@ -605,10 +606,14 @@ 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")))
(begin
+ (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
H
H
Hartmut Goebel wrote on 6 Nov 2019 17:40
[PATCH 2/2] gnu: astyle: Create symlinks for .so files, too.
(address . 38090@debbugs.gnu.org)
20191106164038.10010-2-h.goebel@crazy-compilers.com
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.)

* gnu/packages/code.scm(astyle)[argumements]<modules>: New element.
<phases>{install-libs}: Add creating symlinks.
---
gnu/packages/code.scm | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

Toggle diff (32 lines)
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index d1c3540bd4..9aa5bb3bec 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -600,6 +600,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
@@ -618,7 +621,14 @@ Objective@tie{}C, D, Java, Pawn, and Vala). Features:
(for-each (lambda (l)
(copy-file
l (string-append libdir "/" (basename l))))
- (find-files "bin" "lib*"))))
+ (find-files "bin" "lib*"))
+ (for-each
+ (lambda (l)
+ (symlink (basename l)
+ (regexp-substitute #f
+ (string-match "(\\.[0-9]){3}$" l)
+ 'pre)))
+ (find-files libdir "lib.*\\.so\\..*"))))
#t)))))
(home-page "http://astyle.sourceforge.net/")
(synopsis "Source code indenter, formatter, and beautifier")
--
2.21.0
H
H
Hartmut Goebel wrote on 6 Nov 2019 22:24
Re: bug#38090: Acknowledgement ([PATCH 0/2] Fix build for astyle)
(address . 38090-close@debbugs.gnu.org)
73faa03e-4597-67f7-329b-b0010732979b@crazy-compilers.com
This showed to be not sufficient. Will send a new patch set soon.

--
Regards
Hartmut Goebel

| Hartmut Goebel | h.goebel@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
?