Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 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 | |
| 12 | DESCRIPTION = "Gutenprint printer drivers" |
| 13 | HOMEPAGE = "http://gimp-print.sourceforge.net/" |
| 14 | LICENSE = "GPL-2.0-or-later" |
| 15 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" |
| 16 | |
| 17 | SRC_URI = "https://downloads.sourceforge.net/gimp-print/${BP}.tar.xz" |
| 18 | SRC_URI[sha256sum] = "db44a701d2b8e6a8931c83cec06c91226be266d23e5c189d20a39dd175f2023b" |
| 19 | |
| 20 | inherit autotools gettext pkgconfig |
| 21 | |
| 22 | DEPENDS += "glib-2.0-native cups gutenprint-native tiff libusb libpng libjpeg-turbo ghostscript" |
| 23 | # autogen.sh needs autopoint |
| 24 | DEPENDS:class-native = "glib-2.0-native gettext-native" |
| 25 | |
| 26 | EXTRA_OECONF = "--without-doc --disable-test PERL=/usr/bin/perl" |
| 27 | EXTRA_OECONF:append:class-native = " --without-cups" |
| 28 | |
| 29 | do_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 | |
| 40 | do_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 | |
| 47 | do_compile:class-native() { |
| 48 | oe_runmake -C ${B}/src/xml |
| 49 | } |
| 50 | |
| 51 | do_install:class-native() { |
| 52 | install -d ${D}${datadir}/gutenprint/ |
| 53 | install -m644 ${B}/src/xml/xmli18n-tmp.h ${D}${datadir}/gutenprint/ |
| 54 | } |
| 55 | |
| 56 | FILES:${PN} += "${datadir}/cups/*" |
| 57 | RDEPENDS:${PN} = "perl" |
| 58 | |
| 59 | BBCLASSEXTEND = "native" |
| 60 | |
| 61 | # Pull in base-passwd for the lp user |
| 62 | DEPENDS:append:class-target = " base-passwd" |
| 63 | PACKAGE_WRITE_DEPS += "base-passwd" |