guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#31485] [PATCH] gnu: Add uncrustify.


From: Pierre Neidhardt
Subject: [bug#31485] [PATCH] gnu: Add uncrustify.
Date: Thu, 17 May 2018 22:37:06 +0200

* 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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]