mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 0/7] package (some of) the CUPS ecosystem
@ 2017-08-23 22:39 Roland Hieber
  2017-08-23 22:39 ` [ptxdist] [PATCH 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
                   ` (6 more replies)
  0 siblings, 7 replies; 30+ messages in thread
From: Roland Hieber @ 2017-08-23 22:39 UTC (permalink / raw)
  To: ptxdist

The main focus of this patch series is to get support for a PDF-driven printing
workflow into PTXdist. The dependency tree basically looks like this:

  CUPS: The Common Unix Printing System: server and clients (cupsd, lpr, lpstat,
  |  lpadmin, ...). Additional host-cups package for the PPD compiler, in case
  |  some printer drivers need it.
  |
  +-- cups-filters: additional CUPS filters and backends, notably pdftoraster,
  |   |  pdftops, imagetoXXX, etc. that were once part of CUPS, but have since
  |   |  been removed. (TODO: maybe install and test cups-browsed for mDNS
  |   |  discovery of printers)
  |   |
  |   +-- qpdf: PDF handling, for pdftopdf filter
  |   +-- poppler: PDF handling, for pdftoXXX filters and imagetoXXX filters,
  |       |   big version bump spanning multiple years of development
  |       |
  |       +-- poppler-data: optional dependency for cyrillic language support
  |       +-- libjpeg, libpng support is no longer broken
  |       +-- (TODO: maybe package libtiff and libopenjpeg in the future?)
  |
  +-- libpaper: optional dependency for system-wide papersize configuration.
        Low-hanging fruit, it was easy to package and included rather for
        completeness :)

As mentioned, there is still room to expand the feature set, but I think with
the focus on PDF as input format the usual use cases for a print server nowadays
should be covered here.

 - Roland

Roland Hieber (7):
  libpaper: new package: system-wide papersize configuration
  qpdf: new package: PDF inspection library and tools
  poppler-data: new package: optional encoding data for poppler
  poppler: version bump 0.18.0 -> 0.57.0
  cups: new package: Common Unix Printing System
  host-cups: new package: CUPS PPD compiler
  cups-filters: new package: additional filters and backends for CUPS

 .../0001-configure.ac-check-for-C-11-support.patch | 1019 ++++++++++++++++++++
 patches/cups-filters-1.16.1/autogen.sh             |    2 +
 patches/cups-filters-1.16.1/series                 |    4 +
 ...error-vector-in-namespace-std-does-not-na.patch |   56 ++
 patches/poppler-0.57.0/series                      |    4 +
 .../0001-don-t-build-docs-examples-or-tests.patch  |   51 +
 patches/qpdf-6.0.0/series                          |    4 +
 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-filters.in                              |   69 ++
 rules/cups-filters.make                            |   96 ++
 rules/cups.in                                      |  142 +++
 rules/cups.make                                    |  227 +++++
 rules/host-cups.in                                 |    7 +
 rules/host-cups.make                               |  108 +++
 rules/libpaper.in                                  |   32 +
 rules/libpaper.make                                |   77 ++
 rules/poppler-data.in                              |   10 +
 rules/poppler-data.make                            |   79 ++
 rules/poppler.in                                   |   86 +-
 rules/poppler.make                                 |   67 +-
 rules/qpdf.in                                      |   36 +
 rules/qpdf.make                                    |  121 +++
 32 files changed, 2328 insertions(+), 34 deletions(-)
 create mode 100644 patches/cups-filters-1.16.1/0001-configure.ac-check-for-C-11-support.patch
 create mode 100755 patches/cups-filters-1.16.1/autogen.sh
 create mode 100644 patches/cups-filters-1.16.1/series
 create mode 100644 patches/poppler-0.57.0/0001-Form.h-fix-error-vector-in-namespace-std-does-not-na.patch
 create mode 100644 patches/poppler-0.57.0/series
 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 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-filters.in
 create mode 100644 rules/cups-filters.make
 create mode 100644 rules/cups.in
 create mode 100644 rules/cups.make
 create mode 100644 rules/host-cups.in
 create mode 100644 rules/host-cups.make
 create mode 100644 rules/libpaper.in
 create mode 100644 rules/libpaper.make
 create mode 100644 rules/poppler-data.in
 create mode 100644 rules/poppler-data.make
 create mode 100644 rules/qpdf.in
 create mode 100644 rules/qpdf.make

-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH 1/7] libpaper: new package: system-wide papersize configuration
  2017-08-23 22:39 [ptxdist] [PATCH 0/7] package (some of) the CUPS ecosystem Roland Hieber
@ 2017-08-23 22:39 ` Roland Hieber
  2017-08-24  7:32   ` Juergen Borleis
  2017-08-28  9:47   ` Michael Olbrich
  2017-08-23 22:39 ` [ptxdist] [PATCH 2/7] qpdf: new package: PDF inspection library and tools Roland Hieber
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 30+ messages in thread
From: Roland Hieber @ 2017-08-23 22:39 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
---
 rules/libpaper.in   | 32 ++++++++++++++++++++++
 rules/libpaper.make | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 109 insertions(+)
 create mode 100644 rules/libpaper.in
 create mode 100644 rules/libpaper.make

diff --git a/rules/libpaper.in b/rules/libpaper.in
new file mode 100644
index 000000000..6052d2c14
--- /dev/null
+++ b/rules/libpaper.in
@@ -0,0 +1,32 @@
+## SECTION=multimedia_libs
+
+menuconfig LIBPAPER
+	tristate
+	prompt "libpaper                      "
+	select HOST_AUTOTOOLS_AUTOCONF
+	select HOST_AUTOTOOLS_LIBTOOL
+	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
+
+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..3e94ed2f2
--- /dev/null
+++ b/rules/libpaper.make
@@ -0,0 +1,77 @@
+# -*-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://http.debian.net/debian/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, but upstream does not provide a ./configure
+#
+$(STATEDIR)/libpaper.prepare:
+	@$(call targetinfo)
+	@$(call clean, $(LIBPAPER_DIR)/config.cache)
+	@cd $(LIBPAPER_DIR) && \
+		autoreconf --install && \
+		$(LIBPAPER_PATH) $(LIBPAPER_CONF_ENV) \
+		./configure $(CROSS_AUTOCONF_USR)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# 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, 0755, libpaper)
+
+ifeq ($(PTXCONF_LIBPAPER_PAPERCONFIG),y)
+	@$(call install_copy, libpaper, 0, 0, 755, -, /usr/sbin/paperconfig)
+endif
+ifeq ($(PTXCONF_LIBPAPER_PAPERCONF),y)
+	@$(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] 30+ messages in thread

* [ptxdist] [PATCH 2/7] qpdf: new package: PDF inspection library and tools
  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-23 22:39 ` Roland Hieber
  2017-08-28  9:52   ` Michael Olbrich
  2017-09-11 10:11   ` Juergen Borleis
  2017-08-23 22:39 ` [ptxdist] [PATCH 3/7] poppler-data: new package: optional encoding data for poppler Roland Hieber
                   ` (4 subsequent siblings)
  6 siblings, 2 replies; 30+ messages in thread
From: Roland Hieber @ 2017-08-23 22:39 UTC (permalink / raw)
  To: ptxdist

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

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

* [ptxdist] [PATCH 3/7] poppler-data: new package: optional encoding data for poppler
  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-23 22:39 ` [ptxdist] [PATCH 2/7] qpdf: new package: PDF inspection library and tools Roland Hieber
@ 2017-08-23 22:39 ` 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
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 30+ messages in thread
From: Roland Hieber @ 2017-08-23 22:39 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
---
 rules/poppler-data.in   | 10 +++++++
 rules/poppler-data.make | 79 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 89 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..2b51a61a9
--- /dev/null
+++ b/rules/poppler-data.make
@@ -0,0 +1,79 @@
+# -*-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.7
+POPPLER_DATA_MD5	:= 636a8f2b9f6df9e7ced8ec0946961eaf
+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
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/poppler-data.compile:
+	@$(call targetinfo)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+POPPLER_DATA_INSTALL_OPT := prefix=/usr install
+
+$(STATEDIR)/poppler-data.install:
+	@$(call targetinfo)
+	@$(call world/install, POPPLER_DATA)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# 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)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+#$(STATEDIR)/poppler-data.clean:
+#	@$(call targetinfo)
+#	@$(call clean_pkg, POPPLER_DATA)
+
+# vim: ft=make ts=8 tw=80
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH 4/7] poppler: version bump 0.18.0 -> 0.57.0
  2017-08-23 22:39 [ptxdist] [PATCH 0/7] package (some of) the CUPS ecosystem Roland Hieber
                   ` (2 preceding siblings ...)
  2017-08-23 22:39 ` [ptxdist] [PATCH 3/7] poppler-data: new package: optional encoding data for poppler Roland Hieber
@ 2017-08-23 22:39 ` Roland Hieber
  2017-08-28 10:18   ` Michael Olbrich
  2017-08-23 22:39 ` [ptxdist] [PATCH 5/7] cups: new package: Common Unix Printing System Roland Hieber
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 30+ messages in thread
From: Roland Hieber @ 2017-08-23 22:39 UTC (permalink / raw)
  To: ptxdist

This is quite a version bump, spanning six years of poppler development.
Upstream now provides data for rendering cyrillic languages in the
package poppler-data, but this dependency is only detected at compile
time, so make sure the build order is right.

Some applications require the old xpdf headers, the CPP wrapper or CMYK
support, so make these configure 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. The GTK dependency
has been dropped (or was it even necessary in the first place?)

Don't wonder about --disable-relocatable, it only applies to Windows.

poppler allows using zlib to uncompress flate streams, but with the
warning that this is "not totally safe", so it is disabled.

Additionally, poppler could benefit from packaging libopenjpeg and
libtiff in ptxdist for parsing embedded JPEG2000 or TIFF in PDFs.
Likewise, libnss could be packaged for PDF signature support. Also
there is the option to build a Qt5 wrapper, but I don't have a good way
to test this, so it is currently disabled.

Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
---
 ...error-vector-in-namespace-std-does-not-na.patch | 56 ++++++++++++++
 patches/poppler-0.57.0/series                      |  4 +
 rules/poppler.in                                   | 86 +++++++++++++++++-----
 rules/poppler.make                                 | 67 +++++++++++++----
 4 files changed, 179 insertions(+), 34 deletions(-)
 create mode 100644 patches/poppler-0.57.0/0001-Form.h-fix-error-vector-in-namespace-std-does-not-na.patch
 create mode 100644 patches/poppler-0.57.0/series

diff --git a/patches/poppler-0.57.0/0001-Form.h-fix-error-vector-in-namespace-std-does-not-na.patch b/patches/poppler-0.57.0/0001-Form.h-fix-error-vector-in-namespace-std-does-not-na.patch
new file mode 100644
index 000000000..70bfdc36f
--- /dev/null
+++ b/patches/poppler-0.57.0/0001-Form.h-fix-error-vector-in-namespace-std-does-not-na.patch
@@ -0,0 +1,56 @@
+From: Roland Hieber <r.hieber@pengutronix.de>
+Date: Fri, 11 Aug 2017 11:44:26 +0200
+Subject: [PATCH] Form.h: fix error: 'vector' in namespace 'std' does not name
+ a type
+
+Original error message while compiling with
+OSELAS.Toolchain-2016.06.1-arm-v7a-linux-gnueabi,
+gcc-5.4.0-glibc-2.23-binutils-2.26-kernel-4.6-sanitized:
+
+	make[5]: Entering directory '/ptx/work/dude/WORK_B/rhi/OSELAS.BSP-Miele-PST/platform-cpu20/build-target/poppler-0.57.0/qt4/src'
+	  CXX      libpoppler_qt4_la-poppler-form.lo
+	In file included from poppler-form.cc:26:0:
+	../../poppler/Form.h:544:14: error: 'vector' in namespace 'std' does not name a template type
+	../../poppler/Form.h:556:8: error: 'vector' in namespace 'std' does not name a template type
+	Makefile:735: recipe for target 'libpoppler_qt4_la-poppler-form.lo' failed
+
+configure arguments were:
+
+	--prefix=/usr --sysconfdir=/etc --localstatedir=/var
+	--libdir=/usr/lib --host=arm-v7a-linux-gnueabi
+	--build=x86_64-host-linux-gnu --enable-option-checking
+	--disable-silent-rules --disable-dependency-tracking
+	--enable-shared --enable-fast-install --enable-libtool-lock
+	--enable-xpdf-headers --enable-build-type=release
+	--disable-single-precision --enable-fixedpoint --enable-cmyk
+	--disable-relocatable --enable-libopenjpeg=none --disable-libnss
+	--disable-libtiff --enable-largefile --enable-zlib
+	--disable-zlib-uncompress --enable-libcurl
+	--enable-dctdecoder=libjpeg --enable-libpng
+	--disable-splash-output --enable-cairo-output
+	--enable-poppler-glib --disable-introspection --disable-gtk-doc
+	--disable-gtk-doc-html --disable-gtk-doc-pdf
+	--enable-poppler-qt4 --disable-poppler-qt5 --enable-poppler-cpp
+	--disable-gtk-test --enable-utils --disable-compile-warnings
+	--enable-cms=lcms1 --without-x
+	--with-font-configuration=fontconfig --without-libiconv-prefix
+	--with-testdatadir=
+
+Forwarded: https://bugs.freedesktop.org/show_bug.cgi?id=102147
+Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
+---
+ poppler/Form.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/poppler/Form.h b/poppler/Form.h
+index 8ddb6fe3d638..e0a3a28767bb 100644
+--- a/poppler/Form.h
++++ b/poppler/Form.h
+@@ -27,6 +27,7 @@
+ #include "Annot.h"
+ 
+ #include <set>
++#include <vector>
+ 
+ class GooString;
+ class Array;
diff --git a/patches/poppler-0.57.0/series b/patches/poppler-0.57.0/series
new file mode 100644
index 000000000..9e7d355f4
--- /dev/null
+++ b/patches/poppler-0.57.0/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Form.h-fix-error-vector-in-namespace-std-does-not-na.patch
+# ed2ff81cec7f4cb784b9295817f9d1e8  - git-ptx-patches magic
diff --git a/rules/poppler.in b/rules/poppler.in
index b107dc7a5..793e19275 100644
--- a/rules/poppler.in
+++ b/rules/poppler.in
@@ -4,18 +4,21 @@ menuconfig POPPLER
 	tristate
 	prompt "poppler                       "
 	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 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
 	help
 	  Poppler is a PDF rendering library based on the xpdf-3.0 code base.
 
@@ -29,6 +32,35 @@ config POPPLER_BIN
 	  pdffonts, pdfimages, pdfinfo, pdftoabw, pdftohtml, pdftoppm, pdftops,
 	  pdftotext.
 
+config POPPLER_XPDF
+	bool
+	prompt "install unsupported xpdf headers"
+	help
+	  Install XPDF headers for software that still depends on them.
+	  Normally, this option should not be needed.
+
+config POPPLER_BUILD_DEBUG
+	bool
+	prompt "enable poppler debug build"
+	help
+	  Build with debug information and without optimization. You probably
+	  don't want this in a production system.
+
+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.
+
+config POPPLER_CMYK
+	bool
+	prompt "enable poppler CMYK raster support"
+
+config POPPLER_CPP
+	bool
+	prompt "enable poppler cpp wrapper"
+
 config POPPLER_GLIB
 	select POPPLER_CAIRO
 	bool
@@ -42,14 +74,14 @@ config POPPLER_QT4
 	help
 	  build poppler Qt4 wrapper.
 
-comment "least one graphics backend should be selected"
-	depends on !(POPPLER_CAIRO || POPPLER_SPLASH)
+comment "at least one graphics backend should be selected"
+	depends on !(POPPLER_CAIRO || POPPLER_SPLASH || POPPLER_QT4)
 
 config POPPLER_CAIRO
 	bool
 	prompt "enable poppler cairo graphics backend"
 	help
-	  built cairo graphics backend
+	  build cairo graphics backend
 
 config POPPLER_SPLASH
 	bool
@@ -57,17 +89,31 @@ config POPPLER_SPLASH
 	help
 	  build splash graphics backend
 
+config POPPLER_SPLASH_FP
+	bool
+	prompt "use floating point arithmetic"
+	depends on POPPLER_SPLASH
+	default y if HAS_HARDFLOAT
+	help
+	  If enabled, the Splash backend will use floating point operations
+	  instead of fixed-point arithmetic.
+
+config POPPLER_SPLASH_FP_DOUBLE
+	bool
+	prompt "use double precision"
+	depends on POPPLER_SPLASH_FP
+	help
+	  Use double precision instead of single precision floating point
+	  arithmetic in Splash backend
+
 config POPPLER_PNG
 	bool
-	# fails to build with the current libpng
-	depends on BROKEN
 	prompt "enable poppler png support"
 	help
 	  compiles poppler with png support.
 
 config POPPLER_JPEG
 	bool
-	depends on BROKEN
 	prompt "enable poppler jpeg support"
 	help
 	  compiles poppler with jpeg support.
@@ -86,8 +132,10 @@ config POPPLER_CURL
 
 config POPPLER_CMS
 	bool
-	prompt "enable poppler cms support"
+	prompt "enable poppler color management support"
 	help
-	  compiles poppler with color management system support.
+	  compiles poppler with color management support.
 
 endif
+
+# vim: ft=kconfig ts=8 noet tw=80
diff --git a/rules/poppler.make b/rules/poppler.make
index 7ac676bf1..5e580f9d1 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
+# - enable and 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,10 +23,10 @@ PACKAGES-$(PTXCONF_POPPLER) += poppler
 #
 # Paths and names
 #
-POPPLER_VERSION	:= 0.18.0
-POPPLER_MD5	:= 4cd3bf2a0a13fa8eaf00d31368915f77
+POPPLER_VERSION	:= 0.57.0
+POPPLER_MD5	:= bc5a191741604552c90d484103229374
 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)
@@ -35,17 +41,43 @@ POPPLER_ENV 	:= $(CROSS_ENV)
 #
 # autoconf
 #
-POPPLER_AUTOCONF := \
+POPPLER_CONF_TOOL := autoconf
+POPPLER_CONF_OPT := \
 	$(CROSS_AUTOCONF_USR) \
-	$(GLOBAL_LARGE_FILE_OPTION) \
-	--disable-xpdf-headers \
-	--$(call ptx/disen, PTXCONF_HAS_HARDFLOAT)-single-precision \
-	--disable-fixedpoint \
-	--disable-libopenjpeg \
+	--enable-option-checking \
+	--disable-silent-rules \
+	--disable-dependency-tracking \
+	--enable-shared \
+	--enable-fast-install \
+	--enable-libtool-lock \
+	--$(call ptx/endis, PTXCONF_POPPLER_XPDF)-xpdf-headers \
+	--enable-build-type=$(call ptx/ifdef,PTXCONF_POPPLER_BUILD_DEBUG,debug,release)
+ifdef PTXCONF_POPPLER_SPLASH_FP
+ifdef PTXCONF_POPPLER_SPLASH_FP_DOUBLE
+POPPLER_CONF_OPT += \
+	--disable-single-precision \
+	--disable-fixedpoint
+else # PTXCONF_POPPLER_SPLASH_FP && !PTXCONF_POPPLER_SPLASH_FP_DOUBLE
+POPPLER_CONF_OPT += \
+	--enable-single-precision \
+	--disable-fixedpoint
+endif
+else # !PTXCONF_POPPLER_SPLASH_FP
+POPPLER_CONF_OPT += \
+	--disable-single-precision \
+	--enable-fixedpoint
+endif
+POPPLER_CONF_OPT += \
+	--$(call ptx/endis, PTXCONF_POPPLER_CMYK)-cmyk \
+	--disable-relocatable \
+	--enable-libopenjpeg=none \
+	--disable-libnss \
 	--disable-libtiff \
+	$(GLOBAL_LARGE_FILE_OPTION) \
 	--$(call ptx/endis, PTXCONF_POPPLER_ZLIB)-zlib \
+	--disable-zlib-uncompress \
 	--$(call ptx/endis, PTXCONF_POPPLER_CURL)-libcurl \
-	--$(call ptx/endis, PTXCONF_POPPLER_JPEG)-libjpeg \
+	--enable-dctdecoder=$(call ptx/ifdef,PTXCONF_POPPLER_JPEG,libjpeg,none) \
 	--$(call ptx/endis, PTXCONF_POPPLER_PNG)-libpng \
 	--$(call ptx/endis, PTXCONF_POPPLER_SPLASH)-splash-output \
 	--$(call ptx/endis, PTXCONF_POPPLER_CAIRO)-cairo-output \
@@ -55,14 +87,16 @@ POPPLER_AUTOCONF := \
 	--disable-gtk-doc-html \
 	--disable-gtk-doc-pdf \
 	--$(call ptx/endis, PTXCONF_POPPLER_QT4)-poppler-qt4 \
-	--disable-poppler-cpp \
+	--disable-poppler-qt5 \
+	--$(call ptx/endis, PTXCONF_POPPLER_CPP)-poppler-cpp \
 	--disable-gtk-test \
 	--$(call ptx/endis, PTXCONF_POPPLER_BIN)-utils \
 	--disable-compile-warnings \
-	--$(call ptx/endis, PTXCONF_POPPLER_CMS)-cms \
+	--enable-cms=$(call ptx/ifdef,PTXCONF_POPPLER_CMS,lcms1,no) \
 	--without-x \
 	--with-font-configuration=fontconfig \
-	--without-libiconv-prefix
+	--without-libiconv-prefix \
+	--with-testdatadir=
 
 # ----------------------------------------------------------------------------
 # Target-Install
@@ -85,6 +119,9 @@ 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
@@ -95,4 +132,4 @@ endif
 
 	@$(call touch)
 
-# vim: syntax=make
+# vim: ft=make ts=8 tw=80
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH 5/7] cups: new package: Common Unix Printing System
  2017-08-23 22:39 [ptxdist] [PATCH 0/7] package (some of) the CUPS ecosystem Roland Hieber
                   ` (3 preceding siblings ...)
  2017-08-23 22:39 ` [ptxdist] [PATCH 4/7] poppler: version bump 0.18.0 -> 0.57.0 Roland Hieber
@ 2017-08-23 22:39 ` Roland Hieber
  2017-08-28 12:44   ` Juergen Borleis
                     ` (2 more replies)
  2017-08-23 22:39 ` [ptxdist] [PATCH 6/7] host-cups: new package: CUPS PPD compiler Roland Hieber
  2017-08-23 22:39 ` [ptxdist] [PATCH 7/7] cups-filters: new package: additional filters and backends for CUPS Roland Hieber
  6 siblings, 3 replies; 30+ messages in thread
From: Roland Hieber @ 2017-08-23 22:39 UTC (permalink / raw)
  To: ptxdist

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>
---
 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.in                                   | 142 +++++++++++++++
 rules/cups.make                                 | 227 ++++++++++++++++++++++++
 13 files changed, 434 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.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.in b/rules/cups.in
new file mode 100644
index 000000000..33c319752
--- /dev/null
+++ b/rules/cups.in
@@ -0,0 +1,142 @@
+## 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 ORACLE_JAVA7_JRE		if CUPS_JAVA
+	select PERL			if CUPS_PERL
+	select PHP5			if CUPS_PHP
+	select PHP5_SAPI_CLI		if CUPS_PHP
+	select PYTHON			if CUPS_PYTHON
+
+	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_THREADING
+	bool "enable multithreading"
+	default y
+	help
+	   Enable multi-threading support
+
+config CUPS_WEBINTERFACE
+	bool "enable web interface"
+	help
+	   Enable CUPS printer management via HTTP(S). Only required for hosts
+	   which should act as a printing server.
+
+	   If you overwrite the config files for CUPS, be sure to have
+	   "WebInterface Yes" in your projectroot/etc/cups/cupsd.conf.
+
+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_INITSCRIPT
+	bool "install init.d script"
+	depends on INITMETHOD_BBINIT
+	help
+	  Install /etc/init.d/cups
+
+config CUPS_BBINIT_LINK
+        string "link name"
+        depends on CUPS_INITSCRIPT
+        default "S90cups"
+
+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.
+
+config CUPS_JAVA
+	bool "enable Java support for web interface"
+	depends on CUPS_WEBINTERFACE
+
+config CUPS_PERL
+	bool "enable Perl support for web interface"
+	depends on CUPS_WEBINTERFACE
+
+config CUPS_PHP
+	bool "enable PHP support for web interface"
+	depends on CUPS_WEBINTERFACE
+
+config CUPS_PYTHON
+	bool "enable Python support for web interface"
+	depends on CUPS_WEBINTERFACE
+
+comment "--- Debugging ---"
+
+config CUPS_DEBUG
+	bool "enable debug build"
+	default n
+	help
+	  Pay attention: this will slow down CUPS drastically and increases the
+	  memory footprint. Don't enable this on a production system!
+
+config CUPS_DEBUG_PRINTF
+	bool "enable debug output"
+	help
+	  Enable much more debug messages. These messages are logged into a
+	  separate file, the output is controlled over the following environment
+	  variables:
+
+	  - CUPS_DEBUG_LOG: contains the file name to write the messages to
+	  - CUPS_DEBUG_LEVEL: defines the loglevel (0...9, with 9 very noisy)
+	  - CUPS_DEBUG_FILTER: defines a regular expression to filter out
+	    unwanted debug messages.
+
+endif
+# vim: ft=kconfig ts=8 noet tw=80
diff --git a/rules/cups.make b/rules/cups.make
new file mode 100644
index 000000000..058ad0bda
--- /dev/null
+++ b/rules/cups.make
@@ -0,0 +1,227 @@
+# -*-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.4
+CUPS		:= cups-$(CUPS_VERSION)
+CUPS_MD5	:= d26e5a0a574a69fe1d01079b2931fc49
+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	:= LGPLv2/GPLv2
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+CUPS_CONF_ENV	:= \
+	$(CROSS_ENV) \
+	DSTROOT=$(PKGDIR)/$(CUPS)
+
+#
+# autoconf
+#
+# The --with-* options are only used to specify strings, --without-* does
+# mostly nothing. So we're omitting them here.
+#
+# We have to set --exec-prefix and --libdir, otherwise the libs end up in
+# ${prefix}/lib64 due to broken autoconf magic, which is not what we want.
+#
+# --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) \
+	--exec-prefix=/usr/ \
+	--libdir=/usr/lib/ \
+	--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 \
+	--$(call ptx/endis,PTXCONF_CUPS_DEBUG)-debug \
+	--$(call ptx/endis,PTXCONF_CUPS_DEBUG)-debug-guards \
+	--$(call ptx/endis,PTXCONF_CUPS_DEBUG_PRINTF)-debug-printfs \
+	--disable-unit-tests \
+	--$(call ptx/endis,PTXCONF_TARGET_HARDEN_RELRO)-relro \
+	--disable-gssapi \
+	--$(call ptx/endis,PTXCONF_CUPS_THREADING)-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
+
+CUPS_CONF_OPT	+= \
+	--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 \
+	$(call ptx/ifdef,PTXCONF_CUPS_JAVA,--with-java=/usr/bin/java,) \
+	$(call ptx/ifdef,PTXCONF_CUPS_PERL,--with-perl=/usr/bin/perl,) \
+	$(call ptx/ifdef,PTXCONF_CUPS_PHP,--with-php=/usr/bin/php5,) \
+	$(call ptx/ifdef,PTXCONF_CUPS_PYTHON,--with-python=/usr/bin/python,)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+CUPS_MAKE_ENV	:= \
+	DSTROOT=$(PKGDIR)/$(CUPS)
+
+# ----------------------------------------------------------------------------
+# 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_alternative, cups, 1, 110, 0640, /etc/cups/cups-files.conf)
+	@$(call install_alternative, cups, 1, 110, 0640, /etc/cups/cupsd.conf)
+	@$(call install_alternative, cups, 1, 110, 0600, /etc/cups/classes.conf)
+	@$(call install_alternative, cups, 1, 110, 0600, /etc/cups/client.conf)
+	@$(call install_alternative, cups, 1, 110, 0640, /etc/cups/mailto.conf)
+	@$(call install_alternative_tree, cups, 1, 110,  /etc/cups/ppd/)
+	@$(call install_alternative, cups, 1, 110, 0600, /etc/cups/printers.conf)
+	@$(call install_alternative, cups, 1, 110, 0640, /etc/cups/snmp.conf)
+	@$(call install_alternative, cups, 1, 110, 0640, /etc/printcap)
+	@$(call install_alternative, cups, 1, 110, 0640, /usr/share/cups/mime/mime.convs)
+	@$(call install_alternative, cups, 1, 110, 0640, /usr/share/cups/mime/mime.types)
+
+ifdef PTXCONF_CUPS_SSL
+	@$(call install_alternative_tree, cups, 1, 110, /etc/cups/ssl/)
+endif
+
+ifdef PTXCONF_CUPS_DBUS
+	@$(call install_alternative, cups, 0, 0, 0644, /etc/dbus-1/system.d/cups.conf)
+endif
+
+# ----- libraries
+	@$(call install_lib, cups, 0, 0, 0755, libcups)
+	@$(call install_lib, cups, 0, 0, 0755, libcupsimage)
+	@$(call install_lib, cups, 0, 0, 0755, libcupsmime)
+	@$(call install_lib, cups, 0, 0, 0755, libcupsppdc)
+
+# ----- user and system binaries, with the correct access rights
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/cancel)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/cups-config)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/ipptool)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/lp)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/lpoptions)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/lpq)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/lpr)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/lprm)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/lpstat)
+
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/accept)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsaccept)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsaddsmb)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsctl)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsd)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsdisable)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsenable)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsfilter)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsreject)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/lpadmin)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/lpc)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/lpinfo)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/lpmove)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/reject)
+
+ifdef PTXCONF_CUPS_TEST_TOOLS
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/cupstestdsc)
+	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/cupstestppd)
+endif
+
+# ----- backends, filters, cgi-bin (if enabled), etc.
+	@$(call install_tree, cups, 0, 0, -, /usr/lib/cups/backend)
+	@$(call install_tree, cups, 0, 0, -, /usr/lib/cups/daemon)
+	@$(call install_tree, cups, 0, 0, -, /usr/lib/cups/filter)
+	@$(call install_tree, cups, 0, 0, -, /usr/lib/cups/monitor)
+	@$(call install_tree, cups, 0, 0, -, /usr/lib/cups/notifier)
+
+ifdef PTXCONF_CUPS_LIBUSB
+	@$(call install_alternative, cups, 0, 0, 0644, /usr/share/cups/usb/org.cups.usb-quirks)
+endif
+
+ifdef PTXCONF_CUPS_WEBINTERFACE
+	@$(call install_lib, cups, 0, 0, 0755, libcupscgi)
+	@$(call install_tree, cups, 0, 0, -, /usr/lib/cups/cgi-bin)
+	@$(call install_tree, cups, 0, 0, -, /usr/share/cups/templates)
+	@$(call install_tree, cups, 0, 0, -, /usr/share/doc/cups)
+endif
+
+# ----- startup files
+ifdef PTXCONF_CUPS_SYSTEMD_UNIT
+	@$(call install_alternative, cups, 0, 0, 0644, /usr/lib/tmpfiles.d/cups.conf)
+	@$(call install_alternative, cups, 0, 0, 0644, /usr/lib/systemd/system/cups.service)
+	@$(call install_alternative, cups, 0, 0, 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_INITSCRIPT
+	@$(call install_alternative, cups, 0, 0, 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] 30+ messages in thread

* [ptxdist] [PATCH 6/7] host-cups: new package: CUPS PPD compiler
  2017-08-23 22:39 [ptxdist] [PATCH 0/7] package (some of) the CUPS ecosystem Roland Hieber
                   ` (4 preceding siblings ...)
  2017-08-23 22:39 ` [ptxdist] [PATCH 5/7] cups: new package: Common Unix Printing System Roland Hieber
@ 2017-08-23 22:39 ` Roland Hieber
  2017-08-28 12:57   ` Michael Olbrich
  2017-09-22 12:06   ` Juergen Borleis
  2017-08-23 22:39 ` [ptxdist] [PATCH 7/7] cups-filters: new package: additional filters and backends for CUPS Roland Hieber
  6 siblings, 2 replies; 30+ messages in thread
From: Roland Hieber @ 2017-08-23 22:39 UTC (permalink / raw)
  To: ptxdist

Most printer drivers compile model-specific PPDs from a generic schema
using ppdc during the build process. For this, ppdc must be able to find
CUPS' internal include files in sysroot-target. Unfortunately, the CUPS
build system is rather inflexible, so we have to build nearly everything
to get a working ppdc.

Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
---
 rules/host-cups.in   |   7 ++++
 rules/host-cups.make | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 115 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..f45855d19
--- /dev/null
+++ b/rules/host-cups.make
@@ -0,0 +1,108 @@
+# -*-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
+# ----------------------------------------------------------------------------
+
+HOST_CUPS_CONF_ENV	:= $(HOST_ENV)
+
+#
+# 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).
+#
+# We have to set --exec-prefix and --libdir, otherwise the libs end up in
+# ${prefix}/lib64, which is not what we want.
+#
+HOST_CUPS_CONF_TOOL	:= autoconf
+HOST_CUPS_CONF_OPT	:= \
+	$(HOST_AUTOCONF) \
+	--exec-prefix=/usr/ \
+	--libdir=/usr/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 \
+	--disable-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
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+HOST_CUPS_MAKE_ENV := \
+	DSTROOT=$(HOST_CUPS_PKGDIR)
+
+$(STATEDIR)/host-cups.install:
+	@$(call targetinfo)
+
+	@$(call world/install, HOST_CUPS)
+
+	@# ppdc isn't built by --with-components=core
+	$(MAKE) -C ${HOST_CUPS_DIR}/ppdc $(HOST_CUPS_MAKE_ENV) 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 'LD_LIBRARY_PATH=$(PTXDIST_SYSROOT_HOST)/usr/lib $(PTXDIST_SYSROOT_HOST)/usr/bin/ppdc -I $(SYSROOT)/usr/share/cups/ppdc "$$@"'; \
+	) > $(CROSS_PPDC)
+	chmod +x $(CROSS_PPDC)
+
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/host-cups.clean:
+	@$(call targetinfo)
+	@$(call clean_pkg, HOST_CUPS)
+	rm -f $(CROSS_PPDC)
+
+# vim: ft=make ts=8 tw=80
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH 7/7] cups-filters: new package: additional filters and backends for CUPS
  2017-08-23 22:39 [ptxdist] [PATCH 0/7] package (some of) the CUPS ecosystem Roland Hieber
                   ` (5 preceding siblings ...)
  2017-08-23 22:39 ` [ptxdist] [PATCH 6/7] host-cups: new package: CUPS PPD compiler Roland Hieber
@ 2017-08-23 22:39 ` Roland Hieber
  2017-08-28 13:03   ` Michael Olbrich
  6 siblings, 1 reply; 30+ messages in thread
From: Roland Hieber @ 2017-08-23 22:39 UTC (permalink / raw)
  To: ptxdist

Upstream is very responsive, merged some patches and made a new release
while I was still packaging the old one :)

Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
---
 .../0001-configure.ac-check-for-C-11-support.patch | 1019 ++++++++++++++++++++
 patches/cups-filters-1.16.1/autogen.sh             |    2 +
 patches/cups-filters-1.16.1/series                 |    4 +
 rules/cups-filters.in                              |   69 ++
 rules/cups-filters.make                            |   96 ++
 5 files changed, 1190 insertions(+)
 create mode 100644 patches/cups-filters-1.16.1/0001-configure.ac-check-for-C-11-support.patch
 create mode 100755 patches/cups-filters-1.16.1/autogen.sh
 create mode 100644 patches/cups-filters-1.16.1/series
 create mode 100644 rules/cups-filters.in
 create mode 100644 rules/cups-filters.make

diff --git a/patches/cups-filters-1.16.1/0001-configure.ac-check-for-C-11-support.patch b/patches/cups-filters-1.16.1/0001-configure.ac-check-for-C-11-support.patch
new file mode 100644
index 000000000..a7d308e0e
--- /dev/null
+++ b/patches/cups-filters-1.16.1/0001-configure.ac-check-for-C-11-support.patch
@@ -0,0 +1,1019 @@
+From: Roland Hieber <r.hieber@pengutronix.de>
+Date: Tue, 15 Aug 2017 12:53:14 +0200
+Subject: [PATCH] configure.ac: check for C++11 support
+
+The filters pdftoopvp, bannertopdf and pdftoraster depend on features
+only available in C++11, indirectly also because poppler does not put
+-std=c++11 on its pkg-config CFLAGS (but I'm not sure whether it should
+even do this). Solve this problems by adding -std=c++1 to $(CXX), if
+necessary, or fail if the compiler does not support C++11.
+
+Forwarded: https://bugs.linuxfoundation.org/show_bug.cgi?id=1404
+Applied-Upstream: http://bzr.linuxfoundation.org/loggerhead/openprinting/cups-filters/revision/7674
+Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
+---
+ configure.ac                |   1 +
+ m4/ax_cxx_compile_stdcxx.m4 | 982 ++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 983 insertions(+)
+ create mode 100644 m4/ax_cxx_compile_stdcxx.m4
+
+diff --git a/configure.ac b/configure.ac
+index 6ce671e6026a..7ad5592e0423 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -52,6 +52,7 @@ AH_BOTTOM([
+ # ===========================
+ AC_PROG_CC
+ AC_PROG_CXX
++AX_CXX_COMPILE_STDCXX([11],[noext],[mandatory])
+ AM_PROG_CC_C_O
+ AC_PROG_CPP
+ AC_PROG_INSTALL
+diff --git a/m4/ax_cxx_compile_stdcxx.m4 b/m4/ax_cxx_compile_stdcxx.m4
+new file mode 100644
+index 000000000000..5032bba8091d
+--- /dev/null
++++ b/m4/ax_cxx_compile_stdcxx.m4
+@@ -0,0 +1,982 @@
++# ===========================================================================
++#  https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
++# ===========================================================================
++#
++# SYNOPSIS
++#
++#   AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
++#
++# DESCRIPTION
++#
++#   Check for baseline language coverage in the compiler for the specified
++#   version of the C++ standard.  If necessary, add switches to CXX and
++#   CXXCPP to enable support.  VERSION may be '11' (for the C++11 standard)
++#   or '14' (for the C++14 standard).
++#
++#   The second argument, if specified, indicates whether you insist on an
++#   extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
++#   -std=c++11).  If neither is specified, you get whatever works, with
++#   preference for an extended mode.
++#
++#   The third argument, if specified 'mandatory' or if left unspecified,
++#   indicates that baseline support for the specified C++ standard is
++#   required and that the macro should error out if no mode with that
++#   support is found.  If specified 'optional', then configuration proceeds
++#   regardless, after defining HAVE_CXX${VERSION} if and only if a
++#   supporting mode is found.
++#
++# LICENSE
++#
++#   Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
++#   Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
++#   Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
++#   Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
++#   Copyright (c) 2015 Paul Norman <penorman@mac.com>
++#   Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
++#   Copyright (c) 2016 Krzesimir Nowak <qdlacz@gmail.com>
++#
++#   Copying and distribution of this file, with or without modification, are
++#   permitted in any medium without royalty provided the copyright notice
++#   and this notice are preserved.  This file is offered as-is, without any
++#   warranty.
++
++#serial 7
++
++dnl  This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
++dnl  (serial version number 13).
++
++AX_REQUIRE_DEFINED([AC_MSG_WARN])
++AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
++  m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
++        [$1], [14], [ax_cxx_compile_alternatives="14 1y"],
++        [$1], [17], [ax_cxx_compile_alternatives="17 1z"],
++        [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
++  m4_if([$2], [], [],
++        [$2], [ext], [],
++        [$2], [noext], [],
++        [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
++  m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
++        [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
++        [$3], [optional], [ax_cxx_compile_cxx$1_required=false],
++        [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
++  AC_LANG_PUSH([C++])dnl
++  ac_success=no
++  AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
++  ax_cv_cxx_compile_cxx$1,
++  [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
++    [ax_cv_cxx_compile_cxx$1=yes],
++    [ax_cv_cxx_compile_cxx$1=no])])
++  if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
++    ac_success=yes
++  fi
++
++  m4_if([$2], [noext], [], [dnl
++  if test x$ac_success = xno; then
++    for alternative in ${ax_cxx_compile_alternatives}; do
++      switch="-std=gnu++${alternative}"
++      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
++      AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
++                     $cachevar,
++        [ac_save_CXX="$CXX"
++         CXX="$CXX $switch"
++         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
++          [eval $cachevar=yes],
++          [eval $cachevar=no])
++         CXX="$ac_save_CXX"])
++      if eval test x\$$cachevar = xyes; then
++        CXX="$CXX $switch"
++        if test -n "$CXXCPP" ; then
++          CXXCPP="$CXXCPP $switch"
++        fi
++        ac_success=yes
++        break
++      fi
++    done
++  fi])
++
++  m4_if([$2], [ext], [], [dnl
++  if test x$ac_success = xno; then
++    dnl HP's aCC needs +std=c++11 according to:
++    dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
++    dnl Cray's crayCC needs "-h std=c++11"
++    for alternative in ${ax_cxx_compile_alternatives}; do
++      for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
++        cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
++        AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
++                       $cachevar,
++          [ac_save_CXX="$CXX"
++           CXX="$CXX $switch"
++           AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
++            [eval $cachevar=yes],
++            [eval $cachevar=no])
++           CXX="$ac_save_CXX"])
++        if eval test x\$$cachevar = xyes; then
++          CXX="$CXX $switch"
++          if test -n "$CXXCPP" ; then
++            CXXCPP="$CXXCPP $switch"
++          fi
++          ac_success=yes
++          break
++        fi
++      done
++      if test x$ac_success = xyes; then
++        break
++      fi
++    done
++  fi])
++  AC_LANG_POP([C++])
++  if test x$ax_cxx_compile_cxx$1_required = xtrue; then
++    if test x$ac_success = xno; then
++      AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
++    fi
++  fi
++  if test x$ac_success = xno; then
++    HAVE_CXX$1=0
++    AC_MSG_NOTICE([No compiler with C++$1 support was found])
++  else
++    HAVE_CXX$1=1
++    AC_DEFINE(HAVE_CXX$1,1,
++              [define if the compiler supports basic C++$1 syntax])
++  fi
++  AC_SUBST(HAVE_CXX$1)
++  m4_if([$1], [17], [AC_MSG_WARN([C++17 is not yet standardized, so the checks may change in incompatible ways anytime])])
++])
++
++
++dnl  Test body for checking C++11 support
++
++m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
++  _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
++)
++
++
++dnl  Test body for checking C++14 support
++
++m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
++  _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
++  _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
++)
++
++m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
++  _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
++  _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
++  _AX_CXX_COMPILE_STDCXX_testbody_new_in_17
++)
++
++dnl  Tests for new features in C++11
++
++m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
++
++// If the compiler admits that it is not ready for C++11, why torture it?
++// Hopefully, this will speed up the test.
++
++#ifndef __cplusplus
++
++#error "This is not a C++ compiler"
++
++#elif __cplusplus < 201103L
++
++#error "This is not a C++11 compiler"
++
++#else
++
++namespace cxx11
++{
++
++  namespace test_static_assert
++  {
++
++    template <typename T>
++    struct check
++    {
++      static_assert(sizeof(int) <= sizeof(T), "not big enough");
++    };
++
++  }
++
++  namespace test_final_override
++  {
++
++    struct Base
++    {
++      virtual void f() {}
++    };
++
++    struct Derived : public Base
++    {
++      virtual void f() override {}
++    };
++
++  }
++
++  namespace test_double_right_angle_brackets
++  {
++
++    template < typename T >
++    struct check {};
++
++    typedef check<void> single_type;
++    typedef check<check<void>> double_type;
++    typedef check<check<check<void>>> triple_type;
++    typedef check<check<check<check<void>>>> quadruple_type;
++
++  }
++
++  namespace test_decltype
++  {
++
++    int
++    f()
++    {
++      int a = 1;
++      decltype(a) b = 2;
++      return a + b;
++    }
++
++  }
++
++  namespace test_type_deduction
++  {
++
++    template < typename T1, typename T2 >
++    struct is_same
++    {
++      static const bool value = false;
++    };
++
++    template < typename T >
++    struct is_same<T, T>
++    {
++      static const bool value = true;
++    };
++
++    template < typename T1, typename T2 >
++    auto
++    add(T1 a1, T2 a2) -> decltype(a1 + a2)
++    {
++      return a1 + a2;
++    }
++
++    int
++    test(const int c, volatile int v)
++    {
++      static_assert(is_same<int, decltype(0)>::value == true, "");
++      static_assert(is_same<int, decltype(c)>::value == false, "");
++      static_assert(is_same<int, decltype(v)>::value == false, "");
++      auto ac = c;
++      auto av = v;
++      auto sumi = ac + av + 'x';
++      auto sumf = ac + av + 1.0;
++      static_assert(is_same<int, decltype(ac)>::value == true, "");
++      static_assert(is_same<int, decltype(av)>::value == true, "");
++      static_assert(is_same<int, decltype(sumi)>::value == true, "");
++      static_assert(is_same<int, decltype(sumf)>::value == false, "");
++      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
++      return (sumf > 0.0) ? sumi : add(c, v);
++    }
++
++  }
++
++  namespace test_noexcept
++  {
++
++    int f() { return 0; }
++    int g() noexcept { return 0; }
++
++    static_assert(noexcept(f()) == false, "");
++    static_assert(noexcept(g()) == true, "");
++
++  }
++
++  namespace test_constexpr
++  {
++
++    template < typename CharT >
++    unsigned long constexpr
++    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
++    {
++      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
++    }
++
++    template < typename CharT >
++    unsigned long constexpr
++    strlen_c(const CharT *const s) noexcept
++    {
++      return strlen_c_r(s, 0UL);
++    }
++
++    static_assert(strlen_c("") == 0UL, "");
++    static_assert(strlen_c("1") == 1UL, "");
++    static_assert(strlen_c("example") == 7UL, "");
++    static_assert(strlen_c("another\0example") == 7UL, "");
++
++  }
++
++  namespace test_rvalue_references
++  {
++
++    template < int N >
++    struct answer
++    {
++      static constexpr int value = N;
++    };
++
++    answer<1> f(int&)       { return answer<1>(); }
++    answer<2> f(const int&) { return answer<2>(); }
++    answer<3> f(int&&)      { return answer<3>(); }
++
++    void
++    test()
++    {
++      int i = 0;
++      const int c = 0;
++      static_assert(decltype(f(i))::value == 1, "");
++      static_assert(decltype(f(c))::value == 2, "");
++      static_assert(decltype(f(0))::value == 3, "");
++    }
++
++  }
++
++  namespace test_uniform_initialization
++  {
++
++    struct test
++    {
++      static const int zero {};
++      static const int one {1};
++    };
++
++    static_assert(test::zero == 0, "");
++    static_assert(test::one == 1, "");
++
++  }
++
++  namespace test_lambdas
++  {
++
++    void
++    test1()
++    {
++      auto lambda1 = [](){};
++      auto lambda2 = lambda1;
++      lambda1();
++      lambda2();
++    }
++
++    int
++    test2()
++    {
++      auto a = [](int i, int j){ return i + j; }(1, 2);
++      auto b = []() -> int { return '0'; }();
++      auto c = [=](){ return a + b; }();
++      auto d = [&](){ return c; }();
++      auto e = [a, &b](int x) mutable {
++        const auto identity = [](int y){ return y; };
++        for (auto i = 0; i < a; ++i)
++          a += b--;
++        return x + identity(a + b);
++      }(0);
++      return a + b + c + d + e;
++    }
++
++    int
++    test3()
++    {
++      const auto nullary = [](){ return 0; };
++      const auto unary = [](int x){ return x; };
++      using nullary_t = decltype(nullary);
++      using unary_t = decltype(unary);
++      const auto higher1st = [](nullary_t f){ return f(); };
++      const auto higher2nd = [unary](nullary_t f1){
++        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
++      };
++      return higher1st(nullary) + higher2nd(nullary)(unary);
++    }
++
++  }
++
++  namespace test_variadic_templates
++  {
++
++    template <int...>
++    struct sum;
++
++    template <int N0, int... N1toN>
++    struct sum<N0, N1toN...>
++    {
++      static constexpr auto value = N0 + sum<N1toN...>::value;
++    };
++
++    template <>
++    struct sum<>
++    {
++      static constexpr auto value = 0;
++    };
++
++    static_assert(sum<>::value == 0, "");
++    static_assert(sum<1>::value == 1, "");
++    static_assert(sum<23>::value == 23, "");
++    static_assert(sum<1, 2>::value == 3, "");
++    static_assert(sum<5, 5, 11>::value == 21, "");
++    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
++
++  }
++
++  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
++  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
++  // because of this.
++  namespace test_template_alias_sfinae
++  {
++
++    struct foo {};
++
++    template<typename T>
++    using member = typename T::member_type;
++
++    template<typename T>
++    void func(...) {}
++
++    template<typename T>
++    void func(member<T>*) {}
++
++    void test();
++
++    void test() { func<foo>(0); }
++
++  }
++
++}  // namespace cxx11
++
++#endif  // __cplusplus >= 201103L
++
++]])
++
++
++dnl  Tests for new features in C++14
++
++m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
++
++// If the compiler admits that it is not ready for C++14, why torture it?
++// Hopefully, this will speed up the test.
++
++#ifndef __cplusplus
++
++#error "This is not a C++ compiler"
++
++#elif __cplusplus < 201402L
++
++#error "This is not a C++14 compiler"
++
++#else
++
++namespace cxx14
++{
++
++  namespace test_polymorphic_lambdas
++  {
++
++    int
++    test()
++    {
++      const auto lambda = [](auto&&... args){
++        const auto istiny = [](auto x){
++          return (sizeof(x) == 1UL) ? 1 : 0;
++        };
++        const int aretiny[] = { istiny(args)... };
++        return aretiny[0];
++      };
++      return lambda(1, 1L, 1.0f, '1');
++    }
++
++  }
++
++  namespace test_binary_literals
++  {
++
++    constexpr auto ivii = 0b0000000000101010;
++    static_assert(ivii == 42, "wrong value");
++
++  }
++
++  namespace test_generalized_constexpr
++  {
++
++    template < typename CharT >
++    constexpr unsigned long
++    strlen_c(const CharT *const s) noexcept
++    {
++      auto length = 0UL;
++      for (auto p = s; *p; ++p)
++        ++length;
++      return length;
++    }
++
++    static_assert(strlen_c("") == 0UL, "");
++    static_assert(strlen_c("x") == 1UL, "");
++    static_assert(strlen_c("test") == 4UL, "");
++    static_assert(strlen_c("another\0test") == 7UL, "");
++
++  }
++
++  namespace test_lambda_init_capture
++  {
++
++    int
++    test()
++    {
++      auto x = 0;
++      const auto lambda1 = [a = x](int b){ return a + b; };
++      const auto lambda2 = [a = lambda1(x)](){ return a; };
++      return lambda2();
++    }
++
++  }
++
++  namespace test_digit_separators
++  {
++
++    constexpr auto ten_million = 100'000'000;
++    static_assert(ten_million == 100000000, "");
++
++  }
++
++  namespace test_return_type_deduction
++  {
++
++    auto f(int& x) { return x; }
++    decltype(auto) g(int& x) { return x; }
++
++    template < typename T1, typename T2 >
++    struct is_same
++    {
++      static constexpr auto value = false;
++    };
++
++    template < typename T >
++    struct is_same<T, T>
++    {
++      static constexpr auto value = true;
++    };
++
++    int
++    test()
++    {
++      auto x = 0;
++      static_assert(is_same<int, decltype(f(x))>::value, "");
++      static_assert(is_same<int&, decltype(g(x))>::value, "");
++      return x;
++    }
++
++  }
++
++}  // namespace cxx14
++
++#endif  // __cplusplus >= 201402L
++
++]])
++
++
++dnl  Tests for new features in C++17
++
++m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
++
++// If the compiler admits that it is not ready for C++17, why torture it?
++// Hopefully, this will speed up the test.
++
++#ifndef __cplusplus
++
++#error "This is not a C++ compiler"
++
++#elif __cplusplus <= 201402L
++
++#error "This is not a C++17 compiler"
++
++#else
++
++#if defined(__clang__)
++  #define REALLY_CLANG
++#else
++  #if defined(__GNUC__)
++    #define REALLY_GCC
++  #endif
++#endif
++
++#include <initializer_list>
++#include <utility>
++#include <type_traits>
++
++namespace cxx17
++{
++
++#if !defined(REALLY_CLANG)
++  namespace test_constexpr_lambdas
++  {
++
++    // TODO: test it with clang++ from git
++
++    constexpr int foo = [](){return 42;}();
++
++  }
++#endif // !defined(REALLY_CLANG)
++
++  namespace test::nested_namespace::definitions
++  {
++
++  }
++
++  namespace test_fold_expression
++  {
++
++    template<typename... Args>
++    int multiply(Args... args)
++    {
++      return (args * ... * 1);
++    }
++
++    template<typename... Args>
++    bool all(Args... args)
++    {
++      return (args && ...);
++    }
++
++  }
++
++  namespace test_extended_static_assert
++  {
++
++    static_assert (true);
++
++  }
++
++  namespace test_auto_brace_init_list
++  {
++
++    auto foo = {5};
++    auto bar {5};
++
++    static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
++    static_assert(std::is_same<int, decltype(bar)>::value);
++  }
++
++  namespace test_typename_in_template_template_parameter
++  {
++
++    template<template<typename> typename X> struct D;
++
++  }
++
++  namespace test_fallthrough_nodiscard_maybe_unused_attributes
++  {
++
++    int f1()
++    {
++      return 42;
++    }
++
++    [[nodiscard]] int f2()
++    {
++      [[maybe_unused]] auto unused = f1();
++
++      switch (f1())
++      {
++      case 17:
++        f1();
++        [[fallthrough]];
++      case 42:
++        f1();
++      }
++      return f1();
++    }
++
++  }
++
++  namespace test_extended_aggregate_initialization
++  {
++
++    struct base1
++    {
++      int b1, b2 = 42;
++    };
++
++    struct base2
++    {
++      base2() {
++        b3 = 42;
++      }
++      int b3;
++    };
++
++    struct derived : base1, base2
++    {
++        int d;
++    };
++
++    derived d1 {{1, 2}, {}, 4};  // full initialization
++    derived d2 {{}, {}, 4};      // value-initialized bases
++
++  }
++
++  namespace test_general_range_based_for_loop
++  {
++
++    struct iter
++    {
++      int i;
++
++      int& operator* ()
++      {
++        return i;
++      }
++
++      const int& operator* () const
++      {
++        return i;
++      }
++
++      iter& operator++()
++      {
++        ++i;
++        return *this;
++      }
++    };
++
++    struct sentinel
++    {
++      int i;
++    };
++
++    bool operator== (const iter& i, const sentinel& s)
++    {
++      return i.i == s.i;
++    }
++
++    bool operator!= (const iter& i, const sentinel& s)
++    {
++      return !(i == s);
++    }
++
++    struct range
++    {
++      iter begin() const
++      {
++        return {0};
++      }
++
++      sentinel end() const
++      {
++        return {5};
++      }
++    };
++
++    void f()
++    {
++      range r {};
++
++      for (auto i : r)
++      {
++        [[maybe_unused]] auto v = i;
++      }
++    }
++
++  }
++
++  namespace test_lambda_capture_asterisk_this_by_value
++  {
++
++    struct t
++    {
++      int i;
++      int foo()
++      {
++        return [*this]()
++        {
++          return i;
++        }();
++      }
++    };
++
++  }
++
++  namespace test_enum_class_construction
++  {
++
++    enum class byte : unsigned char
++    {};
++
++    byte foo {42};
++
++  }
++
++  namespace test_constexpr_if
++  {
++
++    template <bool cond>
++    int f ()
++    {
++      if constexpr(cond)
++      {
++        return 13;
++      }
++      else
++      {
++        return 42;
++      }
++    }
++
++  }
++
++  namespace test_selection_statement_with_initializer
++  {
++
++    int f()
++    {
++      return 13;
++    }
++
++    int f2()
++    {
++      if (auto i = f(); i > 0)
++      {
++        return 3;
++      }
++
++      switch (auto i = f(); i + 4)
++      {
++      case 17:
++        return 2;
++
++      default:
++        return 1;
++      }
++    }
++
++  }
++
++#if !defined(REALLY_CLANG)
++  namespace test_template_argument_deduction_for_class_templates
++  {
++
++    // TODO: test it with clang++ from git
++
++    template <typename T1, typename T2>
++    struct pair
++    {
++      pair (T1 p1, T2 p2)
++        : m1 {p1},
++          m2 {p2}
++      {}
++
++      T1 m1;
++      T2 m2;
++    };
++
++    void f()
++    {
++      [[maybe_unused]] auto p = pair{13, 42u};
++    }
++
++  }
++#endif // !defined(REALLY_CLANG)
++
++  namespace test_non_type_auto_template_parameters
++  {
++
++    template <auto n>
++    struct B
++    {};
++
++    B<5> b1;
++    B<'a'> b2;
++
++  }
++
++#if !defined(REALLY_CLANG)
++  namespace test_structured_bindings
++  {
++
++    // TODO: test it with clang++ from git
++
++    int arr[2] = { 1, 2 };
++    std::pair<int, int> pr = { 1, 2 };
++
++    auto f1() -> int(&)[2]
++    {
++      return arr;
++    }
++
++    auto f2() -> std::pair<int, int>&
++    {
++      return pr;
++    }
++
++    struct S
++    {
++      int x1 : 2;
++      volatile double y1;
++    };
++
++    S f3()
++    {
++      return {};
++    }
++
++    auto [ x1, y1 ] = f1();
++    auto& [ xr1, yr1 ] = f1();
++    auto [ x2, y2 ] = f2();
++    auto& [ xr2, yr2 ] = f2();
++    const auto [ x3, y3 ] = f3();
++
++  }
++#endif // !defined(REALLY_CLANG)
++
++#if !defined(REALLY_CLANG)
++  namespace test_exception_spec_type_system
++  {
++
++    // TODO: test it with clang++ from git
++
++    struct Good {};
++    struct Bad {};
++
++    void g1() noexcept;
++    void g2();
++
++    template<typename T>
++    Bad
++    f(T*, T*);
++
++    template<typename T1, typename T2>
++    Good
++    f(T1*, T2*);
++
++    static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
++
++  }
++#endif // !defined(REALLY_CLANG)
++
++  namespace test_inline_variables
++  {
++
++    template<class T> void f(T)
++    {}
++
++    template<class T> inline T g(T)
++    {
++      return T{};
++    }
++
++    template<> inline void f<>(int)
++    {}
++
++    template<> int g<>(int)
++    {
++      return 5;
++    }
++
++  }
++
++}  // namespace cxx17
++
++#endif  // __cplusplus <= 201402L
++
++]])
diff --git a/patches/cups-filters-1.16.1/autogen.sh b/patches/cups-filters-1.16.1/autogen.sh
new file mode 100755
index 000000000..ddae563bc
--- /dev/null
+++ b/patches/cups-filters-1.16.1/autogen.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec ./autogen.sh
diff --git a/patches/cups-filters-1.16.1/series b/patches/cups-filters-1.16.1/series
new file mode 100644
index 000000000..8c053077a
--- /dev/null
+++ b/patches/cups-filters-1.16.1/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-configure.ac-check-for-C-11-support.patch
+# b0f06d39888540753d3e8e1b1cb0f092  - git-ptx-patches magic
diff --git a/rules/cups-filters.in b/rules/cups-filters.in
new file mode 100644
index 000000000..4e7cb3796
--- /dev/null
+++ b/rules/cups-filters.in
@@ -0,0 +1,69 @@
+## 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_SPLASH_FP	if CUPS_FILTERS_POPPLER
+	select POPPLER_SPLASH_FP_DOUBLE	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_FIXEDPOINT!"
+	depends on (POPPLER_SPLASH_FIXEDPOINT && CUPS_FILTERS_POPPLER)
+
+config CUPS_FILTERS_IMAGEFILTERS
+	bool "build image filters"
+	help
+	  Build imagetopdf and imagetoraster filters
+
+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..5ccff2c10
--- /dev/null
+++ b/rules/cups-filters.make
@@ -0,0 +1,96 @@
+# -*-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.16.1
+CUPS_FILTERS_MD5	:= f76d13c431257a95b233e5c87d10742f
+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
+# ----------------------------------------------------------------------------
+
+CUPS_FILTERS_ENV	:= $(CROSS_ENV)
+
+#
+# autoconf
+#
+# We have to set --exec-prefix and --libdir, otherwise the libs end up in
+# ${prefix}/lib64 due to broken autoconf magic, which is not what we want.
+#
+CUPS_FILTERS_CONF_TOOL	:= autoconf
+CUPS_FILTERS_CONF_OPT	:= \
+	$(CROSS_AUTOCONF_USR) \
+	--exec-prefix=/usr/ \
+	--libdir=/usr/lib/ \
+	--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_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, 0755, libcupsfilters)
+	@$(call install_lib, cups-filters, 0, 0, 0755, 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] 30+ messages in thread

* Re: [ptxdist] [PATCH 1/7] libpaper: new package: system-wide papersize configuration
  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
  1 sibling, 1 reply; 30+ messages in thread
From: Juergen Borleis @ 2017-08-24  7:32 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

Hi Roland,

On Thursday 24 August 2017 00:39:05 Roland Hieber wrote:
> Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> ---
>  rules/libpaper.in   | 32 ++++++++++++++++++++++
>  rules/libpaper.make | 77
> +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed,
> 109 insertions(+)
>  create mode 100644 rules/libpaper.in
>  create mode 100644 rules/libpaper.make
>
> diff --git a/rules/libpaper.in b/rules/libpaper.in
> new file mode 100644
> index 000000000..6052d2c14
> --- /dev/null
> +++ b/rules/libpaper.in
> @@ -0,0 +1,32 @@
> +## SECTION=multimedia_libs
> +
> +menuconfig LIBPAPER
> +	tristate
> +	prompt "libpaper                      "
> +	select HOST_AUTOTOOLS_AUTOCONF
> +	select HOST_AUTOTOOLS_LIBTOOL
> +	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

Can you list valid names which can be used here? Or a pointer to a file
where the user can get the valid names from?

jb

-- 
Pengutronix e.K.                             | Juergen Borleis             |
Industrial Linux Solutions                   | http://www.pengutronix.de/  |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 1/7] libpaper: new package: system-wide papersize configuration
  2017-08-24  7:32   ` Juergen Borleis
@ 2017-08-28  8:20     ` Roland Hieber
  0 siblings, 0 replies; 30+ messages in thread
From: Roland Hieber @ 2017-08-28  8:20 UTC (permalink / raw)
  To: ptxdist

On 24.08.2017 09:32, Juergen Borleis wrote:
>> +config LIBPAPER_SIZE
>> +	string "default fallback paper size"
>> +	default "letter"
>> +	help
>> +	  Paper size that is used if nothing else is specified in /etc/papersize
> 
> Can you list valid names which can be used here? Or a pointer to a file
> where the user can get the valid names from?

Yes, good idea! I'll send v2 after feedback for the rest of the series.

  - Roland

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 1/7] libpaper: new package: system-wide papersize configuration
  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  9:47   ` Michael Olbrich
  1 sibling, 0 replies; 30+ messages in thread
From: Michael Olbrich @ 2017-08-28  9:47 UTC (permalink / raw)
  To: ptxdist

On Thu, Aug 24, 2017 at 12:39:05AM +0200, Roland Hieber wrote:
> Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> ---
>  rules/libpaper.in   | 32 ++++++++++++++++++++++
>  rules/libpaper.make | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 109 insertions(+)
>  create mode 100644 rules/libpaper.in
>  create mode 100644 rules/libpaper.make
> 
> diff --git a/rules/libpaper.in b/rules/libpaper.in
> new file mode 100644
> index 000000000..6052d2c14
> --- /dev/null
> +++ b/rules/libpaper.in
> @@ -0,0 +1,32 @@
> +## SECTION=multimedia_libs
> +
> +menuconfig LIBPAPER
> +	tristate
> +	prompt "libpaper                      "
> +	select HOST_AUTOTOOLS_AUTOCONF
> +	select HOST_AUTOTOOLS_LIBTOOL
> +	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
> +
> +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..3e94ed2f2
> --- /dev/null
> +++ b/rules/libpaper.make
> @@ -0,0 +1,77 @@
> +# -*-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://http.debian.net/debian/pool/main/libp/libpaper/libpaper_$(LIBPAPER_VERSION).$(LIBPAPER_SUFFIX)

This URL will break once a new version hits debian testing. Please use a
http://snapshot.debian.org/ URL.

> +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, but upstream does not provide a ./configure
> +#
> +$(STATEDIR)/libpaper.prepare:
> +	@$(call targetinfo)
> +	@$(call clean, $(LIBPAPER_DIR)/config.cache)
> +	@cd $(LIBPAPER_DIR) && \
> +		autoreconf --install && \
> +		$(LIBPAPER_PATH) $(LIBPAPER_CONF_ENV) \
> +		./configure $(CROSS_AUTOCONF_USR)
> +	@$(call touch)

No, create a 'patches/libpaper-.../autogen.sh' and use the default prepare
stage.

> +
> +# ----------------------------------------------------------------------------
> +# 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, 0755, libpaper)
> +
> +ifeq ($(PTXCONF_LIBPAPER_PAPERCONFIG),y)
> +	@$(call install_copy, libpaper, 0, 0, 755, -, /usr/sbin/paperconfig)
> +endif
> +ifeq ($(PTXCONF_LIBPAPER_PAPERCONF),y)
> +	@$(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

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 2/7] qpdf: new package: PDF inspection library and tools
  2017-08-23 22:39 ` [ptxdist] [PATCH 2/7] qpdf: new package: PDF inspection library and tools Roland Hieber
@ 2017-08-28  9:52   ` Michael Olbrich
  2017-09-11 10:11   ` Juergen Borleis
  1 sibling, 0 replies; 30+ messages in thread
From: Michael Olbrich @ 2017-08-28  9:52 UTC (permalink / raw)
  To: ptxdist

On Thu, Aug 24, 2017 at 12:39:06AM +0200, Roland Hieber wrote:
> 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

Always use /dev/urandom. I don't think this should be configurable.

Michael

> +
> +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

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 3/7] poppler-data: new package: optional encoding data for poppler
  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
  0 siblings, 0 replies; 30+ messages in thread
From: Michael Olbrich @ 2017-08-28  9:54 UTC (permalink / raw)
  To: ptxdist

On Thu, Aug 24, 2017 at 12:39:07AM +0200, Roland Hieber wrote:
> Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> ---
>  rules/poppler-data.in   | 10 +++++++
>  rules/poppler-data.make | 79 +++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 89 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..2b51a61a9
> --- /dev/null
> +++ b/rules/poppler-data.make
> @@ -0,0 +1,79 @@
> +# -*-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.7
> +POPPLER_DATA_MD5	:= 636a8f2b9f6df9e7ced8ec0946961eaf
> +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
> +
> +# ----------------------------------------------------------------------------
> +# Compile
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/poppler-data.compile:
> +	@$(call targetinfo)
> +	@$(call touch)

What's the default make target? If it's not harmful then just use the
default compile stage.

> +
> +# ----------------------------------------------------------------------------
> +# Install
> +# ----------------------------------------------------------------------------
> +
> +POPPLER_DATA_INSTALL_OPT := prefix=/usr install
> +
> +$(STATEDIR)/poppler-data.install:
> +	@$(call targetinfo)
> +	@$(call world/install, POPPLER_DATA)
> +	@$(call touch)

I think, this can be removed, right? Just setting the opts should be enough.

> +
> +# ----------------------------------------------------------------------------
> +# 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)
> +
> +# ----------------------------------------------------------------------------
> +# Clean
> +# ----------------------------------------------------------------------------
> +
> +#$(STATEDIR)/poppler-data.clean:
> +#	@$(call targetinfo)
> +#	@$(call clean_pkg, POPPLER_DATA)

remove.

Michael

> +
> +# vim: ft=make ts=8 tw=80
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 4/7] poppler: version bump 0.18.0 -> 0.57.0
  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
  0 siblings, 1 reply; 30+ messages in thread
From: Michael Olbrich @ 2017-08-28 10:18 UTC (permalink / raw)
  To: ptxdist

On Thu, Aug 24, 2017 at 12:39:08AM +0200, Roland Hieber wrote:
> This is quite a version bump, spanning six years of poppler development.
> Upstream now provides data for rendering cyrillic languages in the
> package poppler-data, but this dependency is only detected at compile
> time, so make sure the build order is right.
> 
> Some applications require the old xpdf headers, the CPP wrapper or CMYK
> support, so make these configure 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. The GTK dependency
> has been dropped (or was it even necessary in the first place?)
> 
> Don't wonder about --disable-relocatable, it only applies to Windows.
> 
> poppler allows using zlib to uncompress flate streams, but with the
> warning that this is "not totally safe", so it is disabled.
> 
> Additionally, poppler could benefit from packaging libopenjpeg and
> libtiff in ptxdist for parsing embedded JPEG2000 or TIFF in PDFs.
> Likewise, libnss could be packaged for PDF signature support. Also
> there is the option to build a Qt5 wrapper, but I don't have a good way
> to test this, so it is currently disabled.
> 
> Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> ---
>  ...error-vector-in-namespace-std-does-not-na.patch | 56 ++++++++++++++
>  patches/poppler-0.57.0/series                      |  4 +
>  rules/poppler.in                                   | 86 +++++++++++++++++-----
>  rules/poppler.make                                 | 67 +++++++++++++----
>  4 files changed, 179 insertions(+), 34 deletions(-)
>  create mode 100644 patches/poppler-0.57.0/0001-Form.h-fix-error-vector-in-namespace-std-does-not-na.patch
>  create mode 100644 patches/poppler-0.57.0/series
> 
> diff --git a/patches/poppler-0.57.0/0001-Form.h-fix-error-vector-in-namespace-std-does-not-na.patch b/patches/poppler-0.57.0/0001-Form.h-fix-error-vector-in-namespace-std-does-not-na.patch
> new file mode 100644
> index 000000000..70bfdc36f
> --- /dev/null
> +++ b/patches/poppler-0.57.0/0001-Form.h-fix-error-vector-in-namespace-std-does-not-na.patch
> @@ -0,0 +1,56 @@
> +From: Roland Hieber <r.hieber@pengutronix.de>
> +Date: Fri, 11 Aug 2017 11:44:26 +0200
> +Subject: [PATCH] Form.h: fix error: 'vector' in namespace 'std' does not name
> + a type
> +
> +Original error message while compiling with
> +OSELAS.Toolchain-2016.06.1-arm-v7a-linux-gnueabi,
> +gcc-5.4.0-glibc-2.23-binutils-2.26-kernel-4.6-sanitized:
> +
> +	make[5]: Entering directory '/ptx/work/dude/WORK_B/rhi/OSELAS.BSP-Miele-PST/platform-cpu20/build-target/poppler-0.57.0/qt4/src'
> +	  CXX      libpoppler_qt4_la-poppler-form.lo
> +	In file included from poppler-form.cc:26:0:
> +	../../poppler/Form.h:544:14: error: 'vector' in namespace 'std' does not name a template type
> +	../../poppler/Form.h:556:8: error: 'vector' in namespace 'std' does not name a template type
> +	Makefile:735: recipe for target 'libpoppler_qt4_la-poppler-form.lo' failed
> +
> +configure arguments were:
> +
> +	--prefix=/usr --sysconfdir=/etc --localstatedir=/var
> +	--libdir=/usr/lib --host=arm-v7a-linux-gnueabi
> +	--build=x86_64-host-linux-gnu --enable-option-checking
> +	--disable-silent-rules --disable-dependency-tracking
> +	--enable-shared --enable-fast-install --enable-libtool-lock
> +	--enable-xpdf-headers --enable-build-type=release
> +	--disable-single-precision --enable-fixedpoint --enable-cmyk
> +	--disable-relocatable --enable-libopenjpeg=none --disable-libnss
> +	--disable-libtiff --enable-largefile --enable-zlib
> +	--disable-zlib-uncompress --enable-libcurl
> +	--enable-dctdecoder=libjpeg --enable-libpng
> +	--disable-splash-output --enable-cairo-output
> +	--enable-poppler-glib --disable-introspection --disable-gtk-doc
> +	--disable-gtk-doc-html --disable-gtk-doc-pdf
> +	--enable-poppler-qt4 --disable-poppler-qt5 --enable-poppler-cpp
> +	--disable-gtk-test --enable-utils --disable-compile-warnings
> +	--enable-cms=lcms1 --without-x
> +	--with-font-configuration=fontconfig --without-libiconv-prefix
> +	--with-testdatadir=
> +
> +Forwarded: https://bugs.freedesktop.org/show_bug.cgi?id=102147
> +Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> +---
> + poppler/Form.h | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/poppler/Form.h b/poppler/Form.h
> +index 8ddb6fe3d638..e0a3a28767bb 100644
> +--- a/poppler/Form.h
> ++++ b/poppler/Form.h
> +@@ -27,6 +27,7 @@
> + #include "Annot.h"
> + 
> + #include <set>
> ++#include <vector>
> + 
> + class GooString;
> + class Array;
> diff --git a/patches/poppler-0.57.0/series b/patches/poppler-0.57.0/series
> new file mode 100644
> index 000000000..9e7d355f4
> --- /dev/null
> +++ b/patches/poppler-0.57.0/series
> @@ -0,0 +1,4 @@
> +# generated by git-ptx-patches
> +#tag:base --start-number 1
> +0001-Form.h-fix-error-vector-in-namespace-std-does-not-na.patch
> +# ed2ff81cec7f4cb784b9295817f9d1e8  - git-ptx-patches magic
> diff --git a/rules/poppler.in b/rules/poppler.in
> index b107dc7a5..793e19275 100644
> --- a/rules/poppler.in
> +++ b/rules/poppler.in
> @@ -4,18 +4,21 @@ menuconfig POPPLER
>  	tristate
>  	prompt "poppler                       "
>  	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 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
>  	help
>  	  Poppler is a PDF rendering library based on the xpdf-3.0 code base.
>  
> @@ -29,6 +32,35 @@ config POPPLER_BIN
>  	  pdffonts, pdfimages, pdfinfo, pdftoabw, pdftohtml, pdftoppm, pdftops,
>  	  pdftotext.
>  
> +config POPPLER_XPDF
> +	bool
> +	prompt "install unsupported xpdf headers"
> +	help
> +	  Install XPDF headers for software that still depends on them.
> +	  Normally, this option should not be needed.
> +
> +config POPPLER_BUILD_DEBUG
> +	bool
> +	prompt "enable poppler debug build"
> +	help
> +	  Build with debug information and without optimization. You probably
> +	  don't want this in a production system.
> +
> +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.
> +
> +config POPPLER_CMYK
> +	bool
> +	prompt "enable poppler CMYK raster support"
> +
> +config POPPLER_CPP
> +	bool
> +	prompt "enable poppler cpp wrapper"
> +
>  config POPPLER_GLIB
>  	select POPPLER_CAIRO
>  	bool
> @@ -42,14 +74,14 @@ config POPPLER_QT4
>  	help
>  	  build poppler Qt4 wrapper.
>  
> -comment "least one graphics backend should be selected"
> -	depends on !(POPPLER_CAIRO || POPPLER_SPLASH)
> +comment "at least one graphics backend should be selected"
> +	depends on !(POPPLER_CAIRO || POPPLER_SPLASH || POPPLER_QT4)
>  
>  config POPPLER_CAIRO
>  	bool
>  	prompt "enable poppler cairo graphics backend"
>  	help
> -	  built cairo graphics backend
> +	  build cairo graphics backend
>  
>  config POPPLER_SPLASH
>  	bool
> @@ -57,17 +89,31 @@ config POPPLER_SPLASH
>  	help
>  	  build splash graphics backend
>  
> +config POPPLER_SPLASH_FP
> +	bool
> +	prompt "use floating point arithmetic"
> +	depends on POPPLER_SPLASH
> +	default y if HAS_HARDFLOAT
> +	help
> +	  If enabled, the Splash backend will use floating point operations
> +	  instead of fixed-point arithmetic.
> +
> +config POPPLER_SPLASH_FP_DOUBLE
> +	bool
> +	prompt "use double precision"
> +	depends on POPPLER_SPLASH_FP
> +	help
> +	  Use double precision instead of single precision floating point
> +	  arithmetic in Splash backend
> +
>  config POPPLER_PNG
>  	bool
> -	# fails to build with the current libpng
> -	depends on BROKEN
>  	prompt "enable poppler png support"
>  	help
>  	  compiles poppler with png support.
>  
>  config POPPLER_JPEG
>  	bool
> -	depends on BROKEN
>  	prompt "enable poppler jpeg support"
>  	help
>  	  compiles poppler with jpeg support.
> @@ -86,8 +132,10 @@ config POPPLER_CURL
>  
>  config POPPLER_CMS
>  	bool
> -	prompt "enable poppler cms support"
> +	prompt "enable poppler color management support"
>  	help
> -	  compiles poppler with color management system support.
> +	  compiles poppler with color management support.
>  
>  endif
> +
> +# vim: ft=kconfig ts=8 noet tw=80
> diff --git a/rules/poppler.make b/rules/poppler.make
> index 7ac676bf1..5e580f9d1 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
> +# - enable and 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,10 +23,10 @@ PACKAGES-$(PTXCONF_POPPLER) += poppler
>  #
>  # Paths and names
>  #
> -POPPLER_VERSION	:= 0.18.0
> -POPPLER_MD5	:= 4cd3bf2a0a13fa8eaf00d31368915f77
> +POPPLER_VERSION	:= 0.57.0
> +POPPLER_MD5	:= bc5a191741604552c90d484103229374
>  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)
> @@ -35,17 +41,43 @@ POPPLER_ENV 	:= $(CROSS_ENV)
>  #
>  # autoconf
>  #
> -POPPLER_AUTOCONF := \
> +POPPLER_CONF_TOOL := autoconf
> +POPPLER_CONF_OPT := \
>  	$(CROSS_AUTOCONF_USR) \
> -	$(GLOBAL_LARGE_FILE_OPTION) \
> -	--disable-xpdf-headers \
> -	--$(call ptx/disen, PTXCONF_HAS_HARDFLOAT)-single-precision \
> -	--disable-fixedpoint \
> -	--disable-libopenjpeg \
> +	--enable-option-checking \
> +	--disable-silent-rules \
> +	--disable-dependency-tracking \
> +	--enable-shared \
> +	--enable-fast-install \
> +	--enable-libtool-lock \
> +	--$(call ptx/endis, PTXCONF_POPPLER_XPDF)-xpdf-headers \
> +	--enable-build-type=$(call ptx/ifdef,PTXCONF_POPPLER_BUILD_DEBUG,debug,release)
> +ifdef PTXCONF_POPPLER_SPLASH_FP
> +ifdef PTXCONF_POPPLER_SPLASH_FP_DOUBLE
> +POPPLER_CONF_OPT += \
> +	--disable-single-precision \
> +	--disable-fixedpoint
> +else # PTXCONF_POPPLER_SPLASH_FP && !PTXCONF_POPPLER_SPLASH_FP_DOUBLE
> +POPPLER_CONF_OPT += \
> +	--enable-single-precision \
> +	--disable-fixedpoint
> +endif
> +else # !PTXCONF_POPPLER_SPLASH_FP
> +POPPLER_CONF_OPT += \
> +	--disable-single-precision \
> +	--enable-fixedpoint
> +endif

Can't you use ptx/disen here? The single-precision option should be ignored
for fixedpoint, right?

> +POPPLER_CONF_OPT += \
> +	--$(call ptx/endis, PTXCONF_POPPLER_CMYK)-cmyk \
> +	--disable-relocatable \
> +	--enable-libopenjpeg=none \
> +	--disable-libnss \
>  	--disable-libtiff \
> +	$(GLOBAL_LARGE_FILE_OPTION) \
>  	--$(call ptx/endis, PTXCONF_POPPLER_ZLIB)-zlib \
> +	--disable-zlib-uncompress \
>  	--$(call ptx/endis, PTXCONF_POPPLER_CURL)-libcurl \
> -	--$(call ptx/endis, PTXCONF_POPPLER_JPEG)-libjpeg \
> +	--enable-dctdecoder=$(call ptx/ifdef,PTXCONF_POPPLER_JPEG,libjpeg,none) \
>  	--$(call ptx/endis, PTXCONF_POPPLER_PNG)-libpng \
>  	--$(call ptx/endis, PTXCONF_POPPLER_SPLASH)-splash-output \
>  	--$(call ptx/endis, PTXCONF_POPPLER_CAIRO)-cairo-output \
> @@ -55,14 +87,16 @@ POPPLER_AUTOCONF := \
>  	--disable-gtk-doc-html \
>  	--disable-gtk-doc-pdf \
>  	--$(call ptx/endis, PTXCONF_POPPLER_QT4)-poppler-qt4 \
> -	--disable-poppler-cpp \
> +	--disable-poppler-qt5 \
> +	--$(call ptx/endis, PTXCONF_POPPLER_CPP)-poppler-cpp \
>  	--disable-gtk-test \
>  	--$(call ptx/endis, PTXCONF_POPPLER_BIN)-utils \
>  	--disable-compile-warnings \
> -	--$(call ptx/endis, PTXCONF_POPPLER_CMS)-cms \
> +	--enable-cms=$(call ptx/ifdef,PTXCONF_POPPLER_CMS,lcms1,no) \
>  	--without-x \
>  	--with-font-configuration=fontconfig \
> -	--without-libiconv-prefix
> +	--without-libiconv-prefix \
> +	--with-testdatadir=
>  
>  # ----------------------------------------------------------------------------
>  # Target-Install
> @@ -85,6 +119,9 @@ 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
> @@ -95,4 +132,4 @@ endif
>  
>  	@$(call touch)
>  
> -# vim: syntax=make
> +# vim: ft=make ts=8 tw=80

I don't mind new files with this but don't change it.

Michael

> -- 
> 2.11.0
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 5/7] cups: new package: Common Unix Printing System
  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-30  8:42   ` Juergen Borleis
  2 siblings, 0 replies; 30+ messages in thread
From: Juergen Borleis @ 2017-08-28 12:44 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

Hi Roland,

On Thursday 24 August 2017 00:39:09 Roland Hieber wrote:
> [...]
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/accept)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsaccept)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsaddsmb)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsctl)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsd)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsdisable)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsenable)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsfilter)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsreject)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/lpadmin)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/lpc)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/lpinfo)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/lpmove)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/reject)

"accept", "cupsdisable", "cupsenable", "cupsreject" and "reject" are all
softlinks to "/usr/sbin/cupsaccept" and no files. PTXdist currently
complains:

ptxdist: error: file '[...]/[...]/packages/cups-2.2.4/usr/sbin/accept' is a link
ptxdist: error: file '[...]/[...]/packages/cups-2.2.4/usr/sbin/cupsdisable' is a link
ptxdist: error: file '[...]/[...]/packages/cups-2.2.4/usr/sbin/cupsenable' is a link
ptxdist: error: file '[...]/[...]/packages/cups-2.2.4/usr/sbin/cupsreject' is a link
ptxdist: error: file '[...]/[...]/packages/cups-2.2.4/usr/sbin/reject' is a link

jb

-- 
Pengutronix e.K.                             | Juergen Borleis             |
Industrial Linux Solutions                   | http://www.pengutronix.de/  |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 5/7] cups: new package: Common Unix Printing System
  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-09-27  8:16     ` Roland Hieber
  2017-08-30  8:42   ` Juergen Borleis
  2 siblings, 2 replies; 30+ messages in thread
From: Michael Olbrich @ 2017-08-28 12:51 UTC (permalink / raw)
  To: ptxdist

On Thu, Aug 24, 2017 at 12:39:09AM +0200, Roland Hieber wrote:
> 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>
> ---
>  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.in                                   | 142 +++++++++++++++
>  rules/cups.make                                 | 227 ++++++++++++++++++++++++
>  13 files changed, 434 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.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.in b/rules/cups.in
> new file mode 100644
> index 000000000..33c319752
> --- /dev/null
> +++ b/rules/cups.in
> @@ -0,0 +1,142 @@
> +## 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 ORACLE_JAVA7_JRE		if CUPS_JAVA
> +	select PERL			if CUPS_PERL
> +	select PHP5			if CUPS_PHP
> +	select PHP5_SAPI_CLI		if CUPS_PHP
> +	select PYTHON			if CUPS_PYTHON
> +
> +	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_THREADING
> +	bool "enable multithreading"
> +	default y
> +	help
> +	   Enable multi-threading support
> +
> +config CUPS_WEBINTERFACE
> +	bool "enable web interface"
> +	help
> +	   Enable CUPS printer management via HTTP(S). Only required for hosts
> +	   which should act as a printing server.
> +
> +	   If you overwrite the config files for CUPS, be sure to have
> +	   "WebInterface Yes" in your projectroot/etc/cups/cupsd.conf.
> +
> +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_INITSCRIPT
> +	bool "install init.d script"
> +	depends on INITMETHOD_BBINIT
> +	help
> +	  Install /etc/init.d/cups
> +
> +config CUPS_BBINIT_LINK
> +        string "link name"
> +        depends on CUPS_INITSCRIPT
> +        default "S90cups"

This option must be a separate file with SECTION=initmethod_bbinit

> +
> +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.
> +
> +config CUPS_JAVA
> +	bool "enable Java support for web interface"
> +	depends on CUPS_WEBINTERFACE
> +
> +config CUPS_PERL
> +	bool "enable Perl support for web interface"
> +	depends on CUPS_WEBINTERFACE
> +
> +config CUPS_PHP
> +	bool "enable PHP support for web interface"
> +	depends on CUPS_WEBINTERFACE
> +
> +config CUPS_PYTHON
> +	bool "enable Python support for web interface"
> +	depends on CUPS_WEBINTERFACE
> +
> +comment "--- Debugging ---"
> +
> +config CUPS_DEBUG
> +	bool "enable debug build"
> +	default n
> +	help
> +	  Pay attention: this will slow down CUPS drastically and increases the
> +	  memory footprint. Don't enable this on a production system!
> +
> +config CUPS_DEBUG_PRINTF
> +	bool "enable debug output"
> +	help
> +	  Enable much more debug messages. These messages are logged into a
> +	  separate file, the output is controlled over the following environment
> +	  variables:
> +
> +	  - CUPS_DEBUG_LOG: contains the file name to write the messages to
> +	  - CUPS_DEBUG_LEVEL: defines the loglevel (0...9, with 9 very noisy)
> +	  - CUPS_DEBUG_FILTER: defines a regular expression to filter out
> +	    unwanted debug messages.
> +
> +endif
> +# vim: ft=kconfig ts=8 noet tw=80
> diff --git a/rules/cups.make b/rules/cups.make
> new file mode 100644
> index 000000000..058ad0bda
> --- /dev/null
> +++ b/rules/cups.make
> @@ -0,0 +1,227 @@
> +# -*-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.4
> +CUPS		:= cups-$(CUPS_VERSION)
> +CUPS_MD5	:= d26e5a0a574a69fe1d01079b2931fc49
> +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	:= LGPLv2/GPLv2

LGPL-2.0 AND GPL-2.0

> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +CUPS_CONF_ENV	:= \
> +	$(CROSS_ENV) \
> +	DSTROOT=$(PKGDIR)/$(CUPS)
> +
> +#
> +# autoconf
> +#
> +# The --with-* options are only used to specify strings, --without-* does
> +# mostly nothing. So we're omitting them here.
> +#
> +# We have to set --exec-prefix and --libdir, otherwise the libs end up in
> +# ${prefix}/lib64 due to broken autoconf magic, which is not what we want.
> +#
> +# --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) \
> +	--exec-prefix=/usr/ \
> +	--libdir=/usr/lib/ \
> +	--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 \
> +	--$(call ptx/endis,PTXCONF_CUPS_DEBUG)-debug \
> +	--$(call ptx/endis,PTXCONF_CUPS_DEBUG)-debug-guards \
> +	--$(call ptx/endis,PTXCONF_CUPS_DEBUG_PRINTF)-debug-printfs \
> +	--disable-unit-tests \
> +	--$(call ptx/endis,PTXCONF_TARGET_HARDEN_RELRO)-relro \
> +	--disable-gssapi \
> +	--$(call ptx/endis,PTXCONF_CUPS_THREADING)-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
> +
> +CUPS_CONF_OPT	+= \
> +	--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 \
> +	$(call ptx/ifdef,PTXCONF_CUPS_JAVA,--with-java=/usr/bin/java,) \
> +	$(call ptx/ifdef,PTXCONF_CUPS_PERL,--with-perl=/usr/bin/perl,) \
> +	$(call ptx/ifdef,PTXCONF_CUPS_PHP,--with-php=/usr/bin/php5,) \
> +	$(call ptx/ifdef,PTXCONF_CUPS_PYTHON,--with-python=/usr/bin/python,)

Are these options only to set the executable path? If yes then always set
those and remove the options and dependencies. Just add a comment to the
webinterface option.

> +
> +# ----------------------------------------------------------------------------
> +# Install
> +# ----------------------------------------------------------------------------
> +
> +CUPS_MAKE_ENV	:= \
> +	DSTROOT=$(PKGDIR)/$(CUPS)
> +
> +# ----------------------------------------------------------------------------
> +# 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

You can use the user and group names below.

> +	@$(call install_alternative, cups, 1, 110, 0640, /etc/cups/cups-files.conf)
> +	@$(call install_alternative, cups, 1, 110, 0640, /etc/cups/cupsd.conf)
> +	@$(call install_alternative, cups, 1, 110, 0600, /etc/cups/classes.conf)
> +	@$(call install_alternative, cups, 1, 110, 0600, /etc/cups/client.conf)
> +	@$(call install_alternative, cups, 1, 110, 0640, /etc/cups/mailto.conf)
> +	@$(call install_alternative_tree, cups, 1, 110,  /etc/cups/ppd/)
> +	@$(call install_alternative, cups, 1, 110, 0600, /etc/cups/printers.conf)
> +	@$(call install_alternative, cups, 1, 110, 0640, /etc/cups/snmp.conf)
> +	@$(call install_alternative, cups, 1, 110, 0640, /etc/printcap)
> +	@$(call install_alternative, cups, 1, 110, 0640, /usr/share/cups/mime/mime.convs)
> +	@$(call install_alternative, cups, 1, 110, 0640, /usr/share/cups/mime/mime.types)
> +
> +ifdef PTXCONF_CUPS_SSL
> +	@$(call install_alternative_tree, cups, 1, 110, /etc/cups/ssl/)
> +endif
> +
> +ifdef PTXCONF_CUPS_DBUS
> +	@$(call install_alternative, cups, 0, 0, 0644, /etc/dbus-1/system.d/cups.conf)
> +endif
> +
> +# ----- libraries
> +	@$(call install_lib, cups, 0, 0, 0755, libcups)
> +	@$(call install_lib, cups, 0, 0, 0755, libcupsimage)
> +	@$(call install_lib, cups, 0, 0, 0755, libcupsmime)
> +	@$(call install_lib, cups, 0, 0, 0755, libcupsppdc)
> +
> +# ----- user and system binaries, with the correct access rights
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/cancel)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/cups-config)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/ipptool)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/lp)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/lpoptions)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/lpq)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/lpr)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/lprm)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/lpstat)
> +
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/accept)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsaccept)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsaddsmb)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsctl)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsd)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsdisable)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsenable)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsfilter)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/cupsreject)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/lpadmin)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/lpc)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/lpinfo)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/lpmove)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/sbin/reject)
> +
> +ifdef PTXCONF_CUPS_TEST_TOOLS
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/cupstestdsc)
> +	@$(call install_copy, cups, 0, 0, 0755, -, /usr/bin/cupstestppd)
> +endif
> +
> +# ----- backends, filters, cgi-bin (if enabled), etc.
> +	@$(call install_tree, cups, 0, 0, -, /usr/lib/cups/backend)
> +	@$(call install_tree, cups, 0, 0, -, /usr/lib/cups/daemon)
> +	@$(call install_tree, cups, 0, 0, -, /usr/lib/cups/filter)
> +	@$(call install_tree, cups, 0, 0, -, /usr/lib/cups/monitor)
> +	@$(call install_tree, cups, 0, 0, -, /usr/lib/cups/notifier)
> +
> +ifdef PTXCONF_CUPS_LIBUSB
> +	@$(call install_alternative, cups, 0, 0, 0644, \
		/usr/share/cups/usb/org.cups.usb-quirks)

break

> +endif
> +
> +ifdef PTXCONF_CUPS_WEBINTERFACE
> +	@$(call install_lib, cups, 0, 0, 0755, libcupscgi)
> +	@$(call install_tree, cups, 0, 0, -, /usr/lib/cups/cgi-bin)
> +	@$(call install_tree, cups, 0, 0, -, /usr/share/cups/templates)
> +	@$(call install_tree, cups, 0, 0, -, /usr/share/doc/cups)

Why docs?

> +endif
> +
> +# ----- startup files
> +ifdef PTXCONF_CUPS_SYSTEMD_UNIT
> +	@$(call install_alternative, cups, 0, 0, 0644, /usr/lib/tmpfiles.d/cups.conf)
> +	@$(call install_alternative, cups, 0, 0, 0644, /usr/lib/systemd/system/cups.service)
> +	@$(call install_alternative, cups, 0, 0, 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)

break all lines here.

> +endif
> +
> +ifdef PTXCONF_CUPS_INITSCRIPT
> +	@$(call install_alternative, cups, 0, 0, 0755, /etc/init.d/cups)
> +	@$(call install_link, cups, ../init.d/cups, \
		/etc/rc.d/$(PTXCONF_CUPS_BBINIT_LINK))

break

Michael

> +endif
> +
> +	@$(call install_finish, cups)
> +
> +	@$(call touch)
> +
> +# vim: ft=make ts=8 tw=80
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 6/7] host-cups: new package: CUPS PPD compiler
  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
  1 sibling, 0 replies; 30+ messages in thread
From: Michael Olbrich @ 2017-08-28 12:57 UTC (permalink / raw)
  To: ptxdist

On Thu, Aug 24, 2017 at 12:39:10AM +0200, Roland Hieber wrote:
> Most printer drivers compile model-specific PPDs from a generic schema
> using ppdc during the build process. For this, ppdc must be able to find
> CUPS' internal include files in sysroot-target. Unfortunately, the CUPS
> build system is rather inflexible, so we have to build nearly everything
> to get a working ppdc.
> 
> Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> ---
>  rules/host-cups.in   |   7 ++++
>  rules/host-cups.make | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 115 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..f45855d19
> --- /dev/null
> +++ b/rules/host-cups.make
> @@ -0,0 +1,108 @@
> +# -*-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
> +# ----------------------------------------------------------------------------
> +
> +HOST_CUPS_CONF_ENV	:= $(HOST_ENV)

not used -> remove.

> +
> +#
> +# 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).
> +#
> +# We have to set --exec-prefix and --libdir, otherwise the libs end up in
> +# ${prefix}/lib64, which is not what we want.
> +#
> +HOST_CUPS_CONF_TOOL	:= autoconf
> +HOST_CUPS_CONF_OPT	:= \
> +	$(HOST_AUTOCONF) \
> +	--exec-prefix=/usr/ \
> +	--libdir=/usr/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 \
> +	--disable-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
> +
> +# ----------------------------------------------------------------------------
> +# Install
> +# ----------------------------------------------------------------------------
> +
> +HOST_CUPS_MAKE_ENV := \
> +	DSTROOT=$(HOST_CUPS_PKGDIR)
> +
> +$(STATEDIR)/host-cups.install:
> +	@$(call targetinfo)
> +
> +	@$(call world/install, HOST_CUPS)
> +
> +	@# ppdc isn't built by --with-components=core

If it's not built the it should be built in the compile stage with:

	@$(call compile, HOST_CUPS, -C ${HOST_CUPS_DIR}/ppdc)

> +	$(MAKE) -C ${HOST_CUPS_DIR}/ppdc $(HOST_CUPS_MAKE_ENV) install

	@$(call compile, HOST_CUPS, -C ${HOST_CUPS_DIR}/ppdc install)

should work, even if it's not very nice.

> +
> +	@$(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 'LD_LIBRARY_PATH=$(PTXDIST_SYSROOT_HOST)/usr/lib $(PTXDIST_SYSROOT_HOST)/usr/bin/ppdc -I $(SYSROOT)/usr/share/cups/ppdc "$$@"'; \

The LD_LIBRARY_PATH should not be necessary. What's the rpath for ppdc?

> +	) > $(CROSS_PPDC)
> +	chmod +x $(CROSS_PPDC)
> +
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Clean
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/host-cups.clean:
> +	@$(call targetinfo)
> +	@$(call clean_pkg, HOST_CUPS)
> +	rm -f $(CROSS_PPDC)

remove.

Michael

> +
> +# vim: ft=make ts=8 tw=80
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 7/7] cups-filters: new package: additional filters and backends for CUPS
  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
  0 siblings, 1 reply; 30+ messages in thread
From: Michael Olbrich @ 2017-08-28 13:03 UTC (permalink / raw)
  To: ptxdist

On Thu, Aug 24, 2017 at 12:39:11AM +0200, Roland Hieber wrote:
> Upstream is very responsive, merged some patches and made a new release
> while I was still packaging the old one :)

Please update to the new release, so we can avoid the patch.

> Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> ---
>  .../0001-configure.ac-check-for-C-11-support.patch | 1019 ++++++++++++++++++++
>  patches/cups-filters-1.16.1/autogen.sh             |    2 +
>  patches/cups-filters-1.16.1/series                 |    4 +
>  rules/cups-filters.in                              |   69 ++
>  rules/cups-filters.make                            |   96 ++
>  5 files changed, 1190 insertions(+)
>  create mode 100644 patches/cups-filters-1.16.1/0001-configure.ac-check-for-C-11-support.patch
>  create mode 100755 patches/cups-filters-1.16.1/autogen.sh
>  create mode 100644 patches/cups-filters-1.16.1/series
>  create mode 100644 rules/cups-filters.in
>  create mode 100644 rules/cups-filters.make
> 
> diff --git a/patches/cups-filters-1.16.1/0001-configure.ac-check-for-C-11-support.patch b/patches/cups-filters-1.16.1/0001-configure.ac-check-for-C-11-support.patch
> new file mode 100644
> index 000000000..a7d308e0e
> --- /dev/null
> +++ b/patches/cups-filters-1.16.1/0001-configure.ac-check-for-C-11-support.patch
> @@ -0,0 +1,1019 @@
> +From: Roland Hieber <r.hieber@pengutronix.de>
> +Date: Tue, 15 Aug 2017 12:53:14 +0200
> +Subject: [PATCH] configure.ac: check for C++11 support
> +
> +The filters pdftoopvp, bannertopdf and pdftoraster depend on features
> +only available in C++11, indirectly also because poppler does not put
> +-std=c++11 on its pkg-config CFLAGS (but I'm not sure whether it should
> +even do this). Solve this problems by adding -std=c++1 to $(CXX), if
> +necessary, or fail if the compiler does not support C++11.
> +
> +Forwarded: https://bugs.linuxfoundation.org/show_bug.cgi?id=1404
> +Applied-Upstream: http://bzr.linuxfoundation.org/loggerhead/openprinting/cups-filters/revision/7674
> +Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> +---
> + configure.ac                |   1 +
> + m4/ax_cxx_compile_stdcxx.m4 | 982 ++++++++++++++++++++++++++++++++++++++++++++
> + 2 files changed, 983 insertions(+)
> + create mode 100644 m4/ax_cxx_compile_stdcxx.m4
> +
> +diff --git a/configure.ac b/configure.ac
> +index 6ce671e6026a..7ad5592e0423 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -52,6 +52,7 @@ AH_BOTTOM([
> + # ===========================
> + AC_PROG_CC
> + AC_PROG_CXX
> ++AX_CXX_COMPILE_STDCXX([11],[noext],[mandatory])
> + AM_PROG_CC_C_O
> + AC_PROG_CPP
> + AC_PROG_INSTALL
> +diff --git a/m4/ax_cxx_compile_stdcxx.m4 b/m4/ax_cxx_compile_stdcxx.m4
> +new file mode 100644
> +index 000000000000..5032bba8091d
> +--- /dev/null
> ++++ b/m4/ax_cxx_compile_stdcxx.m4
> +@@ -0,0 +1,982 @@
> ++# ===========================================================================
> ++#  https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
> ++# ===========================================================================
> ++#
> ++# SYNOPSIS
> ++#
> ++#   AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
> ++#
> ++# DESCRIPTION
> ++#
> ++#   Check for baseline language coverage in the compiler for the specified
> ++#   version of the C++ standard.  If necessary, add switches to CXX and
> ++#   CXXCPP to enable support.  VERSION may be '11' (for the C++11 standard)
> ++#   or '14' (for the C++14 standard).
> ++#
> ++#   The second argument, if specified, indicates whether you insist on an
> ++#   extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
> ++#   -std=c++11).  If neither is specified, you get whatever works, with
> ++#   preference for an extended mode.
> ++#
> ++#   The third argument, if specified 'mandatory' or if left unspecified,
> ++#   indicates that baseline support for the specified C++ standard is
> ++#   required and that the macro should error out if no mode with that
> ++#   support is found.  If specified 'optional', then configuration proceeds
> ++#   regardless, after defining HAVE_CXX${VERSION} if and only if a
> ++#   supporting mode is found.
> ++#
> ++# LICENSE
> ++#
> ++#   Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
> ++#   Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
> ++#   Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
> ++#   Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
> ++#   Copyright (c) 2015 Paul Norman <penorman@mac.com>
> ++#   Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
> ++#   Copyright (c) 2016 Krzesimir Nowak <qdlacz@gmail.com>
> ++#
> ++#   Copying and distribution of this file, with or without modification, are
> ++#   permitted in any medium without royalty provided the copyright notice
> ++#   and this notice are preserved.  This file is offered as-is, without any
> ++#   warranty.
> ++
> ++#serial 7
> ++
> ++dnl  This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
> ++dnl  (serial version number 13).
> ++
> ++AX_REQUIRE_DEFINED([AC_MSG_WARN])
> ++AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
> ++  m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
> ++        [$1], [14], [ax_cxx_compile_alternatives="14 1y"],
> ++        [$1], [17], [ax_cxx_compile_alternatives="17 1z"],
> ++        [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
> ++  m4_if([$2], [], [],
> ++        [$2], [ext], [],
> ++        [$2], [noext], [],
> ++        [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
> ++  m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
> ++        [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
> ++        [$3], [optional], [ax_cxx_compile_cxx$1_required=false],
> ++        [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
> ++  AC_LANG_PUSH([C++])dnl
> ++  ac_success=no
> ++  AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
> ++  ax_cv_cxx_compile_cxx$1,
> ++  [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
> ++    [ax_cv_cxx_compile_cxx$1=yes],
> ++    [ax_cv_cxx_compile_cxx$1=no])])
> ++  if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
> ++    ac_success=yes
> ++  fi
> ++
> ++  m4_if([$2], [noext], [], [dnl
> ++  if test x$ac_success = xno; then
> ++    for alternative in ${ax_cxx_compile_alternatives}; do
> ++      switch="-std=gnu++${alternative}"
> ++      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
> ++      AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
> ++                     $cachevar,
> ++        [ac_save_CXX="$CXX"
> ++         CXX="$CXX $switch"
> ++         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
> ++          [eval $cachevar=yes],
> ++          [eval $cachevar=no])
> ++         CXX="$ac_save_CXX"])
> ++      if eval test x\$$cachevar = xyes; then
> ++        CXX="$CXX $switch"
> ++        if test -n "$CXXCPP" ; then
> ++          CXXCPP="$CXXCPP $switch"
> ++        fi
> ++        ac_success=yes
> ++        break
> ++      fi
> ++    done
> ++  fi])
> ++
> ++  m4_if([$2], [ext], [], [dnl
> ++  if test x$ac_success = xno; then
> ++    dnl HP's aCC needs +std=c++11 according to:
> ++    dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
> ++    dnl Cray's crayCC needs "-h std=c++11"
> ++    for alternative in ${ax_cxx_compile_alternatives}; do
> ++      for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
> ++        cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
> ++        AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
> ++                       $cachevar,
> ++          [ac_save_CXX="$CXX"
> ++           CXX="$CXX $switch"
> ++           AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
> ++            [eval $cachevar=yes],
> ++            [eval $cachevar=no])
> ++           CXX="$ac_save_CXX"])
> ++        if eval test x\$$cachevar = xyes; then
> ++          CXX="$CXX $switch"
> ++          if test -n "$CXXCPP" ; then
> ++            CXXCPP="$CXXCPP $switch"
> ++          fi
> ++          ac_success=yes
> ++          break
> ++        fi
> ++      done
> ++      if test x$ac_success = xyes; then
> ++        break
> ++      fi
> ++    done
> ++  fi])
> ++  AC_LANG_POP([C++])
> ++  if test x$ax_cxx_compile_cxx$1_required = xtrue; then
> ++    if test x$ac_success = xno; then
> ++      AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
> ++    fi
> ++  fi
> ++  if test x$ac_success = xno; then
> ++    HAVE_CXX$1=0
> ++    AC_MSG_NOTICE([No compiler with C++$1 support was found])
> ++  else
> ++    HAVE_CXX$1=1
> ++    AC_DEFINE(HAVE_CXX$1,1,
> ++              [define if the compiler supports basic C++$1 syntax])
> ++  fi
> ++  AC_SUBST(HAVE_CXX$1)
> ++  m4_if([$1], [17], [AC_MSG_WARN([C++17 is not yet standardized, so the checks may change in incompatible ways anytime])])
> ++])
> ++
> ++
> ++dnl  Test body for checking C++11 support
> ++
> ++m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
> ++  _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
> ++)
> ++
> ++
> ++dnl  Test body for checking C++14 support
> ++
> ++m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
> ++  _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
> ++  _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
> ++)
> ++
> ++m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
> ++  _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
> ++  _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
> ++  _AX_CXX_COMPILE_STDCXX_testbody_new_in_17
> ++)
> ++
> ++dnl  Tests for new features in C++11
> ++
> ++m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
> ++
> ++// If the compiler admits that it is not ready for C++11, why torture it?
> ++// Hopefully, this will speed up the test.
> ++
> ++#ifndef __cplusplus
> ++
> ++#error "This is not a C++ compiler"
> ++
> ++#elif __cplusplus < 201103L
> ++
> ++#error "This is not a C++11 compiler"
> ++
> ++#else
> ++
> ++namespace cxx11
> ++{
> ++
> ++  namespace test_static_assert
> ++  {
> ++
> ++    template <typename T>
> ++    struct check
> ++    {
> ++      static_assert(sizeof(int) <= sizeof(T), "not big enough");
> ++    };
> ++
> ++  }
> ++
> ++  namespace test_final_override
> ++  {
> ++
> ++    struct Base
> ++    {
> ++      virtual void f() {}
> ++    };
> ++
> ++    struct Derived : public Base
> ++    {
> ++      virtual void f() override {}
> ++    };
> ++
> ++  }
> ++
> ++  namespace test_double_right_angle_brackets
> ++  {
> ++
> ++    template < typename T >
> ++    struct check {};
> ++
> ++    typedef check<void> single_type;
> ++    typedef check<check<void>> double_type;
> ++    typedef check<check<check<void>>> triple_type;
> ++    typedef check<check<check<check<void>>>> quadruple_type;
> ++
> ++  }
> ++
> ++  namespace test_decltype
> ++  {
> ++
> ++    int
> ++    f()
> ++    {
> ++      int a = 1;
> ++      decltype(a) b = 2;
> ++      return a + b;
> ++    }
> ++
> ++  }
> ++
> ++  namespace test_type_deduction
> ++  {
> ++
> ++    template < typename T1, typename T2 >
> ++    struct is_same
> ++    {
> ++      static const bool value = false;
> ++    };
> ++
> ++    template < typename T >
> ++    struct is_same<T, T>
> ++    {
> ++      static const bool value = true;
> ++    };
> ++
> ++    template < typename T1, typename T2 >
> ++    auto
> ++    add(T1 a1, T2 a2) -> decltype(a1 + a2)
> ++    {
> ++      return a1 + a2;
> ++    }
> ++
> ++    int
> ++    test(const int c, volatile int v)
> ++    {
> ++      static_assert(is_same<int, decltype(0)>::value == true, "");
> ++      static_assert(is_same<int, decltype(c)>::value == false, "");
> ++      static_assert(is_same<int, decltype(v)>::value == false, "");
> ++      auto ac = c;
> ++      auto av = v;
> ++      auto sumi = ac + av + 'x';
> ++      auto sumf = ac + av + 1.0;
> ++      static_assert(is_same<int, decltype(ac)>::value == true, "");
> ++      static_assert(is_same<int, decltype(av)>::value == true, "");
> ++      static_assert(is_same<int, decltype(sumi)>::value == true, "");
> ++      static_assert(is_same<int, decltype(sumf)>::value == false, "");
> ++      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
> ++      return (sumf > 0.0) ? sumi : add(c, v);
> ++    }
> ++
> ++  }
> ++
> ++  namespace test_noexcept
> ++  {
> ++
> ++    int f() { return 0; }
> ++    int g() noexcept { return 0; }
> ++
> ++    static_assert(noexcept(f()) == false, "");
> ++    static_assert(noexcept(g()) == true, "");
> ++
> ++  }
> ++
> ++  namespace test_constexpr
> ++  {
> ++
> ++    template < typename CharT >
> ++    unsigned long constexpr
> ++    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
> ++    {
> ++      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
> ++    }
> ++
> ++    template < typename CharT >
> ++    unsigned long constexpr
> ++    strlen_c(const CharT *const s) noexcept
> ++    {
> ++      return strlen_c_r(s, 0UL);
> ++    }
> ++
> ++    static_assert(strlen_c("") == 0UL, "");
> ++    static_assert(strlen_c("1") == 1UL, "");
> ++    static_assert(strlen_c("example") == 7UL, "");
> ++    static_assert(strlen_c("another\0example") == 7UL, "");
> ++
> ++  }
> ++
> ++  namespace test_rvalue_references
> ++  {
> ++
> ++    template < int N >
> ++    struct answer
> ++    {
> ++      static constexpr int value = N;
> ++    };
> ++
> ++    answer<1> f(int&)       { return answer<1>(); }
> ++    answer<2> f(const int&) { return answer<2>(); }
> ++    answer<3> f(int&&)      { return answer<3>(); }
> ++
> ++    void
> ++    test()
> ++    {
> ++      int i = 0;
> ++      const int c = 0;
> ++      static_assert(decltype(f(i))::value == 1, "");
> ++      static_assert(decltype(f(c))::value == 2, "");
> ++      static_assert(decltype(f(0))::value == 3, "");
> ++    }
> ++
> ++  }
> ++
> ++  namespace test_uniform_initialization
> ++  {
> ++
> ++    struct test
> ++    {
> ++      static const int zero {};
> ++      static const int one {1};
> ++    };
> ++
> ++    static_assert(test::zero == 0, "");
> ++    static_assert(test::one == 1, "");
> ++
> ++  }
> ++
> ++  namespace test_lambdas
> ++  {
> ++
> ++    void
> ++    test1()
> ++    {
> ++      auto lambda1 = [](){};
> ++      auto lambda2 = lambda1;
> ++      lambda1();
> ++      lambda2();
> ++    }
> ++
> ++    int
> ++    test2()
> ++    {
> ++      auto a = [](int i, int j){ return i + j; }(1, 2);
> ++      auto b = []() -> int { return '0'; }();
> ++      auto c = [=](){ return a + b; }();
> ++      auto d = [&](){ return c; }();
> ++      auto e = [a, &b](int x) mutable {
> ++        const auto identity = [](int y){ return y; };
> ++        for (auto i = 0; i < a; ++i)
> ++          a += b--;
> ++        return x + identity(a + b);
> ++      }(0);
> ++      return a + b + c + d + e;
> ++    }
> ++
> ++    int
> ++    test3()
> ++    {
> ++      const auto nullary = [](){ return 0; };
> ++      const auto unary = [](int x){ return x; };
> ++      using nullary_t = decltype(nullary);
> ++      using unary_t = decltype(unary);
> ++      const auto higher1st = [](nullary_t f){ return f(); };
> ++      const auto higher2nd = [unary](nullary_t f1){
> ++        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
> ++      };
> ++      return higher1st(nullary) + higher2nd(nullary)(unary);
> ++    }
> ++
> ++  }
> ++
> ++  namespace test_variadic_templates
> ++  {
> ++
> ++    template <int...>
> ++    struct sum;
> ++
> ++    template <int N0, int... N1toN>
> ++    struct sum<N0, N1toN...>
> ++    {
> ++      static constexpr auto value = N0 + sum<N1toN...>::value;
> ++    };
> ++
> ++    template <>
> ++    struct sum<>
> ++    {
> ++      static constexpr auto value = 0;
> ++    };
> ++
> ++    static_assert(sum<>::value == 0, "");
> ++    static_assert(sum<1>::value == 1, "");
> ++    static_assert(sum<23>::value == 23, "");
> ++    static_assert(sum<1, 2>::value == 3, "");
> ++    static_assert(sum<5, 5, 11>::value == 21, "");
> ++    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
> ++
> ++  }
> ++
> ++  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
> ++  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
> ++  // because of this.
> ++  namespace test_template_alias_sfinae
> ++  {
> ++
> ++    struct foo {};
> ++
> ++    template<typename T>
> ++    using member = typename T::member_type;
> ++
> ++    template<typename T>
> ++    void func(...) {}
> ++
> ++    template<typename T>
> ++    void func(member<T>*) {}
> ++
> ++    void test();
> ++
> ++    void test() { func<foo>(0); }
> ++
> ++  }
> ++
> ++}  // namespace cxx11
> ++
> ++#endif  // __cplusplus >= 201103L
> ++
> ++]])
> ++
> ++
> ++dnl  Tests for new features in C++14
> ++
> ++m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
> ++
> ++// If the compiler admits that it is not ready for C++14, why torture it?
> ++// Hopefully, this will speed up the test.
> ++
> ++#ifndef __cplusplus
> ++
> ++#error "This is not a C++ compiler"
> ++
> ++#elif __cplusplus < 201402L
> ++
> ++#error "This is not a C++14 compiler"
> ++
> ++#else
> ++
> ++namespace cxx14
> ++{
> ++
> ++  namespace test_polymorphic_lambdas
> ++  {
> ++
> ++    int
> ++    test()
> ++    {
> ++      const auto lambda = [](auto&&... args){
> ++        const auto istiny = [](auto x){
> ++          return (sizeof(x) == 1UL) ? 1 : 0;
> ++        };
> ++        const int aretiny[] = { istiny(args)... };
> ++        return aretiny[0];
> ++      };
> ++      return lambda(1, 1L, 1.0f, '1');
> ++    }
> ++
> ++  }
> ++
> ++  namespace test_binary_literals
> ++  {
> ++
> ++    constexpr auto ivii = 0b0000000000101010;
> ++    static_assert(ivii == 42, "wrong value");
> ++
> ++  }
> ++
> ++  namespace test_generalized_constexpr
> ++  {
> ++
> ++    template < typename CharT >
> ++    constexpr unsigned long
> ++    strlen_c(const CharT *const s) noexcept
> ++    {
> ++      auto length = 0UL;
> ++      for (auto p = s; *p; ++p)
> ++        ++length;
> ++      return length;
> ++    }
> ++
> ++    static_assert(strlen_c("") == 0UL, "");
> ++    static_assert(strlen_c("x") == 1UL, "");
> ++    static_assert(strlen_c("test") == 4UL, "");
> ++    static_assert(strlen_c("another\0test") == 7UL, "");
> ++
> ++  }
> ++
> ++  namespace test_lambda_init_capture
> ++  {
> ++
> ++    int
> ++    test()
> ++    {
> ++      auto x = 0;
> ++      const auto lambda1 = [a = x](int b){ return a + b; };
> ++      const auto lambda2 = [a = lambda1(x)](){ return a; };
> ++      return lambda2();
> ++    }
> ++
> ++  }
> ++
> ++  namespace test_digit_separators
> ++  {
> ++
> ++    constexpr auto ten_million = 100'000'000;
> ++    static_assert(ten_million == 100000000, "");
> ++
> ++  }
> ++
> ++  namespace test_return_type_deduction
> ++  {
> ++
> ++    auto f(int& x) { return x; }
> ++    decltype(auto) g(int& x) { return x; }
> ++
> ++    template < typename T1, typename T2 >
> ++    struct is_same
> ++    {
> ++      static constexpr auto value = false;
> ++    };
> ++
> ++    template < typename T >
> ++    struct is_same<T, T>
> ++    {
> ++      static constexpr auto value = true;
> ++    };
> ++
> ++    int
> ++    test()
> ++    {
> ++      auto x = 0;
> ++      static_assert(is_same<int, decltype(f(x))>::value, "");
> ++      static_assert(is_same<int&, decltype(g(x))>::value, "");
> ++      return x;
> ++    }
> ++
> ++  }
> ++
> ++}  // namespace cxx14
> ++
> ++#endif  // __cplusplus >= 201402L
> ++
> ++]])
> ++
> ++
> ++dnl  Tests for new features in C++17
> ++
> ++m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
> ++
> ++// If the compiler admits that it is not ready for C++17, why torture it?
> ++// Hopefully, this will speed up the test.
> ++
> ++#ifndef __cplusplus
> ++
> ++#error "This is not a C++ compiler"
> ++
> ++#elif __cplusplus <= 201402L
> ++
> ++#error "This is not a C++17 compiler"
> ++
> ++#else
> ++
> ++#if defined(__clang__)
> ++  #define REALLY_CLANG
> ++#else
> ++  #if defined(__GNUC__)
> ++    #define REALLY_GCC
> ++  #endif
> ++#endif
> ++
> ++#include <initializer_list>
> ++#include <utility>
> ++#include <type_traits>
> ++
> ++namespace cxx17
> ++{
> ++
> ++#if !defined(REALLY_CLANG)
> ++  namespace test_constexpr_lambdas
> ++  {
> ++
> ++    // TODO: test it with clang++ from git
> ++
> ++    constexpr int foo = [](){return 42;}();
> ++
> ++  }
> ++#endif // !defined(REALLY_CLANG)
> ++
> ++  namespace test::nested_namespace::definitions
> ++  {
> ++
> ++  }
> ++
> ++  namespace test_fold_expression
> ++  {
> ++
> ++    template<typename... Args>
> ++    int multiply(Args... args)
> ++    {
> ++      return (args * ... * 1);
> ++    }
> ++
> ++    template<typename... Args>
> ++    bool all(Args... args)
> ++    {
> ++      return (args && ...);
> ++    }
> ++
> ++  }
> ++
> ++  namespace test_extended_static_assert
> ++  {
> ++
> ++    static_assert (true);
> ++
> ++  }
> ++
> ++  namespace test_auto_brace_init_list
> ++  {
> ++
> ++    auto foo = {5};
> ++    auto bar {5};
> ++
> ++    static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
> ++    static_assert(std::is_same<int, decltype(bar)>::value);
> ++  }
> ++
> ++  namespace test_typename_in_template_template_parameter
> ++  {
> ++
> ++    template<template<typename> typename X> struct D;
> ++
> ++  }
> ++
> ++  namespace test_fallthrough_nodiscard_maybe_unused_attributes
> ++  {
> ++
> ++    int f1()
> ++    {
> ++      return 42;
> ++    }
> ++
> ++    [[nodiscard]] int f2()
> ++    {
> ++      [[maybe_unused]] auto unused = f1();
> ++
> ++      switch (f1())
> ++      {
> ++      case 17:
> ++        f1();
> ++        [[fallthrough]];
> ++      case 42:
> ++        f1();
> ++      }
> ++      return f1();
> ++    }
> ++
> ++  }
> ++
> ++  namespace test_extended_aggregate_initialization
> ++  {
> ++
> ++    struct base1
> ++    {
> ++      int b1, b2 = 42;
> ++    };
> ++
> ++    struct base2
> ++    {
> ++      base2() {
> ++        b3 = 42;
> ++      }
> ++      int b3;
> ++    };
> ++
> ++    struct derived : base1, base2
> ++    {
> ++        int d;
> ++    };
> ++
> ++    derived d1 {{1, 2}, {}, 4};  // full initialization
> ++    derived d2 {{}, {}, 4};      // value-initialized bases
> ++
> ++  }
> ++
> ++  namespace test_general_range_based_for_loop
> ++  {
> ++
> ++    struct iter
> ++    {
> ++      int i;
> ++
> ++      int& operator* ()
> ++      {
> ++        return i;
> ++      }
> ++
> ++      const int& operator* () const
> ++      {
> ++        return i;
> ++      }
> ++
> ++      iter& operator++()
> ++      {
> ++        ++i;
> ++        return *this;
> ++      }
> ++    };
> ++
> ++    struct sentinel
> ++    {
> ++      int i;
> ++    };
> ++
> ++    bool operator== (const iter& i, const sentinel& s)
> ++    {
> ++      return i.i == s.i;
> ++    }
> ++
> ++    bool operator!= (const iter& i, const sentinel& s)
> ++    {
> ++      return !(i == s);
> ++    }
> ++
> ++    struct range
> ++    {
> ++      iter begin() const
> ++      {
> ++        return {0};
> ++      }
> ++
> ++      sentinel end() const
> ++      {
> ++        return {5};
> ++      }
> ++    };
> ++
> ++    void f()
> ++    {
> ++      range r {};
> ++
> ++      for (auto i : r)
> ++      {
> ++        [[maybe_unused]] auto v = i;
> ++      }
> ++    }
> ++
> ++  }
> ++
> ++  namespace test_lambda_capture_asterisk_this_by_value
> ++  {
> ++
> ++    struct t
> ++    {
> ++      int i;
> ++      int foo()
> ++      {
> ++        return [*this]()
> ++        {
> ++          return i;
> ++        }();
> ++      }
> ++    };
> ++
> ++  }
> ++
> ++  namespace test_enum_class_construction
> ++  {
> ++
> ++    enum class byte : unsigned char
> ++    {};
> ++
> ++    byte foo {42};
> ++
> ++  }
> ++
> ++  namespace test_constexpr_if
> ++  {
> ++
> ++    template <bool cond>
> ++    int f ()
> ++    {
> ++      if constexpr(cond)
> ++      {
> ++        return 13;
> ++      }
> ++      else
> ++      {
> ++        return 42;
> ++      }
> ++    }
> ++
> ++  }
> ++
> ++  namespace test_selection_statement_with_initializer
> ++  {
> ++
> ++    int f()
> ++    {
> ++      return 13;
> ++    }
> ++
> ++    int f2()
> ++    {
> ++      if (auto i = f(); i > 0)
> ++      {
> ++        return 3;
> ++      }
> ++
> ++      switch (auto i = f(); i + 4)
> ++      {
> ++      case 17:
> ++        return 2;
> ++
> ++      default:
> ++        return 1;
> ++      }
> ++    }
> ++
> ++  }
> ++
> ++#if !defined(REALLY_CLANG)
> ++  namespace test_template_argument_deduction_for_class_templates
> ++  {
> ++
> ++    // TODO: test it with clang++ from git
> ++
> ++    template <typename T1, typename T2>
> ++    struct pair
> ++    {
> ++      pair (T1 p1, T2 p2)
> ++        : m1 {p1},
> ++          m2 {p2}
> ++      {}
> ++
> ++      T1 m1;
> ++      T2 m2;
> ++    };
> ++
> ++    void f()
> ++    {
> ++      [[maybe_unused]] auto p = pair{13, 42u};
> ++    }
> ++
> ++  }
> ++#endif // !defined(REALLY_CLANG)
> ++
> ++  namespace test_non_type_auto_template_parameters
> ++  {
> ++
> ++    template <auto n>
> ++    struct B
> ++    {};
> ++
> ++    B<5> b1;
> ++    B<'a'> b2;
> ++
> ++  }
> ++
> ++#if !defined(REALLY_CLANG)
> ++  namespace test_structured_bindings
> ++  {
> ++
> ++    // TODO: test it with clang++ from git
> ++
> ++    int arr[2] = { 1, 2 };
> ++    std::pair<int, int> pr = { 1, 2 };
> ++
> ++    auto f1() -> int(&)[2]
> ++    {
> ++      return arr;
> ++    }
> ++
> ++    auto f2() -> std::pair<int, int>&
> ++    {
> ++      return pr;
> ++    }
> ++
> ++    struct S
> ++    {
> ++      int x1 : 2;
> ++      volatile double y1;
> ++    };
> ++
> ++    S f3()
> ++    {
> ++      return {};
> ++    }
> ++
> ++    auto [ x1, y1 ] = f1();
> ++    auto& [ xr1, yr1 ] = f1();
> ++    auto [ x2, y2 ] = f2();
> ++    auto& [ xr2, yr2 ] = f2();
> ++    const auto [ x3, y3 ] = f3();
> ++
> ++  }
> ++#endif // !defined(REALLY_CLANG)
> ++
> ++#if !defined(REALLY_CLANG)
> ++  namespace test_exception_spec_type_system
> ++  {
> ++
> ++    // TODO: test it with clang++ from git
> ++
> ++    struct Good {};
> ++    struct Bad {};
> ++
> ++    void g1() noexcept;
> ++    void g2();
> ++
> ++    template<typename T>
> ++    Bad
> ++    f(T*, T*);
> ++
> ++    template<typename T1, typename T2>
> ++    Good
> ++    f(T1*, T2*);
> ++
> ++    static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
> ++
> ++  }
> ++#endif // !defined(REALLY_CLANG)
> ++
> ++  namespace test_inline_variables
> ++  {
> ++
> ++    template<class T> void f(T)
> ++    {}
> ++
> ++    template<class T> inline T g(T)
> ++    {
> ++      return T{};
> ++    }
> ++
> ++    template<> inline void f<>(int)
> ++    {}
> ++
> ++    template<> int g<>(int)
> ++    {
> ++      return 5;
> ++    }
> ++
> ++  }
> ++
> ++}  // namespace cxx17
> ++
> ++#endif  // __cplusplus <= 201402L
> ++
> ++]])
> diff --git a/patches/cups-filters-1.16.1/autogen.sh b/patches/cups-filters-1.16.1/autogen.sh
> new file mode 100755
> index 000000000..ddae563bc
> --- /dev/null
> +++ b/patches/cups-filters-1.16.1/autogen.sh
> @@ -0,0 +1,2 @@
> +#!/bin/sh
> +exec ./autogen.sh
> diff --git a/patches/cups-filters-1.16.1/series b/patches/cups-filters-1.16.1/series
> new file mode 100644
> index 000000000..8c053077a
> --- /dev/null
> +++ b/patches/cups-filters-1.16.1/series
> @@ -0,0 +1,4 @@
> +# generated by git-ptx-patches
> +#tag:base --start-number 1
> +0001-configure.ac-check-for-C-11-support.patch
> +# b0f06d39888540753d3e8e1b1cb0f092  - git-ptx-patches magic
> diff --git a/rules/cups-filters.in b/rules/cups-filters.in
> new file mode 100644
> index 000000000..4e7cb3796
> --- /dev/null
> +++ b/rules/cups-filters.in
> @@ -0,0 +1,69 @@
> +## 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_SPLASH_FP	if CUPS_FILTERS_POPPLER
> +	select POPPLER_SPLASH_FP_DOUBLE	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_FIXEDPOINT!"
> +	depends on (POPPLER_SPLASH_FIXEDPOINT && CUPS_FILTERS_POPPLER)
> +
> +config CUPS_FILTERS_IMAGEFILTERS
> +	bool "build image filters"
> +	help
> +	  Build imagetopdf and imagetoraster filters
> +
> +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..5ccff2c10
> --- /dev/null
> +++ b/rules/cups-filters.make
> @@ -0,0 +1,96 @@
> +# -*-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.16.1
> +CUPS_FILTERS_MD5	:= f76d13c431257a95b233e5c87d10742f
> +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
> +# ----------------------------------------------------------------------------
> +
> +CUPS_FILTERS_ENV	:= $(CROSS_ENV)

remove.

Michael

> +
> +#
> +# autoconf
> +#
> +# We have to set --exec-prefix and --libdir, otherwise the libs end up in
> +# ${prefix}/lib64 due to broken autoconf magic, which is not what we want.
> +#
> +CUPS_FILTERS_CONF_TOOL	:= autoconf
> +CUPS_FILTERS_CONF_OPT	:= \
> +	$(CROSS_AUTOCONF_USR) \
> +	--exec-prefix=/usr/ \
> +	--libdir=/usr/lib/ \
> +	--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_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, 0755, libcupsfilters)
> +	@$(call install_lib, cups-filters, 0, 0, 0755, 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

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 7/7] cups-filters: new package: additional filters and backends for CUPS
  2017-08-28 13:03   ` Michael Olbrich
@ 2017-08-28 13:56     ` Roland Hieber
  0 siblings, 0 replies; 30+ messages in thread
From: Roland Hieber @ 2017-08-28 13:56 UTC (permalink / raw)
  To: ptxdist

On 28.08.2017 15:03, Michael Olbrich wrote:
> On Thu, Aug 24, 2017 at 12:39:11AM +0200, Roland Hieber wrote:
>> Upstream is very responsive, merged some patches and made a new release
>> while I was still packaging the old one :)
> 
> Please update to the new release, so we can avoid the patch.

Oh, that sentence referred to 1.14, and I already did a version bump to 
1.16.1 shortly before writing the patch. But now I see there is already 
a 1.17.2! I'll do another version bump then :)

  - Roland

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 5/7] cups: new package: Common Unix Printing System
  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
  1 sibling, 1 reply; 30+ messages in thread
From: Roland Hieber @ 2017-08-28 14:03 UTC (permalink / raw)
  To: ptxdist

On 28.08.2017 14:51, Michael Olbrich wrote:
> On Thu, Aug 24, 2017 at 12:39:09AM +0200, Roland Hieber wrote:
 >> [...]
>> +# ----- config files, install as daemon:lp
> 
> You can use the user and group names below.

Oh, ok. I always thought they would then refer to the users/groups on 
the host system.

>> +	@$(call install_alternative, cups, 1, 110, 0640, /etc/cups/cups-files.conf)
>> +	@$(call install_alternative, cups, 1, 110, 0640, /etc/cups/cupsd.conf)
>> +	@$(call install_alternative, cups, 1, 110, 0600, /etc/cups/classes.conf)
>> +	@$(call install_alternative, cups, 1, 110, 0600, /etc/cups/client.conf)
>> +	@$(call install_alternative, cups, 1, 110, 0640, /etc/cups/mailto.conf)
 >> [...]
>> +ifdef PTXCONF_CUPS_WEBINTERFACE
>> +	@$(call install_lib, cups, 0, 0, 0755, libcupscgi)
>> +	@$(call install_tree, cups, 0, 0, -, /usr/lib/cups/cgi-bin)
>> +	@$(call install_tree, cups, 0, 0, -, /usr/share/cups/templates)
>> +	@$(call install_tree, cups, 0, 0, -, /usr/share/doc/cups)
> 
> Why docs?

The web interface serves them under /help, and it would create broken 
links if those are missing. I find them rather helpful for the web 
interface.

  - Roland

-- 
Pengutronix e.K.                  | Roland Hieber               |
Industrial Linux Solutions        | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 4/7] poppler: version bump 0.18.0 -> 0.57.0
  2017-08-28 10:18   ` Michael Olbrich
@ 2017-08-28 14:11     ` Roland Hieber
  2017-08-29  8:43       ` Michael Olbrich
  0 siblings, 1 reply; 30+ messages in thread
From: Roland Hieber @ 2017-08-28 14:11 UTC (permalink / raw)
  To: ptxdist

On 28.08.2017 12:18, Michael Olbrich wrote:
> On Thu, Aug 24, 2017 at 12:39:08AM +0200, Roland Hieber wrote:
 >> [...]
>> +ifdef PTXCONF_POPPLER_SPLASH_FP
>> +ifdef PTXCONF_POPPLER_SPLASH_FP_DOUBLE
>> +POPPLER_CONF_OPT += \
>> +	--disable-single-precision \
>> +	--disable-fixedpoint
>> +else # PTXCONF_POPPLER_SPLASH_FP && !PTXCONF_POPPLER_SPLASH_FP_DOUBLE
>> +POPPLER_CONF_OPT += \
>> +	--enable-single-precision \
>> +	--disable-fixedpoint
>> +endif
>> +else # !PTXCONF_POPPLER_SPLASH_FP
>> +POPPLER_CONF_OPT += \
>> +	--disable-single-precision \
>> +	--enable-fixedpoint
>> +endif
> 
> Can't you use ptx/disen here? The single-precision option should be ignored
> for fixedpoint, right?

No, ./configure --enable-fixedpoint --enable-single-precision is not 
accepted and fails. Is there a way to check for two separate variables 
inside ptx/disen?

  - Roland

-- 
Pengutronix e.K.                  | Roland Hieber               |
Industrial Linux Solutions        | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 5/7] cups: new package: Common Unix Printing System
  2017-08-28 14:03     ` Roland Hieber
@ 2017-08-29  8:40       ` Michael Olbrich
  0 siblings, 0 replies; 30+ messages in thread
From: Michael Olbrich @ 2017-08-29  8:40 UTC (permalink / raw)
  To: ptxdist

On Mon, Aug 28, 2017 at 04:03:28PM +0200, Roland Hieber wrote:
> On 28.08.2017 14:51, Michael Olbrich wrote:
> > On Thu, Aug 24, 2017 at 12:39:09AM +0200, Roland Hieber wrote:
> >> [...]
> > > +# ----- config files, install as daemon:lp
> > 
> > You can use the user and group names below.
> 
> Oh, ok. I always thought they would then refer to the users/groups on the
> host system.

It will find the file in projectroot, so unless you do very strange things
there, it will work as expected.

> > > +	@$(call install_alternative, cups, 1, 110, 0640, /etc/cups/cups-files.conf)
> > > +	@$(call install_alternative, cups, 1, 110, 0640, /etc/cups/cupsd.conf)
> > > +	@$(call install_alternative, cups, 1, 110, 0600, /etc/cups/classes.conf)
> > > +	@$(call install_alternative, cups, 1, 110, 0600, /etc/cups/client.conf)
> > > +	@$(call install_alternative, cups, 1, 110, 0640, /etc/cups/mailto.conf)
> >> [...]
> > > +ifdef PTXCONF_CUPS_WEBINTERFACE
> > > +	@$(call install_lib, cups, 0, 0, 0755, libcupscgi)
> > > +	@$(call install_tree, cups, 0, 0, -, /usr/lib/cups/cgi-bin)
> > > +	@$(call install_tree, cups, 0, 0, -, /usr/share/cups/templates)
> > > +	@$(call install_tree, cups, 0, 0, -, /usr/share/doc/cups)
> > 
> > Why docs?
> 
> The web interface serves them under /help, and it would create broken links
> if those are missing. I find them rather helpful for the web interface.

Ok.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 4/7] poppler: version bump 0.18.0 -> 0.57.0
  2017-08-28 14:11     ` Roland Hieber
@ 2017-08-29  8:43       ` Michael Olbrich
  0 siblings, 0 replies; 30+ messages in thread
From: Michael Olbrich @ 2017-08-29  8:43 UTC (permalink / raw)
  To: ptxdist

On Mon, Aug 28, 2017 at 04:11:18PM +0200, Roland Hieber wrote:
> On 28.08.2017 12:18, Michael Olbrich wrote:
> > On Thu, Aug 24, 2017 at 12:39:08AM +0200, Roland Hieber wrote:
> >> [...]
> > > +ifdef PTXCONF_POPPLER_SPLASH_FP
> > > +ifdef PTXCONF_POPPLER_SPLASH_FP_DOUBLE
> > > +POPPLER_CONF_OPT += \
> > > +	--disable-single-precision \
> > > +	--disable-fixedpoint
> > > +else # PTXCONF_POPPLER_SPLASH_FP && !PTXCONF_POPPLER_SPLASH_FP_DOUBLE
> > > +POPPLER_CONF_OPT += \
> > > +	--enable-single-precision \
> > > +	--disable-fixedpoint
> > > +endif
> > > +else # !PTXCONF_POPPLER_SPLASH_FP
> > > +POPPLER_CONF_OPT += \
> > > +	--disable-single-precision \
> > > +	--enable-fixedpoint
> > > +endif
> > 
> > Can't you use ptx/disen here? The single-precision option should be ignored
> > for fixedpoint, right?
> 
> No, ./configure --enable-fixedpoint --enable-single-precision is not
> accepted and fails. Is there a way to check for two separate variables
> inside ptx/disen?

No, but you could reverse the logic for the kconfig symbol. If you call it
POPPLER_SPLASH_FP_SINGLE combinded with ptx/endis, it should work as
expected. Just set 'default y' if single precision should be prefered.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 5/7] cups: new package: Common Unix Printing System
  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-30  8:42   ` Juergen Borleis
  2 siblings, 0 replies; 30+ messages in thread
From: Juergen Borleis @ 2017-08-30  8:42 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

Hi Roland,

On Thursday 24 August 2017 00:39:09 Roland Hieber wrote:
> [...]
> +$(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

You should create "/etc/cups" explicitly, because it needs "daemon:lp" owners
as well.

> +	@$(call install_alternative, cups, 1, 110, 0640, /etc/cups/cups-files.conf)
> +	@$(call install_alternative, cups, 1, 110, 0640, /etc/cups/cupsd.conf)
> +	@$(call install_alternative, cups, 1, 110, 0600, /etc/cups/classes.conf)
> +	@$(call install_alternative, cups, 1, 110, 0600, /etc/cups/client.conf)
> +	@$(call install_alternative, cups, 1, 110, 0640, /etc/cups/mailto.conf)
> +	@$(call install_alternative_tree, cups, 1, 110,  /etc/cups/ppd/)

The directory "/etc/cups/ppd" should also be owned by "daemon:lp", shouldn't it?

> +	@$(call install_alternative, cups, 1, 110, 0600, /etc/cups/printers.conf)
> +	@$(call install_alternative, cups, 1, 110, 0640, /etc/cups/snmp.conf)
> +	@$(call install_alternative, cups, 1, 110, 0640, /etc/printcap)
> +	@$(call install_alternative, cups, 1, 110, 0640, /usr/share/cups/mime/mime.convs)

Why not "root.root" for files in "/usr/share/cups"?

> +	@$(call install_alternative, cups, 1, 110, 0640, /usr/share/cups/mime/mime.types)

Same here.

> + 
> +ifdef PTXCONF_CUPS_SSL
> +	@$(call install_alternative_tree, cups, 1, 110, /etc/cups/ssl/)

The directory "/etc/cups/ssl" should also be owned by "daemon:lp", shouldn't it?

> +endif
> [...]

Cheers, Juergen

-- 
Pengutronix e.K.                             | Juergen Borleis             |
Industrial Linux Solutions                   | http://www.pengutronix.de/  |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 2/7] qpdf: new package: PDF inspection library and tools
  2017-08-23 22:39 ` [ptxdist] [PATCH 2/7] qpdf: new package: PDF inspection library and tools Roland Hieber
  2017-08-28  9:52   ` Michael Olbrich
@ 2017-09-11 10:11   ` Juergen Borleis
  2017-09-22 10:00     ` Roland Hieber
  1 sibling, 1 reply; 30+ messages in thread
From: Juergen Borleis @ 2017-09-11 10:11 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

Hi Roland,

On Thursday 24 August 2017 00:39:06 Roland Hieber wrote:
> [...]
> +#
> +# 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

Downloading the qpdf archive leads to a different content and thus the MD5 
sum differs. The a0601b0bc56d3f412fd3afecfce2721c package contains an 
unreleased version, which needs to create the 'configure' script first.

Where did you download your archive?

jb

-- 
Pengutronix e.K.                             | Juergen Borleis             |
Industrial Linux Solutions                   | http://www.pengutronix.de/  |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 2/7] qpdf: new package: PDF inspection library and tools
  2017-09-11 10:11   ` Juergen Borleis
@ 2017-09-22 10:00     ` Roland Hieber
  0 siblings, 0 replies; 30+ messages in thread
From: Roland Hieber @ 2017-09-22 10:00 UTC (permalink / raw)
  To: ptxdist



On 11.09.2017 12:11, Juergen Borleis wrote:
> Hi Roland,
> 
> On Thursday 24 August 2017 00:39:06 Roland Hieber wrote:
>> [...]
>> +#
>> +# 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
> 
> Downloading the qpdf archive leads to a different content and thus the MD5
> sum differs. The a0601b0bc56d3f412fd3afecfce2721c package contains an
> unreleased version, which needs to create the 'configure' script first.
> 
> Where did you download your archive?

Huh, indeed. When I downloaded it from SourceForge (through ptxdist 
get), I got the version with the a0601b0 MD5, which didn't have a 
configure script. The maintainers seem to have released a new tarball 
under the same name. Will update the rules in v2.

  - Roland

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 6/7] host-cups: new package: CUPS PPD compiler
  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
  1 sibling, 1 reply; 30+ messages in thread
From: Juergen Borleis @ 2017-09-22 12:06 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

Hi Roland,

On Thursday 24 August 2017 00:39:10 Roland Hieber wrote:
> [...]
> +#
> +# 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). 
> +#
> +# We have to set --exec-prefix and --libdir, otherwise the libs end up
> in +# ${prefix}/lib64, which is not what we want.
> +#
> +HOST_CUPS_CONF_TOOL	:= autoconf
> +HOST_CUPS_CONF_OPT	:= \
> +	$(HOST_AUTOCONF) \
> +	--exec-prefix=/usr/ \
> +	--libdir=/usr/lib/ \

It seems "$(HOST_AUTOCONF)" and "--libdir=/lib" is enough. And installing to
"$(PTXDIST_SYSROOT_HOST)/bin" and "$(PTXDIST_SYSROOT_HOST)/lib" is handled
by PTXdist automatically (library search path handling and so on).

> [...]
> +
> +CROSS_PPDC = $(PTXDIST_SYSROOT_CROSS)/bin/ppdc
> +$(STATEDIR)/host-cups.install.post:
> +	@$(call targetinfo)
> +	@$(call world/install.post, HOST_CUPS)
> +
> +	( \
> +		echo '#!/bin/sh'; \
> +		echo 'LD_LIBRARY_PATH=$(PTXDIST_SYSROOT_HOST)/usr/lib $(PTXDIST_SYSROOT_HOST)/usr/bin/ppdc -I $(SYSROOT)/usr/share/cups/ppdc "$$@"'; \
> +	) > $(CROSS_PPDC)

You should not mix "$(PTXDIST_SYSROOT_HOST)" and "$(SYSROOT)" here, because
then the "HOST-CUPS" package has a dependency to "CUPS"!

When you install to "$(PTXDIST_SYSROOT_HOST)/bin" and
"$(PTXDIST_SYSROOT_HOST)/lib" the cross-ppdc variant can be reduced to:

	( \
		echo '#!/bin/sh'; \
		echo $(PTXDIST_SYSROOT_HOST)/bin/ppdc -I $(PTXDIST_SYSROOT_HOST)/share/cups/ppdc "$$@"'; \
	) > $(CROSS_PPDC)

Cheers
Juergen

-- 
Pengutronix e.K.                             | Juergen Borleis             |
Industrial Linux Solutions                   | http://www.pengutronix.de/  |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 6/7] host-cups: new package: CUPS PPD compiler
  2017-09-22 12:06   ` Juergen Borleis
@ 2017-09-22 14:04     ` Michael Olbrich
  2017-09-22 14:37       ` Roland Hieber
  0 siblings, 1 reply; 30+ messages in thread
From: Michael Olbrich @ 2017-09-22 14:04 UTC (permalink / raw)
  To: ptxdist

On Fri, Sep 22, 2017 at 02:06:58PM +0200, Juergen Borleis wrote:
> Hi Roland,
> 
> On Thursday 24 August 2017 00:39:10 Roland Hieber wrote:
> > [...]
> > +#
> > +# 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). 
> > +#
> > +# We have to set --exec-prefix and --libdir, otherwise the libs end up
> > in +# ${prefix}/lib64, which is not what we want.
> > +#
> > +HOST_CUPS_CONF_TOOL	:= autoconf
> > +HOST_CUPS_CONF_OPT	:= \
> > +	$(HOST_AUTOCONF) \
> > +	--exec-prefix=/usr/ \
> > +	--libdir=/usr/lib/ \
> 
> It seems "$(HOST_AUTOCONF)" and "--libdir=/lib" is enough. And installing to
> "$(PTXDIST_SYSROOT_HOST)/bin" and "$(PTXDIST_SYSROOT_HOST)/lib" is handled
> by PTXdist automatically (library search path handling and so on).
> 
> > [...]
> > +
> > +CROSS_PPDC = $(PTXDIST_SYSROOT_CROSS)/bin/ppdc
> > +$(STATEDIR)/host-cups.install.post:
> > +	@$(call targetinfo)
> > +	@$(call world/install.post, HOST_CUPS)
> > +
> > +	( \
> > +		echo '#!/bin/sh'; \
> > +		echo 'LD_LIBRARY_PATH=$(PTXDIST_SYSROOT_HOST)/usr/lib $(PTXDIST_SYSROOT_HOST)/usr/bin/ppdc -I $(SYSROOT)/usr/share/cups/ppdc "$$@"'; \
> > +	) > $(CROSS_PPDC)
> 
> You should not mix "$(PTXDIST_SYSROOT_HOST)" and "$(SYSROOT)" here, because
> then the "HOST-CUPS" package has a dependency to "CUPS"!
> 
> When you install to "$(PTXDIST_SYSROOT_HOST)/bin" and
> "$(PTXDIST_SYSROOT_HOST)/lib" the cross-ppdc variant can be reduced to:
> 
> 	( \
> 		echo '#!/bin/sh'; \
> 		echo $(PTXDIST_SYSROOT_HOST)/bin/ppdc -I $(PTXDIST_SYSROOT_HOST)/share/cups/ppdc "$$@"'; \
> 	) > $(CROSS_PPDC)

This realy depends on what '-I' means and the difference between the
content of $(SYSROOT)/usr/share/cups/ppdc and
$(PTXDIST_SYSROOT_HOST)/share/cups/ppdc.

ppdc is used at build-time by packages that create extra cups filters,
right? If there are differences, then the original command-line is correct.
In that case host-cups must depend on cup and the package using ppdc must
depend on host-cups.
Or, if such packages depend on cups anyways (maybe link to something?) you
could create an options CUPS_PPDC that trigger a dependency on host-cups
and create the cross ppdc wrapper in cups.make.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 6/7] host-cups: new package: CUPS PPD compiler
  2017-09-22 14:04     ` Michael Olbrich
@ 2017-09-22 14:37       ` Roland Hieber
  0 siblings, 0 replies; 30+ messages in thread
From: Roland Hieber @ 2017-09-22 14:37 UTC (permalink / raw)
  To: ptxdist

On 22.09.2017 16:04, Michael Olbrich wrote:
> On Fri, Sep 22, 2017 at 02:06:58PM +0200, Juergen Borleis wrote:
>> When you install to "$(PTXDIST_SYSROOT_HOST)/bin" and
>> "$(PTXDIST_SYSROOT_HOST)/lib" the cross-ppdc variant can be reduced to:
>>
>> 	( \
>> 		echo '#!/bin/sh'; \
>> 		echo $(PTXDIST_SYSROOT_HOST)/bin/ppdc -I $(PTXDIST_SYSROOT_HOST)/share/cups/ppdc "$$@"'; \
>> 	) > $(CROSS_PPDC)
> 
> This realy depends on what '-I' means and the difference between the
> content of $(SYSROOT)/usr/share/cups/ppdc and
> $(PTXDIST_SYSROOT_HOST)/share/cups/ppdc.
> 
> ppdc is used at build-time by packages that create extra cups filters,
> right? If there are differences, then the original command-line is correct.
> In that case host-cups must depend on cup and the package using ppdc must
> depend on host-cups.
> Or, if such packages depend on cups anyways (maybe link to something?) you
> could create an options CUPS_PPDC that trigger a dependency on host-cups
> and create the cross ppdc wrapper in cups.make.

That was also my first thought. But a diff -r on 
$(PTXDIST_SYSROOT_HOST)/share/cups/ppdc and 
$(PTXDIST_SYSROOT_TARGET)/usr/share/cups/ppdc shows that they don't 
differ. So I think we can spare a dependency on target-CUPS if only the 
host ppdc is needed.

  - Roland


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 5/7] cups: new package: Common Unix Printing System
  2017-08-28 12:51   ` Michael Olbrich
  2017-08-28 14:03     ` Roland Hieber
@ 2017-09-27  8:16     ` Roland Hieber
  1 sibling, 0 replies; 30+ messages in thread
From: Roland Hieber @ 2017-09-27  8:16 UTC (permalink / raw)
  To: ptxdist

On 28.08.2017 14:51, Michael Olbrich wrote:
>> +CUPS_CONF_OPT	+= \
>> +	--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 \
>> +	$(call ptx/ifdef,PTXCONF_CUPS_JAVA,--with-java=/usr/bin/java,) \
>> +	$(call ptx/ifdef,PTXCONF_CUPS_PERL,--with-perl=/usr/bin/perl,) \
>> +	$(call ptx/ifdef,PTXCONF_CUPS_PHP,--with-php=/usr/bin/php5,) \
>> +	$(call ptx/ifdef,PTXCONF_CUPS_PYTHON,--with-python=/usr/bin/python,)
> 
> Are these options only to set the executable path? If yes then always set
> those and remove the options and dependencies. Just add a comment to the
> webinterface option.

configure defines HAVE_JAVA etc. in these cases, which influences the 
scheduler code. Nevertheless, configure is a bit broken here, PATCH v2 
will patch it for proper --without-* handling.

  - Roland

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2017-09-27  8:16 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [ptxdist] [PATCH 2/7] qpdf: new package: PDF inspection library and tools Roland Hieber
2017-08-28  9:52   ` 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

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