pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/modular-xorg-server Move all the options handling ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f5bca2291ca7
branches:  trunk
changeset: 536242:f5bca2291ca7
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Sat Dec 08 09:23:16 2007 +0000

description:
Move all the options handling into options.mk.
Use standard options name (modular-xorg-server, not xorg-server) but
add legacy support code.
Addresses PR pkg/37495 by Per Amund Amundsen.

diffstat:

 x11/modular-xorg-server/Makefile   |  39 +--------------------------------
 x11/modular-xorg-server/options.mk |  43 ++++++++++++++++++++++++++++++++++++-
 2 files changed, 43 insertions(+), 39 deletions(-)

diffs (122 lines):

diff -r e520a38241a0 -r f5bca2291ca7 x11/modular-xorg-server/Makefile
--- a/x11/modular-xorg-server/Makefile  Fri Dec 07 21:33:31 2007 +0000
+++ b/x11/modular-xorg-server/Makefile  Sat Dec 08 09:23:16 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2007/11/09 11:34:47 abs Exp $
+# $NetBSD: Makefile,v 1.23 2007/12/08 09:23:16 wiz Exp $
 
 DISTNAME=      xorg-server-1.3.0.0
 PKGNAME=       modular-${DISTNAME}
@@ -21,34 +21,6 @@
 CONFIGURE_ARGS+=       --localstatedir=${VARBASE}
 CONFIGURE_ARGS+=       --enable-dri
 
-PKG_SUPPORTED_OPTIONS= dri
-PKG_OPTIONS_VAR=       PKG_OPTIONS.xorg-server
-PKG_OPTIONS_LEGACY_OPTS=glx:dri
-.include "../../mk/bsd.options.mk"
-
-.if !empty(PKG_OPTIONS:Mdri)
-DISTFILES=             ${DISTNAME}${EXTRACT_SUFX}
-DISTFILES+=            MesaLib-6.5.2.tar.bz2
-SITES.MesaLib-6.5.2.tar.bz2= ${MASTER_SITE_SOURCEFORGE:=mesa3d/}
-MESA_SRC=              ${WRKDIR}/Mesa-6.5.2
-CONFIGURE_ARGS+=       --enable-glx
-CONFIGURE_ARGS+=       --with-mesa-source=${MESA_SRC}
-.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64" || \
-    ${MACHINE_ARCH} == "alpha"
-GLX_DEFINES+=          -D__GLX_ALIGN64
-.endif
-CONFIGURE_ENV+=                GLX_DEFINES=${GLX_DEFINES:M*:Q}
-# glcore.h and dri_interface.h shipped with *proto are older than
-# those in Mesa-6.5.2. Either patch them or trick the build into using
-# the newer ones.
-#BUILDLINK_API_DEPENDS.glproto+= glproto>=1.4.8nb1
-#BUILDLINK_API_DEPENDS.xf86driproto+= xf86driproto>=2.0.3nb1
-PLIST_SUBST+=          USE_DRI=""
-.else
-CONFIGURE_ARGS+=       --disable-glx
-PLIST_SUBST+=          USE_DRI="@comment "
-.endif
-
 CONFIGURE_ENV+=        APP_MAN_SUFFIX=1 FILE_MAN_SUFFIX=5
 
 BUILD_DEFS+=           VARBASE
@@ -61,21 +33,14 @@
 BUILDLINK_API_DEPENDS.kbproto+=                kbproto>=1.0.3
 BUILDLINK_API_DEPENDS.randrproto+=     randrproto>=1.2.1
 
-post-extract:
+post-extract: dri-post-extract
        ${CP} ${FILESDIR}/modeline2c.awk ${WRKSRC}/hw/xfree86/common
-.if !empty(PKG_OPTIONS:Mdri)
-       ${LN} -s ${MESA_SRC:Q}/include/GL ${WRKSRC:Q}/GL/glx/GL
-.endif
 
 .include "options.mk"
 
 .include "../../devel/ncurses/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../fonts/libfontenc/buildlink3.mk"
-.if empty(PKG_OPTIONS:Mdri)
-# for GLX we already have the Mesa source
-.include "../../graphics/MesaLib/buildlink3.mk"
-.endif
 .include "../../x11/bigreqsproto/buildlink3.mk"
 .include "../../x11/compositeproto/buildlink3.mk"
 .include "../../x11/damageproto/buildlink3.mk"
diff -r e520a38241a0 -r f5bca2291ca7 x11/modular-xorg-server/options.mk
--- a/x11/modular-xorg-server/options.mk        Fri Dec 07 21:33:31 2007 +0000
+++ b/x11/modular-xorg-server/options.mk        Sat Dec 08 09:23:16 2007 +0000
@@ -1,10 +1,49 @@
-# $NetBSD: options.mk,v 1.1 2007/11/09 11:34:47 abs Exp $
+# $NetBSD: options.mk,v 1.2 2007/12/08 09:23:16 wiz Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.modular-xorg-server
-PKG_SUPPORTED_OPTIONS+=        inet6
+PKG_SUPPORTED_OPTIONS= dri inet6
+# remove after 2007Q4
+PKG_OPTIONS_LEGACY_OPTS=glx:dri
+.if defined(PKG_OPTIONS.xorg-server)
+PKG_LEGACY_OPTIONS+=   ${PKG_OPTIONS.xorg-server}
+PKG_OPTIONS_DEPRECATED_WARNINGS+="Deprecated variable PKG_OPTIONS.xorg-server used, use "${PKG_OPTIONS_VAR:Q}" instead."
+.endif
 
 .include "../../mk/bsd.options.mk"
 
+.if !empty(PKG_OPTIONS:Mdri)
+DISTFILES=             ${DISTNAME}${EXTRACT_SUFX}
+DISTFILES+=            MesaLib-6.5.2.tar.bz2
+SITES.MesaLib-6.5.2.tar.bz2= ${MASTER_SITE_SOURCEFORGE:=mesa3d/}
+MESA_SRC=              ${WRKDIR}/Mesa-6.5.2
+CONFIGURE_ARGS+=       --enable-glx
+CONFIGURE_ARGS+=       --with-mesa-source=${MESA_SRC}
+.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64" || \
+    ${MACHINE_ARCH} == "alpha"
+GLX_DEFINES+=          -D__GLX_ALIGN64
+.endif
+CONFIGURE_ENV+=                GLX_DEFINES=${GLX_DEFINES:M*:Q}
+# glcore.h and dri_interface.h shipped with *proto are older than
+# those in Mesa-6.5.2. Either patch them or trick the build into using
+# the newer ones.
+#BUILDLINK_API_DEPENDS.glproto+= glproto>=1.4.8nb1
+#BUILDLINK_API_DEPENDS.xf86driproto+= xf86driproto>=2.0.3nb1
+PLIST_SUBST+=          USE_DRI=""
+
+dri-post-extract:
+       ${LN} -s ${MESA_SRC:Q}/include/GL ${WRKSRC:Q}/GL/glx/GL
+
+.else
+CONFIGURE_ARGS+=       --disable-glx
+PLIST_SUBST+=          USE_DRI="@comment "
+
+dri-post-extract:
+       @${DO_NADA}
+
+# for GLX we already have the Mesa source
+.include "../../graphics/MesaLib/buildlink3.mk"
+.endif
+
 .if !empty(PKG_OPTIONS:Minet6)
 CONFIGURE_ARGS+=       --enable-ipv6
 .else



Home | Main Index | Thread Index | Old Index