GNU bug report logs - #71539
[PATCH] gnu: astyle: Update to 3.5.

Previous Next

Package: guix-patches;

Reported by: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>

Date: Thu, 13 Jun 2024 18:55:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.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 71539 in the body.
You can then email your comments to 71539 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#71539; Package guix-patches. (Thu, 13 Jun 2024 18:55:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 13 Jun 2024 18:55:02 GMT) Full text and rfc822 format available.

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

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH] gnu: astyle: Update to 3.5.
Date: Thu, 13 Jun 2024 21:54:05 +0300
* 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
---
 gnu/packages/code.scm | 28 ++++++++++------------------
 1 file changed, 10 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index d6ac8178f3..44edf43db5 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2023 Fries <fries1234 <at> protonmail.com>
 ;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
 ;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus <at> gmail.com>
+;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -823,14 +824,14 @@ (define-public uncrustify
 (define-public astyle
   (package
     (name "astyle")
-    (version "3.4.8")
+    (version "3.5")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://sourceforge/astyle/astyle/astyle%20"
-                           version "/astyle_"  version "_linux.tar.gz"))
+                           version "/astyle-"  version ".tar.bz2"))
        (sha256
-        (base32 "1ms54wcs7hg1bsywqwf2lhdfizgbk7qxc9ghasxk8i99jvwlrk6b"))))
+        (base32 "0g4jyp47iz97ld9ac4wb5k59j4cs8dbw4dp8f32bwqx8pyvirz6y"))))
     (build-system gnu-build-system)
     (arguments
      (list
@@ -839,11 +840,13 @@ (define-public astyle
       #~(list (string-append "prefix=" #$output)
               "INSTALL=install"
               "release" "shared")
-      #:modules '((guix build gnu-build-system) ;FIXME use %default-modules
-                  (guix build utils)
-                  (ice-9 regex))
       #:phases
       #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-makefile
+            (lambda _
+              (substitute* "build/gcc/Makefile"
+                (("CBASEFLAGS = -Wall -Wextra -fno-rtti -fno-exceptions -std=c\\+\\+11")
+                 "CBASEFLAGS = -Wall -Wextra -fno-rtti -fno-exceptions -std=c++17"))))
           (replace 'configure
             (lambda _
               (chdir "build/gcc")))
@@ -852,12 +855,6 @@ (define-public astyle
               ;; Libraries and headers aren't installed by default.
               (let ((include (string-append #$output "/include"))
                     (lib     (string-append #$output "/lib")))
-                (define (link.so file strip-pattern)
-                  (symlink
-                   (basename file)
-                   (regexp-substitute #f
-                                      (string-match strip-pattern file)
-                                      'pre)))
                 (mkdir-p include)
                 (copy-file "../../src/astyle.h"
                            (string-append include "/astyle.h"))
@@ -865,12 +862,7 @@ (define-public astyle
                 (for-each (lambda (l)
                             (copy-file
                              l (string-append lib "/" (basename l))))
-                          (find-files "bin" "^lib.*\\.so"))
-                (for-each
-                 (lambda (file)
-                   (link.so file "(\\.[0-9]+){3}$")  ;.so
-                   (link.so file "(\\.[0-9]+){2}$")) ;.so.3
-                 (find-files lib "lib.*\\.so\\..*"))))))))
+                          (find-files "bin" "^lib.*\\.so"))))))))
     (home-page "https://astyle.sourceforge.net/")
     (synopsis "Source code indenter, formatter, and beautifier")
     (description

base-commit: 7e00fb9f31f51ac2f9fa67b71a3eb8aaa23efdb6
-- 
2.45.1





Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Mon, 24 Jun 2024 02:21:01 GMT) Full text and rfc822 format available.

Notification sent to "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>:
bug acknowledged by developer. (Mon, 24 Jun 2024 02:21:01 GMT) Full text and rfc822 format available.

Message #10 received at 71539-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Cc: 71539-done <at> debbugs.gnu.org
Subject: Re: [bug#71539] [PATCH] gnu: astyle: Update to 3.5.
Date: Sun, 23 Jun 2024 22:18:51 -0400
Hi Artyom,

"Artyom V. Poptsov" <poptsov.artyom <at> gmail.com> writes:

> * 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.

Nitpick, there is no hanging indent is for GNU ChangeLogs.

> Change-Id: I8777710d723d22320c288c331645f8d61d5e640e
> ---
>  gnu/packages/code.scm | 28 ++++++++++------------------
>  1 file changed, 10 insertions(+), 18 deletions(-)
>
> diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
> index d6ac8178f3..44edf43db5 100644
> --- a/gnu/packages/code.scm
> +++ b/gnu/packages/code.scm
> @@ -20,6 +20,7 @@
>  ;;; Copyright © 2023 Fries <fries1234 <at> protonmail.com>
>  ;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
>  ;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus <at> gmail.com>
> +;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -823,14 +824,14 @@ (define-public uncrustify
>  (define-public astyle
>    (package
>      (name "astyle")
> -    (version "3.4.8")
> +    (version "3.5")
>      (source
>       (origin
>         (method url-fetch)
>         (uri (string-append "mirror://sourceforge/astyle/astyle/astyle%20"
> -                           version "/astyle_"  version "_linux.tar.gz"))
> +                           version "/astyle-"  version ".tar.bz2"))
>         (sha256
> -        (base32 "1ms54wcs7hg1bsywqwf2lhdfizgbk7qxc9ghasxk8i99jvwlrk6b"))))
> +        (base32 "0g4jyp47iz97ld9ac4wb5k59j4cs8dbw4dp8f32bwqx8pyvirz6y"))))
>      (build-system gnu-build-system)
>      (arguments
>       (list
> @@ -839,11 +840,13 @@ (define-public astyle
>        #~(list (string-append "prefix=" #$output)
>                "INSTALL=install"
>                "release" "shared")
> -      #:modules '((guix build gnu-build-system) ;FIXME use %default-modules
> -                  (guix build utils)
> -                  (ice-9 regex))
>        #:phases
>        #~(modify-phases %standard-phases
> +          (add-after 'unpack 'patch-makefile
> +            (lambda _
> +              (substitute* "build/gcc/Makefile"
> +                (("CBASEFLAGS = -Wall -Wextra -fno-rtti -fno-exceptions -std=c\\+\\+11")
> +                 "CBASEFLAGS = -Wall -Wextra -fno-rtti -fno-exceptions -std=c++17"))))

That's breaking our max columns width of 80.  I've broken the long
strings locally.

>            (replace 'configure
>              (lambda _
>                (chdir "build/gcc")))
> @@ -852,12 +855,6 @@ (define-public astyle
>                ;; Libraries and headers aren't installed by default.
>                (let ((include (string-append #$output "/include"))
>                      (lib     (string-append #$output "/lib")))
> -                (define (link.so file strip-pattern)
> -                  (symlink
> -                   (basename file)
> -                   (regexp-substitute #f
> -                                      (string-match strip-pattern file)
> -                                      'pre)))
>                  (mkdir-p include)
>                  (copy-file "../../src/astyle.h"
>                             (string-append include "/astyle.h"))
> @@ -865,12 +862,7 @@ (define-public astyle
>                  (for-each (lambda (l)
>                              (copy-file
>                               l (string-append lib "/" (basename l))))
> -                          (find-files "bin" "^lib.*\\.so"))
> -                (for-each
> -                 (lambda (file)
> -                   (link.so file "(\\.[0-9]+){3}$")  ;.so
> -                   (link.so file "(\\.[0-9]+){2}$")) ;.so.3
> -                 (find-files lib "lib.*\\.so\\..*"))))))))
> +                          (find-files "bin" "^lib.*\\.so"))))))))
>      (home-page "https://astyle.sourceforge.net/")
>      (synopsis "Source code indenter, formatter, and beautifier")
>      (description

The rest LGTM, assuming their build system now takes care of what we
used to be doing manually.

Applied locally, will push shortly.

-- 
Thanks,
Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 22 Jul 2024 11:24:16 GMT) Full text and rfc822 format available.

This bug report was last modified 329 days ago.

Previous Next


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