diff options
Diffstat (limited to 'meta/recipes-support/libgcrypt/files')
-rw-r--r-- | meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch (renamed from meta/recipes-support/libgcrypt/files/0001-Add-and-use-pkg-config-for-libgcrypt-instead-of-conf.patch) | 138 |
1 files changed, 52 insertions, 86 deletions
diff --git a/meta/recipes-support/libgcrypt/files/0001-Add-and-use-pkg-config-for-libgcrypt-instead-of-conf.patch b/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch index d41c3de3b6..cd8a5993b4 100644 --- a/meta/recipes-support/libgcrypt/files/0001-Add-and-use-pkg-config-for-libgcrypt-instead-of-conf.patch +++ b/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch | |||
@@ -1,41 +1,26 @@ | |||
1 | From 72b9e9040d58c15f0302bd8abda28179f04e1c5f Mon Sep 17 00:00:00 2001 | 1 | From bee26d7c4ea0b4a397c289b819b89e78bc325ba0 Mon Sep 17 00:00:00 2001 |
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | 2 | From: Trevor Gamblin <trevor.gamblin@windriver.com> |
3 | Date: Wed, 16 Aug 2017 10:43:18 +0800 | 3 | Date: Tue, 29 Oct 2019 14:08:32 -0400 |
4 | Subject: [PATCH 1/4] Add and use pkg-config for libgcrypt instead of -config | 4 | Subject: [PATCH] libgcrypt: fix m4 file for oe-core |
5 | scripts. | ||
6 | 5 | ||
7 | Upstream-Status: Denied [upstream have indicated they don't want a | 6 | Modify libgcrypt pkgconfig specifically for oe-core. Changes |
8 | pkg-config dependency] | 7 | are based on a previous patch from RP, using wiggle to |
8 | incorporate the parts that aren't in the upstream pkgconfig | ||
9 | settings. | ||
9 | 10 | ||
10 | RP 2014/5/22 | 11 | Upstream-Status: Inappropriate [oe-specific] |
11 | 12 | ||
12 | Rebase to 1.8.0 | 13 | Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> |
13 | 14 | ||
14 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
15 | --- | 15 | --- |
16 | configure.ac | 1 + | 16 | src/libgcrypt.m4 | 90 +++--------------------------------------------- |
17 | src/libgcrypt.m4 | 71 +++-------------------------------------------------- | 17 | 1 file changed, 4 insertions(+), 86 deletions(-) |
18 | src/libgcrypt.pc.in | 33 +++++++++++++++++++++++++ | ||
19 | 3 files changed, 38 insertions(+), 67 deletions(-) | ||
20 | create mode 100644 src/libgcrypt.pc.in | ||
21 | 18 | ||
22 | diff --git a/configure.ac b/configure.ac | ||
23 | index bbe8104..3d2de73 100644 | ||
24 | --- a/configure.ac | ||
25 | +++ b/configure.ac | ||
26 | @@ -2607,6 +2607,7 @@ random/Makefile | ||
27 | doc/Makefile | ||
28 | src/Makefile | ||
29 | src/gcrypt.h | ||
30 | +src/libgcrypt.pc | ||
31 | src/libgcrypt-config | ||
32 | src/versioninfo.rc | ||
33 | tests/Makefile | ||
34 | diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4 | 19 | diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4 |
35 | index c67cfec..4ea5f2c 100644 | 20 | index 37dfbea2..3d2e90a8 100644 |
36 | --- a/src/libgcrypt.m4 | 21 | --- a/src/libgcrypt.m4 |
37 | +++ b/src/libgcrypt.m4 | 22 | +++ b/src/libgcrypt.m4 |
38 | @@ -29,30 +29,6 @@ dnl is added to the gpg_config_script_warn variable. | 23 | @@ -29,41 +29,6 @@ dnl is added to the gpg_config_script_warn variable. |
39 | dnl | 24 | dnl |
40 | AC_DEFUN([AM_PATH_LIBGCRYPT], | 25 | AC_DEFUN([AM_PATH_LIBGCRYPT], |
41 | [ AC_REQUIRE([AC_CANONICAL_HOST]) | 26 | [ AC_REQUIRE([AC_CANONICAL_HOST]) |
@@ -46,8 +31,20 @@ index c67cfec..4ea5f2c 100644 | |||
46 | - if test x"${LIBGCRYPT_CONFIG}" = x ; then | 31 | - if test x"${LIBGCRYPT_CONFIG}" = x ; then |
47 | - if test x"${libgcrypt_config_prefix}" != x ; then | 32 | - if test x"${libgcrypt_config_prefix}" != x ; then |
48 | - LIBGCRYPT_CONFIG="${libgcrypt_config_prefix}/bin/libgcrypt-config" | 33 | - LIBGCRYPT_CONFIG="${libgcrypt_config_prefix}/bin/libgcrypt-config" |
49 | - else | 34 | - fi |
50 | - case "${SYSROOT}" in | 35 | - fi |
36 | - | ||
37 | - use_gpgrt_config="" | ||
38 | - if test x"${LIBGCRYPT_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then | ||
39 | - if $GPGRT_CONFIG libgcrypt --exists; then | ||
40 | - LIBGCRYPT_CONFIG="$GPGRT_CONFIG libgcrypt" | ||
41 | - AC_MSG_NOTICE([Use gpgrt-config as libgcrypt-config]) | ||
42 | - use_gpgrt_config=yes | ||
43 | - fi | ||
44 | - fi | ||
45 | - if test -z "$use_gpgrt_config"; then | ||
46 | - if test x"${LIBGCRYPT_CONFIG}" = x ; then | ||
47 | - case "${SYSROOT}" in | ||
51 | - /*) | 48 | - /*) |
52 | - if test -x "${SYSROOT}/bin/libgcrypt-config" ; then | 49 | - if test -x "${SYSROOT}/bin/libgcrypt-config" ; then |
53 | - LIBGCRYPT_CONFIG="${SYSROOT}/bin/libgcrypt-config" | 50 | - LIBGCRYPT_CONFIG="${SYSROOT}/bin/libgcrypt-config" |
@@ -58,15 +55,14 @@ index c67cfec..4ea5f2c 100644 | |||
58 | - *) | 55 | - *) |
59 | - AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.]) | 56 | - AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.]) |
60 | - ;; | 57 | - ;; |
61 | - esac | 58 | - esac |
62 | - fi | 59 | - fi |
60 | - AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) | ||
63 | - fi | 61 | - fi |
64 | - | 62 | |
65 | - AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) | ||
66 | tmp=ifelse([$1], ,1:1.2.0,$1) | 63 | tmp=ifelse([$1], ,1:1.2.0,$1) |
67 | if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then | 64 | if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then |
68 | req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` | 65 | @@ -74,56 +39,13 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], |
69 | @@ -62,48 +38,13 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], | ||
70 | min_libgcrypt_version="$tmp" | 66 | min_libgcrypt_version="$tmp" |
71 | fi | 67 | fi |
72 | 68 | ||
@@ -79,7 +75,11 @@ index c67cfec..4ea5f2c 100644 | |||
79 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` | 75 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` |
80 | - req_micro=`echo $min_libgcrypt_version | \ | 76 | - req_micro=`echo $min_libgcrypt_version | \ |
81 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` | 77 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` |
82 | - libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` | 78 | - if test -z "$use_gpgrt_config"; then |
79 | - libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` | ||
80 | - else | ||
81 | - libgcrypt_config_version=`$LIBGCRYPT_CONFIG --modversion` | ||
82 | - fi | ||
83 | - major=`echo $libgcrypt_config_version | \ | 83 | - major=`echo $libgcrypt_config_version | \ |
84 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` | 84 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` |
85 | - minor=`echo $libgcrypt_config_version | \ | 85 | - minor=`echo $libgcrypt_config_version | \ |
@@ -113,24 +113,29 @@ index c67cfec..4ea5f2c 100644 | |||
113 | # If we have a recent libgcrypt, we should also check that the | 113 | # If we have a recent libgcrypt, we should also check that the |
114 | # API is compatible | 114 | # API is compatible |
115 | if test "$req_libgcrypt_api" -gt 0 ; then | 115 | if test "$req_libgcrypt_api" -gt 0 ; then |
116 | - tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` | 116 | - if test -z "$use_gpgrt_config"; then |
117 | - tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` | ||
118 | - else | ||
119 | - tmp=`$LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0` | ||
120 | - fi | ||
117 | + tmp=`$PKG_CONFIG --variable=api_version libgcrypt` | 121 | + tmp=`$PKG_CONFIG --variable=api_version libgcrypt` |
118 | if test "$tmp" -gt 0 ; then | 122 | if test "$tmp" -gt 0 ; then |
119 | AC_MSG_CHECKING([LIBGCRYPT API version]) | 123 | AC_MSG_CHECKING([LIBGCRYPT API version]) |
120 | if test "$req_libgcrypt_api" -eq "$tmp" ; then | 124 | if test "$req_libgcrypt_api" -eq "$tmp" ; then |
121 | @@ -116,10 +57,8 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], | 125 | @@ -136,11 +58,9 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], |
122 | fi | 126 | fi |
123 | fi | 127 | fi |
124 | if test $ok = yes; then | 128 | if test $ok = yes; then |
125 | - LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` | 129 | - LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` |
126 | - LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` | 130 | - LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` |
127 | ifelse([$2], , :, [$2]) | 131 | ifelse([$2], , :, [$2]) |
128 | - libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` | 132 | if test -z "$use_gpgrt_config"; then |
129 | + libgcrypt_config_host=`$PKG_CONFIG --variable=host libgcrypt` | 133 | - libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` |
130 | if test x"$libgcrypt_config_host" != xnone ; then | 134 | + libgcrypt_config_host=`$PKG_CONFIG --variable=host libgcrypt` |
131 | if test x"$libgcrypt_config_host" != x"$host" ; then | 135 | else |
132 | AC_MSG_WARN([[ | 136 | libgcrypt_config_host=`$LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none` |
133 | @@ -134,8 +73,6 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], | 137 | fi |
138 | @@ -158,8 +78,6 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], | ||
134 | fi | 139 | fi |
135 | fi | 140 | fi |
136 | else | 141 | else |
@@ -139,45 +144,6 @@ index c67cfec..4ea5f2c 100644 | |||
139 | ifelse([$3], , :, [$3]) | 144 | ifelse([$3], , :, [$3]) |
140 | fi | 145 | fi |
141 | AC_SUBST(LIBGCRYPT_CFLAGS) | 146 | AC_SUBST(LIBGCRYPT_CFLAGS) |
142 | diff --git a/src/libgcrypt.pc.in b/src/libgcrypt.pc.in | ||
143 | new file mode 100644 | ||
144 | index 0000000..2fc8f53 | ||
145 | --- /dev/null | ||
146 | +++ b/src/libgcrypt.pc.in | ||
147 | @@ -0,0 +1,33 @@ | ||
148 | +# Process this file with autoconf to produce a pkg-config metadata file. | ||
149 | +# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation | ||
150 | +# Author: Simon Josefsson | ||
151 | +# | ||
152 | +# This file is free software; as a special exception the author gives | ||
153 | +# unlimited permission to copy and/or distribute it, with or without | ||
154 | +# modifications, as long as this notice is preserved. | ||
155 | +# | ||
156 | +# This file is distributed in the hope that it will be useful, but | ||
157 | +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the | ||
158 | +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
159 | + | ||
160 | +prefix=@prefix@ | ||
161 | +exec_prefix=@exec_prefix@ | ||
162 | +libdir=@libdir@ | ||
163 | +includedir=@includedir@ | ||
164 | + | ||
165 | +# API info | ||
166 | +api_version=@LIBGCRYPT_CONFIG_API_VERSION@ | ||
167 | +host=@LIBGCRYPT_CONFIG_HOST@ | ||
168 | + | ||
169 | +# Misc information. | ||
170 | +symmetric_ciphers=@LIBGCRYPT_CIPHERS@ | ||
171 | +asymmetric_ciphers=@LIBGCRYPT_PUBKEY_CIPHERS@ | ||
172 | +digests=@LIBGCRYPT_DIGESTS@ | ||
173 | + | ||
174 | +Name: libgcrypt | ||
175 | +Description: GNU crypto library | ||
176 | +URL: http://www.gnupg.org | ||
177 | +Version: @VERSION@ | ||
178 | +Libs: -L${libdir} -lgcrypt | ||
179 | +Libs.private: -L${libdir} -lgpg-error | ||
180 | +Cflags: -I${includedir} | ||
181 | -- | 147 | -- |
182 | 1.8.3.1 | 148 | 2.17.1 |
183 | 149 | ||