From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: 62147@debbugs.gnu.org
Cc: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: [bug#62147] [PATCH v2] gnu: Add a4pdf.
Date: Sun, 12 Mar 2023 18:36:58 +0100 [thread overview]
Message-ID: <37ced3b3809c90e1646e2469fc5fbd538b41aa2c.camel@gmail.com> (raw)
In-Reply-To: <75920a546bb1513f646da8a6ba84921e79e6bde6.camel@gmail.com>
* gnu/packages/pdf.scm (a4pdf): New variable.
---
gnu/packages/pdf.scm | 55 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 6eee460740..dd1064bd6c 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -89,6 +89,7 @@ (define-module (gnu packages pdf)
#:use-module (gnu packages perl)
#:use-module (gnu packages photo)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages pretty-print)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
@@ -110,6 +111,60 @@ (define-module (gnu packages pdf)
#:use-module (gnu packages xorg)
#:use-module (srfi srfi-1))
+(define-public a4pdf
+ (package
+ (name "a4pdf")
+ (version "0.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jpakkane/a4pdf")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "18062cm1qsbaymmjar0whbd7kaggy4x7wzp7xw94kcd1pwx2jp1p"))))
+ (build-system meson-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'add-missing-header
+ (lambda _
+ (substitute* "src/pdfgen.cpp"
+ (("#include <cassert>" all)
+ (string-append all "\n#include <unistd.h>")))))
+ (add-after 'unpack 'fix-glib-application-flags
+ (lambda _
+ ;; XXX: remove when bumping glib
+ (substitute* "src/pdfviewer.cpp"
+ (("G_APPLICATION_DEFAULT_FLAGS")
+ "G_APPLICATION_FLAGS_NONE"))))
+ (add-after 'unpack 'fix-broken-tests
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ (substitute* "test/a4pdftests.py"
+ (("'Ghostscript not found, test suite can not be run.'")
+ ;; Sucks, but there's no point in repairing a certain test
+ ;; at the moment.
+ "0")))))))
+ (inputs (list fmt
+ freetype
+ gtk
+ lcms
+ libjpeg-turbo
+ libpng
+ zlib))
+ (native-inputs (list font-google-noto
+ ;; ghostscript
+ pkg-config
+ python
+ python-pillow))
+ (home-page "https://github.com/jpakkane/a4pdf")
+ (synopsis "Color-managed PDF generator")
+ (description "A4PDF is a low-level libray for generating PDF files.
+It does not have a document model and instead uses PDF primitives
+directly. It uses LittleCMS for color management but otherwise does not
+convert data in any way.")
+ (license license:asl2.0)))
+
(define-public extractpdfmark
(package
(name "extractpdfmark")
--
2.39.2
next prev parent reply other threads:[~2023-03-12 18:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-12 17:36 [bug#62147] [PATCH] gnu: Add a4pdf Liliana Marie Prikler
2023-03-12 17:36 ` Liliana Marie Prikler [this message]
2023-03-19 8:29 ` bug#62147: [PATCH v2] " Liliana Marie Prikler
2023-03-12 17:48 ` [bug#62147] [PATCH] " Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=37ced3b3809c90e1646e2469fc5fbd538b41aa2c.camel@gmail.com \
--to=liliana.prikler@gmail.com \
--cc=62147@debbugs.gnu.org \
--cc=mail@nicolasgoaziou.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).