aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/gpgme/gpgme/python-lang-config.patch
blob: 132e42677fadb62c98856c6483dd0532850e2301 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
gpgme/lang/python: gpg-error-config should not be used.

gpg-error-config was modified by OE to always return an error.  So we want
to find an alternative way to retrieve whatever it is we need.  It turns
out that the system is just trying to find the path to the gpg-error.h, which
we can pull in from the STAGING_INC environment.

Upstream-Status: Inappropriate [changes are specific to OE]

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>

Index: gpgme-1.8.0/lang/python/setup.py.in
===================================================================
--- gpgme-1.8.0.orig/lang/python/setup.py.in
+++ gpgme-1.8.0/lang/python/setup.py.in
@@ -24,7 +24,6 @@ import glob
 import subprocess
 
 # Out-of-tree build of the gpg bindings.
-gpg_error_config = ["gpg-error-config"]
 gpgme_config_flags = ["--thread=pthread"]
 gpgme_config = ["gpgme-config"] + gpgme_config_flags
 gpgme_h = ""
@@ -52,13 +51,6 @@ else:
     devnull = open(os.devnull, "w")
 
 try:
-    subprocess.check_call(gpg_error_config + ['--version'],
-                          stdout=devnull)
-except:
-    sys.exit("Could not find gpg-error-config.  " +
-             "Please install the libgpg-error development package.")
-
-try:
     subprocess.check_call(gpgme_config + ['--version'],
                           stdout=devnull)
 except:
@@ -81,12 +73,9 @@ if not (major > 1 or (major == 1 and min
 if not gpgme_h:
     gpgme_h = os.path.join(getconfig("prefix")[0], "include", "gpgme.h")
 
-gpg_error_prefix = getconfig("prefix", config=gpg_error_config)[0]
-gpg_error_h = os.path.join(gpg_error_prefix, "include", "gpg-error.h")
+gpg_error_h = os.path.join(os.getenv('STAGING_INCDIR'), "gpg-error.h")
 if not os.path.exists(gpg_error_h):
-    gpg_error_h = \
-        glob.glob(os.path.join(gpg_error_prefix, "include",
-                               "*", "gpg-error.h"))[0]
+    sys.exit("gpg_error_h not found: %s" % gpg_error_h)
 
 print("Building python gpg module using {} and {}.".format(gpgme_h, gpg_error_h))