1 |
commit: 263c4d2298d7a6c0d1cc778a4933a47088ceaadb |
2 |
Author: Michael Haubenwallner <haubi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 27 09:39:02 2019 +0000 |
4 |
Commit: Michael Haubenwallner <haubi <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 27 09:42:01 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=263c4d22 |
7 |
|
8 |
bootstrap-prefix.sh (stage1 python-3.6.8): apply cygwin patches |
9 |
|
10 |
Using cygwinports patches for stage1 python much like the ebuild does. |
11 |
Bug: https://bugs.gentoo.org/686522 |
12 |
Signed-off-by: Michael Haubenwallner <haubi <AT> gentoo.org> |
13 |
|
14 |
scripts/bootstrap-prefix.sh | 29 ++++++++++++++++++++++++++++- |
15 |
1 file changed, 28 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh |
18 |
index b3ab8cb4bb..224fbb5ba3 100755 |
19 |
--- a/scripts/bootstrap-prefix.sh |
20 |
+++ b/scripts/bootstrap-prefix.sh |
21 |
@@ -945,7 +945,34 @@ bootstrap_python() { |
22 |
patch -p0 < "${DISTDIR}"/python-3.6-02_all_disable_modules_and_ssl.patch |
23 |
fi |
24 |
|
25 |
- # Cygwin TODO: use cygwin python sources here? |
26 |
+ case ${CHOST} in |
27 |
+ (*-*-cygwin*) |
28 |
+ # apply patches from cygwinports much like the ebuild does |
29 |
+ local gitrev pf pn |
30 |
+ gitrev="71f2ac2444946c97d892be3892e47d2a509e0e96" # python36 3.6.8 |
31 |
+ efetch "https://github.com/cygwinports/python36/archive/${gitrev}.tar.gz" \ |
32 |
+ || return 1 |
33 |
+ gzip -dc "${DISTDIR}"/${gitrev}.tar.gz | tar -xf - |
34 |
+ [[ ${PIPESTATUS[*]} == '0 0' ]] || return 1 |
35 |
+ for pf in $( |
36 |
+ sed -ne '/PATCH_URI="/,/"/{s/.*="//;s/".*$//;p}' \ |
37 |
+ < python36-${gitrev}/python3.cygport |
38 |
+ ); do |
39 |
+ pf="python36-${gitrev}/${pf}" |
40 |
+ for pn in {1..2} fail; do |
41 |
+ if [[ ${pn} == fail ]]; then |
42 |
+ eerror "failed to apply ${pf}" |
43 |
+ return 1 |
44 |
+ fi |
45 |
+ patch -N -p${pn} -i "${pf}" --dry-run >/dev/null 2>&1 || continue |
46 |
+ echo "applying (-p${pn}) ${pf}" |
47 |
+ patch -N -p${pn} -i "${pf}" || return 1 |
48 |
+ break |
49 |
+ done |
50 |
+ done |
51 |
+ ;; |
52 |
+ esac |
53 |
+ |
54 |
local myconf="" |
55 |
|
56 |
case $CHOST in |