Codebase list gpgme1.0 / 3932a8a
refresh patches Daniel Kahn Gillmor 1 year, 5 months ago
5 changed file(s) with 34 addition(s) and 139 deletion(s). Raw diff Collapse all Expand all
0 From ae9258fbf3b9d434495ef11fc184a91fe7c4ca57 Mon Sep 17 00:00:00 2001
10 From: NIIBE Yutaka <gniibe@fsij.org>
21 Date: Thu, 15 Sep 2022 13:46:23 +0900
3 Subject: [PATCH] build:python: Don't use gpg-error-config/gpgme-config.
2 Subject: build:python: Don't use gpg-error-config/gpgme-config.
43
54 * lang/python/setup.py.in: Use @prefix@, @GPGME_CONFIG_LIBS@,
65 @GPGME_CONFIG_CFLAGS@, and @GPG_ERROR_CFLAGS@ of configure.
98
109 GnuPG-bug-id: 6204
1110 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
11 (cherry picked from commit ae9258fbf3b9d434495ef11fc184a91fe7c4ca57)
1212 ---
1313 lang/python/setup.py.in | 34 +++++-----------------------------
1414 1 file changed, 5 insertions(+), 29 deletions(-)
1515
1616 diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
17 index 9785a282..6741d3c8 100755
17 index 9785a28..6741d3c 100755
1818 --- a/lang/python/setup.py.in
1919 +++ b/lang/python/setup.py.in
20 @@ -26,77 +26,60 @@ import os
21 import os.path
22 import re
23 import shutil
24 import subprocess
20 @@ -30,9 +30,6 @@ import subprocess
2521 import sys
2622
2723 # Out-of-tree build of the gpg bindings.
3127 gpgme_h = ''
3228 include_dirs = [os.getcwd()]
3329 library_dirs = []
34 in_tree = False
35 extra_swig_opts = []
36 extra_macros = dict()
37
38 top_builddir = os.environ.get('top_builddir')
30 @@ -44,8 +41,6 @@ top_builddir = os.environ.get('top_builddir')
3931 if top_builddir:
4032 # In-tree build.
4133 in_tree = True
4436 gpgme_h = os.path.join(top_builddir, 'src/gpgme.h')
4537 library_dirs = [os.path.join(top_builddir,
4638 'src/.libs')] # XXX uses libtool internals
47 extra_macros.update(
48 HAVE_CONFIG_H=1,
49 HAVE_DATA_H=1,
50 IN_TREE_BUILD=1,
51 )
52
53 if hasattr(subprocess, 'DEVNULL'):
54 devnull = subprocess.DEVNULL
39 @@ -60,20 +55,8 @@ if hasattr(subprocess, 'DEVNULL'):
5540 else:
5641 devnull = open(os.devnull, 'w')
5742
7358 if '-' in version:
7459 version = version.split('-')[0]
7560 major, minor, patch = map(int, version.split('.'))
76
77 if not (major > 1 or (major == 1 and minor >= 7)):
61 @@ -82,17 +65,17 @@ if not (major > 1 or (major == 1 and minor >= 7)):
7862 sys.exit('Need at least GPGME version 1.7, found {}.'.format(version_raw))
7963
8064 if not gpgme_h:
9579 if item.startswith('-I'):
9680 include_dirs.append(item[2:])
9781 elif item.startswith('-D'):
98 defitem = item[2:].split('=', 1)
99 if len(defitem) == 2:
100 define_macros.append((defitem[0], defitem[1]))
101 else:
102 @@ -178,23 +161,16 @@ class BuildExtFirstHack(build):
103
104 def _generate_gpgme_h(self, source_name, sink_name):
105 print('Using gpgme.h from {}'.format(source_name))
106 shutil.copy2(source_name, sink_name)
82 @@ -182,15 +165,8 @@ class BuildExtFirstHack(build):
10783
10884 def _generate_errors_i(self):
10985
12096
12197 filter_re = re.compile(r'GPG_ERR_[^ ]* =')
12298 rewrite_re = re.compile(r' *(.*) = .*')
123
124 errors_i_content = ''
125 for line in gpg_error_content.splitlines():
126 if not filter_re.search(line):
127 --
128 2.35.1
129
0 From f1802682c3c8794edaca37966405bd1f070f5e01 Mon Sep 17 00:00:00 2001
10 From: NIIBE Yutaka <gniibe@fsij.org>
21 Date: Wed, 26 Oct 2022 11:02:36 +0900
3 Subject: [PATCH] python: Fix configure generating setup.py.
2 Subject: python: Fix configure generating setup.py.
43
54 * lang/python/setup.py.in: Handle the case, when substitutions
65 may be empty.
1110 Fixes-commit: ae9258fbf3b9d434495ef11fc184a91fe7c4ca57
1211 GnuPG-bug-id: 6204
1312 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
13 (cherry-picked from commit f1802682c3c8794edaca37966405bd1f070f5e01)
1414 ---
1515 lang/python/setup.py.in | 27 ++++++++++++++++-----------
1616 1 file changed, 16 insertions(+), 11 deletions(-)
1717
1818 diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
19 index 6741d3c8..6f36861d 100755
19 index 6741d3c..6f36861 100755
2020 --- a/lang/python/setup.py.in
2121 +++ b/lang/python/setup.py.in
22 @@ -64,30 +64,34 @@ major, minor, patch = map(int, version.split('.'))
23 if not (major > 1 or (major == 1 and minor >= 7)):
24 sys.exit('Need at least GPGME version 1.7, found {}.'.format(version_raw))
25
26 if not gpgme_h:
22 @@ -68,22 +68,26 @@ if not gpgme_h:
2723 gpgme_h = os.path.join('@prefix@', 'include', 'gpgme.h')
2824
2925 define_macros = []
6056
6157 # Adjust include and library locations in case of win32
6258 uname_s = os.popen('uname -s').read()
63 if uname_s.startswith('MINGW32'):
64 mnts = [
65 x.split()[0:3:2] for x in os.popen('mount').read().split('\n') if x
66 ]
67 @@ -161,16 +165,17 @@ class BuildExtFirstHack(build):
68
69 def _generate_gpgme_h(self, source_name, sink_name):
70 print('Using gpgme.h from {}'.format(source_name))
71 shutil.copy2(source_name, sink_name)
59 @@ -165,8 +169,9 @@ class BuildExtFirstHack(build):
7260
7361 def _generate_errors_i(self):
7462
7967
8068 filter_re = re.compile(r'GPG_ERR_[^ ]* =')
8169 rewrite_re = re.compile(r' *(.*) = .*')
82
83 errors_i_content = ''
84 for line in gpg_error_content.splitlines():
85 if not filter_re.search(line):
86 --
87 2.35.1
88
0 From 9f55dceca0cf2926d14cb4a70bd0cdc454d89f03 Mon Sep 17 00:00:00 2001
10 From: NIIBE Yutaka <gniibe@fsij.org>
21 Date: Wed, 2 Nov 2022 10:08:52 +0900
3 Subject: [PATCH] build: Prefer gpgrt-config when available.
2 Subject: build: Prefer gpgrt-config when available.
43
54 * src/gpgme.m4: Overriding the decision by --with-gpgme-prefix,
65 use gpgrt-config gpgme when gpgrt-config is available.
1110
1211 GnuPG-bug-id: 5034
1312 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
13 (cherry picked from commit 9f55dceca0cf2926d14cb4a70bd0cdc454d89f03)
1414 ---
1515 src/gpgme.m4 | 4 ++--
1616 1 file changed, 2 insertions(+), 2 deletions(-)
1717
1818 diff --git a/src/gpgme.m4 b/src/gpgme.m4
19 index c749a5dd..09a282d0 100644
19 index c749a5d..09a282d 100644
2020 --- a/src/gpgme.m4
2121 +++ b/src/gpgme.m4
22 @@ -5,15 +5,15 @@
23 # unlimited permission to copy and/or distribute it, with or without
24 # modifications, as long as this notice is preserved.
25 #
26 # This file is distributed in the hope that it will be useful, but
22 @@ -9,7 +9,7 @@
2723 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
2824 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
2925 #
3228
3329
3430 AC_DEFUN([_AM_PATH_GPGME_CONFIG],
35 [ AC_ARG_WITH(gpgme-prefix,
36 AS_HELP_STRING([--with-gpgme-prefix=PFX],
37 [prefix where GPGME is installed (optional)]),
38 gpgme_config_prefix="$withval", gpgme_config_prefix="")
39 @@ -33,15 +33,15 @@ AC_DEFUN([_AM_PATH_GPGME_CONFIG],
40 AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
41 ;;
42 esac
43 fi
31 @@ -37,7 +37,7 @@ AC_DEFUN([_AM_PATH_GPGME_CONFIG],
4432 fi
4533
4634 use_gpgrt_config=""
4937 if $GPGRT_CONFIG gpgme --exists; then
5038 GPGME_CONFIG="$GPGRT_CONFIG gpgme"
5139 AC_MSG_NOTICE([Use gpgrt-config as gpgme-config])
52 use_gpgrt_config=yes
53 fi
54 fi
55 if test -z "$use_gpgrt_config"; then
56 --
57 2.35.1
58
0 From abd51848bdc8a5ea5929f9cfb819a408dc53d463 Mon Sep 17 00:00:00 2001
10 From: NIIBE Yutaka <gniibe@fsij.org>
21 Date: Tue, 15 Nov 2022 13:40:57 +0900
3 Subject: [PATCH 1/2] gpgme.m4: Include _AM_PATH_GPGRT_CONFIG implementation.
2 Subject: gpgme.m4: Include _AM_PATH_GPGRT_CONFIG implementation.
43
54 * src/gpgme.m4 (_AM_PATH_GPGRT_CONFIG): New.
65 (_AM_PATH_GPGME_CONFIG): Require _AM_PATH_GPGRT_CONFIG.
98
109 GnuPG-bug-id: 6273
1110 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
11 (cherry-picked from abd51848bdc8a5ea5929f9cfb819a408dc53d463)
1212 ---
13 src/gpgme.m4 | 101 ++++++++++++++++++++++++++++++++++++++++++++++++---
13 src/gpgme.m4 | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1414 1 file changed, 95 insertions(+), 6 deletions(-)
1515
1616 diff --git a/src/gpgme.m4 b/src/gpgme.m4
17 index 09a282d0..363a84f3 100644
17 index 09a282d..363a84f 100644
1818 --- a/src/gpgme.m4
1919 +++ b/src/gpgme.m4
20 @@ -1,25 +1,114 @@
20 @@ -1,5 +1,5 @@
2121 # gpgme.m4 - autoconf macro to detect GPGME.
2222 -# Copyright (C) 2002, 2003, 2004, 2014, 2018 g10 Code GmbH
2323 +# Copyright (C) 2002, 2003, 2004, 2014, 2018, 2022 g10 Code GmbH
2424 #
2525 # This file is free software; as a special exception the author gives
2626 # unlimited permission to copy and/or distribute it, with or without
27 # modifications, as long as this notice is preserved.
28 #
29 # This file is distributed in the hope that it will be useful, but
27 @@ -9,13 +9,102 @@
3028 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
3129 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
3230 #
134132 gpgme_config_prefix="$withval", gpgme_config_prefix="")
135133 if test x"${GPGME_CONFIG}" = x ; then
136134 if test x"${gpgme_config_prefix}" != x ; then
137 GPGME_CONFIG="${gpgme_config_prefix}/bin/gpgme-config"
138 else
139 case "${SYSROOT}" in
140 /*)
141 --
142 2.35.1
143
0 From ae2057e6017427941aef00ccf1b7a9f6b0e3189c Mon Sep 17 00:00:00 2001
10 From: NIIBE Yutaka <gniibe@fsij.org>
21 Date: Tue, 15 Nov 2022 14:25:26 +0900
3 Subject: [PATCH 2/2] doc: Update documentation for gpgme.pc and pkg-config.
2 Subject: doc: Update documentation for gpgme.pc and pkg-config.
43
54 --
65
76 GnuPG-bug-id: 6274
87 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
8 (cherry-picked from ae2057e6017427941aef00ccf1b7a9f6b0e3189c)
99 ---
10 doc/gpgme.texi | 99 ++++++++++++++++++++++++++++----------------------
10 doc/gpgme.texi | 99 ++++++++++++++++++++++++++++++++--------------------------
1111 1 file changed, 55 insertions(+), 44 deletions(-)
1212
1313 diff --git a/doc/gpgme.texi b/doc/gpgme.texi
14 index 327a5ea1..e88bf2ac 100644
14 index 7f17815..66556aa 100644
1515 --- a/doc/gpgme.texi
1616 +++ b/doc/gpgme.texi
17 @@ -417,63 +417,76 @@ name space indirectly.
18 If you want to compile a source file including the `gpgme.h' header
19 file, you must make sure that the compiler can find it in the
20 directory hierarchy. This is accomplished by adding the path to the
21 directory in which the header file is located to the compilers include
17 @@ -421,18 +421,28 @@ directory in which the header file is located to the compilers include
2218 file search path (via the @option{-I} option).
2319
2420 However, the path to the include file is determined at the time the
5551 command line will ensure that the compiler can find the
5652 @acronym{GPGME} header file.
5753
58 A similar problem occurs when linking the program with the library.
54 @@ -440,36 +450,39 @@ A similar problem occurs when linking the program with the library.
5955 Again, the compiler has to find the library files. For this to work,
6056 the path to the library files has to be added to the library search
6157 path (via the @option{-L} option). For this, the option
112108
113109 @node Largefile Support (LFS)
114110 @section Largefile Support (LFS)
115 @cindex largefile support
116 @cindex LFS
117
118 @acronym{GPGME} is compiled with largefile support by default, if it
119 @@ -574,52 +587,51 @@ mode (@code{_LARGEFILE64_SOURCE}).
120 @node Using Automake
121 @section Using Automake
122 @cindex automake
123 @cindex autoconf
111 @@ -578,7 +591,7 @@ mode (@code{_LARGEFILE64_SOURCE}).
124112
125113 It is much easier if you use GNU Automake instead of writing your own
126114 Makefiles. If you do that you do not have to worry about finding and
129117 provides an extension to Automake that does all the work for you.
130118
131119 @c A simple macro for optional variables.
132 @macro ovar{varname}
120 @@ -586,20 +599,28 @@ provides an extension to Automake that does all the work for you.
133121 @r{[}@var{\varname\}@r{]}
134122 @end macro
135123 @defmac AM_PATH_GPGME (@ovar{minimum-version}, @ovar{action-if-found}, @ovar{action-if-not-found})
164152
165153 @code{AM_PATH_GPGME_PTHREAD} checks for the version of @acronym{GPGME}
166154 that can be used with the native pthread implementation, and defines
167 @code{GPGME_PTHREAD_CFLAGS} and @code{GPGME_PTHREAD_LIBS}. Since
155 @@ -607,15 +628,6 @@ that can be used with the native pthread implementation, and defines
168156 version 1.8.0 this is no longer required to GPGME_PTHREAD as
169157 @acronym{GPGME} itself is thread safe.
170158
180168 @end defmac
181169
182170 You can use the defined Autoconf variables like this in your
183 @file{Makefile.am}:
184
185 @example
186 AM_CPPFLAGS = $(GPGME_CFLAGS)
187 @@ -628,17 +640,16 @@ LDADD = $(GPGME_LIBS)
188
189
190 @node Using Libtool
191 @section Using Libtool
171 @@ -632,9 +644,8 @@ LDADD = $(GPGME_LIBS)
192172 @cindex libtool
193173
194174 The easiest way is to just use GNU Libtool. If you use libtool, and
200180
201181
202182 @node Library Version Check
203 @section Library Version Check
204 @cindex version check, of the library
205
206 @deftypefun {const char *} gpgme_check_version (@w{const char *@var{required_version}})
207 --
208 2.35.1
209