mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <r.hieber@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <r.hieber@pengutronix.de>
Subject: [ptxdist] [PATCH v3 6/7] host-cups: new package: CUPS host tools
Date: Wed, 25 Oct 2017 22:57:50 +0200	[thread overview]
Message-ID: <20171025205751.27273-6-r.hieber@pengutronix.de> (raw)
In-Reply-To: <20171025205751.27273-1-r.hieber@pengutronix.de>

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 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 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..894c47e41
--- /dev/null
+++ b/rules/host-cups.make
@@ -0,0 +1,113 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Roland Hieber <r.hieber@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+HOST_PACKAGES-$(PTXCONF_HOST_CUPS) += host-cups
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+# The --with-* options are only used to specify strings, --without-* does
+# nothing. So we're omitting them here. The only exception is
+# --with-components=core, which we are setting to only builds libcups* (which is
+# needed by ppdc).
+#
+# --libdir has to end with a /, otherwise due to broken autoconf magic, the libs
+# end up in ${prefix}/lib64, which is not what we want.
+#
+HOST_CUPS_CONF_TOOL	:= autoconf
+HOST_CUPS_CONF_OPT	:= \
+	$(HOST_AUTOCONF) \
+	--libdir=/lib/ \
+	--disable-mallinfo \
+	--disable-libpaper \
+	--disable-libusb \
+	--disable-tcp-wrappers \
+	--disable-acl \
+	--disable-dbus \
+	--disable-libtool-unsupported \
+	--disable-debug \
+	--disable-debug-guards \
+	--disable-debug-printfs \
+	--disable-unit-tests \
+	--disable-relro \
+	--disable-gssapi \
+	--enable-threads \
+	--disable-ssl \
+	--disable-cdsassl \
+	--disable-gnutls \
+	--disable-pam \
+	--disable-largefile \
+	--disable-avahi \
+	--disable-dnssd \
+	--disable-launchd \
+	--disable-systemd \
+	--disable-upstart \
+	--disable-page-logging \
+	--disable-browsing \
+	--disable-default-shared \
+	--disable-raw-printing \
+	--disable-webif \
+	--with-components=core
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/host-cups.compile:
+	@$(call targetinfo)
+	@$(call world/compile, HOST_CUPS)
+	@# ppdc isn't built by --with-components=core
+	@$(call compile, HOST_CUPS, -C ${HOST_CUPS_DIR}/ppdc)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+HOST_CUPS_MAKE_ENV := \
+	DSTROOT=$(HOST_CUPS_PKGDIR)
+
+$(STATEDIR)/host-cups.install:
+	@$(call targetinfo)
+	@$(call world/install, HOST_CUPS)
+	@# ppdc isn't included in --with-components=core
+	@$(call compile, HOST_CUPS, -C ${HOST_CUPS_DIR}/ppdc install)
+	@$(call touch)
+
+CROSS_PPDC = $(PTXDIST_SYSROOT_CROSS)/bin/ppdc
+$(STATEDIR)/host-cups.install.post:
+	@$(call targetinfo)
+	@$(call world/install.post, HOST_CUPS)
+
+	@( \
+		echo '#!/bin/sh'; \
+		echo 'CUPS_DATADIR=$(PTXDIST_SYSROOT_HOST)/share/cups $(PTXDIST_SYSROOT_HOST)/bin/ppdc "$$@"'; \
+	) > $(CROSS_PPDC)
+	@chmod +x $(CROSS_PPDC)
+
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/host-cups.clean:
+	@$(call targetinfo)
+	@$(call clean_pkg, HOST_CUPS)
+	@rm -vf $(CROSS_PPDC)
+
+# vim: ft=make ts=8 tw=80
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2017-10-25 20:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25 20:57 [ptxdist] [PATCH v3 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
2017-10-25 20:57 ` [ptxdist] [PATCH v3 2/7] qpdf: new package: PDF inspection library and tools Roland Hieber
2017-10-25 20:57 ` [ptxdist] [PATCH v3 3/7] poppler-data: new package: optional encoding data for poppler Roland Hieber
2017-10-25 20:57 ` [ptxdist] [PATCH v3 4/7] poppler: version bump 0.18.0 -> 0.59.0 Roland Hieber
2017-10-25 21:15   ` Roland Hieber
2017-10-28  9:46   ` Michael Olbrich
2017-10-25 20:57 ` [ptxdist] [PATCH v3 5/7] cups: new package: Common Unix Printing System Roland Hieber
2017-10-27 17:54   ` Michael Olbrich
2017-10-31 22:31     ` Roland Hieber
2017-11-01 10:45       ` Michael Olbrich
2017-10-28  9:54   ` Michael Olbrich
2017-10-31 21:17     ` Roland Hieber
2017-10-25 20:57 ` Roland Hieber [this message]
2017-10-28  9:57   ` [ptxdist] [PATCH v3 6/7] host-cups: new package: CUPS host tools Michael Olbrich
2017-10-25 20:57 ` [ptxdist] [PATCH v3 7/7] cups-filters: new package: additional filters and backends for CUPS Roland Hieber
2017-11-01 10:51 ` [ptxdist] [PATCH v3 1/7] libpaper: new package: system-wide papersize configuration Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171025205751.27273-6-r.hieber@pengutronix.de \
    --to=r.hieber@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox