Created attachment 392500 [details, diff] Patch for youtube-dl-2014.12.17.2.ebuild adding zsh-completion support The attached patch adds support for zsh-completion in net-misc/youtube-dl. THe diff is based on 'youtube-dl-2014.12.7.2.ebuild.
Why can't we just skip this: + if use zsh-completion; then And unconditionally do this: + insinto /usr/share/zsh/site-functions + newins ${PN}.zsh _${PN}.zsh Then we don't need a USE flag or a dependency and we install an additional 2.5K file.
(In reply to Jeroen Roovers from comment #1) > Why can't we just skip this: > > + if use zsh-completion; then > > And unconditionally do this: > > + insinto /usr/share/zsh/site-functions > + newins ${PN}.zsh _${PN}.zsh > > Then we don't need a USE flag or a dependency and we install an additional > 2.5K file. Sure, would work just fine for me. I just copied this way of handling it based on how most other ebuilds did it.
In case it help, here a simplified patch without conditional statement. The patch is based on youtube-dl-2016.04.06.ebuild and uses the same convention as the ebuilds dev-python/pip and dev-vcs/mercurial to install the zsh completion. --- a/youtube-dl-2016.04.06.ebuild 2016-04-17 23:00:05.976628409 +0200 +++ b/youtube-dl-2016.04.06.ebuild 2016-04-17 23:01:32.607626857 +0200 @@ -83,5 +83,7 @@ dodoc README.txt doman ${PN}.1 newbashcomp ${PN}.bash-completion ${PN} + insinto /usr/share/zsh/site-functions + newins youtube-dl.zsh _youtube-dl python_fix_shebang "${ED}" }
Created attachment 431028 [details, diff] Simplified patch as file Patch mentioned in previous comment as an attachment.
Fixed in 2016.04.19-r1. Thanks for the report and patch.