This is an automated email from the git hooks/post-receive script.

guix_mirror_bot pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new c87d7e98a4b gnu: pdfgrep: Use git source.  Fix cross build.
c87d7e98a4b is described below

commit c87d7e98a4bcc00457537950f9e273e68711bdb5
Author: Herman Rimm <[email protected]>
AuthorDate: Sun Mar 16 19:23:26 2025 +0100

    gnu: pdfgrep: Use git source.  Fix cross build.
    
    * gnu/packages/pdf.scm (pdfgrep)[source]: Fetch GitLab repository.
    [arguments]: Add --enable-doc configure flag.  If cross compiling, force
    malloc and realloc presence.
    [native-inputs]: Add asciidoc, autoconf, automake, and libgcrypt.
    [description]: Limit to 72 columns; tweak.
    
    Merges guix/guix!10839
    
    Modified-by: Cayetano Santos <[email protected]>
    Signed-off-by: Cayetano Santos <[email protected]>
---
 gnu/packages/pdf.scm | 36 ++++++++++++++++++++++++++----------
 1 file changed, 26 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index e49fa66157a..7f458d61cd9 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -33,6 +33,7 @@
 ;;; Copyright © 2024 Janneke Nieuwenhuizen <[email protected]>
 ;;; Copyright © 2026 Daniel Littlewood <[email protected]>
 ;;; Copyright © 2026 Sughosha <[email protected]>
+;;; Copyright © 2026 Herman Rimm <[email protected]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -76,6 +77,7 @@
   #:use-module (gnu packages cups)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages djvu)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages fonts)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages game-development)
@@ -1813,15 +1815,25 @@ PDF.  Indeed @command{pdfposter} was inspired by 
@command{poster}.")
     (version "2.2.0")
     (source
      (origin
-       (method url-fetch)
-       (uri (string-append "https://pdfgrep.org/download/";
-                           name "-" version ".tar.gz"))
+       (file-name (git-file-name name version))
+       (method git-fetch)
        (sha256
-        (base32
-         "1jr0qqvkcb3xz0ps111cqwwxp1b5g5rrf75ab5whkvy0whqyaq86"))))
+        (base32 "0bykm8rbvd6g725gw0jas2ijq0w16pa657q6idp1yzgqcmjzmx98"))
+       (uri (git-reference
+             (url "https://gitlab.com/pdfgrep/pdfgrep.git";)
+             (commit (string-append "v" version))))))
     (build-system gnu-build-system)
     (arguments
      (list
+      #:configure-flags
+      ;; Install the built manpage and shell completions.
+      #~(list "--enable-doc"
+              ;; error: ‘malloc’ has not been declared in ‘::’
+              ;; error: ‘realloc’ has not been declared in ‘::’
+              #$@(if (%current-target-system)
+                     #~("ac_cv_func_malloc_0_nonnull=yes"
+                        "ac_cv_func_realloc_0_nonnull=yes")
+                     #~()))
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'fix-cpp-paths
@@ -1830,16 +1842,20 @@ PDF.  Indeed @command{pdfposter} was inspired by 
@command{poster}.")
                                  "src/search.cc")
                 (("cpp\\/poppler") "poppler")))))))
     (native-inputs
-     (list pkg-config))
+     (list asciidoc                     ;bin/a2x builds doc/pdfgrep.1
+           autoconf
+           automake
+           libgcrypt                    ;share/aclocal
+           pkg-config))
     (inputs
      (list libgcrypt pcre poppler))
     (home-page "https://pdfgrep.org";)
     (synopsis "Command-line utility to search text in PDF files")
     (description
-     "Pdfgrep searches in pdf files for strings matching a regular expression.
-Support some GNU grep options as file name output, page number output,
-optional case insensitivity, count occurrences, color highlights and search in
-multiple files.")
+     "Pdfgrep searches in PDF files for strings matching a regular
+expression.  It supports some GNU grep options such as: file name
+output, page number output, optional case insensitivity, count
+occurrences, color highlights and search in multiple files.")
     (license license:gpl2+)))
 
 (define-public pdfpc

Reply via email to