summaryrefslogtreecommitdiffstats
path: root/patches/01_replace-non-portable-echo-options.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/01_replace-non-portable-echo-options.patch')
-rw-r--r--patches/01_replace-non-portable-echo-options.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/patches/01_replace-non-portable-echo-options.patch b/patches/01_replace-non-portable-echo-options.patch
new file mode 100644
index 0000000..5b24ae2
--- /dev/null
+++ b/patches/01_replace-non-portable-echo-options.patch
@@ -0,0 +1,61 @@
+Author: "P. J. McDermott" <pj@pehjota.net>
+Subject: Replace non-portable echo options
+
+The "echo -e" in the Make.config target causes the following error:
+
+ Make.config written, edit if needed
+
+ Make.config:1: *** empty variable name. Stop.
+ make[1]: Leaving directory '/pkg/fbida/tmp/src'
+ ../build:9: recipe for target 'build' failed
+ make: *** [build] Error 2
+
+The "echo -n" in ac_init causes unattractive output like the following:
+
+ -n checking for linux/fb.h ...
+ yes
+
+The "echo -e" in ac_jpeg_ver causes the following error:
+
+ Make.config written, edit if needed
+
+ Need files from libjpeg JPEG_LIB_VERSION in jpeg/
+ GNUmakefile:196: recipe for target 'check-libjpeg' failed
+ make[1]: *** [check-libjpeg] Error 1
+ make[1]: Leaving directory '/pkg/fbida/tmp/src'
+ ../build:9: recipe for target 'build' failed
+ make: *** [build] Error 2
+
+diff -Naur src.orig/mk/Autoconf.mk src/mk/Autoconf.mk
+--- src.orig/mk/Autoconf.mk 2012-02-22 12:13:36.000000000 -0500
++++ src/mk/Autoconf.mk 2014-07-26 00:10:29.787011930 -0400
+@@ -24,7 +24,7 @@
+ ac_fini = echo "... result is $${rc}" >&2; echo >&2; echo "$${rc}"
+ else
+ # normal
+- ac_init = echo -n "checking $(1) ... " >&2; rc=no
++ ac_init = printf "checking %s ... " "$(1)" >&2; rc=no
+ ac_b_cmd = $(1) >/dev/null 2>&1 && rc=yes
+ ac_s_cmd = rc=`$(1) 2>/dev/null`
+ ac_fini = echo "$${rc}" >&2; echo "$${rc}"
+@@ -162,7 +162,7 @@
+ @true
+
+ Make.config: $(srcdir)/GNUmakefile
+- @echo -e "$(make-config-q)" > $@
++ @echo "$(make-config-q)" > $@
+ @echo
+ @echo "Make.config written, edit if needed"
+ @echo
+diff -Naur src.orig/GNUmakefile src/GNUmakefile
+--- src.orig/GNUmakefile 2012-02-22 12:13:36.000000000 -0500
++++ src/GNUmakefile 2014-07-26 00:07:56.882490841 -0400
+@@ -30,7 +30,7 @@
+
+ ac_jpeg_ver = $(shell \
+ $(call ac_init,for libjpeg version);\
+- $(call ac_s_cmd,echo -e '\#include <jpeglib.h>\nJPEG_LIB_VERSION' \
++ $(call ac_s_cmd,printf '\#include <jpeglib.h>\nJPEG_LIB_VERSION\n' \
+ | cpp | tail -n 1);\
+ $(call ac_fini))
+