1*4882a593Smuzhiyun# Recipe for building gutenprint 2*4882a593Smuzhiyun# 3*4882a593Smuzhiyun# Uses the gutenprint-native extracted strings and disable local build stuff 4*4882a593Smuzhiyun# 5*4882a593Smuzhiyun# Copyright (c) Ambu A/S - All rights reserved 6*4882a593Smuzhiyun# SPDX-License-Identifier: MIT 7*4882a593Smuzhiyun# 8*4882a593Smuzhiyun# Author(s) 9*4882a593Smuzhiyun# clst@ambu.com (Claus Stovgaard) 10*4882a593Smuzhiyun# 11*4882a593Smuzhiyun 12*4882a593Smuzhiyunrequire gutenprint.inc 13*4882a593Smuzhiyun 14*4882a593Smuzhiyuninherit autotools-brokensep pkgconfig 15*4882a593Smuzhiyun 16*4882a593SmuzhiyunDEPENDS += "cups gutenprint-native" 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun# cups-genppdupdate depend on perl 19*4882a593Smuzhiyun# We also set the path to PERL as else the version in hosttools would be used 20*4882a593Smuzhiyun# with full path 21*4882a593SmuzhiyunRDEPENDS:${PN} = "perl " 22*4882a593Smuzhiyun 23*4882a593SmuzhiyunEXTRA_OECONF = "--without-doc --disable-test --disable-nls PERL=/usr/bin/perl" 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun# gutenprint does not have a configure file in its root folder. 26*4882a593Smuzhiyun# Rather it has a autogen.sh in its root folder. We just use it 27*4882a593Smuzhiyun# together with adapting for cross compilation 28*4882a593Smuzhiyundo_configure() { 29*4882a593Smuzhiyun # Disable the xmli18n-tmp.h rule 30*4882a593Smuzhiyun # It depend on the local build extract-strings, we are not able to run this 31*4882a593Smuzhiyun # So we are using the xmli18n-tmp.h created by gutenprint-native 32*4882a593Smuzhiyun sed -i 's/all-local: xmli18n-tmp.h xml-stamp/all-local: xml-stamp/' ${S}/src/xml/Makefile.am 33*4882a593Smuzhiyun sed -i 's/dist-hook: xmli18n-tmp.h xml-stamp/dist-hook: xml-stamp/' ${S}/src/xml/Makefile.am 34*4882a593Smuzhiyun cp ${RECIPE_SYSROOT_NATIVE}${datadir}/gutenprint/xmli18n-tmp.h ${S}/src/xml/ 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun ${S}/autogen.sh || bbnote "${PN} failed to autogen.sh" 37*4882a593Smuzhiyun oe_runconf 38*4882a593Smuzhiyun} 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun# gutenprint install the calibrate.ppm and net.sf.gimp-print.usb-quirks in 41*4882a593Smuzhiyun# /usr/share/cups 42*4882a593SmuzhiyunFILES:${PN} += "${datadir}/cups/*" 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun# Install in /etc/cups when RPM needs DIRFILES to not conflict 45*4882a593Smuzhiyun# https://stackoverflow.com/questions/44762430/why-do-i-get-etc-cups-conflicts-between-attempted-installs-in-yocto 46*4882a593SmuzhiyunDIRFILES = "1"