[Pkg-gnupg-commit] [gpgme] 01/05: avoid failures on 32-bit platforms

Daniel Kahn Gillmor dkg at fifthhorseman.net
Fri Oct 14 20:31:12 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gpgme.

commit aae6b63b7e8042b36d20f4fe1434e55e02f7d9aa
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Fri Oct 14 13:38:21 2016 -0400

    avoid failures on 32-bit platforms
---
 debian/patches/0008-python-Include-config.h.patch | 123 ++++++++++++++++++++++
 debian/patches/series                             |   1 +
 2 files changed, 124 insertions(+)

diff --git a/debian/patches/0008-python-Include-config.h.patch b/debian/patches/0008-python-Include-config.h.patch
new file mode 100644
index 0000000..da7db35
--- /dev/null
+++ b/debian/patches/0008-python-Include-config.h.patch
@@ -0,0 +1,123 @@
+From: Justus Winter <justus at g10code.com>
+Date: Mon, 26 Sep 2016 11:35:40 +0200
+Subject: python: Include 'config.h'.
+
+* lang/python/Makefile.am: Pass 'top_builddir' to 'setup.py'.
+* lang/python/gpgme.i: Include 'config.h'.
+* lang/python/helpers.c: Likewise.
+* lang/python/helpers.h: Likewise.
+* lang/python/setup.py.in: Make sure that 'config.h' can be found.
+--
+Fixes build on 32 bit platforms with large file support.
+
+Signed-off-by: Justus Winter <justus at g10code.com>
+---
+ lang/python/Makefile.am | 1 +
+ lang/python/gpgme.i     | 8 ++++++++
+ lang/python/helpers.c   | 4 ++++
+ lang/python/helpers.h   | 4 ++++
+ lang/python/setup.py.in | 7 ++++++-
+ 5 files changed, 23 insertions(+), 1 deletion(-)
+
+diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
+index 2271ce0..1d7aee8 100644
+--- a/lang/python/Makefile.am
++++ b/lang/python/Makefile.am
+@@ -56,6 +56,7 @@ copystamp: $(COPY_FILES) $(COPY_FILES_PYME)
+ all-local: copystamp
+ 	for PYTHON in $(PYTHONS); do \
+ 	  CFLAGS="$(CFLAGS) -I$(top_srcdir)" \
++	  top_builddir="$(top_builddir)" \
+ 	    $$PYTHON setup.py build --verbose ; \
+ 	done
+ 
+diff --git a/lang/python/gpgme.i b/lang/python/gpgme.i
+index 84addae..a4672e1 100644
+--- a/lang/python/gpgme.i
++++ b/lang/python/gpgme.i
+@@ -547,6 +547,10 @@
+    some structs, which we provide prior to including the version for
+    SWIG.  */
+ %{
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
+ #include <gpgme.h>
+ %}
+ 
+@@ -575,6 +579,10 @@ struct _gpgme_sig_notation
+ 
+ /* Now include our local modified version.  Any structs defined above
+    are ignored.  */
++#ifdef HAVE_CONFIG_H
++%include "config.h"
++#endif
++
+ %include "gpgme.h"
+ 
+ %include "errors.i"
+diff --git a/lang/python/helpers.c b/lang/python/helpers.c
+index f9aec91..3724752 100644
+--- a/lang/python/helpers.c
++++ b/lang/python/helpers.c
+@@ -18,6 +18,10 @@
+ #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ */
+ 
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
+ #include <assert.h>
+ #include <stdio.h>
+ #include <gpgme.h>
+diff --git a/lang/python/helpers.h b/lang/python/helpers.h
+index 9200f93..67d23b2 100644
+--- a/lang/python/helpers.h
++++ b/lang/python/helpers.h
+@@ -18,6 +18,10 @@
+ #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ */
+ 
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
+ #include <gpgme.h>
+ #include "Python.h"
+ 
+diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
+index 31892c1..7af2d48 100755
+--- a/lang/python/setup.py.in
++++ b/lang/python/setup.py.in
+@@ -28,6 +28,7 @@ gpg_error_config = ["gpg-error-config"]
+ gpgme_config_flags = ["--thread=pthread"]
+ gpgme_config = ["gpgme-config"] + gpgme_config_flags
+ gpgme_h = ""
++include_dirs = [os.getcwd()]
+ library_dirs = []
+ in_tree = False
+ extra_swig_opts = []
+@@ -38,8 +39,13 @@ if os.path.exists("../../src/gpgme-config"):
+     in_tree = True
+     gpgme_config = ["../../src/gpgme-config"] + gpgme_config_flags
+     gpgme_h = "../../src/gpgme.h"
++    if 'top_builddir' in os.environ:
++        include_dirs.append(os.environ['top_builddir'])
++        # Make sure that SWIG finds config.h when processing gpgme.i.
++        extra_swig_opts.append("-I{0}".format(os.environ['top_builddir']))
+     library_dirs = ["../../src/.libs"] # XXX uses libtool internals
+     extra_macros.update(
++        HAVE_CONFIG_H=1,
+         HAVE_DATA_H=1,
+         IN_TREE_BUILD=1,
+     )
+@@ -94,7 +100,6 @@ subprocess.check_call([sys.executable, "gpgme-h-clean.py", gpgme_h],
+ subprocess.check_call([sys.executable, "gpgme-h-clean.py", gpg_error_h],
+                       stdout=open("errors.i", "w"))
+ 
+-include_dirs = [os.getcwd()]
+ define_macros = []
+ libs = getconfig('libs')
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 6d1ad5b..6c8916a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
 0005-tests-Add-test-for-cancellation.patch
 0006-install-cmake-files-without-executable-bit-set.patch
 0007-make-documentation-reproducible-by-omitting-HTML_TIM.patch
+0008-python-Include-config.h.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git



More information about the Pkg-gnupg-commit mailing list