From patchwork Tue Aug 16 22:31:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Pierre-Henry_Fr=C3=B6hring?= X-Patchwork-Id: 41714 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 3CFCE27BBEA; Tue, 16 Aug 2022 23:32:17 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 95CEE27BBE9 for ; Tue, 16 Aug 2022 23:32:16 +0100 (BST) Received: from localhost ([::1]:35714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oO56d-0002oD-Oi for patchwork@mira.cbaines.net; Tue, 16 Aug 2022 18:32:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oO56R-0002no-9P for guix-patches@gnu.org; Tue, 16 Aug 2022 18:32:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58833) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oO56P-00054V-UD for guix-patches@gnu.org; Tue, 16 Aug 2022 18:32:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oO56P-0003bS-Md for guix-patches@gnu.org; Tue, 16 Aug 2022 18:32:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57251] [PATCH] gnu: mupdf: Update to 1.20.3. Resent-From: Pierre-Henry =?utf-8?b?RnLDtmhyaW5n?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 16 Aug 2022 22:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57251 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57251@debbugs.gnu.org Cc: Pierre-Henry =?utf-8?b?RnLDtmhyaW5n?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166068909613813 (code B ref -1); Tue, 16 Aug 2022 22:32:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Aug 2022 22:31:36 +0000 Received: from localhost ([127.0.0.1]:48582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oO55z-0003ai-EF for submit@debbugs.gnu.org; Tue, 16 Aug 2022 18:31:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:50502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oO55x-0003aa-7D for submit@debbugs.gnu.org; Tue, 16 Aug 2022 18:31:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oO55x-0002lv-0Q for guix-patches@gnu.org; Tue, 16 Aug 2022 18:31:33 -0400 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]:52617) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oO55u-0004yO-HD for guix-patches@gnu.org; Tue, 16 Aug 2022 18:31:32 -0400 Received: (Authenticated sender: contact@phfrohring.com) by mail.gandi.net (Postfix) with ESMTPSA id 4F400C0007; Tue, 16 Aug 2022 22:31:23 +0000 (UTC) From: Pierre-Henry =?utf-8?b?RnLDtmhyaW5n?= Date: Wed, 17 Aug 2022 00:31:19 +0200 Message-Id: <20220816223119.3026859-1-contact@phfrohring.com> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2001:4b98:dc4:8::226; envelope-from=contact@phfrohring.com; helo=relay6-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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" X-getmail-retrieved-from-mailbox: Patches * Copy/paste is fixed. The build now uses the patched version of freeglut that is included in the thirdparty directory so that copy/paste works. --- gnu/packages/pdf.scm | 127 +++++++++++++++++++++++-------------------- 1 file changed, 69 insertions(+), 58 deletions(-) diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 39266a2822..f21a30e805 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -731,66 +731,77 @@ (define-public python-pydyf (define-public mupdf (package (name "mupdf") - (version "1.19.1") - (source - (origin - (method url-fetch) - (uri (string-append "https://mupdf.com/downloads/archive/" - "mupdf-" version "-source.tar.xz")) - (sha256 - (base32 "0gl0wf16m1cafs20h3v1f4ysf7zlbijjyd6s1r1krwvlzriwdsmm")) - (modules '((guix build utils))) - (snippet - #~(begin - ;; Remove bundled software. - (let* ((keep (list "extract" - "lcms2")) ; different from our lcms2 package - (from "thirdparty") - (kept (string-append from "~temp"))) - (mkdir-p kept) - (for-each (lambda (file) - (rename-file (string-append from "/" file) - (string-append kept "/" file))) - keep) - (delete-file-recursively from) - (rename-file kept from)))))) + (version "1.20.3") + (source (origin + (method url-fetch) + (uri (string-append "https://mupdf.com/downloads/archive/" + "mupdf-" version "-source.tar.lz")) + (sha256 + (base32 + "0s0qclxxdjis04mczgz0fhfpv0j8llk48g82zlfrk0daz0zgcwvg")) + (modules '((guix build utils))) + (snippet #~(begin + (let* ((keep (list "extract" "freeglut" "lcms2")) + (from "thirdparty") + (kept (string-append from "~temp"))) + (mkdir-p kept) + (for-each (lambda (file) + (rename-file (string-append from "/" + file) + (string-append kept "/" + file))) + keep) + (delete-file-recursively from) + (rename-file kept from)))))) (build-system gnu-build-system) - (inputs - (list curl - freeglut - freetype - gumbo-parser - harfbuzz - jbig2dec - libjpeg-turbo - libx11 - libxext - mujs - openjpeg - openssl - zlib)) - (native-inputs - (list pkg-config)) + (inputs (list curl + libxrandr + libxi + freeglut ;for GL/gl.h + freetype + gumbo-parser + harfbuzz + jbig2dec + libjpeg-turbo + libx11 + libxext + mujs + openjpeg + openssl + zlib)) + (native-inputs (list pkg-config)) (arguments - (list - #:tests? #f ; no check target - #:make-flags - #~(list "verbose=yes" - (string-append "CC=" #$(cc-for-target)) - "XCFLAGS=-fpic" - "USE_SYSTEM_LIBS=yes" - "USE_SYSTEM_MUJS=yes" - "shared=yes" - ;; Even with the linkage patch we must fix RUNPATH. - (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib") - (string-append "prefix=" #$output)) - #:phases - #~(modify-phases %standard-phases - (delete 'configure)))) ; no configure script + (list #:tests? #f ;no check target + #:make-flags #~(list "verbose=yes" + (string-append "CC=" + #$(cc-for-target)) + "XCFLAGS=-fpic" + "USE_SYSTEM_FREETYPE=yes" + "USE_SYSTEM_GUMBO=yes" + "USE_SYSTEM_HARFBUZZ=yes" + "USE_SYSTEM_JBIG2DEC=yes" + "USE_SYSTEM_JPEGXR=no # not available" + "USE_SYSTEM_LCMS2=no # lcms2mt is strongly preferred" + "USE_SYSTEM_LIBJPEG=yes" + "USE_SYSTEM_MUJS=no # not available" + "USE_SYSTEM_OPENJPEG=yes" + "USE_SYSTEM_ZLIB=yes" + "USE_SYSTEM_GLUT=no" + "USE_SYSTEM_CURL=yes" + "USE_SYSTEM_LEPTONICA=yes" + "USE_SYSTEM_TESSERACT=yes" + "USE_SYSTEM_MUJS=yes" + "shared=yes" + (string-append "LDFLAGS=-Wl,-rpath=" + #$output "/lib") + (string-append "prefix=" + #$output)) + #:phases #~(modify-phases %standard-phases + (delete 'configure)))) ;no configure script (home-page "https://mupdf.com") (synopsis "Lightweight PDF viewer and toolkit") (description - "MuPDF is a C library that implements a PDF and XPS parsing and + "MuPDF is a C library that implements a PDF and XPS parsing and rendering engine. It is used primarily to render pages into bitmaps, but also provides support for other operations such as searching and listing the table of contents and hyperlinks. @@ -799,9 +810,9 @@ (define-public mupdf line tools for batch rendering @command{pdfdraw}, rewriting files @command{pdfclean}, and examining the file structure @command{pdfshow}.") (license (list license:agpl3+ - license:bsd-3 ; resources/cmaps - license:x11 ; thirdparty/lcms2 - license:silofl1.1 ; resources/fonts/{han,noto,sil,urw} + license:bsd-3 ;resources/cmaps + license:x11 ;thirdparty/lcms2 + license:silofl1.1 ;resources/fonts/{han,noto,sil,urw} license:asl2.0)))) ; resources/fonts/droid (define-public qpdf