From patchwork Fri Aug 23 21:30:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "ashish.is--- via Guix-patches\" via" X-Patchwork-Id: 15131 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4EB7217304; Fri, 23 Aug 2019 22:31:19 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 02276172F4 for ; Fri, 23 Aug 2019 22:31:19 +0100 (BST) Received: from localhost ([::1]:34296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i1H9S-0001wd-Ct for patchwork@mira.cbaines.net; Fri, 23 Aug 2019 17:31:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35359) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i1H9E-0001wK-2e for guix-patches@gnu.org; Fri, 23 Aug 2019 17:31:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i1H9C-0006Ab-RK for guix-patches@gnu.org; Fri, 23 Aug 2019 17:31:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60745) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i1H9C-0006AU-O7 for guix-patches@gnu.org; Fri, 23 Aug 2019 17:31:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i1H9C-0003yF-IW for guix-patches@gnu.org; Fri, 23 Aug 2019 17:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#37166] [PATCH 1/2] gnu: Add jbigkit. References: <877e73shhy.fsf@nckx> In-Reply-To: <877e73shhy.fsf@nckx> Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 Aug 2019 21:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37166 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 37166@debbugs.gnu.org Received: via spool by 37166-submit@debbugs.gnu.org id=B37166.156659583815224 (code B ref 37166); Fri, 23 Aug 2019 21:31:02 +0000 Received: (at 37166) by debbugs.gnu.org; 23 Aug 2019 21:30:38 +0000 Received: from localhost ([127.0.0.1]:41331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i1H8n-0003xN-HI for submit@debbugs.gnu.org; Fri, 23 Aug 2019 17:30:38 -0400 Received: from tobias.gr ([80.241.217.52]:52190) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i1H8i-0003xA-5u for 37166@debbugs.gnu.org; Fri, 23 Aug 2019 17:30:33 -0400 Received: by tobias.gr (OpenSMTPD) with ESMTP id cd8b0607 for <37166@debbugs.gnu.org>; Fri, 23 Aug 2019 21:30:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=2018; i=me@tobias.gr; bh=0kSItHFou oeL4oQzoJmp00CP0ZcQ4t5OqCxGCeE2y8c=; b=gKhTo3ikT55cS/ga5GDkQbAxT 4OoXJOkLxcOZeJH4HB4IexQtBkIqPalNb2uF0H2805mbPcwgNmT0djDK0T/Gfc/Q 5nGv0lSQNUcReQ4G1QQhNlIVUGhRKJFZX32sDaPNAabn6K6gpgjVlRPuxX+bXWY5 PzbF9rohj7uYef0PB42WclhNpa6jnyPd7avI+ctOqXRbqtBDBWV7Df6s2brI3nEQ uE1okQC8RTQJQj5jCTH0BxOdojFqbbCjB2c6IkSBivJ4WqDsTBerKOnusbWNs+RI Ibo2DbQ8D9EZI9RNZnkFlPW759e2W/FNNM9PmrJtuJWOS8rmRDWMUxOF6Gkkw== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 765b7497 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <37166@debbugs.gnu.org>; Fri, 23 Aug 2019 21:30:30 +0000 (UTC) Date: Fri, 23 Aug 2019 23:30:23 +0200 Message-Id: <20190823213024.3250-1-me@tobias.gr> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Tobias Geerinckx-Rice via Guix-patches X-Patchwork-Original-From: Tobias Geerinckx-Rice via Guix-patches via From: "ashish.is--- via Guix-patches\" via" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/image.scm (jbigkit): New public variable. --- gnu/packages/image.scm | 75 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 5f3cf0ac2c..670aeff85a 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -643,6 +643,81 @@ work.") (home-page "https://jbig2dec.com") (license license:gpl2+))) +(define-public jbigkit + (package + (name "jbigkit") + (version "2.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.cl.cam.ac.uk/~mgk25/jbigkit/" + "download/jbigkit-" version ".tar.gz")) + (sha256 + (base32 "0cnrcdr1dwp7h7m0a56qw09bv08krb37mpf7cml5sjdgpyv0cwfy")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove files without clear licence information. + (for-each delete-file-recursively + (list "contrib" "examples")) + #t)))) + (build-system gnu-build-system) + (outputs (list "out" "pbmtools")) + (arguments + `(#:modules ((srfi srfi-26) + ,@%gnu-build-system-modules) + #:phases + (modify-phases %standard-phases + (delete 'configure) ; no configure script + (replace 'install ; no ‘make install’ target + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (include (string-append out "/include"))) + (with-directory-excursion "libjbig" + (for-each (cut install-file <> include) + (find-files "." "\\.h$")) + (for-each (cut install-file <> lib) + (find-files "." "\\.a$"))) + #t))) + (add-after 'install 'install-pbmtools + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "pbmtools")) + (bin (string-append out "/bin")) + (man1 (string-append out "/share/man/man1")) + (man5 (string-append out "/share/man/man5"))) + (with-directory-excursion "pbmtools" + (for-each (cut install-file <> bin) + (list "jbgtopbm" "jbgtopbm85" + "pbmtojbg" "pbmtojbg85")) + + (for-each (cut install-file <> man1) + (find-files "." "\\.1$")) + (for-each (cut install-file <> man5) + (find-files "." "\\.5$")) + #t))))) + #:test-target "test" + #:tests? #f)) ; tests depend on examples/ + (home-page "https://www.cl.cam.ac.uk/~mgk25/jbigkit/") + (synopsis "Lossless compression for bi-level high-resolution images") + (description + "JBIG-KIT implements the JBIG1 data compression standard (ITU-T T.82 and +ISO/IEC 11544:1993), designed for bi-level (one bit per pixel) images such as +black-and-white scanned documents. It is widely used in fax products, printer +firmware and drivers, document management systems, and imaging software. + +This package provides a static C library of (de)compression functions and some +simple command-line converters similar to those provided by netpbm. + +Two JBIG1 variants are available. One (@file{jbig.c}) implements nearly all +options of the standard but has to keep the full uncompressed image in memory. +The other (@file{jbig85.c}) implements just the ITU-T T.85 profile, with +memory management optimized for embedded and fax applications. It buffers +only a few lines of the uncompressed image in memory and is able to stream +images of initially unknown height.") + (license (list license:isc ; pbmtools/p?m.5 + license:gpl2+)))) ; the rest + (define-public openjpeg (package (name "openjpeg")