When USE contains '-gtk gtk2', gvim ebuild doesn't compile in support for GTK2 GUI. I've written a patch to /usr/portage/eclass/vim.eclass that fixes this. Reproducible: Always Steps to Reproduce: 1. USE="-gtk gtk2" emerge gvim Actual Results: gvim doesn't work with gtk2 Expected Results: gvim should work with gtk2 Portage 2.0.50-r1 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 2.6.4-lcs) ================================================================= System uname: 2.6.4-lcs i686 AMD Duron(tm) Processor Gentoo Base System version 1.4.3.13p1 Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-mcpu=athlon-xp -march=athlon-xp -Os -pipe -s -DNDEBUG -DG_DISABLE_ASSERT -funroll-loops" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-mcpu=athlon-xp -march=athlon-xp -Os -pipe -s -DNDEBUG -DG_DISABLE_ASSERT -funroll-loops" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://src.gentoo.pl/ http://www.ibiblio.org/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync2.pl.gentoo.org/gentoo-portage/" USE="3dnow X acpi alsa apache2 apm avi berkdb cdr crypt fbcon foomaticdb gdbm gif gpm gtk2 joystick jpeg libg++ libwww mad maildir mmx mpeg ncurses nls nptl oss pam perl pic png python readline scanner sse ssl stroke tcltk tcpd tetex truetype unicode vim-with-x x86 xml2 xv zlib"
Created attachment 27521 [details, diff] gvim-gtk2.patch Patch that fixes this bug.
The current behaviour is correct. USE="-gtk gtk2" means "Don't include GTK support if it is optional. If there is a choice between GTK1 and GTK2, select GTK2.".
I don't think the current behaviour is valid. Having "gtk" in USE flags will pull GTK-1 libraries which GTK-2 only people don't need. Having both gtk and gtk2 USE flags suggests that the program can take advantage of either one of the Gimp toolkit versions. Requiring the user to choose gtk as an USE flag is counter-intuitive. I have -gtk in my make.conf because I don't want GTK-1 stuff in my system. They're old, and look ugly. USE="gtk2" should pull all the required libraries and set the required flags even if GTK-1 is not in the use list. The behaviour is correct when both GTK-1 and GTK-2 are selected. It is not correct when GTK-1 is selected but GTK-2 is. Also, other applications in Portage which have USE flags for both GTK-1 and GTK-2 compile GTK-2 suppor correctly when GTK-2 flag is enabled and GTK-1 flag is disabled. Gvim package should work the same way as other packages. Please reopen this bug and apply the patch to the Gvim package. Or you could also remove the GTK-1 flag if GTK-1 is mandatory. The first time I emerged gvim with "-gtk gtk2" I was given an GTK-1 interface, which suggests that the packge doesn't allow you to turn off gtk. But you can do that too, by removing curses support. So I would say the USE flags for this program have gone totally wrong. Applying the gtk2-patch would at least make the package behave like other GTK software packages in Gentoo.
Gvim's behaviour is correct. Other packages are not.
Except that, for gvim, gtk *should not* be optional. It is the GTK version of vim, after all. At the very least, it should spout an error. I spent a while merging gvim only to get: [13:43:31] [ben:~] $ gvim E25: GUI cannot be used: Not enabled at compile time WTF?
Strike the first part of that, I guess it's the graphical version, with other frontends. But the point about the allowing compilation without a graphical frontend is bad.
Strike the first part of that, I guess it's the graphical version, with other frontends. But the point about the allowing compilation without a graphical frontend is still pertinent.
gvim will always build with some form of gui. As of gvim 6.3-r1, the order is: USE Flags GUI Built # carbon CARBON (not yet) # -carbon gtk gtk2 gnome GNOME2 (6.3-r1+, earlier uses GTK2) # -carbon gtk gtk2 -gnome GTK2 # -carbon gtk -gtk2 gnome GNOME1 # -carbon gtk -gtk2 -gnome GTK1 # -carbon -gtk motif MOTIF # -carbon -gtk -motif ATHENA