Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44957 - GVim doesn't compile with GTK2 GUI if there isn't GTK in USE
Summary: GVim doesn't compile with GTK2 GUI if there isn't GTK in USE
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Vim Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-17 10:27 UTC by Lukasz Strzygowski (RETIRED)
Modified: 2004-09-16 13:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
gvim-gtk2.patch (gvim-gtk2.patch,454 bytes, patch)
2004-03-17 10:29 UTC, Lukasz Strzygowski (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lukasz Strzygowski (RETIRED) gentoo-dev 2004-03-17 10:27:50 UTC
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"
Comment 1 Lukasz Strzygowski (RETIRED) gentoo-dev 2004-03-17 10:29:25 UTC
Created attachment 27521 [details, diff]
gvim-gtk2.patch

Patch that fixes this bug.
Comment 2 Ciaran McCreesh 2004-03-17 10:38:19 UTC
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.".
Comment 3 Juha-Mikko Ahonen 2004-09-13 13:26:17 UTC
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.
Comment 4 Ciaran McCreesh 2004-09-13 17:16:25 UTC
Gvim's behaviour is correct. Other packages are not.
Comment 5 ted.reed 2004-09-16 13:39:02 UTC
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?
Comment 6 ted.reed 2004-09-16 13:46:15 UTC
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.
Comment 7 ted.reed 2004-09-16 13:47:53 UTC
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.
Comment 8 Ciaran McCreesh 2004-09-16 13:54:01 UTC
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