Signed-off-by: Roland Hieber <r.hie...@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.hie...@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.hie...@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.hie...@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.hie...@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 via email to