summaryrefslogtreecommitdiff
path: root/gnu/packages/code.scm
diff options
context:
space:
mode:
authorArtyom V. Poptsov <poptsov.artyom@gmail.com>2024-06-13 21:54:05 +0300
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-06-24 08:50:49 -0400
commit0fe46e53bbd7e190c3e757fb842cd3e45e73f4e8 (patch)
tree9f97529add3733cf9ae2bf7972d37c257a88f464 /gnu/packages/code.scm
parentff9942dcc1d719b9acea4953e226659491306e27 (diff)
gnu: astyle: Update to 3.5.
* gnu/packages/code.scm (astyle): Update to 3.5. [source]: Change source archive file name to match the upstream. [arguments]: Remove "modules". Add "patch-makefile" phase to set the C++ compiler to version c++17 as it is required for the build. Simplify "install-more" file. Change-Id: I8777710d723d22320c288c331645f8d61d5e640e Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Diffstat (limited to 'gnu/packages/code.scm')
-rw-r--r--gnu/packages/code.scm28
1 files changed, 10 insertions, 18 deletions
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index d6ac8178f33..44edf43db58 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -20,6 +20,7 @@
20;;; Copyright © 2023 Fries <fries1234@protonmail.com> 20;;; Copyright © 2023 Fries <fries1234@protonmail.com>
21;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> 21;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
22;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com> 22;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com>
23;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
23;;; 24;;;
24;;; This file is part of GNU Guix. 25;;; This file is part of GNU Guix.
25;;; 26;;;
@@ -823,14 +824,14 @@ Objective@tie{}C, D, Java, Pawn, and Vala). Features:
823(define-public astyle 824(define-public astyle
824 (package 825 (package
825 (name "astyle") 826 (name "astyle")
826 (version "3.4.8") 827 (version "3.5")
827 (source 828 (source
828 (origin 829 (origin
829 (method url-fetch) 830 (method url-fetch)
830 (uri (string-append "mirror://sourceforge/astyle/astyle/astyle%20" 831 (uri (string-append "mirror://sourceforge/astyle/astyle/astyle%20"
831 version "/astyle_" version "_linux.tar.gz")) 832 version "/astyle-" version ".tar.bz2"))
832 (sha256 833 (sha256
833 (base32 "1ms54wcs7hg1bsywqwf2lhdfizgbk7qxc9ghasxk8i99jvwlrk6b")))) 834 (base32 "0g4jyp47iz97ld9ac4wb5k59j4cs8dbw4dp8f32bwqx8pyvirz6y"))))
834 (build-system gnu-build-system) 835 (build-system gnu-build-system)
835 (arguments 836 (arguments
836 (list 837 (list
@@ -839,11 +840,13 @@ Objective@tie{}C, D, Java, Pawn, and Vala). Features:
839 #~(list (string-append "prefix=" #$output) 840 #~(list (string-append "prefix=" #$output)
840 "INSTALL=install" 841 "INSTALL=install"
841 "release" "shared") 842 "release" "shared")
842 #:modules '((guix build gnu-build-system) ;FIXME use %default-modules
843 (guix build utils)
844 (ice-9 regex))
845 #:phases 843 #:phases
846 #~(modify-phases %standard-phases 844 #~(modify-phases %standard-phases
845 (add-after 'unpack 'patch-makefile
846 (lambda _
847 (substitute* "build/gcc/Makefile"
848 (("CBASEFLAGS = -Wall -Wextra -fno-rtti -fno-exceptions -std=c\\+\\+11")
849 "CBASEFLAGS = -Wall -Wextra -fno-rtti -fno-exceptions -std=c++17"))))
847 (replace 'configure 850 (replace 'configure
848 (lambda _ 851 (lambda _
849 (chdir "build/gcc"))) 852 (chdir "build/gcc")))
@@ -852,12 +855,6 @@ Objective@tie{}C, D, Java, Pawn, and Vala). Features:
852 ;; Libraries and headers aren't installed by default. 855 ;; Libraries and headers aren't installed by default.
853 (let ((include (string-append #$output "/include")) 856 (let ((include (string-append #$output "/include"))
854 (lib (string-append #$output "/lib"))) 857 (lib (string-append #$output "/lib")))
855 (define (link.so file strip-pattern)
856 (symlink
857 (basename file)
858 (regexp-substitute #f
859 (string-match strip-pattern file)
860 'pre)))
861 (mkdir-p include) 858 (mkdir-p include)
862 (copy-file "../../src/astyle.h" 859 (copy-file "../../src/astyle.h"
863 (string-append include "/astyle.h")) 860 (string-append include "/astyle.h"))
@@ -865,12 +862,7 @@ Objective@tie{}C, D, Java, Pawn, and Vala). Features:
865 (for-each (lambda (l) 862 (for-each (lambda (l)
866 (copy-file 863 (copy-file
867 l (string-append lib "/" (basename l)))) 864 l (string-append lib "/" (basename l))))
868 (find-files "bin" "^lib.*\\.so")) 865 (find-files "bin" "^lib.*\\.so"))))))))
869 (for-each
870 (lambda (file)
871 (link.so file "(\\.[0-9]+){3}$") ;.so
872 (link.so file "(\\.[0-9]+){2}$")) ;.so.3
873 (find-files lib "lib.*\\.so\\..*"))))))))
874 (home-page "https://astyle.sourceforge.net/") 866 (home-page "https://astyle.sourceforge.net/")
875 (synopsis "Source code indenter, formatter, and beautifier") 867 (synopsis "Source code indenter, formatter, and beautifier")
876 (description 868 (description