diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2026-06-04 13:07:57 +0300 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2026-06-04 13:08:15 +0300 |
| commit | 58595b7dec1307da0107bdc17011d7c8ef19aefd (patch) | |
| tree | 7eddfd2accfcc029b3d615c9f413d595619ab7b0 /gnu/packages/compression.scm | |
| parent | 6ac23f47e2b2ecc85ec99b7dc6c4255c7177e30c (diff) | |
gnu: Add BZip3.
* gnu/packages/compression.scm (bzip3): New variable.
Change-Id: I4705cea164755623eca6d06ee20815c4ba36b934
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Diffstat (limited to 'gnu/packages/compression.scm')
| -rw-r--r-- | gnu/packages/compression.scm | 76 |
1 files changed, 75 insertions, 1 deletions
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 71c425ac30b..7281d5cb7fa 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm | |||
| @@ -83,6 +83,7 @@ | |||
| 83 | #:use-module (gnu packages bash) | 83 | #:use-module (gnu packages bash) |
| 84 | #:use-module (gnu packages benchmark) | 84 | #:use-module (gnu packages benchmark) |
| 85 | #:use-module (gnu packages boost) | 85 | #:use-module (gnu packages boost) |
| 86 | #:use-module (gnu packages c) | ||
| 86 | #:use-module (gnu packages check) | 87 | #:use-module (gnu packages check) |
| 87 | #:use-module (gnu packages cpp) | 88 | #:use-module (gnu packages cpp) |
| 88 | #:use-module (gnu packages crypto) | 89 | #:use-module (gnu packages crypto) |
| @@ -97,8 +98,8 @@ | |||
| 97 | #:use-module (gnu packages graphics) | 98 | #:use-module (gnu packages graphics) |
| 98 | #:use-module (gnu packages gtk) | 99 | #:use-module (gnu packages gtk) |
| 99 | #:use-module (gnu packages java) | 100 | #:use-module (gnu packages java) |
| 100 | #:use-module (gnu packages llvm) | ||
| 101 | #:use-module (gnu packages linux) | 101 | #:use-module (gnu packages linux) |
| 102 | #:use-module (gnu packages llvm) | ||
| 102 | #:use-module (gnu packages man) | 103 | #:use-module (gnu packages man) |
| 103 | #:use-module (gnu packages maths) | 104 | #:use-module (gnu packages maths) |
| 104 | #:use-module (gnu packages perl) | 105 | #:use-module (gnu packages perl) |
| @@ -552,6 +553,79 @@ compressed with pbzip2 can be decompressed with bzip2).") | |||
| 552 | formats, including zstd, xz, gzip, and bgzf.") | 553 | formats, including zstd, xz, gzip, and bgzf.") |
| 553 | (license license:expat))) | 554 | (license license:expat))) |
| 554 | 555 | ||
| 556 | (define-public bzip3 | ||
| 557 | (package | ||
| 558 | (name "bzip3") | ||
| 559 | (version "1.5.3") | ||
| 560 | (source | ||
| 561 | (origin | ||
| 562 | (method git-fetch) | ||
| 563 | (uri (git-reference | ||
| 564 | (url "https://github.com/iczelia/bzip3") | ||
| 565 | (commit version))) | ||
| 566 | (file-name (git-file-name name version)) | ||
| 567 | (sha256 | ||
| 568 | (base32 "1jbnx381jq3myr3p96caf7dwl9k886rf4z2bfq4w1iid8wqjxsj8")) | ||
| 569 | (modules '((guix build utils))) | ||
| 570 | (snippet | ||
| 571 | #~(begin | ||
| 572 | ;; unbundle libsais | ||
| 573 | (delete-file "include/libsais.h") | ||
| 574 | (delete-file-recursively "3rdparty/") | ||
| 575 | (substitute* "src/libbz3.c" | ||
| 576 | (("^#include \"libsais.h\".*$" include-libsais) | ||
| 577 | (string-append "#include \"common.h\"\n" include-libsais))) | ||
| 578 | (substitute* "CMakeLists.txt" | ||
| 579 | (("^set\\(PACKAGE_VERSION.*$" line) | ||
| 580 | (string-append line "find_package(libsais REQUIRED)\n" | ||
| 581 | "find_package(OpenMP REQUIRED)\n")) | ||
| 582 | (("^target_sources\\(bz3.*$" line) | ||
| 583 | (string-append line | ||
| 584 | "target_link_libraries(bz3 PRIVATE OpenMP::OpenMP_C libsais) | ||
| 585 | ")) | ||
| 586 | (("(target_link_libraries\\(bz3) (Threads::Threads\\))" _ prefix | ||
| 587 | suffix) | ||
| 588 | (string-append prefix " PRIVATE " suffix))) | ||
| 589 | ;; set MAN_DATE | ||
| 590 | (let ((release-date "13 August 2025")) | ||
| 591 | (substitute* "CMakeLists.txt" | ||
| 592 | (("set\\(MAN_DATE.*\\)") | ||
| 593 | (string-append "set(MAN_DATE \"" release-date "\")")))) | ||
| 594 | ;; fix out-of-source build | ||
| 595 | ;; see https://github.com/iczelia/bzip3/commit/2b9b3b504bdfe16e8cc08addd8f7931f66c9cd59 | ||
| 596 | (substitute* "CMakeLists.txt" | ||
| 597 | (("(if\\(EXISTS\\s)\\$\\{BZIP3_MAN\\}" _ prefix) | ||
| 598 | (string-append prefix | ||
| 599 | "${CMAKE_CURRENT_SOURCE_DIR}/${BZIP3_MAN}")) | ||
| 600 | (("(configure_file\\()\\$\\{BZIP3_MAN\\}" _ prefix) | ||
| 601 | (string-append prefix | ||
| 602 | "${CMAKE_CURRENT_SOURCE_DIR}/${BZIP3_MAN}"))) | ||
| 603 | ;; fix shared-object version | ||
| 604 | ;; see https://github.com/iczelia/bzip3/commit/3ac85a6c4ee44573f6d8932d9d5d1bc3351f81db | ||
| 605 | (substitute* "CMakeLists.txt" | ||
| 606 | (("(SOVERSION\\s\").*(\")" _ prefix suffix) | ||
| 607 | (string-append prefix "1" suffix)) | ||
| 608 | (("(VERSION\\s\").*(\"\\))" _ prefix suffix) | ||
| 609 | (string-append prefix "1.0.0" suffix))))))) | ||
| 610 | (build-system cmake-build-system) | ||
| 611 | (arguments | ||
| 612 | (list | ||
| 613 | ;; no tests | ||
| 614 | #:tests? #f)) | ||
| 615 | (inputs (list bash-minimal libsais)) | ||
| 616 | (home-page "https://github.com/iczelia/bzip3") | ||
| 617 | (synopsis "Text compression program") | ||
| 618 | (description | ||
| 619 | "BZip3 is a spiritual successor to BZip2. Features higher compression | ||
| 620 | ratios and better performance thanks to a order-0 context mixing entropy coder, | ||
| 621 | a fast Burrows-Wheeler transform code making use of suffix arrays and a RLE with | ||
| 622 | Lempel Ziv+Prediction pass based on LZ77-style string matching and PPM-style | ||
| 623 | context modeling. | ||
| 624 | |||
| 625 | Like its ancestor, BZip3 excels at compressing text or code.") | ||
| 626 | (properties '((tunable? . #t))) | ||
| 627 | (license license:lgpl3))) | ||
| 628 | |||
| 555 | (define-public xz | 629 | (define-public xz |
| 556 | (package | 630 | (package |
| 557 | (name "xz") | 631 | (name "xz") |
