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

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

Notes:
    changes in v1 -> v2:
     - include list of known paper sizes in kconfig help
     - use snapshot.debian.org URL for future stability
     - properly use patches/autogen.sh instead of calling autoreconf in the
       prepare stage

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

diff --git a/patches/libpaper-1.1.24+nmu5/autogen.sh b/patches/libpaper-1.1.24+nmu5/autogen.sh
new file mode 100755
index 000000000..5d4c48990
--- /dev/null
+++ b/patches/libpaper-1.1.24+nmu5/autogen.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec autoreconf --install
diff --git a/rules/libpaper.in b/rules/libpaper.in
new file mode 100644
index 000000000..b70c1000b
--- /dev/null
+++ b/rules/libpaper.in
@@ -0,0 +1,38 @@
+## 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. Currently libpaper knows about the following formats:
+
+	  10x14 11x17 Comm10 DL Monarch a0 a1 a10 a2 a3 a4 a5 a6 a7 a8 a9 archA
+	  archB archC archD archE b0 b1 b10 b2 b3 b4 b5 b6 b7 b8 b9 c2 c3 c4 c5
+	  c6 c7 c8 csheet dsheet esheet executive flsa flse folio halfexecutive
+	  halfletter ledger legal letter note quarto statement tabloid
+
+config LIBPAPER_PAPERCONFIG
+	bool "install paperconfig"
+	help
+	  Install the paperconfig tool which sets the default paper size of the
+	  system
+
+config LIBPAPER_PAPERCONF
+	bool "install paperconf"
+	help
+	  Install the paperconf tool which prints information about a specific
+	  paper size
+
+endif
+# vim: ft=kconfig ts=8 noet tw=80
diff --git a/rules/libpaper.make b/rules/libpaper.make
new file mode 100644
index 000000000..6107841f0
--- /dev/null
+++ b/rules/libpaper.make
@@ -0,0 +1,69 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Roland Hieber <r.hieber@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBPAPER) += libpaper
+
+#
+# Paths and names
+#
+# libpaper seems to be maintained only as a Debian package, therefore the
+# unusual versioning.
+#
+LIBPAPER_VERSION	:= 1.1.24+nmu5
+LIBPAPER_MD5		:= 38bc55688c0fc5544edaa5a951a45fbd
+LIBPAPER		:= libpaper-$(LIBPAPER_VERSION)
+LIBPAPER_SUFFIX		:= tar.gz
+LIBPAPER_URL		:= http://snapshot.debian.org/archive/debian-debug/20161113T151229Z/pool/main/libp/libpaper/libpaper_$(LIBPAPER_VERSION).$(LIBPAPER_SUFFIX)
+LIBPAPER_SOURCE		:= $(SRCDIR)/$(LIBPAPER).$(LIBPAPER_SUFFIX)
+LIBPAPER_DIR		:= $(BUILDDIR)/$(LIBPAPER)
+LIBPAPER_LICENSE	:= GPL-2.0
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+LIBPAPER_CONF_ENV	:= \
+	$(CROSS_ENV) \
+	PAPERSIZE=$(PTXCONF_LIBPAPER_SIZE)
+#
+# autoconf
+#
+LIBPAPER_CONF_TOOL := autoconf
+#
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libpaper.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, libpaper)
+	@$(call install_fixup, libpaper,PRIORITY,optional)
+	@$(call install_fixup, libpaper,SECTION,base)
+	@$(call install_fixup, libpaper,AUTHOR,"Roland Hieber <r.hieber@pengutronix.de>")
+	@$(call install_fixup, libpaper,DESCRIPTION,missing)
+
+	@$(call install_lib, libpaper, 0, 0, 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] 19+ messages in thread

* [ptxdist] [PATCH v2 2/7] qpdf: new package: PDF inspection library and tools
  2017-09-27 12:22 [ptxdist] [PATCH v2 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
@ 2017-09-27 12:22 ` Roland Hieber
  2017-09-27 12:59   ` Roland Hieber
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 3/7] poppler-data: new package: optional encoding data for poppler Roland Hieber
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 19+ messages in thread
From: Roland Hieber @ 2017-09-27 12:22 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

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

Notes:
    changes in v1 -> v2:
     - version bump to 7.0.0
       - now with the right md5sum
       - dropped libpcre dependency
       - tests no longer fail to compile, remove our patch
       - but we need to patch for libjpeg's missing pkg-config
     - use default prepare stage
     - always use /dev/urandom

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

diff --git a/patches/qpdf-7.0.0/0001-Remove-libjpeg-dependency-from-pkg-config.patch b/patches/qpdf-7.0.0/0001-Remove-libjpeg-dependency-from-pkg-config.patch
new file mode 100644
index 000000000..7255159a1
--- /dev/null
+++ b/patches/qpdf-7.0.0/0001-Remove-libjpeg-dependency-from-pkg-config.patch
@@ -0,0 +1,40 @@
+From: Roland Hieber <r.hieber@pengutronix.de>
+Date: Mon, 25 Sep 2017 13:01:04 +0200
+Subject: [PATCH] Remove libjpeg dependency from pkg-config
+
+I'm linking QPDF with the original libjpeg-9a from http://ijg.org. This
+works well. But when I then compile cups-filters with QPDF support,
+cups-filters' configure is confused about it, because libjpeg does not
+ship pkg-config definitions:
+
+	[...]
+	checking for ZLIB... yes
+	checking for LIBQPDF... no
+	configure: error: Package requirements (libqpdf >= 3.0.2) were not met:
+
+	Package 'libjpeg', required by 'libqpdf', not found
+
+	Consider adjusting the PKG_CONFIG_PATH environment variable if you
+	installed software in a non-standard prefix.
+
+We cannot solve this problem in QPDF, so just remove the libjpeg
+dependency from the Requires.private variable.
+
+Forwarded: https://github.com/qpdf/qpdf/pull/157
+Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
+---
+ libqpdf.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libqpdf.pc.in b/libqpdf.pc.in
+index d45df49ed73b..8ece48734941 100644
+--- a/libqpdf.pc.in
++++ b/libqpdf.pc.in
+@@ -6,6 +6,6 @@ includedir=@includedir@
+ Name: libqpdf
+ Description: PDF transformation library
+ Version: @PACKAGE_VERSION@
+-Requires.private: zlib, libjpeg
++Requires.private: zlib
+ Libs: -L${libdir} -lqpdf
+ Cflags: -I${includedir}
diff --git a/patches/qpdf-7.0.0/series b/patches/qpdf-7.0.0/series
new file mode 100644
index 000000000..0de60c199
--- /dev/null
+++ b/patches/qpdf-7.0.0/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Remove-libjpeg-dependency-from-pkg-config.patch
+# c373cfc66b49ecd3549c751d0c0febbe  - git-ptx-patches magic
diff --git a/rules/qpdf.in b/rules/qpdf.in
new file mode 100644
index 000000000..387e49166
--- /dev/null
+++ b/rules/qpdf.in
@@ -0,0 +1,22 @@
+## SECTION=system_libraries
+
+menuconfig QPDF
+	tristate
+	prompt "qpdf                          "
+
+	select LIBJPEG
+	select ZLIB
+
+	help
+	  QPDF is a library that can be used to linearize (web-optimize),
+	  encrypt (password-protect), decrypt, and inspect PDF files.
+
+if QPDF
+
+config QPDF_TOOLS
+	bool "install tools"
+	help
+	  Install the tools. Those include qpdf, zlib-flate, and fix-qdf.
+
+endif
+# vim: ft=kconfig ts=8 noet tw=80
diff --git a/rules/qpdf.make b/rules/qpdf.make
new file mode 100644
index 000000000..8d03a8b8b
--- /dev/null
+++ b/rules/qpdf.make
@@ -0,0 +1,95 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Roland Hieber <r.hieber@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_QPDF) += qpdf
+
+#
+# Paths and names
+#
+QPDF_VERSION	:= 7.0.0
+QPDF_MD5	:= c3ff408f69b3a6b2b3b4c8b373b2600c
+QPDF		:= qpdf-$(QPDF_VERSION)
+QPDF_SUFFIX	:= tar.gz
+QPDF_URL	:= $(call ptx/mirror, SF, /qpdf/qpdf/$(QPDF_VERSION)/$(QPDF).$(QPDF_SUFFIX))
+QPDF_SOURCE	:= $(SRCDIR)/$(QPDF).$(QPDF_SUFFIX)
+QPDF_DIR	:= $(BUILDDIR)/$(QPDF)
+QPDF_LICENSE	:= Artistic-2.0
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+# We emulate --enable-external-libs as minimally as possible
+QPDF_CONF_ENV	:= \
+	$(CROSS_ENV) \
+	LIBS="-lz -ljpeg"
+
+#
+# autoconf
+#
+# Note: --with-random sets RANDOM_SOURCE, which is not used at all when
+# --enable-insecure-random is given. Nevertheless, autoconf will try to
+# autodetect whether /dev/urandom exists, which fails when cross-compiling.
+QPDF_CONF_TOOL	:= autoconf
+QPDF_CONF_OPT	:= \
+	$(CROSS_AUTOCONF_USR) \
+	--disable-static \
+	--enable-libtool-lock \
+	--disable-insecure-random \
+	--enable-os-secure-random \
+	--disable-external-libs \
+	$(GLOBAL_LARGE_FILE_OPTION) \
+	--disable-werror \
+	--disable-test-compare-images \
+	--disable-show-failed-test-output \
+	--disable-doc-maintenance \
+	--disable-html-doc \
+	--disable-pdf-doc \
+	--disable-validate-doc \
+	--with-random=/dev/urandom \
+	--with-buildrules=libtool
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/qpdf.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, qpdf)
+	@$(call install_fixup, qpdf,PRIORITY,optional)
+	@$(call install_fixup, qpdf,SECTION,base)
+	@$(call install_fixup, qpdf,AUTHOR,"Roland Hieber <r.hieber@pengutronix.de>")
+	@$(call install_fixup, qpdf,DESCRIPTION,missing)
+
+	@$(call install_lib, qpdf, 0, 0, 0755, libqpdf)
+
+ifdef PTXCONF_QPDF_TOOLS
+	@$(call install_copy, qpdf, 0, 0, 0755, -, /usr/bin/qpdf)
+	@$(call install_copy, qpdf, 0, 0, 0755, -, /usr/bin/fix-qdf)
+	@$(call install_copy, qpdf, 0, 0, 0755, -, /usr/bin/zlib-flate)
+endif
+
+	@$(call install_finish, qpdf)
+
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# 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] 19+ messages in thread

* [ptxdist] [PATCH v2 3/7] poppler-data: new package: optional encoding data for poppler
  2017-09-27 12:22 [ptxdist] [PATCH v2 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 2/7] qpdf: new package: PDF inspection library and tools Roland Hieber
@ 2017-09-27 12:22 ` Roland Hieber
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 4/7] poppler: version bump 0.18.0 -> 0.59.0 Roland Hieber
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 19+ messages in thread
From: Roland Hieber @ 2017-09-27 12:22 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

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

Notes:
    changes in v1 -> v2:
     - version bump to 0.4.8
     - use default compile stage, remove unneeded stage templates

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

diff --git a/rules/poppler-data.in b/rules/poppler-data.in
new file mode 100644
index 000000000..61796949e
--- /dev/null
+++ b/rules/poppler-data.in
@@ -0,0 +1,10 @@
+## SECTION=multimedia_gtk
+
+config POPPLER_DATA
+	tristate
+	prompt "poppler-data"
+	help
+	  Encoding data which enables poppler to correctly render CJK and
+	  Cyrillic languages.
+
+# vim: ft=kconfig ts=8 noet tw=80
diff --git a/rules/poppler-data.make b/rules/poppler-data.make
new file mode 100644
index 000000000..93edb7cea
--- /dev/null
+++ b/rules/poppler-data.make
@@ -0,0 +1,58 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Roland Hieber <r.hieber@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_POPPLER_DATA) += poppler-data
+
+#
+# Paths and names
+#
+POPPLER_DATA_VERSION	:= 0.4.8
+POPPLER_DATA_MD5	:= 00f8989c804de84af0ba2ea629949980
+POPPLER_DATA		:= poppler-data-$(POPPLER_DATA_VERSION)
+POPPLER_DATA_SUFFIX	:= tar.gz
+POPPLER_DATA_URL	:= https://poppler.freedesktop.org/$(POPPLER_DATA).$(POPPLER_DATA_SUFFIX)
+POPPLER_DATA_SOURCE	:= $(SRCDIR)/$(POPPLER_DATA).$(POPPLER_DATA_SUFFIX)
+POPPLER_DATA_DIR	:= $(BUILDDIR)/$(POPPLER_DATA)
+POPPLER_DATA_LICENSE	:= GPL-2.0 AND MIT AND BSD-3-Clause
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+POPPLER_DATA_CONF_TOOL	:= NO
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+POPPLER_DATA_INSTALL_OPT := prefix=/usr install
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/poppler-data.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, poppler-data)
+	@$(call install_fixup, poppler-data,PRIORITY,optional)
+	@$(call install_fixup, poppler-data,SECTION,base)
+	@$(call install_fixup, poppler-data,AUTHOR,"Roland Hieber <r.hieber@pengutronix.de>")
+	@$(call install_fixup, poppler-data,DESCRIPTION,missing)
+
+	@$(call install_tree, poppler-data, 0, 0, -, /usr/share/poppler)
+
+	@$(call install_finish, poppler-data)
+
+	@$(call touch)
+
+# vim: ft=make ts=8 tw=80
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH v2 4/7] poppler: version bump 0.18.0 -> 0.59.0
  2017-09-27 12:22 [ptxdist] [PATCH v2 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 2/7] qpdf: new package: PDF inspection library and tools Roland Hieber
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 3/7] poppler-data: new package: optional encoding data for poppler Roland Hieber
@ 2017-09-27 12:22 ` Roland Hieber
  2017-09-30 11:29   ` Michael Olbrich
  2017-10-04 14:35   ` Juergen Borleis
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 5/7] cups: new package: Common Unix Printing System Roland Hieber
                   ` (3 subsequent siblings)
  6 siblings, 2 replies; 19+ messages in thread
From: Roland Hieber @ 2017-09-27 12:22 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

This is quite a version bump, spanning six years of poppler development.
Upstream now provides data for rendering cyrillic 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 I disabled it.

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

Notes:
    changes in v1 -> v2:
     - version bump to 0.59.0, includes our 0.57.0 patches from v1
     - bring back old vim modeline
     - simplify single-precision/fixed-point logic

 rules/poppler.in   | 88 ++++++++++++++++++++++++++++++++++++++++++------------
 rules/poppler.make | 51 ++++++++++++++++++++++---------
 2 files changed, 106 insertions(+), 33 deletions(-)

diff --git a/rules/poppler.in b/rules/poppler.in
index b107dc7a5..af0306493 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,33 @@ config POPPLER_SPLASH
 	help
 	  build splash graphics backend
 
+config POPPLER_SPLASH_SINGLE
+	bool
+	prompt "use single precision float arithmetic"
+	default n if HAS_HARDFLOAT
+	depends on POPPLER_SPLASH
+	help
+	  Use single precision instead of double precision floating point
+	  arithmetic in Splash backend
+
+config POPPLER_SPLASH_FIXED
+	bool
+	prompt "use fixed point arithmetic"
+	default n if HAS_HARDFLOAT
+	depends on POPPLER_SPLASH
+	depends on !POPPLER_SPLASH_SINGLE
+	help
+	  If enabled, the Splash backend will use floating point operations
+	  instead of fixed-point arithmetic.
+
 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 +134,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..dec2c5005 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.59.0
+POPPLER_MD5	:= 6e44408a3b4f4a738f8a6770d0aea8a5
 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,29 @@ 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) \
+	--$(call ptx/endis, PTXCONF_POPPLER_SINGLE)-single-precision \
+	--$(call ptx/endis, PTXCONF_POPPLER_FIXED)-fixedpoint \
+	--$(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 +73,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 +105,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
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH v2 5/7] cups: new package: Common Unix Printing System
  2017-09-27 12:22 [ptxdist] [PATCH v2 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
                   ` (2 preceding siblings ...)
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 4/7] poppler: version bump 0.18.0 -> 0.59.0 Roland Hieber
@ 2017-09-27 12:22 ` Roland Hieber
  2017-09-30 11:53   ` Michael Olbrich
  2017-10-04 14:47   ` Juergen Borleis
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 6/7] host-cups: new package: CUPS host tools Roland Hieber
                   ` (2 subsequent siblings)
  6 siblings, 2 replies; 19+ messages in thread
From: Roland Hieber @ 2017-09-27 12:22 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

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

sysvinit script is installed from upstream, but untested.

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

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

Notes:
    changes in v1 -> v2:
     - move CUPS_BBINIT_LINK into separate .in file
     - correct license specification
     - improve scripting languages integration (via configure.ac patch)
     - change hard php-cli dependency into soft dependency of php-cli or php-cgi
     - break long lines in cups.make
     - targetinstall: install links to cupsaccept into /sbin
     - targetinstall: use user/group names instead of IDs
     - targetinstall: create config directories with correct permissions
     - targetinstall: fix permissions for readonly config files

 ...llow-explicit-disabling-of-Java-PHP-Perl-.patch |  92 ++++++++
 ...-remove-leftover-check-for-empty-CUPS_PHP.patch |  29 +++
 ...e-make-interpreter-detection-more-verbose.patch |  88 ++++++++
 patches/cups-2.2.4/autogen.sh                      |   7 +
 patches/cups-2.2.4/series                          |   6 +
 projectroot/etc/cups/classes.conf                  |   1 +
 projectroot/etc/cups/client.conf                   |   2 +
 projectroot/etc/cups/cups-files.conf               |  22 ++
 projectroot/etc/cups/mailto.conf                   |   1 +
 projectroot/etc/cups/ppd/.createdirectory          |   0
 projectroot/etc/cups/printers.conf                 |   1 +
 projectroot/etc/cups/ssl/.createdirectory          |   0
 projectroot/etc/printcap                           |   3 +
 projectroot/usr/lib/systemd/system/cups.service    |  15 ++
 projectroot/usr/lib/systemd/system/cups.socket     |  14 ++
 projectroot/usr/lib/tmpfiles.d/cups.conf           |   6 +
 rules/cups-bbinit.in                               |   8 +
 rules/cups.in                                      | 140 ++++++++++++
 rules/cups.make                                    | 243 +++++++++++++++++++++
 19 files changed, 678 insertions(+)
 create mode 100644 patches/cups-2.2.4/0001-configure-allow-explicit-disabling-of-Java-PHP-Perl-.patch
 create mode 100644 patches/cups-2.2.4/0002-configure-remove-leftover-check-for-empty-CUPS_PHP.patch
 create mode 100644 patches/cups-2.2.4/0003-configure-make-interpreter-detection-more-verbose.patch
 create mode 100755 patches/cups-2.2.4/autogen.sh
 create mode 100644 patches/cups-2.2.4/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-bbinit.in
 create mode 100644 rules/cups.in
 create mode 100644 rules/cups.make

diff --git a/patches/cups-2.2.4/0001-configure-allow-explicit-disabling-of-Java-PHP-Perl-.patch b/patches/cups-2.2.4/0001-configure-allow-explicit-disabling-of-Java-PHP-Perl-.patch
new file mode 100644
index 000000000..f110f5aaa
--- /dev/null
+++ b/patches/cups-2.2.4/0001-configure-allow-explicit-disabling-of-Java-PHP-Perl-.patch
@@ -0,0 +1,92 @@
+From: Roland Hieber <r.hieber@pengutronix.de>
+Date: Mon, 25 Sep 2017 15:00:16 +0200
+Subject: [PATCH] configure: allow explicit disabling of Java/PHP/Perl/Python
+ support
+
+Currently, when configure is called with --with-java or --with-java=,
+auto-detection is performed. When called with --without-java, HAVE_JAVA
+is still being defined. This is unfortunate when cross-compiling for
+embedded systems, we would end up with Java on the host being
+auto-detected (which is not what we have on the target), or with a wrong
+HAVE_JAVA define. We need a way to explicitely disable scripting support
+for all supported languages.
+
+Forwarded: https://github.com/apple/cups/pull/5122
+Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
+---
+ config-scripts/cups-scripting.m4 | 24 ++++++++++++++++--------
+ 1 file changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/config-scripts/cups-scripting.m4 b/config-scripts/cups-scripting.m4
+index bff3e9a0505c..137c3be72cb0 100644
+--- a/config-scripts/cups-scripting.m4
++++ b/config-scripts/cups-scripting.m4
+@@ -14,11 +14,13 @@ dnl
+ dnl Do we have Java?
+ AC_ARG_WITH(java, [  --with-java             set Java interpreter for web interfaces ],
+ 	CUPS_JAVA="$withval",
+-	CUPS_JAVA="")
++	CUPS_JAVA="auto")
+ 
+-if test "x$CUPS_JAVA" = x; then
++if test "x$CUPS_JAVA" = xauto; then
+ 	AC_PATH_PROG(JAVA,java)
+ 	CUPS_JAVA="$JAVA"
++elif test "x$CUPS_JAVA" = xno; then
++	CUPS_JAVA=""
+ fi
+ 
+ AC_DEFINE_UNQUOTED(CUPS_JAVA, "$CUPS_JAVA")
+@@ -30,11 +32,13 @@ fi
+ dnl Do we have Perl?
+ AC_ARG_WITH(perl, [  --with-perl             set Perl interpreter for web interfaces ],
+ 	CUPS_PERL="$withval",
+-	CUPS_PERL="")
++	CUPS_PERL="auto")
+ 
+-if test "x$CUPS_PERL" = x; then
++if test "x$CUPS_PERL" = xauto; then
+ 	AC_PATH_PROG(PERL,perl)
+ 	CUPS_PERL="$PERL"
++elif test "x$CUPS_PERL" = xno; then
++	CUPS_PERL=""
+ fi
+ 
+ AC_DEFINE_UNQUOTED(CUPS_PERL, "$CUPS_PERL")
+@@ -46,9 +50,9 @@ fi
+ dnl Do we have PHP?
+ AC_ARG_WITH(php, [  --with-php              set PHP interpreter for web interfaces ],
+ 	CUPS_PHP="$withval",
+-	CUPS_PHP="")
++	CUPS_PHP="auto")
+ 
+-if test "x$CUPS_PHP" = x; then
++if test "x$CUPS_PHP" = xauto; then
+ 	AC_PATH_PROG(PHPCGI,php-cgi)
+ 	if test "x$PHPCGI" = x; then
+ 		AC_PATH_PROG(PHP,php)
+@@ -56,6 +60,8 @@ if test "x$CUPS_PHP" = x; then
+ 	else
+ 		CUPS_PHP="$PHPCGI"
+ 	fi
++elif test "x$CUPS_PHP" = xno; then
++	CUPS_PHP=""
+ fi
+ 
+ AC_DEFINE_UNQUOTED(CUPS_PHP, "$CUPS_PHP")
+@@ -69,11 +75,13 @@ fi
+ dnl Do we have Python?
+ AC_ARG_WITH(python, [  --with-python           set Python interpreter for web interfaces ],
+ 	CUPS_PYTHON="$withval",
+-	CUPS_PYTHON="")
++	CUPS_PYTHON="auto")
+ 
+-if test "x$CUPS_PYTHON" = x; then
++if test "x$CUPS_PYTHON" = xauto; then
+ 	AC_PATH_PROG(PYTHON,python)
+ 	CUPS_PYTHON="$PYTHON"
++elif test "x$CUPS_PYTHON" = xno; then
++	CUPS_PYTHON=""
+ fi
+ 
+ AC_DEFINE_UNQUOTED(CUPS_PYTHON, "$CUPS_PYTHON")
diff --git a/patches/cups-2.2.4/0002-configure-remove-leftover-check-for-empty-CUPS_PHP.patch b/patches/cups-2.2.4/0002-configure-remove-leftover-check-for-empty-CUPS_PHP.patch
new file mode 100644
index 000000000..b0b59a78f
--- /dev/null
+++ b/patches/cups-2.2.4/0002-configure-remove-leftover-check-for-empty-CUPS_PHP.patch
@@ -0,0 +1,29 @@
+From: Roland Hieber <r.hieber@pengutronix.de>
+Date: Mon, 25 Sep 2017 17:04:49 +0200
+Subject: [PATCH] configure: remove leftover check for empty CUPS_PHP
+
+After the respective AC_DEFINE_UNQUOTED(CUPS_PHP) call, assigning
+anything to CUPS_PHP is a no-op. Remove it so the surrounding test looks
+like the other tests in the file.
+
+Forwarded: https://github.com/apple/cups/pull/5122
+Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
+---
+ config-scripts/cups-scripting.m4 | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/config-scripts/cups-scripting.m4 b/config-scripts/cups-scripting.m4
+index 137c3be72cb0..f73d5310a3ae 100644
+--- a/config-scripts/cups-scripting.m4
++++ b/config-scripts/cups-scripting.m4
+@@ -66,9 +66,7 @@ fi
+ 
+ AC_DEFINE_UNQUOTED(CUPS_PHP, "$CUPS_PHP")
+ 
+-if test "x$CUPS_PHP" = x; then
+-	CUPS_PHP="no"
+-else
++if test "x$CUPS_PHP" != x; then
+ 	AC_DEFINE(HAVE_PHP)
+ fi
+ 
diff --git a/patches/cups-2.2.4/0003-configure-make-interpreter-detection-more-verbose.patch b/patches/cups-2.2.4/0003-configure-make-interpreter-detection-more-verbose.patch
new file mode 100644
index 000000000..a1bfc3ade
--- /dev/null
+++ b/patches/cups-2.2.4/0003-configure-make-interpreter-detection-more-verbose.patch
@@ -0,0 +1,88 @@
+From: Roland Hieber <r.hieber@pengutronix.de>
+Date: Mon, 25 Sep 2017 16:17:03 +0200
+Subject: [PATCH] configure: make interpreter detection more verbose
+
+Forwarded: https://github.com/apple/cups/pull/5122
+Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
+---
+ config-scripts/cups-scripting.m4 | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/config-scripts/cups-scripting.m4 b/config-scripts/cups-scripting.m4
+index f73d5310a3ae..4b1b6a80c5ac 100644
+--- a/config-scripts/cups-scripting.m4
++++ b/config-scripts/cups-scripting.m4
+@@ -16,6 +16,7 @@ AC_ARG_WITH(java, [  --with-java             set Java interpreter for web interf
+ 	CUPS_JAVA="$withval",
+ 	CUPS_JAVA="auto")
+ 
++AC_MSG_CHECKING([for Java interpreter])
+ if test "x$CUPS_JAVA" = xauto; then
+ 	AC_PATH_PROG(JAVA,java)
+ 	CUPS_JAVA="$JAVA"
+@@ -26,7 +27,10 @@ fi
+ AC_DEFINE_UNQUOTED(CUPS_JAVA, "$CUPS_JAVA")
+ 
+ if test "x$CUPS_JAVA" != x; then
++	AC_MSG_RESULT([$CUPS_JAVA])
+ 	AC_DEFINE(HAVE_JAVA)
++else
++	AC_MSG_RESULT([none])
+ fi
+ 
+ dnl Do we have Perl?
+@@ -34,6 +38,7 @@ AC_ARG_WITH(perl, [  --with-perl             set Perl interpreter for web interf
+ 	CUPS_PERL="$withval",
+ 	CUPS_PERL="auto")
+ 
++AC_MSG_CHECKING([for Perl interpreter])
+ if test "x$CUPS_PERL" = xauto; then
+ 	AC_PATH_PROG(PERL,perl)
+ 	CUPS_PERL="$PERL"
+@@ -44,7 +49,10 @@ fi
+ AC_DEFINE_UNQUOTED(CUPS_PERL, "$CUPS_PERL")
+ 
+ if test "x$CUPS_PERL" != x; then
++	AC_MSG_RESULT([$CUPS_PERL])
+ 	AC_DEFINE(HAVE_PERL)
++else
++	AC_MSG_RESULT([none])
+ fi
+ 
+ dnl Do we have PHP?
+@@ -52,6 +60,7 @@ AC_ARG_WITH(php, [  --with-php              set PHP interpreter for web interfac
+ 	CUPS_PHP="$withval",
+ 	CUPS_PHP="auto")
+ 
++AC_MSG_CHECKING([for PHP interpreter])
+ if test "x$CUPS_PHP" = xauto; then
+ 	AC_PATH_PROG(PHPCGI,php-cgi)
+ 	if test "x$PHPCGI" = x; then
+@@ -67,7 +76,10 @@ fi
+ AC_DEFINE_UNQUOTED(CUPS_PHP, "$CUPS_PHP")
+ 
+ if test "x$CUPS_PHP" != x; then
++	AC_MSG_RESULT([$CUPS_PHP])
+ 	AC_DEFINE(HAVE_PHP)
++else
++	AC_MSG_RESULT([none])
+ fi
+ 
+ dnl Do we have Python?
+@@ -75,6 +87,7 @@ AC_ARG_WITH(python, [  --with-python           set Python interpreter for web in
+ 	CUPS_PYTHON="$withval",
+ 	CUPS_PYTHON="auto")
+ 
++AC_MSG_CHECKING([for Python interpreter])
+ if test "x$CUPS_PYTHON" = xauto; then
+ 	AC_PATH_PROG(PYTHON,python)
+ 	CUPS_PYTHON="$PYTHON"
+@@ -85,5 +98,8 @@ fi
+ AC_DEFINE_UNQUOTED(CUPS_PYTHON, "$CUPS_PYTHON")
+ 
+ if test "x$CUPS_PYTHON" != x; then
++	AC_MSG_RESULT([$CUPS_PYTHON])
+ 	AC_DEFINE(HAVE_PYTHON)
++else
++	AC_MSG_RESULT([none])
+ fi
diff --git a/patches/cups-2.2.4/autogen.sh b/patches/cups-2.2.4/autogen.sh
new file mode 100755
index 000000000..1c70286be
--- /dev/null
+++ b/patches/cups-2.2.4/autogen.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+autoconf \
+        --force \
+        --warnings=cross \
+        --warnings=syntax \
+        --warnings=obsolete \
+        --warnings=unsupported
diff --git a/patches/cups-2.2.4/series b/patches/cups-2.2.4/series
new file mode 100644
index 000000000..8ed7533f1
--- /dev/null
+++ b/patches/cups-2.2.4/series
@@ -0,0 +1,6 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-configure-allow-explicit-disabling-of-Java-PHP-Perl-.patch
+0002-configure-remove-leftover-check-for-empty-CUPS_PHP.patch
+0003-configure-make-interpreter-detection-more-verbose.patch
+# c7ecb5f5cc92f09bc09802d57507070b  - git-ptx-patches magic
diff --git a/projectroot/etc/cups/classes.conf b/projectroot/etc/cups/classes.conf
new file mode 100644
index 000000000..dea737751
--- /dev/null
+++ b/projectroot/etc/cups/classes.conf
@@ -0,0 +1 @@
+# classes.conf - class configuration file for cups
diff --git a/projectroot/etc/cups/client.conf b/projectroot/etc/cups/client.conf
new file mode 100644
index 000000000..f8f0b6832
--- /dev/null
+++ b/projectroot/etc/cups/client.conf
@@ -0,0 +1,2 @@
+# CUPS client configuration
+ServerName localhost
diff --git a/projectroot/etc/cups/cups-files.conf b/projectroot/etc/cups/cups-files.conf
new file mode 100644
index 000000000..2cc2d5a5b
--- /dev/null
+++ b/projectroot/etc/cups/cups-files.conf
@@ -0,0 +1,22 @@
+# File/directory/user/group configuration file for the CUPS scheduler.
+User daemon
+Group lp
+SystemGroup root
+
+AccessLog /var/log/cups/access_log
+ErrorLog /var/log/cups/error_log
+PageLog /var/log/cups/page_log
+
+CacheDir /tmp/cups/cache
+DataDir /usr/share/cups
+DocumentRoot /usr/share/doc/cups
+RequestRoot /tmp/cups/spool
+ServerBin /usr/lib/cups
+ServerRoot /etc/cups
+StateDir /var/run/cups
+
+Printcap /etc/printcap
+PrintcapFormat bsd
+
+# SSL/TLS keychain for the scheduler...
+#ServerKeychain ssl
diff --git a/projectroot/etc/cups/mailto.conf b/projectroot/etc/cups/mailto.conf
new file mode 100644
index 000000000..4502adaee
--- /dev/null
+++ b/projectroot/etc/cups/mailto.conf
@@ -0,0 +1 @@
+# mailto.conf - configuration file for cups email notifier
diff --git a/projectroot/etc/cups/ppd/.createdirectory b/projectroot/etc/cups/ppd/.createdirectory
new file mode 100644
index 000000000..e69de29bb
diff --git a/projectroot/etc/cups/printers.conf b/projectroot/etc/cups/printers.conf
new file mode 100644
index 000000000..bf9879904
--- /dev/null
+++ b/projectroot/etc/cups/printers.conf
@@ -0,0 +1 @@
+# printers.conf - printer configuration file for cups
diff --git a/projectroot/etc/cups/ssl/.createdirectory b/projectroot/etc/cups/ssl/.createdirectory
new file mode 100644
index 000000000..e69de29bb
diff --git a/projectroot/etc/printcap b/projectroot/etc/printcap
new file mode 100644
index 000000000..e74f358e1
--- /dev/null
+++ b/projectroot/etc/printcap
@@ -0,0 +1,3 @@
+# This file was automatically generated by cupsd(8) from the
+# /etc/cups/printers.conf file.  All changes to this file
+# will be lost.
diff --git a/projectroot/usr/lib/systemd/system/cups.service b/projectroot/usr/lib/systemd/system/cups.service
new file mode 100644
index 000000000..ff94f69d2
--- /dev/null
+++ b/projectroot/usr/lib/systemd/system/cups.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=CUPS Scheduler service
+Documentation=man:cupsd(8)
+Requires=systemd-tmpfiles-setup.service
+Requires=cups.socket
+
+[Service]
+User=daemon
+Group=lp
+ExecStart=/usr/sbin/cupsd -l -c /etc/cups/cupsd.conf -s /etc/cups/cups-files.conf
+Type=simple
+
+[Install]
+Also=cups.socket
+WantedBy=printer.target
diff --git a/projectroot/usr/lib/systemd/system/cups.socket b/projectroot/usr/lib/systemd/system/cups.socket
new file mode 100644
index 000000000..de9f43b6b
--- /dev/null
+++ b/projectroot/usr/lib/systemd/system/cups.socket
@@ -0,0 +1,14 @@
+[Unit]
+Description=CUPS Scheduler socket
+PartOf=cups.service
+
+[Socket]
+ListenStream=/run/cups.sock
+ListenStream=[::1]:631
+ListenStream=127.0.0.1:631
+BindIPv6Only=No
+SocketUser=daemon
+SocketGroup=lp
+
+[Install]
+WantedBy=sockets.target
diff --git a/projectroot/usr/lib/tmpfiles.d/cups.conf b/projectroot/usr/lib/tmpfiles.d/cups.conf
new file mode 100644
index 000000000..c000cf255
--- /dev/null
+++ b/projectroot/usr/lib/tmpfiles.d/cups.conf
@@ -0,0 +1,6 @@
+#Type	Path			Mode	UID	GID	Age	Argument
+d	/var/log/cups		750	daemon	lp	-
+d	/tmp/cups/cache/	750	daemon	lp	-
+d	/tmp/cups/spool/	750	daemon	lp	-
+d	/tmp/cups/spool/tmp/	750	daemon	lp	-
+d	/var/run/cups		750	daemon	lp	-
diff --git a/rules/cups-bbinit.in b/rules/cups-bbinit.in
new file mode 100644
index 000000000..86b6f649a
--- /dev/null
+++ b/rules/cups-bbinit.in
@@ -0,0 +1,8 @@
+## SECTION=initmethod_bbinit
+
+config CUPS_BBINIT_LINK
+        string "cups"
+        depends on CUPS_STARTSCRIPT
+        default "S90cups"
+
+# vim: ft=kconfig ts=8 noet tw=80
diff --git a/rules/cups.in b/rules/cups.in
new file mode 100644
index 000000000..e77149920
--- /dev/null
+++ b/rules/cups.in
@@ -0,0 +1,140 @@
+## 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 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_STARTSCRIPT
+	bool "install init.d script"
+	depends on INITMETHOD_BBINIT
+	help
+	  Install /etc/init.d/cups
+
+config CUPS_TEST_TOOLS
+	bool "install cupstest* tools"
+	default n
+	help
+	  Install cupstestdsc and cupstestppd on the target.
+
+comment "--- External Libraries ---"
+
+config CUPS_LIBPAPER
+	bool "libpaper support"
+	help
+	  Build with support for libpaper's collection of paper sizes
+
+config CUPS_LIBUSB
+	bool "libusb support"
+	help
+	  Build with libusb support. This is needed for the usb backend in order
+	  to use USB printers.
+
+config CUPS_DBUS
+	bool "DBus support"
+	help
+	  Builds CUPS with support for sending event notifications over DBUS
+
+config CUPS_SSL
+	bool "enable TLS support"
+	help
+	  Enables SSL support over IPP and HTTP, also for the web interface.
+
+config CUPS_AVAHI
+	bool "enable Avahi support"
+	help
+	  Enables support for discovery of network printers over Avahi/zeroconf.
+
+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
+
+if CUPS_PHP && !PHP5_SAPI_CLI && !PHP5_SAPI_CGI
+	comment "Please also select PHP5_SAPI_CLI or PHP5_SAPI_CGI!"
+endif
+
+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..e7c9bba12
--- /dev/null
+++ b/rules/cups.make
@@ -0,0 +1,243 @@
+# -*-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 AND 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 \
+	--with-components=all \
+	--with-cachedir=/var/cache \
+	--with-logdir=/var/log \
+	--with-rundir=/run \
+	--with-rcdir=/etc \
+	--with-languages=none \
+	--with-cups-user=daemon \
+	--with-cups-group=lp
+
+# scripting integrations
+CUPS_PHP_PATH	:= \
+	$(if PTXCONF_PHP5_SAPI_CLI,/usr/bin/php5, \
+	$(if PTXCONF_PHP5_SAPI_CGI,/usr/bin/php-cgi))
+
+CUPS_CONF_OPT	+= \
+	$(call ptx/ifdef,PTXCONF_CUPS_JAVA,--with-java=/usr/bin/java,--without-java) \
+	$(call ptx/ifdef,PTXCONF_CUPS_PERL,--with-perl=/usr/bin/perl,--without-perl) \
+	$(call ptx/ifdef,PTXCONF_CUPS_PHP,--with-php=$(CUPS_PHP_PATH),--without-php) \
+	$(call ptx/ifdef,PTXCONF_CUPS_PYTHON,--with-python=/usr/bin/python,--without-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_copy, cups, daemon, lp, 750, /etc/cups)
+	@$(call install_alternative, cups, daemon, lp, 0640, /etc/cups/cups-files.conf)
+	@$(call install_alternative, cups, daemon, lp, 0640, /etc/cups/cupsd.conf)
+	@$(call install_alternative, cups, daemon, lp, 0600, /etc/cups/classes.conf)
+	@$(call install_alternative, cups, daemon, lp, 0600, /etc/cups/client.conf)
+	@$(call install_alternative, cups, daemon, lp, 0640, /etc/cups/mailto.conf)
+	@$(call install_copy, cups, daemon, lp, 0750, /etc/cups/ppd/)
+	@$(call install_alternative_tree, cups, daemon, lp,  /etc/cups/ppd/)
+	@$(call install_alternative, cups, daemon, lp, 0600, /etc/cups/printers.conf)
+	@$(call install_alternative, cups, daemon, lp, 0640, /etc/cups/snmp.conf)
+	@$(call install_alternative, cups, daemon, lp, 0640, /etc/printcap)
+	@$(call install_alternative, cups, root, root, 0644, /usr/share/cups/mime/mime.convs)
+	@$(call install_alternative, cups, root, root, 0644, /usr/share/cups/mime/mime.types)
+
+ifdef PTXCONF_CUPS_SSL
+	@$(call install_copy, cups, daemon, lp, /etc/cups/ssl/)
+	@$(call install_alternative_tree, cups, daemon, lp, /etc/cups/ssl/)
+endif
+
+ifdef PTXCONF_CUPS_DBUS
+	@$(call install_alternative, cups, root, root, 0644, /etc/dbus-1/system.d/cups.conf)
+endif
+
+# ----- libraries
+	@$(call install_lib, cups, root, root, 0755, libcups)
+	@$(call install_lib, cups, root, root, 0755, libcupsimage)
+	@$(call install_lib, cups, root, root, 0755, libcupsmime)
+	@$(call install_lib, cups, root, root, 0755, libcupsppdc)
+
+# ----- user and system binaries, with the correct access rights
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/cancel)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/cups-config)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/ipptool)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/lp)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/lpoptions)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/lpq)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/lpr)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/lprm)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/lpstat)
+
+	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/cupsaccept)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/cupsaddsmb)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/cupsctl)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/cupsd)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/cupsfilter)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/lpadmin)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/lpc)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/lpinfo)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/lpmove)
+
+	@$(call install_link, cups, cupsaccept, /usr/sbin/accept)
+	@$(call install_link, cups, cupsaccept, /usr/sbin/cupsdisable)
+	@$(call install_link, cups, cupsaccept, /usr/sbin/cupsenable)
+	@$(call install_link, cups, cupsaccept, /usr/sbin/cupsreject)
+	@$(call install_link, cups, cupsaccept, /usr/sbin/reject)
+
+ifdef PTXCONF_CUPS_TEST_TOOLS
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/cupstestdsc)
+	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/cupstestppd)
+endif
+
+# ----- backends, filters, cgi-bin (if enabled), etc.
+	@$(call install_tree, cups, root, root, -, /usr/lib/cups/backend)
+	@$(call install_tree, cups, root, root, -, /usr/lib/cups/daemon)
+	@$(call install_tree, cups, root, root, -, /usr/lib/cups/filter)
+	@$(call install_tree, cups, root, root, -, /usr/lib/cups/monitor)
+	@$(call install_tree, cups, root, root, -, /usr/lib/cups/notifier)
+
+ifdef PTXCONF_CUPS_LIBUSB
+	@$(call install_alternative, cups, root, root, 0644, \
+		/usr/share/cups/usb/org.cups.usb-quirks)
+endif
+
+ifdef PTXCONF_CUPS_WEBINTERFACE
+	@$(call install_lib, cups, root, root, 0755, libcupscgi)
+	@$(call install_tree, cups, root, root, -, /usr/lib/cups/cgi-bin)
+	@$(call install_tree, cups, root, root, -, /usr/share/cups/templates)
+	@$(call install_tree, cups, root, root, -, /usr/share/doc/cups)
+endif
+
+# ----- startup files
+ifdef PTXCONF_CUPS_SYSTEMD_UNIT
+	@$(call install_alternative, cups, root, root, 0644, \
+		/usr/lib/tmpfiles.d/cups.conf)
+	@$(call install_alternative, cups, root, root, 0644, \
+		/usr/lib/systemd/system/cups.service)
+	@$(call install_alternative, cups, root, root, 0644, \
+		/usr/lib/systemd/system/cups.socket)
+	@$(call install_link, cups, ../cups.service, \
+		/usr/lib/systemd/system/printer.target.wants/cups.service)
+	@$(call install_link, cups, ../cups.socket, \
+		/usr/lib/systemd/system/sockets.target.wants/cups.socket)
+endif
+
+ifdef PTXCONF_CUPS_STARTSCRIPT
+	@$(call install_alternative, cups, root, root, 0755, /etc/init.d/cups)
+	@$(call install_link, cups, ../init.d/cups, \
+		/etc/rc.d/$(PTXCONF_CUPS_BBINIT_LINK))
+endif
+
+	@$(call install_finish, cups)
+
+	@$(call touch)
+
+# vim: ft=make ts=8 tw=80
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH v2 6/7] host-cups: new package: CUPS host tools
  2017-09-27 12:22 [ptxdist] [PATCH v2 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
                   ` (3 preceding siblings ...)
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 5/7] cups: new package: Common Unix Printing System Roland Hieber
@ 2017-09-27 12:22 ` Roland Hieber
  2017-09-27 21:40   ` Roland Hieber
  2017-09-30 11:57   ` Michael Olbrich
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 7/7] cups-filters: new package: additional filters and backends for CUPS Roland Hieber
  2017-09-30 11:11 ` [ptxdist] [PATCH v2 1/7] libpaper: new package: system-wide papersize configuration Michael Olbrich
  6 siblings, 2 replies; 19+ messages in thread
From: Roland Hieber @ 2017-09-27 12:22 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

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

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

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

Notes:
    changes in v1 -> v2:
     - remove unused code in host-cups.make
     - compile ppdc in compile stage, not in install stage
     - use @$(call compile) and $(call install), not $(MAKE) directly
     - use --exec-prefix=/ and --libdir=/lib/ to get rid of LD_LIBRARY_PATH
     - set CUPS_DATADIR in sysroot-cross wrapper, so an additional include path is
       no longer needed, and ppdc also doesn't look for files on the host file
       system!
     - make clean stage more silent

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

diff --git a/rules/host-cups.in b/rules/host-cups.in
new file mode 100644
index 000000000..45edccada
--- /dev/null
+++ b/rules/host-cups.in
@@ -0,0 +1,7 @@
+## SECTION=hosttools_noprompt
+
+config HOST_CUPS
+	tristate
+	default ALLYES
+
+# vim: ft=kconfig ts=8 noet tw=80
diff --git a/rules/host-cups.make b/rules/host-cups.make
new file mode 100644
index 000000000..5dd88e47b
--- /dev/null
+++ b/rules/host-cups.make
@@ -0,0 +1,114 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Roland Hieber <r.hieber@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+HOST_PACKAGES-$(PTXCONF_HOST_CUPS) += host-cups
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+# The --with-* options are only used to specify strings, --without-* does
+# nothing. So we're omitting them here. The only exception is
+# --with-components=core, which we are setting to only builds libcups* (which is
+# needed by ppdc).
+#
+# 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=/ \
+	--libdir=/lib/ \
+	--disable-mallinfo \
+	--disable-libpaper \
+	--disable-libusb \
+	--disable-tcp-wrappers \
+	--disable-acl \
+	--disable-dbus \
+	--disable-libtool-unsupported \
+	--disable-debug \
+	--disable-debug-guards \
+	--disable-debug-printfs \
+	--disable-unit-tests \
+	--disable-relro \
+	--disable-gssapi \
+	--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
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/host-cups.compile:
+	@$(call targetinfo)
+	@$(call world/compile, HOST_CUPS)
+	@# ppdc isn't built by --with-components=core
+	@$(call compile, HOST_CUPS, -C ${HOST_CUPS_DIR}/ppdc)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+HOST_CUPS_MAKE_ENV := \
+	DSTROOT=$(HOST_CUPS_PKGDIR)
+
+$(STATEDIR)/host-cups.install:
+	@$(call targetinfo)
+	@$(call world/install, HOST_CUPS)
+	@# ppdc isn't included in --with-components=core
+	@$(call install, HOST_CUPS, ${HOST_CUPS_DIR}/ppdc)
+	@$(call touch)
+
+CROSS_PPDC = $(PTXDIST_SYSROOT_CROSS)/bin/ppdc
+$(STATEDIR)/host-cups.install.post:
+	@$(call targetinfo)
+	@$(call world/install.post, HOST_CUPS)
+
+	( \
+		echo '#!/bin/sh'; \
+		echo 'CUPS_DATADIR=$(PTXDIST_SYSROOT_HOST)/share/cups $(PTXDIST_SYSROOT_HOST)/bin/ppdc "$$@"'; \
+	) > $(CROSS_PPDC)
+	chmod +x $(CROSS_PPDC)
+
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/host-cups.clean:
+	@$(call targetinfo)
+	@$(call clean_pkg, HOST_CUPS)
+	@rm -vf $(CROSS_PPDC)
+
+# vim: ft=make ts=8 tw=80
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH v2 7/7] cups-filters: new package: additional filters and backends for CUPS
  2017-09-27 12:22 [ptxdist] [PATCH v2 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
                   ` (4 preceding siblings ...)
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 6/7] host-cups: new package: CUPS host tools Roland Hieber
@ 2017-09-27 12:22 ` Roland Hieber
  2017-09-30 12:00   ` Michael Olbrich
  2017-09-30 11:11 ` [ptxdist] [PATCH v2 1/7] libpaper: new package: system-wide papersize configuration Michael Olbrich
  6 siblings, 1 reply; 19+ messages in thread
From: Roland Hieber @ 2017-09-27 12:22 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

Upstream is very responsive, merged my patches and made a new release
while I was still packaging the old one :) Release frequency is high,
with 5 point releases in September alone, mostly small fixes.

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

Notes:
    changes in v1 -> v2:
     - kconfig changes due to poppler float/fixed simplification
     - version bump 1.16.6 -> 1.17.7 (they release fast!)
     - remove unneeded code

 rules/cups-filters.in   | 67 +++++++++++++++++++++++++++++++++++
 rules/cups-filters.make | 94 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 161 insertions(+)
 create mode 100644 rules/cups-filters.in
 create mode 100644 rules/cups-filters.make

diff --git a/rules/cups-filters.in b/rules/cups-filters.in
new file mode 100644
index 000000000..09652443f
--- /dev/null
+++ b/rules/cups-filters.in
@@ -0,0 +1,67 @@
+## SECTION=applications
+
+menuconfig CUPS_FILTERS
+	tristate
+	prompt "cups-filters                  "
+
+	select LIBC_DL
+	select HOST_CUPS
+	select CUPS
+	select GLIB
+	select ZLIB
+	select LCMS
+	select FREETYPE
+	select FONTCONFIG
+	select QPDF
+
+	# Note: configure does not check for these poppler options:
+	select POPPLER			if CUPS_FILTERS_POPPLER
+	select POPPLER_BIN		if CUPS_FILTERS_POPPLER # for pdftops
+	select POPPLER_CPP		if CUPS_FILTERS_POPPLER
+	select POPPLER_CMS		if CUPS_FILTERS_POPPLER
+	select POPPLER_SPLASH		if CUPS_FILTERS_POPPLER
+	select POPPLER_XPDF		if CUPS_FILTERS_POPPLER
+
+	select LIBJPEG			if CUPS_FILTERS_JPEG
+	select LIBPNG			if CUPS_FILTERS_PNG
+
+	help
+	  cups-filters contains backends, filters, and other software that
+	  was once part of the core CUPS distribution but is no longer
+	  maintained by Apple Inc. In addition it contains additional filters
+	  and software developed independently of Apple, especially filters for
+	  the PDF-centric printing workflow introduced by OpenPrinting and a
+	  daemon to browse Bonjour broadcasts of remote CUPS printers and makes
+	  these printers available locally.
+
+if CUPS_FILTERS
+
+config CUPS_FILTERS_POPPLER
+	bool "build with poppler support"
+	help
+	  Build with poppler support, needed for pdfto* filters and banners.
+
+comment "poppler support will not build with POPPLER_SPLASH_FIXED!"
+	depends on (POPPLER_SPLASH_FIXED && CUPS_FILTERS_POPPLER)
+
+config CUPS_FILTERS_IMAGEFILTERS
+	bool "build image filters"
+	help
+	  Build imagetopdf and imagetoraster filters
+
+config CUPS_FILTERS_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..0f19d6c11
--- /dev/null
+++ b/rules/cups-filters.make
@@ -0,0 +1,94 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Roland Hieber <r.hieber@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_CUPS_FILTERS) += cups-filters
+
+#
+# Paths and names
+#
+CUPS_FILTERS_VERSION	:= 1.17.7
+CUPS_FILTERS_MD5	:= 015caac191e9520abb7cde2fb9ce5961
+CUPS_FILTERS		:= cups-filters-$(CUPS_FILTERS_VERSION)
+CUPS_FILTERS_SUFFIX	:= tar.xz
+CUPS_FILTERS_URL	:= http://openprinting.org/download/cups-filters/$(CUPS_FILTERS).$(CUPS_FILTERS_SUFFIX)
+CUPS_FILTERS_SOURCE	:= $(SRCDIR)/$(CUPS_FILTERS).$(CUPS_FILTERS_SUFFIX)
+CUPS_FILTERS_DIR	:= $(BUILDDIR)/$(CUPS_FILTERS)
+CUPS_FILTERS_LICENSE	:= GPL-2.0 AND GPL-2.0+ AND GPL-3.0 AND GPL-3.0+ AND LGPL-2 AND LGPL-2.1+ AND MIT AND BSD-4-clause
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+# 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] 19+ messages in thread

* Re: [ptxdist] [PATCH v2 2/7] qpdf: new package: PDF inspection library and tools
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 2/7] qpdf: new package: PDF inspection library and tools Roland Hieber
@ 2017-09-27 12:59   ` Roland Hieber
  0 siblings, 0 replies; 19+ messages in thread
From: Roland Hieber @ 2017-09-27 12:59 UTC (permalink / raw)
  To: ptxdist

On 27.09.2017 14:22, Roland Hieber wrote:
> +
> +# ----------------------------------------------------------------------------
> +# Clean
> +# ----------------------------------------------------------------------------
> +
> +#$(STATEDIR)/qpdf.clean:
> +#	@$(call targetinfo)
> +#	@$(call clean_pkg, QPDF)

Somehow this slipped through. Will fix in v3.

  - Roland

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH v2 6/7] host-cups: new package: CUPS host tools
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 6/7] host-cups: new package: CUPS host tools Roland Hieber
@ 2017-09-27 21:40   ` Roland Hieber
  2017-09-30 11:05     ` Michael Olbrich
  2017-09-30 11:57   ` Michael Olbrich
  1 sibling, 1 reply; 19+ messages in thread
From: Roland Hieber @ 2017-09-27 21:40 UTC (permalink / raw)
  To: ptxdist

On 27.09.2017 14:22, Roland Hieber wrote:
[...]
> diff --git a/rules/host-cups.make b/rules/host-cups.make
> new file mode 100644
> index 000000000..5dd88e47b
> --- /dev/null
> +++ b/rules/host-cups.make
> @@ -0,0 +1,114 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2017 by Roland Hieber <r.hieber@pengutronix.de>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +HOST_PACKAGES-$(PTXCONF_HOST_CUPS) += host-cups
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +#
> +# autoconf
> +#
> +# The --with-* options are only used to specify strings, --without-* does
> +# nothing. So we're omitting them here. The only exception is
> +# --with-components=core, which we are setting to only builds libcups* (which is
> +# needed by ppdc).
> +#
> +# 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=/ \
> +	--libdir=/lib/ \
> +	--disable-mallinfo \
> +	--disable-libpaper \
> +	--disable-libusb \
> +	--disable-tcp-wrappers \
> +	--disable-acl \
> +	--disable-dbus \
> +	--disable-libtool-unsupported \
> +	--disable-debug \
> +	--disable-debug-guards \
> +	--disable-debug-printfs \
> +	--disable-unit-tests \
> +	--disable-relro \
> +	--disable-gssapi \
> +	--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
> +
> +# ----------------------------------------------------------------------------
> +# Compile
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/host-cups.compile:
> +	@$(call targetinfo)
> +	@$(call world/compile, HOST_CUPS)
> +	@# ppdc isn't built by --with-components=core
> +	@$(call compile, HOST_CUPS, -C ${HOST_CUPS_DIR}/ppdc)
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Install
> +# ----------------------------------------------------------------------------
> +
> +HOST_CUPS_MAKE_ENV := \
> +	DSTROOT=$(HOST_CUPS_PKGDIR)
> +
> +$(STATEDIR)/host-cups.install:
> +	@$(call targetinfo)
> +	@$(call world/install, HOST_CUPS)
> +	@# ppdc isn't included in --with-components=core
> +	@$(call install, HOST_CUPS, ${HOST_CUPS_DIR}/ppdc)

Strange, this single call seems to delete already installed files. I've
guarded this line with a

	find ${HOST_CUPS_PKGDIR}/share/
	@$(call install, HOST_CUPS, ${HOST_CUPS_DIR}/ppdc)
	find ${HOST_CUPS_PKGDIR}/share/

and the first call shows files which are all missing in the second call.
But it works like intended if I replace this line with

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

(like suggested by mol last month). Any hints what's going on here, so I
can fix this in v3?

 - Roland

> +	@$(call touch)
> +
> +CROSS_PPDC = $(PTXDIST_SYSROOT_CROSS)/bin/ppdc
> +$(STATEDIR)/host-cups.install.post:
> +	@$(call targetinfo)
> +	@$(call world/install.post, HOST_CUPS)
> +
> +	( \
> +		echo '#!/bin/sh'; \
> +		echo 'CUPS_DATADIR=$(PTXDIST_SYSROOT_HOST)/share/cups $(PTXDIST_SYSROOT_HOST)/bin/ppdc "$$@"'; \
> +	) > $(CROSS_PPDC)
> +	chmod +x $(CROSS_PPDC)
> +
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Clean
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/host-cups.clean:
> +	@$(call targetinfo)
> +	@$(call clean_pkg, HOST_CUPS)
> +	@rm -vf $(CROSS_PPDC)
> +
> +# vim: ft=make ts=8 tw=80
> 


-- 
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] 19+ messages in thread

* Re: [ptxdist] [PATCH v2 6/7] host-cups: new package: CUPS host tools
  2017-09-27 21:40   ` Roland Hieber
@ 2017-09-30 11:05     ` Michael Olbrich
  0 siblings, 0 replies; 19+ messages in thread
From: Michael Olbrich @ 2017-09-30 11:05 UTC (permalink / raw)
  To: ptxdist

On Wed, Sep 27, 2017 at 11:40:38PM +0200, Roland Hieber wrote:
> On 27.09.2017 14:22, Roland Hieber wrote:
> [...]
> > diff --git a/rules/host-cups.make b/rules/host-cups.make
> > new file mode 100644
> > index 000000000..5dd88e47b
> > --- /dev/null
> > +++ b/rules/host-cups.make
> > @@ -0,0 +1,114 @@
> > +# -*-makefile-*-
> > +#
> > +# Copyright (C) 2017 by Roland Hieber <r.hieber@pengutronix.de>
> > +#
> > +# See CREDITS for details about who has contributed to this project.
> > +#
> > +# For further information about the PTXdist project and license conditions
> > +# see the README file.
> > +#
> > +
> > +#
> > +# We provide this package
> > +#
> > +HOST_PACKAGES-$(PTXCONF_HOST_CUPS) += host-cups
> > +
> > +# ----------------------------------------------------------------------------
> > +# Prepare
> > +# ----------------------------------------------------------------------------
> > +
> > +#
> > +# autoconf
> > +#
> > +# The --with-* options are only used to specify strings, --without-* does
> > +# nothing. So we're omitting them here. The only exception is
> > +# --with-components=core, which we are setting to only builds libcups* (which is
> > +# needed by ppdc).
> > +#
> > +# 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=/ \
> > +	--libdir=/lib/ \
> > +	--disable-mallinfo \
> > +	--disable-libpaper \
> > +	--disable-libusb \
> > +	--disable-tcp-wrappers \
> > +	--disable-acl \
> > +	--disable-dbus \
> > +	--disable-libtool-unsupported \
> > +	--disable-debug \
> > +	--disable-debug-guards \
> > +	--disable-debug-printfs \
> > +	--disable-unit-tests \
> > +	--disable-relro \
> > +	--disable-gssapi \
> > +	--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
> > +
> > +# ----------------------------------------------------------------------------
> > +# Compile
> > +# ----------------------------------------------------------------------------
> > +
> > +$(STATEDIR)/host-cups.compile:
> > +	@$(call targetinfo)
> > +	@$(call world/compile, HOST_CUPS)
> > +	@# ppdc isn't built by --with-components=core
> > +	@$(call compile, HOST_CUPS, -C ${HOST_CUPS_DIR}/ppdc)
> > +	@$(call touch)
> > +
> > +# ----------------------------------------------------------------------------
> > +# Install
> > +# ----------------------------------------------------------------------------
> > +
> > +HOST_CUPS_MAKE_ENV := \
> > +	DSTROOT=$(HOST_CUPS_PKGDIR)
> > +
> > +$(STATEDIR)/host-cups.install:
> > +	@$(call targetinfo)
> > +	@$(call world/install, HOST_CUPS)
> > +	@# ppdc isn't included in --with-components=core
> > +	@$(call install, HOST_CUPS, ${HOST_CUPS_DIR}/ppdc)
> 
> Strange, this single call seems to delete already installed files. I've
> guarded this line with a
> 
> 	find ${HOST_CUPS_PKGDIR}/share/
> 	@$(call install, HOST_CUPS, ${HOST_CUPS_DIR}/ppdc)
> 	find ${HOST_CUPS_PKGDIR}/share/
> 
> and the first call shows files which are all missing in the second call.
> But it works like intended if I replace this line with
> 
> 	@$(call compile, HOST_CUPS, -C ${HOST_CUPS_DIR}/ppdc install)
> 
> (like suggested by mol last month). Any hints what's going on here, so I
> can fix this in v3?

world/install and install both delete <PKG>_PKGDIR. This is to make sure
that the directory does not contain old files, e.g. after a config change
triggered a new prepare/compile/install run.
Things like install_tree depend on this.

Michael

> > +	@$(call touch)
> > +
> > +CROSS_PPDC = $(PTXDIST_SYSROOT_CROSS)/bin/ppdc
> > +$(STATEDIR)/host-cups.install.post:
> > +	@$(call targetinfo)
> > +	@$(call world/install.post, HOST_CUPS)
> > +
> > +	( \
> > +		echo '#!/bin/sh'; \
> > +		echo 'CUPS_DATADIR=$(PTXDIST_SYSROOT_HOST)/share/cups $(PTXDIST_SYSROOT_HOST)/bin/ppdc "$$@"'; \
> > +	) > $(CROSS_PPDC)
> > +	chmod +x $(CROSS_PPDC)
> > +
> > +	@$(call touch)
> > +
> > +# ----------------------------------------------------------------------------
> > +# Clean
> > +# ----------------------------------------------------------------------------
> > +
> > +$(STATEDIR)/host-cups.clean:
> > +	@$(call targetinfo)
> > +	@$(call clean_pkg, HOST_CUPS)
> > +	@rm -vf $(CROSS_PPDC)
> > +
> > +# vim: ft=make ts=8 tw=80
> > 
> 
> 
> -- 
> 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

-- 
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] 19+ messages in thread

* Re: [ptxdist] [PATCH v2 1/7] libpaper: new package: system-wide papersize configuration
  2017-09-27 12:22 [ptxdist] [PATCH v2 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
                   ` (5 preceding siblings ...)
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 7/7] cups-filters: new package: additional filters and backends for CUPS Roland Hieber
@ 2017-09-30 11:11 ` Michael Olbrich
  6 siblings, 0 replies; 19+ messages in thread
From: Michael Olbrich @ 2017-09-30 11:11 UTC (permalink / raw)
  To: ptxdist

On Wed, Sep 27, 2017 at 02:22:16PM +0200, Roland Hieber wrote:
> Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> ---
> 
> Notes:
>     changes in v1 -> v2:
>      - include list of known paper sizes in kconfig help
>      - use snapshot.debian.org URL for future stability
>      - properly use patches/autogen.sh instead of calling autoreconf in the
>        prepare stage
> 
>  patches/libpaper-1.1.24+nmu5/autogen.sh |  2 +
>  rules/libpaper.in                       | 38 ++++++++++++++++++
>  rules/libpaper.make                     | 69 +++++++++++++++++++++++++++++++++
>  3 files changed, 109 insertions(+)
>  create mode 100755 patches/libpaper-1.1.24+nmu5/autogen.sh
>  create mode 100644 rules/libpaper.in
>  create mode 100644 rules/libpaper.make
> 
> diff --git a/patches/libpaper-1.1.24+nmu5/autogen.sh b/patches/libpaper-1.1.24+nmu5/autogen.sh
> new file mode 100755
> index 000000000..5d4c48990
> --- /dev/null
> +++ b/patches/libpaper-1.1.24+nmu5/autogen.sh
> @@ -0,0 +1,2 @@
> +#!/bin/sh
> +exec autoreconf --install
> diff --git a/rules/libpaper.in b/rules/libpaper.in
> new file mode 100644
> index 000000000..b70c1000b
> --- /dev/null
> +++ b/rules/libpaper.in
> @@ -0,0 +1,38 @@
> +## 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. Currently libpaper knows about the following formats:
> +
> +	  10x14 11x17 Comm10 DL Monarch a0 a1 a10 a2 a3 a4 a5 a6 a7 a8 a9 archA
> +	  archB archC archD archE b0 b1 b10 b2 b3 b4 b5 b6 b7 b8 b9 c2 c3 c4 c5
> +	  c6 c7 c8 csheet dsheet esheet executive flsa flse folio halfexecutive
> +	  halfletter ledger legal letter note quarto statement tabloid
> +
> +config LIBPAPER_PAPERCONFIG
> +	bool "install paperconfig"
> +	help
> +	  Install the paperconfig tool which sets the default paper size of the
> +	  system
> +
> +config LIBPAPER_PAPERCONF
> +	bool "install paperconf"
> +	help
> +	  Install the paperconf tool which prints information about a specific
> +	  paper size
> +
> +endif
> +# vim: ft=kconfig ts=8 noet tw=80
> diff --git a/rules/libpaper.make b/rules/libpaper.make
> new file mode 100644
> index 000000000..6107841f0
> --- /dev/null
> +++ b/rules/libpaper.make
> @@ -0,0 +1,69 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2017 by Roland Hieber <r.hieber@pengutronix.de>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_LIBPAPER) += libpaper
> +
> +#
> +# Paths and names
> +#
> +# libpaper seems to be maintained only as a Debian package, therefore the
> +# unusual versioning.
> +#
> +LIBPAPER_VERSION	:= 1.1.24+nmu5
> +LIBPAPER_MD5		:= 38bc55688c0fc5544edaa5a951a45fbd
> +LIBPAPER		:= libpaper-$(LIBPAPER_VERSION)
> +LIBPAPER_SUFFIX		:= tar.gz
> +LIBPAPER_URL		:= http://snapshot.debian.org/archive/debian-debug/20161113T151229Z/pool/main/libp/libpaper/libpaper_$(LIBPAPER_VERSION).$(LIBPAPER_SUFFIX)
> +LIBPAPER_SOURCE		:= $(SRCDIR)/$(LIBPAPER).$(LIBPAPER_SUFFIX)
> +LIBPAPER_DIR		:= $(BUILDDIR)/$(LIBPAPER)
> +LIBPAPER_LICENSE	:= GPL-2.0
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +LIBPAPER_CONF_ENV	:= \
> +	$(CROSS_ENV) \
> +	PAPERSIZE=$(PTXCONF_LIBPAPER_SIZE)
> +#
> +# autoconf
> +#
> +LIBPAPER_CONF_TOOL := autoconf
> +#
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/libpaper.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, libpaper)
> +	@$(call install_fixup, libpaper,PRIORITY,optional)
> +	@$(call install_fixup, libpaper,SECTION,base)
> +	@$(call install_fixup, libpaper,AUTHOR,"Roland Hieber <r.hieber@pengutronix.de>")
> +	@$(call install_fixup, libpaper,DESCRIPTION,missing)
> +
> +	@$(call install_lib, libpaper, 0, 0, 0755, libpaper)
> +
> +ifeq ($(PTXCONF_LIBPAPER_PAPERCONFIG),y)

ifdef PTXCONF_LIBPAPER_PAPERCONFIG

> +	@$(call install_copy, libpaper, 0, 0, 755, -, /usr/sbin/paperconfig)
> +endif
> +ifeq ($(PTXCONF_LIBPAPER_PAPERCONF),y)

same here.

Michael

> +	@$(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] 19+ messages in thread

* Re: [ptxdist] [PATCH v2 4/7] poppler: version bump 0.18.0 -> 0.59.0
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 4/7] poppler: version bump 0.18.0 -> 0.59.0 Roland Hieber
@ 2017-09-30 11:29   ` Michael Olbrich
  2017-10-04 14:35   ` Juergen Borleis
  1 sibling, 0 replies; 19+ messages in thread
From: Michael Olbrich @ 2017-09-30 11:29 UTC (permalink / raw)
  To: ptxdist

On Wed, Sep 27, 2017 at 02:22:19PM +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 I disabled it.
> 
> Additionally, poppler could benefit from packaging libopenjpeg and
> libtiff in ptxdist for parsing embedded JPEG2000 or TIFF in PDFs.

An option marked broken with a comment about the missing library would be
nice. We have stuff like this in gstreamer too.

> Likewise, libnss could be packaged for PDF signature support. Also

I've some libnss rules somewhere that need to be cleaned up a bit, if
you're interrested :-).

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

Just build tested is ok to start with.

> Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> ---
> 
> Notes:
>     changes in v1 -> v2:
>      - version bump to 0.59.0, includes our 0.57.0 patches from v1
>      - bring back old vim modeline
>      - simplify single-precision/fixed-point logic
> 
>  rules/poppler.in   | 88 ++++++++++++++++++++++++++++++++++++++++++------------
>  rules/poppler.make | 51 ++++++++++++++++++++++---------
>  2 files changed, 106 insertions(+), 33 deletions(-)
> 
> diff --git a/rules/poppler.in b/rules/poppler.in
> index b107dc7a5..af0306493 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.

What kind of debugging does this enable? Makefiles can easily be hacked for
development and we have a global options for debugging symbols.
Don't add package specific debug options unless there are use-cases to have
it enabled in production system. E.g. gstreamer has an option like this.

Michael

> +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,33 @@ config POPPLER_SPLASH
>  	help
>  	  build splash graphics backend
>  
> +config POPPLER_SPLASH_SINGLE
> +	bool
> +	prompt "use single precision float arithmetic"
> +	default n if HAS_HARDFLOAT
> +	depends on POPPLER_SPLASH
> +	help
> +	  Use single precision instead of double precision floating point
> +	  arithmetic in Splash backend
> +
> +config POPPLER_SPLASH_FIXED
> +	bool
> +	prompt "use fixed point arithmetic"
> +	default n if HAS_HARDFLOAT
> +	depends on POPPLER_SPLASH
> +	depends on !POPPLER_SPLASH_SINGLE
> +	help
> +	  If enabled, the Splash backend will use floating point operations
> +	  instead of fixed-point arithmetic.
> +
>  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 +134,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..dec2c5005 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.59.0
> +POPPLER_MD5	:= 6e44408a3b4f4a738f8a6770d0aea8a5
>  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,29 @@ 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) \
> +	--$(call ptx/endis, PTXCONF_POPPLER_SINGLE)-single-precision \
> +	--$(call ptx/endis, PTXCONF_POPPLER_FIXED)-fixedpoint \
> +	--$(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 +73,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 +105,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
> -- 
> 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] 19+ messages in thread

* Re: [ptxdist] [PATCH v2 5/7] cups: new package: Common Unix Printing System
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 5/7] cups: new package: Common Unix Printing System Roland Hieber
@ 2017-09-30 11:53   ` Michael Olbrich
  2017-10-04 14:47   ` Juergen Borleis
  1 sibling, 0 replies; 19+ messages in thread
From: Michael Olbrich @ 2017-09-30 11:53 UTC (permalink / raw)
  To: ptxdist

On Wed, Sep 27, 2017 at 02:22:20PM +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>
> ---
> 
> Notes:
>     changes in v1 -> v2:
>      - move CUPS_BBINIT_LINK into separate .in file
>      - correct license specification
>      - improve scripting languages integration (via configure.ac patch)
>      - change hard php-cli dependency into soft dependency of php-cli or php-cgi
>      - break long lines in cups.make
>      - targetinstall: install links to cupsaccept into /sbin
>      - targetinstall: use user/group names instead of IDs
>      - targetinstall: create config directories with correct permissions
>      - targetinstall: fix permissions for readonly config files
> 
>  ...llow-explicit-disabling-of-Java-PHP-Perl-.patch |  92 ++++++++
>  ...-remove-leftover-check-for-empty-CUPS_PHP.patch |  29 +++
>  ...e-make-interpreter-detection-more-verbose.patch |  88 ++++++++
>  patches/cups-2.2.4/autogen.sh                      |   7 +
>  patches/cups-2.2.4/series                          |   6 +
>  projectroot/etc/cups/classes.conf                  |   1 +
>  projectroot/etc/cups/client.conf                   |   2 +
>  projectroot/etc/cups/cups-files.conf               |  22 ++
>  projectroot/etc/cups/mailto.conf                   |   1 +
>  projectroot/etc/cups/ppd/.createdirectory          |   0
>  projectroot/etc/cups/printers.conf                 |   1 +
>  projectroot/etc/cups/ssl/.createdirectory          |   0
>  projectroot/etc/printcap                           |   3 +
>  projectroot/usr/lib/systemd/system/cups.service    |  15 ++
>  projectroot/usr/lib/systemd/system/cups.socket     |  14 ++
>  projectroot/usr/lib/tmpfiles.d/cups.conf           |   6 +
>  rules/cups-bbinit.in                               |   8 +
>  rules/cups.in                                      | 140 ++++++++++++
>  rules/cups.make                                    | 243 +++++++++++++++++++++
>  19 files changed, 678 insertions(+)
>  create mode 100644 patches/cups-2.2.4/0001-configure-allow-explicit-disabling-of-Java-PHP-Perl-.patch
>  create mode 100644 patches/cups-2.2.4/0002-configure-remove-leftover-check-for-empty-CUPS_PHP.patch
>  create mode 100644 patches/cups-2.2.4/0003-configure-make-interpreter-detection-more-verbose.patch
>  create mode 100755 patches/cups-2.2.4/autogen.sh
>  create mode 100644 patches/cups-2.2.4/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-bbinit.in
>  create mode 100644 rules/cups.in
>  create mode 100644 rules/cups.make
> 
> diff --git a/patches/cups-2.2.4/0001-configure-allow-explicit-disabling-of-Java-PHP-Perl-.patch b/patches/cups-2.2.4/0001-configure-allow-explicit-disabling-of-Java-PHP-Perl-.patch
> new file mode 100644
> index 000000000..f110f5aaa
> --- /dev/null
> +++ b/patches/cups-2.2.4/0001-configure-allow-explicit-disabling-of-Java-PHP-Perl-.patch
> @@ -0,0 +1,92 @@
> +From: Roland Hieber <r.hieber@pengutronix.de>
> +Date: Mon, 25 Sep 2017 15:00:16 +0200
> +Subject: [PATCH] configure: allow explicit disabling of Java/PHP/Perl/Python
> + support
> +
> +Currently, when configure is called with --with-java or --with-java=,
> +auto-detection is performed. When called with --without-java, HAVE_JAVA
> +is still being defined. This is unfortunate when cross-compiling for
> +embedded systems, we would end up with Java on the host being
> +auto-detected (which is not what we have on the target), or with a wrong
> +HAVE_JAVA define. We need a way to explicitely disable scripting support
> +for all supported languages.
> +
> +Forwarded: https://github.com/apple/cups/pull/5122
> +Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> +---
> + config-scripts/cups-scripting.m4 | 24 ++++++++++++++++--------
> + 1 file changed, 16 insertions(+), 8 deletions(-)
> +
> +diff --git a/config-scripts/cups-scripting.m4 b/config-scripts/cups-scripting.m4
> +index bff3e9a0505c..137c3be72cb0 100644
> +--- a/config-scripts/cups-scripting.m4
> ++++ b/config-scripts/cups-scripting.m4
> +@@ -14,11 +14,13 @@ dnl
> + dnl Do we have Java?
> + AC_ARG_WITH(java, [  --with-java             set Java interpreter for web interfaces ],
> + 	CUPS_JAVA="$withval",
> +-	CUPS_JAVA="")
> ++	CUPS_JAVA="auto")
> + 
> +-if test "x$CUPS_JAVA" = x; then
> ++if test "x$CUPS_JAVA" = xauto; then
> + 	AC_PATH_PROG(JAVA,java)
> + 	CUPS_JAVA="$JAVA"
> ++elif test "x$CUPS_JAVA" = xno; then
> ++	CUPS_JAVA=""
> + fi
> + 
> + AC_DEFINE_UNQUOTED(CUPS_JAVA, "$CUPS_JAVA")
> +@@ -30,11 +32,13 @@ fi
> + dnl Do we have Perl?
> + AC_ARG_WITH(perl, [  --with-perl             set Perl interpreter for web interfaces ],
> + 	CUPS_PERL="$withval",
> +-	CUPS_PERL="")
> ++	CUPS_PERL="auto")
> + 
> +-if test "x$CUPS_PERL" = x; then
> ++if test "x$CUPS_PERL" = xauto; then
> + 	AC_PATH_PROG(PERL,perl)
> + 	CUPS_PERL="$PERL"
> ++elif test "x$CUPS_PERL" = xno; then
> ++	CUPS_PERL=""
> + fi
> + 
> + AC_DEFINE_UNQUOTED(CUPS_PERL, "$CUPS_PERL")
> +@@ -46,9 +50,9 @@ fi
> + dnl Do we have PHP?
> + AC_ARG_WITH(php, [  --with-php              set PHP interpreter for web interfaces ],
> + 	CUPS_PHP="$withval",
> +-	CUPS_PHP="")
> ++	CUPS_PHP="auto")
> + 
> +-if test "x$CUPS_PHP" = x; then
> ++if test "x$CUPS_PHP" = xauto; then
> + 	AC_PATH_PROG(PHPCGI,php-cgi)
> + 	if test "x$PHPCGI" = x; then
> + 		AC_PATH_PROG(PHP,php)
> +@@ -56,6 +60,8 @@ if test "x$CUPS_PHP" = x; then
> + 	else
> + 		CUPS_PHP="$PHPCGI"
> + 	fi
> ++elif test "x$CUPS_PHP" = xno; then
> ++	CUPS_PHP=""
> + fi
> + 
> + AC_DEFINE_UNQUOTED(CUPS_PHP, "$CUPS_PHP")
> +@@ -69,11 +75,13 @@ fi
> + dnl Do we have Python?
> + AC_ARG_WITH(python, [  --with-python           set Python interpreter for web interfaces ],
> + 	CUPS_PYTHON="$withval",
> +-	CUPS_PYTHON="")
> ++	CUPS_PYTHON="auto")
> + 
> +-if test "x$CUPS_PYTHON" = x; then
> ++if test "x$CUPS_PYTHON" = xauto; then
> + 	AC_PATH_PROG(PYTHON,python)
> + 	CUPS_PYTHON="$PYTHON"
> ++elif test "x$CUPS_PYTHON" = xno; then
> ++	CUPS_PYTHON=""
> + fi
> + 
> + AC_DEFINE_UNQUOTED(CUPS_PYTHON, "$CUPS_PYTHON")
> diff --git a/patches/cups-2.2.4/0002-configure-remove-leftover-check-for-empty-CUPS_PHP.patch b/patches/cups-2.2.4/0002-configure-remove-leftover-check-for-empty-CUPS_PHP.patch
> new file mode 100644
> index 000000000..b0b59a78f
> --- /dev/null
> +++ b/patches/cups-2.2.4/0002-configure-remove-leftover-check-for-empty-CUPS_PHP.patch
> @@ -0,0 +1,29 @@
> +From: Roland Hieber <r.hieber@pengutronix.de>
> +Date: Mon, 25 Sep 2017 17:04:49 +0200
> +Subject: [PATCH] configure: remove leftover check for empty CUPS_PHP
> +
> +After the respective AC_DEFINE_UNQUOTED(CUPS_PHP) call, assigning
> +anything to CUPS_PHP is a no-op. Remove it so the surrounding test looks
> +like the other tests in the file.
> +
> +Forwarded: https://github.com/apple/cups/pull/5122
> +Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> +---
> + config-scripts/cups-scripting.m4 | 4 +---
> + 1 file changed, 1 insertion(+), 3 deletions(-)
> +
> +diff --git a/config-scripts/cups-scripting.m4 b/config-scripts/cups-scripting.m4
> +index 137c3be72cb0..f73d5310a3ae 100644
> +--- a/config-scripts/cups-scripting.m4
> ++++ b/config-scripts/cups-scripting.m4
> +@@ -66,9 +66,7 @@ fi
> + 
> + AC_DEFINE_UNQUOTED(CUPS_PHP, "$CUPS_PHP")
> + 
> +-if test "x$CUPS_PHP" = x; then
> +-	CUPS_PHP="no"
> +-else
> ++if test "x$CUPS_PHP" != x; then
> + 	AC_DEFINE(HAVE_PHP)
> + fi
> + 
> diff --git a/patches/cups-2.2.4/0003-configure-make-interpreter-detection-more-verbose.patch b/patches/cups-2.2.4/0003-configure-make-interpreter-detection-more-verbose.patch
> new file mode 100644
> index 000000000..a1bfc3ade
> --- /dev/null
> +++ b/patches/cups-2.2.4/0003-configure-make-interpreter-detection-more-verbose.patch
> @@ -0,0 +1,88 @@
> +From: Roland Hieber <r.hieber@pengutronix.de>
> +Date: Mon, 25 Sep 2017 16:17:03 +0200
> +Subject: [PATCH] configure: make interpreter detection more verbose
> +
> +Forwarded: https://github.com/apple/cups/pull/5122
> +Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> +---
> + config-scripts/cups-scripting.m4 | 16 ++++++++++++++++
> + 1 file changed, 16 insertions(+)
> +
> +diff --git a/config-scripts/cups-scripting.m4 b/config-scripts/cups-scripting.m4
> +index f73d5310a3ae..4b1b6a80c5ac 100644
> +--- a/config-scripts/cups-scripting.m4
> ++++ b/config-scripts/cups-scripting.m4
> +@@ -16,6 +16,7 @@ AC_ARG_WITH(java, [  --with-java             set Java interpreter for web interf
> + 	CUPS_JAVA="$withval",
> + 	CUPS_JAVA="auto")
> + 
> ++AC_MSG_CHECKING([for Java interpreter])
> + if test "x$CUPS_JAVA" = xauto; then
> + 	AC_PATH_PROG(JAVA,java)
> + 	CUPS_JAVA="$JAVA"
> +@@ -26,7 +27,10 @@ fi
> + AC_DEFINE_UNQUOTED(CUPS_JAVA, "$CUPS_JAVA")
> + 
> + if test "x$CUPS_JAVA" != x; then
> ++	AC_MSG_RESULT([$CUPS_JAVA])
> + 	AC_DEFINE(HAVE_JAVA)
> ++else
> ++	AC_MSG_RESULT([none])
> + fi
> + 
> + dnl Do we have Perl?
> +@@ -34,6 +38,7 @@ AC_ARG_WITH(perl, [  --with-perl             set Perl interpreter for web interf
> + 	CUPS_PERL="$withval",
> + 	CUPS_PERL="auto")
> + 
> ++AC_MSG_CHECKING([for Perl interpreter])
> + if test "x$CUPS_PERL" = xauto; then
> + 	AC_PATH_PROG(PERL,perl)
> + 	CUPS_PERL="$PERL"
> +@@ -44,7 +49,10 @@ fi
> + AC_DEFINE_UNQUOTED(CUPS_PERL, "$CUPS_PERL")
> + 
> + if test "x$CUPS_PERL" != x; then
> ++	AC_MSG_RESULT([$CUPS_PERL])
> + 	AC_DEFINE(HAVE_PERL)
> ++else
> ++	AC_MSG_RESULT([none])
> + fi
> + 
> + dnl Do we have PHP?
> +@@ -52,6 +60,7 @@ AC_ARG_WITH(php, [  --with-php              set PHP interpreter for web interfac
> + 	CUPS_PHP="$withval",
> + 	CUPS_PHP="auto")
> + 
> ++AC_MSG_CHECKING([for PHP interpreter])
> + if test "x$CUPS_PHP" = xauto; then
> + 	AC_PATH_PROG(PHPCGI,php-cgi)
> + 	if test "x$PHPCGI" = x; then
> +@@ -67,7 +76,10 @@ fi
> + AC_DEFINE_UNQUOTED(CUPS_PHP, "$CUPS_PHP")
> + 
> + if test "x$CUPS_PHP" != x; then
> ++	AC_MSG_RESULT([$CUPS_PHP])
> + 	AC_DEFINE(HAVE_PHP)
> ++else
> ++	AC_MSG_RESULT([none])
> + fi
> + 
> + dnl Do we have Python?
> +@@ -75,6 +87,7 @@ AC_ARG_WITH(python, [  --with-python           set Python interpreter for web in
> + 	CUPS_PYTHON="$withval",
> + 	CUPS_PYTHON="auto")
> + 
> ++AC_MSG_CHECKING([for Python interpreter])
> + if test "x$CUPS_PYTHON" = xauto; then
> + 	AC_PATH_PROG(PYTHON,python)
> + 	CUPS_PYTHON="$PYTHON"
> +@@ -85,5 +98,8 @@ fi
> + AC_DEFINE_UNQUOTED(CUPS_PYTHON, "$CUPS_PYTHON")
> + 
> + if test "x$CUPS_PYTHON" != x; then
> ++	AC_MSG_RESULT([$CUPS_PYTHON])
> + 	AC_DEFINE(HAVE_PYTHON)
> ++else
> ++	AC_MSG_RESULT([none])
> + fi
> diff --git a/patches/cups-2.2.4/autogen.sh b/patches/cups-2.2.4/autogen.sh
> new file mode 100755
> index 000000000..1c70286be
> --- /dev/null
> +++ b/patches/cups-2.2.4/autogen.sh
> @@ -0,0 +1,7 @@
> +#!/bin/bash
> +autoconf \
> +        --force \
> +        --warnings=cross \
> +        --warnings=syntax \
> +        --warnings=obsolete \
> +        --warnings=unsupported
> diff --git a/patches/cups-2.2.4/series b/patches/cups-2.2.4/series
> new file mode 100644
> index 000000000..8ed7533f1
> --- /dev/null
> +++ b/patches/cups-2.2.4/series
> @@ -0,0 +1,6 @@
> +# generated by git-ptx-patches
> +#tag:base --start-number 1
> +0001-configure-allow-explicit-disabling-of-Java-PHP-Perl-.patch
> +0002-configure-remove-leftover-check-for-empty-CUPS_PHP.patch
> +0003-configure-make-interpreter-detection-more-verbose.patch
> +# c7ecb5f5cc92f09bc09802d57507070b  - git-ptx-patches magic
> diff --git a/projectroot/etc/cups/classes.conf b/projectroot/etc/cups/classes.conf
> new file mode 100644
> index 000000000..dea737751
> --- /dev/null
> +++ b/projectroot/etc/cups/classes.conf
> @@ -0,0 +1 @@
> +# classes.conf - class configuration file for cups
> diff --git a/projectroot/etc/cups/client.conf b/projectroot/etc/cups/client.conf
> new file mode 100644
> index 000000000..f8f0b6832
> --- /dev/null
> +++ b/projectroot/etc/cups/client.conf
> @@ -0,0 +1,2 @@
> +# CUPS client configuration
> +ServerName localhost
> diff --git a/projectroot/etc/cups/cups-files.conf b/projectroot/etc/cups/cups-files.conf
> new file mode 100644
> index 000000000..2cc2d5a5b
> --- /dev/null
> +++ b/projectroot/etc/cups/cups-files.conf
> @@ -0,0 +1,22 @@
> +# File/directory/user/group configuration file for the CUPS scheduler.
> +User daemon
> +Group lp
> +SystemGroup root
> +
> +AccessLog /var/log/cups/access_log
> +ErrorLog /var/log/cups/error_log
> +PageLog /var/log/cups/page_log
> +
> +CacheDir /tmp/cups/cache
> +DataDir /usr/share/cups
> +DocumentRoot /usr/share/doc/cups
> +RequestRoot /tmp/cups/spool
> +ServerBin /usr/lib/cups
> +ServerRoot /etc/cups
> +StateDir /var/run/cups
> +
> +Printcap /etc/printcap
> +PrintcapFormat bsd
> +
> +# SSL/TLS keychain for the scheduler...
> +#ServerKeychain ssl
> diff --git a/projectroot/etc/cups/mailto.conf b/projectroot/etc/cups/mailto.conf
> new file mode 100644
> index 000000000..4502adaee
> --- /dev/null
> +++ b/projectroot/etc/cups/mailto.conf
> @@ -0,0 +1 @@
> +# mailto.conf - configuration file for cups email notifier
> diff --git a/projectroot/etc/cups/ppd/.createdirectory b/projectroot/etc/cups/ppd/.createdirectory
> new file mode 100644
> index 000000000..e69de29bb
> diff --git a/projectroot/etc/cups/printers.conf b/projectroot/etc/cups/printers.conf
> new file mode 100644
> index 000000000..bf9879904
> --- /dev/null
> +++ b/projectroot/etc/cups/printers.conf
> @@ -0,0 +1 @@
> +# printers.conf - printer configuration file for cups
> diff --git a/projectroot/etc/cups/ssl/.createdirectory b/projectroot/etc/cups/ssl/.createdirectory
> new file mode 100644
> index 000000000..e69de29bb
> diff --git a/projectroot/etc/printcap b/projectroot/etc/printcap
> new file mode 100644
> index 000000000..e74f358e1
> --- /dev/null
> +++ b/projectroot/etc/printcap
> @@ -0,0 +1,3 @@
> +# This file was automatically generated by cupsd(8) from the
> +# /etc/cups/printers.conf file.  All changes to this file
> +# will be lost.
> diff --git a/projectroot/usr/lib/systemd/system/cups.service b/projectroot/usr/lib/systemd/system/cups.service
> new file mode 100644
> index 000000000..ff94f69d2
> --- /dev/null
> +++ b/projectroot/usr/lib/systemd/system/cups.service
> @@ -0,0 +1,15 @@
> +[Unit]
> +Description=CUPS Scheduler service
> +Documentation=man:cupsd(8)
> +Requires=systemd-tmpfiles-setup.service
> +Requires=cups.socket
> +
> +[Service]
> +User=daemon
> +Group=lp
> +ExecStart=/usr/sbin/cupsd -l -c /etc/cups/cupsd.conf -s /etc/cups/cups-files.conf
> +Type=simple
> +
> +[Install]
> +Also=cups.socket
> +WantedBy=printer.target
> diff --git a/projectroot/usr/lib/systemd/system/cups.socket b/projectroot/usr/lib/systemd/system/cups.socket
> new file mode 100644
> index 000000000..de9f43b6b
> --- /dev/null
> +++ b/projectroot/usr/lib/systemd/system/cups.socket
> @@ -0,0 +1,14 @@
> +[Unit]
> +Description=CUPS Scheduler socket
> +PartOf=cups.service
> +
> +[Socket]
> +ListenStream=/run/cups.sock
> +ListenStream=[::1]:631
> +ListenStream=127.0.0.1:631
> +BindIPv6Only=No
> +SocketUser=daemon
> +SocketGroup=lp
> +
> +[Install]
> +WantedBy=sockets.target
> diff --git a/projectroot/usr/lib/tmpfiles.d/cups.conf b/projectroot/usr/lib/tmpfiles.d/cups.conf
> new file mode 100644
> index 000000000..c000cf255
> --- /dev/null
> +++ b/projectroot/usr/lib/tmpfiles.d/cups.conf
> @@ -0,0 +1,6 @@
> +#Type	Path			Mode	UID	GID	Age	Argument
> +d	/var/log/cups		750	daemon	lp	-
> +d	/tmp/cups/cache/	750	daemon	lp	-
> +d	/tmp/cups/spool/	750	daemon	lp	-
> +d	/tmp/cups/spool/tmp/	750	daemon	lp	-
> +d	/var/run/cups		750	daemon	lp	-
> diff --git a/rules/cups-bbinit.in b/rules/cups-bbinit.in
> new file mode 100644
> index 000000000..86b6f649a
> --- /dev/null
> +++ b/rules/cups-bbinit.in
> @@ -0,0 +1,8 @@
> +## SECTION=initmethod_bbinit
> +
> +config CUPS_BBINIT_LINK
> +        string "cups"
> +        depends on CUPS_STARTSCRIPT
> +        default "S90cups"
> +
> +# vim: ft=kconfig ts=8 noet tw=80
> diff --git a/rules/cups.in b/rules/cups.in
> new file mode 100644
> index 000000000..e77149920
> --- /dev/null
> +++ b/rules/cups.in
> @@ -0,0 +1,140 @@
> +## 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 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

Why make this optional?

> +
> +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_STARTSCRIPT
> +	bool "install init.d script"
> +	depends on INITMETHOD_BBINIT
> +	help
> +	  Install /etc/init.d/cups
> +
> +config CUPS_TEST_TOOLS
> +	bool "install cupstest* tools"
> +	default n
> +	help
> +	  Install cupstestdsc and cupstestppd on the target.
> +
> +comment "--- External Libraries ---"
> +
> +config CUPS_LIBPAPER
> +	bool "libpaper support"
> +	help
> +	  Build with support for libpaper's collection of paper sizes
> +
> +config CUPS_LIBUSB
> +	bool "libusb support"
> +	help
> +	  Build with libusb support. This is needed for the usb backend in order
> +	  to use USB printers.
> +
> +config CUPS_DBUS
> +	bool "DBus support"
> +	help
> +	  Builds CUPS with support for sending event notifications over DBUS
> +
> +config CUPS_SSL
> +	bool "enable TLS support"
> +	help
> +	  Enables SSL support over IPP and HTTP, also for the web interface.
> +
> +config CUPS_AVAHI
> +	bool "enable Avahi support"
> +	help
> +	  Enables support for discovery of network printers over Avahi/zeroconf.
> +
> +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
> +
> +if CUPS_PHP && !PHP5_SAPI_CLI && !PHP5_SAPI_CGI
> +	comment "Please also select PHP5_SAPI_CLI or PHP5_SAPI_CGI!"
> +endif
> +
> +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.

No debugging options like this. Stuff like that is easily accidentally
commited. For local debugging you can just extend the config options with
a local uncomitted file:

$ cat rules/post/cups-debug.make
CUPS_CONF_OPT += --enable-debug ...

> +
> +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..e7c9bba12
> --- /dev/null
> +++ b/rules/cups.make
> @@ -0,0 +1,243 @@
> +# -*-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 AND GPLv2

spdx identifier.

> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +CUPS_CONF_ENV	:= \
> +	$(CROSS_ENV) \
> +	DSTROOT=$(PKGDIR)/$(CUPS)

	DSTROOT=$(CUPS_PKGDIR)

> +
> +#
> +# 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/ \

check the --help order.

> +	--libdir=/usr/lib/ \

This is already set in CROSS_AUTOCONF_USR, this should not be needed. If
the trailing / makes a difference, the comment on it above.

> +	--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 \
> +	--with-components=all \
> +	--with-cachedir=/var/cache \
> +	--with-logdir=/var/log \
> +	--with-rundir=/run \
> +	--with-rcdir=/etc \
> +	--with-languages=none \
> +	--with-cups-user=daemon \
> +	--with-cups-group=lp
> +
> +# scripting integrations
> +CUPS_PHP_PATH	:= \
> +	$(if PTXCONF_PHP5_SAPI_CLI,/usr/bin/php5, \
> +	$(if PTXCONF_PHP5_SAPI_CGI,/usr/bin/php-cgi))
> +
> +CUPS_CONF_OPT	+= \
> +	$(call ptx/ifdef,PTXCONF_CUPS_JAVA,--with-java=/usr/bin/java,--without-java) \
> +	$(call ptx/ifdef,PTXCONF_CUPS_PERL,--with-perl=/usr/bin/perl,--without-perl) \
> +	$(call ptx/ifdef,PTXCONF_CUPS_PHP,--with-php=$(CUPS_PHP_PATH),--without-php) \
> +	$(call ptx/ifdef,PTXCONF_CUPS_PYTHON,--with-python=/usr/bin/python,--without-python)
> +
> +# ----------------------------------------------------------------------------
> +# Install
> +# ----------------------------------------------------------------------------

remove the comment here. Otherwise, this is a bit misleading as
CUPS_MAKE_ENV is also used by the compile stage.

Michael

> +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_copy, cups, daemon, lp, 750, /etc/cups)
> +	@$(call install_alternative, cups, daemon, lp, 0640, /etc/cups/cups-files.conf)
> +	@$(call install_alternative, cups, daemon, lp, 0640, /etc/cups/cupsd.conf)
> +	@$(call install_alternative, cups, daemon, lp, 0600, /etc/cups/classes.conf)
> +	@$(call install_alternative, cups, daemon, lp, 0600, /etc/cups/client.conf)
> +	@$(call install_alternative, cups, daemon, lp, 0640, /etc/cups/mailto.conf)
> +	@$(call install_copy, cups, daemon, lp, 0750, /etc/cups/ppd/)
> +	@$(call install_alternative_tree, cups, daemon, lp,  /etc/cups/ppd/)
> +	@$(call install_alternative, cups, daemon, lp, 0600, /etc/cups/printers.conf)
> +	@$(call install_alternative, cups, daemon, lp, 0640, /etc/cups/snmp.conf)
> +	@$(call install_alternative, cups, daemon, lp, 0640, /etc/printcap)
> +	@$(call install_alternative, cups, root, root, 0644, /usr/share/cups/mime/mime.convs)
> +	@$(call install_alternative, cups, root, root, 0644, /usr/share/cups/mime/mime.types)
> +
> +ifdef PTXCONF_CUPS_SSL
> +	@$(call install_copy, cups, daemon, lp, /etc/cups/ssl/)
> +	@$(call install_alternative_tree, cups, daemon, lp, /etc/cups/ssl/)
> +endif
> +
> +ifdef PTXCONF_CUPS_DBUS
> +	@$(call install_alternative, cups, root, root, 0644, /etc/dbus-1/system.d/cups.conf)
> +endif
> +
> +# ----- libraries
> +	@$(call install_lib, cups, root, root, 0755, libcups)
> +	@$(call install_lib, cups, root, root, 0755, libcupsimage)
> +	@$(call install_lib, cups, root, root, 0755, libcupsmime)
> +	@$(call install_lib, cups, root, root, 0755, libcupsppdc)
> +
> +# ----- user and system binaries, with the correct access rights
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/cancel)
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/cups-config)
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/ipptool)
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/lp)
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/lpoptions)
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/lpq)
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/lpr)
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/lprm)
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/lpstat)
> +
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/cupsaccept)
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/cupsaddsmb)
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/cupsctl)
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/cupsd)
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/cupsfilter)
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/lpadmin)
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/lpc)
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/lpinfo)
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/sbin/lpmove)
> +
> +	@$(call install_link, cups, cupsaccept, /usr/sbin/accept)
> +	@$(call install_link, cups, cupsaccept, /usr/sbin/cupsdisable)
> +	@$(call install_link, cups, cupsaccept, /usr/sbin/cupsenable)
> +	@$(call install_link, cups, cupsaccept, /usr/sbin/cupsreject)
> +	@$(call install_link, cups, cupsaccept, /usr/sbin/reject)
> +
> +ifdef PTXCONF_CUPS_TEST_TOOLS
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/cupstestdsc)
> +	@$(call install_copy, cups, root, root, 0755, -, /usr/bin/cupstestppd)
> +endif
> +
> +# ----- backends, filters, cgi-bin (if enabled), etc.
> +	@$(call install_tree, cups, root, root, -, /usr/lib/cups/backend)
> +	@$(call install_tree, cups, root, root, -, /usr/lib/cups/daemon)
> +	@$(call install_tree, cups, root, root, -, /usr/lib/cups/filter)
> +	@$(call install_tree, cups, root, root, -, /usr/lib/cups/monitor)
> +	@$(call install_tree, cups, root, root, -, /usr/lib/cups/notifier)
> +
> +ifdef PTXCONF_CUPS_LIBUSB
> +	@$(call install_alternative, cups, root, root, 0644, \
> +		/usr/share/cups/usb/org.cups.usb-quirks)
> +endif
> +
> +ifdef PTXCONF_CUPS_WEBINTERFACE
> +	@$(call install_lib, cups, root, root, 0755, libcupscgi)
> +	@$(call install_tree, cups, root, root, -, /usr/lib/cups/cgi-bin)
> +	@$(call install_tree, cups, root, root, -, /usr/share/cups/templates)
> +	@$(call install_tree, cups, root, root, -, /usr/share/doc/cups)
> +endif
> +
> +# ----- startup files
> +ifdef PTXCONF_CUPS_SYSTEMD_UNIT
> +	@$(call install_alternative, cups, root, root, 0644, \
> +		/usr/lib/tmpfiles.d/cups.conf)
> +	@$(call install_alternative, cups, root, root, 0644, \
> +		/usr/lib/systemd/system/cups.service)
> +	@$(call install_alternative, cups, root, root, 0644, \
> +		/usr/lib/systemd/system/cups.socket)
> +	@$(call install_link, cups, ../cups.service, \
> +		/usr/lib/systemd/system/printer.target.wants/cups.service)
> +	@$(call install_link, cups, ../cups.socket, \
> +		/usr/lib/systemd/system/sockets.target.wants/cups.socket)
> +endif
> +
> +ifdef PTXCONF_CUPS_STARTSCRIPT
> +	@$(call install_alternative, cups, root, root, 0755, /etc/init.d/cups)
> +	@$(call install_link, cups, ../init.d/cups, \
> +		/etc/rc.d/$(PTXCONF_CUPS_BBINIT_LINK))
> +endif
> +
> +	@$(call install_finish, cups)
> +
> +	@$(call touch)
> +
> +# vim: ft=make ts=8 tw=80
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
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] 19+ messages in thread

* Re: [ptxdist] [PATCH v2 6/7] host-cups: new package: CUPS host tools
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 6/7] host-cups: new package: CUPS host tools Roland Hieber
  2017-09-27 21:40   ` Roland Hieber
@ 2017-09-30 11:57   ` Michael Olbrich
  1 sibling, 0 replies; 19+ messages in thread
From: Michael Olbrich @ 2017-09-30 11:57 UTC (permalink / raw)
  To: ptxdist

On Wed, Sep 27, 2017 at 02:22:21PM +0200, Roland Hieber wrote:
> Most printer drivers compile model-specific PPDs from a generic schema
> during the build process, using ppdc, the PPD compiler. ppdc must be
> able to find CUPS' internal include files, which are architecture-
> independent and can be used from sysroot-host.
> 
> Unfortunately, the CUPS build system is rather inflexible, so we have to
> build the whole core distribution to get a working ppdc.
> 
> Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> ---
> 
> Notes:
>     changes in v1 -> v2:
>      - remove unused code in host-cups.make
>      - compile ppdc in compile stage, not in install stage
>      - use @$(call compile) and $(call install), not $(MAKE) directly
>      - use --exec-prefix=/ and --libdir=/lib/ to get rid of LD_LIBRARY_PATH
>      - set CUPS_DATADIR in sysroot-cross wrapper, so an additional include path is
>        no longer needed, and ppdc also doesn't look for files on the host file
>        system!
>      - make clean stage more silent
> 
>  rules/host-cups.in   |   7 ++++
>  rules/host-cups.make | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 121 insertions(+)
>  create mode 100644 rules/host-cups.in
>  create mode 100644 rules/host-cups.make
> 
> diff --git a/rules/host-cups.in b/rules/host-cups.in
> new file mode 100644
> index 000000000..45edccada
> --- /dev/null
> +++ b/rules/host-cups.in
> @@ -0,0 +1,7 @@
> +## SECTION=hosttools_noprompt
> +
> +config HOST_CUPS
> +	tristate
> +	default ALLYES
> +
> +# vim: ft=kconfig ts=8 noet tw=80
> diff --git a/rules/host-cups.make b/rules/host-cups.make
> new file mode 100644
> index 000000000..5dd88e47b
> --- /dev/null
> +++ b/rules/host-cups.make
> @@ -0,0 +1,114 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2017 by Roland Hieber <r.hieber@pengutronix.de>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +HOST_PACKAGES-$(PTXCONF_HOST_CUPS) += host-cups
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +#
> +# autoconf
> +#
> +# The --with-* options are only used to specify strings, --without-* does
> +# nothing. So we're omitting them here. The only exception is
> +# --with-components=core, which we are setting to only builds libcups* (which is
> +# needed by ppdc).
> +#
> +# 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=/ \
> +	--libdir=/lib/ \

same as with cups.

> +	--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
> +
> +# ----------------------------------------------------------------------------
> +# Compile
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/host-cups.compile:
> +	@$(call targetinfo)
> +	@$(call world/compile, HOST_CUPS)
> +	@# ppdc isn't built by --with-components=core
> +	@$(call compile, HOST_CUPS, -C ${HOST_CUPS_DIR}/ppdc)
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Install
> +# ----------------------------------------------------------------------------
> +
> +HOST_CUPS_MAKE_ENV := \
> +	DSTROOT=$(HOST_CUPS_PKGDIR)
> +
> +$(STATEDIR)/host-cups.install:
> +	@$(call targetinfo)
> +	@$(call world/install, HOST_CUPS)
> +	@# ppdc isn't included in --with-components=core
> +	@$(call install, HOST_CUPS, ${HOST_CUPS_DIR}/ppdc)
> +	@$(call touch)
> +
> +CROSS_PPDC = $(PTXDIST_SYSROOT_CROSS)/bin/ppdc
> +$(STATEDIR)/host-cups.install.post:
> +	@$(call targetinfo)
> +	@$(call world/install.post, HOST_CUPS)
> +
> +	( \
> +		echo '#!/bin/sh'; \
> +		echo 'CUPS_DATADIR=$(PTXDIST_SYSROOT_HOST)/share/cups $(PTXDIST_SYSROOT_HOST)/bin/ppdc "$$@"'; \
> +	) > $(CROSS_PPDC)
> +	chmod +x $(CROSS_PPDC)

prefix both with @

Michael

> +
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Clean
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/host-cups.clean:
> +	@$(call targetinfo)
> +	@$(call clean_pkg, HOST_CUPS)
> +	@rm -vf $(CROSS_PPDC)
> +
> +# vim: ft=make ts=8 tw=80
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
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] 19+ messages in thread

* Re: [ptxdist] [PATCH v2 7/7] cups-filters: new package: additional filters and backends for CUPS
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 7/7] cups-filters: new package: additional filters and backends for CUPS Roland Hieber
@ 2017-09-30 12:00   ` Michael Olbrich
  2017-10-25 18:35     ` Roland Hieber
  0 siblings, 1 reply; 19+ messages in thread
From: Michael Olbrich @ 2017-09-30 12:00 UTC (permalink / raw)
  To: ptxdist

On Wed, Sep 27, 2017 at 02:22:22PM +0200, Roland Hieber wrote:
> Upstream is very responsive, merged my patches and made a new release
> while I was still packaging the old one :) Release frequency is high,
> with 5 point releases in September alone, mostly small fixes.
> 
> Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> ---
> 
> Notes:
>     changes in v1 -> v2:
>      - kconfig changes due to poppler float/fixed simplification
>      - version bump 1.16.6 -> 1.17.7 (they release fast!)
>      - remove unneeded code
> 
>  rules/cups-filters.in   | 67 +++++++++++++++++++++++++++++++++++
>  rules/cups-filters.make | 94 +++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 161 insertions(+)
>  create mode 100644 rules/cups-filters.in
>  create mode 100644 rules/cups-filters.make
> 
> diff --git a/rules/cups-filters.in b/rules/cups-filters.in
> new file mode 100644
> index 000000000..09652443f
> --- /dev/null
> +++ b/rules/cups-filters.in
> @@ -0,0 +1,67 @@
> +## SECTION=applications
> +
> +menuconfig CUPS_FILTERS
> +	tristate
> +	prompt "cups-filters                  "
> +
> +	select LIBC_DL
> +	select HOST_CUPS
> +	select CUPS
> +	select GLIB
> +	select ZLIB
> +	select LCMS
> +	select FREETYPE
> +	select FONTCONFIG
> +	select QPDF
> +
> +	# Note: configure does not check for these poppler options:
> +	select POPPLER			if CUPS_FILTERS_POPPLER
> +	select POPPLER_BIN		if CUPS_FILTERS_POPPLER # for pdftops
> +	select POPPLER_CPP		if CUPS_FILTERS_POPPLER
> +	select POPPLER_CMS		if CUPS_FILTERS_POPPLER
> +	select POPPLER_SPLASH		if CUPS_FILTERS_POPPLER
> +	select POPPLER_XPDF		if CUPS_FILTERS_POPPLER
> +
> +	select LIBJPEG			if CUPS_FILTERS_JPEG
> +	select LIBPNG			if CUPS_FILTERS_PNG
> +
> +	help
> +	  cups-filters contains backends, filters, and other software that
> +	  was once part of the core CUPS distribution but is no longer
> +	  maintained by Apple Inc. In addition it contains additional filters
> +	  and software developed independently of Apple, especially filters for
> +	  the PDF-centric printing workflow introduced by OpenPrinting and a
> +	  daemon to browse Bonjour broadcasts of remote CUPS printers and makes
> +	  these printers available locally.
> +
> +if CUPS_FILTERS
> +
> +config CUPS_FILTERS_POPPLER
> +	bool "build with poppler support"
> +	help
> +	  Build with poppler support, needed for pdfto* filters and banners.
> +
> +comment "poppler support will not build with POPPLER_SPLASH_FIXED!"
> +	depends on (POPPLER_SPLASH_FIXED && CUPS_FILTERS_POPPLER)
> +
> +config CUPS_FILTERS_IMAGEFILTERS
> +	bool "build image filters"
> +	help
> +	  Build imagetopdf and imagetoraster filters
> +
> +config CUPS_FILTERS_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..0f19d6c11
> --- /dev/null
> +++ b/rules/cups-filters.make
> @@ -0,0 +1,94 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2017 by Roland Hieber <r.hieber@pengutronix.de>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_CUPS_FILTERS) += cups-filters
> +
> +#
> +# Paths and names
> +#
> +CUPS_FILTERS_VERSION	:= 1.17.7
> +CUPS_FILTERS_MD5	:= 015caac191e9520abb7cde2fb9ce5961
> +CUPS_FILTERS		:= cups-filters-$(CUPS_FILTERS_VERSION)
> +CUPS_FILTERS_SUFFIX	:= tar.xz
> +CUPS_FILTERS_URL	:= http://openprinting.org/download/cups-filters/$(CUPS_FILTERS).$(CUPS_FILTERS_SUFFIX)
> +CUPS_FILTERS_SOURCE	:= $(SRCDIR)/$(CUPS_FILTERS).$(CUPS_FILTERS_SUFFIX)
> +CUPS_FILTERS_DIR	:= $(BUILDDIR)/$(CUPS_FILTERS)
> +CUPS_FILTERS_LICENSE	:= GPL-2.0 AND GPL-2.0+ AND GPL-3.0 AND GPL-3.0+ AND LGPL-2 AND LGPL-2.1+ AND MIT AND BSD-4-clause
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +#
> +# autoconf
> +#
> +# 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/ \

see my comment for cups.

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

644 right?

Michael

> +	@$(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] 19+ messages in thread

* Re: [ptxdist] [PATCH v2 4/7] poppler: version bump 0.18.0 -> 0.59.0
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 4/7] poppler: version bump 0.18.0 -> 0.59.0 Roland Hieber
  2017-09-30 11:29   ` Michael Olbrich
@ 2017-10-04 14:35   ` Juergen Borleis
  1 sibling, 0 replies; 19+ messages in thread
From: Juergen Borleis @ 2017-10-04 14:35 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

On Wednesday 27 September 2017 14:22:19 Roland Hieber wrote:
> [...]
> diff --git a/rules/poppler.in b/rules/poppler.in
> index b107dc7a5..af0306493 100644
> --- a/rules/poppler.in
> +++ b/rules/poppler.in
> @@ -4,18 +4,21 @@ menuconfig POPPLER
>  	tristate
>  	prompt "poppler                       "
>  	select FONTCONFIG
> [...]
> +       select GLIB                     if POPPLER_GLIB

A "select HOST_GLIB if POPPLER_GLIB" is missing as well.

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] 19+ messages in thread

* Re: [ptxdist] [PATCH v2 5/7] cups: new package: Common Unix Printing System
  2017-09-27 12:22 ` [ptxdist] [PATCH v2 5/7] cups: new package: Common Unix Printing System Roland Hieber
  2017-09-30 11:53   ` Michael Olbrich
@ 2017-10-04 14:47   ` Juergen Borleis
  1 sibling, 0 replies; 19+ messages in thread
From: Juergen Borleis @ 2017-10-04 14:47 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

Hi Roland,

On Wednesday 27 September 2017 14:22:20 Roland Hieber wrote:
> [...]
> +ifdef PTXCONF_CUPS_SSL
> +	@$(call install_copy, cups, daemon, lp, /etc/cups/ssl/)

This line fails with:

environment: line 22: 0/etc/cups/ssl & ~06000 : division by 0 (error token is "etc/cups/ssl & ~06000 ")
Error: install_dir failed!

because the permissions are missing.

Juergen

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

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH v2 7/7] cups-filters: new package: additional filters and backends for CUPS
  2017-09-30 12:00   ` Michael Olbrich
@ 2017-10-25 18:35     ` Roland Hieber
  2017-11-01 11:04       ` Michael Olbrich
  0 siblings, 1 reply; 19+ messages in thread
From: Roland Hieber @ 2017-10-25 18:35 UTC (permalink / raw)
  To: ptxdist

On 30.09.2017 14:00, Michael Olbrich wrote:
> On Wed, Sep 27, 2017 at 02:22:22PM +0200, Roland Hieber wrote:
>> Upstream is very responsive, merged my patches and made a new release
>> while I was still packaging the old one :) Release frequency is high,
>> with 5 point releases in September alone, mostly small fixes.
>>
>> Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
>> ---
>>
>> Notes:
>>     changes in v1 -> v2:
>>      - kconfig changes due to poppler float/fixed simplification
>>      - version bump 1.16.6 -> 1.17.7 (they release fast!)
>>      - remove unneeded code
>>
>>  rules/cups-filters.in   | 67 +++++++++++++++++++++++++++++++++++
>>  rules/cups-filters.make | 94 +++++++++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 161 insertions(+)
>>  create mode 100644 rules/cups-filters.in
>>  create mode 100644 rules/cups-filters.make
>>
>> diff --git a/rules/cups-filters.in b/rules/cups-filters.in
>> new file mode 100644
>> index 000000000..09652443f
>> --- /dev/null
>> +++ b/rules/cups-filters.in
>> @@ -0,0 +1,67 @@
>> +## SECTION=applications
>> +
>> +menuconfig CUPS_FILTERS
>> +	tristate
>> +	prompt "cups-filters                  "
>> +
>> +	select LIBC_DL
>> +	select HOST_CUPS
>> +	select CUPS
>> +	select GLIB
>> +	select ZLIB
>> +	select LCMS
>> +	select FREETYPE
>> +	select FONTCONFIG
>> +	select QPDF
>> +
>> +	# Note: configure does not check for these poppler options:
>> +	select POPPLER			if CUPS_FILTERS_POPPLER
>> +	select POPPLER_BIN		if CUPS_FILTERS_POPPLER # for pdftops
>> +	select POPPLER_CPP		if CUPS_FILTERS_POPPLER
>> +	select POPPLER_CMS		if CUPS_FILTERS_POPPLER
>> +	select POPPLER_SPLASH		if CUPS_FILTERS_POPPLER
>> +	select POPPLER_XPDF		if CUPS_FILTERS_POPPLER
>> +
>> +	select LIBJPEG			if CUPS_FILTERS_JPEG
>> +	select LIBPNG			if CUPS_FILTERS_PNG
>> +
>> +	help
>> +	  cups-filters contains backends, filters, and other software that
>> +	  was once part of the core CUPS distribution but is no longer
>> +	  maintained by Apple Inc. In addition it contains additional filters
>> +	  and software developed independently of Apple, especially filters for
>> +	  the PDF-centric printing workflow introduced by OpenPrinting and a
>> +	  daemon to browse Bonjour broadcasts of remote CUPS printers and makes
>> +	  these printers available locally.
>> +
>> +if CUPS_FILTERS
>> +
>> +config CUPS_FILTERS_POPPLER
>> +	bool "build with poppler support"
>> +	help
>> +	  Build with poppler support, needed for pdfto* filters and banners.
>> +
>> +comment "poppler support will not build with POPPLER_SPLASH_FIXED!"
>> +	depends on (POPPLER_SPLASH_FIXED && CUPS_FILTERS_POPPLER)
>> +
>> +config CUPS_FILTERS_IMAGEFILTERS
>> +	bool "build image filters"
>> +	help
>> +	  Build imagetopdf and imagetoraster filters
>> +
>> +config CUPS_FILTERS_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..0f19d6c11
>> --- /dev/null
>> +++ b/rules/cups-filters.make
>> @@ -0,0 +1,94 @@
>> +# -*-makefile-*-
>> +#
>> +# Copyright (C) 2017 by Roland Hieber <r.hieber@pengutronix.de>
>> +#
>> +# See CREDITS for details about who has contributed to this project.
>> +#
>> +# For further information about the PTXdist project and license conditions
>> +# see the README file.
>> +#
>> +
>> +#
>> +# We provide this package
>> +#
>> +PACKAGES-$(PTXCONF_CUPS_FILTERS) += cups-filters
>> +
>> +#
>> +# Paths and names
>> +#
>> +CUPS_FILTERS_VERSION	:= 1.17.7
>> +CUPS_FILTERS_MD5	:= 015caac191e9520abb7cde2fb9ce5961
>> +CUPS_FILTERS		:= cups-filters-$(CUPS_FILTERS_VERSION)
>> +CUPS_FILTERS_SUFFIX	:= tar.xz
>> +CUPS_FILTERS_URL	:= http://openprinting.org/download/cups-filters/$(CUPS_FILTERS).$(CUPS_FILTERS_SUFFIX)
>> +CUPS_FILTERS_SOURCE	:= $(SRCDIR)/$(CUPS_FILTERS).$(CUPS_FILTERS_SUFFIX)
>> +CUPS_FILTERS_DIR	:= $(BUILDDIR)/$(CUPS_FILTERS)
>> +CUPS_FILTERS_LICENSE	:= GPL-2.0 AND GPL-2.0+ AND GPL-3.0 AND GPL-3.0+ AND LGPL-2 AND LGPL-2.1+ AND MIT AND BSD-4-clause
>> +
>> +# ----------------------------------------------------------------------------
>> +# Prepare
>> +# ----------------------------------------------------------------------------
>> +
>> +#
>> +# autoconf
>> +#
>> +# 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/ \
> 
> see my comment for cups.
> 
>> +	--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)
> 
> 644 right?

Hmm, all the other libs in sysroot-target/usr/lib are 0755.

 - Roland

> 
> Michael
> 
>> +	@$(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.                  | 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] 19+ messages in thread

* Re: [ptxdist] [PATCH v2 7/7] cups-filters: new package: additional filters and backends for CUPS
  2017-10-25 18:35     ` Roland Hieber
@ 2017-11-01 11:04       ` Michael Olbrich
  0 siblings, 0 replies; 19+ messages in thread
From: Michael Olbrich @ 2017-11-01 11:04 UTC (permalink / raw)
  To: ptxdist

On Wed, Oct 25, 2017 at 08:35:10PM +0200, Roland Hieber wrote:
> On 30.09.2017 14:00, Michael Olbrich wrote:
> > On Wed, Sep 27, 2017 at 02:22:22PM +0200, Roland Hieber wrote:
> >> Upstream is very responsive, merged my patches and made a new release
> >> while I was still packaging the old one :) Release frequency is high,
> >> with 5 point releases in September alone, mostly small fixes.
> >>
> >> Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> >> ---
> >>
> >> Notes:
> >>     changes in v1 -> v2:
> >>      - kconfig changes due to poppler float/fixed simplification
> >>      - version bump 1.16.6 -> 1.17.7 (they release fast!)
> >>      - remove unneeded code
> >>
> >>  rules/cups-filters.in   | 67 +++++++++++++++++++++++++++++++++++
> >>  rules/cups-filters.make | 94 +++++++++++++++++++++++++++++++++++++++++++++++++
> >>  2 files changed, 161 insertions(+)
> >>  create mode 100644 rules/cups-filters.in
> >>  create mode 100644 rules/cups-filters.make
> >>
> >> diff --git a/rules/cups-filters.in b/rules/cups-filters.in
> >> new file mode 100644
> >> index 000000000..09652443f
> >> --- /dev/null
> >> +++ b/rules/cups-filters.in
> >> @@ -0,0 +1,67 @@
> >> +## SECTION=applications
> >> +
> >> +menuconfig CUPS_FILTERS
> >> +	tristate
> >> +	prompt "cups-filters                  "
> >> +
> >> +	select LIBC_DL
> >> +	select HOST_CUPS
> >> +	select CUPS
> >> +	select GLIB
> >> +	select ZLIB
> >> +	select LCMS
> >> +	select FREETYPE
> >> +	select FONTCONFIG
> >> +	select QPDF
> >> +
> >> +	# Note: configure does not check for these poppler options:
> >> +	select POPPLER			if CUPS_FILTERS_POPPLER
> >> +	select POPPLER_BIN		if CUPS_FILTERS_POPPLER # for pdftops
> >> +	select POPPLER_CPP		if CUPS_FILTERS_POPPLER
> >> +	select POPPLER_CMS		if CUPS_FILTERS_POPPLER
> >> +	select POPPLER_SPLASH		if CUPS_FILTERS_POPPLER
> >> +	select POPPLER_XPDF		if CUPS_FILTERS_POPPLER
> >> +
> >> +	select LIBJPEG			if CUPS_FILTERS_JPEG
> >> +	select LIBPNG			if CUPS_FILTERS_PNG
> >> +
> >> +	help
> >> +	  cups-filters contains backends, filters, and other software that
> >> +	  was once part of the core CUPS distribution but is no longer
> >> +	  maintained by Apple Inc. In addition it contains additional filters
> >> +	  and software developed independently of Apple, especially filters for
> >> +	  the PDF-centric printing workflow introduced by OpenPrinting and a
> >> +	  daemon to browse Bonjour broadcasts of remote CUPS printers and makes
> >> +	  these printers available locally.
> >> +
> >> +if CUPS_FILTERS
> >> +
> >> +config CUPS_FILTERS_POPPLER
> >> +	bool "build with poppler support"
> >> +	help
> >> +	  Build with poppler support, needed for pdfto* filters and banners.
> >> +
> >> +comment "poppler support will not build with POPPLER_SPLASH_FIXED!"
> >> +	depends on (POPPLER_SPLASH_FIXED && CUPS_FILTERS_POPPLER)
> >> +
> >> +config CUPS_FILTERS_IMAGEFILTERS
> >> +	bool "build image filters"
> >> +	help
> >> +	  Build imagetopdf and imagetoraster filters
> >> +
> >> +config CUPS_FILTERS_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..0f19d6c11
> >> --- /dev/null
> >> +++ b/rules/cups-filters.make
> >> @@ -0,0 +1,94 @@
> >> +# -*-makefile-*-
> >> +#
> >> +# Copyright (C) 2017 by Roland Hieber <r.hieber@pengutronix.de>
> >> +#
> >> +# See CREDITS for details about who has contributed to this project.
> >> +#
> >> +# For further information about the PTXdist project and license conditions
> >> +# see the README file.
> >> +#
> >> +
> >> +#
> >> +# We provide this package
> >> +#
> >> +PACKAGES-$(PTXCONF_CUPS_FILTERS) += cups-filters
> >> +
> >> +#
> >> +# Paths and names
> >> +#
> >> +CUPS_FILTERS_VERSION	:= 1.17.7
> >> +CUPS_FILTERS_MD5	:= 015caac191e9520abb7cde2fb9ce5961
> >> +CUPS_FILTERS		:= cups-filters-$(CUPS_FILTERS_VERSION)
> >> +CUPS_FILTERS_SUFFIX	:= tar.xz
> >> +CUPS_FILTERS_URL	:= http://openprinting.org/download/cups-filters/$(CUPS_FILTERS).$(CUPS_FILTERS_SUFFIX)
> >> +CUPS_FILTERS_SOURCE	:= $(SRCDIR)/$(CUPS_FILTERS).$(CUPS_FILTERS_SUFFIX)
> >> +CUPS_FILTERS_DIR	:= $(BUILDDIR)/$(CUPS_FILTERS)
> >> +CUPS_FILTERS_LICENSE	:= GPL-2.0 AND GPL-2.0+ AND GPL-3.0 AND GPL-3.0+ AND LGPL-2 AND LGPL-2.1+ AND MIT AND BSD-4-clause
> >> +
> >> +# ----------------------------------------------------------------------------
> >> +# Prepare
> >> +# ----------------------------------------------------------------------------
> >> +
> >> +#
> >> +# autoconf
> >> +#
> >> +# 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/ \
> > 
> > see my comment for cups.
> > 
> >> +	--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)
> > 
> > 644 right?
> 
> Hmm, all the other libs in sysroot-target/usr/lib are 0755.

But not in root/usr/lib, right? The linker makes all elf files executable.
It does not care if it's a shared library. We just remove the executable
bit for shared libraries during packaging. Other distros do the same thing.

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] 19+ messages in thread

end of thread, other threads:[~2017-11-01 11:04 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-27 12:22 [ptxdist] [PATCH v2 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
2017-09-27 12:22 ` [ptxdist] [PATCH v2 2/7] qpdf: new package: PDF inspection library and tools Roland Hieber
2017-09-27 12:59   ` Roland Hieber
2017-09-27 12:22 ` [ptxdist] [PATCH v2 3/7] poppler-data: new package: optional encoding data for poppler Roland Hieber
2017-09-27 12:22 ` [ptxdist] [PATCH v2 4/7] poppler: version bump 0.18.0 -> 0.59.0 Roland Hieber
2017-09-30 11:29   ` Michael Olbrich
2017-10-04 14:35   ` Juergen Borleis
2017-09-27 12:22 ` [ptxdist] [PATCH v2 5/7] cups: new package: Common Unix Printing System Roland Hieber
2017-09-30 11:53   ` Michael Olbrich
2017-10-04 14:47   ` Juergen Borleis
2017-09-27 12:22 ` [ptxdist] [PATCH v2 6/7] host-cups: new package: CUPS host tools Roland Hieber
2017-09-27 21:40   ` Roland Hieber
2017-09-30 11:05     ` Michael Olbrich
2017-09-30 11:57   ` Michael Olbrich
2017-09-27 12:22 ` [ptxdist] [PATCH v2 7/7] cups-filters: new package: additional filters and backends for CUPS Roland Hieber
2017-09-30 12:00   ` Michael Olbrich
2017-10-25 18:35     ` Roland Hieber
2017-11-01 11:04       ` Michael Olbrich
2017-09-30 11:11 ` [ptxdist] [PATCH v2 1/7] libpaper: new package: system-wide papersize configuration Michael Olbrich

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