Skip site navigation (1)Skip section navigation (2)
Date:      Mon,  5 Nov 2012 20:02:13 +0000 (GMT)
From:      Chris Rees <utisoft@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/173406: [PATCH] Update x11-drivers/xorg-drivers to use optionsng
Message-ID:  <20121105200213.962974E41D@pegasus.bayofrum.net>
Resent-Message-ID: <201211052010.qA5KA04x041473@freefall.freebsd.org>

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

>Number:         173406
>Category:       ports
>Synopsis:       [PATCH] Update x11-drivers/xorg-drivers to use optionsng
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 05 20:10:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Chris Rees
>Release:        FreeBSD 9.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD pegasus.bayofrum.net 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Sun Apr 29 12:29:02 BST 2012 root@pegasus.bayofrum.net:/usr/obj/usr/src/sys/PEGASUS amd64


	
>Description:
	OPTIONSNG actually simplifies it a fair bit here.

	I'm happy to organise an email to ports@ asking for testers.  Works fine here (tm)
>How-To-Repeat:
	
>Fix:

	

--- xorg-drivers-optionsng.diff begins here ---
Index: Makefile
===================================================================
--- Makefile	(revision 307028)
+++ Makefile	(working copy)
@@ -65,8 +65,11 @@
 		magictouch mutouch \
 		penmount \
 		synaptics \
-				vmmouse void
+		vmmouse void
 
+OPTIONS_DEFINE=	${INPUT_ON:U} ${INPUT_OFF:U} ${VIDEO_ON:U} ${VIDEO_OFF:U}
+OPTIONS_DEFAULT=${INPUT_ON:U} ${VIDEO_ON:U}
+
 QUIRKS=		keyboard:kbd jamstudio:js_x
 
 .if defined(XORG_COMPLETE)
@@ -81,10 +84,12 @@
 . endfor
 .endif
 
-.for default in on off
-. for type in input video
+.for type in input video
+. for default in on off
 .  for i in ${${type:U}_${default:U}}
-OPTIONS+=	${i:U} "Install ${i} ${type} driver" ${default}
+.   if !defined(${i:U}_DESC)
+${i:U}_DESC=	Install ${i} ${type} driver
+.   endif
 .  endfor
 . endfor
 .endfor
@@ -94,20 +99,25 @@
 .for i in ${VIDEO_EXCL}
 A=	${i:C/:.*//}
 B=	${i:C/.*://}
-. if defined(WITH_${B:U}) && !defined(WITHOUT_${A:U})
+# Can't use a real variable with :M, so fake using a for loop
+. for a in ${A:U}
+.  for b in ${B:U}
+.   if ${PORT_OPTIONS:M$a} && ${PORT_OPTIONS:M$b}
 DRV_CONFLICTS+=	${i}
-. endif
+.   endif
+.  endfor
+. endfor
 .endfor
 
 .if defined(DRV_CONFLICTS)
-IGNORE=		can't be installed because of conflicting drivers (${DRV_CONFLICTS}). Re-run make config.
+IGNORE=		cannot be installed because of conflicting drivers (${DRV_CONFLICTS}).  Re-run make config
 .endif
 
 .for default in on off
 . for type in input video
 .  for i in ${${type:U}_${default:U}}
 DEFAULT=${default}
-.   if (${DEFAULT} == "on" && !defined(WITHOUT_${i:U})) || (${DEFAULT} == "off" && defined(WITH_${i:U}))
+.   if ${PORT_OPTIONS:L:M$i}
 .    if ${QUIRKS:M${i}\:*:C/.*://} != ""
 RUN_DEPENDS+=	${${type:U}DIR}/${QUIRKS:M${i}\:*:C/.*://}_drv.so:${PORTSDIR}/x11-drivers/xf86-${type}-${i}
 .    else
--- xorg-drivers-optionsng.diff ends here ---


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



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