summaryrefslogtreecommitdiffstats
path: root/package/gutenprint/gutenprint-000-use-pregen-xmli18n-header.patch
diff options
context:
space:
mode:
authorOlivier Schonken <olivier.schonken@gmail.com>2013-03-25 13:27:59 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2013-03-26 23:09:32 +0100
commite5407614efabd9a6a3d8277e9567fe412f459fbf (patch)
treead736d3d606b178c5af08e31757992a00aea4440 /package/gutenprint/gutenprint-000-use-pregen-xmli18n-header.patch
parent2320f6a309c405124aa3958948c3577378d07968 (diff)
downloadbuildroot-novena-e5407614efabd9a6a3d8277e9567fe412f459fbf.tar.gz
buildroot-novena-e5407614efabd9a6a3d8277e9567fe412f459fbf.zip
package: add gutenprint
Gutenprint, formerly named Gimp-Print, is a suite of printer drivers that may be used with most common UNIX print spooling systems, including CUPS, lpr, LPRng, or others [Peter: needs host-pkgconf] Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com> [yann.morin.1998@free.fr: needs libiconv, cleanup] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/gutenprint/gutenprint-000-use-pregen-xmli18n-header.patch')
-rw-r--r--package/gutenprint/gutenprint-000-use-pregen-xmli18n-header.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/package/gutenprint/gutenprint-000-use-pregen-xmli18n-header.patch b/package/gutenprint/gutenprint-000-use-pregen-xmli18n-header.patch
new file mode 100644
index 000000000..533fe33d8
--- /dev/null
+++ b/package/gutenprint/gutenprint-000-use-pregen-xmli18n-header.patch
@@ -0,0 +1,48 @@
+src/xml: use preg-gen xmli18n_tmp.h if specified
+
+Ideally, the programs needed at build-time should be built with
+CC_FOR_BUILD, and not with CC_FOR_HOST.
+
+Unfortunately, this program wants to link against the gutenprint libs,
+so we would also need to build them with CC_FOR_HOST, that is build them
+twice, once for build, once for host.
+
+Instead, in the Buildroot context, we first build gutenprint for the build
+system, use that to generate the incriminated header, and then re-use that
+header to build the gutenprint for the host.
+
+It is not possible to have such constructs in Makefile.am:
+ ifeq ($(FOO),)
+ bar: bla
+ cat $< >$@
+ else
+ bar:
+ echo $(FOO) >$@
+ endif
+
+as autoreconf will yell loudly that there is an 'endif' without an 'if'.
+Sigh... :-(
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+diff -durN gutenprint-5.2.9.orig/src/xml/Makefile.am gutenprint-5.2.9/src/xml/Makefile.am
+--- gutenprint-5.2.9.orig/src/xml/Makefile.am 2011-03-30 02:43:24.000000000 +0200
++++ gutenprint-5.2.9/src/xml/Makefile.am 2013-03-24 17:08:08.435918773 +0100
+@@ -52,10 +52,13 @@
+
+
+ xmli18n-tmp.h: xml-stamp extract-strings
+- -rm -f $@ $@.tmp
+- ./extract-strings `cat xml-stamp | sed -e 's;^;$(srcdir)/;'` > $@.tmp
+- mv $@.tmp $@
+-
++ if [ -z "$(BR2_USE_PREGEN_XMLI18N_TMP_H)" ]; then \
++ rm -f $@ $@.tmp; \
++ ./extract-strings `cat xml-stamp | sed -e 's;^;$(srcdir)/;'` > $@.tmp; \
++ mv $@.tmp $@; \
++ else \
++ cp $(BR2_USE_PREGEN_XMLI18N_TMP_H) $@; \
++ fi
+
+ dist-hook: xmli18n-tmp.h xml-stamp
+ # xmli18n-tmp.h is needed by po/POTFILES.in at dist time