unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#31487] [PATCH] gnu: Add upx.
@ 2018-05-17 22:51 Pierre Neidhardt
  2018-05-18  6:46 ` Pierre Neidhardt
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Pierre Neidhardt @ 2018-05-17 22:51 UTC (permalink / raw)
  To: 31487

* 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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-06-16 21:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-17 22:51 [bug#31487] [PATCH] gnu: Add upx Pierre Neidhardt
2018-05-18  6:46 ` Pierre Neidhardt
2018-05-26 20:14 ` Ludovic Courtès
2018-05-27 13:46   ` Pierre Neidhardt
2018-05-28  7:55     ` Ludovic Courtès
2018-05-29  6:42       ` Pierre Neidhardt
2018-05-29 13:27         ` Ludovic Courtès
2018-06-15  7:12           ` Ludovic Courtès
2018-06-16 14:58             ` Pierre Neidhardt
2018-06-16 19:15               ` Pierre Neidhardt
2018-06-16 14:54 ` [bug#31487] [PATCH] gnu: upx: Fix CVE-2017-15056 Pierre Neidhardt
2018-06-16 21:57   ` bug#31487: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).