Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Nov 2009 21:51:30 GMT
From:      Merijn Verstraaten <merijn@inconsistent.nl>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/140646: [patch] Vim X11 support can't be compiled without compiling a GUI
Message-ID:  <200911172151.nAHLpU1E068125@www.freebsd.org>
Resent-Message-ID: <200911172200.nAHM07Pe055768@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         140646
>Category:       ports
>Synopsis:       [patch] Vim X11 support can't be compiled without compiling a GUI
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 17 22:00:07 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Merijn Verstraaten
>Release:        7.2-RELEASE and 8.0-RC3
>Organization:
>Environment:
>Description:
Currently Vim is either compiled without X11 support or with X11 support AND GUI. For people like me who only use the CLI version of Vim it's annoying that to compile X11 support requires the installation of all GUI dependencies too (The reason for needing X11 support is to allow yanking/pasting to/from the X11 clipboard from with CLI vim). This patch changes the X11 option to not compile a GUI and add the default GUI as an option to be selected. In addition the patch changes the makefile so that the "make config" options screen is shown by default. Currently the Vim port doesn't show this unless "WITH_OPTIONS" or "WITH_VIM_OPTIONS" is set. It took me two years of frustration before I decided to add it myself and learned it was already there but disabled.

Optionally the patched could be changed to pre-select the current default GUI so that just selecting the X11 option would work as it does now, but having the GUI option selected without the X11 option builds Vim without GUI support and I thought this was more confusing.

I've already e-mailed the maintainer of Vim with this patch but so far haven't had a reply from him.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- /usr/ports/editors/vim/options	2008-06-05 15:11:09.000000000 +0200
+++ options	2009-10-30 16:22:32.000000000 +0100
@@ -5,9 +5,10 @@
 		LANG "VIm Translations" off \
 		CSCOPE "Enable cscope" off \
 		EXUBERANT_CTAGS "Use exctags instead of ctags" off \
-		X11 "X11 GUI (must enable if things below are)" off \
+		XTERM_SAVE "Restore xterm screen after exit" off \
+		X11 "X11 support (required for options below)" off \
 		ATHENA "Athena GUI" off \
+		GTK "GTK+ 1.2 GUI" off \
 		GTK2 "GTK2 GUI" off \
 		GNOME "Gnome1 GUI" off \
 		MOTIF "Motif GUI" off \
-		XTERM_SAVE "" off
--- /usr/ports/editors/vim/Makefile	2009-07-29 09:40:23.000000000 +0200
+++ Makefile	2009-10-30 17:21:56.000000000 +0100
@@ -34,9 +34,7 @@
 
 SLAVEDIRS=	editors/vim-lite
 
-.if defined(WITH_OPTIONS) || defined(WITH_VIM_OPTIONS)
 .include "${.CURDIR}/../vim/options"
-.endif
 
 CONFLICTS=	vim6* vim*-lite
 MAKE_JOBS_UNSAFE= yes
@@ -90,10 +88,6 @@
 WANT_PERL=	yes
 .endif
 
-.if !defined(WITHOUT_X11)
-WANT_GNOME=	yes
-.endif
-
 .include <bsd.port.pre.mk>
 
 .if !defined(LITE)
@@ -125,10 +119,6 @@
 .if !defined(WITHOUT_X11)
 #	for now default the GUI to the GTK+ one
 #	will be reviewed when the GTK+ 1.{3,4} behemoth is released
-.if !defined(WITH_ATHENA) && !defined(WITH_MOTIF) && !defined(WITH_GNOME) && !defined(WITH_GTK2)
-USE_GNOME=	gtk12
-.endif
-
 .if defined(WITH_ATHENA)
 MAKE_ARGS+=	CONF_OPT_GUI="--enable-gui=athena" ${I18N}
 .elif defined(WITH_GTK2)
@@ -137,6 +127,11 @@
 MAKE_ARGS+=	CONF_OPT_GUI="--enable-gui=gtk2 --with-gtk-prefix=${LOCALBASE}" ${I18N}
 MAKE_ARGS+=	X_LIBS="$(X_LIBS) -lXt"
 USE_XORG+=	xt
+.elif defined(WITH_GTK)
+USE_GNOME=	gtk12
+MAKE_ARGS+=	CONF_OPT_GUI="--enable-gui=gtk --with-gtk-prefix=${LOCALBASE}" ${I18N}
+MAKE_ARGS+=	X_LIBS="$(X_LIBS) -lXt"
+USE_XORG+=	xt
 .elif defined(WITH_GNOME)
 .if ${WITH_GNOME:Mgnomelibs}!="" || ${WITH_GNOME}=="yes" || \
 	${WITH_GNOME}=="1"
@@ -145,15 +140,12 @@
 MAKE_ARGS+=	CONF_OPT_GUI="--enable-gui=gnome --with-gtk-prefix=${LOCALBASE}" ${I18N}
 MAKE_ARGS+=	X_LIBS="$(X_LIBS) -lXt"
 USE_XORG+=	xt
-.else
-USE_GNOME=	gtk12
-MAKE_ARGS+=	CONF_OPT_GUI="--enable-gui=gtk --with-gtk-prefix=${LOCALBASE}" ${I18N}
-MAKE_ARGS+=	X_LIBS="$(X_LIBS) -lXt"
-USE_XORG+=	xt
 .endif
 .elif defined(WITH_MOTIF)
 USE_MOTIF=	yes
 MAKE_ARGS+=	CONF_OPT_GUI="--enable-gui=motif --with-motif-lib=\"${MOTIFLIB}\"" MOTIFHOME=${LOCALBASE} ${I18N}
+.else # WITH_X11 and no GUI selected
+MAKE_ARGS+=	CONF_OPT_GUI="--enable-gui=no --with-x" ${I18N}
 .endif
 .else	# WITHOUT_X11
 MAKE_ARGS+=	CONF_OPT_GUI="--enable-gui=no --without-x" ${I18N}


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911172151.nAHLpU1E068125>