From 13f9a7bd63ad2c4e43b5f927909d3883f46c88b3 Mon Sep 17 00:00:00 2001 From: Georgi Valkov Date: Sat, 30 Jan 2021 13:27:55 +0200 Subject: [PATCH] libgpg-error: fix build error on macOS src/gen-lock-obj.sh runs in /bin/sh which does not support echo -n on macOS, and generates garbage. Resolved by using printf which is posix compliant. Signed-off-by: Georgi Valkov --- libs/libgpg-error/Makefile | 2 +- .../patches/010-add-arc-support.patch | 7 ------ .../patches/011-macos-compile-fix.patch | 24 +++++++++++++++++++ 3 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 libs/libgpg-error/patches/011-macos-compile-fix.patch diff --git a/libs/libgpg-error/Makefile b/libs/libgpg-error/Makefile index 12fdb03be..69e6bad4f 100644 --- a/libs/libgpg-error/Makefile +++ b/libs/libgpg-error/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libgpg-error PKG_VERSION:=1.39 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://mirrors.dotsrc.org/gcrypt/libgpg-error \ diff --git a/libs/libgpg-error/patches/010-add-arc-support.patch b/libs/libgpg-error/patches/010-add-arc-support.patch index 1020c7e39..5ecf81c29 100644 --- a/libs/libgpg-error/patches/010-add-arc-support.patch +++ b/libs/libgpg-error/patches/010-add-arc-support.patch @@ -26,8 +26,6 @@ Signed-off-by: Alexey Brodkin 2 files changed, 24 insertions(+) create mode 100644 src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h -diff --git a/src/Makefile.am b/src/Makefile.am -index 380ea7c09c04..bd00961c2f27 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -48,6 +48,7 @@ lock_obj_pub = \ @@ -38,9 +36,6 @@ index 380ea7c09c04..bd00961c2f27 100644 syscfg/lock-obj-pub.arm-unknown-linux-androideabi.h \ syscfg/lock-obj-pub.arm-unknown-linux-gnueabi.h \ syscfg/lock-obj-pub.arm-apple-darwin.h \ -diff --git a/src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h b/src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h -new file mode 100644 -index 000000000000..3b1a8fadf8a7 --- /dev/null +++ b/src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h @@ -0,0 +1,23 @@ @@ -67,5 +62,3 @@ index 000000000000..3b1a8fadf8a7 +## buffer-read-only: t +## End: +## --- -2.17.1 diff --git a/libs/libgpg-error/patches/011-macos-compile-fix.patch b/libs/libgpg-error/patches/011-macos-compile-fix.patch new file mode 100644 index 000000000..c615ad170 --- /dev/null +++ b/libs/libgpg-error/patches/011-macos-compile-fix.patch @@ -0,0 +1,24 @@ +--- a/src/gen-lock-obj.sh ++++ b/src/gen-lock-obj.sh +@@ -84,17 +84,16 @@ EOF + # USE_LONG_DOUBLE_FOR_ALIGNMENT + # + +-echo -n "#define GPGRT_LOCK_INITIALIZER {$LOCK_ABI_VERSION,{{" ++printf "#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 -n " " ++ printf " %s\n " "\\" + fi +- echo -n '0' ++ printf '0' + if test "$i" -lt $(($ac_mtx_size - 1)); then +- echo -n ',' ++ printf ',' + fi + i=$(( i + 1 )) + done