1 |
commit: 1d4c9d162b7b4bc557c1d3b5109dec9cd2653064 |
2 |
Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 24 07:50:54 2016 +0000 |
4 |
Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 24 07:51:16 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d4c9d16 |
7 |
|
8 |
app-crypt/gpgme: simpler python patch |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
|
12 |
.../gpgme/files/gpgme-1.7.0-build-python.patch | 71 ++++++++-------------- |
13 |
1 file changed, 25 insertions(+), 46 deletions(-) |
14 |
|
15 |
diff --git a/app-crypt/gpgme/files/gpgme-1.7.0-build-python.patch b/app-crypt/gpgme/files/gpgme-1.7.0-build-python.patch |
16 |
index 950813f..d37d297 100644 |
17 |
--- a/app-crypt/gpgme/files/gpgme-1.7.0-build-python.patch |
18 |
+++ b/app-crypt/gpgme/files/gpgme-1.7.0-build-python.patch |
19 |
@@ -1,4 +1,4 @@ |
20 |
-From a46cd3926d629da23b365b70b7bf24201c25d430 Mon Sep 17 00:00:00 2001 |
21 |
+From e5bccea346379a70fd9cb910c4ead9642227747f Mon Sep 17 00:00:00 2001 |
22 |
From: Alon Bar-Lev <alon.barlev@×××××.com> |
23 |
Date: Sat, 24 Sep 2016 01:26:19 +0300 |
24 |
Subject: [PATCH] build: lang: python: cleanups |
25 |
@@ -9,29 +9,21 @@ Subject: [PATCH] build: lang: python: cleanups |
26 |
anything. This is handy to enable standard distutils build outside of |
27 |
gpgme build system. |
28 |
|
29 |
-3. Treat data.h in similar manner as other VPATH issues, just copy it to |
30 |
- the srcdir to simplify build, remove the CFLAGS requirement of |
31 |
+3. Treat data.h in similar manner as other VPATH issues, just symlink it |
32 |
+ to the srcdir to simplify build, remove the CFLAGS requirement of |
33 |
distutils. |
34 |
|
35 |
-4. Add environment variable (binary_builddir) for setup to use alternate |
36 |
- build directory so that for multiple targets same binaries may be |
37 |
- used without rebuilding the C part. |
38 |
- |
39 |
The above does not alter the behavior of current build but supports the |
40 |
following sequence: |
41 |
|
42 |
-$ mkdir common |
43 |
-$ cd common |
44 |
+$ mkdir build |
45 |
+$ cd build |
46 |
$ ../configure --enable-languages= |
47 |
$ make |
48 |
-$ cd .. |
49 |
-$ mkdir python |
50 |
-$ cd python |
51 |
-$ ../configure --enable-languages= |
52 |
$ cd lang/python |
53 |
$ make prepare |
54 |
-$ binary_builddir="../../../common" ./setup.py build |
55 |
-$ binary_builddir="../../../common" ./setup.py install |
56 |
+$ ./setup.py build |
57 |
+$ ./setup.py install |
58 |
|
59 |
Notice the standard use of distutils which is required for package |
60 |
manager to control the python selection and build process. |
61 |
@@ -39,10 +31,9 @@ manager to control the python selection and build process. |
62 |
Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com> |
63 |
--- |
64 |
configure.ac | 2 +- |
65 |
- lang/python/Makefile.am | 11 ++++++----- |
66 |
+ lang/python/Makefile.am | 16 ++++++++++------ |
67 |
lang/python/gpgme.i | 2 +- |
68 |
- lang/python/setup.py.in | 9 +++++---- |
69 |
- 4 files changed, 13 insertions(+), 11 deletions(-) |
70 |
+ 3 files changed, 12 insertions(+), 8 deletions(-) |
71 |
|
72 |
diff --git a/configure.ac b/configure.ac |
73 |
index 4a29f2f..efa1f19 100644 |
74 |
@@ -60,17 +51,23 @@ index 4a29f2f..efa1f19 100644 |
75 |
|
76 |
echo " |
77 |
diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am |
78 |
-index 2271ce0..fb1eebf 100644 |
79 |
+index 2271ce0..9866f53 100644 |
80 |
--- a/lang/python/Makefile.am |
81 |
+++ b/lang/python/Makefile.am |
82 |
-@@ -51,17 +51,18 @@ copystamp: $(COPY_FILES) $(COPY_FILES_PYME) |
83 |
+@@ -46,24 +46,28 @@ COPY_FILES_PYME = \ |
84 |
+ |
85 |
+ # For VPATH builds we need to copy some files because Python's |
86 |
+ # distutils are not VPATH-aware. |
87 |
+-copystamp: $(COPY_FILES) $(COPY_FILES_PYME) |
88 |
++copystamp: $(COPY_FILES) $(COPY_FILES_PYME) data.h |
89 |
+ if test "$(srcdir)" != "$(builddir)" ; then \ |
90 |
cp -R $(COPY_FILES) . ; \ |
91 |
cp -R $(COPY_FILES_PYME) pyme ; \ |
92 |
fi |
93 |
-+ cp "$(top_srcdir)/src/data.h" . |
94 |
touch $@ |
95 |
|
96 |
-+prepare: copystamp |
97 |
++data.h: |
98 |
++ ln -s "$(top_srcdir)/src/data.h" |
99 |
+ |
100 |
all-local: copystamp |
101 |
for PYTHON in $(PYTHONS); do \ |
102 |
@@ -85,8 +82,13 @@ index 2271ce0..fb1eebf 100644 |
103 |
+ $(PYTHON) setup.py sdist --verbose |
104 |
gpg2 --detach-sign --armor dist/pyme3-$(VERSION).tar.gz |
105 |
|
106 |
++.PHONY: prepare |
107 |
++prepare: copystamp |
108 |
++ |
109 |
.PHONY: sdist |
110 |
-@@ -72,7 +73,7 @@ upload: dist/pyme3-$(VERSION).tar.gz dist/pyme3-$(VERSION).tar.gz.asc |
111 |
+ sdist: dist/pyme3-$(VERSION).tar.gz dist/pyme3-$(VERSION).tar.gz.asc |
112 |
+ |
113 |
+@@ -72,7 +76,7 @@ upload: dist/pyme3-$(VERSION).tar.gz dist/pyme3-$(VERSION).tar.gz.asc |
114 |
twine upload $^ |
115 |
|
116 |
CLEANFILES = gpgme.h errors.i gpgme_wrap.c pyme/gpgme.py \ |
117 |
@@ -108,29 +110,6 @@ index 84addae..ac666f4 100644 |
118 |
%} |
119 |
#endif |
120 |
|
121 |
-diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in |
122 |
-index 31892c1..ce06758 100755 |
123 |
---- a/lang/python/setup.py.in |
124 |
-+++ b/lang/python/setup.py.in |
125 |
-@@ -32,13 +32,14 @@ library_dirs = [] |
126 |
- in_tree = False |
127 |
- extra_swig_opts = [] |
128 |
- extra_macros = dict() |
129 |
-+binary_builddir=os.environ.get('binary_builddir', '../..') |
130 |
- |
131 |
--if os.path.exists("../../src/gpgme-config"): |
132 |
-+if os.path.exists(os.path.join(binary_builddir, "src/gpgme-config")): |
133 |
- # In-tree build. |
134 |
- in_tree = True |
135 |
-- gpgme_config = ["../../src/gpgme-config"] + gpgme_config_flags |
136 |
-- gpgme_h = "../../src/gpgme.h" |
137 |
-- library_dirs = ["../../src/.libs"] # XXX uses libtool internals |
138 |
-+ gpgme_config = [os.path.join(binary_builddir, "src/gpgme-config")] + gpgme_config_flags |
139 |
-+ gpgme_h = os.path.join(binary_builddir, "src/gpgme.h") |
140 |
-+ library_dirs = [os.path.join(binary_builddir, "src/.libs")] # XXX uses libtool internals |
141 |
- extra_macros.update( |
142 |
- HAVE_DATA_H=1, |
143 |
- IN_TREE_BUILD=1, |
144 |
-- |
145 |
2.7.3 |