summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-06-26 09:18:22 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-28 08:36:00 +0100
commit1262d0591e4142e60bdda33c0b6449381aa522c7 (patch)
tree7121e26575cfa7bea1e6f8ad3d252ffa5b0e5ca2
parent65784edd0f7b7ef2a260a3229329bffdc1da3092 (diff)
downloadpoky-1262d0591e4142e60bdda33c0b6449381aa522c7.tar.gz
libgpg-error: update 1.37 -> 1.38
Drop the do_compile_prepend logic as upstream now handles it correctly. License-Update: copyright years (From OE-Core rev: 830a955ab2f3c22ed44918a88adb79ba719eedbc) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-support/libgpg-error/libgpg-error/0003-build-Fix-cross-compiling-into-a-separate-build-dir.patch43
-rw-r--r--meta/recipes-support/libgpg-error/libgpg-error/0005-src-gen-lock-obj.sh-add-a-file.patch134
-rw-r--r--meta/recipes-support/libgpg-error/libgpg-error_1.37.bb72
-rw-r--r--meta/recipes-support/libgpg-error/libgpg-error_1.38.bb42
4 files changed, 219 insertions, 72 deletions
diff --git a/meta/recipes-support/libgpg-error/libgpg-error/0003-build-Fix-cross-compiling-into-a-separate-build-dir.patch b/meta/recipes-support/libgpg-error/libgpg-error/0003-build-Fix-cross-compiling-into-a-separate-build-dir.patch
new file mode 100644
index 0000000000..20610bee5d
--- /dev/null
+++ b/meta/recipes-support/libgpg-error/libgpg-error/0003-build-Fix-cross-compiling-into-a-separate-build-dir.patch
@@ -0,0 +1,43 @@
1From 6efe006e99a7e739afbf7fe8937445c82630fc8f Mon Sep 17 00:00:00 2001
2From: David Michael <fedora.dm0@gmail.com>
3Date: Mon, 1 Jun 2020 10:24:53 -0400
4Subject: [PATCH] build: Fix cross-compiling into a separate build dir.
5
6* configure.ac: Create the src directory before writing into it.
7* src/Makefile.am (EXTRA_DIST): Add gen-lock-obj.sh.
8
9--
10
11Upstream-Status: Backport
12Signed-off-by: David Michael <fedora.dm0@gmail.com>
13Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
14---
15 configure.ac | 1 +
16 src/Makefile.am | 2 +-
17 2 files changed, 2 insertions(+), 1 deletion(-)
18
19diff --git a/configure.ac b/configure.ac
20index def8bba..8c0d845 100644
21--- a/configure.ac
22+++ b/configure.ac
23@@ -598,6 +598,7 @@ if test x$cross_compiling = xyes; then
24 case $host in
25 *-*-linux*)
26 lock_obj_h_generated=yes
27+ mkdir src
28 LOCK_ABI_VERSION=1 host=$host host_alias=$host_alias \
29 CC=$CC OBJDUMP=$host_alias-objdump \
30 ac_ext=$ac_ext ac_objext=$ac_objext \
31diff --git a/src/Makefile.am b/src/Makefile.am
32index 2fb83c0..d773877 100644
33--- a/src/Makefile.am
34+++ b/src/Makefile.am
35@@ -102,7 +102,7 @@ EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \
36 gpg-error.vers gpg-error.def.in \
37 versioninfo.rc.in gpg-error.w32-manifest.in \
38 gpg-error-config-test.sh gpg-error.pc.in \
39- $(lock_obj_pub)
40+ gen-lock-obj.sh $(lock_obj_pub)
41
42 BUILT_SOURCES = $(srcdir)/err-sources.h $(srcdir)/err-codes.h \
43 code-to-errno.h code-from-errno.h \
diff --git a/meta/recipes-support/libgpg-error/libgpg-error/0005-src-gen-lock-obj.sh-add-a-file.patch b/meta/recipes-support/libgpg-error/libgpg-error/0005-src-gen-lock-obj.sh-add-a-file.patch
new file mode 100644
index 0000000000..e6f6c09bac
--- /dev/null
+++ b/meta/recipes-support/libgpg-error/libgpg-error/0005-src-gen-lock-obj.sh-add-a-file.patch
@@ -0,0 +1,134 @@
1From fcb414abb62223e66dba413d0ca86eab3ea5bbc3 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Sun, 21 Jun 2020 13:54:47 +0000
4Subject: [PATCH] src-gen-lock-obj.sh: add a file
5
6This is erroneously missing from the tarball; it will show
7up in the next release tarball, as upstream has fixed the
8packaging in master.
9
10Upstream-Status: Inappropriate
11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12---
13 src/gen-lock-obj.sh | 112 ++++++++++++++++++++++++++++++++++++++++++++
14 1 file changed, 112 insertions(+)
15 create mode 100755 src/gen-lock-obj.sh
16
17diff --git a/src/gen-lock-obj.sh b/src/gen-lock-obj.sh
18new file mode 100755
19index 0000000..13858cf
20--- /dev/null
21+++ b/src/gen-lock-obj.sh
22@@ -0,0 +1,112 @@
23+#! /bin/sh
24+#
25+# gen-lock-obj.sh - Build tool to construct the lock object.
26+#
27+# Copyright (C) 2020 g10 Code GmbH
28+#
29+# This file is part of libgpg-error.
30+#
31+# libgpg-error is free software; you can redistribute it and/or
32+# modify it under the terms of the GNU Lesser General Public License
33+# as published by the Free Software Foundation; either version 2.1 of
34+# the License, or (at your option) any later version.
35+#
36+# libgpg-error is distributed in the hope that it will be useful, but
37+# WITHOUT ANY WARRANTY; without even the implied warranty of
38+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
39+# Lesser General Public License for more details.
40+#
41+# You should have received a copy of the GNU Lesser General Public
42+# License along with this program; if not, see <https://www.gnu.org/licenses/>.
43+#
44+
45+#
46+# Following variables should be defined to invoke this script
47+#
48+# CC
49+# OBJDUMP
50+# AWK
51+# ac_ext
52+# ac_object
53+# host
54+# LOCK_ABI_VERSION
55+#
56+# An example:
57+#
58+# LOCK_ABI_VERSION=1 host=x86_64-pc-linux-gnu host_alias=x86_64-linux-gnu \
59+# CC=$host_alias-gcc OBJDUMP=$host_alias-objdump ac_ext=c ac_objext=o \
60+# AWK=gawk ./gen-lock-obj.sh
61+#
62+
63+AWK_VERSION_OUTPUT=$($AWK 'BEGIN { print PROCINFO["version"] }')
64+if test -n "$AWK_VERSION_OUTPUT"; then
65+ # It's GNU awk, which supports PROCINFO.
66+ AWK_OPTION=--non-decimal-data
67+fi
68+
69+cat <<'EOF' >conftest.$ac_ext
70+#include <pthread.h>
71+pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
72+EOF
73+
74+if $CC -c conftest.$ac_ext; then :
75+ ac_mtx_size=$($OBJDUMP -j .bss -t conftest.$ac_objext \
76+ | $AWK $AWK_OPTION '
77+/mtx$/ { mtx_size = int("0x" $5) }
78+END { print mtx_size }')
79+else
80+ echo "Can't determine mutex size"
81+ exit 1
82+fi
83+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
84+
85+cat <<EOF
86+## lock-obj-pub.$host.h
87+## File created by gen-lock-obj.sh - DO NOT EDIT
88+## To be included by mkheader into gpg-error.h
89+
90+typedef struct
91+{
92+ long _vers;
93+ union {
94+ volatile char _priv[$ac_mtx_size];
95+ long _x_align;
96+ long *_xp_align;
97+ } u;
98+} gpgrt_lock_t;
99+
100+EOF
101+
102+# FIXME: Support different alignment conditions of:
103+#
104+# USE_16BYTE_ALIGNMENT
105+# USE_DOUBLE_FOR_ALIGNMENT
106+# USE_LONG_DOUBLE_FOR_ALIGNMENT
107+#
108+
109+echo -n "#define GPGRT_LOCK_INITIALIZER {$LOCK_ABI_VERSION,{{"
110+
111+i=0
112+while test "$i" -lt $ac_mtx_size; do
113+ if test "$i" -ne 0 -a "$(( $i % 8 ))" -eq 0; then
114+ echo ' \'
115+ echo -n " "
116+ fi
117+ echo -n '0'
118+ if test "$i" -lt $(($ac_mtx_size - 1)); then
119+ echo -n ','
120+ fi
121+ i=$(( i + 1 ))
122+done
123+
124+cat <<'EOF'
125+}}}
126+##
127+## Local Variables:
128+## mode: c
129+## buffer-read-only: t
130+## End:
131+##
132+EOF
133+
134+exit 0
diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.37.bb b/meta/recipes-support/libgpg-error/libgpg-error_1.37.bb
deleted file mode 100644
index b9a2b01c20..0000000000
--- a/meta/recipes-support/libgpg-error/libgpg-error_1.37.bb
+++ /dev/null
@@ -1,72 +0,0 @@
1SUMMARY = "Small library that defines common error values for all GnuPG components"
2HOMEPAGE = "http://www.gnupg.org/related_software/libgpg-error/"
3BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
4
5LICENSE = "GPLv2+ & LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
7 file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
8 file://src/gpg-error.h.in;beginline=2;endline=18;md5=cd91e3ad1265a0c268efad541a39345e \
9 file://src/init.c;beginline=2;endline=17;md5=f01cdfcf747af5380590cfd9bbfeaaf7"
10
11
12SECTION = "libs"
13
14UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
15SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \
16 file://pkgconfig.patch \
17 file://0001-Do-not-fail-when-testing-config-scripts.patch \
18 "
19
20SRC_URI[md5sum] = "729f22d917494fdc4b54fce5aa6547c7"
21SRC_URI[sha256sum] = "b32d6ff72a73cf79797f7f2d039e95e9c6f92f0c1450215410840ab62aea9763"
22
23BINCONFIG = "${bindir}/gpg-error-config"
24
25inherit autotools binconfig-disabled pkgconfig gettext multilib_header multilib_script
26
27MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/gpgrt-config"
28
29CPPFLAGS += "-P"
30do_compile_prepend() {
31 TARGET_FILE=linux-gnu
32 if [ ${TARGET_OS} = "mingw32" ]; then
33 # There are no arch specific syscfg files for mingw32
34 TARGET_FILE=
35 elif [ ${TARGET_ARCH} = "arc" ]; then
36 # ARC syscfg file is automatically aliased to i686-pc-linux-gnu
37 TARGET_FILE=
38 elif [ ${TARGET_OS} != "linux" ]; then
39 TARGET_FILE=${TARGET_OS}
40 fi
41
42 case ${TARGET_ARCH} in
43 aarch64_be) TUPLE=aarch64-unknown-linux-gnu ;;
44 arm) TUPLE=arm-unknown-linux-gnueabi ;;
45 armeb) TUPLE=arm-unknown-linux-gnueabi ;;
46 i586|i686) TUPLE=i686-unknown-linux-gnu;;
47 mips64*) TUPLE=mips64el-unknown-linux-gnuabi64 ;;
48 mips*el) TUPLE=mipsel-unknown-linux-gnu ;;
49 mips*) TUPLE=mips-unknown-linux-gnu ;;
50 x86_64) TUPLE=x86_64-unknown-linux-gnu ;;
51 ppc) TUPLE=powerpc-unknown-linux-gnu ;;
52 ppc64) TUPLE=powerpc64-unknown-linux-gnu ;;
53 ppc64le) TUPLE=powerpc64le-unknown-linux-gnu ;;
54 *) TUPLE=${TARGET_ARCH}-unknown-linux-gnu ;;
55 esac
56
57 if [ -n "$TARGET_FILE" ]; then
58 cp ${S}/src/syscfg/lock-obj-pub.$TUPLE.h \
59 ${S}/src/syscfg/lock-obj-pub.$TARGET_FILE.h
60 fi
61}
62
63do_install_append() {
64 # we don't have common lisp in OE
65 rm -rf "${D}${datadir}/common-lisp/"
66 oe_multilib_header gpg-error.h gpgrt.h
67}
68
69FILES_${PN}-dev += "${bindir}/gpg-error"
70FILES_${PN}-doc += "${datadir}/libgpg-error/errorref.txt"
71
72BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.38.bb b/meta/recipes-support/libgpg-error/libgpg-error_1.38.bb
new file mode 100644
index 0000000000..9a3ec9b5bd
--- /dev/null
+++ b/meta/recipes-support/libgpg-error/libgpg-error_1.38.bb
@@ -0,0 +1,42 @@
1SUMMARY = "Small library that defines common error values for all GnuPG components"
2HOMEPAGE = "http://www.gnupg.org/related_software/libgpg-error/"
3BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
4
5LICENSE = "GPLv2+ & LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
7 file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
8 file://src/gpg-error.h.in;beginline=2;endline=18;md5=d82591bc81561f617da71e00ff4a9d79 \
9 file://src/init.c;beginline=2;endline=17;md5=f01cdfcf747af5380590cfd9bbfeaaf7 \
10 "
11
12
13SECTION = "libs"
14
15UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
16SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \
17 file://pkgconfig.patch \
18 file://0001-Do-not-fail-when-testing-config-scripts.patch \
19 file://0003-build-Fix-cross-compiling-into-a-separate-build-dir.patch \
20 file://0005-src-gen-lock-obj.sh-add-a-file.patch \
21 "
22
23SRC_URI[sha256sum] = "d8988275aa69d7149f931c10442e9e34c0242674249e171592b430ff7b3afd02"
24
25BINCONFIG = "${bindir}/gpg-error-config"
26
27inherit autotools binconfig-disabled pkgconfig gettext multilib_header multilib_script
28
29MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/gpgrt-config"
30
31CPPFLAGS += "-P"
32
33do_install_append() {
34 # we don't have common lisp in OE
35 rm -rf "${D}${datadir}/common-lisp/"
36 oe_multilib_header gpg-error.h gpgrt.h
37}
38
39FILES_${PN}-dev += "${bindir}/gpg-error"
40FILES_${PN}-doc += "${datadir}/libgpg-error/errorref.txt"
41
42BBCLASSEXTEND = "native nativesdk"