From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoaC8-0005Jl-Vr for guix-patches@gnu.org; Wed, 21 Feb 2018 14:37:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoaBR-0007kY-PC for guix-patches@gnu.org; Wed, 21 Feb 2018 14:36:48 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:47007) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eoaBR-0007js-84 for guix-patches@gnu.org; Wed, 21 Feb 2018 14:36:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eoaBQ-0008Sj-Uu for guix-patches@gnu.org; Wed, 21 Feb 2018 14:36:05 -0500 Subject: [bug#30570] [PATCH 13/16] gnu: Add google-brotli. Resent-Message-ID: From: Leo Famulari Date: Wed, 21 Feb 2018 14:35:17 -0500 Message-Id: <9b91d15c1eeba4563d162e8f223f0d93b624bfa3.1519241713.git.leo@famulari.name> In-Reply-To: <7597f2a5e819b04be0bd24566b4fcd7950abb5c1.1519241713.git.leo@famulari.name> References: <7597f2a5e819b04be0bd24566b4fcd7950abb5c1.1519241713.git.leo@famulari.name> MIME-Version: 1.0 In-Reply-To: <7597f2a5e819b04be0bd24566b4fcd7950abb5c1.1519241713.git.leo@famulari.name> References: <7597f2a5e819b04be0bd24566b4fcd7950abb5c1.1519241713.git.leo@famulari.name> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: 30570@debbugs.gnu.org * gnu/packages/compression.scm (google-brotli): New variable. --- gnu/packages/compression.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index f25c4bba3..f4a3a610c 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -21,6 +21,7 @@ ;;; Copyright © 2017 Petter ;;; Copyright © 2017 Julien Lepiller ;;; Copyright © 2018 Rutger Helling +;;; Copyright © 2018 Joshua Sierles, Nextjournal ;;; ;;; This file is part of GNU Guix. ;;; @@ -2101,3 +2102,46 @@ single-member files which can't be decompressed in parallel.") (description "innoextract allows extracting Inno Setup installers under non-Windows systems without running the actual installer using wine.") (license license:zlib))) + +(define-public google-brotli + (package + (name "google-brotli") + (version "1.0.2") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/google/brotli/archive/v" + version ".tar.gz")) + (sha256 + (base32 + "08kl9gww2058p1p7j9xqmcmrabcfihhj3fq984d7fi3bchb2mky2")))) + (build-system cmake-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'install 'rename-static-libraries + ;; The build tools put a 'static' suffix on the static libraries, but + ;; other applications don't know how to find these. + (let ((lib (string-append (assoc-ref %outputs "out") "/lib/"))) + (lambda _ + (rename-file (string-append lib "libbrotlicommon-static.a") + (string-append lib "libbrotlicommon.a")) + (rename-file (string-append lib "libbrotlidec-static.a") + (string-append lib "libbrotlidec.a")) + (rename-file (string-append lib "libbrotlienc-static.a") + (string-append lib "libbrotlienc.a")) + #t)))) + #:configure-flags + (list ;; Defaults to "lib64" on 64-bit archs. + (string-append "-DCMAKE_INSTALL_LIBDIR=" + (assoc-ref %outputs "out") "/lib")))) + (home-page "https://github.com/google/brotli") + (synopsis "General-purpose lossless compression") + (description "This package provides the reference implementation of Brotli, +a generic-purpose lossless compression algorithm that compresses data using a +combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd +order context modeling, with a compression ratio comparable to the best +currently available general-purpose compression methods. It is similar in speed +with @code{deflate} but offers more dense compression. + +The specification of the Brotli Compressed Data Format is defined in RFC 7932.") + (license license:expat))) -- 2.16.1