0001-use-pregen-xmli18n-header.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. src/xml: use preg-gen xmli18n_tmp.h if specified
  2. Ideally, the programs needed at build-time should be built with
  3. CC_FOR_BUILD, and not with CC_FOR_HOST.
  4. Unfortunately, this program wants to link against the gutenprint libs,
  5. so we would also need to build them with CC_FOR_HOST, that is build them
  6. twice, once for build, once for host.
  7. Instead, in the Buildroot context, we first build gutenprint for the build
  8. system, use that to generate the incriminated header, and then re-use that
  9. header to build the gutenprint for the host.
  10. It is not possible to have such constructs in Makefile.am:
  11. ifeq ($(FOO),)
  12. bar: bla
  13. cat $< >$@
  14. else
  15. bar:
  16. echo $(FOO) >$@
  17. endif
  18. as autoreconf will yell loudly that there is an 'endif' without an 'if'.
  19. Sigh... :-(
  20. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
  21. diff -durN gutenprint-5.2.9.orig/src/xml/Makefile.am gutenprint-5.2.9/src/xml/Makefile.am
  22. --- gutenprint-5.2.9.orig/src/xml/Makefile.am 2011-03-30 02:43:24.000000000 +0200
  23. +++ gutenprint-5.2.9/src/xml/Makefile.am 2013-03-24 17:08:08.435918773 +0100
  24. @@ -52,10 +52,13 @@
  25. xmli18n-tmp.h: xml-stamp extract-strings
  26. - -rm -f $@ $@.tmp
  27. - ./extract-strings `cat xml-stamp | sed -e 's;^;$(srcdir)/;'` > $@.tmp
  28. - mv $@.tmp $@
  29. -
  30. + if [ -z "$(BR2_USE_PREGEN_XMLI18N_TMP_H)" ]; then \
  31. + rm -f $@ $@.tmp; \
  32. + ./extract-strings `cat xml-stamp | sed -e 's;^;$(srcdir)/;'` > $@.tmp; \
  33. + mv $@.tmp $@; \
  34. + else \
  35. + cp $(BR2_USE_PREGEN_XMLI18N_TMP_H) $@; \
  36. + fi
  37. dist-hook: xmli18n-tmp.h xml-stamp
  38. # xmli18n-tmp.h is needed by po/POTFILES.in at dist time