Re: [ptxdist] [PATCH v3 6/7] host-cups: new package: CUPS host tools
On Wed, Oct 25, 2017 at 10:57:50PM +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 > --- > > Notes: > changes in v2 -> v3: > - version bump 2.2.4 -> 2.2.5 (no further config changes needed) > - does no longer build without multithreading (see CUPS issue #5154) > - configure: --libdir=/ is enough (but still needed), drop --exec-prefix > - $(call install) seems to delete already installed files, instead use >$(call compile) with additional argument "install" > - make targetinstall stage more silent > > rules/host-cups.in | 7 > rules/host-cups.make | 113 > +++ > 2 files changed, 120 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 0..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 0..894c47e41 > --- /dev/null > +++ b/rules/host-cups.make > @@ -0,0 +1,113 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2017 by Roland Hieber > +# > +# See CREDITS for details about who has contributed to this project. > +# > +# For further information about the PTXdist project and license conditions > +# see the README file. > +# > + > +# > +# We provide this package > +# > +HOST_PACKAGES-$(PTXCONF_HOST_CUPS) += host-cups > + > +# > > +# Prepare > +# > > + > +# > +# autoconf > +# > +# The --with-* options are only used to specify strings, --without-* does > +# nothing. So we're omitting them here. The only exception is > +# --with-components=core, which we are setting to only builds libcups* > (which is > +# needed by ppdc). > +# > +# --libdir has to end with a /, otherwise due to broken autoconf magic, the > libs > +# end up in ${prefix}/lib64, which is not what we want. > +# > +HOST_CUPS_CONF_TOOL := autoconf > +HOST_CUPS_CONF_OPT := \ > + $(HOST_AUTOCONF) \ > + --libdir=/lib/ \ > + --disable-mallinfo \ > + --disable-libpaper \ > + --disable-libusb \ > + --disable-tcp-wrappers \ > + --disable-acl \ > + --disable-dbus \ > + --disable-libtool-unsupported \ > + --disable-debug \ > + --disable-debug-guards \ > + --disable-debug-printfs \ > + --disable-unit-tests \ > + --disable-relro \ > + --disable-gssapi \ > + --enable-threads \ > + --disable-ssl \ > + --disable-cdsassl \ > + --disable-gnutls \ > + --disable-pam \ > + --disable-largefile \ > + --disable-avahi \ > + --disable-dnssd \ > + --disable-launchd \ > + --disable-systemd \ > + --disable-upstart \ > + --disable-page-logging \ > + --disable-browsing \ > + --disable-default-shared \ > + --disable-raw-printing \ > + --disable-webif \ > + --with-components=core > + > +# > > +# Compile > +# > > + > +$(STATEDIR)/host-cups.compile: > + @$(call targetinfo) > + @$(call world/compile, HOST_CUPS) > + @# ppdc isn't built by --with-components=core > + @$(call compile, HOST_CUPS, -C ${HOST_CUPS_DIR}/ppdc) > + @$(call touch) > + > +# > > +# Install > +# > > + > +HOST_CUPS_MAKE_ENV := \ > + DSTROOT=$(HOST_CUPS_PKGDIR) > + > +$(STATEDIR)/host-cups.install: > + @$(call targetinfo) > + @$(call world/install, HOST_CUPS) > + @# ppdc isn't included in --with-components=core > + @$(call compile, HOST_CUPS, -C ${HOST_CUPS_DIR}/ppdc install) > + @$(call touch) > + > +CROSS_PPDC = $(PTXDIST_SYSROOT_CROSS)/bin/ppdc add empty line here and use ':='. Michael > +$(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) > +
Re: [ptxdist] [PATCH v3 5/7] cups: new package: Common Unix Printing System
On Wed, Oct 25, 2017 at 10:57:49PM +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 > --- > > Notes: > changes in v2 -> v3: > - version bump 2.2.4 -> 2.2.5 > - fix SPDX license identifiers > - $(PKGDIR)/$(CUPS) -> $(CUPS_PKGDIR) > - with CROSS_AUTOCONF_USR, --exec-prefix and --libdir is not needed > - always build multithreaded, remove kconfig option > - remove debugging options, can easily be enabled by creating a local >rules/cups-debug.make > - fix install_copy for /etc/cups/ssl (missing permissions) > > ...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 | 113 ++ > rules/cups.make| 238 > + > 19 files changed, 646 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 0..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 > +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 It seems something was done upstream. Can you cherry-pick those commits instead. That will simplify updating later on. Michael > +Signed-off-by: Roland Hieber > +--- > + 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-sc
Re: [ptxdist] [PATCH v3 4/7] poppler: version bump 0.18.0 -> 0.59.0
On Wed, Oct 25, 2017 at 10:57:48PM +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 we 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 JPEG2000 or TIFF embedded in PDFs. > Likewise, libnss could be packaged for PDF signature support. Also > there is the option to build a Qt5 wrapper, but this is currently only > build-tested and needs to be tested in runtime. > > Signed-off-by: Roland Hieber > --- > > Notes: > changes in v2 -> v3: > - POPPLER_GLIB also needs HOST_GLIB for sysroot-host/bin/glib-mkenums > - add optional dependency for gobject-introspection > - add POPPLER_OPENJPEG, POPPLER_TIFF, POPPLER_NSS with depends on >BROKEN for future use > - respect PTXCONF_TARGET_DEBUG_* instead of introducing an extra >POPPLER_BUILD_DEBUG > - enable qt5 wrapper (only build-tested) > - order kconfig options by usage and add section headers for more >structure > > rules/poppler.in | 138 > - > rules/poppler.make | 56 -- > 2 files changed, 156 insertions(+), 38 deletions(-) > > diff --git a/rules/poppler.in b/rules/poppler.in > index b107dc7a5..3a74ead41 100644 > --- a/rules/poppler.in > +++ b/rules/poppler.in > @@ -4,23 +4,33 @@ 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 CAIROif 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_GUIif POPPLER_QT4 > - select QT4_BUILD_XMLif POPPLER_QT4 > + select POPPLER_DATA if POPPLER_WITH_DATA > + select GLIB if POPPLER_GLIB > + select HOST_GLIBif POPPLER_GLIB > + select GOBJECT_INTROSPECTION_HELPER if POPPLER_GOI > + select GOBJECT_INTROSPECTIONif POPPLER_GOI > + select LIBPNG if POPPLER_PNG > + select LIBJPEG if POPPLER_JPEG > + select CAIROif 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_GUIif POPPLER_QT4 > + select QT4_BUILD_XMLif POPPLER_QT4 > + select QT4_BUILD_QTESTLIB if POPPLER_QT4 > + select QT5 if POPPLER_QT5 > + select QT5_MODULE_QTBASEif POPPLER_QT5 > help > Poppler is a PDF rendering library based on the xpdf-3.0 code base. > > if POPPLER > > +comment "--- Install components ---" > + > config POPPLER_BIN > bool > prompt "install poppler utilities" > @@ -29,6 +39,26 @@ 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_WITH_DATA > + bool > + prompt "install poppler-data" > + help > + poppler-data contains the encoding files which enable poppler to > + correctly render CJK and Cyrillic. > + > +comment "--- Wrappers ---" > + > +config POPPLER_CPP > + bool > + prompt "enable poppler cpp wrapper"