From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJRkh-00036d-6j for guix-patches@gnu.org; Thu, 17 May 2018 18:52:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJRkg-0007KX-2B for guix-patches@gnu.org; Thu, 17 May 2018 18:52:03 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:59265) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fJRkf-0007KN-UZ for guix-patches@gnu.org; Thu, 17 May 2018 18:52:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fJRkf-0004wG-OU for guix-patches@gnu.org; Thu, 17 May 2018 18:52:01 -0400 Subject: [bug#31487] [PATCH] gnu: Add upx. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJRjw-0002jO-VD for guix-patches@gnu.org; Thu, 17 May 2018 18:51:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJRjv-00077u-OG for guix-patches@gnu.org; Thu, 17 May 2018 18:51:17 -0400 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:36705) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fJRjv-00077a-GQ for guix-patches@gnu.org; Thu, 17 May 2018 18:51:15 -0400 Received: by mail-wm0-x232.google.com with SMTP id n10-v6so11777246wmc.1 for ; Thu, 17 May 2018 15:51:15 -0700 (PDT) Received: from mimimi.home (2a01cb040a37a0005adf9a0845f647b3.ipv6.abo.wanadoo.fr. [2a01:cb04:a37:a000:5adf:9a08:45f6:47b3]) by smtp.gmail.com with ESMTPSA id 194-v6sm9309464wml.20.2018.05.17.15.51.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 May 2018 15:51:13 -0700 (PDT) From: Pierre Neidhardt Date: Fri, 18 May 2018 00:51:09 +0200 Message-Id: <20180517225109.12033-1-ambrevar@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 31487@debbugs.gnu.org * gnu/packages/compression.scm (ucl): New variable. * gnu/packages/compression.scm (upx): New variable. --- gnu/packages/compression.scm | 73 ++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 562a2bf8b..b0d7cd971 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -2151,3 +2151,76 @@ with @code{deflate} but offers more dense compression. The specification of the Brotli Compressed Data Format is defined in RFC 7932.") (license license:expat))) + +(define-public ucl + (package + (name "ucl") + (version "1.03") + (source (origin + (method url-fetch) + (uri (string-append "http://www.oberhumer.com/opensource/" + name "/download/" name "-" version ".tar.gz")) + (sha256 + (base32 + "0j036lkwsxvm15gr29n8wn07cqq79dswjs9k54939ms5zngjjrdq")))) + (build-system gnu-build-system) + (home-page "http://www.oberhumer.com/opensource/ucl/") + (synopsis "Portable lossless data compression library") + (description "UCL implements a number of compression algorithms that +achieve an excellent compression ratio while allowing *very* fast +decompression. Decompression requires no additional memory. + +UCL is an OpenSource re-implementation of some NRV compression algorithms. + +As compared to LZO, the UCL algorithms achieve a better compression ratio but +decompression is a little bit slower. See below for some rough timings.") + (license license:gpl2))) + +(define-public upx + (package + (name "upx") + (version "3.94") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/upx/upx/releases/download/v" + version "/" name "-" version "-src.tar.xz")) + (sha256 + (base32 + "08anybdliqsbsl6x835iwzljahnm9i7v26icdjkcv33xmk6p5vw1")))) + (build-system gnu-build-system) + (native-inputs `(("zlib" ,zlib) + ("perl" ,perl) + ("ucl" ,ucl))) + (arguments + `(#:make-flags + (list "all" + ;; CHECK_WHITESPACE does not seem to work. + ;; See https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/upx. + "CHECK_WHITESPACE=true") + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'check) + (delete 'install) + (add-before 'build 'patch-exec-bin-sh + (lambda _ + (substitute* (find-files "Makefile") + (("/bin/sh") (which "sh"))) + (substitute* "src/Makefile" + (("/bin/sh") (which "sh"))) + #t)) + (add-after 'build 'install-upx + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (mkdir-p bin) + (copy-file "src/upx.out" (string-append bin "/upx"))) + #t)) + ))) + (home-page "https://upx.github.io/") + (synopsis "The Ultimate Packer for eXecutables") + (description "UPX is an advanced executable file compressor. UPX will +typically reduce the file size of programs and DLLs by around 50%-70%, thus +reducing disk space, network load times, download times and other distribution +and storage costs.") + (license license:gpl2))) -- 2.17.0