Revert "Revert "gnu: Add libde265.""
[jackhill/guix/guix.git] / gnu / packages / popt.scm
index a9b5f50..df80f12 100644 (file)
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; 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 build-system cmake)
-  #:use-module (guix licenses))
+  #:use-module (guix licenses)
+  #:use-module (gnu packages texinfo))
 
 (define-public argtable
   (package
@@ -59,21 +62,26 @@ line syntax.")
     (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
@@ -94,15 +102,16 @@ similar to getopt(3), it contains a number of enhancements, including:
 (define-public gflags
   (package
     (name "gflags")
-    (version "2.2.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/gflags/gflags"
-                                  "/archive/v" version ".tar.gz"))
-              (sha256
-               (base32
-                "120z4w40zr4s8wvfyw1bdmqvincwrwjnimzlwhs1ficaa333cv26"))
-              (file-name (string-append name "-" version ".tar.gz"))))
+    (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"
@@ -122,18 +131,21 @@ appropriately.")
 (define-public gengetopt
   (package
     (name "gengetopt")
-    (version "2.22.6")
+    (version "2.23")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://gnu/gengetopt/gengetopt-"
-                           version ".tar.gz"))
+                           version ".tar.xz"))
        (sha256
         (base32
-         "1xq1kcfs6hri101ss4dhym0jn96z4v6jdvx288mfywadc245mc1h"))))
+         "1b44fn0apsgawyqa4alx2qj5hls334mhbszxsy6rfr0q074swhdr"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:parallel-build? #f))           ; not supported
+     `(#: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
@@ -144,5 +156,5 @@ 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 "http://www.gnu.org/software/gengetopt/gengetopt.html")
+    (home-page "https://www.gnu.org/software/gengetopt/gengetopt.html")
     (license gpl3+)))