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