gutenprint_5.3.4.bb 2.2 KB

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