| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 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
|
| 48 | command-line options. It provides a declarative API to define your
|
| 49 | command-line syntax, and because it's built on the standard getopt library, it
|
| 50 | ensures 100% GNU-compliant behavior. Argtable3 automatically generates the
|
| 51 | error-handling logic and usage descriptions that are essential for any robust
|
| 52 | command-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" |
| 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
|
| 81 | similar 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
|
| 114 | other such libraries in that command-line flag definitions can be scattered
|
| 115 | around the source code, and not just listed in one place such as @code{main}.
|
| 116 | This means that a single source-code file will define and use flags that are
|
| 117 | meaningful to that file. Any application that links in that file will get the
|
| 118 | flags, and the gflags library will automatically handle that flag
|
| 119 | appropriately.")
|
| 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
|
| 140 | command-line options using the getopt_long function found in GNU
|
| 141 | libc, removing some of the tedium of this task for large programs
|
| 142 | that accept many options. The options parsed by the generated
|
| 143 | function may be in both short (e.g., \"-h\") and long (\"--help\")
|
| 144 | formats, as specified by the GNU coding standards. Additionally, the
|
| 145 | output of the standard options \"--help\" and \"--version\" is generated
|
| 146 | automatically.")
|
| 147 | (home-page "https://www.gnu.org/software/gengetopt/gengetopt.html")
|
| 148 | (license gpl3+)))
|