1From ee1421f7a7a9f31400ba992a5be52b88d20170c9 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 10 May 2019 14:18:04 +0800
4Subject: [PATCH] Revert "build: Make gpgme.m4 use gpgrt-config with *.pc."
5
6This reverts commit 60828a505a1c74fd34476c181df2a588ea6f9c83.
7
8The oe-core does not support gpgrt-config, so revert it
9
10Upstream-Status: Inappropriate [oe-core specific]
11
12Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
13
14---
15 src/gpgme.m4 | 54 ++++++++--------------------------------------------
16 1 file changed, 8 insertions(+), 46 deletions(-)
17
18diff --git a/src/gpgme.m4 b/src/gpgme.m4
19index f2906c1..8cc2898 100644
20--- a/src/gpgme.m4
21+++ b/src/gpgme.m4
22@@ -125,24 +125,10 @@ AC_REQUIRE([_AM_PATH_GPGRT_CONFIG])dnl
23      fi
24   fi
25
26-  use_gpgrt_config=""
27-  if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then
28-    if $GPGRT_CONFIG gpgme --exists; then
29-      GPGME_CONFIG="$GPGRT_CONFIG gpgme"
30-      AC_MSG_NOTICE([Use gpgrt-config as gpgme-config])
31-      use_gpgrt_config=yes
32-    fi
33-  fi
34-  if test -z "$use_gpgrt_config"; then
35-    AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no)
36-  fi
37+  AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no)
38
39   if test "$GPGME_CONFIG" != "no" ; then
40-    if test -z "$use_gpgrt_config"; then
41-      gpgme_version=`$GPGME_CONFIG --version`
42-    else
43-      gpgme_version=`$GPGME_CONFIG --modversion`
44-    fi
45+    gpgme_version=`$GPGME_CONFIG --version`
46   fi
47   gpgme_version_major=`echo $gpgme_version | \
48                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
49@@ -155,16 +141,12 @@ AC_REQUIRE([_AM_PATH_GPGRT_CONFIG])dnl
50
51 AC_DEFUN([_AM_PATH_GPGME_CONFIG_HOST_CHECK],
52 [
53-    if test -z "$use_gpgrt_config"; then
54-      gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none`
55-    else
56-      gpgme_config_host=`$GPGME_CONFIG --variable=host 2>/dev/null || echo none`
57-    fi
58+    gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none`
59     if test x"$gpgme_config_host" != xnone ; then
60       if test x"$gpgme_config_host" != x"$host" ; then
61   AC_MSG_WARN([[
62 ***
63-*** The config script "$GPGME_CONFIG" was
64+*** The config script $GPGME_CONFIG was
65 *** built for $gpgme_config_host and thus may not match the
66 *** used host $host.
67 *** You may want to use the configure option --with-gpgme-prefix
68@@ -225,11 +207,7 @@ AC_DEFUN([AM_PATH_GPGME],
69      # If we have a recent GPGME, we should also check that the
70      # API is compatible.
71      if test "$req_gpgme_api" -gt 0 ; then
72-        if test -z "$use_gpgrt_config"; then
73-          tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
74-        else
75-          tmp=`$GPGME_CONFIG --variable=api_version 2>/dev/null || echo 0`
76-        fi
77+        tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
78         if test "$tmp" -gt 0 ; then
79            if test "$req_gpgme_api" -ne "$tmp" ; then
80              ok=no
81@@ -372,11 +350,7 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
82      # If we have a recent GPGME, we should also check that the
83      # API is compatible.
84      if test "$req_gpgme_api" -gt 0 ; then
85-        if test -z "$use_gpgrt_config"; then
86-          tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
87-        else
88-          tmp=`$GPGME_CONFIG --variable=api_version 2>/dev/null || echo 0`
89-        fi
90+        tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
91         if test "$tmp" -gt 0 ; then
92            if test "$req_gpgme_api" -ne "$tmp" ; then
93              ok=no
94@@ -385,20 +359,8 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
95      fi
96   fi
97   if test $ok = yes; then
98-    if test -z "$use_gpgrt_config"; then
99-      GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --glib --cflags`
100-      GPGME_GLIB_LIBS=`$GPGME_CONFIG --glib --libs`
101-    else
102-      if $GPGRT_CONFIG gpgme-glib --exists; then
103-        GPGME_CONFIG="$GPGRT_CONFIG gpgme-glib"
104-        GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --cflags`
105-        GPGME_GLIB_LIBS=`$GPGME_CONFIG --libs`
106-      else
107-        ok = no
108-      fi
109-    fi
110-  fi
111-  if test $ok = yes; then
112+    GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --glib --cflags`
113+    GPGME_GLIB_LIBS=`$GPGME_CONFIG --glib --libs`
114     AC_MSG_RESULT(yes)
115     ifelse([$2], , :, [$2])
116     _AM_PATH_GPGME_CONFIG_HOST_CHECK
117