Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Jan 2013 22:57:40 +0000 (UTC)
From:      Koop Mast <kwm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r309972 - in head: graphics/libdrm graphics/mesa-demos x11-drivers/xf86-video-radeonhd x11-drivers/xorg-drivers x11/pixman x11/xdm x11/xorg-apps
Message-ID:  <201301052257.r05MveFa095507@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kwm
Date: Sat Jan  5 22:57:40 2013
New Revision: 309972
URL: http://svnweb.freebsd.org/changeset/ports/309972

Log:
  Convert x11@ owned ports to OptionsNG. Thanks go to bapt@ for review and help
  rendered with deciphering the monster that is xorg-drivers.
  
  With hat:	x11@

Modified:
  head/graphics/libdrm/Makefile
  head/graphics/mesa-demos/Makefile
  head/x11-drivers/xf86-video-radeonhd/Makefile
  head/x11-drivers/xorg-drivers/Makefile
  head/x11/pixman/Makefile
  head/x11/xdm/Makefile
  head/x11/xorg-apps/Makefile

Modified: head/graphics/libdrm/Makefile
==============================================================================
--- head/graphics/libdrm/Makefile	Sat Jan  5 22:47:04 2013	(r309971)
+++ head/graphics/libdrm/Makefile	Sat Jan  5 22:57:40 2013	(r309972)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	libdrm
-# Date created:				29 Dec 2005
-# Whom:					lesi@FreeBSD.org
-#
+# Created by: lesi@FreeBSD.org
 # $FreeBSD$
-#
 
 PORTNAME=	libdrm
 PORTVERSION=	${LIBDRM_VERSION}
@@ -15,8 +11,8 @@ MAINTAINER=	x11@FreeBSD.org
 COMMENT=	Userspace interface to kernel Direct Rendering Module services
 
 BUILD_DEPENDS+=	${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:${PORTSDIR}/devel/libpthread-stubs
-LIB_DEPENDS=	pciaccess.0:${PORTSDIR}/devel/libpciaccess \
-		pthread-stubs.0:${PORTSDIR}/devel/libpthread-stubs
+LIB_DEPENDS=	pciaccess:${PORTSDIR}/devel/libpciaccess \
+		pthread-stubs:${PORTSDIR}/devel/libpthread-stubs
 RUN_DEPENDS+=	${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:${PORTSDIR}/devel/libpthread-stubs
 
 USE_BZIP2=	yes
@@ -29,11 +25,12 @@ MAKE_JOBS_SAFE=	yes
 
 .if defined(WITH_NEW_XORG)
 
-OPTIONS=	KMS "Enable KMS support (very experimental)" off
+OPTIONS_DEFINE=	KMS
+KMS_DESC=	Enable experimental KMS support
 
 .include <bsd.port.options.mk>
 
-.if defined(WITH_KMS)
+.if ${PORT_OPTIONS:MKMS}
 CONFIGURE_ARGS+=--enable-libkms
 EXTRA_PATCHES+=	${FILESDIR}/extra-xf86drmMode.c
 PLIST_SUB+=	KMS=""
@@ -53,11 +50,11 @@ PLIST_SUB+=	OLD="" NEW="@comment "
 .include <bsd.port.pre.mk>
 
 .if ${ARCH} == "amd64" || ${ARCH} == "i386" || ${ARCH} == "ia64" || ${ARCH} == "powerpc"
-PLIST_SUB+=     INTEL_DRIVER=""
-PLIST_SUB+=     RADEON_DRIVERS=""
+PLIST_SUB+=	INTEL_DRIVER=""
+PLIST_SUB+=	RADEON_DRIVERS=""
 .else
-PLIST_SUB+=     INTEL_DRIVER="@comment "
-PLIST_SUB+=     RADEON_DRIVERS="@comment "
+PLIST_SUB+=	INTEL_DRIVER="@comment "
+PLIST_SUB+=	RADEON_DRIVERS="@comment "
 .endif
 
 pre-patch:

Modified: head/graphics/mesa-demos/Makefile
==============================================================================
--- head/graphics/mesa-demos/Makefile	Sat Jan  5 22:47:04 2013	(r309971)
+++ head/graphics/mesa-demos/Makefile	Sat Jan  5 22:57:40 2013	(r309972)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:    mesa-demos
-# Date created:         7 Nov 2003
-# Whom:                 anholt@FreeBSD.org
-#
+# Created by: anholt@FreeBSD.org
 # $FreeBSD$
-#
 
 PORTNAME=	mesa-demos
 PORTVERSION=	7.6.1
@@ -33,12 +29,16 @@ WRKSRC=		${WRKDIR}/Mesa-${PORTVERSION}/
 
 DATADIR=	${PREFIX}/share/${PKGNAMEPREFIX}${PORTNAME}
 
-OPTIONS=	NVIDIA_GL	"Use NVIDIA's libraries"	off
+OPTIONS_DEFINE=	NVIDIA_GL XCB
+NVIDIA_DESC=	Use NVIDIA's libraries
+XCB_DESC=	Use XCB for GLX
 
-.if defined(WITHOUT_XCB)
-CONFIGURE_ARGS+=	--disable-xcb
-.else
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MXCB}
 CONFIGURE_ARGS+=	--enable-xcb
+.else
+CONFIGURE_ARGS+=	--disable-xcb
 .endif
 
 post-patch:
@@ -77,7 +77,7 @@ do-install:
 
 .include <bsd.port.pre.mk>
 
-.if defined(WITH_NVIDIA_GL)
+.if ${PORT_OPTIONS:MNVIDIA_GL}
 CFLAGS+=	-DWITH_NVIDIA_GL=1
 .endif
 

Modified: head/x11-drivers/xf86-video-radeonhd/Makefile
==============================================================================
--- head/x11-drivers/xf86-video-radeonhd/Makefile	Sat Jan  5 22:47:04 2013	(r309971)
+++ head/x11-drivers/xf86-video-radeonhd/Makefile	Sat Jan  5 22:57:40 2013	(r309972)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	xf86-video-radeonhd
-# Date Created:				20 Oct 2007
-# Whom:					Rene Ladan <r.c.ladan@gmail.com>
-#
+# Created by: Rene Ladan <r.c.ladan@gmail.com>
 # $FreeBSD$
-#
 
 PORTNAME=	xf86-video-radeonhd
 PORTVERSION=	1.3.0
@@ -13,7 +9,8 @@ CATEGORIES=	x11-drivers
 MAINTAINER=	x11@FreeBSD.org
 COMMENT=	X.Org ati RadeonHD display driver
 
-OPTIONS=	UTILS "Install rhd_conntest and rhd_dump utilities" off
+OPTIONS_DEFINE=	UTILS
+UTILS_DESC=	Install rhd_conntest and rhd_dump utilities
 
 XORG_CAT=	driver
 USE_XORG=	damageproto glproto videoproto xextproto xf86driproto
@@ -22,10 +19,10 @@ CONFLICTS=	xf86-video-radeonhd-devel-[0-
 
 MAN4=	radeonhd.4x
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
-.if defined(WITH_UTILS)
-LIB_DEPENDS+=	pci.3:${PORTSDIR}/devel/libpci
+.if ${PORT_OPTIONS:MUTILS}
+LIB_DEPENDS+=	pci:${PORTSDIR}/devel/libpci
 PLIST_SUB=	UTILS=""
 CONFIGURE_ENV+=	PCIUTILS_CFLAGS="-I${LOCALBASE}/include -lpci -lz" \
 		PCIUTILS_LIBS="-L${LOCALBASE}/lib"
@@ -33,10 +30,10 @@ CONFIGURE_ENV+=	PCIUTILS_CFLAGS="-I${LOC
 PLIST_SUB=	UTILS="@comment "
 .endif
 
-.if defined(WITH_UTILS)
+.if ${PORT_OPTIONS:MUTILS}
 post-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/utils/conntest/rhd_conntest ${PREFIX}/sbin
 	${INSTALL_PROGRAM} ${WRKSRC}/utils/conntest/rhd_dump ${PREFIX}/sbin
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/x11-drivers/xorg-drivers/Makefile
==============================================================================
--- head/x11-drivers/xorg-drivers/Makefile	Sat Jan  5 22:47:04 2013	(r309971)
+++ head/x11-drivers/xorg-drivers/Makefile	Sat Jan  5 22:57:40 2013	(r309972)
@@ -1,9 +1,4 @@
-# New ports collection makefile for:    xorg-drivers
-# Date created:				Jun 22 2006
-# Whom:					Florent Thoumie <flz@FreeBSD.org>
-#
 # $FreeBSD$
-#
 
 PORTNAME=	xorg-drivers
 PORTVERSION=	7.5.2
@@ -20,101 +15,105 @@ INPUTDIR=	${PREFIX}/lib/xorg/modules/inp
 
 NO_BUILD=	yes
 
-.if !defined(ARCH)
-ARCH!=  /usr/bin/uname -p
-.endif
+INPUT_DRIVERS=		mouse \
+			keyboard \
+			acecad \
+			elographics \
+			hyperpen \
+			joystick \
+			magictouch \
+			mutouch \
+			penmount \
+			synaptics \
+			vmmouse \
+			void
+
+VIDEO_DRIVERS=		ati \
+			mach64 \
+			nv \
+			r128 \
+			radeonhd \
+			vesa \
+			apm \
+			ark \
+			chips \
+			cyrix \
+			dummy \
+			fbdev \
+			glint \
+			i128 \
+			i740 \
+			imstt \
+			mga \
+			neomagic \
+			newport \
+			rendition \
+			s3 \
+			s3virge \
+			savage \
+			siliconmotion \
+			sis \
+			tdfx \
+			tga \
+			trident \
+			tseng
+
+OPTIONS_DEFAULT=	MOUSE \
+			KEYBOARD \
+			ATI \
+			MACH64 \
+			NV \
+			R128 \
+			RADEONHD \
+			VESA
+
+.for type in input video
+. for a in ${${type:U}_DRIVERS}
+OPTIONS_DEFINE+=	${a:U}
+${a:U}_DESC=	Install ${a} ${type} driver
+. endfor
+.endfor
 
-VIDEO_ON=	ati \
-		mach64 \
-		nv \
-		r128 \
-		radeonhd \
-		vesa
-
-.if ${ARCH} == "sparc64"
-VIDEO_ON+=	sunffb
-.elif ${ARCH} == "amd64" || ${ARCH} == "i386" || ${ARCH} == "ia64"
-VIDEO_ON+=	openchrome
-.endif
+OPTIONS_DEFINE_i386=	INTEL OPENCHROME
+OPTIONS_DEFAULT_i386=	INTEL OPENCHROME
 
-.if (${ARCH} == "amd64" || ${ARCH} == "i386") && !defined(WITH_NEW_XORG)
-VIDEO_ON+=	intel
-.endif
+OPTIONS_DEFINE_amd64:=	${OPTIONS_DEFINE_i386}
+OPTIONS_DEFAULT_amd64:=	${OPTIONS_DEFAULT_i386}
 
-VIDEO_OFF=	apm ark \
-		chips cirrus cyrix \
-		dummy \
-		fbdev \
-		glint \
-		i128 i740 imstt \
-		mga \
-		neomagic newport \
-		rendition \
-		s3 s3virge savage siliconmotion	sis \
-		tdfx tga trident tseng \
-		via vmware voodoo
-
-VIDEO_EXCL=	via:openchrome
-
-INPUT_ON=	mouse \
-		keyboard
-INPUT_OFF=	acecad \
-		elographics \
-		hyperpen \
-		joystick \
-		magictouch mutouch \
-		penmount \
-		synaptics \
-				vmmouse void
-
-QUIRKS=		keyboard:kbd jamstudio:js_x
-
-.if defined(XORG_COMPLETE)
-. for type in input video
-${type:U}_ON:=	${${type:U}_ON} ${${type:U}_OFF}
-${type:U}_OFF=	# nil
-.  for i in ${${type:U}_EXCL}
-B=	${i:C/.*://}
-${type:U}_ON:=	${${type:U}_ON:C/${B}//}
-${type:U}_OFF:=	${${type:U}_OFF} ${B}
-.  endfor
-. endfor
-.endif
+OPTIONS_DEFINE_sparc64=	SUNFFB
+OPTIONS_DEFAULT_sparc64=SUNFFB
 
-.for default in on off
-. for type in input video
-.  for i in ${${type:U}_${default:U}}
-OPTIONS+=	${i:U} "Install ${i} ${type} driver" ${default}
-.  endfor
-. endfor
-.endfor
+OPTIONS_DEFINE_ia64=	OPENCHROME
+OPTIONS_DEFAULT_ia64=	OPENCHROME
 
-.include <bsd.port.pre.mk>
+INTEL_DESC=		Install intel video driver
+OPENCHROME_DESC=	Install openchrome video driver
+SUNFFB_DESC=		Install sunffb video driver
 
-.for i in ${VIDEO_EXCL}
-A=	${i:C/:.*//}
-B=	${i:C/.*://}
-. if defined(WITH_${B:U}) && !defined(WITHOUT_${A:U})
-DRV_CONFLICTS+=	${i}
-. endif
-.endfor
+# these drivers module name are different then the plugin they install
+QUIRKS=		keyboard:kbd
+
+
+.include <bsd.port.options.mk>
+
+# Manual add arch specific drivers so they be added to depend lines.
+.if ${ARCH}==i386 || ${ARCH}==amd64
+VIDEO_DRIVERS+=	intel openchrome
+.endif
 
-.if defined(DRV_CONFLICTS)
-IGNORE=		can't be installed because of conflicting drivers (${DRV_CONFLICTS}). Re-run make config.
+.if ${ARCH}==sparc64
+VIDEO_DRIVERS+=	sunffb
 .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 ${QUIRKS:M${i}\:*:C/.*://} != ""
+.for type in input video
+. for i in ${${type:U}_DRIVERS}
+.  if ${PORT_OPTIONS:M${i:U}} != ""
+.   if ${QUIRKS:M${i}\:*:C/.*://} != ""
 RUN_DEPENDS+=	${${type:U}DIR}/${QUIRKS:M${i}\:*:C/.*://}_drv.so:${PORTSDIR}/x11-drivers/xf86-${type}-${i}
-.    else
+.   else
 RUN_DEPENDS+=	${${type:U}DIR}/${i}_drv.so:${PORTSDIR}/x11-drivers/xf86-${type}-${i}
-.    endif
 .   endif
-.  endfor
+.  endif
 . endfor
 .endfor
 
@@ -122,4 +121,4 @@ do-install:
 		${MKDIR} ${PREFIX}/libdata/xorg
 		${TOUCH} ${PREFIX}/libdata/xorg/drivers
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/x11/pixman/Makefile
==============================================================================
--- head/x11/pixman/Makefile	Sat Jan  5 22:47:04 2013	(r309971)
+++ head/x11/pixman/Makefile	Sat Jan  5 22:57:40 2013	(r309972)
@@ -1,9 +1,4 @@
-# New ports collection makefile for:	pixman
-# Date Created:				Aug 9 2003
-# Whom:					Florent Thoumie <flz@FreeBSD.org>
-#
 # $FreeBSD$
-#
 
 PORTNAME=	pixman
 PORTVERSION=	0.24.2
@@ -18,11 +13,11 @@ USE_PERL5_BUILD=yes
 USE_GNOME=	ltverhack:9
 CONFIGURE_ARGS=	--disable-gtk
 
-OPTIONS=	SIMD "Enable SIMD features autodetection (MMX, SSE2, VMX)" off
+OPTIONS_DEFINE=	SIMD
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
-.if defined(WITHOUT_SIMD)
+.if !${PORT_OPTIONS:MSIMD}
 CONFIGURE_ARGS=	--disable-vmx --disable-arm-simd
 . if ! ${MACHINE_CPU:Mmmx}
 CONFIGURE_ARGS+=	--disable-mmx
@@ -32,4 +27,4 @@ CONFIGURE_ARGS+=	--disable-sse2
 . endif
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/x11/xdm/Makefile
==============================================================================
--- head/x11/xdm/Makefile	Sat Jan  5 22:47:04 2013	(r309971)
+++ head/x11/xdm/Makefile	Sat Jan  5 22:57:40 2013	(r309972)
@@ -1,9 +1,4 @@
-# New ports collection makefile for:	xdm
-# Date Created:				17 Feb 2006
-# Whom:					Florent Thoumie <flz@FreeBSD.org>
-#
 # $FreeBSD$
-#
 
 PORTNAME=	xdm
 PORTVERSION=	1.1.11
@@ -24,11 +19,12 @@ MAN1=		xdm.1
 CFFILES=	GiveConsole TakeConsole Xaccess Xreset Xresources \
 		Xservers Xsession Xsetup_0 Xstartup Xwilling xdm-config
 
-OPTIONS=	XDMSHELL "Install xdmshell" off
+OPTIONS_DEFINE=	XDMSHELL
+XDMSHELL_DESC=	Install xdmshell
 
 .include <bsd.port.options.mk>
 
-.if defined(WITH_XDMSHELL)
+.if ${PORT_OPTIONS:MXDMSHELL}
 CONFIGURE_ARGS+=--enable-xdmshell
 MAN1+=		xdmshell.1
 PLIST_SUB+=	XDMSHELL=""

Modified: head/x11/xorg-apps/Makefile
==============================================================================
--- head/x11/xorg-apps/Makefile	Sat Jan  5 22:47:04 2013	(r309971)
+++ head/x11/xorg-apps/Makefile	Sat Jan  5 22:57:40 2013	(r309972)
@@ -1,9 +1,4 @@
-# New ports collection makefile for:    xorg-apps
-# Date created:				Jun 22 2006
-# Whom:					Florent Thoumie <flz@FreeBSD.org>
-#
 # $FreeBSD$
-#
 
 PORTNAME=	xorg-apps
 PORTVERSION=	7.5.2
@@ -35,13 +30,15 @@ do-install:
 		${TOUCH} ${PREFIX}/libdata/xorg/apps
 
 .for comp in ${COMPONENTS}
-OPTIONS+=	${comp:C/:.*//:C/.*\///:U} "Install ${comp:C/:.*//:C/.*\///} application" on
+OPTIONS_DEFINE+=	${comp:C/:.*//:C/.*\///:U}
+OPTIONS_DEFAULT+=	${comp:C/:.*//:C/.*\///:U}
+${comp:C/:.*//:C/.*\///:U}_DESC=	Install ${comp:C/:.*//:C/.*\///} application
 .endfor
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
 .for comp in ${COMPONENTS}
-. if !defined(WITHOUT_${comp:C/:.*//:C/.*\///:U})
+. if ! ${PORT_OPTIONS:M${comp:C/:.*//:C/.*\///:U}}
 .  if ${comp:M:}==""
 port=${comp}
 check=${comp:C/.*\///} # doesn't work
@@ -56,4 +53,4 @@ RUN_DEPENDS:=	${RUN_DEPENDS} ${check}:${
 . endif
 .endfor
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>



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