diff options
author | Z572 <873216071@qq.com> | 2021-07-16 00:03:40 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-07-16 00:06:05 -0400 |
commit | 4094d12df13859b07c10a9664c4d6797ddbcbc2e (patch) | |
tree | 9f0ba7eca09953304497066b7dcf5adc83b87a60 /gnu/packages | |
parent | dd98685356377e61e0997c00a233d8467977833f (diff) | |
download | guix-patches-4094d12df13859b07c10a9664c4d6797ddbcbc2e.tar guix-patches-4094d12df13859b07c10a9664c4d6797ddbcbc2e.tar.gz |
gnu: Add ark.
* gnu/packages/kde-utils.scm (ark): New variable.
* gnu/packages/patches/ark-skip-xar-test.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/kde-utils.scm | 80 | ||||
-rw-r--r-- | gnu/packages/patches/ark-skip-xar-test.patch | 44 |
2 files changed, 124 insertions, 0 deletions
diff --git a/gnu/packages/kde-utils.scm b/gnu/packages/kde-utils.scm index 9b31ac2d9f..b5638876d5 100644 --- a/gnu/packages/kde-utils.scm +++ b/gnu/packages/kde-utils.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2021 Z572 <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,6 +23,9 @@ #:use-module (guix download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) + #:use-module (gnu packages) + #:use-module (gnu packages backup) + #:use-module (gnu packages cmake) #:use-module (gnu packages compression) #:use-module (gnu packages gnome) #:use-module (gnu packages imagemagick) @@ -33,6 +37,82 @@ #:use-module (gnu packages samba) #:use-module (gnu packages xorg)) +(define-public ark + (package + (name "ark") + (version "20.04.1") + (source (origin + (method url-fetch) + (uri (string-append "mirror://kde/stable/release-service/" version + "/src/ark-" version ".tar.xz")) + (sha256 + (base32 + "0g5bfa1lc7mhrc2ngd4ldf33dpwr7gqrj95kp897pf632wwj23iw")) + ;; The libarchive package in Guix does not support + ;; xar; disable related tests. + (patches (search-patches "ark-skip-xar-test.patch")))) + (build-system qt-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'start-xserver + ;; adddialogtest requires DISPLAY. + (lambda* (#:key inputs #:allow-other-keys) + (let ((xorg-server (assoc-ref inputs "xorg-server"))) + (setenv "HOME" (getcwd)) + (system (format #f "~a/bin/Xvfb :1 &" xorg-server)) + (setenv "DISPLAY" ":1")))) + (add-after 'install 'wrap-executable + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lrzip (assoc-ref inputs "lrzip")) + (lzop (assoc-ref inputs "lzop")) + (p7zip (assoc-ref inputs "p7zip")) + (unzip (assoc-ref inputs "unzip")) + (zip (assoc-ref inputs "zip")) + (zstd (assoc-ref inputs "zstd"))) + (wrap-program (string-append out "/bin/ark") + `("PATH" suffix + ,(map (lambda (p) + (string-append p "/bin")) + (list lrzip lzop p7zip unzip zip zstd)))))))))) + (native-inputs + `(("extra-cmake-modules" ,extra-cmake-modules) + ("pkg-config" ,pkg-config) + ("kdoctools" ,kdoctools) + ("xorg-server" ,xorg-server))) + (inputs + `(("breeze-icons" ,breeze-icons) + ("karchive" ,karchive) + ("kconfig" ,kconfig) + ("kcrash" ,kcrash) + ("kdbusaddons" ,kdbusaddons) + ("khtml" ,khtml) + ("ki18n" ,ki18n) + ("kio" ,kio) + ("kitemmodels" ,kitemmodels) + ("kparts" ,kparts) + ("kpty" ,kpty) + ("kservice" ,kservice) + ("kwidgetsaddons" ,kwidgetsaddons) + ("libarchive" ,libarchive) + ("libzip" ,libzip) + ("qtbase" ,qtbase-5) + ("zlib" ,zlib) + ;; Command line tools used by Ark. + ("lrzip" ,lrzip) + ("lzop" ,lzop) + ("p7zip" ,p7zip) + ("unzip" ,unzip) + ("zip" ,zip) + ("zstd" ,zstd))) + (home-page "https://apps.kde.org/en/ark") + (synopsis "Graphical archiving tool") + (description "Ark is a graphical file compression/decompression utility +with support for multiple formats, including tar, gzip, bzip2, rar and zip, as +well as CD-ROM images.") + (license license:gpl2+))) + (define-public kate (package (name "kate") diff --git a/gnu/packages/patches/ark-skip-xar-test.patch b/gnu/packages/patches/ark-skip-xar-test.patch new file mode 100644 index 0000000000..525201997b --- /dev/null +++ b/gnu/packages/patches/ark-skip-xar-test.patch @@ -0,0 +1,44 @@ +Guix libarchive no support xar. + +--- ark-20.04.1.orig/autotests/kerfuffle/loadtest.cpp 2020-12-23 08:46:15.780782601 +0800 ++++ ark-20.04.1/autotests/kerfuffle/loadtest.cpp 2020-12-23 11:13:17.101724042 +0800 +@@ -181,13 +181,6 @@ + qDebug() << "lz4 executable not found in path. Skipping lz4 test."; + } + +- QTest::newRow("xar archive") +- << QFINDTESTDATA("data/simplearchive.xar") +- << QStringLiteral("simplearchive") +- << true << false << false << false << false << 0 << Archive::Unencrypted +- << QStringLiteral("simplearchive") +- << QString(); +- + QTest::newRow("mimetype child of application/zip") + << QFINDTESTDATA("data/test.odt") + << QStringLiteral("test") +--- ark-20.04.1.orig/autotests/kerfuffle/extracttest.cpp 2020-12-23 08:46:15.780782601 +0800 ++++ ark-20.04.1/autotests/kerfuffle/extracttest.cpp 2020-12-23 11:14:02.801809620 +0800 +@@ -350,23 +350,6 @@ + qDebug() << "lz4 executable not found in path. Skipping lz4 test."; + } + +- archivePath = QFINDTESTDATA("data/simplearchive.xar"); +- QTest::newRow("extract selected entries from a xar archive without path") +- << archivePath +- << QVector<Archive::Entry*> { +- new Archive::Entry(this, QStringLiteral("dir1/file11.txt"), QString()), +- new Archive::Entry(this, QStringLiteral("file4.txt"), QString()) +- } +- << optionsNoPaths +- << 2; +- +- archivePath = QFINDTESTDATA("data/simplearchive.xar"); +- QTest::newRow("extract all entries from a xar archive with path") +- << archivePath +- << QVector<Archive::Entry*>() +- << optionsPreservePaths +- << 6; +- + archivePath = QFINDTESTDATA("data/hello-1.0-x86_64.AppImage"); + QTest::newRow("extract all entries from an AppImage with path") + << archivePath |