mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <r.hieber@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <r.hieber@pengutronix.de>
Subject: [ptxdist] [PATCH v3 2/7] qpdf: new package: PDF inspection library and tools
Date: Wed, 25 Oct 2017 22:57:46 +0200	[thread overview]
Message-ID: <20171025205751.27273-2-r.hieber@pengutronix.de> (raw)
In-Reply-To: <20171025205751.27273-1-r.hieber@pengutronix.de>

Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
---

Notes:
    changes in v2 -> v3:
     - remove unused clean stage template

 ...Remove-libjpeg-dependency-from-pkg-config.patch | 40 ++++++++++
 patches/qpdf-7.0.0/series                          |  4 +
 rules/qpdf.in                                      | 22 ++++++
 rules/qpdf.make                                    | 87 ++++++++++++++++++++++
 4 files changed, 153 insertions(+)
 create mode 100644 patches/qpdf-7.0.0/0001-Remove-libjpeg-dependency-from-pkg-config.patch
 create mode 100644 patches/qpdf-7.0.0/series
 create mode 100644 rules/qpdf.in
 create mode 100644 rules/qpdf.make

diff --git a/patches/qpdf-7.0.0/0001-Remove-libjpeg-dependency-from-pkg-config.patch b/patches/qpdf-7.0.0/0001-Remove-libjpeg-dependency-from-pkg-config.patch
new file mode 100644
index 000000000..7255159a1
--- /dev/null
+++ b/patches/qpdf-7.0.0/0001-Remove-libjpeg-dependency-from-pkg-config.patch
@@ -0,0 +1,40 @@
+From: Roland Hieber <r.hieber@pengutronix.de>
+Date: Mon, 25 Sep 2017 13:01:04 +0200
+Subject: [PATCH] Remove libjpeg dependency from pkg-config
+
+I'm linking QPDF with the original libjpeg-9a from http://ijg.org. This
+works well. But when I then compile cups-filters with QPDF support,
+cups-filters' configure is confused about it, because libjpeg does not
+ship pkg-config definitions:
+
+	[...]
+	checking for ZLIB... yes
+	checking for LIBQPDF... no
+	configure: error: Package requirements (libqpdf >= 3.0.2) were not met:
+
+	Package 'libjpeg', required by 'libqpdf', not found
+
+	Consider adjusting the PKG_CONFIG_PATH environment variable if you
+	installed software in a non-standard prefix.
+
+We cannot solve this problem in QPDF, so just remove the libjpeg
+dependency from the Requires.private variable.
+
+Forwarded: https://github.com/qpdf/qpdf/pull/157
+Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
+---
+ libqpdf.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libqpdf.pc.in b/libqpdf.pc.in
+index d45df49ed73b..8ece48734941 100644
+--- a/libqpdf.pc.in
++++ b/libqpdf.pc.in
+@@ -6,6 +6,6 @@ includedir=@includedir@
+ Name: libqpdf
+ Description: PDF transformation library
+ Version: @PACKAGE_VERSION@
+-Requires.private: zlib, libjpeg
++Requires.private: zlib
+ Libs: -L${libdir} -lqpdf
+ Cflags: -I${includedir}
diff --git a/patches/qpdf-7.0.0/series b/patches/qpdf-7.0.0/series
new file mode 100644
index 000000000..0de60c199
--- /dev/null
+++ b/patches/qpdf-7.0.0/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Remove-libjpeg-dependency-from-pkg-config.patch
+# c373cfc66b49ecd3549c751d0c0febbe  - git-ptx-patches magic
diff --git a/rules/qpdf.in b/rules/qpdf.in
new file mode 100644
index 000000000..387e49166
--- /dev/null
+++ b/rules/qpdf.in
@@ -0,0 +1,22 @@
+## SECTION=system_libraries
+
+menuconfig QPDF
+	tristate
+	prompt "qpdf                          "
+
+	select LIBJPEG
+	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
+
+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..3d9b4511b
--- /dev/null
+++ b/rules/qpdf.make
@@ -0,0 +1,87 @@
+# -*-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	:= 7.0.0
+QPDF_MD5	:= c3ff408f69b3a6b2b3b4c8b373b2600c
+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 -ljpeg"
+
+#
+# autoconf
+#
+# 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.
+QPDF_CONF_TOOL	:= autoconf
+QPDF_CONF_OPT	:= \
+	$(CROSS_AUTOCONF_USR) \
+	--disable-static \
+	--enable-libtool-lock \
+	--disable-insecure-random \
+	--enable-os-secure-random \
+	--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-random=/dev/urandom \
+	--with-buildrules=libtool
+
+# ----------------------------------------------------------------------------
+# 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)
+
+# vim: ft=make ts=8 tw=80
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2017-10-25 20:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25 20:57 [ptxdist] [PATCH v3 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
2017-10-25 20:57 ` Roland Hieber [this message]
2017-10-25 20:57 ` [ptxdist] [PATCH v3 3/7] poppler-data: new package: optional encoding data for poppler Roland Hieber
2017-10-25 20:57 ` [ptxdist] [PATCH v3 4/7] poppler: version bump 0.18.0 -> 0.59.0 Roland Hieber
2017-10-25 21:15   ` Roland Hieber
2017-10-28  9:46   ` Michael Olbrich
2017-10-25 20:57 ` [ptxdist] [PATCH v3 5/7] cups: new package: Common Unix Printing System Roland Hieber
2017-10-27 17:54   ` Michael Olbrich
2017-10-31 22:31     ` Roland Hieber
2017-11-01 10:45       ` Michael Olbrich
2017-10-28  9:54   ` Michael Olbrich
2017-10-31 21:17     ` Roland Hieber
2017-10-25 20:57 ` [ptxdist] [PATCH v3 6/7] host-cups: new package: CUPS host tools Roland Hieber
2017-10-28  9:57   ` Michael Olbrich
2017-10-25 20:57 ` [ptxdist] [PATCH v3 7/7] cups-filters: new package: additional filters and backends for CUPS Roland Hieber
2017-11-01 10:51 ` [ptxdist] [PATCH v3 1/7] libpaper: new package: system-wide papersize configuration Michael Olbrich

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=20171025205751.27273-2-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