diff --git a/devel/arcanist-lib/Makefile b/devel/arcanist-lib/Makefile index 88851111a747..35298455a620 100644 --- a/devel/arcanist-lib/Makefile +++ b/devel/arcanist-lib/Makefile @@ -1,92 +1,92 @@ PORTNAME?= arcanist PORTVERSION?= 20220518 -PORTREVISION?= 3 +PORTREVISION?= 4 CATEGORIES?= devel PKGNAMESUFFIX= ${SLAVE_PKGNAMESUFFIX}${PHP_PKGNAMESUFFIX} MAINTAINER= grembo@FreeBSD.org COMMENT?= Libraries for the command line interface for Phabricator WWW?= https://secure.phabricator.com/book/arcanist/ SLAVEPORT?= lib LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE PHP_DESTDIR= lib/php/arcanist USES= php:cli,flavors python:env shebangfix SHEBANG_FILES= bin/arc \ bin/phage \ scripts/*.php \ scripts/hgdaemon/*.php \ src/parser/*.php \ support/arcanoid/arcanoid.py \ support/lib/*.php \ support/unit/*.php \ support/xhpast/*.php \ support/xhpast/bin/*.php USE_PHP= curl dom hash json simplexml zlib USE_GITHUB= yes NO_BUILD= yes NO_ARCH= yes PORTSCOUT= ignore:1 GH_ACCOUNT= phacility GH_TAGNAME= 85c953e PLIST= ${.CURDIR}/pkg-plist .if ${SLAVEPORT} == lib SLAVE_PKGNAMESUFFIX= -${SLAVEPORT} RUN_DEPENDS= ca_root_nss>0:security/ca_root_nss OPTIONS_DEFINE= ENCODINGS OPTIONS_DEFAULT=ENCODINGS ENCODINGS_DESC= Support for encodings other than utf-8 ENCODINGS_USE= PHP=mbstring .else # link only RUN_DEPENDS= arcanist-lib${PHP_PKGNAMESUFFIX}>0:devel/arcanist-lib@${PHP_FLAVOR} CONFLICTS= arc arcanist-php?? PLIST_FILES= bin/arc .endif do-install: .if ${SLAVEPORT} == bin ${RLN} ../${PHP_DESTDIR}/bin/arc ${STAGEDIR}${PREFIX}/bin/arc .else @${MKDIR} ${STAGEDIR}${PREFIX}/${PHP_DESTDIR} cd ${WRKSRC} ; ${PAX} -rw * ${STAGEDIR}${PREFIX}/${PHP_DESTDIR} @${MKDIR} ${STAGEDIR}${PREFIX}/share/bash-completion/completions/ @${REINPLACE_CMD} \ 's|%%PREFIX%%|${PREFIX}|g; \ s|%%PHP_DESTDIR%%|${PHP_DESTDIR}|g' \ ${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/support/shell/hooks/bash-completion.sh @${REINPLACE_CMD} \ 's|%%PKGNAME%%|${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}|g; \ s|%%PKGVERSION%%|${PKGVERSION}|g; \ s|%%PKGORIGIN%%|${PKGORIGIN}|g' \ ${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/src/toolset/workflow/ArcanistVersionWorkflow.php @${REINPLACE_CMD} \ 's|%%PHP_CMD%%|${PREFIX}/bin/php|g' \ ${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/src/lint/linter/ArcanistPhpLinter.php \ ${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/src/moduleutils/PhutilLibraryMapBuilder.php \ ${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/src/phage/bootloader/PhagePHPAgentBootloader.php \ ${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/src/runtime/ArcanistRuntime.php \ ${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/src/utils/PhutilExecutionEnvironment.php \ ${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/src/workflow/ArcanistLiberateWorkflow.php @${REINPLACE_CMD} \ 's|%%PYTHON_CMD%%|${PYTHON_CMD}|g' \ ${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/src/workflow/ArcanistAnoidWorkflow.php ${LN} -sf ${LOCALBASE}/share/certs/ca-root-nss.crt \ ${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/resources/ssl/default.pem ${RLN} ${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/support/shell/hooks/bash-completion.sh \ ${STAGEDIR}${PREFIX}/share/bash-completion/completions/arc ${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/bin/arc shell-complete --generate .endif .include diff --git a/devel/arcanist-lib/files/patch-src_error_PhutilErrorHandler.php b/devel/arcanist-lib/files/patch-src_error_PhutilErrorHandler.php new file mode 100644 index 000000000000..c5a89b45c7de --- /dev/null +++ b/devel/arcanist-lib/files/patch-src_error_PhutilErrorHandler.php @@ -0,0 +1,14 @@ +--- src/error/PhutilErrorHandler.php.orig 2022-05-17 23:20:14 UTC ++++ src/error/PhutilErrorHandler.php +@@ -181,6 +181,11 @@ final class PhutilErrorHandler extends Phobject { + * @task internal + */ + public static function handleError($num, $str, $file, $line, $ctx = null) { ++ // work around PHP 8.1+ null argument deprecation error ++ if ($num === E_DEPRECATED && preg_match('/Passing null to parameter #.* of type .* is deprecated/', $str)) { ++ return true; ++ } ++ + foreach (self::$traps as $trap) { + $trap->addError($num, $str, $file, $line); + } diff --git a/devel/arcanist-lib/files/patch-src_parser_ArcanistBundle.php b/devel/arcanist-lib/files/patch-src_parser_ArcanistBundle.php deleted file mode 100644 index 095e1b24ee81..000000000000 --- a/devel/arcanist-lib/files/patch-src_parser_ArcanistBundle.php +++ /dev/null @@ -1,20 +0,0 @@ ---- src/parser/ArcanistBundle.php.orig 2022-09-08 16:04:09 UTC -+++ src/parser/ArcanistBundle.php -@@ -762,7 +762,7 @@ final class ArcanistBundle extends Phobject { - $old_data = $this->getBlob($old_phid, $name); - } - -- $old_length = strlen($old_data); -+ $old_length = strlen($old_data ?? ''); - - // Here, and below, the binary will be emitted with base85 encoding. This - // encoding encodes each 4 bytes of input in 5 bytes of output, so we may -@@ -795,7 +795,7 @@ final class ArcanistBundle extends Phobject { - $new_data = $this->getBlob($new_phid, $name); - } - -- $new_length = strlen($new_data); -+ $new_length = strlen($new_data ?? ''); - $this->reserveBytes($new_length * 5 / 4); - - if ($new_data === null) { diff --git a/devel/arcanist-lib/files/patch-src_repository_api_ArcanistGitAPI.php b/devel/arcanist-lib/files/patch-src_repository_api_ArcanistGitAPI.php deleted file mode 100644 index fa73cbef6e63..000000000000 --- a/devel/arcanist-lib/files/patch-src_repository_api_ArcanistGitAPI.php +++ /dev/null @@ -1,11 +0,0 @@ ---- src/repository/api/ArcanistGitAPI.php.orig 2023-01-06 17:27:38 UTC -+++ src/repository/api/ArcanistGitAPI.php -@@ -1143,7 +1143,7 @@ final class ArcanistGitAPI extends ArcanistRepositoryA - - public function hasLocalCommit($commit) { - try { -- if (!$this->getCanonicalRevisionName($commit)) { -+ if (!$this->getCanonicalRevisionName($commit ?? '')) { - return false; - } - } catch (CommandException $exception) { diff --git a/devel/arcanist-lib/files/patch-src_workflow_ArcanistDiffWorkflow.php b/devel/arcanist-lib/files/patch-src_workflow_ArcanistDiffWorkflow.php deleted file mode 100644 index f132ed21d524..000000000000 --- a/devel/arcanist-lib/files/patch-src_workflow_ArcanistDiffWorkflow.php +++ /dev/null @@ -1,11 +0,0 @@ ---- src/workflow/ArcanistDiffWorkflow.php.orig 2023-01-09 21:24:25 UTC -+++ src/workflow/ArcanistDiffWorkflow.php -@@ -2361,7 +2361,7 @@ EOTEXT - - // If we track an upstream branch either directly or indirectly, use that. - $branch = $api->getBranchName(); -- if (strlen($branch)) { -+ if (strlen($branch ?? '')) { - $upstream_path = $api->getPathToUpstream($branch); - $remote_branch = $upstream_path->getRemoteBranchName(); - if ($remote_branch !== null) {