1 |
commit: 1dbc9be7219d95a6c05f0cea520ec931d9e18541 |
2 |
Author: Michael Haubenwallner <haubi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Feb 15 18:57:28 2019 +0000 |
4 |
Commit: Michael Haubenwallner <haubi <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Feb 15 18:57:43 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=1dbc9be7 |
7 |
|
8 |
dev-libs/openssl: fix cygwin binmode |
9 |
|
10 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
11 |
Signed-off-by: Michael Haubenwallner <haubi <AT> gentoo.org> |
12 |
|
13 |
.../files/openssl-1.1.1a-cygwin-binmode.patch | 32 ++++++++++++++++++++++ |
14 |
dev-libs/openssl/openssl-1.1.1a-r1.ebuild | 4 +-- |
15 |
2 files changed, 33 insertions(+), 3 deletions(-) |
16 |
|
17 |
diff --git a/dev-libs/openssl/files/openssl-1.1.1a-cygwin-binmode.patch b/dev-libs/openssl/files/openssl-1.1.1a-cygwin-binmode.patch |
18 |
new file mode 100644 |
19 |
index 0000000000..7ab2fd5065 |
20 |
--- /dev/null |
21 |
+++ b/dev-libs/openssl/files/openssl-1.1.1a-cygwin-binmode.patch |
22 |
@@ -0,0 +1,32 @@ |
23 |
+For the setmode(O_TEXT), not submitted upstream yet: |
24 |
+https://cygwin.com/ml/cygwin/2019-02/msg00150.html |
25 |
+https://cygwin.com/ml/cygwin/2019-02/msg00190.html |
26 |
+ |
27 |
+For the chmod 644, accepted upstream: |
28 |
+https://github.com/openssl/openssl/pull/8226 |
29 |
+--- openssl-1.1.1a/crypto/bio/bss_file.c.orig 2019-02-15 19:41:48.605378800 +0100 |
30 |
++++ openssl-1.1.1a/crypto/bio/bss_file.c 2019-02-15 19:42:53.136709200 +0100 |
31 |
+@@ -251,12 +251,6 @@ |
32 |
+ } else |
33 |
+ _setmode(fd, _O_BINARY); |
34 |
+ } |
35 |
+-# elif defined(OPENSSL_SYS_WIN32_CYGWIN) |
36 |
+- int fd = fileno((FILE *)ptr); |
37 |
+- if (num & BIO_FP_TEXT) |
38 |
+- setmode(fd, O_TEXT); |
39 |
+- else |
40 |
+- setmode(fd, O_BINARY); |
41 |
+ # endif |
42 |
+ } |
43 |
+ break; |
44 |
+--- openssl-1.1.1a/Configurations/unix-Makefile.tmpl.orig 2019-02-15 19:47:36.464755100 +0100 |
45 |
++++ openssl-1.1.1a/Configurations/unix-Makefile.tmpl 2019-02-15 19:47:42.605379700 +0100 |
46 |
+@@ -650,7 +650,7 @@ |
47 |
+ : {- output_off() unless windowsdll(); "" -}; \ |
48 |
+ $(ECHO) "install $$s -> $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \ |
49 |
+ cp $$s $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \ |
50 |
+- chmod 644 $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \ |
51 |
++ chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \ |
52 |
+ mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new \ |
53 |
+ $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \ |
54 |
+ : {- output_on() unless windowsdll(); "" -}{- output_off() if windowsdll(); "" -}; \ |
55 |
|
56 |
diff --git a/dev-libs/openssl/openssl-1.1.1a-r1.ebuild b/dev-libs/openssl/openssl-1.1.1a-r1.ebuild |
57 |
index 7e5e38380f..a6f6e713e2 100644 |
58 |
--- a/dev-libs/openssl/openssl-1.1.1a-r1.ebuild |
59 |
+++ b/dev-libs/openssl/openssl-1.1.1a-r1.ebuild |
60 |
@@ -37,6 +37,7 @@ PATCHES=( |
61 |
"${FILESDIR}"/${P}-preserve-system-error-number-in-a-few-more-places.patch |
62 |
"${FILESDIR}"/${P}-fix-a-minor-nit-in-hkdflabel-size.patch |
63 |
"${FILESDIR}"/${P}-fix-cert-with-rsa-instead-of-rsaEncryption.patch |
64 |
+ "${FILESDIR}"/${P}-cygwin-binmode.patch |
65 |
) |
66 |
|
67 |
# This does not copy the entire Fedora patchset, but JUST the parts that |
68 |
@@ -95,8 +96,6 @@ src_prepare() { |
69 |
if [[ $(declare -p PATCHES 2>/dev/null) == "declare -a"* ]] ; then |
70 |
[[ ${#PATCHES[@]} -gt 0 ]] && eapply "${PATCHES[@]}" |
71 |
fi |
72 |
- # for Cygwin, https://github.com/openssl/openssl/pull/8226 |
73 |
- sed -i -e '/chmod 644 .*bin/s/644/755/' Configurations/unix-Makefile.tmpl || die |
74 |
fi |
75 |
|
76 |
eapply_user #332661 |
77 |
@@ -138,7 +137,6 @@ src_prepare() { |
78 |
-e '/^$config{dirs}/s@ "test",@@' \ |
79 |
-i Configure || die |
80 |
fi |
81 |
- |
82 |
# The config script does stupid stuff to prompt the user. Kill it. |
83 |
sed -i '/stty -icanon min 0 time 50; read waste/d' config || die |
84 |
./config --test-sanity || die "I AM NOT SANE" |