Re: [ptxdist] [PATCH 6/7] host-cups: new package: CUPS PPD compiler
On 22.09.2017 16:04, Michael Olbrich wrote: On Fri, Sep 22, 2017 at 02:06:58PM +0200, Juergen Borleis wrote: When you install to "$(PTXDIST_SYSROOT_HOST)/bin" and "$(PTXDIST_SYSROOT_HOST)/lib" the cross-ppdc variant can be reduced to: ( \ echo '#!/bin/sh'; \ echo $(PTXDIST_SYSROOT_HOST)/bin/ppdc -I $(PTXDIST_SYSROOT_HOST)/share/cups/ppdc "$$@"'; \ ) > $(CROSS_PPDC) This realy depends on what '-I' means and the difference between the content of $(SYSROOT)/usr/share/cups/ppdc and $(PTXDIST_SYSROOT_HOST)/share/cups/ppdc. ppdc is used at build-time by packages that create extra cups filters, right? If there are differences, then the original command-line is correct. In that case host-cups must depend on cup and the package using ppdc must depend on host-cups. Or, if such packages depend on cups anyways (maybe link to something?) you could create an options CUPS_PPDC that trigger a dependency on host-cups and create the cross ppdc wrapper in cups.make. That was also my first thought. But a diff -r on $(PTXDIST_SYSROOT_HOST)/share/cups/ppdc and $(PTXDIST_SYSROOT_TARGET)/usr/share/cups/ppdc shows that they don't differ. So I think we can spare a dependency on target-CUPS if only the host ppdc is needed. - Roland ___ ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] [PATCH 6/7] host-cups: new package: CUPS PPD compiler
On Fri, Sep 22, 2017 at 02:06:58PM +0200, Juergen Borleis wrote: > Hi Roland, > > On Thursday 24 August 2017 00:39:10 Roland Hieber wrote: > > [...] > > +# > > +# autoconf > > +# > > +# The --with-* options are only used to specify strings, --without-* does > > +# nothing. So we're omitting them here. The only exception is > > +# --with-components=core, which we are setting to only builds libcups* > > (which is > > +# needed by ppdc). > > +# > > +# We have to set --exec-prefix and --libdir, otherwise the libs end up > > in +# ${prefix}/lib64, which is not what we want. > > +# > > +HOST_CUPS_CONF_TOOL:= autoconf > > +HOST_CUPS_CONF_OPT := \ > > + $(HOST_AUTOCONF) \ > > + --exec-prefix=/usr/ \ > > + --libdir=/usr/lib/ \ > > It seems "$(HOST_AUTOCONF)" and "--libdir=/lib" is enough. And installing to > "$(PTXDIST_SYSROOT_HOST)/bin" and "$(PTXDIST_SYSROOT_HOST)/lib" is handled > by PTXdist automatically (library search path handling and so on). > > > [...] > > + > > +CROSS_PPDC = $(PTXDIST_SYSROOT_CROSS)/bin/ppdc > > +$(STATEDIR)/host-cups.install.post: > > + @$(call targetinfo) > > + @$(call world/install.post, HOST_CUPS) > > + > > + ( \ > > + echo '#!/bin/sh'; \ > > + echo 'LD_LIBRARY_PATH=$(PTXDIST_SYSROOT_HOST)/usr/lib > > $(PTXDIST_SYSROOT_HOST)/usr/bin/ppdc -I $(SYSROOT)/usr/share/cups/ppdc > > "$$@"'; \ > > + ) > $(CROSS_PPDC) > > You should not mix "$(PTXDIST_SYSROOT_HOST)" and "$(SYSROOT)" here, because > then the "HOST-CUPS" package has a dependency to "CUPS"! > > When you install to "$(PTXDIST_SYSROOT_HOST)/bin" and > "$(PTXDIST_SYSROOT_HOST)/lib" the cross-ppdc variant can be reduced to: > > ( \ > echo '#!/bin/sh'; \ > echo $(PTXDIST_SYSROOT_HOST)/bin/ppdc -I > $(PTXDIST_SYSROOT_HOST)/share/cups/ppdc "$$@"'; \ > ) > $(CROSS_PPDC) This realy depends on what '-I' means and the difference between the content of $(SYSROOT)/usr/share/cups/ppdc and $(PTXDIST_SYSROOT_HOST)/share/cups/ppdc. ppdc is used at build-time by packages that create extra cups filters, right? If there are differences, then the original command-line is correct. In that case host-cups must depend on cup and the package using ppdc must depend on host-cups. Or, if such packages depend on cups anyways (maybe link to something?) you could create an options CUPS_PPDC that trigger a dependency on host-cups and create the cross ppdc wrapper in cups.make. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | ___ ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] [PATCH 6/7] host-cups: new package: CUPS PPD compiler
Hi Roland, On Thursday 24 August 2017 00:39:10 Roland Hieber wrote: > [...] > +# > +# autoconf > +# > +# The --with-* options are only used to specify strings, --without-* does > +# nothing. So we're omitting them here. The only exception is > +# --with-components=core, which we are setting to only builds libcups* > (which is > +# needed by ppdc). > +# > +# We have to set --exec-prefix and --libdir, otherwise the libs end up > in +# ${prefix}/lib64, which is not what we want. > +# > +HOST_CUPS_CONF_TOOL := autoconf > +HOST_CUPS_CONF_OPT := \ > + $(HOST_AUTOCONF) \ > + --exec-prefix=/usr/ \ > + --libdir=/usr/lib/ \ It seems "$(HOST_AUTOCONF)" and "--libdir=/lib" is enough. And installing to "$(PTXDIST_SYSROOT_HOST)/bin" and "$(PTXDIST_SYSROOT_HOST)/lib" is handled by PTXdist automatically (library search path handling and so on). > [...] > + > +CROSS_PPDC = $(PTXDIST_SYSROOT_CROSS)/bin/ppdc > +$(STATEDIR)/host-cups.install.post: > + @$(call targetinfo) > + @$(call world/install.post, HOST_CUPS) > + > + ( \ > + echo '#!/bin/sh'; \ > + echo 'LD_LIBRARY_PATH=$(PTXDIST_SYSROOT_HOST)/usr/lib > $(PTXDIST_SYSROOT_HOST)/usr/bin/ppdc -I $(SYSROOT)/usr/share/cups/ppdc > "$$@"'; \ > + ) > $(CROSS_PPDC) You should not mix "$(PTXDIST_SYSROOT_HOST)" and "$(SYSROOT)" here, because then the "HOST-CUPS" package has a dependency to "CUPS"! When you install to "$(PTXDIST_SYSROOT_HOST)/bin" and "$(PTXDIST_SYSROOT_HOST)/lib" the cross-ppdc variant can be reduced to: ( \ echo '#!/bin/sh'; \ echo $(PTXDIST_SYSROOT_HOST)/bin/ppdc -I $(PTXDIST_SYSROOT_HOST)/share/cups/ppdc "$$@"'; \ ) > $(CROSS_PPDC) Cheers Juergen -- Pengutronix e.K. | Juergen Borleis | Industrial Linux Solutions | http://www.pengutronix.de/ | ___ ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] [PATCH 6/7] host-cups: new package: CUPS PPD compiler
On Thu, Aug 24, 2017 at 12:39:10AM +0200, Roland Hieber wrote: > Most printer drivers compile model-specific PPDs from a generic schema > using ppdc during the build process. For this, ppdc must be able to find > CUPS' internal include files in sysroot-target. Unfortunately, the CUPS > build system is rather inflexible, so we have to build nearly everything > to get a working ppdc. > > Signed-off-by: Roland Hieber > --- > rules/host-cups.in | 7 > rules/host-cups.make | 108 > +++ > 2 files changed, 115 insertions(+) > create mode 100644 rules/host-cups.in > create mode 100644 rules/host-cups.make > > diff --git a/rules/host-cups.in b/rules/host-cups.in > new file mode 100644 > index 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..f45855d19 > --- /dev/null > +++ b/rules/host-cups.make > @@ -0,0 +1,108 @@ > +# -*-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 > +# > > + > +HOST_CUPS_CONF_ENV := $(HOST_ENV) not used -> remove. > + > +# > +# autoconf > +# > +# The --with-* options are only used to specify strings, --without-* does > +# nothing. So we're omitting them here. The only exception is > +# --with-components=core, which we are setting to only builds libcups* > (which is > +# needed by ppdc). > +# > +# We have to set --exec-prefix and --libdir, otherwise the libs end up in > +# ${prefix}/lib64, which is not what we want. > +# > +HOST_CUPS_CONF_TOOL := autoconf > +HOST_CUPS_CONF_OPT := \ > + $(HOST_AUTOCONF) \ > + --exec-prefix=/usr/ \ > + --libdir=/usr/lib/ \ > + --disable-mallinfo \ > + --disable-libpaper \ > + --disable-libusb \ > + --disable-tcp-wrappers \ > + --disable-acl \ > + --disable-dbus \ > + --disable-libtool-unsupported \ > + --disable-debug \ > + --disable-debug-guards \ > + --disable-debug-printfs \ > + --disable-unit-tests \ > + --disable-relro \ > + --disable-gssapi \ > + --disable-threads \ > + --disable-ssl \ > + --disable-cdsassl \ > + --disable-gnutls \ > + --disable-pam \ > + --disable-largefile \ > + --disable-avahi \ > + --disable-dnssd \ > + --disable-launchd \ > + --disable-systemd \ > + --disable-upstart \ > + --disable-page-logging \ > + --disable-browsing \ > + --disable-default-shared \ > + --disable-raw-printing \ > + --disable-webif \ > + --with-components=core > + > +# > > +# Install > +# > > + > +HOST_CUPS_MAKE_ENV := \ > + DSTROOT=$(HOST_CUPS_PKGDIR) > + > +$(STATEDIR)/host-cups.install: > + @$(call targetinfo) > + > + @$(call world/install, HOST_CUPS) > + > + @# ppdc isn't built by --with-components=core If it's not built the it should be built in the compile stage with: @$(call compile, HOST_CUPS, -C ${HOST_CUPS_DIR}/ppdc) > + $(MAKE) -C ${HOST_CUPS_DIR}/ppdc $(HOST_CUPS_MAKE_ENV) install @$(call compile, HOST_CUPS, -C ${HOST_CUPS_DIR}/ppdc install) should work, even if it's not very nice. > + > + @$(call touch) > + > +CROSS_PPDC = $(PTXDIST_SYSROOT_CROSS)/bin/ppdc > +$(STATEDIR)/host-cups.install.post: > + @$(call targetinfo) > + @$(call world/install.post, HOST_CUPS) > + > + ( \ > + echo '#!/bin/sh'; \ > + echo 'LD_LIBRARY_PATH=$(PTXDIST_SYSROOT_HOST)/usr/lib > $(PTXDIST_SYSROOT_HOST)/usr/bin/ppdc -I $(SYSROOT)/usr/share/cups/ppdc > "$$@"'; \ The LD_LIBRARY_PATH should not be necessary. What's the rpath for ppdc? > + ) > $(CROSS_PPDC) > + chmod +x $(CROSS_PPDC) > + > + @$(call touch) > + > +# > > +# Clean > +# > > + > +$(STATEDIR)/host-cups.clean: > + @$(call targetinfo) > + @$(call clean_pkg, HOST_CUPS) > + rm -f $(CROSS_PPDC) remove. Michael > + > +# vim: ft=make ts=8 tw=80 > -- > 2.11.0 > > > ___ > ptxdist mailing list > ptxdist@pengutronix.de -- Pengutronix e
[ptxdist] [PATCH 6/7] host-cups: new package: CUPS PPD compiler
Most printer drivers compile model-specific PPDs from a generic schema using ppdc during the build process. For this, ppdc must be able to find CUPS' internal include files in sysroot-target. Unfortunately, the CUPS build system is rather inflexible, so we have to build nearly everything to get a working ppdc. Signed-off-by: Roland Hieber --- rules/host-cups.in | 7 rules/host-cups.make | 108 +++ 2 files changed, 115 insertions(+) create mode 100644 rules/host-cups.in create mode 100644 rules/host-cups.make diff --git a/rules/host-cups.in b/rules/host-cups.in new file mode 100644 index 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..f45855d19 --- /dev/null +++ b/rules/host-cups.make @@ -0,0 +1,108 @@ +# -*-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 +# + +HOST_CUPS_CONF_ENV := $(HOST_ENV) + +# +# autoconf +# +# The --with-* options are only used to specify strings, --without-* does +# nothing. So we're omitting them here. The only exception is +# --with-components=core, which we are setting to only builds libcups* (which is +# needed by ppdc). +# +# We have to set --exec-prefix and --libdir, otherwise the libs end up in +# ${prefix}/lib64, which is not what we want. +# +HOST_CUPS_CONF_TOOL:= autoconf +HOST_CUPS_CONF_OPT := \ + $(HOST_AUTOCONF) \ + --exec-prefix=/usr/ \ + --libdir=/usr/lib/ \ + --disable-mallinfo \ + --disable-libpaper \ + --disable-libusb \ + --disable-tcp-wrappers \ + --disable-acl \ + --disable-dbus \ + --disable-libtool-unsupported \ + --disable-debug \ + --disable-debug-guards \ + --disable-debug-printfs \ + --disable-unit-tests \ + --disable-relro \ + --disable-gssapi \ + --disable-threads \ + --disable-ssl \ + --disable-cdsassl \ + --disable-gnutls \ + --disable-pam \ + --disable-largefile \ + --disable-avahi \ + --disable-dnssd \ + --disable-launchd \ + --disable-systemd \ + --disable-upstart \ + --disable-page-logging \ + --disable-browsing \ + --disable-default-shared \ + --disable-raw-printing \ + --disable-webif \ + --with-components=core + +# +# Install +# + +HOST_CUPS_MAKE_ENV := \ + DSTROOT=$(HOST_CUPS_PKGDIR) + +$(STATEDIR)/host-cups.install: + @$(call targetinfo) + + @$(call world/install, HOST_CUPS) + + @# ppdc isn't built by --with-components=core + $(MAKE) -C ${HOST_CUPS_DIR}/ppdc $(HOST_CUPS_MAKE_ENV) install + + @$(call touch) + +CROSS_PPDC = $(PTXDIST_SYSROOT_CROSS)/bin/ppdc +$(STATEDIR)/host-cups.install.post: + @$(call targetinfo) + @$(call world/install.post, HOST_CUPS) + + ( \ + echo '#!/bin/sh'; \ + echo 'LD_LIBRARY_PATH=$(PTXDIST_SYSROOT_HOST)/usr/lib $(PTXDIST_SYSROOT_HOST)/usr/bin/ppdc -I $(SYSROOT)/usr/share/cups/ppdc "$$@"'; \ + ) > $(CROSS_PPDC) + chmod +x $(CROSS_PPDC) + + @$(call touch) + +# +# Clean +# + +$(STATEDIR)/host-cups.clean: + @$(call targetinfo) + @$(call clean_pkg, HOST_CUPS) + rm -f $(CROSS_PPDC) + +# vim: ft=make ts=8 tw=80 -- 2.11.0 ___ ptxdist mailing list ptxdist@pengutronix.de