Browse Source

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 <gvalkov@abv.bg>
lilik-openwrt-22.03
Georgi Valkov 4 years ago
parent
commit
13f9a7bd63
3 changed files with 25 additions and 8 deletions
  1. +1
    -1
      libs/libgpg-error/Makefile
  2. +0
    -7
      libs/libgpg-error/patches/010-add-arc-support.patch
  3. +24
    -0
      libs/libgpg-error/patches/011-macos-compile-fix.patch

+ 1
- 1
libs/libgpg-error/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libgpg-error PKG_NAME:=libgpg-error
PKG_VERSION:=1.39 PKG_VERSION:=1.39
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://mirrors.dotsrc.org/gcrypt/libgpg-error \ PKG_SOURCE_URL:=https://mirrors.dotsrc.org/gcrypt/libgpg-error \


+ 0
- 7
libs/libgpg-error/patches/010-add-arc-support.patch View File

@ -26,8 +26,6 @@ Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
2 files changed, 24 insertions(+) 2 files changed, 24 insertions(+)
create mode 100644 src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h 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 --- a/src/Makefile.am
+++ b/src/Makefile.am +++ b/src/Makefile.am
@@ -48,6 +48,7 @@ lock_obj_pub = \ @@ -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-androideabi.h \
syscfg/lock-obj-pub.arm-unknown-linux-gnueabi.h \ syscfg/lock-obj-pub.arm-unknown-linux-gnueabi.h \
syscfg/lock-obj-pub.arm-apple-darwin.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 --- /dev/null
+++ b/src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h +++ b/src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h
@@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
@ -67,5 +62,3 @@ index 000000000000..3b1a8fadf8a7
+## buffer-read-only: t +## buffer-read-only: t
+## End: +## End:
+## +##
--
2.17.1

+ 24
- 0
libs/libgpg-error/patches/011-macos-compile-fix.patch View File

@ -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

Loading…
Cancel
Save