guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/05: gnu: lbzip2: Update to 2.5-0.b6dc48a.


From: guix-commits
Subject: 04/05: gnu: lbzip2: Update to 2.5-0.b6dc48a.
Date: Thu, 16 Jul 2020 21:05:08 -0400 (EDT)

nckx pushed a commit to branch master
in repository guix.

commit 7bb7bb5c9d6c26c80a934f6895bb4deb05947c53
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Fri Jul 17 00:06:20 2020 +0200

    gnu: lbzip2: Update to 2.5-0.b6dc48a.
    
    * gnu/packages/compression.scm (lbzip2): Update to 2.5-0.b6dc48a.
    [source]: Use GIT-FETCH and GIT-FILE-NAME.  Remove snippet.
    [arguments]: Add ‘unpack-gnulib’ and custom bootstrap phase.
    [native-inputs]: Add autoconf, automake, gnulib, and perl.
    [home-page]: Use source repository.
---
 gnu/packages/compression.scm | 81 ++++++++++++++++++++++++++++----------------
 1 file changed, 52 insertions(+), 29 deletions(-)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 8c6b9f3..e45b86b 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -380,40 +380,63 @@ decompression.")
     (home-page 
"https://web.archive.org/web/20180801004107/http://www.bzip.org/";)))
 
 (define-public lbzip2
-  (package
-    (name "lbzip2")
-    (version "2.5")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "http://archive.lbzip2.org/lbzip2-";
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "1sahaqc5bw4i0iyri05syfza4ncf5cml89an033fspn97klmxis6"))
-             (modules '((guix build utils)))
-             (snippet
-              '(begin
-                 (substitute* (find-files "lib" "\\.c$")
-                   (("#if defined _IO_ftrylockfile")
-                    "#if defined _IO_EOF_SEEN"))
-                 (substitute* "lib/stdio-impl.h"
-                   (("^/\\* BSD stdio derived implementations")
-                    (string-append "#if !defined _IO_IN_BACKUP && defined 
_IO_EOF_SEEN\n"
-                                   "# define _IO_IN_BACKUP 0x100\n"
-                                   "#endif\n\n"
-                                   "/* BSD stdio derived implementations")))
-                 #t))))
-    (build-system gnu-build-system)
-    (synopsis "Parallel bzip2 compression utility")
-    (description
-     "lbzip2 is a multi-threaded compression utility with support for the
+  ;; The last 2.5 release is 4 years behind the newest commit (from 2018) and
+  ;; may create files that can't even be decompressed by newer bzip2 versions.
+  (let ((commit "b6dc48a7b9bfe6b340ed1f6d72133608ad57144b")
+        (revision "0"))
+    (package
+      (name "lbzip2")
+      (version (git-version "2.5" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/kjn/lbzip2";)
+               (commit commit)))
+         (sha256
+          (base32 "140xp00dmjsr6c3dwb4dwf0pzlgf159igri321inbinsjiclkngy"))
+         (file-name (git-file-name name version))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'unpack-gnulib
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((gnulib (assoc-ref inputs "gnulib")))
+                 (copy-recursively gnulib "lib")
+                 (setenv "PATH" (string-append "lib:" (getenv "PATH")))
+                 #t)))
+           (delete 'bootstrap)          ; gnulib still has unpatched shebangs
+           (add-after 'patch-source-shebangs 'bootstrap
+             (lambda _
+               (invoke "sh" "build-aux/autogen.sh")
+               #t)))))
+      (native-inputs
+       `(("autoconf" ,autoconf)
+         ("automake" ,automake)
+         ("gnulib"
+          ,(let ((commit "2d431ac35c4943a3655c07ba91870d2323321b43"))
+             (origin
+               (method git-fetch)
+               (uri (git-reference
+                     (url "git://git.savannah.gnu.org/gnulib.git")
+                     (commit commit)))
+               (sha256
+                (base32 
"1f0xr4w89bqvhzsfcflcagdixidrk41k00k7kpr91w9lazfis4kf"))
+               (file-name (git-file-name "gnulib" commit)))))
+         ("perl" ,perl)))
+      (synopsis "Parallel bzip2 compression utility")
+      (description
+       "lbzip2 is a multi-threaded compression utility with support for the
 bzip2 compressed file format.  lbzip2 can process standard bz2 files in
 parallel.  It uses POSIX threading model (pthreads), which allows it to take
 full advantage of symmetric multiprocessing (SMP) systems.  It has been proven
 to scale linearly, even to over one hundred processor cores.  lbzip2 is fully
 compatible with bzip2 – both at file format and command line level.")
-    (home-page "http://www.lbzip2.org/";)
-    (license license:gpl3+)))
+      ;; lbzip2.org now looks fishy.  There is no source code to be found.
+      ;; Reported upstream: <https://github.com/kjn/lbzip2/issues/26>.
+      (home-page "https://github.com/kjn/lbzip2";)
+      (license license:gpl3+))))
 
 (define-public pbzip2
   (package



reply via email to

[Prev in Thread] Current Thread [Next in Thread]