diff --git a/devel/phabricator/Makefile b/devel/phabricator/Makefile index f5e88ee450e7..c2dc3ed6cbe9 100644 --- a/devel/phabricator/Makefile +++ b/devel/phabricator/Makefile @@ -1,94 +1,95 @@ # $FreeBSD$ PORTNAME= phabricator PORTVERSION= 20201119 +PORTREVISION= 1 CATEGORIES= devel PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX} PATCH_SITES= https://github.com/grembo/phabricator/commit/ PATCHFILES= 0851b89eb6633dd792cd4eb10c26f86c2f0da56a.patch:-p1 MAINTAINER= grembo@FreeBSD.org COMMENT= Open source, software engineering platform LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= arcanist-lib${PHP_PKGNAMESUFFIX}>=20200514:devel/arcanist-lib@${PHP_FLAVOR} \ git:devel/git USES= php:flavors shebangfix REINPLACE_ARGS= -i "" SHEBANG_FILES= resources/timezones/*.php \ scripts/*.php \ scripts/almanac/*.php \ scripts/cache/*.php \ scripts/celerity/*.php \ scripts/daemon/*.php \ scripts/daemon/exec/exec_daemon.php \ scripts/diviner/*.php \ scripts/drydock/*.php \ scripts/fact/*.php \ scripts/files/*.php \ scripts/install/install_rhel-derivs.sh \ scripts/install/install_ubuntu.sh \ scripts/lipsum/*.php \ scripts/mail/*.php \ scripts/repository/*.php \ scripts/search/*.php \ scripts/setup/*.php \ scripts/ssh/*.php \ scripts/sql/*.php \ scripts/ssh/*.php \ scripts/symbols/*.php \ scripts/util/*.php \ support/aphlict/server/*.php USE_PHP= ctype curl fileinfo filter hash iconv mbstring mysqli openssl \ pcntl posix zip OPTIONS_DEFINE= GD OPCACHE OPTIONS_DEFAULT=GD OPCACHE OPCACHE_DESC?= Use OPcache to improve performance GD_USE= PHP=gd OPCACHE_RUN_DEPENDS= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/apcu.so:devel/pecl-APCu@${PHP_FLAVOR} OPCACHE_USE= PHP=opcache USE_GITHUB= yes NO_BUILD= yes USE_RC_SUBR= phd SUB_FILES= pkg-message PORTSCOUT= ignore:1 GH_ACCOUNT= phacility GH_TAGNAME= b2ab18f PHP_DESTDIR= lib/php/phabricator post-patch: @${SED} 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${FILESDIR}/phabricator-sudoers.sample > ${WRKSRC}/resources/sshd/phabricator-sudoers.sample @${REINPLACE_CMD} \ 's|/path/to/phabricator|${LOCALBASE}/lib/php/phabricator|g; \ s|vcs-user|git|g' \ ${WRKSRC}/resources/sshd/phabricator-ssh-hook.sh @${REINPLACE_CMD} \ 's|/usr/libexec/phabricator-ssh-hook.sh|${LOCALBASE}/lib/php/phabricator/resources/sshd/phabricator-ssh-hook.sh|; \ s|vcs-user|git|g; \ s|PrintLastLog no||g; \ s|PidFile /var/run/sshd-phabricator.pid||g' \ ${WRKSRC}/resources/sshd/sshd_config.phabricator.example @${REINPLACE_CMD} \ 's|%%PHP_CMD%%|${PREFIX}/bin/php|g' \ ${WRKSRC}/scripts/celerity/install_merge.sh \ ${WRKSRC}/src/infrastructure/testing/fixture/PhabricatorStorageFixtureScopeGuard.php do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/conf/local ${INSTALL_DATA} ${FILESDIR}/local.json.sample \ ${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/conf/local cd ${WRKSRC} ; ${PAX} -rw * ${STAGEDIR}${PREFIX}/${PHP_DESTDIR} .include diff --git a/devel/phabricator/files/patch-src_applications_pholio_remarkup_PholioRemarkupRule.php b/devel/phabricator/files/patch-src_applications_pholio_remarkup_PholioRemarkupRule.php new file mode 100644 index 000000000000..988860c864c5 --- /dev/null +++ b/devel/phabricator/files/patch-src_applications_pholio_remarkup_PholioRemarkupRule.php @@ -0,0 +1,11 @@ +--- src/applications/pholio/remarkup/PholioRemarkupRule.php.orig 2020-11-19 21:48:33 UTC ++++ src/applications/pholio/remarkup/PholioRemarkupRule.php +@@ -75,6 +75,8 @@ final class PholioRemarkupRule extends PhabricatorObje + $opts = $parser->parse(substr($options, 1)); + + if (isset($opts['image'])) { ++ // PholioMockEmbedView shows only the first image passed. ++ // Keep "&" syntax for backwards compatibility. + $images = array_unique( + explode('&', preg_replace('/\s+/', '', $opts['image']))); + diff --git a/devel/phabricator/files/patch-src_applications_pholio_view_PholioMockEmbedView.php b/devel/phabricator/files/patch-src_applications_pholio_view_PholioMockEmbedView.php new file mode 100644 index 000000000000..5c882601ff4f --- /dev/null +++ b/devel/phabricator/files/patch-src_applications_pholio_view_PholioMockEmbedView.php @@ -0,0 +1,12 @@ +--- src/applications/pholio/view/PholioMockEmbedView.php.orig 2020-11-19 21:48:33 UTC ++++ src/applications/pholio/view/PholioMockEmbedView.php +@@ -25,7 +25,8 @@ final class PholioMockEmbedView extends AphrontView { + $thumbnail = null; + if (!empty($this->images)) { + $images_to_show = array_intersect_key( +- $this->mock->getActiveImages(), array_flip($this->images)); ++ mpull($mock->getActiveImages(), null, 'getID'), ++ array_flip($this->images)); + } + + $xform = PhabricatorFileTransform::getTransformByKey( diff --git a/devel/phabricator/files/patch-src_docs_user_userguide_remarkup.diviner b/devel/phabricator/files/patch-src_docs_user_userguide_remarkup.diviner new file mode 100644 index 000000000000..45287cb31288 --- /dev/null +++ b/devel/phabricator/files/patch-src_docs_user_userguide_remarkup.diviner @@ -0,0 +1,20 @@ +--- src/docs/user/userguide/remarkup.diviner.orig 2020-11-19 21:48:33 UTC ++++ src/docs/user/userguide/remarkup.diviner +@@ -393,14 +393,13 @@ You can embed a Pholio mock by using braces to refer t + + {M123} + +-By default the first four images from the mock set are displayed. This behavior ++By default the first image from the mock is are displayed. This behavior + can be overridden with the **image** option. With the **image** option you can +-provide one or more image IDs to display. ++provide an image ID to display. + +-You can set the image (or images) to display like this: ++You can set the image to display like this: + + {M123, image=12345} +- {M123, image=12345 & 6789} + + == Embedding Pastes +