blob: 526389023976a38e3ff21d2b261fed4f28530378 [file] [log] [blame]
Patrick Williamsac13d5f2023-11-24 18:59:46 -06001# 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
12DESCRIPTION = "Gutenprint printer drivers"
13HOMEPAGE = "http://gimp-print.sourceforge.net/"
14LICENSE = "GPL-2.0-or-later"
15LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
16
17SRC_URI = "https://downloads.sourceforge.net/gimp-print/${BP}.tar.xz"
18SRC_URI[sha256sum] = "db44a701d2b8e6a8931c83cec06c91226be266d23e5c189d20a39dd175f2023b"
19
20inherit autotools gettext pkgconfig
21
22DEPENDS += "glib-2.0-native cups gutenprint-native tiff libusb libpng libjpeg-turbo ghostscript"
23# autogen.sh needs autopoint
24DEPENDS:class-native = "glib-2.0-native gettext-native"
25
26EXTRA_OECONF = "--without-doc --disable-test PERL=/usr/bin/perl"
27EXTRA_OECONF:append:class-native = " --without-cups"
28
29do_configure:prepend:class-target() {
30 # Disable the xmli18n-tmp.h rule
31 # It depend on the local build extract-strings, we are not able to run this
32 # So we are using the xmli18n-tmp.h created by gutenprint-native
33 sed -i 's/all-local: xmli18n-tmp.h xml-stamp/all-local: xml-stamp/' ${S}/src/xml/Makefile.am
34 sed -i 's/dist-hook: xmli18n-tmp.h xml-stamp/dist-hook: xml-stamp/' ${S}/src/xml/Makefile.am
35 sed -i '/$(AM_TESTS_ENVIRONMENT) .\/check_duplicate_printers.test/d' ${S}/src/xml/printers/Makefile.am
36 # Despite being a generated file, this needs to be in S.
37 cp ${STAGING_DATADIR_NATIVE}/gutenprint/xmli18n-tmp.h ${S}/src/xml/
38}
39
40do_install:append() {
41 # This file contains build paths and isn't very useful, remove it
42 rm -f ${D}${libdir}/gutenprint/*/config.summary
43 # Match ownership to cups
44 chgrp lp ${D}${sysconfdir}/cups
45}
46
47do_compile:class-native() {
48 oe_runmake -C ${B}/src/xml
49}
50
51do_install:class-native() {
52 install -d ${D}${datadir}/gutenprint/
53 install -m644 ${B}/src/xml/xmli18n-tmp.h ${D}${datadir}/gutenprint/
54}
55
56FILES:${PN} += "${datadir}/cups/*"
57RDEPENDS:${PN} = "perl"
58
59BBCLASSEXTEND = "native"
60
61# Pull in base-passwd for the lp user
62DEPENDS:append:class-target = " base-passwd"
63PACKAGE_WRITE_DEPS += "base-passwd"