summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/gnupg/gnupg/pkgconfig.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/gnupg/gnupg/pkgconfig.patch')
-rw-r--r--meta/recipes-support/gnupg/gnupg/pkgconfig.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/meta/recipes-support/gnupg/gnupg/pkgconfig.patch b/meta/recipes-support/gnupg/gnupg/pkgconfig.patch
new file mode 100644
index 0000000000..ae92392dae
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg/pkgconfig.patch
@@ -0,0 +1,86 @@
1Use pkg-config to find pth instead of pth-config.
2
3Upstream-Status: Rejected
4[not submitted but they've been clear they don't want a pkg-config dependency]
5
6RP 2014/5/22
7
8Index: gnupg-2.0.22/m4/gnupg-pth.m4
9===================================================================
10--- gnupg-2.0.22.orig/m4/gnupg-pth.m4 2013-10-04 12:32:53.000000000 +0000
11+++ gnupg-2.0.22/m4/gnupg-pth.m4 2014-05-13 21:33:21.000000000 +0000
12@@ -17,33 +17,9 @@
13 # Taken and modified from the m4 macros which come with Pth.
14 AC_DEFUN([GNUPG_PTH_VERSION_CHECK],
15 [
16- _pth_version=`$PTH_CONFIG --version | awk 'NR==1 {print [$]3}'`
17 _req_version="ifelse([$1],,1.2.0,$1)"
18+ PKG_CHECK_MODULES(PTH, [pth >= $_req_version], [have_pth=yes], [have_pth=no])
19
20- AC_MSG_CHECKING(for PTH - version >= $_req_version)
21- for _var in _pth_version _req_version; do
22- eval "_val=\"\$${_var}\""
23- _major=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\1/'`
24- _minor=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\2/'`
25- _rtype=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\3/'`
26- _micro=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\4/'`
27- case $_rtype in
28- "a" ) _rtype=0 ;;
29- "b" ) _rtype=1 ;;
30- "." ) _rtype=2 ;;
31- esac
32- _hex=`echo dummy | awk '{ printf("%d%02d%1d%02d", major, minor, rtype, micro); }' \
33- "major=$_major" "minor=$_minor" "rtype=$_rtype" "micro=$_micro"`
34- eval "${_var}_hex=\"\$_hex\""
35- done
36- have_pth=no
37- if test ".$_pth_version_hex" != .; then
38- if test ".$_req_version_hex" != .; then
39- if test $_pth_version_hex -ge $_req_version_hex; then
40- have_pth=yes
41- fi
42- fi
43- fi
44 if test $have_pth = yes; then
45 AC_MSG_RESULT(yes)
46 AC_MSG_CHECKING([whether PTH installation is sane])
47@@ -51,9 +29,9 @@
48 _gnupg_pth_save_cflags=$CFLAGS
49 _gnupg_pth_save_ldflags=$LDFLAGS
50 _gnupg_pth_save_libs=$LIBS
51- CFLAGS="$CFLAGS `$PTH_CONFIG --cflags`"
52- LDFLAGS="$LDFLAGS `$PTH_CONFIG --ldflags`"
53- LIBS="$LIBS `$PTH_CONFIG --libs --all`"
54+ CFLAGS="$CFLAGS $PTH_CFLAGS"
55+ LDFLAGS="$LDFLAGS $PTH_LDFLAGS"
56+ LIBS="$LIBS $PTH_LIBS"
57 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pth.h>
58 ],
59 [[ pth_init ();]])],
60@@ -81,23 +59,11 @@
61 #
62 AC_DEFUN([GNUPG_PATH_PTH],
63+[
64-[ AC_ARG_WITH(pth-prefix,
65- AC_HELP_STRING([--with-pth-prefix=PFX],
66- [prefix where GNU Pth is installed]),
67- pth_config_prefix="$withval", pth_config_prefix="")
68- if test x$pth_config_prefix != x ; then
69- PTH_CONFIG="$pth_config_prefix/bin/pth-config"
70- fi
71- AC_PATH_PROG(PTH_CONFIG, pth-config, no)
72 tmp=ifelse([$1], ,1.3.7,$1)
73- if test "$PTH_CONFIG" != "no"; then
74- GNUPG_PTH_VERSION_CHECK($tmp)
75- if test $have_pth = yes; then
76- PTH_CFLAGS=`$PTH_CONFIG --cflags`
77- PTH_LIBS=`$PTH_CONFIG --ldflags`
78- PTH_LIBS="$PTH_LIBS `$PTH_CONFIG --libs --all`"
79+ GNUPG_PTH_VERSION_CHECK($tmp)
80+ if test $have_pth = yes; then
81 AC_DEFINE(HAVE_PTH, 1,
82 [Defined if the GNU Pth is available])
83- fi
84 fi
85 AC_SUBST(PTH_CFLAGS)
86 AC_SUBST(PTH_LIBS)