refresh patches
Daniel Kahn Gillmor
1 year, 5 months ago
0 | From ae9258fbf3b9d434495ef11fc184a91fe7c4ca57 Mon Sep 17 00:00:00 2001 | |
1 | 0 | From: NIIBE Yutaka <gniibe@fsij.org> |
2 | 1 | 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. | |
4 | 3 | |
5 | 4 | * lang/python/setup.py.in: Use @prefix@, @GPGME_CONFIG_LIBS@, |
6 | 5 | @GPGME_CONFIG_CFLAGS@, and @GPG_ERROR_CFLAGS@ of configure. |
9 | 8 | |
10 | 9 | GnuPG-bug-id: 6204 |
11 | 10 | Signed-off-by: NIIBE Yutaka <gniibe@fsij.org> |
11 | (cherry picked from commit ae9258fbf3b9d434495ef11fc184a91fe7c4ca57) | |
12 | 12 | --- |
13 | 13 | lang/python/setup.py.in | 34 +++++----------------------------- |
14 | 14 | 1 file changed, 5 insertions(+), 29 deletions(-) |
15 | 15 | |
16 | 16 | diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in |
17 | index 9785a282..6741d3c8 100755 | |
17 | index 9785a28..6741d3c 100755 | |
18 | 18 | --- a/lang/python/setup.py.in |
19 | 19 | +++ 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 | |
25 | 21 | import sys |
26 | 22 | |
27 | 23 | # Out-of-tree build of the gpg bindings. |
31 | 27 | gpgme_h = '' |
32 | 28 | include_dirs = [os.getcwd()] |
33 | 29 | 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') | |
39 | 31 | if top_builddir: |
40 | 32 | # In-tree build. |
41 | 33 | in_tree = True |
44 | 36 | gpgme_h = os.path.join(top_builddir, 'src/gpgme.h') |
45 | 37 | library_dirs = [os.path.join(top_builddir, |
46 | 38 | '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'): | |
55 | 40 | else: |
56 | 41 | devnull = open(os.devnull, 'w') |
57 | 42 | |
73 | 58 | if '-' in version: |
74 | 59 | version = version.split('-')[0] |
75 | 60 | 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)): | |
78 | 62 | sys.exit('Need at least GPGME version 1.7, found {}.'.format(version_raw)) |
79 | 63 | |
80 | 64 | if not gpgme_h: |
95 | 79 | if item.startswith('-I'): |
96 | 80 | include_dirs.append(item[2:]) |
97 | 81 | 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): | |
107 | 83 | |
108 | 84 | def _generate_errors_i(self): |
109 | 85 | |
120 | 96 | |
121 | 97 | filter_re = re.compile(r'GPG_ERR_[^ ]* =') |
122 | 98 | 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 | |
1 | 0 | From: NIIBE Yutaka <gniibe@fsij.org> |
2 | 1 | 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. | |
4 | 3 | |
5 | 4 | * lang/python/setup.py.in: Handle the case, when substitutions |
6 | 5 | may be empty. |
11 | 10 | Fixes-commit: ae9258fbf3b9d434495ef11fc184a91fe7c4ca57 |
12 | 11 | GnuPG-bug-id: 6204 |
13 | 12 | Signed-off-by: NIIBE Yutaka <gniibe@fsij.org> |
13 | (cherry-picked from commit f1802682c3c8794edaca37966405bd1f070f5e01) | |
14 | 14 | --- |
15 | 15 | lang/python/setup.py.in | 27 ++++++++++++++++----------- |
16 | 16 | 1 file changed, 16 insertions(+), 11 deletions(-) |
17 | 17 | |
18 | 18 | diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in |
19 | index 6741d3c8..6f36861d 100755 | |
19 | index 6741d3c..6f36861 100755 | |
20 | 20 | --- a/lang/python/setup.py.in |
21 | 21 | +++ 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: | |
27 | 23 | gpgme_h = os.path.join('@prefix@', 'include', 'gpgme.h') |
28 | 24 | |
29 | 25 | define_macros = [] |
60 | 56 | |
61 | 57 | # Adjust include and library locations in case of win32 |
62 | 58 | 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): | |
72 | 60 | |
73 | 61 | def _generate_errors_i(self): |
74 | 62 | |
79 | 67 | |
80 | 68 | filter_re = re.compile(r'GPG_ERR_[^ ]* =') |
81 | 69 | 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 | |
1 | 0 | From: NIIBE Yutaka <gniibe@fsij.org> |
2 | 1 | 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. | |
4 | 3 | |
5 | 4 | * src/gpgme.m4: Overriding the decision by --with-gpgme-prefix, |
6 | 5 | use gpgrt-config gpgme when gpgrt-config is available. |
11 | 10 | |
12 | 11 | GnuPG-bug-id: 5034 |
13 | 12 | Signed-off-by: NIIBE Yutaka <gniibe@fsij.org> |
13 | (cherry picked from commit 9f55dceca0cf2926d14cb4a70bd0cdc454d89f03) | |
14 | 14 | --- |
15 | 15 | src/gpgme.m4 | 4 ++-- |
16 | 16 | 1 file changed, 2 insertions(+), 2 deletions(-) |
17 | 17 | |
18 | 18 | diff --git a/src/gpgme.m4 b/src/gpgme.m4 |
19 | index c749a5dd..09a282d0 100644 | |
19 | index c749a5d..09a282d 100644 | |
20 | 20 | --- a/src/gpgme.m4 |
21 | 21 | +++ 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 @@ | |
27 | 23 | # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the |
28 | 24 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
29 | 25 | # |
32 | 28 | |
33 | 29 | |
34 | 30 | 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], | |
44 | 32 | fi |
45 | 33 | |
46 | 34 | use_gpgrt_config="" |
49 | 37 | if $GPGRT_CONFIG gpgme --exists; then |
50 | 38 | GPGME_CONFIG="$GPGRT_CONFIG gpgme" |
51 | 39 | 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 | |
1 | 0 | From: NIIBE Yutaka <gniibe@fsij.org> |
2 | 1 | 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. | |
4 | 3 | |
5 | 4 | * src/gpgme.m4 (_AM_PATH_GPGRT_CONFIG): New. |
6 | 5 | (_AM_PATH_GPGME_CONFIG): Require _AM_PATH_GPGRT_CONFIG. |
9 | 8 | |
10 | 9 | GnuPG-bug-id: 6273 |
11 | 10 | Signed-off-by: NIIBE Yutaka <gniibe@fsij.org> |
11 | (cherry-picked from abd51848bdc8a5ea5929f9cfb819a408dc53d463) | |
12 | 12 | --- |
13 | src/gpgme.m4 | 101 ++++++++++++++++++++++++++++++++++++++++++++++++--- | |
13 | src/gpgme.m4 | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---- | |
14 | 14 | 1 file changed, 95 insertions(+), 6 deletions(-) |
15 | 15 | |
16 | 16 | diff --git a/src/gpgme.m4 b/src/gpgme.m4 |
17 | index 09a282d0..363a84f3 100644 | |
17 | index 09a282d..363a84f 100644 | |
18 | 18 | --- a/src/gpgme.m4 |
19 | 19 | +++ b/src/gpgme.m4 |
20 | @@ -1,25 +1,114 @@ | |
20 | @@ -1,5 +1,5 @@ | |
21 | 21 | # gpgme.m4 - autoconf macro to detect GPGME. |
22 | 22 | -# Copyright (C) 2002, 2003, 2004, 2014, 2018 g10 Code GmbH |
23 | 23 | +# Copyright (C) 2002, 2003, 2004, 2014, 2018, 2022 g10 Code GmbH |
24 | 24 | # |
25 | 25 | # This file is free software; as a special exception the author gives |
26 | 26 | # 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 @@ | |
30 | 28 | # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the |
31 | 29 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
32 | 30 | # |
134 | 132 | gpgme_config_prefix="$withval", gpgme_config_prefix="") |
135 | 133 | if test x"${GPGME_CONFIG}" = x ; then |
136 | 134 | 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 | |
1 | 0 | From: NIIBE Yutaka <gniibe@fsij.org> |
2 | 1 | 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. | |
4 | 3 | |
5 | 4 | -- |
6 | 5 | |
7 | 6 | GnuPG-bug-id: 6274 |
8 | 7 | Signed-off-by: NIIBE Yutaka <gniibe@fsij.org> |
8 | (cherry-picked from ae2057e6017427941aef00ccf1b7a9f6b0e3189c) | |
9 | 9 | --- |
10 | doc/gpgme.texi | 99 ++++++++++++++++++++++++++++---------------------- | |
10 | doc/gpgme.texi | 99 ++++++++++++++++++++++++++++++++-------------------------- | |
11 | 11 | 1 file changed, 55 insertions(+), 44 deletions(-) |
12 | 12 | |
13 | 13 | diff --git a/doc/gpgme.texi b/doc/gpgme.texi |
14 | index 327a5ea1..e88bf2ac 100644 | |
14 | index 7f17815..66556aa 100644 | |
15 | 15 | --- a/doc/gpgme.texi |
16 | 16 | +++ 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 | |
22 | 18 | file search path (via the @option{-I} option). |
23 | 19 | |
24 | 20 | However, the path to the include file is determined at the time the |
55 | 51 | command line will ensure that the compiler can find the |
56 | 52 | @acronym{GPGME} header file. |
57 | 53 | |
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. | |
59 | 55 | Again, the compiler has to find the library files. For this to work, |
60 | 56 | the path to the library files has to be added to the library search |
61 | 57 | path (via the @option{-L} option). For this, the option |
112 | 108 | |
113 | 109 | @node Largefile Support (LFS) |
114 | 110 | @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}). | |
124 | 112 | |
125 | 113 | It is much easier if you use GNU Automake instead of writing your own |
126 | 114 | Makefiles. If you do that you do not have to worry about finding and |
129 | 117 | provides an extension to Automake that does all the work for you. |
130 | 118 | |
131 | 119 | @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. | |
133 | 121 | @r{[}@var{\varname\}@r{]} |
134 | 122 | @end macro |
135 | 123 | @defmac AM_PATH_GPGME (@ovar{minimum-version}, @ovar{action-if-found}, @ovar{action-if-not-found}) |
164 | 152 | |
165 | 153 | @code{AM_PATH_GPGME_PTHREAD} checks for the version of @acronym{GPGME} |
166 | 154 | 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 | |
168 | 156 | version 1.8.0 this is no longer required to GPGME_PTHREAD as |
169 | 157 | @acronym{GPGME} itself is thread safe. |
170 | 158 | |
180 | 168 | @end defmac |
181 | 169 | |
182 | 170 | 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) | |
192 | 172 | @cindex libtool |
193 | 173 | |
194 | 174 | The easiest way is to just use GNU Libtool. If you use libtool, and |
200 | 180 | |
201 | 181 | |
202 | 182 | @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 |