Message ID | 20230523121831.1877208-3-ross.burton@arm.com |
---|---|
State | Under Review |
Headers | show |
Series | [1/3] hplip: build against libusb1 | expand |
seeing this error https://errors.yoctoproject.org/Errors/Details/704895/ On Tue, May 23, 2023 at 5:18 AM Ross Burton <ross.burton@arm.com> wrote: > > From: Ross Burton <ross.burton@arm.com> > > There hasn't been a gutenprint upgrade for quite a while, but a lot of > fixes upstream, so grab the latest SHA. > > This means we can now do out-of-tree builds, so drop the use of > autotools-brokensep. Also stop autogen.sh from running configure as we > run it again. > > Clean up build dependencies. > > Enable NLS, as there's no reason to disable it. > > Remove the explicit gutenprint-native recipe, instead use class extension > and build as little as possible in the native do_compile. > > Signed-off-by: Ross Burton <ross.burton@arm.com> > --- > .../gutenprint/gutenprint-native_git.bb | 42 ------------- > .../gutenprint/gutenprint.inc | 22 ------- > .../gutenprint/gutenprint_git.bb | 60 +++++++++++++------ > 3 files changed, 43 insertions(+), 81 deletions(-) > delete mode 100644 meta-oe/recipes-printing/gutenprint/gutenprint-native_git.bb > delete mode 100644 meta-oe/recipes-printing/gutenprint/gutenprint.inc > > diff --git a/meta-oe/recipes-printing/gutenprint/gutenprint-native_git.bb b/meta-oe/recipes-printing/gutenprint/gutenprint-native_git.bb > deleted file mode 100644 > index c6e00c340a..0000000000 > --- a/meta-oe/recipes-printing/gutenprint/gutenprint-native_git.bb > +++ /dev/null > @@ -1,42 +0,0 @@ > -# Recipe for building gutenprint-native > -# > -# Native part is for generating strings - xmli18n-tmp.h used by target recipe > -# We don't depend on cups as this is for generating the string header. > -# > -# Copyright (c) Ambu A/S - All rights reserved > -# SPDX-License-Identifier: MIT > -# > -# Author(s) > -# clst@ambu.com (Claus Stovgaard) > -# > - > -require gutenprint.inc > - > -# We could consider switching to BBCLASSEXTEND native instead of inherit > -# Using devtool with this results in warning, as devtool append externalsrc to > -# inheritance, making native not being inherited last. > -inherit autotools-brokensep pkgconfig native > - > -SECTION = "libs" > - > -# binutils is for xz etc. > -# gettext-native for configuration > -# flex-native is used for compilation > -# byacc-native is for yacc command (compilation) > -DEPENDS += "binutils-native gettext-native flex-native byacc-native" > - > -EXTRA_OECONF = "--without-doc --without-cups" > - > -# gutenprint does not have a configure file in its root folder. > -# Rather it has a autogen.sh in its root folder. We just use it > -do_configure() { > - ${S}/autogen.sh || bbnote "${PN} failed to autogen.sh" > - oe_runconf > -} > - > -# Currently we only uses the string header, even though we compile the complete > -# native version of the library. So we limit the install to the needed. > -do_install() { > - install -d ${D}${datadir}/gutenprint/ > - install -m644 ${B}/src/xml/xmli18n-tmp.h ${D}${datadir}/gutenprint/ > -} > \ No newline at end of file > diff --git a/meta-oe/recipes-printing/gutenprint/gutenprint.inc b/meta-oe/recipes-printing/gutenprint/gutenprint.inc > deleted file mode 100644 > index 1f712585f7..0000000000 > --- a/meta-oe/recipes-printing/gutenprint/gutenprint.inc > +++ /dev/null > @@ -1,22 +0,0 @@ > -# common part for gutenprint-native / gutenprint > -# > -# As we are using the native part for generating string header to the target > -# version, it is important they use the same version. > -# So we set the SRC_URI and SRCREV here. > -# > -# Copyright (c) Ambu A/S - All rights reserved > -# SPDX-License-Identifier: MIT > -# > -# Author(s) > -# clst@ambu.com (Claus Stovgaard) > -# > - > -DESCRIPTION = "Gutenprint printer drivers" > -HOMEPAGE = "http://gimp-print.sourceforge.net/" > -LICENSE = "GPL-2.0-or-later" > - > -SRC_URI = "git://git.code.sf.net/p/gimp-print/source;protocol=https;branch=master" > -SRCREV = "8e47dc44dd7738302ba9e8fbc1f918461fed0236" > -S = "${WORKDIR}/git" > - > -LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" > \ No newline at end of file > diff --git a/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb b/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb > index 7779793948..abdd3d5e40 100644 > --- a/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb > +++ b/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb > @@ -9,38 +9,64 @@ > # clst@ambu.com (Claus Stovgaard) > # > > -require gutenprint.inc > +DESCRIPTION = "Gutenprint printer drivers" > +HOMEPAGE = "http://gimp-print.sourceforge.net/" > +LICENSE = "GPL-2.0-or-later" > > -inherit autotools-brokensep pkgconfig > +SRC_URI = "git://git.code.sf.net/p/gimp-print/source;protocol=https;branch=master" > +SRCREV = "66b0a7bc3fd25659a3f295db0ebb39d04e413c01" > +PV = "5.3.3+git${SRCPV}" > > -DEPENDS += "cups gutenprint-native" > +S = "${WORKDIR}/git" > > -# cups-genppdupdate depend on perl > -# We also set the path to PERL as else the version in hosttools would be used > -# with full path > -RDEPENDS:${PN} = "perl " > +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" > > -EXTRA_OECONF = "--without-doc --disable-test --disable-nls PERL=/usr/bin/perl" > +inherit autotools gettext pkgconfig > > -# gutenprint does not have a configure file in its root folder. > -# Rather it has a autogen.sh in its root folder. We just use it > -# together with adapting for cross compilation > -do_configure() { > +DEPENDS += "cups gutenprint-native" > +# autogen.sh needs autopoint > +DEPENDS:class-native = "gettext-native" > + > +EXTRA_OECONF = "--without-doc --disable-test PERL=/usr/bin/perl" > +EXTRA_OECONF:append:class-native = " --without-cups" > + > +do_configure:prepend:class-target() { > # Disable the xmli18n-tmp.h rule > # It depend on the local build extract-strings, we are not able to run this > # So we are using the xmli18n-tmp.h created by gutenprint-native > sed -i 's/all-local: xmli18n-tmp.h xml-stamp/all-local: xml-stamp/' ${S}/src/xml/Makefile.am > sed -i 's/dist-hook: xmli18n-tmp.h xml-stamp/dist-hook: xml-stamp/' ${S}/src/xml/Makefile.am > - cp ${RECIPE_SYSROOT_NATIVE}${datadir}/gutenprint/xmli18n-tmp.h ${S}/src/xml/ > + # Despite being a generated file, this needs to be in S. > + cp ${STAGING_DATADIR_NATIVE}/gutenprint/xmli18n-tmp.h ${S}/src/xml/ > +} > > - ${S}/autogen.sh || bbnote "${PN} failed to autogen.sh" > +do_configure() { > + # Need to call autogen.sh as that creates m4/stp_release.m4 > + cd ${S} > + NOCONFIGURE=1 ./autogen.sh > + cd ${B} > oe_runconf > } > > -# gutenprint install the calibrate.ppm and net.sf.gimp-print.usb-quirks in > -# /usr/share/cups > +do_install:append() { > + # This file contains build paths and isn't very useful, remove it > + rm -f ${D}${libdir}/gutenprint/*/config.summary > +} > + > +do_compile:class-native() { > + oe_runmake -C ${B}/src/xml > +} > + > +do_install:class-native() { > + install -d ${D}${datadir}/gutenprint/ > + install -m644 ${B}/src/xml/xmli18n-tmp.h ${D}${datadir}/gutenprint/ > +} > + > FILES:${PN} += "${datadir}/cups/*" > +RDEPENDS:${PN} = "perl" > > # Install in /etc/cups when RPM needs DIRFILES to not conflict > # https://stackoverflow.com/questions/44762430/why-do-i-get-etc-cups-conflicts-between-attempted-installs-in-yocto > -DIRFILES = "1" > \ No newline at end of file > +DIRFILES = "1" > + > +BBCLASSEXTEND = "native" > -- > 2.34.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#102734): https://lists.openembedded.org/g/openembedded-devel/message/102734 > Mute This Topic: https://lists.openembedded.org/mt/99085728/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
also this https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2767 On Tue, May 23, 2023 at 10:56 PM Khem Raj <raj.khem@gmail.com> wrote: > > seeing this error > > https://errors.yoctoproject.org/Errors/Details/704895/ > > On Tue, May 23, 2023 at 5:18 AM Ross Burton <ross.burton@arm.com> wrote: > > > > From: Ross Burton <ross.burton@arm.com> > > > > There hasn't been a gutenprint upgrade for quite a while, but a lot of > > fixes upstream, so grab the latest SHA. > > > > This means we can now do out-of-tree builds, so drop the use of > > autotools-brokensep. Also stop autogen.sh from running configure as we > > run it again. > > > > Clean up build dependencies. > > > > Enable NLS, as there's no reason to disable it. > > > > Remove the explicit gutenprint-native recipe, instead use class extension > > and build as little as possible in the native do_compile. > > > > Signed-off-by: Ross Burton <ross.burton@arm.com> > > --- > > .../gutenprint/gutenprint-native_git.bb | 42 ------------- > > .../gutenprint/gutenprint.inc | 22 ------- > > .../gutenprint/gutenprint_git.bb | 60 +++++++++++++------ > > 3 files changed, 43 insertions(+), 81 deletions(-) > > delete mode 100644 meta-oe/recipes-printing/gutenprint/gutenprint-native_git.bb > > delete mode 100644 meta-oe/recipes-printing/gutenprint/gutenprint.inc > > > > diff --git a/meta-oe/recipes-printing/gutenprint/gutenprint-native_git.bb b/meta-oe/recipes-printing/gutenprint/gutenprint-native_git.bb > > deleted file mode 100644 > > index c6e00c340a..0000000000 > > --- a/meta-oe/recipes-printing/gutenprint/gutenprint-native_git.bb > > +++ /dev/null > > @@ -1,42 +0,0 @@ > > -# Recipe for building gutenprint-native > > -# > > -# Native part is for generating strings - xmli18n-tmp.h used by target recipe > > -# We don't depend on cups as this is for generating the string header. > > -# > > -# Copyright (c) Ambu A/S - All rights reserved > > -# SPDX-License-Identifier: MIT > > -# > > -# Author(s) > > -# clst@ambu.com (Claus Stovgaard) > > -# > > - > > -require gutenprint.inc > > - > > -# We could consider switching to BBCLASSEXTEND native instead of inherit > > -# Using devtool with this results in warning, as devtool append externalsrc to > > -# inheritance, making native not being inherited last. > > -inherit autotools-brokensep pkgconfig native > > - > > -SECTION = "libs" > > - > > -# binutils is for xz etc. > > -# gettext-native for configuration > > -# flex-native is used for compilation > > -# byacc-native is for yacc command (compilation) > > -DEPENDS += "binutils-native gettext-native flex-native byacc-native" > > - > > -EXTRA_OECONF = "--without-doc --without-cups" > > - > > -# gutenprint does not have a configure file in its root folder. > > -# Rather it has a autogen.sh in its root folder. We just use it > > -do_configure() { > > - ${S}/autogen.sh || bbnote "${PN} failed to autogen.sh" > > - oe_runconf > > -} > > - > > -# Currently we only uses the string header, even though we compile the complete > > -# native version of the library. So we limit the install to the needed. > > -do_install() { > > - install -d ${D}${datadir}/gutenprint/ > > - install -m644 ${B}/src/xml/xmli18n-tmp.h ${D}${datadir}/gutenprint/ > > -} > > \ No newline at end of file > > diff --git a/meta-oe/recipes-printing/gutenprint/gutenprint.inc b/meta-oe/recipes-printing/gutenprint/gutenprint.inc > > deleted file mode 100644 > > index 1f712585f7..0000000000 > > --- a/meta-oe/recipes-printing/gutenprint/gutenprint.inc > > +++ /dev/null > > @@ -1,22 +0,0 @@ > > -# common part for gutenprint-native / gutenprint > > -# > > -# As we are using the native part for generating string header to the target > > -# version, it is important they use the same version. > > -# So we set the SRC_URI and SRCREV here. > > -# > > -# Copyright (c) Ambu A/S - All rights reserved > > -# SPDX-License-Identifier: MIT > > -# > > -# Author(s) > > -# clst@ambu.com (Claus Stovgaard) > > -# > > - > > -DESCRIPTION = "Gutenprint printer drivers" > > -HOMEPAGE = "http://gimp-print.sourceforge.net/" > > -LICENSE = "GPL-2.0-or-later" > > - > > -SRC_URI = "git://git.code.sf.net/p/gimp-print/source;protocol=https;branch=master" > > -SRCREV = "8e47dc44dd7738302ba9e8fbc1f918461fed0236" > > -S = "${WORKDIR}/git" > > - > > -LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" > > \ No newline at end of file > > diff --git a/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb b/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb > > index 7779793948..abdd3d5e40 100644 > > --- a/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb > > +++ b/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb > > @@ -9,38 +9,64 @@ > > # clst@ambu.com (Claus Stovgaard) > > # > > > > -require gutenprint.inc > > +DESCRIPTION = "Gutenprint printer drivers" > > +HOMEPAGE = "http://gimp-print.sourceforge.net/" > > +LICENSE = "GPL-2.0-or-later" > > > > -inherit autotools-brokensep pkgconfig > > +SRC_URI = "git://git.code.sf.net/p/gimp-print/source;protocol=https;branch=master" > > +SRCREV = "66b0a7bc3fd25659a3f295db0ebb39d04e413c01" > > +PV = "5.3.3+git${SRCPV}" > > > > -DEPENDS += "cups gutenprint-native" > > +S = "${WORKDIR}/git" > > > > -# cups-genppdupdate depend on perl > > -# We also set the path to PERL as else the version in hosttools would be used > > -# with full path > > -RDEPENDS:${PN} = "perl " > > +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" > > > > -EXTRA_OECONF = "--without-doc --disable-test --disable-nls PERL=/usr/bin/perl" > > +inherit autotools gettext pkgconfig > > > > -# gutenprint does not have a configure file in its root folder. > > -# Rather it has a autogen.sh in its root folder. We just use it > > -# together with adapting for cross compilation > > -do_configure() { > > +DEPENDS += "cups gutenprint-native" > > +# autogen.sh needs autopoint > > +DEPENDS:class-native = "gettext-native" > > + > > +EXTRA_OECONF = "--without-doc --disable-test PERL=/usr/bin/perl" > > +EXTRA_OECONF:append:class-native = " --without-cups" > > + > > +do_configure:prepend:class-target() { > > # Disable the xmli18n-tmp.h rule > > # It depend on the local build extract-strings, we are not able to run this > > # So we are using the xmli18n-tmp.h created by gutenprint-native > > sed -i 's/all-local: xmli18n-tmp.h xml-stamp/all-local: xml-stamp/' ${S}/src/xml/Makefile.am > > sed -i 's/dist-hook: xmli18n-tmp.h xml-stamp/dist-hook: xml-stamp/' ${S}/src/xml/Makefile.am > > - cp ${RECIPE_SYSROOT_NATIVE}${datadir}/gutenprint/xmli18n-tmp.h ${S}/src/xml/ > > + # Despite being a generated file, this needs to be in S. > > + cp ${STAGING_DATADIR_NATIVE}/gutenprint/xmli18n-tmp.h ${S}/src/xml/ > > +} > > > > - ${S}/autogen.sh || bbnote "${PN} failed to autogen.sh" > > +do_configure() { > > + # Need to call autogen.sh as that creates m4/stp_release.m4 > > + cd ${S} > > + NOCONFIGURE=1 ./autogen.sh > > + cd ${B} > > oe_runconf > > } > > > > -# gutenprint install the calibrate.ppm and net.sf.gimp-print.usb-quirks in > > -# /usr/share/cups > > +do_install:append() { > > + # This file contains build paths and isn't very useful, remove it > > + rm -f ${D}${libdir}/gutenprint/*/config.summary > > +} > > + > > +do_compile:class-native() { > > + oe_runmake -C ${B}/src/xml > > +} > > + > > +do_install:class-native() { > > + install -d ${D}${datadir}/gutenprint/ > > + install -m644 ${B}/src/xml/xmli18n-tmp.h ${D}${datadir}/gutenprint/ > > +} > > + > > FILES:${PN} += "${datadir}/cups/*" > > +RDEPENDS:${PN} = "perl" > > > > # Install in /etc/cups when RPM needs DIRFILES to not conflict > > # https://stackoverflow.com/questions/44762430/why-do-i-get-etc-cups-conflicts-between-attempted-installs-in-yocto > > -DIRFILES = "1" > > \ No newline at end of file > > +DIRFILES = "1" > > + > > +BBCLASSEXTEND = "native" > > -- > > 2.34.1 > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#102734): https://lists.openembedded.org/g/openembedded-devel/message/102734 > > Mute This Topic: https://lists.openembedded.org/mt/99085728/1997914 > > Group Owner: openembedded-devel+owner@lists.openembedded.org > > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > > -=-=-=-=-=-=-=-=-=-=-=- > >
On 24 May 2023, at 06:56, Khem Raj <raj.khem@gmail.com> wrote: > seeing this error > > https://errors.yoctoproject.org/Errors/Details/704895/ No idea how this works for me, as it’s trying to find glib-mkenums that isn’t installed anywhere. I’ve a feeling it is somehow escaping from the hosttools and finding binaries on the host, which is worrying. Anyway, fixed with a DEPENDS. > also this > > https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2767 Well that’s embarrassing. Re-arranged some lines before posting and managed to delete critical whitespace. v2 sent, sorry. Ross
diff --git a/meta-oe/recipes-printing/gutenprint/gutenprint-native_git.bb b/meta-oe/recipes-printing/gutenprint/gutenprint-native_git.bb deleted file mode 100644 index c6e00c340a..0000000000 --- a/meta-oe/recipes-printing/gutenprint/gutenprint-native_git.bb +++ /dev/null @@ -1,42 +0,0 @@ -# Recipe for building gutenprint-native -# -# Native part is for generating strings - xmli18n-tmp.h used by target recipe -# We don't depend on cups as this is for generating the string header. -# -# Copyright (c) Ambu A/S - All rights reserved -# SPDX-License-Identifier: MIT -# -# Author(s) -# clst@ambu.com (Claus Stovgaard) -# - -require gutenprint.inc - -# We could consider switching to BBCLASSEXTEND native instead of inherit -# Using devtool with this results in warning, as devtool append externalsrc to -# inheritance, making native not being inherited last. -inherit autotools-brokensep pkgconfig native - -SECTION = "libs" - -# binutils is for xz etc. -# gettext-native for configuration -# flex-native is used for compilation -# byacc-native is for yacc command (compilation) -DEPENDS += "binutils-native gettext-native flex-native byacc-native" - -EXTRA_OECONF = "--without-doc --without-cups" - -# gutenprint does not have a configure file in its root folder. -# Rather it has a autogen.sh in its root folder. We just use it -do_configure() { - ${S}/autogen.sh || bbnote "${PN} failed to autogen.sh" - oe_runconf -} - -# Currently we only uses the string header, even though we compile the complete -# native version of the library. So we limit the install to the needed. -do_install() { - install -d ${D}${datadir}/gutenprint/ - install -m644 ${B}/src/xml/xmli18n-tmp.h ${D}${datadir}/gutenprint/ -} \ No newline at end of file diff --git a/meta-oe/recipes-printing/gutenprint/gutenprint.inc b/meta-oe/recipes-printing/gutenprint/gutenprint.inc deleted file mode 100644 index 1f712585f7..0000000000 --- a/meta-oe/recipes-printing/gutenprint/gutenprint.inc +++ /dev/null @@ -1,22 +0,0 @@ -# common part for gutenprint-native / gutenprint -# -# As we are using the native part for generating string header to the target -# version, it is important they use the same version. -# So we set the SRC_URI and SRCREV here. -# -# Copyright (c) Ambu A/S - All rights reserved -# SPDX-License-Identifier: MIT -# -# Author(s) -# clst@ambu.com (Claus Stovgaard) -# - -DESCRIPTION = "Gutenprint printer drivers" -HOMEPAGE = "http://gimp-print.sourceforge.net/" -LICENSE = "GPL-2.0-or-later" - -SRC_URI = "git://git.code.sf.net/p/gimp-print/source;protocol=https;branch=master" -SRCREV = "8e47dc44dd7738302ba9e8fbc1f918461fed0236" -S = "${WORKDIR}/git" - -LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" \ No newline at end of file diff --git a/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb b/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb index 7779793948..abdd3d5e40 100644 --- a/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb +++ b/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb @@ -9,38 +9,64 @@ # clst@ambu.com (Claus Stovgaard) # -require gutenprint.inc +DESCRIPTION = "Gutenprint printer drivers" +HOMEPAGE = "http://gimp-print.sourceforge.net/" +LICENSE = "GPL-2.0-or-later" -inherit autotools-brokensep pkgconfig +SRC_URI = "git://git.code.sf.net/p/gimp-print/source;protocol=https;branch=master" +SRCREV = "66b0a7bc3fd25659a3f295db0ebb39d04e413c01" +PV = "5.3.3+git${SRCPV}" -DEPENDS += "cups gutenprint-native" +S = "${WORKDIR}/git" -# cups-genppdupdate depend on perl -# We also set the path to PERL as else the version in hosttools would be used -# with full path -RDEPENDS:${PN} = "perl " +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" -EXTRA_OECONF = "--without-doc --disable-test --disable-nls PERL=/usr/bin/perl" +inherit autotools gettext pkgconfig -# gutenprint does not have a configure file in its root folder. -# Rather it has a autogen.sh in its root folder. We just use it -# together with adapting for cross compilation -do_configure() { +DEPENDS += "cups gutenprint-native" +# autogen.sh needs autopoint +DEPENDS:class-native = "gettext-native" + +EXTRA_OECONF = "--without-doc --disable-test PERL=/usr/bin/perl" +EXTRA_OECONF:append:class-native = " --without-cups" + +do_configure:prepend:class-target() { # Disable the xmli18n-tmp.h rule # It depend on the local build extract-strings, we are not able to run this # So we are using the xmli18n-tmp.h created by gutenprint-native sed -i 's/all-local: xmli18n-tmp.h xml-stamp/all-local: xml-stamp/' ${S}/src/xml/Makefile.am sed -i 's/dist-hook: xmli18n-tmp.h xml-stamp/dist-hook: xml-stamp/' ${S}/src/xml/Makefile.am - cp ${RECIPE_SYSROOT_NATIVE}${datadir}/gutenprint/xmli18n-tmp.h ${S}/src/xml/ + # Despite being a generated file, this needs to be in S. + cp ${STAGING_DATADIR_NATIVE}/gutenprint/xmli18n-tmp.h ${S}/src/xml/ +} - ${S}/autogen.sh || bbnote "${PN} failed to autogen.sh" +do_configure() { + # Need to call autogen.sh as that creates m4/stp_release.m4 + cd ${S} + NOCONFIGURE=1 ./autogen.sh + cd ${B} oe_runconf } -# gutenprint install the calibrate.ppm and net.sf.gimp-print.usb-quirks in -# /usr/share/cups +do_install:append() { + # This file contains build paths and isn't very useful, remove it + rm -f ${D}${libdir}/gutenprint/*/config.summary +} + +do_compile:class-native() { + oe_runmake -C ${B}/src/xml +} + +do_install:class-native() { + install -d ${D}${datadir}/gutenprint/ + install -m644 ${B}/src/xml/xmli18n-tmp.h ${D}${datadir}/gutenprint/ +} + FILES:${PN} += "${datadir}/cups/*" +RDEPENDS:${PN} = "perl" # Install in /etc/cups when RPM needs DIRFILES to not conflict # https://stackoverflow.com/questions/44762430/why-do-i-get-etc-cups-conflicts-between-attempted-installs-in-yocto -DIRFILES = "1" \ No newline at end of file +DIRFILES = "1" + +BBCLASSEXTEND = "native"