gnu: Move Linux-Libre modules to their own section.
[jackhill/guix/guix.git] / gnu / packages / mcrypt.scm
index eac8c72..fb55293 100644 (file)
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,8 +24,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
   #:use-module (gnu packages compression)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages file))
+  #:use-module (gnu packages perl))
 
 (define-public mcrypt
   (package
     (source
      (origin
       (method url-fetch)
-      (uri (string-append "mirror://sourceforge/mcrypt/mcrypt-"
-                          version ".tar.gz"))
+      (uri (string-append "mirror://sourceforge/mcrypt/MCrypt/"
+                          version "/" name "-" version ".tar.gz"))
       (sha256
        (base32
-        "161031n1w9pb4yzz9i47szc12a4mwpcpvyxnvafsik2l9s2aliai"))))
+        "161031n1w9pb4yzz9i47szc12a4mwpcpvyxnvafsik2l9s2aliai"))
+      (patches (search-patches
+                 "mcrypt-CVE-2012-4409.patch"
+                 "mcrypt-CVE-2012-4426.patch"
+                 "mcrypt-CVE-2012-4527.patch"))))
     (build-system gnu-build-system)
     (inputs
      `(("zlib" ,zlib)
@@ -62,13 +66,12 @@ them.")
     (source
      (origin
       (method url-fetch)
-      (uri (string-append "mirror://sourceforge/mcrypt/libmcrypt-"
-                          version ".tar.gz"))
+      (uri (string-append "mirror://sourceforge/mcrypt/Libmcrypt/" version
+                          "/libmcrypt-" version ".tar.gz"))
       (sha256
        (base32
         "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4"))))
     (build-system gnu-build-system)
-    (native-inputs `(("file" ,file)))
     (home-page "http://mcrypt.sourceforge.net/")
     (synopsis "Encryption algorithm library")
     (description
@@ -86,23 +89,21 @@ XTEA, 3WAY, TWOFISH, BLOWFISH, ARCFOUR, WAKE and more.")
     (source
      (origin
       (method url-fetch)
-
-      (uri (string-append "mirror://sourceforge/mhash/mhash-"
-                          version ".tar.bz2"))
+      (uri (string-append "mirror://sourceforge/mhash/mhash/" version
+                          "/mhash-" version ".tar.bz2"))
       (sha256
        (base32
         "1w7yiljan8gf1ibiypi6hm3r363imm3sxl1j8hapjdq3m591qljn"))
-      (patches (list (search-patch "mhash-keygen-test-segfault.patch")))))
+      (patches (search-patches "mhash-keygen-test-segfault.patch"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("file" ,file)
-       ("perl" ,perl)))                 ;for tests
+     `(("perl" ,perl)))                 ;for tests
     (home-page "http://mhash.sourceforge.net/")
     (synopsis "Thread-safe hash library")
     (description
-     "mhash is a thread-safe hash library, implemented in C, and provides a
-uniform interface to a large number of hash algorithms. These algorithms can
-be used to compute checksums, message digests, and other signatures. The HMAC
+     "Mhash is a thread-safe hash library, implemented in C, and provides a
+uniform interface to a large number of hash algorithms.  These algorithms can
+be used to compute checksums, message digests, and other signatures.  The HMAC
 support implements the basics for message authentication, following RFC 2104.
 
 Algorithms currently supplied are:
@@ -110,5 +111,5 @@ Algorithms currently supplied are:
 CRC-32, CRC-32B, ALDER-32, MD-2, MD-4, MD-5, RIPEMD-128, RIPEMD-160,
 RIPEMD-256, RIPEMD-320, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, HAVAL-128,
 HAVAL-160, HAVAL-192, HAVAL-256, TIGER, TIGER-128, TIGER-160, GOST, WHIRLPOOL,
-SNEFRU-128, SNEFRU-256")
+SNEFRU-128, SNEFRU-256.")
     (license gpl2+)))