diff options
author | joerg <joerg> | 2007-08-14 21:34:36 +0000 |
---|---|---|
committer | joerg <joerg> | 2007-08-14 21:34:36 +0000 |
commit | c40cbb442995174af968620b10aef5432ba87c0a (patch) | |
tree | 4d148c0e368877415843472189f1f78e743f015d /x11 | |
parent | 68690b2545dd9bf2aea30da0d91f36ca852d3252 (diff) | |
download | pkgsrc-c40cbb442995174af968620b10aef5432ba87c0a.tar.gz |
Add modeline2c.awk, which replaces modeline2c.pl from Xorg.
This allows us to drop the Perl dependency.
Diffstat (limited to 'x11')
-rw-r--r-- | x11/modular-xorg-server/Makefile | 11 | ||||
-rw-r--r-- | x11/modular-xorg-server/distinfo | 4 | ||||
-rw-r--r-- | x11/modular-xorg-server/files/modeline2c.awk | 97 | ||||
-rw-r--r-- | x11/modular-xorg-server/patches/patch-ag | 15 | ||||
-rw-r--r-- | x11/modular-xorg-server/patches/patch-ah | 15 |
5 files changed, 137 insertions, 5 deletions
diff --git a/x11/modular-xorg-server/Makefile b/x11/modular-xorg-server/Makefile index 6623f9567db..71670a5250d 100644 --- a/x11/modular-xorg-server/Makefile +++ b/x11/modular-xorg-server/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2007/08/13 16:55:20 joerg Exp $ +# $NetBSD: Makefile,v 1.16 2007/08/14 21:34:36 joerg Exp $ DISTNAME= xorg-server-1.3.0.0 PKGNAME= modular-${DISTNAME} @@ -18,7 +18,6 @@ GNU_CONFIGURE= YES PKGCONFIG_OVERRIDE+= xorg-server.pc.in USE_TOOLS+= pkg-config USE_TOOLS+= gmake -USE_TOOLS+= perl CONFIGURE_ARGS+= --localstatedir=${VARBASE} CONFIGURE_ARGS+= --enable-dri @@ -44,8 +43,6 @@ CONFIGURE_ENV+= GLX_DEFINES=${GLX_DEFINES:M*:Q} # the newer ones. #BUILDLINK_API_DEPENDS.glproto+= glproto>=1.4.8nb1 #BUILDLINK_API_DEPENDS.xf86driproto+= xf86driproto>=2.0.3nb1 -post-extract: - ${LN} -s ${MESA_SRC:Q}/include/GL ${WRKSRC:Q}/GL/glx/GL PLIST_SUBST+= USE_DRI="" .else CONFIGURE_ARGS+= --disable-glx @@ -63,6 +60,12 @@ DEPENDS+= xkbdata-[0-9]*:../../x11/xkbdata BUILDLINK_API_DEPENDS.fixesproto+= fixesproto>=4.0 BUILDLINK_API_DEPENDS.kbproto+= kbproto>=1.0.3 +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 "../../devel/ncurses/buildlink3.mk" .include "../../devel/zlib/buildlink3.mk" .include "../../fonts/libfontenc/buildlink3.mk" diff --git a/x11/modular-xorg-server/distinfo b/x11/modular-xorg-server/distinfo index 5396af837f7..635d75dcb3e 100644 --- a/x11/modular-xorg-server/distinfo +++ b/x11/modular-xorg-server/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.11 2007/08/06 11:24:14 abs Exp $ +$NetBSD: distinfo,v 1.12 2007/08/14 21:34:37 joerg Exp $ SHA1 (MesaLib-6.5.2.tar.bz2) = ba860bb6ee57c02202342dfd5927464a068ea18f RMD160 (MesaLib-6.5.2.tar.bz2) = 9a92d69110c066ae6734bcaafb78f222ac2df6d3 @@ -10,6 +10,8 @@ SHA1 (patch-aa) = f72780165c9ecd3e9ab31d03c1b2d777290d09e2 SHA1 (patch-ab) = 115905eba320f294c68783bb704359d824460469 SHA1 (patch-ad) = 752235269f10daade0bf60665cccde39d1583064 SHA1 (patch-af) = 6c58872798a30b31154dd7b167c84bf20ac417be +SHA1 (patch-ag) = 222427db3e1bdbf977e992aa91aae5f16992345a +SHA1 (patch-ah) = 23767542ea672d590050e258317c0352bb321810 SHA1 (patch-da) = 73faacda1088304025c5e05f3d58edaf9ae1145f SHA1 (patch-db) = 28913a094c8499536a71c8d4d7ca57a5efb25b39 SHA1 (patch-dc) = 75df6f37b1cbc9574adb5ee66cb84d0f5ebac853 diff --git a/x11/modular-xorg-server/files/modeline2c.awk b/x11/modular-xorg-server/files/modeline2c.awk new file mode 100644 index 00000000000..7a893300c40 --- /dev/null +++ b/x11/modular-xorg-server/files/modeline2c.awk @@ -0,0 +1,97 @@ +#!/usr/bin/awk -f +# +# Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. +# All rights reserved. +# +# Based on Perl script by Dirk Hohndel. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# Usage: modeline2c.awk < modefile > xf86DefModes.c +# + +BEGIN { + flagsdict[""] = "0" + + flagsdict["+hsync +vsync"] = "V_PHSYNC | V_PVSYNC" + flagsdict["+hsync -vsync"] = "V_PHSYNC | V_NVSYNC" + flagsdict["-hsync +vsync"] = "V_NHSYNC | V_PVSYNC" + flagsdict["-hsync -vsync"] = "V_NHSYNC | V_NVSYNC" + flagsdict["+hsync +vsync interlace"] = "V_PHSYNC | V_PVSYNC | V_INTERLACE" + flagsdict["+hsync -vsync interlace"] = "V_PHSYNC | V_NVSYNC | V_INTERLACE" + flagsdict["-hsync +vsync interlace"] = "V_NHSYNC | V_PVSYNC | V_INTERLACE" + flagsdict["-hsync -vsync interlace"] = "V_NHSYNC | V_NVSYNC | V_INTERLACE" + + print "/* $" "XFree86$ */" + print + print "/* THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT -- LOOK at" + print " * modeline2c.awk */" + print "" + print "/*" + print " * Author: Joerg Sonnenberger <joerg@NetBSD.org>" + print " * Based on Perl script from Dirk Hohndel <hohndel@XFree86.Org>" + print " */" + print "" + print "#ifdef HAVE_XORG_CONFIG_H" + print "#include <xorg-config.h>" + print "#endif" + print "" + print "#ifdef __UNIXOS2__" + print "#define I_NEED_OS2_H" + print "#endif" + print "#include \"xf86.h\"" + print "#include \"xf86Config.h\"" + print "#include \"xf86Priv.h\"" + print "#include \"xf86_OSlib.h\"" + print "" + print "#include \"globals.h\"" + print "" + print "#define MODEPREFIX(name) NULL, NULL, name, MODE_OK, M_T_DEFAULT" + print "#define MODESUFFIX 0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0" + print "" + print "DisplayModeRec xf86DefaultModes [] = {" + + modeline = "\t{MODEPREFIX(\"%dx%d\"),%d, %d,%d,%d,%d,0, %d,%d,%d,%d,0, %s, MODESUFFIX},\n" + modeline_data = "^[a-zA-Z]+[ \t]+[^ \t]+[ \t0-9.]+" +} + +/^[mM][oO][dD][eE][lL][iI][nN][eE]/ { + flags = $0 + gsub(modeline_data, "", flags) + flags = tolower(flags) + printf(modeline, $4, $8, $3 * 1000, $4, $5, $6, $7, + $8, $9, $10, $11, flagsdict[flags]) + # Half-width double scanned modes + printf(modeline, $4/2, $8/2, $3 * 500, $4/2, $5/2, $6/2, $7/2, + $8/2, $9/2, $10/2, $11/2, flagsdict[flags] " | V_DBLSCAN") +} + +/^#/ { + print "/*" substr($0, 2) " */" +} + +END { + printf("\t{MODEPREFIX(NULL),0,0,0,0,0,0,0,0,0,0,0,0,MODESUFFIX}\n};\n") +} diff --git a/x11/modular-xorg-server/patches/patch-ag b/x11/modular-xorg-server/patches/patch-ag new file mode 100644 index 00000000000..0aa17c8b8fc --- /dev/null +++ b/x11/modular-xorg-server/patches/patch-ag @@ -0,0 +1,15 @@ +$NetBSD: patch-ag,v 1.3 2007/08/14 21:34:37 joerg Exp $ + +--- hw/xfree86/common/Makefile.am.orig 2007-08-14 20:51:48.000000000 +0200 ++++ hw/xfree86/common/Makefile.am +@@ -25,8 +25,8 @@ KBDSOURCES = xf86Kbd@XORG_OS_KBD@.c + + MODEDEFSOURCES = $(srcdir)/vesamodes $(srcdir)/extramodes + +-xf86DefModeSet.c: $(srcdir)/modeline2c.pl $(MODEDEFSOURCES) +- cat $(MODEDEFSOURCES) | $(PERL) $(srcdir)/modeline2c.pl > $@ ++xf86DefModeSet.c: $(srcdir)/modeline2c.awk $(MODEDEFSOURCES) ++ cat $(MODEDEFSOURCES) | $(AWK) -f $(srcdir)/modeline2c.awk > $@ + + BUILT_SOURCES = xf86DefModeSet.c + diff --git a/x11/modular-xorg-server/patches/patch-ah b/x11/modular-xorg-server/patches/patch-ah new file mode 100644 index 00000000000..2c133e57863 --- /dev/null +++ b/x11/modular-xorg-server/patches/patch-ah @@ -0,0 +1,15 @@ +$NetBSD: patch-ah,v 1.1 2007/08/14 21:34:37 joerg Exp $ + +--- hw/xfree86/common/Makefile.in.orig 2007-08-14 20:51:05.000000000 +0200 ++++ hw/xfree86/common/Makefile.in +@@ -990,8 +990,8 @@ uninstall-am: uninstall-info-am uninstal + uninstall-sdkHEADERS + + +-xf86DefModeSet.c: $(srcdir)/modeline2c.pl $(MODEDEFSOURCES) +- cat $(MODEDEFSOURCES) | $(PERL) $(srcdir)/modeline2c.pl > $@ ++xf86DefModeSet.c: $(srcdir)/modeline2c.awk $(MODEDEFSOURCES) ++ cat $(MODEDEFSOURCES) | $(AWK) -f $(srcdir)/modeline2c.awk > $@ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: |