summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-22 10:52:43 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-28 08:27:01 +0100
commitae5c64feba40a3ed24a32c4816170c366831c2c7 (patch)
tree045f1424b077a8dd57865a33c61f8d37d9ba0998 /meta/recipes-support
parent8557df11b592490d3dd6a389597b0cc3c920ec16 (diff)
downloadpoky-ae5c64feba40a3ed24a32c4816170c366831c2c7.tar.gz
libgcrypt: Use pkg-config for dependencies
Use pkg-config instead of -config files in the m4 macros. (From OE-Core rev: 74d73cf1e4607cb313b5e4c7138b555d5999a46d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r--meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch104
-rw-r--r--meta/recipes-support/libgcrypt/libgcrypt.inc5
2 files changed, 107 insertions, 2 deletions
diff --git a/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch b/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch
index 3e33679731..82c93bd44d 100644
--- a/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch
+++ b/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch
@@ -1,4 +1,8 @@
1Upstream-Status: Inappropriate [distribution] 1Add and use pkg-config for libgcrypt instead of -config scripts.
2
3Upstream-Status: Rejected [upstream have indicated they don't want a pkg-config dependency]
4
5RP 2014/5/22
2 6
3Index: libgcrypt-1.2.4/configure.ac 7Index: libgcrypt-1.2.4/configure.ac
4=================================================================== 8===================================================================
@@ -16,7 +20,7 @@ Index: libgcrypt-1.2.4/src/libgcrypt.pc.in
16=================================================================== 20===================================================================
17--- /dev/null 1970-01-01 00:00:00.000000000 +0000 21--- /dev/null 1970-01-01 00:00:00.000000000 +0000
18+++ libgcrypt-1.2.4/src/libgcrypt.pc.in 2008-03-19 22:14:58.000000000 +0000 22+++ libgcrypt-1.2.4/src/libgcrypt.pc.in 2008-03-19 22:14:58.000000000 +0000
19@@ -0,0 +1,32 @@ 23@@ -0,0 +1,33 @@
20+# Process this file with autoconf to produce a pkg-config metadata file. 24+# Process this file with autoconf to produce a pkg-config metadata file.
21+# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation 25+# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation
22+# Author: Simon Josefsson 26+# Author: Simon Josefsson
@@ -36,6 +40,7 @@ Index: libgcrypt-1.2.4/src/libgcrypt.pc.in
36+ 40+
37+# API info 41+# API info
38+api_version=@LIBGCRYPT_CONFIG_API_VERSION@ 42+api_version=@LIBGCRYPT_CONFIG_API_VERSION@
43+host=@LIBGCRYPT_CONFIG_HOST@
39+ 44+
40+# Misc information. 45+# Misc information.
41+symmetric_ciphers=@LIBGCRYPT_CIPHERS@ 46+symmetric_ciphers=@LIBGCRYPT_CIPHERS@
@@ -49,3 +54,98 @@ Index: libgcrypt-1.2.4/src/libgcrypt.pc.in
49+Libs: -L${libdir} -lgcrypt 54+Libs: -L${libdir} -lgcrypt
50+Libs.private: -L${libdir} -lgpg-error 55+Libs.private: -L${libdir} -lgpg-error
51+Cflags: -I${includedir} 56+Cflags: -I${includedir}
57Index: libgcrypt-1.6.1/src/libgcrypt.m4
58===================================================================
59--- libgcrypt-1.6.1.orig/src/libgcrypt.m4 2013-12-16 17:44:32.000000000 +0000
60+++ libgcrypt-1.6.1/src/libgcrypt.m4 2014-05-13 21:25:37.478389833 +0000
61@@ -22,17 +22,7 @@
62 dnl
63 AC_DEFUN([AM_PATH_LIBGCRYPT],
64 [ AC_REQUIRE([AC_CANONICAL_HOST])
65- AC_ARG_WITH(libgcrypt-prefix,
66- AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
67- [prefix where LIBGCRYPT is installed (optional)]),
68- libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
69- if test x$libgcrypt_config_prefix != x ; then
70- if test x${LIBGCRYPT_CONFIG+set} != xset ; then
71- LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config
72- fi
73- fi
74
75- AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
76 tmp=ifelse([$1], ,1:1.2.0,$1)
77 if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
78 req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
79@@ -42,48 +32,13 @@
80 min_libgcrypt_version="$tmp"
81 fi
82
83- AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version)
84- ok=no
85- if test "$LIBGCRYPT_CONFIG" != "no" ; then
86- req_major=`echo $min_libgcrypt_version | \
87- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
88- req_minor=`echo $min_libgcrypt_version | \
89- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
90- req_micro=`echo $min_libgcrypt_version | \
91- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
92- libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
93- major=`echo $libgcrypt_config_version | \
94- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
95- minor=`echo $libgcrypt_config_version | \
96- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
97- micro=`echo $libgcrypt_config_version | \
98- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
99- if test "$major" -gt "$req_major"; then
100- ok=yes
101- else
102- if test "$major" -eq "$req_major"; then
103- if test "$minor" -gt "$req_minor"; then
104- ok=yes
105- else
106- if test "$minor" -eq "$req_minor"; then
107- if test "$micro" -ge "$req_micro"; then
108- ok=yes
109- fi
110- fi
111- fi
112- fi
113- fi
114- fi
115- if test $ok = yes; then
116- AC_MSG_RESULT([yes ($libgcrypt_config_version)])
117- else
118- AC_MSG_RESULT(no)
119- fi
120+ PKG_CHECK_MODULES(LIBGCRYPT, [libgcrypt >= $min_libgcrypt_version], [ok=yes], [ok=no])
121+
122 if test $ok = yes; then
123 # If we have a recent libgcrypt, we should also check that the
124 # API is compatible
125 if test "$req_libgcrypt_api" -gt 0 ; then
126- tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
127+ tmp=`$PKG_CONFIG --variable=api_version libgcrypt`
128 if test "$tmp" -gt 0 ; then
129 AC_MSG_CHECKING([LIBGCRYPT API version])
130 if test "$req_libgcrypt_api" -eq "$tmp" ; then
131@@ -96,10 +51,8 @@
132 fi
133 fi
134 if test $ok = yes; then
135- LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
136- LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
137 ifelse([$2], , :, [$2])
138- libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
139+ libgcrypt_config_host=`$PKG_CONFIG --variable=host libgcrypt`
140 if test x"$libgcrypt_config_host" != xnone ; then
141 if test x"$libgcrypt_config_host" != x"$host" ; then
142 AC_MSG_WARN([[
143@@ -113,8 +66,6 @@
144 fi
145 fi
146 else
147- LIBGCRYPT_CFLAGS=""
148- LIBGCRYPT_LIBS=""
149 ifelse([$3], , :, [$3])
150 fi
151 AC_SUBST(LIBGCRYPT_CFLAGS)
diff --git a/meta/recipes-support/libgcrypt/libgcrypt.inc b/meta/recipes-support/libgcrypt/libgcrypt.inc
index 724bf3d5a0..8afa945648 100644
--- a/meta/recipes-support/libgcrypt/libgcrypt.inc
+++ b/meta/recipes-support/libgcrypt/libgcrypt.inc
@@ -18,6 +18,11 @@ inherit autotools-brokensep texinfo binconfig pkgconfig
18 18
19EXTRA_OECONF = "--disable-asm --with-capabilities" 19EXTRA_OECONF = "--disable-asm --with-capabilities"
20 20
21do_configure_prepend () {
22 # Else these could be used in prefernce to those in aclocal-copy
23 rm ${S}/m4/*.m4
24}
25
21# libgcrypt.pc is added locally and thus installed here 26# libgcrypt.pc is added locally and thus installed here
22do_install_append() { 27do_install_append() {
23 install -d ${D}/${libdir}/pkgconfig 28 install -d ${D}/${libdir}/pkgconfig