The gtk-doc ebuilds assume that the vim binary comes from just app-editors/vim, but it also comes from app-editors/gvim. My fix: - vim? ( app-editors/vim ) + vim? ( || ( app-editors/vim app-editors/gvim ) ) I don't actually know how to test that it works properly, but it might as well be set this way unless there's a bug in gtk-doc. I just want to have USE='highlight vim' set for gtk-doc because it makes me feel good. (And to whoever I emailed about this earlier: yes, I am finally getting around to making this a bug; and yes, I am lazy.) Reproducible: Always The workaround for anybody who can't figure it out is to have USE='highlight -vim' set in package.use.
iirc the dependency was written like this because gtk-doc expects
damn tab+space :( iirc the dependency was written like this because gtk-doc expects /usr/bin/vim binary. Does gvim provides the same ?
Yeah, you actually can't install both. I really don't know why there isn't just one version with an 'X' USE flag, but there you have it.
> I don't actually know how to test that it works properly, but it might as well > be set this way unless there's a bug in gtk-doc. You need to verify that gtk-doc with gvim works without X. If you try to run gvim without X, you get an error message that must be dismissed manually. Perhaps there is a way to disable this behavior; perhaps not. If it cannot be disabled, then using gvim in gtk-doc would be unacceptable: gtk-doc is used in ebuilds, people often emerge things from the console, and they would not want their package building to be interrupted by error prompts requiring user interaction.
You only get an error/warning prompt if you invoke vim as `gvim` or `vim -g`. The output is: E233: cannot open display Press ENTER or type command to continue Plain `vim` without an X connection prints nothing to stderr or stdout. ... Okay, I just confirmed vim from app-editors/gvim works. I regenerated the docs from gtk+-2.24.4 by hand: $ unset DISPLAY $ cd gtk+-2.24.4 $ find . -name \*.html | xargs rm # the first configure argument is required, the second maybe not? $ ./configure --enable-gtk-doc --enable-gtk-doc-html $ make It's maybe worth noting that gtk-doc first writes non-highlighted HTML, and comes back to it at the end to add highlighting (it confused me when I was testing). I got it to highlight with both source-highlight (USE='highlight -vim') and vim; vim is slightly less colorful.
And if it wasn't clear, app-editors/gvim installs a symlink (ln -s gvim /usr/bin/vim) that is equivalent to the vim from app-editors/vim (except that in the app-editors/gvim version, `vim -g` is the same as `gvim`).
Markus, thank you for your analysis. I can confirm that having gtk-doc depend on gvim would work; I just successfully built glib-2.28.8 with USE=doc and with gtk-doc that used gvim's /usr/bin/vim symlink, and the resulting documentation had source code highlighted correctly. Also, in case it wasn't clear to anyone reading: if you have both vim and gvim installed, then /usr/bin/vim is a binary that belongs to vim. If you have only gvim installed, then /usr/bin/vim is a symlink to gvim that is created by gvim during its pkg_postinst.
(In reply to comment #7) > I can confirm that having gtk-doc depend on gvim would work; I just > successfully built glib-2.28.8 with USE=doc and with gtk-doc that used gvim's > /usr/bin/vim symlink Forgot to add that this was with DISPLAY unset.
Alrighty, change made, thanks for the analysis. + 29 Aug 2011; Nirbheek Chauhan <nirbheek@gentoo.org> gtk-doc-1.17.ebuild: + Can use either vim or gvim for the /usr/bin/vim binary, bug 379647 +