projects/guix·blob kernel-updates · refs

148 lines · 5.7 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013, 2014, 2016, 2019 Ludovic Courtès <[email protected]>
3;;; Copyright © 2015, 2016 Ricardo Wurmus <[email protected]>
4;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <[email protected]>
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21(define-module (gnu packages popt)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix git-download)
25 #:use-module (guix build-system gnu)
26 #:use-module (guix build-system cmake)
27 #:use-module (guix licenses)
28 #:use-module (gnu packages texinfo))
29
30(define-public argtable3
31 (package
32 (name "argtable3")
33 (version "3.3.1")
34 (source
35 (origin
36 (method git-fetch)
37 (uri (git-reference
38 (url "https://github.com/argtable/argtable3")
39 (commit (string-append "v" version))))
40 (file-name (git-file-name name version))
41 (sha256
42 (base32 "1d7549c9hppjjp0a64yhwsgy44i14j6mgzvb2980r3yaw6l2jvi1"))))
43 (build-system cmake-build-system)
44 (home-page "https://www.argtable.org/")
45 (synopsis "Command line option parsing library")
46 (description
47 "Argtable3 is an ANSI C library that simplifies parsing GNU-style
48command-line options. It provides a declarative API to define your
49command-line syntax, and because it's built on the standard getopt library, it
50ensures 100% GNU-compliant behavior. Argtable3 automatically generates the
51error-handling logic and usage descriptions that are essential for any robust
52command-line program, saving you from tedious boilerplate code.")
53 (license bsd-3)))
54
55(define-public popt
56 (package
57 (name "popt")
58 (version "1.18")
59 (source (origin
60 (method url-fetch)
61 (uri (string-append "http://ftp.rpm.org/popt/releases"
62 "/popt-1.x/popt-" version ".tar.gz"))
63 (sha256
64 (base32
65 "1lf5zlj5rbg6s4bww7hbhpca97prgprnarx978vcwa0bl81vqnai"))))
66 (build-system gnu-build-system)
67 (arguments
68 '(#:phases
69 (modify-phases %standard-phases
70 (add-before 'configure 'patch-test
71 (lambda _
72 (substitute* "tests/test-poptrc.in"
73 (("/bin/echo") (which "echo")))
74 (substitute* "tests/testit.sh" ;don't expect old libtool names
75 (("lt-test1") "test1"))
76 #t)))))
77 (home-page "https://rpm5.org/files/popt/")
78 (synopsis "Command line option parsing library")
79 (description
80 "This is the popt(3) command line option parsing library. While it is
81similar to getopt(3), it contains a number of enhancements, including:
82
83 - popt is fully reentrant;
84
85 - popt can parse arbitrary argv[] style arrays while getopt(3) makes this
86 quite difficult;
87
88 - popt allows users to alias command line arguments;
89
90 - popt provides convenience functions for parsing strings into argv[] style
91 arrays.")
92 (license x11)))
93
94(define-public gflags
95 (package
96 (name "gflags")
97 (version "2.2.2")
98 (source
99 (origin
100 (method git-fetch)
101 (uri (git-reference
102 (url "https://github.com/gflags/gflags")
103 (commit (string-append "v" version))))
104 (sha256
105 (base32 "147i3md3nxkjlrccqg4mq1kyzc7yrhvqv5902iibc7znkvzdvlp0"))
106 (file-name (git-file-name name version))))
107 (build-system cmake-build-system)
108 (arguments
109 '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
110 (home-page "https://gflags.github.io/gflags/")
111 (synopsis "C++ library for command-line argument parsing")
112 (description
113 "Gflags is a C++ library to parse command-line flags. It differs from
114other such libraries in that command-line flag definitions can be scattered
115around the source code, and not just listed in one place such as @code{main}.
116This means that a single source-code file will define and use flags that are
117meaningful to that file. Any application that links in that file will get the
118flags, and the gflags library will automatically handle that flag
119appropriately.")
120 (license bsd-3)))
121
122(define-public gengetopt
123 (package
124 (name "gengetopt")
125 (version "2.23.1")
126 (source
127 (origin
128 (method url-fetch)
129 (uri (string-append "mirror://gnu/gengetopt/gengetopt-"
130 version ".tar.xz"))
131 (sha256
132 (base32
133 "1diajbs11zj2gj8c8xnvldlp6a7rnw0654wmmxw5zm1b894fz79v"))))
134 (build-system gnu-build-system)
135 (native-inputs
136 (list texinfo))
137 (synopsis "Create parsers for command line options")
138 (description
139 "GNU Gengetopt is a program to generate a C/C++ function for parsing
140command-line options using the getopt_long function found in GNU
141libc, removing some of the tedium of this task for large programs
142that accept many options. The options parsed by the generated
143function may be in both short (e.g., \"-h\") and long (\"--help\")
144formats, as specified by the GNU coding standards. Additionally, the
145output of the standard options \"--help\" and \"--version\" is generated
146automatically.")
147 (home-page "https://www.gnu.org/software/gengetopt/gengetopt.html")
148 (license gpl3+)))