From owner-svn-ports-head@freebsd.org Sat Oct 13 17:48:40 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFA8910D0ED7; Sat, 13 Oct 2018 17:48:39 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 939D9839FF; Sat, 13 Oct 2018 17:48:39 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 88B1B12351; Sat, 13 Oct 2018 17:48:39 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9DHmdiK009240; Sat, 13 Oct 2018 17:48:39 GMT (envelope-from dbaio@FreeBSD.org) Received: (from dbaio@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9DHmd97009239; Sat, 13 Oct 2018 17:48:39 GMT (envelope-from dbaio@FreeBSD.org) Message-Id: <201810131748.w9DHmd97009239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dbaio set sender to dbaio@FreeBSD.org using -f From: "Danilo G. Baio" Date: Sat, 13 Oct 2018 17:48:39 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r481999 - in head/mail/pecl-mailparse: . files X-SVN-Group: ports-head X-SVN-Commit-Author: dbaio X-SVN-Commit-Paths: in head/mail/pecl-mailparse: . files X-SVN-Commit-Revision: 481999 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Oct 2018 17:48:40 -0000 Author: dbaio Date: Sat Oct 13 17:48:38 2018 New Revision: 481999 URL: https://svnweb.freebsd.org/changeset/ports/481999 Log: mail/pecl-mailparse: Fix build with PHP 7.3 Obtained from: upstream Added: head/mail/pecl-mailparse/files/ head/mail/pecl-mailparse/files/patch-PHP-73-compatibility (contents, props changed) Modified: head/mail/pecl-mailparse/Makefile Modified: head/mail/pecl-mailparse/Makefile ============================================================================== --- head/mail/pecl-mailparse/Makefile Sat Oct 13 17:45:42 2018 (r481998) +++ head/mail/pecl-mailparse/Makefile Sat Oct 13 17:48:38 2018 (r481999) @@ -13,6 +13,6 @@ LICENSE_FILE= ${WRKSRC}/LICENSE USES= php:pecl USE_PHP= mbstring:build -IGNORE_WITH_PHP= 56 73 +IGNORE_WITH_PHP= 56 .include Added: head/mail/pecl-mailparse/files/patch-PHP-73-compatibility ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/pecl-mailparse/files/patch-PHP-73-compatibility Sat Oct 13 17:48:38 2018 (r481999) @@ -0,0 +1,80 @@ +http://git.php.net/?p=pecl/mail/mailparse.git;a=patch;h=13c2c425e519b22660a03d566c35e76b3d4751dc +From 13c2c425e519b22660a03d566c35e76b3d4751dc Mon Sep 17 00:00:00 2001 +From: Jan-E +Date: Tue, 10 Jul 2018 17:42:24 +0200 +Subject: [PATCH] PHP 7.3 compatibility + +--- + mailparse.c | 13 +++++++++++++ + php_mailparse_mime.c | 9 +++++++++ + 2 files changed, 22 insertions(+) + +diff --git a/mailparse.c b/mailparse.c +index bf5be0f..f658d68 100644 +--- mailparse.c ++++ mailparse.c +@@ -984,12 +984,21 @@ PHP_FUNCTION(mailparse_stream_encode) + buf = emalloc(bufsize); + RETVAL_TRUE; + ++#if PHP_VERSION_ID >= 70300 ++ conv = mbfl_convert_filter_new(mbfl_no2encoding(mbfl_no_encoding_8bit), ++ mbfl_no2encoding(enc), ++ mailparse_stream_output, ++ mailparse_stream_flush, ++ deststream ++ ); ++#else + conv = mbfl_convert_filter_new(mbfl_no_encoding_8bit, + enc, + mailparse_stream_output, + mailparse_stream_flush, + deststream + ); ++#endif + + if (enc == mbfl_no_encoding_qprint) { + /* If the qp encoded section is going to be digitally signed, +@@ -1165,9 +1174,13 @@ PHP_FUNCTION(mailparse_msg_get_structure) + + mailparse_fetch_mimepart_resource(part, arg); + ++#if PHP_VERSION_ID >= 70300 ++ array_init(return_value); ++#else + if (array_init(return_value) == FAILURE) { + RETURN_FALSE; + } ++#endif + php_mimepart_enum_parts(part, &get_structure_callback, return_value); + } + /* }}} */ +diff --git a/php_mailparse_mime.c b/php_mailparse_mime.c +index b22eabb..8176c9d 100644 +--- php_mailparse_mime.c ++++ php_mailparse_mime.c +@@ -906,12 +906,21 @@ PHP_MAILPARSE_API void php_mimepart_decoder_prepare(php_mimepart *part, int do_d + if (from == mbfl_no_encoding_8bit || from == mbfl_no_encoding_7bit) { + part->extract_filter = NULL; + } else { ++#if PHP_VERSION_ID >= 70300 ++ part->extract_filter = mbfl_convert_filter_new( ++ mbfl_no2encoding(from), mbfl_no2encoding(mbfl_no_encoding_8bit), ++ filter_into_work_buffer, ++ NULL, ++ part ++ ); ++#else + part->extract_filter = mbfl_convert_filter_new( + from, mbfl_no_encoding_8bit, + filter_into_work_buffer, + NULL, + part + ); ++#endif + } + } + +-- +2.1.4 +