<pre style='margin:0'>
Chih-Hsuan Yen (yan12125) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/a240ef818d25a4ecb22f689a2e5a3f1e338bfaa6">https://github.com/macports/macports-ports/commit/a240ef818d25a4ecb22f689a2e5a3f1e338bfaa6</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit a240ef818d25a4ecb22f689a2e5a3f1e338bfaa6
</span>Author: Chih-Hsuan Yen <yan12125@macports.org>
AuthorDate: Tue May 14 23:29:48 2019 +0800
<span style='display:block; white-space:pre;color:#404040;'> php5{2,3,4,5,6}-openssl: use openssl 1.0 via the old_openssl port group
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> They are not compatible with OpenSSL 1.1. For example, php56-openssl
</span><span style='display:block; white-space:pre;color:#404040;'> fails with:
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> /opt/local/var/macports/build/_Users_yen_var_syncthing_Projects_macports-ports_lang_php/php56-openssl/work/php-5.6.40/ext/openssl.c:1904:15: error: incomplete definition of type 'struct X509_extension_st'
</span><span style='display:block; white-space:pre;color:#404040;'> p = extension->value->data;
</span><span style='display:block; white-space:pre;color:#404040;'> ~~~~~~~~~^
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> All ports tested with the following PHP script:
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> <?php
</span><span style='display:block; white-space:pre;color:#404040;'> echo file_get_contents('https://httpbin.org/ip');
</span><span style='display:block; white-space:pre;color:#404040;'> ?>
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/58464
</span>---
lang/php/Portfile | 26 +++++++++++++++++-----
.../files/patch-php52-ext-openssl-config.m4.diff | 13 +++++++++++
.../files/patch-php53-ext-openssl-config.m4.diff | 13 +++++++++++
.../files/patch-php54-ext-openssl-config.m4.diff | 13 +++++++++++
.../files/patch-php55-ext-openssl-config.m4.diff | 13 +++++++++++
.../files/patch-php56-ext-openssl-config.m4.diff | 13 +++++++++++
6 files changed, 86 insertions(+), 5 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/php/Portfile b/lang/php/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index ef838a2..e75f6c6 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/php/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/php/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3,6 +3,7 @@
</span> PortSystem 1.0
PortGroup php 1.1
PortGroup compiler_blacklist_versions 1.0
<span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup old_openssl 1.0
</span>
name php
platforms darwin freebsd
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1327,11 +1328,11 @@ if {[vercmp ${branch} 5.5] >= 0} {
</span>
subport ${php}-openssl {
switch -- ${version} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- 5.2.17 {revision 0}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 5.3.29 {revision 0}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 5.4.45 {revision 0}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 5.5.38 {revision 0}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 5.6.40 {revision 0}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 5.2.17 {revision 1}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 5.3.29 {revision 1}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 5.4.45 {revision 1}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 5.5.38 {revision 1}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 5.6.40 {revision 1}
</span> 7.0.33 {revision 0}
7.1.29 {revision 0}
7.2.18 {revision 0}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1356,6 +1357,21 @@ subport ${php}-openssl {
</span>
configure.args-append --with-kerberos=${prefix} \
--with-openssl=${prefix}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[vercmp ${branch} 5.6] <= 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ openssl.branch 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ openssl.configure pkgconfig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # This patch is for reordering -I and -L flags during the build to make
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # openssl-1.0 directories appear before others
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append patch-${php}-ext-openssl-config.m4.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/ext/openssl/config.m4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace --with-openssl=${prefix} --with-openssl=shared
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
subport ${php}-oracle {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/php/files/patch-php52-ext-openssl-config.m4.diff b/lang/php/files/patch-php52-ext-openssl-config.m4.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..eaa5d1c
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/php/files/patch-php52-ext-openssl-config.m4.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ext/openssl/config.m4.orig 2019-01-09 17:54:13.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ext/openssl/config.m4 2019-05-11 16:52:27.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -32,4 +32,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ], [
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ AC_MSG_ERROR([OpenSSL check failed. Please check config.log for more information.])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ INCLUDES=`echo "$INCLUDES" | sed "s|-I@PREFIX@/include ||g"`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ INCLUDES="$INCLUDES -I@PREFIX@/include"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ LDFLAGS=`echo "$LDFLAGS" | sed "s|-L@PREFIX@/lib ||g"`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ OPENSSL_SHARED_LIBADD="$OPENSSL_SHARED_LIBADD -L@PREFIX@/lib"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/php/files/patch-php53-ext-openssl-config.m4.diff b/lang/php/files/patch-php53-ext-openssl-config.m4.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..eaa5d1c
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/php/files/patch-php53-ext-openssl-config.m4.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ext/openssl/config.m4.orig 2019-01-09 17:54:13.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ext/openssl/config.m4 2019-05-11 16:52:27.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -32,4 +32,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ], [
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ AC_MSG_ERROR([OpenSSL check failed. Please check config.log for more information.])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ INCLUDES=`echo "$INCLUDES" | sed "s|-I@PREFIX@/include ||g"`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ INCLUDES="$INCLUDES -I@PREFIX@/include"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ LDFLAGS=`echo "$LDFLAGS" | sed "s|-L@PREFIX@/lib ||g"`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ OPENSSL_SHARED_LIBADD="$OPENSSL_SHARED_LIBADD -L@PREFIX@/lib"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/php/files/patch-php54-ext-openssl-config.m4.diff b/lang/php/files/patch-php54-ext-openssl-config.m4.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..eaa5d1c
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/php/files/patch-php54-ext-openssl-config.m4.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ext/openssl/config.m4.orig 2019-01-09 17:54:13.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ext/openssl/config.m4 2019-05-11 16:52:27.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -32,4 +32,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ], [
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ AC_MSG_ERROR([OpenSSL check failed. Please check config.log for more information.])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ INCLUDES=`echo "$INCLUDES" | sed "s|-I@PREFIX@/include ||g"`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ INCLUDES="$INCLUDES -I@PREFIX@/include"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ LDFLAGS=`echo "$LDFLAGS" | sed "s|-L@PREFIX@/lib ||g"`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ OPENSSL_SHARED_LIBADD="$OPENSSL_SHARED_LIBADD -L@PREFIX@/lib"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/php/files/patch-php55-ext-openssl-config.m4.diff b/lang/php/files/patch-php55-ext-openssl-config.m4.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..eaa5d1c
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/php/files/patch-php55-ext-openssl-config.m4.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ext/openssl/config.m4.orig 2019-01-09 17:54:13.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ext/openssl/config.m4 2019-05-11 16:52:27.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -32,4 +32,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ], [
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ AC_MSG_ERROR([OpenSSL check failed. Please check config.log for more information.])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ INCLUDES=`echo "$INCLUDES" | sed "s|-I@PREFIX@/include ||g"`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ INCLUDES="$INCLUDES -I@PREFIX@/include"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ LDFLAGS=`echo "$LDFLAGS" | sed "s|-L@PREFIX@/lib ||g"`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ OPENSSL_SHARED_LIBADD="$OPENSSL_SHARED_LIBADD -L@PREFIX@/lib"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/php/files/patch-php56-ext-openssl-config.m4.diff b/lang/php/files/patch-php56-ext-openssl-config.m4.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..b88cdd8
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/php/files/patch-php56-ext-openssl-config.m4.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ext/openssl/config.m4.orig 2019-01-09 17:54:13.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ext/openssl/config.m4 2019-05-11 16:52:27.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -32,4 +32,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if test "$PHP_SYSTEM_CIPHERS" != "no"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ AC_DEFINE(USE_OPENSSL_SYSTEM_CIPHERS,1,[ Use system default cipher list instead of hardcoded value ])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ INCLUDES=`echo "$INCLUDES" | sed "s|-I@PREFIX@/include ||g"`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ INCLUDES="$INCLUDES -I@PREFIX@/include"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ LDFLAGS=`echo "$LDFLAGS" | sed "s|-L@PREFIX@/lib ||g"`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ OPENSSL_SHARED_LIBADD="$OPENSSL_SHARED_LIBADD -L@PREFIX@/lib"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span></pre><pre style='margin:0'>
</pre>