From aad5d8a92d95f831ead90ec213f2b28c56dfeb79 Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Mon, 22 Aug 2016 19:54:07 -0400 Subject: [PATCH] gnu: Add p7zip. * gnu/packages/compression.scm (p7zip): New variable. * gnu/packages/patches/remove-unused-p7zip-code.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/packages/compression.scm | 47 +++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index c6820c1..b8df41c 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -915,10 +915,11 @@ for most inputs, but the resulting compressed files are anywhere from 20% to '(begin ;; Remove non-free source files (for-each delete-file - (find-files "CPP/7zip/Compress/Rar*") - (find-files "CPP/7zip/Crypto/Rar*") - (find-files "DOC/unRarLicense.txt") - (find-files "Utils/file_Codecs_Rar_so.py")) + (append + (find-files "CPP/7zip/Compress" "Rar.*") + (find-files "CPP/7zip/Crypto" "Rar.*") + (find-files "DOC/unRarLicense.txt") + (find-files "Utils/file_Codecs_Rar_so.py"))) (delete-file-recursively "CPP/7zip/Archive/Rar") (delete-file-recursively "CPP/7zip/Compress/Rar") #t)) @@ -927,33 +928,29 @@ for most inputs, but the resulting compressed files are anywhere from 20% to (arguments `(#:make-flags (list - ("all3") - (let ((system ,(or (%current-target-system) - (%current-system)))) - (string-append "-f " - (cond - ((string-prefix? "x86_64" system) - "makefile.linux_amd64_asm") - ((string-prefix? "i686" system) - "makefile.linux_x86_asm_gcc_4.X") - (else - "makefile.linux_any_cpu_gcc_4.X"))))) + (string-append "DEST_HOME=" (assoc-ref %outputs "out")) + "all3") #:phases (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key system outputs #:allow-other-keys) + (zero? (system* "cp" + (let ((system ,(or (%current-target-system) + (%current-system)))) + + (cond + ((string-prefix? "x86_64" system) + "makefile.linux_amd64_asm") + ((string-prefix? "i686" system) + "makefile.linux_x86_asm_gcc_4.X") + (else + "makefile.linux_any_cpu_gcc_4.X"))) + "makefile.machine")))) (replace 'check (lambda _ (and (zero? (system* "make" "test")) (zero? (system* "make" "test_7z")) - (zero? (system* "make" "test_7zr"))))) - ;; without calling install.sh manually, install.sh is passed arguments - ;; containing the wrong installation directories (see line 116 of - ;; makefile.common) - (replace 'install - (lambda* (#:key system outputs #:allow-other-keys) - ;; fix install directory - (substitute* "install.sh" - (("/usr/local") (assoc-ref outputs "out"))) - #t))))) + (zero? (system* "make" "test_7zr")))))))) (inputs `(,@(cond ((string-prefix? "x86_64" (or (%current-target-system) (%current-system))) -- 2.9.3