summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-28 11:49:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-29 10:58:54 +0100
commit1ef823481b0ae2fd1a2c45bf6b4c4bf37b253338 (patch)
tree24ed3a0673c754882334e337dda9b1a8df28be80
parent94ed114eff4efd86698713f21036cc98aeaa1364 (diff)
downloadpoky-1ef823481b0ae2fd1a2c45bf6b4c4bf37b253338.tar.gz
gpgme: Fix to use pkg-config in .m4 files
pkg-config is less error prone than -config files so switch to using it (we already do for most of the rest of the gpg stack). (From OE-Core rev: 046c7fd45fcf0c9226f76d51425978264930653b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-support/gpgme/gpgme-1.4.3/pkgconfig.patch278
-rw-r--r--meta/recipes-support/gpgme/gpgme_1.4.3.bb3
2 files changed, 280 insertions, 1 deletions
diff --git a/meta/recipes-support/gpgme/gpgme-1.4.3/pkgconfig.patch b/meta/recipes-support/gpgme/gpgme-1.4.3/pkgconfig.patch
new file mode 100644
index 0000000000..b29cd70790
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme-1.4.3/pkgconfig.patch
@@ -0,0 +1,278 @@
1Update gpgme to use pkgconfig instead of -config files since its
2simpler and less error prone when cross compiling.
3
4Upstream-Status: Rejected [Upstream not interested in pkg-config support]
5RP 2015/4/17
6
7Index: gpgme-1.4.3/configure.ac
8===================================================================
9--- gpgme-1.4.3.orig/configure.ac
10+++ gpgme-1.4.3/configure.ac
11@@ -1058,6 +1058,7 @@ AC_CONFIG_FILES(Makefile src/Makefile
12 src/versioninfo.rc
13 src/gpgme.h)
14 AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config)
15+AC_CONFIG_FILES(src/gpgme.pc src/gpgme-pthread.pc)
16 AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd])
17 AC_OUTPUT
18
19Index: gpgme-1.4.3/src/Makefile.am
20===================================================================
21--- gpgme-1.4.3.orig/src/Makefile.am
22+++ gpgme-1.4.3/src/Makefile.am
23@@ -20,11 +20,13 @@
24
25 # Note: moc_kdpipeiodevice should actually be a dependcy below.
26 EXTRA_DIST = gpgme-config.in gpgme.m4 libgpgme.vers ChangeLog-2011 \
27- gpgme.h.in versioninfo.rc.in gpgme.def moc_kdpipeiodevice.cpp
28+ gpgme.h.in versioninfo.rc.in gpgme.def moc_kdpipeiodevice.cpp gpgme.pc.in gpgme-pthread.pc.in
29
30 bin_SCRIPTS = gpgme-config
31 m4datadir = $(datadir)/aclocal
32 m4data_DATA = gpgme.m4
33+pkgconfigdir = $(libdir)/pkgconfig
34+pkgconfig_DATA = gpgme.pc gpgme-pthread.pc
35 nodist_include_HEADERS = gpgme.h
36
37 if HAVE_PTHREAD
38Index: gpgme-1.4.3/src/gpgme.pc.in
39===================================================================
40--- /dev/null
41+++ gpgme-1.4.3/src/gpgme.pc.in
42@@ -0,0 +1,15 @@
43+prefix=@prefix@
44+exec_prefix=@exec_prefix@
45+libdir=@libdir@
46+includedir=@includedir@
47+
48+# API info
49+api_version=@GPGME_CONFIG_API_VERSION@
50+host=@GPGME_CONFIG_HOST@
51+
52+Name: gpgme
53+Description: GnuPG Made Easy (GPGME) is a C language library that allows to addsupport for cryptography to a program.
54+Version: @VERSION@
55+Libs: -L${libdir} -lgpgme
56+Cflags: -I${includedir}
57+Requires: libassuan gpg-error
58\ No newline at end of file
59Index: gpgme-1.4.3/src/gpgme-pthread.pc.in
60===================================================================
61--- /dev/null
62+++ gpgme-1.4.3/src/gpgme-pthread.pc.in
63@@ -0,0 +1,15 @@
64+prefix=@prefix@
65+exec_prefix=@exec_prefix@
66+libdir=@libdir@
67+includedir=@includedir@
68+
69+# API info
70+api_version=@GPGME_CONFIG_API_VERSION@
71+host=@GPGME_CONFIG_HOST@
72+
73+Name: gpgme
74+Description: GnuPG Made Easy (GPGME) is a C language library that allows to addsupport for cryptography to a program (threaded version)
75+Version: @VERSION@
76+Libs: -L${libdir} -lgpgme-pthread -lpthread
77+Cflags: -I${includedir}
78+Requires: libassuan gpg-error
79Index: gpgme-1.4.3/src/gpgme.m4
80===================================================================
81--- gpgme-1.4.3.orig/src/gpgme.m4
82+++ gpgme-1.4.3/src/gpgme.m4
83@@ -36,7 +36,7 @@ dnl [ACTION-IF-FOUND [, AC
84 dnl Test for libgpgme and define GPGME_CFLAGS and GPGME_LIBS.
85 dnl
86 AC_DEFUN([AM_PATH_GPGME],
87-[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
88+[
89 tmp=ifelse([$1], ,1:0.4.2,$1)
90 if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
91 req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
92@@ -45,37 +45,12 @@ AC_DEFUN([AM_PATH_GPGME],
93 req_gpgme_api=0
94 min_gpgme_version="$tmp"
95 fi
96-
97- AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
98- ok=no
99- if test "$GPGME_CONFIG" != "no" ; then
100- req_major=`echo $min_gpgme_version | \
101- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
102- req_minor=`echo $min_gpgme_version | \
103- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
104- req_micro=`echo $min_gpgme_version | \
105- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
106- if test "$gpgme_version_major" -gt "$req_major"; then
107- ok=yes
108- else
109- if test "$gpgme_version_major" -eq "$req_major"; then
110- if test "$gpgme_version_minor" -gt "$req_minor"; then
111- ok=yes
112- else
113- if test "$gpgme_version_minor" -eq "$req_minor"; then
114- if test "$gpgme_version_micro" -ge "$req_micro"; then
115- ok=yes
116- fi
117- fi
118- fi
119- fi
120- fi
121- fi
122+ PKG_CHECK_MODULES(GPGME, [gpgme >= $min_gpgme_version], [ok=yes], [ok=no])
123 if test $ok = yes; then
124 # If we have a recent GPGME, we should also check that the
125 # API is compatible.
126 if test "$req_gpgme_api" -gt 0 ; then
127- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
128+ tmp=`$PKG_CONFIG --variable=api_version gpgme 2>/dev/null || echo 0`
129 if test "$tmp" -gt 0 ; then
130 if test "$req_gpgme_api" -ne "$tmp" ; then
131 ok=no
132@@ -84,18 +59,10 @@ AC_DEFUN([AM_PATH_GPGME],
133 fi
134 fi
135 if test $ok = yes; then
136- GPGME_CFLAGS=`$GPGME_CONFIG --cflags`
137- GPGME_LIBS=`$GPGME_CONFIG --libs`
138- AC_MSG_RESULT(yes)
139 ifelse([$2], , :, [$2])
140 else
141- GPGME_CFLAGS=""
142- GPGME_LIBS=""
143- AC_MSG_RESULT(no)
144 ifelse([$3], , :, [$3])
145 fi
146- AC_SUBST(GPGME_CFLAGS)
147- AC_SUBST(GPGME_LIBS)
148 ])
149
150 dnl AM_PATH_GPGME_PTHREAD([MINIMUM-VERSION,
151@@ -104,7 +71,7 @@ dnl Test for libgpgme and define GPGME_P
152 dnl and GPGME_PTHREAD_LIBS.
153 dnl
154 AC_DEFUN([AM_PATH_GPGME_PTHREAD],
155-[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
156+[
157 tmp=ifelse([$1], ,1:0.4.2,$1)
158 if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
159 req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
160@@ -114,38 +81,13 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD],
161 min_gpgme_version="$tmp"
162 fi
163
164- AC_MSG_CHECKING(for GPGME pthread - version >= $min_gpgme_version)
165- ok=no
166- if test "$GPGME_CONFIG" != "no" ; then
167- if `$GPGME_CONFIG --thread=pthread 2> /dev/null` ; then
168- req_major=`echo $min_gpgme_version | \
169- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
170- req_minor=`echo $min_gpgme_version | \
171- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
172- req_micro=`echo $min_gpgme_version | \
173- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
174- if test "$gpgme_version_major" -gt "$req_major"; then
175- ok=yes
176- else
177- if test "$gpgme_version_major" -eq "$req_major"; then
178- if test "$gpgme_version_minor" -gt "$req_minor"; then
179- ok=yes
180- else
181- if test "$gpgme_version_minor" -eq "$req_minor"; then
182- if test "$gpgme_version_micro" -ge "$req_micro"; then
183- ok=yes
184- fi
185- fi
186- fi
187- fi
188- fi
189- fi
190- fi
191+ PKG_CHECK_MODULES(GPGME_PTHREAD, [gpgme-pthread >= $min_gpgme_version], [ok=yes], [ok=no])
192+
193 if test $ok = yes; then
194 # If we have a recent GPGME, we should also check that the
195 # API is compatible.
196 if test "$req_gpgme_api" -gt 0 ; then
197- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
198+ tmp=`$PKG_CONFIG --variable=api_version gpgme-pthread 2>/dev/null || echo 0`
199 if test "$tmp" -gt 0 ; then
200 if test "$req_gpgme_api" -ne "$tmp" ; then
201 ok=no
202@@ -154,18 +96,10 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD],
203 fi
204 fi
205 if test $ok = yes; then
206- GPGME_PTHREAD_CFLAGS=`$GPGME_CONFIG --thread=pthread --cflags`
207- GPGME_PTHREAD_LIBS=`$GPGME_CONFIG --thread=pthread --libs`
208- AC_MSG_RESULT(yes)
209 ifelse([$2], , :, [$2])
210 else
211- GPGME_PTHREAD_CFLAGS=""
212- GPGME_PTHREAD_LIBS=""
213- AC_MSG_RESULT(no)
214 ifelse([$3], , :, [$3])
215 fi
216- AC_SUBST(GPGME_PTHREAD_CFLAGS)
217- AC_SUBST(GPGME_PTHREAD_LIBS)
218 ])
219
220
221@@ -184,36 +118,13 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
222 min_gpgme_version="$tmp"
223 fi
224
225- AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
226- ok=no
227- if test "$GPGME_CONFIG" != "no" ; then
228- req_major=`echo $min_gpgme_version | \
229- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
230- req_minor=`echo $min_gpgme_version | \
231- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
232- req_micro=`echo $min_gpgme_version | \
233- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
234- if test "$gpgme_version_major" -gt "$req_major"; then
235- ok=yes
236- else
237- if test "$gpgme_version_major" -eq "$req_major"; then
238- if test "$gpgme_version_minor" -gt "$req_minor"; then
239- ok=yes
240- else
241- if test "$gpgme_version_minor" -eq "$req_minor"; then
242- if test "$gpgme_version_micro" -ge "$req_micro"; then
243- ok=yes
244- fi
245- fi
246- fi
247- fi
248- fi
249- fi
250+ PKG_CHECK_MODULES(GPGME_GLIB, [gpgme >= $min_gpgme_version glib-2.0], [ok=yes], [ok=no])
251+
252 if test $ok = yes; then
253 # If we have a recent GPGME, we should also check that the
254 # API is compatible.
255 if test "$req_gpgme_api" -gt 0 ; then
256- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
257+ tmp=`$PKG_CONFIG --variable=api_version gpgme 2>/dev/null || echo 0`
258 if test "$tmp" -gt 0 ; then
259 if test "$req_gpgme_api" -ne "$tmp" ; then
260 ok=no
261@@ -222,17 +133,9 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
262 fi
263 fi
264 if test $ok = yes; then
265- GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --glib --cflags`
266- GPGME_GLIB_LIBS=`$GPGME_CONFIG --glib --libs`
267- AC_MSG_RESULT(yes)
268 ifelse([$2], , :, [$2])
269 else
270- GPGME_GLIB_CFLAGS=""
271- GPGME_GLIB_LIBS=""
272- AC_MSG_RESULT(no)
273 ifelse([$3], , :, [$3])
274 fi
275- AC_SUBST(GPGME_GLIB_CFLAGS)
276- AC_SUBST(GPGME_GLIB_LIBS)
277 ])
278
diff --git a/meta/recipes-support/gpgme/gpgme_1.4.3.bb b/meta/recipes-support/gpgme/gpgme_1.4.3.bb
index 98fd68b837..cba358984c 100644
--- a/meta/recipes-support/gpgme/gpgme_1.4.3.bb
+++ b/meta/recipes-support/gpgme/gpgme_1.4.3.bb
@@ -10,7 +10,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
10 file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d" 10 file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d"
11 11
12SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-${PV}.tar.bz2 \ 12SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-${PV}.tar.bz2 \
13 file://gpgme.pc" 13 file://gpgme.pc \
14 file://pkgconfig.patch"
14 15
15SRC_URI[md5sum] = "334e524cffa8af4e2f43ae8afe585672" 16SRC_URI[md5sum] = "334e524cffa8af4e2f43ae8afe585672"
16SRC_URI[sha256sum] = "2d1cc12411753752d9c5b9037e6fd3fd363517af720154768cc7b46b60120496" 17SRC_URI[sha256sum] = "2d1cc12411753752d9c5b9037e6fd3fd363517af720154768cc7b46b60120496"