From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJPf2-0006Em-1H for guix-patches@gnu.org; Thu, 17 May 2018 16:38:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJPf0-0007MB-Vh for guix-patches@gnu.org; Thu, 17 May 2018 16:38:03 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:59192) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fJPf0-0007M1-Rx for guix-patches@gnu.org; Thu, 17 May 2018 16:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fJPf0-0008QP-IV for guix-patches@gnu.org; Thu, 17 May 2018 16:38:02 -0400 Subject: [bug#31485] [PATCH] gnu: Add uncrustify. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJPeF-0006Bu-Ds for guix-patches@gnu.org; Thu, 17 May 2018 16:37:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJPeE-00076h-H0 for guix-patches@gnu.org; Thu, 17 May 2018 16:37:15 -0400 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:35876) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fJPeE-000764-A5 for guix-patches@gnu.org; Thu, 17 May 2018 16:37:14 -0400 Received: by mail-wm0-x236.google.com with SMTP id n10-v6so11321002wmc.1 for ; Thu, 17 May 2018 13:37:14 -0700 (PDT) Received: from mimimi.home (2a01cb040a37a0005adf9a0845f647b3.ipv6.abo.wanadoo.fr. [2a01:cb04:a37:a000:5adf:9a08:45f6:47b3]) by smtp.gmail.com with ESMTPSA id z7-v6sm7093608wrg.56.2018.05.17.13.37.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 May 2018 13:37:12 -0700 (PDT) From: Pierre Neidhardt Date: Thu, 17 May 2018 22:37:06 +0200 Message-Id: <20180517203706.10244-1-ambrevar@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 31485@debbugs.gnu.org * 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