diff options
author | sevan <sevan@pkgsrc.org> | 2015-11-16 13:12:27 +0000 |
---|---|---|
committer | sevan <sevan@pkgsrc.org> | 2015-11-16 13:12:27 +0000 |
commit | f8f4e2a64f9ae5544014e6d7ea4b3ae76c642a4b (patch) | |
tree | 2072919eae1a28fd2d82976d300a8908affcf9b1 /lang | |
parent | 0ec84f6446eedcf26539e12efeefd68723d28400 (diff) | |
download | pkgsrc-f8f4e2a64f9ae5544014e6d7ea4b3ae76c642a4b.tar.gz |
Add patches obtained from LibreSSL to fix build when RAND_EGD() or SSLv3 support
is not present in SSL library.
Add workaround for decimal floating point support in older versions of GCC which
resolves build problem on OpenBSD.
Reviewed by wiz@
Diffstat (limited to 'lang')
-rw-r--r-- | lang/php54/Makefile | 8 | ||||
-rw-r--r-- | lang/php54/distinfo | 4 | ||||
-rw-r--r-- | lang/php54/patches/patch-ext_openssl_openssl.c | 21 | ||||
-rw-r--r-- | lang/php54/patches/patch-ext_openssl_xp__ssl.c | 37 |
4 files changed, 68 insertions, 2 deletions
diff --git a/lang/php54/Makefile b/lang/php54/Makefile index 5381a4302d7..6fcdd04cf24 100644 --- a/lang/php54/Makefile +++ b/lang/php54/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.32 2015/10/27 09:08:20 jperkin Exp $ +# $NetBSD: Makefile,v 1.33 2015/11/16 13:12:27 sevan Exp $ # # We can't omit PKGNAME here to handle PKG_OPTIONS. @@ -47,6 +47,12 @@ INSTALLATION_DIRS+= ${CGIDIR} ${PHP_EXTENSION_DIR} ${EGDIR} share/php CONFIGURE_ARGS+= --disable-libgcc .endif +.if ${OPSYS} == "OpenBSD" +# From PHP bug #68114 +# Workaround issue with decimal floating point support in older versions of GCC +CONFIGURE_ENV+= ac_cv_decimal_fp_supported=no +.endif + post-extract: cd ${WRKSRC} && \ ${FIND} . -xdev -type f -name '*.orig' -exec ${RM} -f {} \; diff --git a/lang/php54/distinfo b/lang/php54/distinfo index f3482c41b39..2d8f3fa39d3 100644 --- a/lang/php54/distinfo +++ b/lang/php54/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.64 2015/11/03 22:50:41 agc Exp $ +$NetBSD: distinfo,v 1.65 2015/11/16 13:12:27 sevan Exp $ SHA1 (php-5.4.45.tar.bz2) = 3032efebf7001e7720c5e42d9898d7077612e9b4 RMD160 (php-5.4.45.tar.bz2) = 352a0ea8fb75a447301c1434609ac0e4b96acc0c @@ -11,6 +11,8 @@ SHA1 (patch-configure) = df6209127b1e23d17bc7128da3a44f3e44bbfd48 SHA1 (patch-ext_gd_config.m4) = 2353efe6f25e1081b41d61033c3185cc643c7891 SHA1 (patch-ext_imap_config.m4) = 01681e8b54ee586ec4db72a5da2d0aec3fa89fcc SHA1 (patch-ext_mssql_php__mssql.c) = 732e48b05086180585a3087c2e9737db557dbc3b +SHA1 (patch-ext_openssl_openssl.c) = 25d2561acba8843fd8a5c067056f986b3acd8ca1 +SHA1 (patch-ext_openssl_xp__ssl.c) = 976cb9bee3928a4bb87164022e32754af7e40d8c SHA1 (patch-ext_pdo__mysql_config.m4) = 3526e737da25129710218e7141d5a05ae0a51390 SHA1 (patch-ext_pdo_config.m4) = 26a4ad02e5c6b7a54c3c54a6d026a3ccfed62c59 SHA1 (patch-ext_phar_Makefile.frag) = 1af23d9135557bc7ba2f3627b317d4cbef37aaba diff --git a/lang/php54/patches/patch-ext_openssl_openssl.c b/lang/php54/patches/patch-ext_openssl_openssl.c new file mode 100644 index 00000000000..8e3917b5785 --- /dev/null +++ b/lang/php54/patches/patch-ext_openssl_openssl.c @@ -0,0 +1,21 @@ +$NetBSD: patch-ext_openssl_openssl.c,v 1.4 2015/11/16 13:12:27 sevan Exp $ + +Unbreak when SSL library is without RAND_EGD() support. +Obtained from http://www.libressl.org/patches.html + +--- ext/openssl/openssl.c.orig Mon Nov 16 00:05:47 2015 ++++ ext/openssl/openssl.c +@@ -915,11 +915,13 @@ static int php_openssl_load_rand_file(const char * fil + + if (file == NULL) { + file = RAND_file_name(buffer, sizeof(buffer)); ++#ifdef HAVE_SSL_RAND_EGD + } else if (RAND_egd(file) > 0) { + /* if the given filename is an EGD socket, don't + * write anything back to it */ + *egdsocket = 1; + return SUCCESS; ++#endif + } + if (file == NULL || !RAND_load_file(file, -1)) { + if (RAND_status() == 0) { diff --git a/lang/php54/patches/patch-ext_openssl_xp__ssl.c b/lang/php54/patches/patch-ext_openssl_xp__ssl.c new file mode 100644 index 00000000000..3226072a353 --- /dev/null +++ b/lang/php54/patches/patch-ext_openssl_xp__ssl.c @@ -0,0 +1,37 @@ +$NetBSD: patch-ext_openssl_xp__ssl.c,v 1.1 2015/11/16 13:12:27 sevan Exp $ + +Unbreak when SSL library does not have SSLv3 support +Obtained from http://www.libressl.org/patches.html + +--- ext/openssl/xp_ssl.c.orig Mon Nov 16 00:05:21 2015 ++++ ext/openssl/xp_ssl.c +@@ -339,9 +339,14 @@ static inline int php_openssl_setup_crypto(php_stream + break; + #endif + case STREAM_CRYPTO_METHOD_SSLv3_CLIENT: ++#ifdef OPENSSL_NO_SSL3 ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSLv3 support is not compiled into the OpenSSL library PHP is linked against"); ++ return -1; ++#else + sslsock->is_client = 1; + method = SSLv3_client_method(); + break; ++#endif + case STREAM_CRYPTO_METHOD_TLS_CLIENT: + sslsock->is_client = 1; + method = TLSv1_client_method(); +@@ -351,9 +356,14 @@ static inline int php_openssl_setup_crypto(php_stream + method = SSLv23_server_method(); + break; + case STREAM_CRYPTO_METHOD_SSLv3_SERVER: ++#ifdef OPENSSL_NO_SSL3 ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSLv3 support is not compiled into the OpenSSL library PHP is linked against"); ++ return -1; ++#else + sslsock->is_client = 0; + method = SSLv3_server_method(); + break; ++#endif + case STREAM_CRYPTO_METHOD_SSLv2_SERVER: + #ifdef OPENSSL_NO_SSL2 + php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSLv2 support is not compiled into the OpenSSL library PHP is linked against"); |