diff options
Diffstat (limited to 'meta/recipes-support/gnupg/gnupg/0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch')
-rw-r--r-- | meta/recipes-support/gnupg/gnupg/0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/meta/recipes-support/gnupg/gnupg/0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch b/meta/recipes-support/gnupg/gnupg/0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch new file mode 100644 index 0000000000..5c9c022226 --- /dev/null +++ b/meta/recipes-support/gnupg/gnupg/0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch | |||
@@ -0,0 +1,105 @@ | |||
1 | From 59a3c76d4016ffc615f1c45184f4c6820061d69c Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
3 | Date: Wed, 16 Aug 2017 11:14:12 +0800 | ||
4 | Subject: [PATCH 1/4] Use pkg-config to find pth instead of pth-config. | ||
5 | |||
6 | Upstream-Status: Denied | ||
7 | [not submitted but they've been clear they don't want a pkg-config | ||
8 | dependency] | ||
9 | |||
10 | RP 2014/5/22 | ||
11 | |||
12 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
13 | |||
14 | Rebase to 2.1.23 | ||
15 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
16 | --- | ||
17 | m4/gnupg-pth.m4 | 53 ++++++++--------------------------------------------- | ||
18 | 1 file changed, 8 insertions(+), 45 deletions(-) | ||
19 | |||
20 | diff --git a/m4/gnupg-pth.m4 b/m4/gnupg-pth.m4 | ||
21 | index 6dc9e0e..5892531 100644 | ||
22 | --- a/m4/gnupg-pth.m4 | ||
23 | +++ b/m4/gnupg-pth.m4 | ||
24 | @@ -17,33 +17,9 @@ dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
25 | # Taken and modified from the m4 macros which come with Pth. | ||
26 | AC_DEFUN([GNUPG_PTH_VERSION_CHECK], | ||
27 | [ | ||
28 | - _pth_version=`$PTH_CONFIG --version | awk 'NR==1 {print [$]3}'` | ||
29 | _req_version="ifelse([$1],,1.2.0,$1)" | ||
30 | + PKG_CHECK_MODULES(PTH, [pth >= $_req_version], [have_pth=yes], [have_pth=no]) | ||
31 | |||
32 | - AC_MSG_CHECKING(for PTH - version >= $_req_version) | ||
33 | - for _var in _pth_version _req_version; do | ||
34 | - eval "_val=\"\$${_var}\"" | ||
35 | - _major=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\1/'` | ||
36 | - _minor=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\2/'` | ||
37 | - _rtype=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\3/'` | ||
38 | - _micro=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\4/'` | ||
39 | - case $_rtype in | ||
40 | - "a" ) _rtype=0 ;; | ||
41 | - "b" ) _rtype=1 ;; | ||
42 | - "." ) _rtype=2 ;; | ||
43 | - esac | ||
44 | - _hex=`echo dummy | awk '{ printf("%d%02d%1d%02d", major, minor, rtype, micro); }' \ | ||
45 | - "major=$_major" "minor=$_minor" "rtype=$_rtype" "micro=$_micro"` | ||
46 | - eval "${_var}_hex=\"\$_hex\"" | ||
47 | - done | ||
48 | - have_pth=no | ||
49 | - if test ".$_pth_version_hex" != .; then | ||
50 | - if test ".$_req_version_hex" != .; then | ||
51 | - if test $_pth_version_hex -ge $_req_version_hex; then | ||
52 | - have_pth=yes | ||
53 | - fi | ||
54 | - fi | ||
55 | - fi | ||
56 | if test $have_pth = yes; then | ||
57 | AC_MSG_RESULT(yes) | ||
58 | AC_MSG_CHECKING([whether PTH installation is sane]) | ||
59 | @@ -51,9 +27,9 @@ AC_DEFUN([GNUPG_PTH_VERSION_CHECK], | ||
60 | _gnupg_pth_save_cflags=$CFLAGS | ||
61 | _gnupg_pth_save_ldflags=$LDFLAGS | ||
62 | _gnupg_pth_save_libs=$LIBS | ||
63 | - CFLAGS="$CFLAGS `$PTH_CONFIG --cflags`" | ||
64 | - LDFLAGS="$LDFLAGS `$PTH_CONFIG --ldflags`" | ||
65 | - LIBS="$LIBS `$PTH_CONFIG --libs --all`" | ||
66 | + CFLAGS="$CFLAGS $PTH_CFLAGS" | ||
67 | + LDFLAGS="$LDFLAGS $PTH_LDFLAGS" | ||
68 | + LIBS="$LIBS $PTH_LIBS" | ||
69 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pth.h> | ||
70 | ], | ||
71 | [[ pth_init ();]])], | ||
72 | @@ -80,26 +56,13 @@ AC_DEFUN([GNUPG_PTH_VERSION_CHECK], | ||
73 | # PTH_CLFAGS and PTH_LIBS are AS_SUBST. | ||
74 | # | ||
75 | AC_DEFUN([GNUPG_PATH_PTH], | ||
76 | -[ AC_ARG_WITH(pth-prefix, | ||
77 | - AC_HELP_STRING([--with-pth-prefix=PFX], | ||
78 | - [prefix where GNU Pth is installed (optional)]), | ||
79 | - pth_config_prefix="$withval", pth_config_prefix="") | ||
80 | - if test x$pth_config_prefix != x ; then | ||
81 | - PTH_CONFIG="$pth_config_prefix/bin/pth-config" | ||
82 | - fi | ||
83 | - AC_PATH_PROG(PTH_CONFIG, pth-config, no) | ||
84 | +[ | ||
85 | tmp=ifelse([$1], ,1.3.7,$1) | ||
86 | - if test "$PTH_CONFIG" != "no"; then | ||
87 | - GNUPG_PTH_VERSION_CHECK($tmp) | ||
88 | - if test $have_pth = yes; then | ||
89 | - PTH_CFLAGS=`$PTH_CONFIG --cflags` | ||
90 | - PTH_LIBS=`$PTH_CONFIG --ldflags` | ||
91 | - PTH_LIBS="$PTH_LIBS `$PTH_CONFIG --libs --all`" | ||
92 | - AC_DEFINE(HAVE_PTH, 1, | ||
93 | + GNUPG_PTH_VERSION_CHECK($tmp) | ||
94 | + if test $have_pth = yes; then | ||
95 | + AC_DEFINE(HAVE_PTH, 1, | ||
96 | [Defined if the GNU Pth is available]) | ||
97 | - fi | ||
98 | fi | ||
99 | AC_SUBST(PTH_CFLAGS) | ||
100 | AC_SUBST(PTH_LIBS) | ||
101 | ]) | ||
102 | - | ||
103 | -- | ||
104 | 1.8.3.1 | ||
105 | |||