Created attachment 227012 [details] Shar file of new port wp-cli 2.5.0 Hello, It's my first port ;) Based on www/drush I'm not sure if ${LOCALBASE}/bin/wp is already used by another port, I couldn't find any information on how to check it. WP-CLI documentation refers to binary name 'wp' but possibly ${LOCALBASE}/bin/wp-cli can be used instead if there is any conflict.
Created attachment 239537 [details] Update to latest 2.7.1 version. Update to latest 2.7.1 version.
Created attachment 243161 [details] Update wp-cli to latest 2.8.1 version Update to latest 2.8.1 version. Is any chance to commit it into Ports soon?
(In reply to avkarenow from comment #2) If you are still interesting then I can commit it.
Where is ne release: https://github.com/wp-cli/wp-cli/releases/tag/v2.12.0
Created attachment 264777 [details] wp-cli-php8x-2.12.0.shar If the old version works, it should work. I haven't verified it. :-p
(In reply to takefu from comment #5) Can you attach just tarball with port?
(In reply to Vladimir Druzenko from comment #6) I'm not a PHP user, so I don't know how to convert source code into .phar files.
(In reply to takefu from comment #7) I can help with phar archives, although most PHP console projects just provide it in a already-built form. Seems like this one does that too.
(In reply to takefu from comment #7) > wp-cli-php8x-2.12.0.shar shar != phar
Created attachment 264925 [details] wp-cli-php8x-2.12.0.shar I've rewritten it to fetch via GitHub instead of PHAR. Please review.
(In reply to takefu from comment #10) Can you upload NOT shar archive? Entry port in tarball or just diff (git diff).
Created attachment 264937 [details] wp-cli-php8x-2.12.0.patch I had no idea when it became impossible to submit new ports using shar. Is this format acceptable? :-p
It's not a matter of whether it's acceptable or not, but rather whether it's convenient for me or not. If I'm taking on this port.
Regarding the maintainer: more than two years have passed since "avkarenow@o2.pl" last message - there's no guarantee he wants to be the maintainer. Perhaps someone else would like to shoulder this difficult burden? :-D
(In reply to takefu from comment #12) Did you test build?
PORTNAME= wp-cli DISTVERSION= 2.12.0 CATEGORIES= www MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/v${DISTVERSION}/ PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX} EXTRACT_SUFX= .phar MAINTAINER= ?????????? COMMENT= Command line interface for WordPress WWW= https://wp-cli.org/ \ https://github.com/wp-cli/wp-cli/ LICENSE= MIT USES= php:cli,flavors USE_PHP= curl exif fileinfo ftp gd hash json mysqli pcre phar tokenizer \ xml zip zlib NO_ARCH= yes NO_BUILD= yes PLIST_FILES= bin/wp bin/${PORTNAME}${EXTRACT_SUFX} do-extract: ${CP} ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} \ ${WRKDIR}/${PORTNAME}${EXTRACT_SUFX} do-install: ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}${EXTRACT_SUFX} \ ${STAGEDIR}${PREFIX}/bin ${RLN} ${PORTNAME}${EXTRACT_SUFX} ${STAGEDIR}${PREFIX}/bin/wp .include <bsd.port.mk>
Pcre extension is statically built into PHP binary
(In reply to Paavo-Einari Kaipila from comment #17) And so are hash and json have also been statically built for quite some time https://wiki.php.net/rfc/permanent_hash_ext https://wiki.php.net/rfc/always_enable_json
PORTNAME= wp-cli DISTVERSION= 2.12.0 CATEGORIES= www MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/v${DISTVERSION}/ PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX} EXTRACT_SUFX= .phar MAINTAINER= ?????????? COMMENT= Command line interface for WordPress WWW= https://wp-cli.org/ \ https://github.com/wp-cli/wp-cli/ LICENSE= MIT USES= php:cli,flavors USE_PHP= curl exif fileinfo ftp gd mysqli phar tokenizer xml zip zlib EXTRACT_CMD= ${CP} EXTRACT_BEFORE_ARGS= # EXTRACT_AFTER_ARGS= ${WRKDIR}/${PORTNAME}${EXTRACT_SUFX} NO_ARCH= yes NO_BUILD= yes PLIST_FILES= bin/wp bin/${PORTNAME}${EXTRACT_SUFX} do-install: ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}${EXTRACT_SUFX} \ ${STAGEDIR}${PREFIX}/bin ${RLN} ${PORTNAME}${EXTRACT_SUFX} ${STAGEDIR}${PREFIX}/bin/wp .include <bsd.port.mk>
There is bash completion for wp-cli: https://github.com/wp-cli/wp-cli/blob/main/utils/wp-completion.bash Add this to port.
Friendly ping.
(In reply to Vladimir Druzenko from comment #21) I believe this would be best maintained by someone who has some use for it. I don't, but because there certainly are people, who find this useful, I can volunteer. I'll add that bash script, check the required extension list and follow with another variant of it nobody shows up sometime relatively soon.
Created attachment 265497 [details] 0001-www-wp-cli-new-port-command-line-interface-for-WordP.patch
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=46cee314acdce1c0a94f87bf0d53f6b5741a880b commit 46cee314acdce1c0a94f87bf0d53f6b5741a880b Author: Paavo-Einari Kaipila <pkaipila@gmail.com> AuthorDate: 2025-11-18 22:42:51 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2025-11-18 22:42:51 +0000 www/wp-cli: New port: Command line interface for WordPress WP-CLI is the command-line interface for WordPress. You can update plugins, configure multisite installations and much more, without using a web browser. Co-authored-by: Vladimir Druzenko <vvd@FreeBSD.org> Co-authored-by: takefu@airport.fm Co-authored-by: avkarenow@o2.pl PR: 257679 www/Makefile | 1 + www/wp-cli/Makefile (new) | 39 +++++++++++++++++++++++++++++++++++++++ www/wp-cli/distinfo (new) | 5 +++++ www/wp-cli/pkg-descr (new) | 3 +++ 4 files changed, 48 insertions(+)
I did few improvements in download distfiles. Thanks to all!