diff options
3 files changed, 43 insertions, 81 deletions
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 @@ | |||
1 | # Recipe for building gutenprint-native | ||
2 | # | ||
3 | # Native part is for generating strings - xmli18n-tmp.h used by target recipe | ||
4 | # We don't depend on cups as this is for generating the string header. | ||
5 | # | ||
6 | # Copyright (c) Ambu A/S - All rights reserved | ||
7 | # SPDX-License-Identifier: MIT | ||
8 | # | ||
9 | # Author(s) | ||
10 | # clst@ambu.com (Claus Stovgaard) | ||
11 | # | ||
12 | |||
13 | require gutenprint.inc | ||
14 | |||
15 | # We could consider switching to BBCLASSEXTEND native instead of inherit | ||
16 | # Using devtool with this results in warning, as devtool append externalsrc to | ||
17 | # inheritance, making native not being inherited last. | ||
18 | inherit autotools-brokensep pkgconfig native | ||
19 | |||
20 | SECTION = "libs" | ||
21 | |||
22 | # binutils is for xz etc. | ||
23 | # gettext-native for configuration | ||
24 | # flex-native is used for compilation | ||
25 | # byacc-native is for yacc command (compilation) | ||
26 | DEPENDS += "binutils-native gettext-native flex-native byacc-native" | ||
27 | |||
28 | EXTRA_OECONF = "--without-doc --without-cups" | ||
29 | |||
30 | # gutenprint does not have a configure file in its root folder. | ||
31 | # Rather it has a autogen.sh in its root folder. We just use it | ||
32 | do_configure() { | ||
33 | ${S}/autogen.sh || bbnote "${PN} failed to autogen.sh" | ||
34 | oe_runconf | ||
35 | } | ||
36 | |||
37 | # Currently we only uses the string header, even though we compile the complete | ||
38 | # native version of the library. So we limit the install to the needed. | ||
39 | do_install() { | ||
40 | install -d ${D}${datadir}/gutenprint/ | ||
41 | install -m644 ${B}/src/xml/xmli18n-tmp.h ${D}${datadir}/gutenprint/ | ||
42 | } \ 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 @@ | |||
1 | # common part for gutenprint-native / gutenprint | ||
2 | # | ||
3 | # As we are using the native part for generating string header to the target | ||
4 | # version, it is important they use the same version. | ||
5 | # So we set the SRC_URI and SRCREV here. | ||
6 | # | ||
7 | # Copyright (c) Ambu A/S - All rights reserved | ||
8 | # SPDX-License-Identifier: MIT | ||
9 | # | ||
10 | # Author(s) | ||
11 | # clst@ambu.com (Claus Stovgaard) | ||
12 | # | ||
13 | |||
14 | DESCRIPTION = "Gutenprint printer drivers" | ||
15 | HOMEPAGE = "http://gimp-print.sourceforge.net/" | ||
16 | LICENSE = "GPL-2.0-or-later" | ||
17 | |||
18 | SRC_URI = "git://git.code.sf.net/p/gimp-print/source;protocol=https;branch=master" | ||
19 | SRCREV = "8e47dc44dd7738302ba9e8fbc1f918461fed0236" | ||
20 | S = "${WORKDIR}/git" | ||
21 | |||
22 | 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..d86858c85d 100644 --- a/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb +++ b/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb | |||
@@ -9,38 +9,64 @@ | |||
9 | # clst@ambu.com (Claus Stovgaard) | 9 | # clst@ambu.com (Claus Stovgaard) |
10 | # | 10 | # |
11 | 11 | ||
12 | require gutenprint.inc | 12 | DESCRIPTION = "Gutenprint printer drivers" |
13 | HOMEPAGE = "http://gimp-print.sourceforge.net/" | ||
14 | LICENSE = "GPL-2.0-or-later" | ||
13 | 15 | ||
14 | inherit autotools-brokensep pkgconfig | 16 | SRC_URI = "git://git.code.sf.net/p/gimp-print/source;protocol=https;branch=master" |
17 | SRCREV = "66b0a7bc3fd25659a3f295db0ebb39d04e413c01" | ||
18 | PV = "5.3.3+git${SRCPV}" | ||
15 | 19 | ||
16 | DEPENDS += "cups gutenprint-native" | 20 | S = "${WORKDIR}/git" |
17 | 21 | ||
18 | # cups-genppdupdate depend on perl | 22 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" |
19 | # We also set the path to PERL as else the version in hosttools would be used | ||
20 | # with full path | ||
21 | RDEPENDS:${PN} = "perl " | ||
22 | 23 | ||
23 | EXTRA_OECONF = "--without-doc --disable-test --disable-nls PERL=/usr/bin/perl" | 24 | inherit autotools gettext pkgconfig |
24 | 25 | ||
25 | # gutenprint does not have a configure file in its root folder. | 26 | DEPENDS += "glib-2.0-native cups gutenprint-native" |
26 | # Rather it has a autogen.sh in its root folder. We just use it | 27 | # autogen.sh needs autopoint |
27 | # together with adapting for cross compilation | 28 | DEPENDS:class-native = "glib-2.0-native gettext-native" |
28 | do_configure() { | 29 | |
30 | EXTRA_OECONF = "--without-doc --disable-test PERL=/usr/bin/perl" | ||
31 | EXTRA_OECONF:append:class-native = " --without-cups" | ||
32 | |||
33 | do_configure:prepend:class-target() { | ||
29 | # Disable the xmli18n-tmp.h rule | 34 | # Disable the xmli18n-tmp.h rule |
30 | # It depend on the local build extract-strings, we are not able to run this | 35 | # It depend on the local build extract-strings, we are not able to run this |
31 | # So we are using the xmli18n-tmp.h created by gutenprint-native | 36 | # So we are using the xmli18n-tmp.h created by gutenprint-native |
32 | sed -i 's/all-local: xmli18n-tmp.h xml-stamp/all-local: xml-stamp/' ${S}/src/xml/Makefile.am | 37 | sed -i 's/all-local: xmli18n-tmp.h xml-stamp/all-local: xml-stamp/' ${S}/src/xml/Makefile.am |
33 | sed -i 's/dist-hook: xmli18n-tmp.h xml-stamp/dist-hook: xml-stamp/' ${S}/src/xml/Makefile.am | 38 | sed -i 's/dist-hook: xmli18n-tmp.h xml-stamp/dist-hook: xml-stamp/' ${S}/src/xml/Makefile.am |
34 | cp ${RECIPE_SYSROOT_NATIVE}${datadir}/gutenprint/xmli18n-tmp.h ${S}/src/xml/ | 39 | # Despite being a generated file, this needs to be in S. |
40 | cp ${STAGING_DATADIR_NATIVE}/gutenprint/xmli18n-tmp.h ${S}/src/xml/ | ||
41 | } | ||
35 | 42 | ||
36 | ${S}/autogen.sh || bbnote "${PN} failed to autogen.sh" | 43 | do_configure() { |
44 | # Need to call autogen.sh as that creates m4/stp_release.m4 | ||
45 | cd ${S} | ||
46 | NOCONFIGURE=1 ./autogen.sh | ||
47 | cd ${B} | ||
37 | oe_runconf | 48 | oe_runconf |
38 | } | 49 | } |
39 | 50 | ||
40 | # gutenprint install the calibrate.ppm and net.sf.gimp-print.usb-quirks in | 51 | do_install:append() { |
41 | # /usr/share/cups | 52 | # This file contains build paths and isn't very useful, remove it |
53 | rm -f ${D}${libdir}/gutenprint/*/config.summary | ||
54 | } | ||
55 | |||
56 | do_compile:class-native() { | ||
57 | oe_runmake -C ${B}/src/xml | ||
58 | } | ||
59 | |||
60 | do_install:class-native() { | ||
61 | install -d ${D}${datadir}/gutenprint/ | ||
62 | install -m644 ${B}/src/xml/xmli18n-tmp.h ${D}${datadir}/gutenprint/ | ||
63 | } | ||
64 | |||
42 | FILES:${PN} += "${datadir}/cups/*" | 65 | FILES:${PN} += "${datadir}/cups/*" |
66 | RDEPENDS:${PN} = "perl" | ||
43 | 67 | ||
44 | # Install in /etc/cups when RPM needs DIRFILES to not conflict | 68 | # Install in /etc/cups when RPM needs DIRFILES to not conflict |
45 | # https://stackoverflow.com/questions/44762430/why-do-i-get-etc-cups-conflicts-between-attempted-installs-in-yocto | 69 | # https://stackoverflow.com/questions/44762430/why-do-i-get-etc-cups-conflicts-between-attempted-installs-in-yocto |
46 | DIRFILES = "1" \ No newline at end of file | 70 | DIRFILES = "1" |
71 | |||
72 | BBCLASSEXTEND = "native" | ||