guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

15/28: gnu: Add r-qpdf.


From: guix-commits
Subject: 15/28: gnu: Add r-qpdf.
Date: Mon, 15 Mar 2021 05:55:30 -0400 (EDT)

lbraun pushed a commit to branch master
in repository guix.

commit 52c70fb66ea82c8c4bbc555c361a42ebd839941c
Author: Lars-Dominik Braun <ldb@leibniz-psychology.org>
AuthorDate: Mon Mar 15 10:19:00 2021 +0100

    gnu: Add r-qpdf.
    
    Cannot add to (gnu packages pdf) due to circular module dependency.
    
    * gnu/packages/cran.scm (r-qpdf): New variable.
---
 gnu/packages/cran.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index b6ee331..877396b 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -91,6 +91,7 @@
   #:use-module (gnu packages networking)
   #:use-module (gnu packages node)
   #:use-module (gnu packages pcre)
+  #:use-module (gnu packages pdf)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)  ;libsndfile
@@ -27668,3 +27669,49 @@ user streams, and to parse the output into data 
frames.")
       "Import @dfn{OpenDocument Spreadsheet} (ODS) into R as a data frame.
 Also support writing data frame into ODS file.")
     (license license:gpl3)))
+
+(define-public r-qpdf
+  (package
+    (name "r-qpdf")
+    (version "1.1")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (cran-uri "qpdf" version))
+      (sha256
+       (base32
+        "03lnfncw8qd1fwfyqh1mjvnsjr3b63wxbah0wp5g7z7gba90dwbi"))
+      (modules '((guix build utils)))
+      (snippet
+       '(begin
+           ;; unvendor libqpdf
+          (delete-file-recursively "src/libqpdf")
+          (delete-file-recursively "src/include/qpdf")
+          #t))))
+    (properties `((upstream-name . "qpdf")))
+    (build-system r-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'configure
+           (lambda _
+             (setenv "EXTERNAL_QPDF" "1")
+             #t)))))
+    (inputs
+      `(("zlib" ,zlib)
+        ("qpdf" ,qpdf)))
+    (propagated-inputs
+      `(("r-askpass" ,r-askpass)
+        ("r-curl" ,r-curl)
+        ("r-rcpp" ,r-rcpp)))
+    (native-inputs `(("pkg-config" ,pkg-config)))
+    (home-page "https://github.com/ropensci/qpdf";)
+    (synopsis
+      "Split, Combine and Compress PDF Files")
+    (description
+      "Content-preserving transformations transformations of PDF files such as
+split, combine, and compress.  This package interfaces directly to the
+@code{qpdf} C++ API and does not require any command line utilities.  Note that
+@code{qpdf} does not read actual content from PDF files: to extract text and
+data you need the @code{pdftools} package.")
+    (license license:asl2.0)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]