mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v4 1/7] libpaper: new package: system-wide papersize configuration
@ 2017-11-07 16:40 Roland Hieber
  2017-11-07 16:40 ` [ptxdist] [PATCH v4 2/7] qpdf: new package: PDF inspection library and tools Roland Hieber
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Roland Hieber @ 2017-11-07 16:40 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

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

Notes:
    changes in v3 -> v4:
     - remove superfluous dependencies to HOST_AUTOTOOLS
     - install libraries as mode 0644, not 0755

 patches/libpaper-1.1.24+nmu5/autogen.sh |  2 +
 rules/libpaper.in                       | 36 +++++++++++++++++
 rules/libpaper.make                     | 69 +++++++++++++++++++++++++++++++++
 3 files changed, 107 insertions(+)
 create mode 100755 patches/libpaper-1.1.24+nmu5/autogen.sh
 create mode 100644 rules/libpaper.in
 create mode 100644 rules/libpaper.make

diff --git a/patches/libpaper-1.1.24+nmu5/autogen.sh b/patches/libpaper-1.1.24+nmu5/autogen.sh
new file mode 100755
index 000000000..5d4c48990
--- /dev/null
+++ b/patches/libpaper-1.1.24+nmu5/autogen.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec autoreconf --install
diff --git a/rules/libpaper.in b/rules/libpaper.in
new file mode 100644
index 000000000..f7800489a
--- /dev/null
+++ b/rules/libpaper.in
@@ -0,0 +1,36 @@
+## SECTION=multimedia_libs
+
+menuconfig LIBPAPER
+	tristate
+	prompt "libpaper                      "
+	help
+	  System-wide paper size configuration
+
+if LIBPAPER
+
+config LIBPAPER_SIZE
+	string "default fallback paper size"
+	default "letter"
+	help
+	  Paper size that is used if nothing else is specified in
+	  /etc/papersize. Currently libpaper knows about the following formats:
+
+	  10x14 11x17 Comm10 DL Monarch a0 a1 a10 a2 a3 a4 a5 a6 a7 a8 a9 archA
+	  archB archC archD archE b0 b1 b10 b2 b3 b4 b5 b6 b7 b8 b9 c2 c3 c4 c5
+	  c6 c7 c8 csheet dsheet esheet executive flsa flse folio halfexecutive
+	  halfletter ledger legal letter note quarto statement tabloid
+
+config LIBPAPER_PAPERCONFIG
+	bool "install paperconfig"
+	help
+	  Install the paperconfig tool which sets the default paper size of the
+	  system
+
+config LIBPAPER_PAPERCONF
+	bool "install paperconf"
+	help
+	  Install the paperconf tool which prints information about a specific
+	  paper size
+
+endif
+# vim: ft=kconfig ts=8 noet tw=80
diff --git a/rules/libpaper.make b/rules/libpaper.make
new file mode 100644
index 000000000..0d68dc62a
--- /dev/null
+++ b/rules/libpaper.make
@@ -0,0 +1,69 @@
+# -*-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_LIBPAPER) += libpaper
+
+#
+# Paths and names
+#
+# libpaper seems to be maintained only as a Debian package, therefore the
+# unusual versioning.
+#
+LIBPAPER_VERSION	:= 1.1.24+nmu5
+LIBPAPER_MD5		:= 38bc55688c0fc5544edaa5a951a45fbd
+LIBPAPER		:= libpaper-$(LIBPAPER_VERSION)
+LIBPAPER_SUFFIX		:= tar.gz
+LIBPAPER_URL		:= http://snapshot.debian.org/archive/debian-debug/20161113T151229Z/pool/main/libp/libpaper/libpaper_$(LIBPAPER_VERSION).$(LIBPAPER_SUFFIX)
+LIBPAPER_SOURCE		:= $(SRCDIR)/$(LIBPAPER).$(LIBPAPER_SUFFIX)
+LIBPAPER_DIR		:= $(BUILDDIR)/$(LIBPAPER)
+LIBPAPER_LICENSE	:= GPL-2.0
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+LIBPAPER_CONF_ENV	:= \
+	$(CROSS_ENV) \
+	PAPERSIZE=$(PTXCONF_LIBPAPER_SIZE)
+#
+# autoconf
+#
+LIBPAPER_CONF_TOOL := autoconf
+#
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libpaper.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, libpaper)
+	@$(call install_fixup, libpaper,PRIORITY,optional)
+	@$(call install_fixup, libpaper,SECTION,base)
+	@$(call install_fixup, libpaper,AUTHOR,"Roland Hieber <r.hieber@pengutronix.de>")
+	@$(call install_fixup, libpaper,DESCRIPTION,missing)
+
+	@$(call install_lib, libpaper, 0, 0, 0644, libpaper)
+
+ifdef PTXCONF_LIBPAPER_PAPERCONFIG
+	@$(call install_copy, libpaper, 0, 0, 755, -, /usr/sbin/paperconfig)
+endif
+ifdef PTXCONF_LIBPAPER_PAPERCONF
+	@$(call install_copy, libpaper, 0, 0, 755, -, /usr/bin/paperconf)
+endif
+
+	@$(call install_finish, libpaper)
+
+	@$(call touch)
+
+# vim: ft=make ts=8 noet tw=80
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ptxdist] [PATCH v4 2/7] qpdf: new package: PDF inspection library and tools
  2017-11-07 16:40 [ptxdist] [PATCH v4 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
@ 2017-11-07 16:40 ` Roland Hieber
  2017-11-07 16:40 ` [ptxdist] [PATCH v4 3/7] poppler-data: new package: optional encoding data for poppler Roland Hieber
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Roland Hieber @ 2017-11-07 16:40 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

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

Notes:
    changes in v3 -> v4:
     - install libraries as mode 0644, not 0755

 ...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..eecfe4b39
--- /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, 0644, 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ptxdist] [PATCH v4 3/7] poppler-data: new package: optional encoding data for poppler
  2017-11-07 16:40 [ptxdist] [PATCH v4 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
  2017-11-07 16:40 ` [ptxdist] [PATCH v4 2/7] qpdf: new package: PDF inspection library and tools Roland Hieber
@ 2017-11-07 16:40 ` Roland Hieber
  2017-11-07 16:40 ` [ptxdist] [PATCH v4 4/7] poppler: version bump 0.18.0 -> 0.60.1 Roland Hieber
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Roland Hieber @ 2017-11-07 16:40 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

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

Notes:
    (no changes in v3 -> v4)

 rules/poppler-data.in   | 10 +++++++++
 rules/poppler-data.make | 58 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+)
 create mode 100644 rules/poppler-data.in
 create mode 100644 rules/poppler-data.make

diff --git a/rules/poppler-data.in b/rules/poppler-data.in
new file mode 100644
index 000000000..61796949e
--- /dev/null
+++ b/rules/poppler-data.in
@@ -0,0 +1,10 @@
+## SECTION=multimedia_gtk
+
+config POPPLER_DATA
+	tristate
+	prompt "poppler-data"
+	help
+	  Encoding data which enables poppler to correctly render CJK and
+	  Cyrillic languages.
+
+# vim: ft=kconfig ts=8 noet tw=80
diff --git a/rules/poppler-data.make b/rules/poppler-data.make
new file mode 100644
index 000000000..93edb7cea
--- /dev/null
+++ b/rules/poppler-data.make
@@ -0,0 +1,58 @@
+# -*-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_POPPLER_DATA) += poppler-data
+
+#
+# Paths and names
+#
+POPPLER_DATA_VERSION	:= 0.4.8
+POPPLER_DATA_MD5	:= 00f8989c804de84af0ba2ea629949980
+POPPLER_DATA		:= poppler-data-$(POPPLER_DATA_VERSION)
+POPPLER_DATA_SUFFIX	:= tar.gz
+POPPLER_DATA_URL	:= https://poppler.freedesktop.org/$(POPPLER_DATA).$(POPPLER_DATA_SUFFIX)
+POPPLER_DATA_SOURCE	:= $(SRCDIR)/$(POPPLER_DATA).$(POPPLER_DATA_SUFFIX)
+POPPLER_DATA_DIR	:= $(BUILDDIR)/$(POPPLER_DATA)
+POPPLER_DATA_LICENSE	:= GPL-2.0 AND MIT AND BSD-3-Clause
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+POPPLER_DATA_CONF_TOOL	:= NO
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+POPPLER_DATA_INSTALL_OPT := prefix=/usr install
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/poppler-data.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, poppler-data)
+	@$(call install_fixup, poppler-data,PRIORITY,optional)
+	@$(call install_fixup, poppler-data,SECTION,base)
+	@$(call install_fixup, poppler-data,AUTHOR,"Roland Hieber <r.hieber@pengutronix.de>")
+	@$(call install_fixup, poppler-data,DESCRIPTION,missing)
+
+	@$(call install_tree, poppler-data, 0, 0, -, /usr/share/poppler)
+
+	@$(call install_finish, poppler-data)
+
+	@$(call touch)
+
+# vim: ft=make ts=8 tw=80
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ptxdist] [PATCH v4 4/7] poppler: version bump 0.18.0 -> 0.60.1
  2017-11-07 16:40 [ptxdist] [PATCH v4 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
  2017-11-07 16:40 ` [ptxdist] [PATCH v4 2/7] qpdf: new package: PDF inspection library and tools Roland Hieber
  2017-11-07 16:40 ` [ptxdist] [PATCH v4 3/7] poppler-data: new package: optional encoding data for poppler Roland Hieber
@ 2017-11-07 16:40 ` Roland Hieber
  2017-11-07 16:40 ` [ptxdist] [PATCH v4 5/7] cups: new package: Common Unix Printing System Roland Hieber
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Roland Hieber @ 2017-11-07 16:40 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

This is quite a version bump, spanning six years of poppler development.

Upstream now provides data for rendering cyrillic and CJK languages in
the package poppler-data, but this dependency is only detected at
compile time, so we make sure the build order is right. The build system
has changed from autotools to CMake.

Some applications require the old xpdf headers, the CPP wrapper or CMYK
support, so make these options selectable. Same for the Splash backend,
which can now also be built with single precision or fixed-point
arithmetic.

PNG and JPEG support is no longer broken; poppler now also includes an
internal DCT decoder, but it is officially unmaintained, so we leave it
out. Likewise, poppler allows using zlib to uncompress flate streams,
but with the warning that this is "not totally safe", so it is disabled
for now. The GTK dependency has been dropped as it is only necessary
for the documentation or some tests, which we don't build.

Additionally, poppler could benefit from packaging libopenjpeg and
libtiff in ptxdist for parsing JPEG2000 or TIFF embedded in PDFs.
Likewise, libnss could be packaged for PDF signature support. Also the
Qt5 wrapper is now selectable, but this is currently only build-tested
and needs to be tested in runtime.

Finally harmonize the wording of the kconfig options.

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

Notes:
    changes in v3 -> v4:
     - version bump 0.59.0 -> 0.60.1
       * 0.60 dropped autotools support, migrate to cmake
     - remove old 0.18 patches (they were only patching autoconf)
     - specify missing license
     - remove the debug options again, there is no equivalent in cmake and
       stripping the binaries correctly is a problem.
     - install introspection data and libpoppler-qt5.so when told to do so
     - rename POPPLER_GOI -> POPPLER_INTROSPECTION, and remove its prompt
     - CMYK is really an option for the splash backend, rename accordingly
     - Qt4 wrapper is not a rendering backend, remove it from the
       no-selected-backends warning in kconfig
     - "default n" makes no sense, remove it from float/fixed point options
     - make POPPLER_XPDF a silent option, normally not needed by users
     - reorganize the Splash sub-options into an if ... endif
     - improve structure of commit message

 .../0001-make-qt4-tests-optional.patch             |  60 ---------
 patches/poppler-0.18.0/autogen.sh                  |   1 -
 patches/poppler-0.18.0/series                      |   3 -
 ...dd-the-custom-buildtests-target-only-once.patch |  58 ++++++++
 ...Make-make-FindLCMS.cmake-cross-compatible.patch |  69 ++++++++++
 patches/poppler-0.60.1/series                      |   5 +
 rules/poppler.in                                   | 146 ++++++++++++++++-----
 rules/poppler.make                                 |  92 ++++++++-----
 8 files changed, 308 insertions(+), 126 deletions(-)
 delete mode 100644 patches/poppler-0.18.0/0001-make-qt4-tests-optional.patch
 delete mode 120000 patches/poppler-0.18.0/autogen.sh
 delete mode 100644 patches/poppler-0.18.0/series
 create mode 100644 patches/poppler-0.60.1/0001-CMake-add-the-custom-buildtests-target-only-once.patch
 create mode 100644 patches/poppler-0.60.1/0002-CMake-make-FindLCMS.cmake-cross-compatible.patch
 create mode 100644 patches/poppler-0.60.1/series

diff --git a/patches/poppler-0.18.0/0001-make-qt4-tests-optional.patch b/patches/poppler-0.18.0/0001-make-qt4-tests-optional.patch
deleted file mode 100644
index 599535ecf..000000000
--- a/patches/poppler-0.18.0/0001-make-qt4-tests-optional.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Sat, 11 Jun 2011 20:23:02 +0200
-Subject: [PATCH] make qt4 tests optional
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- configure.ac          |   13 ++++++-------
- qt4/tests/Makefile.am |    2 +-
- 2 files changed, 7 insertions(+), 8 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 471f909..aff11d8 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -482,19 +482,17 @@ AC_ARG_ENABLE(poppler-qt4,
- if test x$enable_poppler_qt4 = xyes; then
-   PKG_CHECK_MODULES(POPPLER_QT4, 
- 	            QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0)
--  PKG_CHECK_MODULES(POPPLER_QT4_TEST, 
--	            QtTest >= 4.4.0)
- elif test x$enable_poppler_qt4 = xtry; then
-   PKG_CHECK_MODULES(POPPLER_QT4,
-                     QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0,
-                     [enable_poppler_qt4="yes"],
-                     [enable_poppler_qt4="no"])
--  if test x$enable_poppler_qt4 = xyes; then
--    PKG_CHECK_MODULES(POPPLER_QT4_TEST,
-+fi
-+if test x$enable_poppler_qt4 = xyes; then
-+  PKG_CHECK_MODULES(POPPLER_QT4_TEST,
-                     QtTest >= 4.4.0,
--                    [enable_poppler_qt4="yes"],
--                    [enable_poppler_qt4="no"])
--  fi
-+                    [enable_poppler_qt4_tests="yes"],
-+                    [enable_poppler_qt4_tests="no"])
- fi
- 
- AC_SUBST(POPPLER_QT4_CXXFLAGS)
-@@ -522,6 +520,7 @@ if test x$enable_poppler_qt4 = xyes; then
- fi
- 
- AM_CONDITIONAL(BUILD_POPPLER_QT4, test "x$enable_poppler_qt4" = "xyes")
-+AM_CONDITIONAL(BUILD_POPPLER_QT4_TESTS, test "x$enable_poppler_qt4_tests" = "xyes")
- 
- dnl
- dnl CPP frontend
-diff --git a/qt4/tests/Makefile.am b/qt4/tests/Makefile.am
-index 93e1132..9e8deaf 100644
---- a/qt4/tests/Makefile.am
-+++ b/qt4/tests/Makefile.am
-@@ -65,7 +65,7 @@ stress_poppler_dir_LDADD = $(LDADDS)
- clean-generic:
- 	rm -f *.moc
- 
--if BUILD_POPPLER_QT4
-+if BUILD_POPPLER_QT4_TESTS
- TESTS = \
- 	check_attachments	\
- 	check_actualtext	\
diff --git a/patches/poppler-0.18.0/autogen.sh b/patches/poppler-0.18.0/autogen.sh
deleted file mode 120000
index 9f8a4cb7d..000000000
--- a/patches/poppler-0.18.0/autogen.sh
+++ /dev/null
@@ -1 +0,0 @@
-../autogen.sh
\ No newline at end of file
diff --git a/patches/poppler-0.18.0/series b/patches/poppler-0.18.0/series
deleted file mode 100644
index ee918b11f..000000000
--- a/patches/poppler-0.18.0/series
+++ /dev/null
@@ -1,3 +0,0 @@
-# generated by git-ptx-patches
-0001-make-qt4-tests-optional.patch
-# 43d87fa6b1fe06cfd4205ae4a494e960  - git-ptx-patches magic
diff --git a/patches/poppler-0.60.1/0001-CMake-add-the-custom-buildtests-target-only-once.patch b/patches/poppler-0.60.1/0001-CMake-add-the-custom-buildtests-target-only-once.patch
new file mode 100644
index 000000000..7d996760a
--- /dev/null
+++ b/patches/poppler-0.60.1/0001-CMake-add-the-custom-buildtests-target-only-once.patch
@@ -0,0 +1,58 @@
+From: Roland Hieber <r.hieber@pengutronix.de>
+Date: Mon, 6 Nov 2017 15:36:34 +0100
+Subject: [PATCH] CMake: add the custom `buildtests` target only once
+
+This fixes building with -DBUILD_QT4_TESTS=NO or -DBUILD_QT5_TESTS=NO,
+which resulted in error messages like:
+
+  CMake Error at cmake/modules/PopplerMacros.cmake:41 (add_custom_target):
+    add_custom_target cannot create target "buildtests" because another
+    target with the same name already exists.  The existing target is a
+    custom target created in source directory
+    "[...]/poppler-0.60.1/qt4/tests".
+    See documentation for policy CMP0002 for more details.
+  Call Stack (most recent call first):
+    qt4/tests/CMakeLists.txt:30 (poppler_add_unittest)
+    qt4/tests/CMakeLists.txt:52 (qt4_add_qtest)
+
+Solve this by making BUILDTESTS_ADDED a global property so it is only
+remembered once per project instead of per directory.
+
+Fixes bug #103003.
+
+Forwarded: https://bugs.freedesktop.org/show_bug.cgi?id=103003#c5
+Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
+---
+ cmake/modules/PopplerMacros.cmake | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake
+index ba4bceb36ba4..4542751a0857 100644
+--- a/cmake/modules/PopplerMacros.cmake
++++ b/cmake/modules/PopplerMacros.cmake
+@@ -13,10 +13,10 @@ macro(POPPLER_ADD_TEST exe build_flag)
+ 
+   # if the tests are EXCLUDE_FROM_ALL, add a target "buildtests" to build all tests
+   if(NOT build_test AND NOT MSVC_IDE)
+-    get_directory_property(_buildtestsAdded BUILDTESTS_ADDED)
++    get_property(_buildtestsAdded GLOBAL PROPERTY BUILDTESTS_ADDED)
+     if(NOT _buildtestsAdded)
+       add_custom_target(buildtests)
+-      set_directory_properties(PROPERTIES BUILDTESTS_ADDED TRUE)
++      set_property(GLOBAL PROPERTY BUILDTESTS_ADDED TRUE)
+     endif(NOT _buildtestsAdded)
+     add_dependencies(buildtests ${exe})
+   endif(NOT build_test AND NOT MSVC_IDE)
+@@ -33,10 +33,10 @@ macro(POPPLER_ADD_UNITTEST exe build_flag)
+ 
+   # if the tests are EXCLUDE_FROM_ALL, add a target "buildtests" to build all tests
+   if(NOT build_test)
+-    get_directory_property(_buildtestsAdded BUILDTESTS_ADDED)
++    get_property(_buildtestsAdded GLOBAL PROPERTY BUILDTESTS_ADDED)
+     if(NOT _buildtestsAdded)
+       add_custom_target(buildtests)
+-      set_directory_properties(PROPERTIES BUILDTESTS_ADDED TRUE)
++      set_property(GLOBAL PROPERTY BUILDTESTS_ADDED TRUE)
+     endif(NOT _buildtestsAdded)
+     add_dependencies(buildtests ${exe})
+   endif(NOT build_test)
diff --git a/patches/poppler-0.60.1/0002-CMake-make-FindLCMS.cmake-cross-compatible.patch b/patches/poppler-0.60.1/0002-CMake-make-FindLCMS.cmake-cross-compatible.patch
new file mode 100644
index 000000000..2e9285c62
--- /dev/null
+++ b/patches/poppler-0.60.1/0002-CMake-make-FindLCMS.cmake-cross-compatible.patch
@@ -0,0 +1,69 @@
+From: Roland Hieber <r.hieber@pengutronix.de>
+Date: Mon, 6 Nov 2017 17:31:17 +0100
+Subject: [PATCH] CMake: make FindLCMS.cmake cross-compatible
+
+FindLCMS.make complains when being run in cross-compile mode:
+
+  -- Checking for module 'lcms'
+  --   Found lcms, version 1.19
+  CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the
+  following cache variables appropriately:
+     LCMS_VERSION (advanced)
+     LCMS_VERSION__TRYRUN_OUTPUT (advanced)
+  For details see [...]/poppler-0.60.1-build/TryRunResults.cmake
+  -- Found lcms version P.LE, [...]/sysroot-target/usr/lib/liblcms.so
+
+To work around this, replace try_run() with the version parsing regex
+from FindLCMS2.make, and adapt it accordingly for lcms1.
+
+Forwarded: https://bugs.freedesktop.org/show_bug.cgi?id=103593#c0
+Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
+---
+ cmake/modules/FindLCMS.cmake | 25 ++++++-------------------
+ 1 file changed, 6 insertions(+), 19 deletions(-)
+
+diff --git a/cmake/modules/FindLCMS.cmake b/cmake/modules/FindLCMS.cmake
+index 9d162d2cfdd8..504f67fa75f1 100644
+--- a/cmake/modules/FindLCMS.cmake
++++ b/cmake/modules/FindLCMS.cmake
+@@ -42,34 +42,21 @@ else(LCMS_INCLUDE_DIR AND LCMS_LIBRARIES)
+ endif(LCMS_INCLUDE_DIR AND LCMS_LIBRARIES)
+ 
+ if(LCMS_FOUND)
+-   set(FIND_LCMS_VERSION_SOURCE
+-      "#include <lcms.h>\n int main()\n {\n return LCMS_VERSION;\n }\n")
+-   set(FIND_LCMS_VERSION_SOURCE_FILE ${CMAKE_BINARY_DIR}/CMakeTmp/FindLCMS.cxx)
+-   file(WRITE "${FIND_LCMS_VERSION_SOURCE_FILE}" "${FIND_LCMS_VERSION_SOURCE}")
+-
+-   set(FIND_LCMS_VERSION_ADD_INCLUDES 
+-      "-DINCLUDE_DIRECTORIES:STRING=${LCMS_INCLUDE_DIR}")
+-
+-   try_run(LCMS_VERSION LCMS_COMPILE_RESULT
+-      ${CMAKE_BINARY_DIR}
+-      ${FIND_LCMS_VERSION_SOURCE_FILE}
+-      CMAKE_FLAGS "${FIND_LCMS_VERSION_ADD_INCLUDES}"
+-      OUTPUT_VARIABLE OUTPUT)
+-
+-   if(LCMS_COMPILE_RESULT AND NOT LCMS_VERSION STREQUAL FAILED_TO_RUN)
++   file(READ ${LCMS_INCLUDE_DIR}/lcms.h LCMS_VERSION_CONTENT)
++   string(REGEX MATCH "#define LCMS_VERSION[ ]*[0-9]*\n" LCMS_VERSION_MATCH ${LCMS_VERSION_CONTENT})
++   if(LCMS_VERSION_MATCH)
++      string(REGEX REPLACE "#define LCMS_VERSION[ ]*([0-9]*)\n" "\\1" LCMS_VERSION ${LCMS_VERSION_MATCH})
+       if(NOT LCMS_FIND_QUIETLY)
+          string(SUBSTRING ${LCMS_VERSION} 0 1 LCMS_MAJOR_VERSION)
+          string(SUBSTRING ${LCMS_VERSION} 1 2 LCMS_MINOR_VERSION)
+          message(STATUS "Found lcms version ${LCMS_MAJOR_VERSION}.${LCMS_MINOR_VERSION}, ${LCMS_LIBRARIES}")
+       endif(NOT LCMS_FIND_QUIETLY)
+-   else(LCMS_COMPILE_RESULT AND NOT LCMS_VERSION STREQUAL FAILED_TO_RUN)
++   else(LCMS_VERSION_MATCH)
+       if(NOT LCMS_FIND_QUIETLY)
+          message(STATUS "Found lcms but failed to find version ${LCMS_LIBRARIES}")
+-         file(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+-            "Find lcms version failed with the following output:\n${OUTPUT}\nFindLCMS.cxx:\n${FIND_LCMS_VERSION_SOURCE}\n\n")
+       endif(NOT LCMS_FIND_QUIETLY)
+       set(LCMS_VERSION NOTFOUND)
+-   endif(LCMS_COMPILE_RESULT AND NOT LCMS_VERSION STREQUAL FAILED_TO_RUN)
++    endif(LCMS_VERSION_MATCH)
+ else(LCMS_FOUND)
+    if(NOT LCMS_FIND_QUIETLY)
+       if(LCMS_FIND_REQUIRED)
diff --git a/patches/poppler-0.60.1/series b/patches/poppler-0.60.1/series
new file mode 100644
index 000000000..5112de303
--- /dev/null
+++ b/patches/poppler-0.60.1/series
@@ -0,0 +1,5 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-CMake-add-the-custom-buildtests-target-only-once.patch
+0002-CMake-make-FindLCMS.cmake-cross-compatible.patch
+# 288cf8b3409fa56f32b01aca61acb352  - git-ptx-patches magic
diff --git a/rules/poppler.in b/rules/poppler.in
index b107dc7a5..57ea763e1 100644
--- a/rules/poppler.in
+++ b/rules/poppler.in
@@ -3,24 +3,37 @@
 menuconfig POPPLER
 	tristate
 	prompt "poppler                       "
+	select HOST_CMAKE
 	select FONTCONFIG
+	select FREETYPE
 	select HOST_GETTEXT
-	select GLIB		if POPPLER_GLIB
-	select LIBPNG		if POPPLER_PNG
-	select LIBJPEG		if POPPLER_JPEG
-	select CAIRO		if POPPLER_CAIRO
-	select GTK		if POPPLER_SPLASH && POPPLER_GLIB
-	select ZLIB		if POPPLER_ZLIB
-	select LIBCURL		if POPPLER_CURL
-	select LCMS		if POPPLER_CMS
-	select QT4		if POPPLER_QT4
-	select QT4_BUILD_GUI	if POPPLER_QT4
-	select QT4_BUILD_XML	if POPPLER_QT4
+	select POPPLER_DATA			if POPPLER_WITH_DATA
+	select GLIB				if POPPLER_GLIB
+	select HOST_GLIB			if POPPLER_GLIB
+	select GOBJECT_INTROSPECTION_HELPER	if POPPLER_INTROSPECTION
+	select GOBJECT_INTROSPECTION		if POPPLER_INTROSPECTION
+	select LIBPNG				if POPPLER_PNG
+	select LIBJPEG				if POPPLER_JPEG
+	select CAIRO				if POPPLER_CAIRO
+	select CAIRO_FREETYPE			if POPPLER_CAIRO
+	select ZLIB				if POPPLER_ZLIB
+	select LIBCURL				if POPPLER_CURL
+	select LCMS				if POPPLER_CMS
+	select QT4				if POPPLER_QT4
+	select QT4_BUILD_GUI			if POPPLER_QT4
+	select QT4_BUILD_XML			if POPPLER_QT4
+	select QT4_BUILD_QTESTLIB		if POPPLER_QT4
+	select QT5				if POPPLER_QT5
+	select QT5_GUI				if POPPLER_QT5
+	select QT5_MODULE_QTBASE		if POPPLER_QT5
+	select QT5_MODULE_QTBASE_WIDGETS	if POPPLER_QT5
 	help
 	  Poppler is a PDF rendering library based on the xpdf-3.0 code base.
 
 if POPPLER
 
+comment "--- Install components ---"
+
 config POPPLER_BIN
 	bool
 	prompt "install poppler utilities"
@@ -29,65 +42,138 @@ config POPPLER_BIN
 	  pdffonts, pdfimages, pdfinfo, pdftoabw, pdftohtml, pdftoppm, pdftops,
 	  pdftotext.
 
+config POPPLER_XPDF
+	bool
+
+config POPPLER_WITH_DATA
+	bool
+	prompt "install poppler-data"
+	help
+	  poppler-data contains the encoding files which enable poppler to
+	  correctly render CJK and Cyrillic.
+
+comment "--- Wrappers ---"
+
+config POPPLER_CPP
+	bool
+	prompt "enable CPP wrapper"
+
 config POPPLER_GLIB
 	select POPPLER_CAIRO
 	bool
-	prompt "enable poppler glib wrapper"
+	prompt "enable Glib wrapper"
 	help
 	  build poppler glib wrapper.
 
+config POPPLER_INTROSPECTION
+	select POPPLER_GLIB
+	bool
+
 config POPPLER_QT4
 	bool
-	prompt "enable poppler Qt4 wrapper"
+	prompt "enable Qt4 wrapper"
 	help
 	  build poppler Qt4 wrapper.
 
-comment "least one graphics backend should be selected"
+config POPPLER_QT5
+	bool
+	prompt "enable Qt5 wrapper"
+	help
+	  build poppler Qt5 wrapper.
+
+comment "--- Rendering Backends ---"
+
+comment "at least one rendering backend should be selected"
 	depends on !(POPPLER_CAIRO || POPPLER_SPLASH)
 
 config POPPLER_CAIRO
 	bool
-	prompt "enable poppler cairo graphics backend"
+	prompt "enable cairo backend"
 	help
-	  built cairo graphics backend
+	  build cairo graphics backend
 
 config POPPLER_SPLASH
 	bool
-	prompt "enable poppler Splash graphics backend"
+	prompt "enable Splash backend"
 	help
-	  build splash graphics backend
+	  build the Splash graphics backend
+
+if POPPLER_SPLASH
+
+config POPPLER_SPLASH_CMYK
+	bool
+	prompt "enable CMYK raster support"
+
+config POPPLER_SPLASH_SINGLE
+	bool
+	prompt "use single precision float arithmetic"
+	help
+	  Use single precision instead of double precision floating point
+	  arithmetic in Splash backend
+
+config POPPLER_SPLASH_FIXED
+	bool
+	prompt "use fixed point arithmetic"
+	depends on !POPPLER_SPLASH_SINGLE
+	help
+	  If enabled, the Splash backend will use floating point operations
+	  instead of fixed-point arithmetic.
+
+endif # POPPLER_SPLASH
+
+comment "--- Features --- "
 
 config POPPLER_PNG
 	bool
-	# fails to build with the current libpng
-	depends on BROKEN
-	prompt "enable poppler png support"
+	prompt "enable PNG support"
 	help
-	  compiles poppler with png support.
+	  compile poppler with png support via libpng
 
 config POPPLER_JPEG
 	bool
+	prompt "enable JPEG support"
+	help
+	  compile poppler with jpeg support via libjpeg
+
+config POPPLER_OPENJPEG
+	bool
 	depends on BROKEN
-	prompt "enable poppler jpeg support"
+	prompt "enable JPEG2000 support"
 	help
-	  compiles poppler with jpeg support.
+	  compile poppler with jpeg2000 (JPX) support via libopenjpeg
+
+config POPPLER_TIFF
+	bool
+	depends on BROKEN
+	prompt "enable TIFF support"
+	help
+	  compile poppler with support for TIFF via libtiff
+
+config POPPLER_NSS
+	bool
+	depends on BROKEN
+	prompt "enable NSS support"
+	help
+	  compile poppler with support for signed PDFs via libnss
 
 config POPPLER_ZLIB
 	bool
-	prompt "enable poppler zlib support"
+	prompt "enable zlib support"
 	help
-	  compiles poppler with zlib support.
+	  compile poppler with zlib support.
 
 config POPPLER_CURL
 	bool
-	prompt "enable poppler curl support"
+	prompt "enable curl support"
 	help
-	  compiles poppler with curl support.
+	  compile poppler with libcurl support.
 
 config POPPLER_CMS
 	bool
-	prompt "enable poppler cms support"
+	prompt "enable color management support"
 	help
-	  compiles poppler with color management system support.
+	  compile poppler with color management support via libcms1
 
 endif
+
+# vim: ft=kconfig ts=8 noet tw=80
diff --git a/rules/poppler.make b/rules/poppler.make
index 7ac676bf1..bc38f9beb 100644
--- a/rules/poppler.make
+++ b/rules/poppler.make
@@ -2,13 +2,19 @@
 #
 # Copyright (C) 2007 by Luotao Fu <l.fu@pengutronix.de>
 #               2009 by Robert Schwebel
+#               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.
 #
-
+# TODOs for improvement:
+# - package libnss for signature support in PDFs
+# - package libtiff for additional TIFF support
+# - runtime-test the Qt5 backend
+# - package libopenjpeg and build with --enable-libopenjpeg
+# - update lcms to lcms2 and use --enable-cms=lcms2
 #
 # We provide this package
 #
@@ -17,13 +23,14 @@ PACKAGES-$(PTXCONF_POPPLER) += poppler
 #
 # Paths and names
 #
-POPPLER_VERSION	:= 0.18.0
-POPPLER_MD5	:= 4cd3bf2a0a13fa8eaf00d31368915f77
+POPPLER_VERSION	:= 0.60.1
+POPPLER_MD5	:= 7648416d51a6e9fbc4a75b6f8b53dd7c
 POPPLER		:= poppler-$(POPPLER_VERSION)
-POPPLER_SUFFIX	:= tar.gz
+POPPLER_SUFFIX	:= tar.xz
 POPPLER_URL	:= http://poppler.freedesktop.org/$(POPPLER).$(POPPLER_SUFFIX)
 POPPLER_SOURCE	:= $(SRCDIR)/$(POPPLER).$(POPPLER_SUFFIX)
 POPPLER_DIR	:= $(BUILDDIR)/$(POPPLER)
+POPPLER_LICENSE	:= GPL-2.0 OR GPL-3.0
 
 # ----------------------------------------------------------------------------
 # Prepare
@@ -35,34 +42,43 @@ POPPLER_ENV 	:= $(CROSS_ENV)
 #
 # autoconf
 #
-POPPLER_AUTOCONF := \
-	$(CROSS_AUTOCONF_USR) \
-	$(GLOBAL_LARGE_FILE_OPTION) \
-	--disable-xpdf-headers \
-	--$(call ptx/disen, PTXCONF_HAS_HARDFLOAT)-single-precision \
-	--disable-fixedpoint \
-	--disable-libopenjpeg \
-	--disable-libtiff \
-	--$(call ptx/endis, PTXCONF_POPPLER_ZLIB)-zlib \
-	--$(call ptx/endis, PTXCONF_POPPLER_CURL)-libcurl \
-	--$(call ptx/endis, PTXCONF_POPPLER_JPEG)-libjpeg \
-	--$(call ptx/endis, PTXCONF_POPPLER_PNG)-libpng \
-	--$(call ptx/endis, PTXCONF_POPPLER_SPLASH)-splash-output \
-	--$(call ptx/endis, PTXCONF_POPPLER_CAIRO)-cairo-output \
-	--$(call ptx/endis, PTXCONF_POPPLER_GLIB)-poppler-glib \
-	--disable-introspection \
-	--disable-gtk-doc \
-	--disable-gtk-doc-html \
-	--disable-gtk-doc-pdf \
-	--$(call ptx/endis, PTXCONF_POPPLER_QT4)-poppler-qt4 \
-	--disable-poppler-cpp \
-	--disable-gtk-test \
-	--$(call ptx/endis, PTXCONF_POPPLER_BIN)-utils \
-	--disable-compile-warnings \
-	--$(call ptx/endis, PTXCONF_POPPLER_CMS)-cms \
-	--without-x \
-	--with-font-configuration=fontconfig \
-	--without-libiconv-prefix
+POPPLER_CONF_TOOL	:= cmake
+POPPLER_CONF_OPT	:= \
+	$(CROSS_CMAKE_USR) \
+	-DBUILD_SHARED_LIBS=ON \
+	-DEXTRA_WARN=NO \
+	-DFONT_CONFIGURATION=fontconfig \
+	-DENABLE_UTILS=$(call ptx/onoff,PTXCONF_POPPLER_BIN) \
+	-DENABLE_XPDF_HEADERS=$(call ptx/onoff,PTXCONF_POPPLER_XPDF) \
+	-DENABLE_CPP=$(call ptx/onoff,PTXCONF_POPPLER_CPP) \
+	-DWITH_Iconv=ON \
+	-DBUILD_CPP_TESTS=NO \
+	-DENABLE_GLIB=$(call ptx/onoff,PTXCONF_POPPLER_GLIB) \
+	-DWITH_GLIB=$(call ptx/onoff,PTXCONF_POPPLER_GLIB) \
+	-DWITH_GObjectIntrospection=$(call ptx/onoff,PTXCONF_POPPLER_INTROSPECTION) \
+	-DENABLE_QT4=$(call ptx/onoff,PTXCONF_POPPLER_QT4) \
+	-DWITH_Qt4=$(call ptx/onoff,PTXCONF_POPPLER_QT4) \
+	-DBUILD_QT4_TESTS=NO \
+	-DENABLE_QT5=$(call ptx/onoff,PTXCONF_POPPLER_QT5) \
+	-DBUILD_QT5_TESTS=NO \
+	-DWITH_Cairo=$(call ptx/onoff,PTXCONF_POPPLER_CAIRO) \
+	-DWITH_GTK=NO \
+	-DBUILD_GTK_TESTS=NO \
+	-DENABLE_GTK_DOC=NO \
+	-DENABLE_SPLASH=$(call ptx/onoff,PTXCONF_POPPLER_SPLASH) \
+	-DSPLASH_CMYK=$(call ptx/onoff,PTXCONF_POPPLER_SPLASH_CMYK) \
+	-DUSE_FLOAT=$(call ptx/onoff,PTXCONF_POPPLER_SINGLE) \
+	-DUSE_FIXEDPOINT=$(call ptx/onoff,PTXCONF_POPPLER_FIXED) \
+	-DWITH_PNG=$(call ptx/onoff,PTXCONF_POPPLER_PNG) \
+	-DWITH_JPEG=$(call ptx/onoff,PTXCONF_POPPLER_JPEG) \
+	-DENABLE_DCTDECODER=$(call ptx/ifdef,PTXCONF_POPPLER_JPEG,libjpeg,none) \
+	-DENABLE_LIBOPENJPEG=$(call ptx/ifdef,PTXCONF_POPPLER_OPENJPEG,openjpeg2,none) \
+	-DWITH_TIFF=$(call ptx/onoff,PTXCONF_POPPLER_TIFF) \
+	-DWITH_NSS3=$(call ptx/onoff,PTXCONF_POPPLER_NSS) \
+	-DENABLE_ZLIB=$(call ptx/onoff,PTXCONF_POPPLER_ZLIB) \
+	-DENABLE_ZLIB_UNCOMPRESS=NO \
+	-DENABLE_LIBCURL=$(call ptx/onoff,PTXCONF_POPPLER_CURL) \
+	-DENABLE_CMS=$(call ptx/ifdef,PTXCONF_POPPLER_CMS,lcms1,)
 
 # ----------------------------------------------------------------------------
 # Target-Install
@@ -85,12 +101,24 @@ ifdef PTXCONF_POPPLER_BIN
 		$(call install_copy, poppler, 0, 0, 0755, -, /usr/bin/$$i); \
 	done
 endif
+ifdef PTXCONF_POPPLER_CPP
+	@$(call install_lib, poppler, 0, 0, 0644, libpoppler-cpp)
+endif
 ifdef PTXCONF_POPPLER_GLIB
 	@$(call install_lib, poppler, 0, 0, 0644, libpoppler-glib)
 endif
 ifdef PTXCONF_POPPLER_QT4
 	@$(call install_lib, poppler, 0, 0, 0644, libpoppler-qt4)
 endif
+ifdef PTXCONF_POPPLER_QT5
+	@$(call install_lib, poppler, 0, 0, 0644, libpoppler-qt5)
+endif
+ifdef PTXCONF_POPPLER_INTROSPECTION
+	@$(call install_copy, poppler, 0, 0, 0644, -, \
+		/usr/share/gir-1.0/Poppler-0.18.gir)
+	@$(call install_copy, poppler, 0, 0, 0644, -, \
+		/usr/lib/girepository-1.0/Poppler-0.18.typelib)
+endif
 	@$(call install_finish, poppler)
 
 	@$(call touch)
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ptxdist] [PATCH v4 5/7] cups: new package: Common Unix Printing System
  2017-11-07 16:40 [ptxdist] [PATCH v4 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
                   ` (2 preceding siblings ...)
  2017-11-07 16:40 ` [ptxdist] [PATCH v4 4/7] poppler: version bump 0.18.0 -> 0.60.1 Roland Hieber
@ 2017-11-07 16:40 ` Roland Hieber
  2017-11-07 16:40 ` [ptxdist] [PATCH v4 6/7] host-cups: new package: CUPS host tools Roland Hieber
  2017-11-07 16:40 ` [ptxdist] [PATCH v4 7/7] cups-filters: new package: additional filters and backends for CUPS Roland Hieber
  5 siblings, 0 replies; 7+ messages in thread
From: Roland Hieber @ 2017-11-07 16:40 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

If using systemd, CUPS can be started via socket activation or directly,
in any case it is run as user daemon, group lp. The default spool and
cache locations were moved to /tmp/cups so we don't need to set up a
tmpfs for /var/spool/cups and /var/cache/cups.

sysvinit script is installed from upstream, but untested.

Some config files are only created by cupsd on the first start and not
at install time, so we supply reasonable defaults in projectroot/ in
order to use $(call install_alternative...) on them.

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

Notes:
    changes in v3 -> v4:
     - remove leftover 2.2.4 patches from last bump, all merged upstream
     - improve dependency handling for scripting languages:
       * don't depend on x86-only Oracle Java, remind the user to install
         Java if needed, and make path to Java interpreter configurable
       * introduce choices between php5-cli and php5-cgi for CUPS_PHP, and
         between python2 and python3 for CUPS_PYTHON. This way third-party
         packages can still depend on CUPS_PYTHON or CUPS_PHP if needed.
       * make all scripting languages a RUNTIME dependency
       * wrap everything into a "if CUPS_WEBINTERFACE ... endif" block
     - improve wording in CUPS_WEBINTERFACE help
     - install libraries as mode 0644, not 0755

 projectroot/etc/cups/classes.conf               |   1 +
 projectroot/etc/cups/client.conf                |   2 +
 projectroot/etc/cups/cups-files.conf            |  22 +++
 projectroot/etc/cups/mailto.conf                |   1 +
 projectroot/etc/cups/ppd/.createdirectory       |   0
 projectroot/etc/cups/printers.conf              |   1 +
 projectroot/etc/cups/ssl/.createdirectory       |   0
 projectroot/etc/printcap                        |   3 +
 projectroot/usr/lib/systemd/system/cups.service |  15 ++
 projectroot/usr/lib/systemd/system/cups.socket  |  14 ++
 projectroot/usr/lib/tmpfiles.d/cups.conf        |   6 +
 rules/cups-bbinit.in                            |   8 +
 rules/cups.in                                   | 147 +++++++++++++++
 rules/cups.make                                 | 241 ++++++++++++++++++++++++
 14 files changed, 461 insertions(+)
 create mode 100644 projectroot/etc/cups/classes.conf
 create mode 100644 projectroot/etc/cups/client.conf
 create mode 100644 projectroot/etc/cups/cups-files.conf
 create mode 100644 projectroot/etc/cups/mailto.conf
 create mode 100644 projectroot/etc/cups/ppd/.createdirectory
 create mode 100644 projectroot/etc/cups/printers.conf
 create mode 100644 projectroot/etc/cups/ssl/.createdirectory
 create mode 100644 projectroot/etc/printcap
 create mode 100644 projectroot/usr/lib/systemd/system/cups.service
 create mode 100644 projectroot/usr/lib/systemd/system/cups.socket
 create mode 100644 projectroot/usr/lib/tmpfiles.d/cups.conf
 create mode 100644 rules/cups-bbinit.in
 create mode 100644 rules/cups.in
 create mode 100644 rules/cups.make

diff --git a/projectroot/etc/cups/classes.conf b/projectroot/etc/cups/classes.conf
new file mode 100644
index 000000000..dea737751
--- /dev/null
+++ b/projectroot/etc/cups/classes.conf
@@ -0,0 +1 @@
+# classes.conf - class configuration file for cups
diff --git a/projectroot/etc/cups/client.conf b/projectroot/etc/cups/client.conf
new file mode 100644
index 000000000..f8f0b6832
--- /dev/null
+++ b/projectroot/etc/cups/client.conf
@@ -0,0 +1,2 @@
+# CUPS client configuration
+ServerName localhost
diff --git a/projectroot/etc/cups/cups-files.conf b/projectroot/etc/cups/cups-files.conf
new file mode 100644
index 000000000..2cc2d5a5b
--- /dev/null
+++ b/projectroot/etc/cups/cups-files.conf
@@ -0,0 +1,22 @@
+# File/directory/user/group configuration file for the CUPS scheduler.
+User daemon
+Group lp
+SystemGroup root
+
+AccessLog /var/log/cups/access_log
+ErrorLog /var/log/cups/error_log
+PageLog /var/log/cups/page_log
+
+CacheDir /tmp/cups/cache
+DataDir /usr/share/cups
+DocumentRoot /usr/share/doc/cups
+RequestRoot /tmp/cups/spool
+ServerBin /usr/lib/cups
+ServerRoot /etc/cups
+StateDir /var/run/cups
+
+Printcap /etc/printcap
+PrintcapFormat bsd
+
+# SSL/TLS keychain for the scheduler...
+#ServerKeychain ssl
diff --git a/projectroot/etc/cups/mailto.conf b/projectroot/etc/cups/mailto.conf
new file mode 100644
index 000000000..4502adaee
--- /dev/null
+++ b/projectroot/etc/cups/mailto.conf
@@ -0,0 +1 @@
+# mailto.conf - configuration file for cups email notifier
diff --git a/projectroot/etc/cups/ppd/.createdirectory b/projectroot/etc/cups/ppd/.createdirectory
new file mode 100644
index 000000000..e69de29bb
diff --git a/projectroot/etc/cups/printers.conf b/projectroot/etc/cups/printers.conf
new file mode 100644
index 000000000..bf9879904
--- /dev/null
+++ b/projectroot/etc/cups/printers.conf
@@ -0,0 +1 @@
+# printers.conf - printer configuration file for cups
diff --git a/projectroot/etc/cups/ssl/.createdirectory b/projectroot/etc/cups/ssl/.createdirectory
new file mode 100644
index 000000000..e69de29bb
diff --git a/projectroot/etc/printcap b/projectroot/etc/printcap
new file mode 100644
index 000000000..e74f358e1
--- /dev/null
+++ b/projectroot/etc/printcap
@@ -0,0 +1,3 @@
+# This file was automatically generated by cupsd(8) from the
+# /etc/cups/printers.conf file.  All changes to this file
+# will be lost.
diff --git a/projectroot/usr/lib/systemd/system/cups.service b/projectroot/usr/lib/systemd/system/cups.service
new file mode 100644
index 000000000..ff94f69d2
--- /dev/null
+++ b/projectroot/usr/lib/systemd/system/cups.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=CUPS Scheduler service
+Documentation=man:cupsd(8)
+Requires=systemd-tmpfiles-setup.service
+Requires=cups.socket
+
+[Service]
+User=daemon
+Group=lp
+ExecStart=/usr/sbin/cupsd -l -c /etc/cups/cupsd.conf -s /etc/cups/cups-files.conf
+Type=simple
+
+[Install]
+Also=cups.socket
+WantedBy=printer.target
diff --git a/projectroot/usr/lib/systemd/system/cups.socket b/projectroot/usr/lib/systemd/system/cups.socket
new file mode 100644
index 000000000..de9f43b6b
--- /dev/null
+++ b/projectroot/usr/lib/systemd/system/cups.socket
@@ -0,0 +1,14 @@
+[Unit]
+Description=CUPS Scheduler socket
+PartOf=cups.service
+
+[Socket]
+ListenStream=/run/cups.sock
+ListenStream=[::1]:631
+ListenStream=127.0.0.1:631
+BindIPv6Only=No
+SocketUser=daemon
+SocketGroup=lp
+
+[Install]
+WantedBy=sockets.target
diff --git a/projectroot/usr/lib/tmpfiles.d/cups.conf b/projectroot/usr/lib/tmpfiles.d/cups.conf
new file mode 100644
index 000000000..c000cf255
--- /dev/null
+++ b/projectroot/usr/lib/tmpfiles.d/cups.conf
@@ -0,0 +1,6 @@
+#Type	Path			Mode	UID	GID	Age	Argument
+d	/var/log/cups		750	daemon	lp	-
+d	/tmp/cups/cache/	750	daemon	lp	-
+d	/tmp/cups/spool/	750	daemon	lp	-
+d	/tmp/cups/spool/tmp/	750	daemon	lp	-
+d	/var/run/cups		750	daemon	lp	-
diff --git a/rules/cups-bbinit.in b/rules/cups-bbinit.in
new file mode 100644
index 000000000..86b6f649a
--- /dev/null
+++ b/rules/cups-bbinit.in
@@ -0,0 +1,8 @@
+## SECTION=initmethod_bbinit
+
+config CUPS_BBINIT_LINK
+        string "cups"
+        depends on CUPS_STARTSCRIPT
+        default "S90cups"
+
+# vim: ft=kconfig ts=8 noet tw=80
diff --git a/rules/cups.in b/rules/cups.in
new file mode 100644
index 000000000..f7696468a
--- /dev/null
+++ b/rules/cups.in
@@ -0,0 +1,147 @@
+## SECTION=applications
+
+menuconfig CUPS
+	tristate
+	prompt "cups                          "
+
+	select ROOTFS_VAR_LOG
+	select ROOTFS_VAR_RUN
+	select LIBC_M
+	select LIBC_CRYPT
+	select ZLIB
+
+	select LIBC_PTHREAD		if CUPS_THREADING
+	select SYSTEMD			if CUPS_SYSTEMD_UNIT
+	select LIBPAPER			if CUPS_LIBPAPER
+	select LIBUSB			if CUPS_LIBUSB
+	select DBUS			if CUPS_DBUS
+	select GNUTLS			if CUPS_SSL
+	select AVAHI			if CUPS_AVAHI
+	select AVAHI_LIBAVAHI_CLIENT	if CUPS_AVAHI
+	select PERL			if CUPS_PERL && RUNTIME
+	select PHP5			if CUPS_PHP && RUNTIME
+	select PHP5_SAPI_CLI		if CUPS_PHP5_CLI && RUNTIME
+	select PHP5_SAPI_CGI		if CUPS_PHP5_CGI && RUNTIME
+	select PYTHON			if CUPS_PYTHON && CUPS_PYTHON2 && RUNTIME
+	select PYTHON3			if CUPS_PYTHON && CUPS_PYTHON3 && RUNTIME
+
+	help
+	  CUPS is the standards-based, open source printing system. It uses the
+	  Internet Printing Protocol (IPP) to support printing to local and
+	  network printers.
+
+if CUPS
+
+comment "--- CUPS Features ---"
+
+config CUPS_WEBINTERFACE
+	bool "enable web interface"
+	help
+	   Enable CUPS printer management via HTTP(S). Useful for hosts which
+	   should act as a print server, but can also serve as a GUI for CUPS.
+
+	   If you overwrite /etc/cups/cupsd.conf in your projectroot, be sure to
+	   set "WebInterface Yes" to enable it.
+
+if CUPS_WEBINTERFACE
+
+config CUPS_JAVA
+	bool "enable Java support for web interface"
+
+if CUPS_JAVA
+	comment "Please remember to install a suitable Java interpreter!"
+
+config CUPS_JAVA_PATH
+	string "path to Java interpreter"
+	default "/usr/bin/java"
+endif
+
+config CUPS_PERL
+	bool "enable Perl support for web interface"
+
+config CUPS_PHP
+	bool "enable PHP support for web interface"
+
+if CUPS_PHP
+choice
+	prompt "PHP interpreter"
+	default CUPS_PHP5_CLI
+
+config CUPS_PHP5_CLI
+	bool "php5-cli"
+
+config CUPS_PHP5_CGI
+	bool "php5-cgi"
+
+endchoice
+endif	# CUPS_PHP
+
+config CUPS_PYTHON
+	bool "enable Python support for web interface"
+
+if CUPS_PYTHON
+choice
+	prompt "Python interpreter"
+	default CUPS_PYTHON3
+
+config CUPS_PYTHON2
+	bool "python2"
+
+config CUPS_PYTHON3
+	bool "python3"
+
+endchoice
+endif # CUPS_PYTHON
+
+endif # CUPS_WEBINTERFACE
+
+config CUPS_SYSTEMD_UNIT
+	bool "install systemd unit file"
+	default y
+	depends on INITMETHOD_SYSTEMD
+	help
+	  Installs a systemd service file so that CUPS can be started as a
+	  systemd service.
+
+config CUPS_STARTSCRIPT
+	bool "install init.d script"
+	depends on INITMETHOD_BBINIT
+	help
+	  Install /etc/init.d/cups
+
+config CUPS_TEST_TOOLS
+	bool "install cupstest* tools"
+	default n
+	help
+	  Install cupstestdsc and cupstestppd on the target.
+
+comment "--- External Libraries ---"
+
+config CUPS_LIBPAPER
+	bool "libpaper support"
+	help
+	  Build with support for libpaper's collection of paper sizes
+
+config CUPS_LIBUSB
+	bool "libusb support"
+	help
+	  Build with libusb support. This is needed for the usb backend in order
+	  to use USB printers.
+
+config CUPS_DBUS
+	bool "dbus support"
+	help
+	  Builds CUPS with support for sending event notifications over DBUS
+
+config CUPS_SSL
+	bool "enable TLS support"
+	help
+	  Enables SSL support over IPP and HTTP, also for the web interface.
+
+config CUPS_AVAHI
+	bool "enable Avahi support"
+	help
+	  Enables support for discovery of network printers over Avahi/zeroconf.
+
+endif # CUPS
+# vim: ft=kconfig ts=8 noet tw=80
diff --git a/rules/cups.make b/rules/cups.make
new file mode 100644
index 000000000..7eb209e25
--- /dev/null
+++ b/rules/cups.make
@@ -0,0 +1,241 @@
+# -*-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_CUPS) += cups
+
+#
+# Paths and names
+#
+CUPS_VERSION	:= 2.2.5
+CUPS		:= cups-$(CUPS_VERSION)
+CUPS_MD5	:= 76294dff74c3baf3fdf7c626cd48b873
+CUPS_SUFFIX	:= tar.gz
+CUPS_URL	:= https://github.com/apple/cups/releases/download/v$(CUPS_VERSION)/$(CUPS)-source.$(CUPS_SUFFIX)
+CUPS_SOURCE	:= $(SRCDIR)/$(CUPS)-source.$(CUPS_SUFFIX)
+CUPS_DIR	:= $(BUILDDIR)/cups-$(CUPS_VERSION)
+CUPS_LICENSE	:= LGPL-2.0 AND GPL-2.0
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+CUPS_CONF_ENV	:= \
+	$(CROSS_ENV) \
+	DSTROOT=$(CUPS_PKGDIR)
+
+#
+# autoconf
+#
+# The --with-* options are only used to specify strings, --without-* does
+# mostly nothing. So we're omitting them here.
+#
+# --enable-mallinfo is currently broken, see
+#  https://github.com/apple/cups/issues/5051
+#
+# libtool support is unsupported upstream. Don't enable it, it will break
+# things, until https://github.com/apple/cups/pull/5062 is merged.
+#
+# --disable-dnssd only refers to Apple's mDNSResponder, not Avahi.
+#
+# Java, PHP, Perl and Python support for the webinterface is only a runtime
+# option, there are no real bindings for it except calling the interpreters.
+#
+CUPS_CONF_TOOL	:= autoconf
+CUPS_CONF_OPT	:= \
+	$(CROSS_AUTOCONF_USR) \
+	--disable-static \
+	--disable-mallinfo \
+	--$(call ptx/endis,PTXCONF_CUPS_LIBPAPER)-libpaper \
+	--$(call ptx/endis,PTXCONF_CUPS_LIBUSB)-libusb \
+	--disable-tcp-wrappers \
+	--disable-acl \
+	--$(call ptx/endis,PTXCONF_CUPS_DBUS)-dbus \
+	--enable-shared \
+	--disable-libtool-unsupported \
+	--disable-debug \
+	--disable-debug-guards \
+	--disable-debug-printfs \
+	--disable-unit-tests \
+	--$(call ptx/endis,PTXCONF_TARGET_HARDEN_RELRO)-relro \
+	--disable-gssapi \
+	--enable-threads \
+	--$(call ptx/endis,PTXCONF_CUPS_SSL)-ssl \
+	--disable-cdsassl \
+	--$(call ptx/endis,PTXCONF_CUPS_SSL)-gnutls \
+	--disable-pam \
+	$(GLOBAL_LARGE_FILE_OPTION) \
+	--$(call ptx/endis,PTXCONF_CUPS_AVAHI)-avahi \
+	--disable-dnssd \
+	--disable-launchd \
+	--$(call ptx/endis,PTXCONF_CUPS_SYSTEMD_UNIT)-systemd \
+	--disable-upstart
+
+# Default config file settings (probably overwritten via projectroot anyways...)
+CUPS_CONF_OPT	+= \
+	--disable-page-logging \
+	--disable-browsing \
+	--disable-default-shared \
+	--disable-raw-printing \
+	--$(call ptx/endis,PTXCONF_CUPS_WEBINTERFACE)-webif \
+	--with-components=all \
+	--with-cachedir=/var/cache \
+	--with-logdir=/var/log \
+	--with-rundir=/run \
+	--with-rcdir=/etc \
+	--with-languages=none \
+	--with-cups-user=daemon \
+	--with-cups-group=lp
+
+# Scripting languages integrations
+CUPS_PHP_PATH	:= \
+	$(if PTXCONF_CUPS_PHP5_CLI,/usr/bin/php, \
+	$(if PTXCONF_CUPS_PHP5_CGI,/usr/bin/php-cgi))
+CUPS_PYTHON_PATH	:= \
+	$(if PTXCONF_CUPS_PYTHON2,/usr/bin/python2, \
+	$(if PTXCONF_CUPS_PYTHON3,/usr/bin/python3))
+
+CUPS_CONF_OPT	+= \
+	$(call ptx/ifdef,PTXCONF_CUPS_JAVA,--with-java=$(PTXCONF_CUPS_JAVA_PATH),--without-java) \
+	$(call ptx/ifdef,PTXCONF_CUPS_PERL,--with-perl=/usr/bin/perl,--without-perl) \
+	$(call ptx/ifdef,PTXCONF_CUPS_PHP,--with-php=$(CUPS_PHP_PATH),--without-php) \
+	$(call ptx/ifdef,PTXCONF_CUPS_PYTHON,--with-python=$(CUPS_PYTHON_PATH),--without-python)
+
+# ----------------------------------------------------------------------------
+# Compile & Install
+# ----------------------------------------------------------------------------
+
+CUPS_MAKE_ENV	:= \
+	DSTROOT=$(CUPS_PKGDIR)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+# CUPS drops many files into its PKGDIR, but instead of patching the build
+# system, be explicitly picky about what to install.
+
+$(STATEDIR)/cups.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, cups)
+	@$(call install_fixup, cups,PRIORITY,optional)
+	@$(call install_fixup, cups,SECTION,base)
+	@$(call install_fixup, cups,AUTHOR,"Roland Hieber <r.hieber@pengutronix.de>")
+	@$(call install_fixup, cups,DESCRIPTION,missing)
+
+# ----- config files, install as daemon:lp
+	@$(call install_copy, cups, daemon, lp, 750, /etc/cups)
+	@$(call install_alternative, cups, daemon, lp, 0640, /etc/cups/cups-files.conf)
+	@$(call install_alternative, cups, daemon, lp, 0640, /etc/cups/cupsd.conf)
+	@$(call install_alternative, cups, daemon, lp, 0600, /etc/cups/classes.conf)
+	@$(call install_alternative, cups, daemon, lp, 0600, /etc/cups/client.conf)
+	@$(call install_alternative, cups, daemon, lp, 0640, /etc/cups/mailto.conf)
+	@$(call install_copy, cups, daemon, lp, 0750, /etc/cups/ppd/)
+	@$(call install_alternative_tree, cups, daemon, lp,  /etc/cups/ppd/)
+	@$(call install_alternative, cups, daemon, lp, 0600, /etc/cups/printers.conf)
+	@$(call install_alternative, cups, daemon, lp, 0640, /etc/cups/snmp.conf)
+	@$(call install_alternative, cups, daemon, lp, 0640, /etc/printcap)
+	@$(call install_alternative, cups, root, root, 0644, /usr/share/cups/mime/mime.convs)
+	@$(call install_alternative, cups, root, root, 0644, /usr/share/cups/mime/mime.types)
+
+ifdef PTXCONF_CUPS_SSL
+	@$(call install_copy, cups, daemon, lp, 0750, /etc/cups/ssl/)
+	@$(call install_alternative_tree, cups, daemon, lp, /etc/cups/ssl/)
+endif
+
+ifdef PTXCONF_CUPS_DBUS
+	@$(call install_alternative, cups, root, root, 0644, /etc/dbus-1/system.d/cups.conf)
+endif
+
+# ----- libraries
+	@$(call install_lib, cups, root, root, 0644, libcups)
+	@$(call install_lib, cups, root, root, 0644, libcupsimage)
+	@$(call install_lib, cups, root, root, 0644, libcupsmime)
+	@$(call install_lib, cups, root, root, 0644, libcupsppdc)
+
+# ----- user and system binaries, with the correct access rights
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/cancel)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/cups-config)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/ipptool)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/lp)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/lpoptions)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/lpq)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/lpr)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/lprm)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/lpstat)
+
+	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/cupsaccept)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/cupsaddsmb)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/cupsctl)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/cupsd)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/cupsfilter)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/lpadmin)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/lpc)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/lpinfo)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/lpmove)
+
+	@$(call install_link, cups, cupsaccept, /usr/sbin/accept)
+	@$(call install_link, cups, cupsaccept, /usr/sbin/cupsdisable)
+	@$(call install_link, cups, cupsaccept, /usr/sbin/cupsenable)
+	@$(call install_link, cups, cupsaccept, /usr/sbin/cupsreject)
+	@$(call install_link, cups, cupsaccept, /usr/sbin/reject)
+
+ifdef PTXCONF_CUPS_TEST_TOOLS
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/cupstestdsc)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/cupstestppd)
+endif
+
+# ----- backends, filters, cgi-bin (if enabled), etc.
+	@$(call install_tree, cups, root, root, -, /usr/lib/cups/backend)
+	@$(call install_tree, cups, root, root, -, /usr/lib/cups/daemon)
+	@$(call install_tree, cups, root, root, -, /usr/lib/cups/filter)
+	@$(call install_tree, cups, root, root, -, /usr/lib/cups/monitor)
+	@$(call install_tree, cups, root, root, -, /usr/lib/cups/notifier)
+
+ifdef PTXCONF_CUPS_LIBUSB
+	@$(call install_alternative, cups, root, root, 0644, \
+		/usr/share/cups/usb/org.cups.usb-quirks)
+endif
+
+ifdef PTXCONF_CUPS_WEBINTERFACE
+	@$(call install_lib, cups, root, root, 0644, libcupscgi)
+	@$(call install_tree, cups, root, root, -, /usr/lib/cups/cgi-bin)
+	@$(call install_tree, cups, root, root, -, /usr/share/cups/templates)
+	@$(call install_tree, cups, root, root, -, /usr/share/doc/cups)
+endif
+
+# ----- startup files
+ifdef PTXCONF_CUPS_SYSTEMD_UNIT
+	@$(call install_alternative, cups, root, root, 0644, \
+		/usr/lib/tmpfiles.d/cups.conf)
+	@$(call install_alternative, cups, root, root, 0644, \
+		/usr/lib/systemd/system/cups.service)
+	@$(call install_alternative, cups, root, root, 0644, \
+		/usr/lib/systemd/system/cups.socket)
+	@$(call install_link, cups, ../cups.service, \
+		/usr/lib/systemd/system/printer.target.wants/cups.service)
+	@$(call install_link, cups, ../cups.socket, \
+		/usr/lib/systemd/system/sockets.target.wants/cups.socket)
+endif
+
+ifdef PTXCONF_CUPS_STARTSCRIPT
+	@$(call install_alternative, cups, root, root, 0755, /etc/init.d/cups)
+	@$(call install_link, cups, ../init.d/cups, \
+		/etc/rc.d/$(PTXCONF_CUPS_BBINIT_LINK))
+endif
+
+	@$(call install_finish, cups)
+
+	@$(call touch)
+
+# vim: ft=make ts=8 tw=80
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ptxdist] [PATCH v4 6/7] host-cups: new package: CUPS host tools
  2017-11-07 16:40 [ptxdist] [PATCH v4 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
                   ` (3 preceding siblings ...)
  2017-11-07 16:40 ` [ptxdist] [PATCH v4 5/7] cups: new package: Common Unix Printing System Roland Hieber
@ 2017-11-07 16:40 ` Roland Hieber
  2017-11-07 16:40 ` [ptxdist] [PATCH v4 7/7] cups-filters: new package: additional filters and backends for CUPS Roland Hieber
  5 siblings, 0 replies; 7+ messages in thread
From: Roland Hieber @ 2017-11-07 16:40 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

Most printer drivers compile model-specific PPDs from a generic schema
during the build process, using ppdc, the PPD compiler. ppdc must be
able to find CUPS' internal include files, which are architecture-
independent and can be used from sysroot-host.

Unfortunately, the CUPS build system is rather inflexible, so we have to
build the whole core distribution to get a working ppdc.

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

Notes:
    changes in v3 -> v4:
     - adjust formatting, use := instead of =

 rules/host-cups.in   |   7 ++++
 rules/host-cups.make | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 121 insertions(+)
 create mode 100644 rules/host-cups.in
 create mode 100644 rules/host-cups.make

diff --git a/rules/host-cups.in b/rules/host-cups.in
new file mode 100644
index 000000000..45edccada
--- /dev/null
+++ b/rules/host-cups.in
@@ -0,0 +1,7 @@
+## SECTION=hosttools_noprompt
+
+config HOST_CUPS
+	tristate
+	default ALLYES
+
+# vim: ft=kconfig ts=8 noet tw=80
diff --git a/rules/host-cups.make b/rules/host-cups.make
new file mode 100644
index 000000000..af757b331
--- /dev/null
+++ b/rules/host-cups.make
@@ -0,0 +1,114 @@
+# -*-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
+#
+HOST_PACKAGES-$(PTXCONF_HOST_CUPS) += host-cups
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+# The --with-* options are only used to specify strings, --without-* does
+# nothing. So we're omitting them here. The only exception is
+# --with-components=core, which we are setting to only builds libcups* (which is
+# needed by ppdc).
+#
+# --libdir has to end with a /, otherwise due to broken autoconf magic, the libs
+# end up in ${prefix}/lib64, which is not what we want.
+#
+HOST_CUPS_CONF_TOOL	:= autoconf
+HOST_CUPS_CONF_OPT	:= \
+	$(HOST_AUTOCONF) \
+	--libdir=/lib/ \
+	--disable-mallinfo \
+	--disable-libpaper \
+	--disable-libusb \
+	--disable-tcp-wrappers \
+	--disable-acl \
+	--disable-dbus \
+	--disable-libtool-unsupported \
+	--disable-debug \
+	--disable-debug-guards \
+	--disable-debug-printfs \
+	--disable-unit-tests \
+	--disable-relro \
+	--disable-gssapi \
+	--enable-threads \
+	--disable-ssl \
+	--disable-cdsassl \
+	--disable-gnutls \
+	--disable-pam \
+	--disable-largefile \
+	--disable-avahi \
+	--disable-dnssd \
+	--disable-launchd \
+	--disable-systemd \
+	--disable-upstart \
+	--disable-page-logging \
+	--disable-browsing \
+	--disable-default-shared \
+	--disable-raw-printing \
+	--disable-webif \
+	--with-components=core
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/host-cups.compile:
+	@$(call targetinfo)
+	@$(call world/compile, HOST_CUPS)
+	@# ppdc isn't built by --with-components=core
+	@$(call compile, HOST_CUPS, -C ${HOST_CUPS_DIR}/ppdc)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+HOST_CUPS_MAKE_ENV := \
+	DSTROOT=$(HOST_CUPS_PKGDIR)
+
+$(STATEDIR)/host-cups.install:
+	@$(call targetinfo)
+	@$(call world/install, HOST_CUPS)
+	@# ppdc isn't included in --with-components=core
+	@$(call compile, HOST_CUPS, -C ${HOST_CUPS_DIR}/ppdc install)
+	@$(call touch)
+
+CROSS_PPDC := $(PTXDIST_SYSROOT_CROSS)/bin/ppdc
+
+$(STATEDIR)/host-cups.install.post:
+	@$(call targetinfo)
+	@$(call world/install.post, HOST_CUPS)
+
+	@( \
+		echo '#!/bin/sh'; \
+		echo 'CUPS_DATADIR=$(PTXDIST_SYSROOT_HOST)/share/cups $(PTXDIST_SYSROOT_HOST)/bin/ppdc "$$@"'; \
+	) > $(CROSS_PPDC)
+	@chmod +x $(CROSS_PPDC)
+
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/host-cups.clean:
+	@$(call targetinfo)
+	@$(call clean_pkg, HOST_CUPS)
+	@rm -vf $(CROSS_PPDC)
+
+# vim: ft=make ts=8 tw=80
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ptxdist] [PATCH v4 7/7] cups-filters: new package: additional filters and backends for CUPS
  2017-11-07 16:40 [ptxdist] [PATCH v4 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
                   ` (4 preceding siblings ...)
  2017-11-07 16:40 ` [ptxdist] [PATCH v4 6/7] host-cups: new package: CUPS host tools Roland Hieber
@ 2017-11-07 16:40 ` Roland Hieber
  5 siblings, 0 replies; 7+ messages in thread
From: Roland Hieber @ 2017-11-07 16:40 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

Filters for a PDF-based printing workflow, and more backends for widely
available printing protocols. No PostScript and Foomatic support (yet)
because we are missing the respective dependencies in PTXdist.

Release frequency is high, with mostly small changes per release.

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

Notes:
    changes in v3 -> v4:
     - install libs as mode 0644, not 0755

 rules/cups-filters.in   | 73 +++++++++++++++++++++++++++++++++++++++
 rules/cups-filters.make | 90 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 163 insertions(+)
 create mode 100644 rules/cups-filters.in
 create mode 100644 rules/cups-filters.make

diff --git a/rules/cups-filters.in b/rules/cups-filters.in
new file mode 100644
index 000000000..b385d60cf
--- /dev/null
+++ b/rules/cups-filters.in
@@ -0,0 +1,73 @@
+## SECTION=applications
+
+menuconfig CUPS_FILTERS
+	tristate
+	prompt "cups-filters                  "
+
+	select LIBC_DL
+	select HOST_CUPS
+	select CUPS
+	select GLIB
+	select ZLIB
+	select LCMS
+	select FREETYPE
+	select FONTCONFIG
+	select QPDF
+
+	# Note: configure does not check for these poppler options:
+	select POPPLER			if CUPS_FILTERS_POPPLER
+	select POPPLER_BIN		if CUPS_FILTERS_POPPLER # for pdftops
+	select POPPLER_CPP		if CUPS_FILTERS_POPPLER
+	select POPPLER_CMS		if CUPS_FILTERS_POPPLER
+	select POPPLER_SPLASH		if CUPS_FILTERS_POPPLER
+	select POPPLER_XPDF		if CUPS_FILTERS_POPPLER
+
+	select LIBJPEG			if CUPS_FILTERS_JPEG
+	select LIBPNG			if CUPS_FILTERS_PNG
+
+	help
+	  cups-filters contains backends, filters, and other software that
+	  was once part of the core CUPS distribution but is no longer
+	  maintained by Apple Inc. In addition it contains additional filters
+	  and software developed independently of Apple, especially filters for
+	  the PDF-centric printing workflow introduced by OpenPrinting and a
+	  daemon to browse Bonjour broadcasts of remote CUPS printers and makes
+	  these printers available locally.
+
+if CUPS_FILTERS
+
+config CUPS_FILTERS_POPPLER
+	bool "build with poppler support"
+	help
+	  Build with poppler support, needed for pdfto* filters and banners.
+
+comment "poppler support will not build with POPPLER_SPLASH_FIXED!"
+	depends on (POPPLER_SPLASH_FIXED && CUPS_FILTERS_POPPLER)
+
+config CUPS_FILTERS_IMAGEFILTERS
+	bool "build image filters"
+	help
+	  Build imagetopdf and imagetoraster filters
+
+config CUPS_FILTERS_PCLM
+	bool "with PCLm support"
+	help
+	  Enable PCLm support for printing on Wi-Fi Direct printers via
+	  rastertopclm filter
+
+config CUPS_FILTERS_JPEG
+	bool "with JPEG support"
+	depends on CUPS_FILTERS_IMAGEFILTERS
+	default y
+	help
+	  Enable JPEG support in image filters
+
+config CUPS_FILTERS_PNG
+	bool "with PNG support"
+	depends on CUPS_FILTERS_IMAGEFILTERS
+	default y
+	help
+	  Enable PNG support in image filters
+
+endif
+# vim: ft=kconfig ts=8 noet tw=80
diff --git a/rules/cups-filters.make b/rules/cups-filters.make
new file mode 100644
index 000000000..ceac6a33d
--- /dev/null
+++ b/rules/cups-filters.make
@@ -0,0 +1,90 @@
+# -*-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_CUPS_FILTERS) += cups-filters
+
+#
+# Paths and names
+#
+CUPS_FILTERS_VERSION	:= 1.17.9
+CUPS_FILTERS_MD5	:= 2ef5f2b902bcdcb963c5ef5858976bbc
+CUPS_FILTERS		:= cups-filters-$(CUPS_FILTERS_VERSION)
+CUPS_FILTERS_SUFFIX	:= tar.xz
+CUPS_FILTERS_URL	:= http://openprinting.org/download/cups-filters/$(CUPS_FILTERS).$(CUPS_FILTERS_SUFFIX)
+CUPS_FILTERS_SOURCE	:= $(SRCDIR)/$(CUPS_FILTERS).$(CUPS_FILTERS_SUFFIX)
+CUPS_FILTERS_DIR	:= $(BUILDDIR)/$(CUPS_FILTERS)
+CUPS_FILTERS_LICENSE	:= GPL-2.0 AND GPL-2.0+ AND GPL-3.0 AND GPL-3.0+ AND LGPL-2 AND LGPL-2.1+ AND MIT AND BSD-4-clause
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+CUPS_FILTERS_CONF_TOOL	:= autoconf
+CUPS_FILTERS_CONF_OPT	:= \
+	$(CROSS_AUTOCONF_USR) \
+	--disable-silent-rules \
+	--disable-driverless \
+	--disable-auto-setup-driverless \
+	--$(call ptx/endis,PTXCONF_CUPS_FILTERS_IMAGEFILTERS)-imagefilters \
+	--disable-avahi \
+	--disable-ldap \
+	--$(call ptx/endis,PTXCONF_CUPS_FILTERS_PCLM)-pclm \
+	--$(call ptx/endis,PTXCONF_CUPS_FILTERS_POPPLER)-poppler \
+	--disable-dbus \
+	$(GLOBAL_LARGE_FILE_OPTION) \
+	--disable-mutool \
+	--disable-ghostscript \
+	--disable-ijs \
+	--disable-gs-ps2write \
+	--disable-foomatic \
+	--disable-werror \
+	--disable-braille \
+	--with-gnu-ld \
+	--with-cups-config=$(PTXDIST_SYSROOT_CROSS)/bin/cups-config \
+	--with-apple-raster-filter=rastertopdf \
+	--with-cups-rundir=/run \
+	--with-cups-domainsocket=/run/cups.sock \
+	--$(call ptx/wwo,PTXCONF_CUPS_FILTERS_JPEG)-jpeg \
+	--$(call ptx/wwo,PTXCONF_CUPS_FILTERS_PNG)-png \
+	--without-tiff \
+	--with-browseremoteprotocols="dnssd cups" \
+	--with-pdftops=pdftops
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/cups-filters.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, cups-filters)
+	@$(call install_fixup, cups-filters,PRIORITY,optional)
+	@$(call install_fixup, cups-filters,SECTION,base)
+	@$(call install_fixup, cups-filters,AUTHOR,"Roland Hieber <r.hieber@pengutronix.de>")
+	@$(call install_fixup, cups-filters,DESCRIPTION,missing)
+
+	@$(call install_lib, cups-filters, 0, 0, 0644, libcupsfilters)
+	@$(call install_lib, cups-filters, 0, 0, 0644, libfontembed)
+	@$(call install_tree, cups-filters, 0, 0, -, /usr/lib/cups/filter)
+	@$(call install_tree, cups-filters, 0, 0, -, /usr/lib/cups/backend)
+	@$(call install_tree, cups-filters, 0, 0, -, /usr/share/cups)
+	@$(call install_tree, cups-filters, 0, 0, -, /usr/share/ppd)
+
+	@$(call install_finish, cups-filters)
+
+	@$(call touch)
+
+# vim: ft=make ts=8 tw=80
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-11-07 16:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-07 16:40 [ptxdist] [PATCH v4 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
2017-11-07 16:40 ` [ptxdist] [PATCH v4 2/7] qpdf: new package: PDF inspection library and tools Roland Hieber
2017-11-07 16:40 ` [ptxdist] [PATCH v4 3/7] poppler-data: new package: optional encoding data for poppler Roland Hieber
2017-11-07 16:40 ` [ptxdist] [PATCH v4 4/7] poppler: version bump 0.18.0 -> 0.60.1 Roland Hieber
2017-11-07 16:40 ` [ptxdist] [PATCH v4 5/7] cups: new package: Common Unix Printing System Roland Hieber
2017-11-07 16:40 ` [ptxdist] [PATCH v4 6/7] host-cups: new package: CUPS host tools Roland Hieber
2017-11-07 16:40 ` [ptxdist] [PATCH v4 7/7] cups-filters: new package: additional filters and backends for CUPS Roland Hieber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox