diff options
author | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2021-07-15 20:32:07 +0000 |
---|---|---|
committer | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2021-07-15 20:32:07 +0000 |
commit | 596b9ad621cbab4051c66e874ddfd5368f10a4bc (patch) | |
tree | 00aee5fefb8f80eb65076491a2fe7e93e5e689a4 | |
parent | a6d41e17f39751ba524a236fad699d353cca4dac (diff) | |
download | ports-596b9ad621cbab4051c66e874ddfd5368f10a4bc.tar.gz ports-596b9ad621cbab4051c66e874ddfd5368f10a4bc.zip |
www/pear-HTTP_Request2: Update to 2.5.0
- Remove BUILD_DEPENDS
- Add NO_ARCH
- Reformat pkg-descr
Changes: https://pear.php.net/package/HTTP_Request2/download/
https://github.com/pear/HTTP_Request2/blob/trunk/Changelog.md
-rw-r--r-- | www/pear-HTTP_Request2/Makefile | 16 | ||||
-rw-r--r-- | www/pear-HTTP_Request2/distinfo | 6 | ||||
-rw-r--r-- | www/pear-HTTP_Request2/files/patch-HTTP_Request2_SocketWrapper.php | 48 | ||||
-rw-r--r-- | www/pear-HTTP_Request2/pkg-descr | 15 |
4 files changed, 18 insertions, 67 deletions
diff --git a/www/pear-HTTP_Request2/Makefile b/www/pear-HTTP_Request2/Makefile index f344a9db4727..f8aa2da0ff82 100644 --- a/www/pear-HTTP_Request2/Makefile +++ b/www/pear-HTTP_Request2/Makefile @@ -1,8 +1,7 @@ # Created by: Wen Heping <wenheping@gmail.com> PORTNAME= HTTP_Request2 -DISTVERSION= 2.4.2 -PORTREVISION= 1 +PORTVERSION= 2.5.0 PORTEPOCH= 1 CATEGORIES= www pear @@ -12,21 +11,22 @@ COMMENT= PEAR classes providing an easy way to perform HTTP requests LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/docs/LICENSE -BUILD_DEPENDS= ${PEARDIR}/Net/URL2.php:net/pear-Net_URL2@${PHP_FLAVOR} -RUN_DEPENDS= ${PEARDIR}/Net/URL2.php:net/pear-Net_URL2@${PHP_FLAVOR} +RUN_DEPENDS= ${PEAR_PKGNAMEPREFIX}Net_URL2>=0:net/pear-Net_URL2@${PHP_FLAVOR} -USES= pear +USES= pear + +NO_ARCH= yes OPTIONS_DEFINE= CURL FILEINFO ZLIB CURL_DESC= PHP CURL extension support FILEINFO_DESC= PHP FILEINFO extension support ZLIB_DESC= PECL ZLIB support -CURL_USES= php CURL_USE= PHP=curl -FILEINFO_USES= php +CURL_USES= php FILEINFO_USE= PHP=fileinfo -ZLIB_USES= php +FILEINFO_USES= php ZLIB_USE= PHP=zlib +ZLIB_USES= php .include <bsd.port.mk> diff --git a/www/pear-HTTP_Request2/distinfo b/www/pear-HTTP_Request2/distinfo index ee205fa79a6b..0973fe71339b 100644 --- a/www/pear-HTTP_Request2/distinfo +++ b/www/pear-HTTP_Request2/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1621504806 -SHA256 (PEAR/HTTP_Request2-2.4.2.tgz) = cd003956ee06409123dcf148c26f4930c0fe10d595e8413a9d65447372d960ed -SIZE (PEAR/HTTP_Request2-2.4.2.tgz) = 125530 +TIMESTAMP = 1626280972 +SHA256 (PEAR/HTTP_Request2-2.5.0.tgz) = 2dda2f0d147e2298456ee343a3ff54c242123fc0d9df1eedcf50b2de973eb504 +SIZE (PEAR/HTTP_Request2-2.5.0.tgz) = 126988 diff --git a/www/pear-HTTP_Request2/files/patch-HTTP_Request2_SocketWrapper.php b/www/pear-HTTP_Request2/files/patch-HTTP_Request2_SocketWrapper.php deleted file mode 100644 index 772670d4eb23..000000000000 --- a/www/pear-HTTP_Request2/files/patch-HTTP_Request2_SocketWrapper.php +++ /dev/null @@ -1,48 +0,0 @@ -From 63e6f932ab4004f0c09a080d370861d0323b6d33 Mon Sep 17 00:00:00 2001 -From: Alexey Borzov <avb@php.net> -Date: Fri, 25 Jun 2021 15:05:27 +0300 -Subject: [PATCH] Attempt to fix #23 or at least be more verbose - ---- HTTP/Request2/SocketWrapper.php.orig 2020-09-24 22:12:37 UTC -+++ HTTP/Request2/SocketWrapper.php -@@ -228,23 +228,31 @@ class HTTP_Request2_SocketWrapper - public function write($data) - { - $totalWritten = 0; -- while (strlen($data)) { -+ while (strlen($data) && !$this->eof()) { - $written = 0; -+ $error = null; - $timeouts = $this->_getTimeoutsForStreamSelect(); - -- $r = []; -+ $r = null; - $w = [$this->socket]; -- $e = []; -+ $e = null; - if (stream_select($r, $w, $e, $timeouts[0], $timeouts[1])) { -- // Notice: fwrite(): send of #### bytes failed with errno=10035 -- // A non-blocking socket operation could not be completed immediately. -- $written = @fwrite($this->socket, $data); -+ set_error_handler(static function ($errNo, $errStr) use (&$error) { -+ if (0 !== (E_NOTICE | E_WARNING) & $errNo) { -+ $error = $errStr; -+ } -+ }); -+ $written = fwrite($this->socket, $data); -+ restore_error_handler(); - } - $this->checkTimeout(); - -- // http://www.php.net/manual/en/function.fwrite.php#96951 -- if (0 === (int)$written) { -- throw new HTTP_Request2_MessageException('Error writing request'); -+ // php_sockop_write() defined in /main/streams/xp_socket.c may return zero written bytes for non-blocking -+ // sockets in case of transient errors. These writes will not have notices raised and should be retried -+ if (false === $written || 0 === $written && null !== $error) { -+ throw new HTTP_Request2_MessageException( -+ 'Error writing request' . (null === $error ? '' : ': ' . $error) -+ ); - } - $data = substr($data, $written); - $totalWritten += $written; diff --git a/www/pear-HTTP_Request2/pkg-descr b/www/pear-HTTP_Request2/pkg-descr index fe0a73780596..a2526e862555 100644 --- a/www/pear-HTTP_Request2/pkg-descr +++ b/www/pear-HTTP_Request2/pkg-descr @@ -1,11 +1,10 @@ -PHP5 rewrite of HTTP_Request package. Provides cleaner API and pluggable -Adapters. Currently available are: -* Socket adapter, based on old HTTP_Request code, -* Curl adapter, wraps around PHP's cURL extension, -* Mock adapter, to use for testing packages dependent on HTTP_Request2. +HTTP_Request2 provides cleaner API and pluggable Adapters: +- Socket adapter, based on old HTTP_Request code, +- Curl adapter, wraps around PHP's cURL extension, +- Mock adapter, to use for testing packages dependent on HTTP_Request2. -Supports POST requests with data and file uploads, authentication, -cookies, proxies, gzip and deflate encodings, monitoring the request -progress with Observers. +It supports POST requests with data and file uploads, basic and digest +authentication, cookies, managing cookies across requests, proxies, gzip and +deflate encodings, redirects, monitoring the request progress with Observers. WWW: https://pear.php.net/package/HTTP_Request2 |