diff options
author | tobik <tobik@FreeBSD.org> | 2017-07-08 19:27:54 +0800 |
---|---|---|
committer | tobik <tobik@FreeBSD.org> | 2017-07-08 19:27:54 +0800 |
commit | d0e57449b5e3f8771471918ce26f7f063d5a44ec (patch) | |
tree | 9b2edfa1780b5527c06fb9f4090e1c66c94ec304 /textproc | |
parent | feffcd622b198bb9d8b77d63510e7082f7390d6f (diff) | |
download | freebsd-ports-gnome-d0e57449b5e3f8771471918ce26f7f063d5a44ec.tar.gz freebsd-ports-gnome-d0e57449b5e3f8771471918ce26f7f063d5a44ec.tar.zst freebsd-ports-gnome-d0e57449b5e3f8771471918ce26f7f063d5a44ec.zip |
Add options for installing Bash, Fish and Zsh completions.
- Fix license block
PR: 220361
Submitted by: petteri.valkonen@iki.fi (maintainer)
Approved by: lme (mentor)
Differential Revision: https://reviews.freebsd.org/D11509
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/ripgrep/Makefile | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/textproc/ripgrep/Makefile b/textproc/ripgrep/Makefile index f0f958d004ff..6c9232de234d 100644 --- a/textproc/ripgrep/Makefile +++ b/textproc/ripgrep/Makefile @@ -5,6 +5,7 @@ PORTNAME= ripgrep PORTVERSION= 0.5.2 +PORTREVISION= 1 CATEGORIES= textproc MAINTAINER= petteri.valkonen@iki.fi @@ -12,15 +13,22 @@ COMMENT= Command line search tool LICENSE= MIT UNLICENSE LICENSE_COMB= dual -LICENSE_FILE= ${WRKSRC}/COPYING +LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT LICENSE_FILE_UNLICENSE= ${WRKSRC}/UNLICENSE USES= cargo USE_GITHUB= yes GH_ACCOUNT= BurntSushi +OPTIONS_DEFINE= BASH FISH ZSH +OPTIONS_DEFAULT=BASH FISH ZSH +FISH_DESC= Install programmable completions for Fish + PLIST_FILES= bin/rg \ man/man1/rg.1.gz +BASH_PLIST_FILES= etc/bash_completion.d/rg.bash-completion +FISH_PLIST_FILES= share/fish/completions/rg.fish +ZSH_PLIST_FILES= share/zsh/site-functions/_rg CARGO_CRATES= aho-corasick-0.6.3 \ ansi_term-0.9.0 \ @@ -59,7 +67,29 @@ CARGO_CRATES= aho-corasick-0.6.3 \ winapi-0.2.8 \ winapi-build-0.1.1 +RIPGREP_OUTDIR= ${WRKDIR}/cargo-out +CARGO_ENV= RIPGREP_OUTDIR=${RIPGREP_OUTDIR} + +post-patch: + @${REINPLACE_CMD} -e 's|OUT_DIR|RIPGREP_OUTDIR|' ${WRKSRC}/build.rs + post-install: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/rg ${INSTALL_MAN} ${WRKSRC}/doc/rg.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 +post-install-BASH-on: + @${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d/ + ${INSTALL_DATA} ${RIPGREP_OUTDIR}/rg.bash-completion \ + ${STAGEDIR}${PREFIX}/etc/bash_completion.d/ + +post-install-FISH-on: + @${MKDIR} ${STAGEDIR}${PREFIX}/share/fish/completions/ + ${INSTALL_DATA} ${RIPGREP_OUTDIR}/rg.fish \ + ${STAGEDIR}${PREFIX}/share/fish/completions/ + +post-install-ZSH-on: + @${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions/ + ${INSTALL_DATA} ${RIPGREP_OUTDIR}/_rg \ + ${STAGEDIR}${PREFIX}/share/zsh/site-functions/ + .include <bsd.port.mk> |