Files
MINGW-packages/mingw-w64-gpgme/0005-invoke-scripts-via-sh.patch
2018-10-11 09:56:01 +03:00

50 lines
1.9 KiB
Diff

--- gpgme-1.12.0/lang/python/setup.py.in.orig 2017-12-14 10:16:43.374026000 +0300
+++ gpgme-1.12.0/lang/python/setup.py.in 2017-12-14 10:21:46.471530200 +0300
@@ -61,7 +61,7 @@
devnull = open(os.devnull, "w")
try:
- subprocess.check_call(gpgme_config + ['--version'], stdout=devnull)
+ subprocess.check_call(['sh'] + ['-c'] + [' '.join(gpgme_config + ['--version'])], stdout=devnull)
except:
sys.exit("Could not find gpgme-config. " +
"Please install the libgpgme development package.")
@@ -69,7 +69,7 @@
def getconfig(what, config=gpgme_config):
confdata = subprocess.Popen(
- config + ["--%s" % what], stdout=subprocess.PIPE).communicate()[0]
+ ['sh'] + ['-c'] + [' '.join(config + ["--%s" % what])], stdout=subprocess.PIPE).communicate()[0]
return [x for x in confdata.decode('utf-8').split() if x != '']
@@ -104,7 +104,7 @@
# Adjust include and library locations in case of win32
uname_s = os.popen("uname -s").read()
-if uname_s.startswith("MINGW32"):
+if uname_s.startswith("MINGW"):
mnts = [
x.split()[0:3:2] for x in os.popen("mount").read().split("\n") if x
]
@@ -184,7 +184,7 @@
try:
subprocess.check_call(
- gpg_error_config + ['--version'], stdout=devnull)
+ ['sh'] + ['-c'] + [' '.join(gpg_error_config + ['--version'])], stdout=devnull)
except:
sys.exit("Could not find gpg-error-config. " +
"Please install the libgpg-error development package.")
--- gpgme-1.10.0/lang/python/helpers.h.orig 2017-12-14 11:28:11.673618100 +0300
+++ gpgme-1.10.0/lang/python/helpers.h 2017-12-14 11:28:19.112231900 +0300
@@ -25,7 +25,7 @@
#include <gpgme.h>
#include "Python.h"
-#ifdef _WIN32
+#ifdef _MSC_VER
#include <windows.h>
#define write(fd, str, sz) {DWORD written; WriteFile((HANDLE) fd, str, sz, &written, 0);}
#endif