From: Roland Hieber <r.hieber@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 2/7] qpdf: new package: PDF inspection library and tools
Date: Thu, 24 Aug 2017 00:39:06 +0200 [thread overview]
Message-ID: <20170823223911.13784-3-r.hieber@pengutronix.de> (raw)
In-Reply-To: <20170823223911.13784-1-r.hieber@pengutronix.de>
Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
---
.../0001-don-t-build-docs-examples-or-tests.patch | 51 +++++++++
patches/qpdf-6.0.0/series | 4 +
rules/qpdf.in | 36 ++++++
rules/qpdf.make | 121 +++++++++++++++++++++
4 files changed, 212 insertions(+)
create mode 100644 patches/qpdf-6.0.0/0001-don-t-build-docs-examples-or-tests.patch
create mode 100644 patches/qpdf-6.0.0/series
create mode 100644 rules/qpdf.in
create mode 100644 rules/qpdf.make
diff --git a/patches/qpdf-6.0.0/0001-don-t-build-docs-examples-or-tests.patch b/patches/qpdf-6.0.0/0001-don-t-build-docs-examples-or-tests.patch
new file mode 100644
index 000000000..2c7d66f94
--- /dev/null
+++ b/patches/qpdf-6.0.0/0001-don-t-build-docs-examples-or-tests.patch
@@ -0,0 +1,51 @@
+From: Roland Hieber <r.hieber@pengutronix.de>
+Date: Tue, 11 Jul 2017 14:54:15 +0200
+Subject: [PATCH] don't build docs, examples, or tests
+
+Those components are not needed and fail during cross-build. Sadly the
+build system is not very modular and does not allow the user to select
+which components are being built, so we resort to patching the build
+system.
+
+Forwarded: not-needed
+Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
+---
+ Makefile | 2 +-
+ make/libtool.mk | 6 ------
+ 2 files changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index e882672b0d6b..8a9211e800a5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -30,7 +30,7 @@
+ # install to install in a separate location. This is useful for
+ # packagers.
+
+-BUILD_ITEMS := manual libqpdf zlib-flate libtests qpdf examples
++BUILD_ITEMS := libqpdf zlib-flate qpdf
+ OUTPUT_DIR = build
+ ALL_TARGETS =
+
+diff --git a/make/libtool.mk b/make/libtool.mk
+index 0d1d8beeaaaa..967d3416f893 100644
+--- a/make/libtool.mk
++++ b/make/libtool.mk
+@@ -110,8 +110,6 @@ install: all
+ ./mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
+ ./mkinstalldirs $(DESTDIR)$(bindir)
+ ./mkinstalldirs $(DESTDIR)$(includedir)/qpdf
+- ./mkinstalldirs $(DESTDIR)$(docdir)
+- ./mkinstalldirs $(DESTDIR)$(mandir)/man1
+ $(LIBTOOL) --mode=install ./install-sh \
+ libqpdf/$(OUTPUT_DIR)/libqpdf.la \
+ $(DESTDIR)$(libdir)/libqpdf.la
+@@ -125,8 +123,4 @@ install: all
+ cp qpdf/fix-qdf $(DESTDIR)$(bindir)
+ cp include/qpdf/*.h $(DESTDIR)$(includedir)/qpdf
+ cp include/qpdf/*.hh $(DESTDIR)$(includedir)/qpdf
+- cp doc/stylesheet.css $(DESTDIR)$(docdir)
+- cp doc/qpdf-manual.html $(DESTDIR)$(docdir)
+- cp doc/qpdf-manual.pdf $(DESTDIR)$(docdir)
+- cp doc/*.1 $(DESTDIR)$(mandir)/man1
+ cp libqpdf.pc $(DESTDIR)$(libdir)/pkgconfig
diff --git a/patches/qpdf-6.0.0/series b/patches/qpdf-6.0.0/series
new file mode 100644
index 000000000..46062ee5b
--- /dev/null
+++ b/patches/qpdf-6.0.0/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-don-t-build-docs-examples-or-tests.patch
+# 9fe87092b570d1599b737ceb198ad63e - git-ptx-patches magic
diff --git a/rules/qpdf.in b/rules/qpdf.in
new file mode 100644
index 000000000..5c0ee0726
--- /dev/null
+++ b/rules/qpdf.in
@@ -0,0 +1,36 @@
+## SECTION=system_libraries
+
+menuconfig QPDF
+ tristate
+ prompt "qpdf "
+
+ select LIBPCRE
+ select ZLIB
+
+ help
+ QPDF is a library that can be used to linearize (web-optimize),
+ encrypt (password-protect), decrypt, and inspect PDF files.
+
+if QPDF
+
+choice
+ prompt "randomness source"
+ default QPDF_RANDOM_DEV_URANDOM
+
+ config QPDF_RANDOM_LIBC
+ bool "libc rand()"
+
+ config QPDF_RANDOM_DEV_RANDOM
+ bool "/dev/random"
+
+ config QPDF_RANDOM_DEV_URANDOM
+ bool "/dev/urandom"
+endchoice
+
+config QPDF_TOOLS
+ bool "install tools"
+ help
+ Install the tools. Those include qpdf, zlib-flate, and fix-qdf.
+
+endif
+# vim: ft=kconfig ts=8 noet tw=80
diff --git a/rules/qpdf.make b/rules/qpdf.make
new file mode 100644
index 000000000..b65709bdc
--- /dev/null
+++ b/rules/qpdf.make
@@ -0,0 +1,121 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Roland Hieber <r.hieber@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_QPDF) += qpdf
+
+#
+# Paths and names
+#
+QPDF_VERSION := 6.0.0
+QPDF_MD5 := a0601b0bc56d3f412fd3afecfce2721c
+QPDF := qpdf-$(QPDF_VERSION)
+QPDF_SUFFIX := tar.gz
+QPDF_URL := $(call ptx/mirror, SF, /qpdf/qpdf/$(QPDF_VERSION)/$(QPDF).$(QPDF_SUFFIX))
+QPDF_SOURCE := $(SRCDIR)/$(QPDF).$(QPDF_SUFFIX)
+QPDF_DIR := $(BUILDDIR)/$(QPDF)
+QPDF_LICENSE := Artistic-2.0
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+# We emulate --enable-external-libs as minimally as possible
+QPDF_CONF_ENV := \
+ $(CROSS_ENV) \
+ LIBS="-lz -lpcre"
+
+#
+# autoconf
+#
+QPDF_CONF_TOOL := autoconf
+QPDF_CONF_OPT := \
+ $(CROSS_AUTOCONF_USR) \
+ --disable-static \
+ --enable-libtool-lock
+
+# Note: --with-random sets RANDOM_SOURCE, which is not used at all when
+# --enable-insecure-random is given. Nevertheless, autoconf will try to
+# autodetect whether /dev/urandom exists, which fails when cross-compiling.
+ifdef PTXCONF_QPDF_RANDOM_LIBC
+QPDF_CONF_OPT += \
+ --enable-insecure-random \
+ --disable-os-secure-random \
+ --with-random=/dev/null
+
+else ifdef PTXCONF_QPDF_RANDOM_DEV_RANDOM
+QPDF_CONF_OPT += \
+ --disable-insecure-random \
+ --enable-os-secure-random \
+ --with-random=/dev/random
+
+else ifdef PTXCONF_QPDF_RANDOM_DEV_URANDOM
+QPDF_CONF_OPT += \
+ --disable-insecure-random \
+ --enable-os-secure-random \
+ --with-random=/dev/urandom
+endif
+
+QPDF_CONF_OPT += \
+ --disable-external-libs \
+ $(GLOBAL_LARGE_FILE_OPTION) \
+ --disable-werror \
+ --disable-test-compare-images \
+ --disable-show-failed-test-output \
+ --disable-doc-maintenance \
+ --disable-html-doc \
+ --disable-pdf-doc \
+ --disable-validate-doc \
+ --with-buildrules=libtool
+
+$(STATEDIR)/qpdf.prepare:
+ @$(call targetinfo)
+ @$(call clean, $(QPDF_DIR)/config.cache)
+ @cd $(QPDF_DIR) && \
+ ./autogen.sh && \
+ $(QPDF_CONF_ENV) ./configure $(QPDF_CONF_OPT)
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/qpdf.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, qpdf)
+ @$(call install_fixup, qpdf,PRIORITY,optional)
+ @$(call install_fixup, qpdf,SECTION,base)
+ @$(call install_fixup, qpdf,AUTHOR,"Roland Hieber <r.hieber@pengutronix.de>")
+ @$(call install_fixup, qpdf,DESCRIPTION,missing)
+
+ @$(call install_lib, qpdf, 0, 0, 0755, libqpdf)
+
+ifdef PTXCONF_QPDF_TOOLS
+ @$(call install_copy, qpdf, 0, 0, 0755, -, /usr/bin/qpdf)
+ @$(call install_copy, qpdf, 0, 0, 0755, -, /usr/bin/fix-qdf)
+ @$(call install_copy, qpdf, 0, 0, 0755, -, /usr/bin/zlib-flate)
+endif
+
+ @$(call install_finish, qpdf)
+
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+#$(STATEDIR)/qpdf.clean:
+# @$(call targetinfo)
+# @$(call clean_pkg, QPDF)
+
+# vim: ft=make ts=8 tw=80
--
2.11.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2017-08-23 22:39 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 22:39 [ptxdist] [PATCH 0/7] package (some of) the CUPS ecosystem Roland Hieber
2017-08-23 22:39 ` [ptxdist] [PATCH 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
2017-08-24 7:32 ` Juergen Borleis
2017-08-28 8:20 ` Roland Hieber
2017-08-28 9:47 ` Michael Olbrich
2017-08-23 22:39 ` Roland Hieber [this message]
2017-08-28 9:52 ` [ptxdist] [PATCH 2/7] qpdf: new package: PDF inspection library and tools Michael Olbrich
2017-09-11 10:11 ` Juergen Borleis
2017-09-22 10:00 ` Roland Hieber
2017-08-23 22:39 ` [ptxdist] [PATCH 3/7] poppler-data: new package: optional encoding data for poppler Roland Hieber
2017-08-28 9:54 ` Michael Olbrich
2017-08-23 22:39 ` [ptxdist] [PATCH 4/7] poppler: version bump 0.18.0 -> 0.57.0 Roland Hieber
2017-08-28 10:18 ` Michael Olbrich
2017-08-28 14:11 ` Roland Hieber
2017-08-29 8:43 ` Michael Olbrich
2017-08-23 22:39 ` [ptxdist] [PATCH 5/7] cups: new package: Common Unix Printing System Roland Hieber
2017-08-28 12:44 ` Juergen Borleis
2017-08-28 12:51 ` Michael Olbrich
2017-08-28 14:03 ` Roland Hieber
2017-08-29 8:40 ` Michael Olbrich
2017-09-27 8:16 ` Roland Hieber
2017-08-30 8:42 ` Juergen Borleis
2017-08-23 22:39 ` [ptxdist] [PATCH 6/7] host-cups: new package: CUPS PPD compiler Roland Hieber
2017-08-28 12:57 ` Michael Olbrich
2017-09-22 12:06 ` Juergen Borleis
2017-09-22 14:04 ` Michael Olbrich
2017-09-22 14:37 ` Roland Hieber
2017-08-23 22:39 ` [ptxdist] [PATCH 7/7] cups-filters: new package: additional filters and backends for CUPS Roland Hieber
2017-08-28 13:03 ` Michael Olbrich
2017-08-28 13:56 ` Roland Hieber
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170823223911.13784-3-r.hieber@pengutronix.de \
--to=r.hieber@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox