;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2013, 2014, 2016, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
(define-module (gnu packages popt)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix build-system gnu)
- #:use-module (guix licenses))
+ #:use-module (guix build-system cmake)
+ #:use-module (guix licenses)
+ #:use-module (gnu packages texinfo))
(define-public argtable
(package
(source (origin
(method url-fetch)
(uri (string-append
- "mirror://sourceforge/argtable/argtable"
+ "mirror://sourceforge/argtable/argtable/"
+ "argtable-" version "/argtable"
(string-join (string-split version #\.) "-")
".tar.gz"))
(sha256
(version "1.16")
(source (origin
(method url-fetch)
- (uri (string-append "http://rpm5.org/files/popt/popt-"
- version ".tar.gz"))
+ ;; The original rpm5.org domain is not accessible since
+ ;; 2019-06-13, so use Debians copy of the tarball.
+ (uri (string-append "https://deb.debian.org/debian/pool/main"
+ "/p/popt/popt_" version ".orig.tar.gz"))
+ ;; Ensure the file name stays the same to prevent rebuilds.
+ (file-name (string-append "popt-" version ".tar.gz"))
(sha256
(base32
"1j2c61nn2n351nhj4d25mnf3vpiddcykq005w2h6kw79dwlysa77"))))
(build-system gnu-build-system)
(arguments
- '(#:phases (alist-cons-before
- 'configure 'patch-test
- (lambda _
- (substitute* "test-poptrc.in"
- (("/bin/echo") (which "echo")))
- (substitute* "testit.sh" ; don't expect old libtool names
- (("lt-test1") "test1")))
- %standard-phases)))
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'patch-test
+ (lambda _
+ (substitute* "test-poptrc.in"
+ (("/bin/echo") (which "echo")))
+ (substitute* "testit.sh" ; don't expect old libtool names
+ (("lt-test1") "test1"))
+ #t)))))
(home-page "http://rpm5.org/files/popt/")
(synopsis "Command line option parsing library")
(description
- popt provides convience functions for parsing strings into argv[] style
arrays.")
(license x11)))
+
+(define-public gflags
+ (package
+ (name "gflags")
+ (version "2.2.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/gflags/gflags")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "147i3md3nxkjlrccqg4mq1kyzc7yrhvqv5902iibc7znkvzdvlp0"))
+ (file-name (git-file-name name version))))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON"
+ "-DBUILD_TESTING=ON")))
+ (home-page "https://gflags.github.io/gflags/")
+ (synopsis "C++ library for command-line argument parsing")
+ (description
+ "Gflags is a C++ library to parse command-line flags. It differs from
+other such libraries in that command-line flag definitions can be scattered
+around the source code, and not just listed in one place such as @code{main}.
+This means that a single source-code file will define and use flags that are
+meaningful to that file. Any application that links in that file will get the
+flags, and the gflags library will automatically handle that flag
+appropriately.")
+ (license bsd-3)))
+
+(define-public gengetopt
+ (package
+ (name "gengetopt")
+ (version "2.23")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gengetopt/gengetopt-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "1b44fn0apsgawyqa4alx2qj5hls334mhbszxsy6rfr0q074swhdr"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:parallel-build? #f ; not supported
+ #:parallel-tests? #f)) ; likewise
+ (native-inputs
+ `(("texinfo" ,texinfo)))
+ (synopsis "Create parsers for command line options")
+ (description
+ "GNU Gengetopt is a program to generate a C/C++ function for parsing
+command-line options using the getopt_long function found in GNU
+libc, removing some of the tedium of this task for large programs
+that accept many options. The options parsed by the generated
+function may be in both short (e.g., \"-h\") and long (\"--help\")
+formats, as specified by the GNU coding standards. Additionally, the
+output of the standard options \"--help\" and \"--version\" is generated
+automatically.")
+ (home-page "https://www.gnu.org/software/gengetopt/gengetopt.html")
+ (license gpl3+)))