app-text/wgetpaste: use optfeature.eclass

Use optfeature.eclass to notify users about support for stripping ANSI
codes and xclip integration if app-text/ansifilter and/or x11-misc/xclip
are not installed, respectively.

Signed-off-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/28379
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Oskari Pirhonen
2022-11-22 06:19:32 +00:00
committed by Sam James
parent 5746e89bed
commit ef84e09197
@@ -3,6 +3,8 @@
EAPI=8
inherit optfeature
DESCRIPTION="Command-line interface to various pastebins"
HOMEPAGE="https://wgetpaste.zlin.dk/"
SRC_URI="https://github.com/zlin/wgetpaste/releases/download/${PV}/${P}.tar.xz"
@@ -36,3 +38,8 @@ src_install() {
insinto /usr/share/zsh/site-functions
doins _wgetpaste
}
pkg_postinst() {
optfeature "ANSI (color code) stripping support" app-text/ansifilter
optfeature "xclip support" x11-misc/xclip
}