Signed-off-by: Lucas Stach <[email protected]>
---
 ...1-fix-the-last-cross-compilation-fix.patch | 55 +++++++++++++++++++
 patches/libgpg-error-1.42/series              |  4 ++
 2 files changed, 59 insertions(+)
 create mode 100644 
patches/libgpg-error-1.42/0001-fix-the-last-cross-compilation-fix.patch
 create mode 100644 patches/libgpg-error-1.42/series

diff --git 
a/patches/libgpg-error-1.42/0001-fix-the-last-cross-compilation-fix.patch 
b/patches/libgpg-error-1.42/0001-fix-the-last-cross-compilation-fix.patch
new file mode 100644
index 000000000000..6776ff10fc7b
--- /dev/null
+++ b/patches/libgpg-error-1.42/0001-fix-the-last-cross-compilation-fix.patch
@@ -0,0 +1,55 @@
+From: Lucas Stach <[email protected]>
+Date: Sat, 11 Sep 2021 01:52:35 +0200
+Subject: [PATCH] fix the last cross-compilation fix
+
+Instead of trying to figure out which way to call echo in order to supress
+the newline and apparently getting it wrong on some platforms (on a Fedora
+build host compilation fails due to stray \c characters in the generated
+files) use the POSIX recommended portable way of calling printf.
+
+Signed-off-by: Lucas Stach <[email protected]>
+---
+ src/gen-lock-obj.sh | 16 ++++------------
+ 1 file changed, 4 insertions(+), 12 deletions(-)
+
+diff --git a/src/gen-lock-obj.sh b/src/gen-lock-obj.sh
+index a710f0ccee5a..aea9edb6095a 100755
+--- a/src/gen-lock-obj.sh
++++ b/src/gen-lock-obj.sh
+@@ -38,14 +38,6 @@
+ #     AWK=gawk ./gen-lock-obj.sh
+ #
+ 
+-if test -n `echo -n`; then
+-    ECHO_C='\c'
+-    ECHO_N=''
+-else
+-    ECHO_C=''
+-    ECHO_N='-n'
+-fi
+-
+ if test "$1" = --disable-threads; then
+     cat <<EOF
+ ## lock-obj-pub.$host.h - NO LOCK SUPPORT
+@@ -107,17 +99,17 @@ EOF
+ #     USE_LONG_DOUBLE_FOR_ALIGNMENT
+ #
+ 
+-echo ${ECHO_N} "#define GPGRT_LOCK_INITIALIZER {$LOCK_ABI_VERSION,{{${ECHO_C}"
++printf "%s" "#define GPGRT_LOCK_INITIALIZER {$LOCK_ABI_VERSION,{{"
+ 
+ i=0
+ while test "$i" -lt $ac_mtx_size; do
+     if test "$i" -ne 0 -a "$(( $i % 8 ))" -eq 0; then
+         echo ' \'
+-        echo ${ECHO_N} "                                    ${ECHO_C}"
++        printf "%s" "                                    "
+     fi
+-    echo ${ECHO_N} "0${ECHO_C}"
++    printf "%s" "0"
+     if test "$i" -lt $(($ac_mtx_size - 1)); then
+-        echo ${ECHO_N} ",${ECHO_C}"
++        printf "%s" ","
+     fi
+     i=$(( i + 1 ))
+ done
diff --git a/patches/libgpg-error-1.42/series b/patches/libgpg-error-1.42/series
new file mode 100644
index 000000000000..fc21a0922fdc
--- /dev/null
+++ b/patches/libgpg-error-1.42/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-fix-the-last-cross-compilation-fix.patch
+# a840af6993790b90121e652373747e0a  - git-ptx-patches magic
-- 
2.30.2


_______________________________________________
ptxdist mailing list
[email protected]
To unsubscribe, send a mail with subject "unsubscribe" to 
[email protected]

Reply via email to