[xorg-x11-drv-tdfx] Update to git Add hack to allow building with --disable-dri
Peter Hutterer
whot at fedoraproject.org
Wed Jan 4 05:04:59 UTC 2012
commit c723fba743cf7827cee98b17b5902be6904754f1
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Wed Jan 4 15:06:14 2012 +1000
Update to git
Add hack to allow building with --disable-dri
.gitignore | 1 +
...86DRI-from-the-driver-specific-DRI-define.patch | 208 ++++++
commitid | 1 +
make-git-snapshot.sh | 18 +
sources | 2 +-
tdfx-1.4.3-git.patch | 715 --------------------
tdfx-1.4.3-vga.patch | 36 -
xorg-x11-drv-tdfx.spec | 25 +-
8 files changed, 248 insertions(+), 758 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 7c0b0c6..0cbc015 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
xf86-video-tdfx-1.4.3.tar.bz2
+/xf86-video-tdfx-20120104.tar.bz2
diff --git a/0001-Untangle-XF86DRI-from-the-driver-specific-DRI-define.patch b/0001-Untangle-XF86DRI-from-the-driver-specific-DRI-define.patch
new file mode 100644
index 0000000..0e2e4d4
--- /dev/null
+++ b/0001-Untangle-XF86DRI-from-the-driver-specific-DRI-define.patch
@@ -0,0 +1,208 @@
+From 1978a9ef5c3be7bbfc08565f0f99f5511edde5de Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer at who-t.net>
+Date: Wed, 4 Jan 2012 14:57:56 +1000
+Subject: [PATCH] Untangle XF86DRI from the driver-specific DRI define
+
+XF86DRI is defined by xorg-server.h, so --disable-dri in the driver
+itself does exactly nothing other than not fill in the CFLAGS and thus stop
+the driver from compiling.
+
+Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+---
+ configure.ac | 4 ++--
+ src/tdfx.h | 10 +++++++---
+ src/tdfx_accel.c | 4 ++--
+ src/tdfx_driver.c | 22 +++++++++++-----------
+ src/tdfx_priv.c | 2 +-
+ 5 files changed, 23 insertions(+), 19 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 33ed17c..9245b41 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -100,8 +100,8 @@ AC_MSG_RESULT([$DRI])
+ AM_CONDITIONAL(DRI, test x$DRI = xyes)
+ if test "$DRI" = yes; then
+ PKG_CHECK_MODULES(DRI, [libdrm >= 2.0 xf86driproto])
+- AC_DEFINE(XF86DRI,1,[Enable DRI driver support])
+- AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
++ AC_DEFINE(TDFXDRI,1,[Enable DRI driver support])
++ AC_DEFINE(TDFXDRI_DEVEL,1,[Enable developmental DRI driver support])
+ fi
+
+ if test "x$XSERVER_LIBPCIACCESS" = xyes; then
+diff --git a/src/tdfx.h b/src/tdfx.h
+index dbdf4c6..2e00fde 100644
+--- a/src/tdfx.h
++++ b/src/tdfx.h
+@@ -18,7 +18,11 @@
+ #include "xf86xv.h"
+ #include "tdfxdefs.h"
+
+-#ifdef XF86DRI
++#ifndef XF86DRI
++#undef TDFXDRI
++#endif
++
++#ifdef TDFXDRI
+ #include "xf86drm.h"
+ #include "sarea.h"
+ #define _XF86DRI_SERVER_
+@@ -78,7 +82,7 @@ extern void TDFXLostContext(ScreenPtr pScreen);
+ extern Bool TDFXSetupSLI(ScrnInfoPtr pScrn, Bool sliEnable, int aaSamples);
+ extern Bool TDFXDisableSLI(TDFXPtr pTDFX);
+
+-#ifdef XF86DRI
++#ifdef TDFXDRI
+ extern void FillPrivateDRI(TDFXPtr pTDFX, TDFXDRIPtr pTDFXDRI);
+ #endif
+
+@@ -250,7 +254,7 @@ typedef struct _TDFXRec {
+ int scanlineWidth;
+ unsigned char *scanlineColorExpandBuffers[2];
+ PROPDATA
+-#ifdef XF86DRI
++#ifdef TDFXDRI
+ Bool directRenderingEnabled;
+ DRIInfoPtr pDRIInfo;
+ int drmSubFD;
+diff --git a/src/tdfx_accel.c b/src/tdfx_accel.c
+index c7aea8c..12472f3 100644
+--- a/src/tdfx_accel.c
++++ b/src/tdfx_accel.c
+@@ -89,7 +89,7 @@ TDFXFirstSync(ScrnInfoPtr pScrn) {
+ TDFXPtr pTDFX = TDFXPTR(pScrn);
+
+ if (!pTDFX->syncDone) {
+-#ifdef XF86DRI
++#ifdef TDFXDRI
+ if (pTDFX->directRenderingEnabled) {
+ DRILock(screenInfo.screens[pScrn->scrnIndex], 0);
+ TDFXSwapContextFifo(screenInfo.screens[pScrn->scrnIndex]);
+@@ -107,7 +107,7 @@ TDFXCheckSync(ScrnInfoPtr pScrn) {
+ if (pTDFX->syncDone) {
+ pTDFX->sync(pScrn);
+ pTDFX->syncDone=FALSE;
+-#ifdef XF86DRI
++#ifdef TDFXDRI
+ if (pTDFX->directRenderingEnabled) {
+ DRIUnlock(screenInfo.screens[pScrn->scrnIndex]);
+ }
+diff --git a/src/tdfx_driver.c b/src/tdfx_driver.c
+index 0b3d904..94cce04 100644
+--- a/src/tdfx_driver.c
++++ b/src/tdfx_driver.c
+@@ -99,7 +99,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ #include "xf86xv.h"
+ #include <X11/extensions/Xv.h>
+
+-#ifdef XF86DRI
++#ifdef TDFXDRI
+ #include "dri.h"
+ #endif
+
+@@ -1230,7 +1230,7 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags)
+ pTDFX->writeLong(pTDFX, MISCINIT0, pTDFX->ModeReg.miscinit0);
+ #endif
+
+-#ifdef XF86DRI
++#ifdef TDFXDRI
+ /* Load the dri module if requested. */
+ if (xf86ReturnOptValBool(pTDFX->Options, OPTION_DRI, FALSE)) {
+ xf86LoadSubModule(pScrn, "dri");
+@@ -1908,14 +1908,14 @@ TDFXModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
+ mode->CrtcHSkew=hskew;
+ }
+
+-#ifdef XF86DRI
++#ifdef TDFXDRI
+ if (pTDFX->directRenderingEnabled) {
+ DRILock(screenInfo.screens[pScrn->scrnIndex], 0);
+ TDFXSwapContextFifo(screenInfo.screens[pScrn->scrnIndex]);
+ }
+ #endif
+ DoRestore(pScrn, &hwp->ModeReg, &pTDFX->ModeReg, FALSE);
+-#ifdef XF86DRI
++#ifdef TDFXDRI
+ if (pTDFX->directRenderingEnabled) {
+ DRIUnlock(screenInfo.screens[pScrn->scrnIndex]);
+ }
+@@ -2201,7 +2201,7 @@ TDFXScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) {
+ TDFXPtr pTDFX;
+ VisualPtr visual;
+ BoxRec MemBox;
+-#ifdef XF86DRI
++#ifdef TDFXDRI
+ MessageType driFrom = X_DEFAULT;
+ #endif
+ int scanlines;
+@@ -2308,7 +2308,7 @@ TDFXScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) {
+
+ miSetPixmapDepths ();
+
+-#ifdef XF86DRI
++#ifdef TDFXDRI
+ /*
+ * Setup DRI after visuals have been established, but before fbScreenInit
+ * is called. fbScreenInit will eventually call into the drivers
+@@ -2417,7 +2417,7 @@ TDFXScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) {
+ * in of TDFXCloseScreen() before the rest is unwrapped
+ */
+
+-#ifdef XF86DRI
++#ifdef TDFXDRI
+ if (pTDFX->directRenderingEnabled) {
+ /* Now that mi, fb, drm and others have done their thing,
+ * complete the DRI setup.
+@@ -2471,7 +2471,7 @@ static Bool
+ TDFXEnterVT(int scrnIndex, int flags) {
+ ScrnInfoPtr pScrn;
+ ScreenPtr pScreen;
+-#ifdef XF86DRI
++#ifdef TDFXDRI
+ TDFXPtr pTDFX;
+ #endif
+
+@@ -2479,7 +2479,7 @@ TDFXEnterVT(int scrnIndex, int flags) {
+ pScrn = xf86Screens[scrnIndex];
+ pScreen = screenInfo.screens[scrnIndex];
+ TDFXInitFifo(pScreen);
+-#ifdef XF86DRI
++#ifdef TDFXDRI
+ pTDFX = TDFXPTR(pScrn);
+ if (pTDFX->directRenderingEnabled) {
+ DRIUnlock(pScreen);
+@@ -2506,7 +2506,7 @@ TDFXLeaveVT(int scrnIndex, int flags) {
+ pTDFX = TDFXPTR(pScrn);
+ pTDFX->sync(pScrn);
+ TDFXShutdownFifo(pScreen);
+-#ifdef XF86DRI
++#ifdef TDFXDRI
+ if (pTDFX->directRenderingEnabled) {
+ DRILock(pScreen, 0);
+ }
+@@ -2525,7 +2525,7 @@ TDFXCloseScreen(int scrnIndex, ScreenPtr pScreen)
+ hwp = VGAHWPTR(pScrn);
+ pTDFX = TDFXPTR(pScrn);
+
+-#ifdef XF86DRI
++#ifdef TDFXDRI
+ if (pTDFX->directRenderingEnabled) {
+ TDFXDRICloseScreen(pScreen);
+ pTDFX->directRenderingEnabled=FALSE;
+diff --git a/src/tdfx_priv.c b/src/tdfx_priv.c
+index 77ce676..d5cb2d1 100644
+--- a/src/tdfx_priv.c
++++ b/src/tdfx_priv.c
+@@ -234,7 +234,7 @@ GetReadPtr(TDFXPtr pTDFX)
+ return read_ptr;
+ }
+
+-#ifdef XF86DRI
++#ifdef TDFXDRI
+ void TDFXSwapContextFifo(ScreenPtr pScreen)
+ {
+ ScrnInfoPtr pScrn;
+--
+1.7.7.4
+
diff --git a/commitid b/commitid
new file mode 100644
index 0000000..d3b0295
--- /dev/null
+++ b/commitid
@@ -0,0 +1 @@
+fe60f0ed2a0647937cc46a45d497bdf7da4061a4
diff --git a/make-git-snapshot.sh b/make-git-snapshot.sh
new file mode 100755
index 0000000..a259097
--- /dev/null
+++ b/make-git-snapshot.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+MODULE=xf86-video-tdfx
+DIRNAME=$MODULE-$( date +%Y%m%d )
+
+rm -rf $DIRNAME
+git clone git://git.freedesktop.org/git/xorg/driver/$MODULE $DIRNAME
+cd $DIRNAME
+if [ -z "$1" ]; then
+ git log | head -1
+else
+ git checkout $1
+fi
+git log | head -1 | awk '{ print $2 }' > ../commitid
+git repack -a -d
+cd ..
+tar jcf $DIRNAME.tar.bz2 $DIRNAME
+rm -rf $DIRNAME
diff --git a/sources b/sources
index 6ad78bf..8502772 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-8161bbf2b100c21b609163f0010766b3 xf86-video-tdfx-1.4.3.tar.bz2
+b9a3b097318c5ca7ca65c29f92223e76 xf86-video-tdfx-20120104.tar.bz2
diff --git a/xorg-x11-drv-tdfx.spec b/xorg-x11-drv-tdfx.spec
index 85149c6..fd2bdce 100644
--- a/xorg-x11-drv-tdfx.spec
+++ b/xorg-x11-drv-tdfx.spec
@@ -2,21 +2,30 @@
%define moduledir %(pkg-config xorg-server --variable=moduledir )
%define driverdir %{moduledir}/drivers
+%global gitdate 20120104
+%global gitversion fe60f0ed2
+
Summary: Xorg X11 tdfx video driver
Name: xorg-x11-drv-tdfx
Version: 1.4.3
-Release: 14%{?dist}
+Release: 15%{?gitdate:.%{gitdate}git%{gitversion}}%{dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X Hardware Support
+%if 0%{?gitdate}
+Source0: %{tarball}-%{gitdate}.tar.bz2
+Source1: make-git-snapshot.sh
+Source2: commitid
+%else
Source0: ftp://ftp.x.org/pub/individual/driver/%{tarball}-%{version}.tar.bz2
+%endif
-Patch0: tdfx-1.4.3-git.patch
-Patch1: tdfx-1.4.3-vga.patch
+Patch01: 0001-Untangle-XF86DRI-from-the-driver-specific-DRI-define.patch
ExcludeArch: s390 s390x
+BuildRequires: autoconf automake libtool
BuildRequires: xorg-x11-server-sdk
#>= 1.4.99.1
BuildRequires: libdrm-devel >= 2.0-1
@@ -30,11 +39,11 @@ Requires: Xorg %(xserver-sdk-abi-requires videodrv)
X.Org X11 tdfx video driver.
%prep
-%setup -q -n %{tarball}-%{version}
-%patch0 -p1 -b .git
-%patch1 -p1 -b .vga
+%setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}}
+%patch01 -p1
%build
+autoreconf -v --install || exit 1
%configure --disable-static --disable-dri
make
@@ -56,6 +65,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man4/tdfx.4*
%changelog
+* Wed Jan 04 2012 Peter Hutterer <peter.hutterer at redhat.com> 1.4.3-15.20120104gitfe60f0ed2
+- Update to git
+- Add hack to allow building with --disable-dri
+
* Wed Jan 04 2012 Peter Hutterer <peter.hutterer at redhat.com> - 1.4.3-14
- Rebuild for server 1.12
More information about the scm-commits
mailing list