Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Mar 2006 21:28:31 -0700 (MST)
From:      Mike Brown <mike@skew.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/94013: WITHOUT_X11 does not stop X11 ports from building
Message-ID:  <200603020428.k224SV7J049189@chilled.skew.org>
Resent-Message-ID: <200603020430.k224U3YQ015845@freefall.freebsd.org>

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

>Number:         94013
>Category:       ports
>Synopsis:       WITHOUT_X11 does not stop X11 ports from building
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 02 04:30:03 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Mike Brown
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
skew.org
>Environment:
System: FreeBSD chilled.skew.org 5.4-STABLE FreeBSD 5.4-STABLE #0: Sun Jan 29 22:47:28 MST 2006 mike@chilled.skew.org:/usr/obj/usr/src/sys/GENERIC i386

>Description:
Perhaps my expectation is wrong, but I would expect that WITHOUT_X11=yes would prevent the accidental
installation of any ports that require X libraries, because it means (to me) "I am running my system
without X11".

Yet in the current ports system it seems to actually mean "If the port will work without X11, that's what
I prefer, but if it requires X11, that's OK too." That seems rather unlikely to be what the average
WITHOUT_X11 user wants.

>How-To-Repeat:
I discovered this when the non-X11 version of the sysutils/xmbmon port was recently forked into a
separate mbmon port. I already had the non-X11 version on my X11-free system, as a result of having
WITHOUT_X11=yes in my /etc/make.conf, and simply running 'make install' in the xmbmon port dir. But after
updating my ports recently and running portupgrade, the new revision of the xmbmon port, (which no longer
had a check for WITHOUT_X11) started installing X libs on my system. It took some digging to notice that
there was a new, separate mbmon port. I submitted a separate PR for xmbmon to check for WITHOUT_X11 and
set IGNORE as needed, to tell people to use the new mbmon port.

>Fix:
What I would rather see is this kind of check for WITHOUT_X11 exist on all ports that require X.
I believe this can be accomplished rather easily via the bsd.port.mk patch below:

--- bsd.port.mk.old     Sat Feb 25 01:11:33 2006
+++ bsd.port.mk Wed Mar  1 21:10:28 2006
@@ -1830,6 +1830,9 @@
 .endif
 
 .if defined(USE_XLIB)
+.      if defined(WITHOUT_X11)
+IGNORE=        requires X libraries. Cannot proceed when WITHOUT_X11 is defined
+.      endif
 .      if defined(USE_LINUX)
 RUN_DEPENDS+=  ${LINUXBASE}/usr/X11R6/lib/libXrender.so.1:${PORTSDIR}/x11/linux-XFree86-libs
 .      else
>Release-Note:
>Audit-Trail:
>Unformatted:



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