From nobody@FreeBSD.org  Tue Nov 17 21:51:31 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0B6D6106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 17 Nov 2009 21:51:31 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id EED118FC1D
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 17 Nov 2009 21:51:30 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHLpUjK068126
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 17 Nov 2009 21:51:30 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id nAHLpU1E068125;
	Tue, 17 Nov 2009 21:51:30 GMT
	(envelope-from nobody)
Message-Id: <200911172151.nAHLpU1E068125@www.freebsd.org>
Date: Tue, 17 Nov 2009 21:51:30 GMT
From: Merijn Verstraaten <merijn@inconsistent.nl>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] Vim X11 support can't be compiled without compiling a GUI
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         140646
>Category:       ports
>Synopsis:       [patch] editors/vim: X11 support can't be compiled without compiling a GUI
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    obrien
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 17 22:00:07 UTC 2009
>Closed-Date:    Tue Dec 29 08:47:39 UTC 2009
>Last-Modified:  Tue Dec 29 08:50:02 UTC 2009
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->obrien 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Nov 17 23:02:56 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=140646 
State-Changed-From-To: open->closed 
State-Changed-By: obrien 
State-Changed-When: Tue Dec 29 08:47:24 UTC 2009 
State-Changed-Why:  
X11_ONLY support added. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=140646 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/140646: commit references a PR
Date: Tue, 29 Dec 2009 08:47:11 +0000 (UTC)

 obrien      2009-12-29 08:46:57 UTC
 
   FreeBSD ports repository
 
   Modified files:
     editors/vim          Makefile options 
   Log:
   Add support for "X11_ONLY" - which disables all GUI toolkit variants, but
   does have support for the X11 cut buffer, etc...  (patch reworked by me)
   
   PR:             140646
   Submitted by:   Merijn Verstraaten <merijn@inconsistent.nl>
   
   Revision  Changes    Path
   1.353     +18 -17    ports/editors/vim/Makefile
   1.4       +4 -2      ports/editors/vim/options
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
