summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaus Stovgaard <clst@ambu.com>2021-12-21 22:49:03 +0100
committerKhem Raj <raj.khem@gmail.com>2021-12-21 18:49:37 -0800
commit83bb0c483f9021374187fc54bee0234656832cf8 (patch)
tree22e3d1b65df0047e6d0a422421573fa4ee600614
parent6a271fd4289c27f1291739e7c9874dbe6e0c2d6d (diff)
downloadmeta-openembedded-83bb0c483f9021374187fc54bee0234656832cf8.tar.gz
Add gutenprint to meta-oe
According to wiki more than 1300 printer drivers. Specifically the CUPS dye-sublimation backend, used in industrial and medical is a nice fit when using Yocto for embedded solutions targeting this segment. As the gutenprint code generate a tool for string management, the native recipe is designed to just create the output from this tool (a header file). So the cross compatible version is depending on native version. Thought about using BBCLASSEXTEND instead of separate files. Though as the purpose of the two recipes is different (one for generating header file, the other for generating the actual lib) and different dependencies I decided to keep it as two recipes. Signed-off-by: Claus Stovgaard <clst@ambu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-printing/gutenprint/gutenprint-native_git.bb42
-rw-r--r--meta-oe/recipes-printing/gutenprint/gutenprint.inc22
-rw-r--r--meta-oe/recipes-printing/gutenprint/gutenprint_git.bb46
3 files changed, 110 insertions, 0 deletions
diff --git a/meta-oe/recipes-printing/gutenprint/gutenprint-native_git.bb b/meta-oe/recipes-printing/gutenprint/gutenprint-native_git.bb
new file mode 100644
index 0000000000..c6e00c340a
--- /dev/null
+++ b/meta-oe/recipes-printing/gutenprint/gutenprint-native_git.bb
@@ -0,0 +1,42 @@
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
13require 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.
18inherit autotools-brokensep pkgconfig native
19
20SECTION = "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)
26DEPENDS += "binutils-native gettext-native flex-native byacc-native"
27
28EXTRA_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
32do_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.
39do_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
new file mode 100644
index 0000000000..0a162d2b59
--- /dev/null
+++ b/meta-oe/recipes-printing/gutenprint/gutenprint.inc
@@ -0,0 +1,22 @@
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
14DESCRIPTION = "Gutenprint printer drivers"
15HOMEPAGE = "http://gimp-print.sourceforge.net/"
16LICENSE = "GPLv2+"
17
18SRC_URI = "git://git.code.sf.net/p/gimp-print/source;protocol=https;branch=master"
19SRCREV = "8e47dc44dd7738302ba9e8fbc1f918461fed0236"
20S = "${WORKDIR}/git"
21
22LIC_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
new file mode 100644
index 0000000000..7779793948
--- /dev/null
+++ b/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb
@@ -0,0 +1,46 @@
1# Recipe for building gutenprint
2#
3# Uses the gutenprint-native extracted strings and disable local build stuff
4#
5# Copyright (c) Ambu A/S - All rights reserved
6# SPDX-License-Identifier: MIT
7#
8# Author(s)
9# clst@ambu.com (Claus Stovgaard)
10#
11
12require gutenprint.inc
13
14inherit autotools-brokensep pkgconfig
15
16DEPENDS += "cups gutenprint-native"
17
18# cups-genppdupdate depend on perl
19# We also set the path to PERL as else the version in hosttools would be used
20# with full path
21RDEPENDS:${PN} = "perl "
22
23EXTRA_OECONF = "--without-doc --disable-test --disable-nls PERL=/usr/bin/perl"
24
25# gutenprint does not have a configure file in its root folder.
26# Rather it has a autogen.sh in its root folder. We just use it
27# together with adapting for cross compilation
28do_configure() {
29 # Disable the xmli18n-tmp.h rule
30 # 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
32 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
34 cp ${RECIPE_SYSROOT_NATIVE}${datadir}/gutenprint/xmli18n-tmp.h ${S}/src/xml/
35
36 ${S}/autogen.sh || bbnote "${PN} failed to autogen.sh"
37 oe_runconf
38}
39
40# gutenprint install the calibrate.ppm and net.sf.gimp-print.usb-quirks in
41# /usr/share/cups
42FILES:${PN} += "${datadir}/cups/*"
43
44# 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
46DIRFILES = "1" \ No newline at end of file