summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-22 10:54:50 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-28 08:27:01 +0100
commit191a2d3f50727cce041e95953290b638bd685426 (patch)
tree5e808fe35f4c04140bb60fd21e1eaa67818342c1 /meta
parent3b3f0a66901ecc624e87081e30635db0116f68b9 (diff)
downloadpoky-191a2d3f50727cce041e95953290b638bd685426.tar.gz
libksba: Use pkg-config for dependencies
Use pkg-config in the m4 macros for the package, ensure we have a host field in the .pc file. (From OE-Core rev: 4a971a90988435902a4a8dd9c721d440cd80c0bd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch131
-rw-r--r--meta/recipes-support/libksba/libksba_1.3.0.bb4
2 files changed, 116 insertions, 19 deletions
diff --git a/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch b/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch
index fe1ec0ff2f..0f136fd6a4 100644
--- a/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch
+++ b/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch
@@ -6,10 +6,10 @@ They think pkgconfig adds no portability and maintaining them is not worthwhile.
6 6
7Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 7Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
8 8
9Index: Makefile.am 9Index: libksba-1.3.0/Makefile.am
10=============================================================== 10===================================================================
11--- a/Makefile.am 11--- libksba-1.3.0.orig/Makefile.am 2014-05-13 21:39:22.390385646 +0000
12+++ b/Makefile.am 12+++ libksba-1.3.0/Makefile.am 2014-05-13 21:39:22.462385646 +0000
13@@ -21,6 +21,9 @@ 13@@ -21,6 +21,9 @@
14 ACLOCAL_AMFLAGS = -I m4 -I gl/m4 14 ACLOCAL_AMFLAGS = -I m4 -I gl/m4
15 AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip 15 AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
@@ -20,24 +20,23 @@ Index: Makefile.am
20 # (A suitable gitlog-to-changelog script can be found in GnuPG master.) 20 # (A suitable gitlog-to-changelog script can be found in GnuPG master.)
21 GITLOG_TO_CHANGELOG=gitlog-to-changelog 21 GITLOG_TO_CHANGELOG=gitlog-to-changelog
22 22
23Index: configure.ac 23Index: libksba-1.3.0/configure.ac
24=============================================================== 24===================================================================
25--- a/configure.ac 25--- libksba-1.3.0.orig/configure.ac 2014-05-13 21:39:22.390385646 +0000
26+++ b/configure.ac 26+++ libksba-1.3.0/configure.ac 2014-05-13 21:39:22.462385646 +0000
27@@ -399,6 +399,7 @@ m4/Makefile 27@@ -400,6 +400,7 @@
28 gl/Makefile
29 src/Makefile 28 src/Makefile
30 src/ksba-config 29 src/ksba-config
31 src/versioninfo.rc 30 src/versioninfo.rc
32+ksba.pc 31+ksba.pc
33 tests/Makefile 32 tests/Makefile
34 doc/Makefile 33 doc/Makefile
35 34 ])
36Index: src/ksba.pc.in 35Index: libksba-1.3.0/ksba.pc.in
37=============================================================== 36===================================================================
38--- /dev/null 37--- /dev/null 1970-01-01 00:00:00.000000000 +0000
39+++ b/ksba.pc.in 38+++ libksba-1.3.0/ksba.pc.in 2014-05-13 21:39:22.462385646 +0000
40@@ -0,0 +1,16 @@ 39@@ -0,0 +1,17 @@
41+prefix=@prefix@ 40+prefix=@prefix@
42+exec_prefix=@exec_prefix@ 41+exec_prefix=@exec_prefix@
43+libdir=@libdir@ 42+libdir=@libdir@
@@ -45,6 +44,7 @@ Index: src/ksba.pc.in
45+ 44+
46+# API info 45+# API info
47+api_version=@KSBA_CONFIG_API_VERSION@ 46+api_version=@KSBA_CONFIG_API_VERSION@
47+host=@KSBA_CONFIG_HOST@
48+ 48+
49+Name: ksba 49+Name: ksba
50+Description: Libksba provides an easy API to create and parse X.509 and CMS related objects 50+Description: Libksba provides an easy API to create and parse X.509 and CMS related objects
@@ -54,6 +54,99 @@ Index: src/ksba.pc.in
54+Libs.private: -L{libdir} -lgpg-error 54+Libs.private: -L{libdir} -lgpg-error
55+Cflags: -I${includedir} 55+Cflags: -I${includedir}
56+ 56+
57-- 57Index: libksba-1.3.0/src/ksba.m4
581.7.5.4 58===================================================================
59 59--- libksba-1.3.0.orig/src/ksba.m4 2014-05-13 21:39:22.390385646 +0000
60+++ libksba-1.3.0/src/ksba.m4 2014-05-13 21:49:03.650382696 +0000
61@@ -22,18 +22,7 @@
62 dnl
63 AC_DEFUN([AM_PATH_KSBA],
64 [AC_REQUIRE([AC_CANONICAL_HOST])
65- AC_ARG_WITH(ksba-prefix,
66- AC_HELP_STRING([--with-ksba-prefix=PFX],
67- [prefix where KSBA is installed (optional)]),
68- ksba_config_prefix="$withval", ksba_config_prefix="")
69- if test x$ksba_config_prefix != x ; then
70- ksba_config_args="$ksba_config_args --prefix=$ksba_config_prefix"
71- if test x${KSBA_CONFIG+set} != xset ; then
72- KSBA_CONFIG=$ksba_config_prefix/bin/ksba-config
73- fi
74- fi
75
76- AC_PATH_PROG(KSBA_CONFIG, ksba-config, no)
77 tmp=ifelse([$1], ,1:1.0.0,$1)
78 if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
79 req_ksba_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
80@@ -43,48 +32,13 @@
81 min_ksba_version="$tmp"
82 fi
83
84- AC_MSG_CHECKING(for KSBA - version >= $min_ksba_version)
85- ok=no
86- if test "$KSBA_CONFIG" != "no" ; then
87- req_major=`echo $min_ksba_version | \
88- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
89- req_minor=`echo $min_ksba_version | \
90- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
91- req_micro=`echo $min_ksba_version | \
92- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
93- ksba_config_version=`$KSBA_CONFIG $ksba_config_args --version`
94- major=`echo $ksba_config_version | \
95- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
96- minor=`echo $ksba_config_version | \
97- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
98- micro=`echo $ksba_config_version | \
99- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
100- if test "$major" -gt "$req_major"; then
101- ok=yes
102- else
103- if test "$major" -eq "$req_major"; then
104- if test "$minor" -gt "$req_minor"; then
105- ok=yes
106- else
107- if test "$minor" -eq "$req_minor"; then
108- if test "$micro" -ge "$req_micro"; then
109- ok=yes
110- fi
111- fi
112- fi
113- fi
114- fi
115- fi
116- if test $ok = yes; then
117- AC_MSG_RESULT([yes ($ksba_config_version)])
118- else
119- AC_MSG_RESULT(no)
120- fi
121+ PKG_CHECK_MODULES(KSBA, [ksba >= $min_ksba_version], [ok=yes], [ok=no])
122+
123 if test $ok = yes; then
124 # Even if we have a recent libksba, we should check that the
125 # API is compatible.
126 if test "$req_ksba_api" -gt 0 ; then
127- tmp=`$KSBA_CONFIG --api-version 2>/dev/null || echo 0`
128+ tmp=`$PKG_CONFIG --variable=api_version ksba`
129 if test "$tmp" -gt 0 ; then
130 AC_MSG_CHECKING([KSBA API version])
131 if test "$req_ksba_api" -eq "$tmp" ; then
132@@ -97,10 +51,8 @@
133 fi
134 fi
135 if test $ok = yes; then
136- KSBA_CFLAGS=`$KSBA_CONFIG $ksba_config_args --cflags`
137- KSBA_LIBS=`$KSBA_CONFIG $ksba_config_args --libs`
138 ifelse([$2], , :, [$2])
139- libksba_config_host=`$LIBKSBA_CONFIG $ksba_config_args --host 2>/dev/null || echo none`
140+ libksba_config_host=`$PKG_CONFIG --variable=host ksba`
141 if test x"$libksba_config_host" != xnone ; then
142 if test x"$libksba_config_host" != x"$host" ; then
143 AC_MSG_WARN([[
144@@ -114,8 +66,6 @@
145 fi
146 fi
147 else
148- KSBA_CFLAGS=""
149- KSBA_LIBS=""
150 ifelse([$3], , :, [$3])
151 fi
152 AC_SUBST(KSBA_CFLAGS)
diff --git a/meta/recipes-support/libksba/libksba_1.3.0.bb b/meta/recipes-support/libksba/libksba_1.3.0.bb
index 7486befd73..4ea6856b97 100644
--- a/meta/recipes-support/libksba/libksba_1.3.0.bb
+++ b/meta/recipes-support/libksba/libksba_1.3.0.bb
@@ -18,3 +18,7 @@ SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \
18SRC_URI[md5sum] = "cd86fad9c9d360b2cf80449f8a4a4075" 18SRC_URI[md5sum] = "cd86fad9c9d360b2cf80449f8a4a4075"
19SRC_URI[sha256sum] = "5a61eed50550d4d0dcb47457ce7b6a90f8e719d42a3b25f7e79333e8cd721971" 19SRC_URI[sha256sum] = "5a61eed50550d4d0dcb47457ce7b6a90f8e719d42a3b25f7e79333e8cd721971"
20 20
21do_configure_prepend () {
22 # Else these could be used in preference to those in aclocal-copy
23 rm -f ${S}/m4/gpg-error.m4
24}