GNU bug report logs -
#31485
[PATCH] gnu: Add uncrustify.
Previous Next
Reported by: Pierre Neidhardt <ambrevar <at> gmail.com>
Date: Thu, 17 May 2018 20:38:02 UTC
Severity: normal
Tags: patch
Done: ludo <at> gnu.org (Ludovic Courtès)
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 31485 in the body.
You can then email your comments to 31485 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#31485
; Package
guix-patches
.
(Thu, 17 May 2018 20:38:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Pierre Neidhardt <ambrevar <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Thu, 17 May 2018 20:38:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/pretty-print.scm (uncrustify): New variable.
---
gnu/packages/pretty-print.scm | 47 +++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm
index 6edfba95c..f8cb4af80 100644
--- a/gnu/packages/pretty-print.scm
+++ b/gnu/packages/pretty-print.scm
@@ -322,3 +322,50 @@ highlighting. Language definitions and color themes are customizable.")
"Artistic Style is a source code indenter, formatter, and beautifier for
the C, C++, C++/CLI, Objective‑C, C#, and Java programming languages.")
(license lgpl3+)))
+
+(define-public uncrustify
+ (package
+ (name "uncrustify")
+ (version "0.67")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/uncrustify/uncrustify/archive/"
+ "uncrustify-" version ".zip"))
+ (sha256
+ (base32
+ "0n13kq0nsm35fxhdp0f275n4x0w88hdv3bdjy0hgvv42x0dx5zyp"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'unpack-etc
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Configuration samples are not installed by default.
+ (let* ((output (assoc-ref outputs "out"))
+ (etcdir (string-append output "/etc")))
+ (begin
+ (mkdir-p etcdir)
+ (for-each (lambda (l)
+ (copy-file
+ l (string-append etcdir "/" (basename l))))
+ (find-files "etc" "\\.cfg$"))))
+ #t)))))
+ (home-page "http://uncrustify.sourceforge.net/")
+ (synopsis "Source Code Beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and VALA")
+ (description
+ "A highly configurable, easily modifiable source code beautifier. Features:
+- Indent code, aligning on parens, assignments, etc.
+- Align on @code{=} and variable definitions.
+- Align structure initializers.
+- Align #define stuff.
+- Align backslash-newline stuff.
+- Reformat comments (a little bit).
+- Fix inter-character spacing.
+- Add or remove parens on return statements.
+- Add or remove braces on single-statement if/do/while/for statements.
+- Supports embedded SQL @code{EXEC SQL} stuff.
+- Highly configurable - More than 600 configurable options.")
+ (license gpl2)))
--
2.17.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31485
; Package
guix-patches
.
(Fri, 18 May 2018 06:51:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 31485 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Forgot to add my name to the copyright list.
--
Pierre Neidhardt
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31485
; Package
guix-patches
.
(Sat, 19 May 2018 20:33:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 31485 <at> debbugs.gnu.org (full text, mbox):
Hi Pierre,
Pierre Neidhardt <ambrevar <at> gmail.com> skribis:
> * gnu/packages/pretty-print.scm (uncrustify): New variable.
Thanks for the patch! Perhaps indent.scm or code.scm would be a better
match?
> + (add-after 'unpack 'unpack-etc
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + ;; Configuration samples are not installed by default.
> + (let* ((output (assoc-ref outputs "out"))
> + (etcdir (string-append output "/etc")))
> + (begin
You can omit ‘begin’.
> + (mkdir-p etcdir)
> + (for-each (lambda (l)
> + (copy-file
> + l (string-append etcdir "/" (basename l))))
Simply: (install-file l etcdir), and you can omit ‘mkdir-p’ as well.
> + (home-page "http://uncrustify.sourceforge.net/")
> + (synopsis "Source Code Beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and VALA")
Maybe: “Indent source code written in C or related languages”?
(I wasn’t sure what “beautifier” meant.)
> + (description
> + "A highly configurable, easily modifiable source code beautifier. Features:
> +- Indent code, aligning on parens, assignments, etc.
> +- Align on @code{=} and variable definitions.
> +- Align structure initializers.
> +- Align #define stuff.
> +- Align backslash-newline stuff.
> +- Reformat comments (a little bit).
> +- Fix inter-character spacing.
> +- Add or remove parens on return statements.
> +- Add or remove braces on single-statement if/do/while/for statements.
> +- Supports embedded SQL @code{EXEC SQL} stuff.
> +- Highly configurable - More than 600 configurable options.")
Please use full sentences and Texinfo markup for lists (@enumerate,
etc.):
https://www.gnu.org/software/guix/manual/html_node/Synopses-and-Descriptions.html
I’m not sure we need to least feature with this level of detail, though.
Your call!
> + (license gpl2)))
Should be ‘gpl2+’ (version 2 “or any later version”).
Could you send an updated patch?
Thanks,
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31485
; Package
guix-patches
.
(Sat, 19 May 2018 22:42:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 31485 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> Maybe: “Indent source code written in C or related languages”?
> (I wasn’t sure what “beautifier” meant.)
Well, technically "indent" is only about the spacing to the margin.
Beautifiers (also known as prettifiers or formatters) do more than that,
they also handle the spacing elsewhere, transform into idiomatic syntax,
etc.
I'm not sure which is better. I like "code formatter".
I know 3 C-oriented code formatters:
- GNU indent (already in Guix)
- Astyle (already in Guix)
- Uncrustify
> I’m not sure we need to least feature with this level of detail, though.
> Your call!
Probably not, this was a copy-paste from the homepage. Sorry for the
lazy move :p
> Could you send an updated patch?
Will do!
--
Pierre Neidhardt
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31485
; Package
guix-patches
.
(Sun, 20 May 2018 12:33:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 31485 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
* gnu/packages/pretty-print.scm (uncrustify): New variable.
---
gnu/packages/pretty-print.scm | 43 +++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm
index 6edfba95c..baba79ac9 100644
--- a/gnu/packages/pretty-print.scm
+++ b/gnu/packages/pretty-print.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2017 Marius Bakke <mbakke <at> fastmail.com>
;;; Copyright © 2017 Ludovic Courtès <ludo <at> gnu.org>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2018 Pierre Neidhardt <ambrevar <at> gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -322,3 +323,45 @@ highlighting. Language definitions and color themes are customizable.")
"Artistic Style is a source code indenter, formatter, and beautifier for
the C, C++, C++/CLI, Objective‑C, C#, and Java programming languages.")
(license lgpl3+)))
+
+(define-public uncrustify
+ (package
+ (name "uncrustify")
+ (version "0.67")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/uncrustify/uncrustify/archive/"
+ "uncrustify-" version ".zip"))
+ (sha256
+ (base32
+ "0n13kq0nsm35fxhdp0f275n4x0w88hdv3bdjy0hgvv42x0dx5zyp"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'unpack-etc
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Configuration samples are not installed by default.
+ (let* ((output (assoc-ref outputs "out"))
+ (etcdir (string-append output "/etc")))
+ (for-each (lambda (l)
+ (install-file l etcdir))
+ (find-files "etc" "\\.cfg$")))
+ #t)))))
+ (home-page "http://uncrustify.sourceforge.net/")
+ (synopsis "Code formatter for C and other related languages")
+ (description
+ "Beautify source code in many languages of the C family (C, C++, C#,
+ObjectiveC, D, Java, Pawn and VALA). Features:
+@itemize
+@item Indent and align code.
+@item Reformat comments (a little bit).
+@item Fix inter-character spacing.
+@item Add or remove parens / braces.
+@item Supports embedded SQL @code{EXEC SQL} stuff.
+@item Highly configurable - More than 600 configurable options.
+@end itemize\n")
+ (license gpl2)))
--
2.17.0
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31485
; Package
guix-patches
.
(Sun, 20 May 2018 20:32:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 31485 <at> debbugs.gnu.org (full text, mbox):
Hi Pierre,
Pierre Neidhardt <ambrevar <at> gmail.com> skribis:
>> Maybe: “Indent source code written in C or related languages”?
>> (I wasn’t sure what “beautifier” meant.)
>
> Well, technically "indent" is only about the spacing to the margin.
> Beautifiers (also known as prettifiers or formatters) do more than that,
> they also handle the spacing elsewhere, transform into idiomatic syntax,
> etc.
>
> I'm not sure which is better. I like "code formatter".
Sure, it’s even clearer.
> * gnu/packages/pretty-print.scm (uncrustify): New variable.
There are two minor issues from my previous email that we should
resolve:
> Perhaps indent.scm or code.scm would be a better match?
and:
> Should be ‘gpl2+’ (version 2 “or any later version”).
I’m happy to fix both on your behalf if that’s fine with you, or you can
send an updated patch.
Let me know!
Thanks,
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31485
; Package
guix-patches
.
(Sun, 20 May 2018 20:50:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 31485 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:
>> Perhaps indent.scm or code.scm would be a better match?
Well, indent, astyle and uncrustify clearly belong together.
At the moment astyle is in pretty-print.scm and indent is alone in its
own file, indent.scm.
My suggestions:
- Move indent to pretty-print.scm.
- Move astyle, indent and uncrustify to code.scm.
> and:
>
>> Should be ‘gpl2+’ (version 2 “or any later version”).
Sorry, forgot that one. Please go ahead and fix it, sorry for the bother.
--
Pierre Neidhardt
Emerson's Law of Contrariness:
Our chief want in life is somebody who shall make us do what we
can. Having found them, we shall then hate them for it.
[signature.asc (application/pgp-signature, inline)]
Reply sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
You have taken responsibility.
(Wed, 23 May 2018 10:19:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Pierre Neidhardt <ambrevar <at> gmail.com>
:
bug acknowledged by developer.
(Wed, 23 May 2018 10:19:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 31485-done <at> debbugs.gnu.org (full text, mbox):
Hello,
Pierre Neidhardt <ambrevar <at> gmail.com> skribis:
> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>>> Perhaps indent.scm or code.scm would be a better match?
>
> Well, indent, astyle and uncrustify clearly belong together.
> At the moment astyle is in pretty-print.scm and indent is alone in its
> own file, indent.scm.
>
> My suggestions:
>
> - Move indent to pretty-print.scm.
> - Move astyle, indent and uncrustify to code.scm.
I did the latter and pushed all this, thank you!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31485
; Package
guix-patches
.
(Sat, 16 Jun 2018 01:38:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 31485-done <at> debbugs.gnu.org (full text, mbox):
Thanks for reporting that; it should be fixed now.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31485
; Package
guix-patches
.
(Sat, 16 Jun 2018 16:17:01 GMT)
Full text and
rfc822 format available.
Message #34 received at 31485 <at> debbugs.gnu.org (full text, mbox):
Hi Paul,
Paul Eggert <eggert <at> cs.ucla.edu> skribis:
> Thanks for reporting that; it should be fixed now.
I was glad to see your name on bug-guix, but it turns out you emailed
the wrong bug address. :-)
https://bugs.gnu.org/31485
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31485
; Package
guix-patches
.
(Sat, 16 Jun 2018 16:34:01 GMT)
Full text and
rfc822 format available.
Message #37 received at 31485 <at> debbugs.gnu.org (full text, mbox):
Ludovic Courtès wrote:
> Hi Paul,
>
> Paul Eggert <eggert <at> cs.ucla.edu> skribis:
>
>> Thanks for reporting that; it should be fixed now.
>
> I was glad to see your name on bug-guix, but it turns out you emailed
> the wrong bug address. :-)
>
> https://bugs.gnu.org/31485
Sorry about that, and thanks for letting me know. Closing the correct bug number
(31845) now.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 16 Jul 2018 11:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 334 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.