summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-22 10:50:50 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-28 08:27:01 +0100
commit834245f0f76f6cdb9272e2b70ef4e807dd869bd7 (patch)
tree528b1f805ed86e3e4cf6603e389a90397451bada /meta/recipes-support
parent81bb1ab604f573379fb66b568fbd89ae19a16f53 (diff)
downloadpoky-834245f0f76f6cdb9272e2b70ef4e807dd869bd7.tar.gz
gnupg: Convert to use pkg-config for dependencies
Use pkg-config to find pth instead of pth-config and our own macros from aclocal-copy. (From OE-Core rev: 437ad15de308769c9251a37ed41dabed5653fc96) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r--meta/recipes-support/gnupg/gnupg/pkgconfig.patch86
-rw-r--r--meta/recipes-support/gnupg/gnupg_2.0.22.bb11
2 files changed, 96 insertions, 1 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)
diff --git a/meta/recipes-support/gnupg/gnupg_2.0.22.bb b/meta/recipes-support/gnupg/gnupg_2.0.22.bb
index c1ed28c5e6..2746578bb2 100644
--- a/meta/recipes-support/gnupg/gnupg_2.0.22.bb
+++ b/meta/recipes-support/gnupg/gnupg_2.0.22.bb
@@ -10,7 +10,8 @@ PTH_libc-uclibc = "npth"
10 10
11inherit autotools gettext texinfo 11inherit autotools gettext texinfo
12 12
13SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2" 13SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \
14 file://pkgconfig.patch"
14 15
15SRC_URI[md5sum] = "ee22e7b4fdbfcb50229c2e6db6db291e" 16SRC_URI[md5sum] = "ee22e7b4fdbfcb50229c2e6db6db291e"
16SRC_URI[sha256sum] = "437d0ab259854359fc48aa8795af80cff4975e559c111c92c03d0bc91408e251" 17SRC_URI[sha256sum] = "437d0ab259854359fc48aa8795af80cff4975e559c111c92c03d0bc91408e251"
@@ -23,6 +24,14 @@ EXTRA_OECONF = "--disable-ldap \
23 --with-readline=${STAGING_LIBDIR}/.. \ 24 --with-readline=${STAGING_LIBDIR}/.. \
24 " 25 "
25 26
27do_configure_prepend () {
28 # Else these could be used in prefernce to those in aclocal-copy
29 rm -f ${S}/m4/gpg-error.m4
30 rm -f ${S}/m4/libassuan.m4
31 rm -f ${S}/m4/ksba.m4
32 rm -f ${S}/m4/libgcrypt.m4
33}
34
26do_install_append() { 35do_install_append() {
27 ln -sf gpg2 ${D}${bindir}/gpg 36 ln -sf gpg2 ${D}${bindir}/gpg
28 ln -sf gpgv2 ${D}${bindir}/gpgv 37 ln -sf gpgv2 ${D}${bindir}/gpgv