From 9c4dcfaf66d37faeb165e9284f6a57871e96e1ac Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Sun, 20 May 2018 14:31:55 +0200 Subject: gnu: Add uncrustify. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/code.scm (uncrustify): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/code.scm | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'gnu/packages/code.scm') diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm index 15fdf9d66f..24398fac91 100644 --- a/gnu/packages/code.scm +++ b/gnu/packages/code.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2017, 2018 Clément Lassieur ;;; Copyright © 2017 Andy Wingo ;;; Copyright © 2018 Fis Trivial +;;; Copyright © 2018 Pierre Neidhardt ;;; ;;; This file is part of GNU Guix. ;;; @@ -527,3 +528,45 @@ produce colored output.") output is a graphviz-dot file, a Gexf-XML file or a list of the deepest independent targets.") (license license:expat))) + +(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#, +Objective@tie{}C, 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 license:gpl2+))) -- cgit v1.2.3 From c1e5109b6843d5670bf81678f2697babc9b770c9 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 23 May 2018 12:11:40 +0200 Subject: gnu: Move 'astyle' to code.scm. Suggested by Pierre Neidhardt . * gnu/packages/pretty-print.scm (astyle): Move to... * gnu/packages/code.scm (astyle): ... here. New variable. --- gnu/packages/code.scm | 42 ++++++++++++++++++++++++++++++++++++++++++ gnu/packages/pretty-print.scm | 43 ------------------------------------------- 2 files changed, 42 insertions(+), 43 deletions(-) (limited to 'gnu/packages/code.scm') diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm index 24398fac91..6dbdf8a232 100644 --- a/gnu/packages/code.scm +++ b/gnu/packages/code.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2017 Andy Wingo ;;; Copyright © 2018 Fis Trivial ;;; Copyright © 2018 Pierre Neidhardt +;;; Copyright © 2014 Eric Bavier ;;; ;;; This file is part of GNU Guix. ;;; @@ -570,3 +571,44 @@ Objective@tie{}C, D, Java, Pawn, and Vala). Features: @item Highly configurable - More than 600 configurable options. @end itemize\n") (license license:gpl2+))) + +(define-public astyle + (package + (name "astyle") + (version "2.05") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/astyle/astyle/astyle%20" + version "/astyle_" version "_linux.tar.gz")) + (sha256 + (base32 + "0f9sh9kq5ajp1yz133h00fr9235p1m698x7n3h7zbrhjiwgynd6s")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;no tests + #:make-flags (list (string-append "prefix=" %output) + "INSTALL=install" + "all") + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda _ (chdir "build/gcc") #t)) + (add-after 'install 'install-libs + (lambda* (#:key outputs #:allow-other-keys) + ;; Libraries are not installed by default + (let* ((output (assoc-ref outputs "out")) + (libdir (string-append output "/lib"))) + (begin + (mkdir-p libdir) + (for-each (lambda (l) + (copy-file + l (string-append libdir "/" (basename l)))) + (find-files "bin" "lib*")))) + #t))))) + (home-page "http://astyle.sourceforge.net/") + (synopsis "Source code indenter, formatter, and beautifier") + (description + "Artistic Style is a source code indenter, formatter, and beautifier for +the C, C++, C++/CLI, Objective‑C, C#, and Java programming languages.") + (license license:lgpl3+))) diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index 29b0039788..cc3431b674 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm @@ -1,5 +1,4 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2016 Ricardo Wurmus ;;; Copyright © 2017 Marius Bakke @@ -281,45 +280,3 @@ seen in a terminal.") TeX, SVG, BBCode and terminal escape sequences with colored syntax highlighting. Language definitions and color themes are customizable.") (license gpl3+))) - -(define-public astyle - (package - (name "astyle") - (version "2.05") - (source - (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/astyle/astyle/astyle%20" - version "/astyle_" version "_linux.tar.gz")) - (sha256 - (base32 - "0f9sh9kq5ajp1yz133h00fr9235p1m698x7n3h7zbrhjiwgynd6s")))) - (build-system gnu-build-system) - (arguments - `(#:tests? #f ;no tests - #:make-flags (list (string-append "prefix=" %output) - "INSTALL=install" - "all") - #:phases - (modify-phases %standard-phases - (replace 'configure - (lambda _ (chdir "build/gcc") #t)) - (add-after 'install 'install-libs - (lambda* (#:key outputs #:allow-other-keys) - ;; Libraries are not installed by default - (let* ((output (assoc-ref outputs "out")) - (libdir (string-append output "/lib"))) - (begin - (mkdir-p libdir) - (for-each (lambda (l) - (copy-file - l (string-append libdir "/" (basename l)))) - (find-files "bin" "lib*")))) - #t))))) - (home-page "http://astyle.sourceforge.net/") - (synopsis "Source code indenter, formatter, and beautifier") - (description - "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+))) - -- cgit v1.2.3 From e470abf8b789e61ae918a80f141e3c06afd44832 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 23 May 2018 12:13:16 +0200 Subject: gnu: Move 'indent' to code.scm. Suggested by Pierre Neidhardt . * gnu/packages/indent.scm: Remove. Move 'indent' to... * gnu/packages/code.scm (indent): ... here. New variable. * gnu/local.mk (GNU_SYSTEM_MODULES): Remove indent.scm. --- gnu/local.mk | 1 - gnu/packages/code.scm | 33 +++++++++++++++++++++++++++++ gnu/packages/indent.scm | 56 ------------------------------------------------- 3 files changed, 33 insertions(+), 57 deletions(-) delete mode 100644 gnu/packages/indent.scm (limited to 'gnu/packages/code.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 469e73f7c7..4cdbaec1dc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -226,7 +226,6 @@ GNU_SYSTEM_MODULES = \ %D%/packages/image-processing.scm \ %D%/packages/image-viewers.scm \ %D%/packages/imagemagick.scm \ - %D%/packages/indent.scm \ %D%/packages/inklingreader.scm \ %D%/packages/inkscape.scm \ %D%/packages/irc.scm \ diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm index 6dbdf8a232..fc1c000b92 100644 --- a/gnu/packages/code.scm +++ b/gnu/packages/code.scm @@ -9,6 +9,8 @@ ;;; Copyright © 2018 Fis Trivial ;;; Copyright © 2018 Pierre Neidhardt ;;; Copyright © 2014 Eric Bavier +;;; Copyright © 2013 Andreas Enge +;;; Copyright © 2014 Mark H Weaver ;;; ;;; This file is part of GNU Guix. ;;; @@ -612,3 +614,34 @@ Objective@tie{}C, D, Java, Pawn, and Vala). Features: "Artistic Style is a source code indenter, formatter, and beautifier for the C, C++, C++/CLI, Objective‑C, C#, and Java programming languages.") (license license:lgpl3+))) + +(define-public indent + (package + (name "indent") + (version "2.2.10") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/indent/indent-" version + ".tar.gz")) + (sha256 (base32 + "0f9655vqdvfwbxvs1gpa7py8k1z71aqh8hp73f65vazwbfz436wa")))) + (build-system gnu-build-system) + (arguments + `(#:phases (alist-cons-after + 'unpack 'fix-docdir + (lambda _ + ;; Although indent uses a modern autoconf in which docdir + ;; defaults to PREFIX/share/doc, the doc/Makefile.am + ;; overrides this to be in PREFIX/doc. Fix this. + (substitute* "doc/Makefile.in" + (("^docdir = .*$") "docdir = @docdir@\n"))) + %standard-phases))) + (synopsis "Code reformatter") + (description + "Indent is a program that makes source code easier to read by +reformatting it in a consistent style. It can change the style to one of +several different styles such as GNU, BSD or K&R. It has some flexibility to +deal with incomplete or malformed syntax. GNU indent offers several +extensions over the standard utility.") + (license license:gpl3+) + (home-page "https://www.gnu.org/software/indent/"))) diff --git a/gnu/packages/indent.scm b/gnu/packages/indent.scm deleted file mode 100644 index 4950a26121..0000000000 --- a/gnu/packages/indent.scm +++ /dev/null @@ -1,56 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 Andreas Enge -;;; Copyright © 2014 Mark H Weaver -;;; -;;; This file is part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see . - -(define-module (gnu packages indent) - #:use-module (gnu packages) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix build-system gnu)) - -(define-public indent - (package - (name "indent") - (version "2.2.10") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/indent/indent-" version - ".tar.gz")) - (sha256 (base32 - "0f9655vqdvfwbxvs1gpa7py8k1z71aqh8hp73f65vazwbfz436wa")))) - (build-system gnu-build-system) - (arguments - `(#:phases (alist-cons-after - 'unpack 'fix-docdir - (lambda _ - ;; Although indent uses a modern autoconf in which docdir - ;; defaults to PREFIX/share/doc, the doc/Makefile.am - ;; overrides this to be in PREFIX/doc. Fix this. - (substitute* "doc/Makefile.in" - (("^docdir = .*$") "docdir = @docdir@\n"))) - %standard-phases))) - (synopsis "Code reformatter") - (description - "Indent is a program that makes source code easier to read by -reformatting it in a consistent style. It can change the style to one of -several different styles such as GNU, BSD or K&R. It has some flexibility to -deal with incomplete or malformed syntax. GNU indent offers several -extensions over the standard utility.") - (license license:gpl3+) - (home-page "https://www.gnu.org/software/indent/"))) -- cgit v1.2.3