pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/graphics/glu Move patch-src_glu_sgi_libtess_sweep.c fr...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7a4cd37567d1
branches:  trunk
changeset: 650131:7a4cd37567d1
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Sat Apr 18 17:44:12 2015 +0000

description:
Move patch-src_glu_sgi_libtess_sweep.c from MesaLib to here since this
package is built independently now.
Bump PKGREVISON.

The commit message in MesaLib read:
date: 2015-01-29 23:35:43 +0100;  author: nat;  state: Exp;
Fix segfaults and crashing with applications that use libGLU.

diffstat:

 graphics/glu/Makefile                          |   3 +-
 graphics/glu/distinfo                          |   3 +-
 graphics/glu/patches/patch-src_libtess_sweep.c |  50 ++++++++++++++++++++++++++
 3 files changed, 54 insertions(+), 2 deletions(-)

diffs (77 lines):

diff -r c14996e01315 -r 7a4cd37567d1 graphics/glu/Makefile
--- a/graphics/glu/Makefile     Sat Apr 18 14:09:00 2015 +0000
+++ b/graphics/glu/Makefile     Sat Apr 18 17:44:12 2015 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.60 2015/04/02 23:03:00 tnn Exp $
+# $NetBSD: Makefile,v 1.61 2015/04/18 17:44:12 tnn Exp $
 
 DISTNAME=      glu-9.0.0
+PKGREVISION=   1
 CATEGORIES=    graphics
 MASTER_SITES=  ftp://ftp.freedesktop.org/pub/mesa/glu/
 EXTRACT_SUFX=  .tar.bz2
diff -r c14996e01315 -r 7a4cd37567d1 graphics/glu/distinfo
--- a/graphics/glu/distinfo     Sat Apr 18 14:09:00 2015 +0000
+++ b/graphics/glu/distinfo     Sat Apr 18 17:44:12 2015 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.16 2015/04/03 00:27:47 tnn Exp $
+$NetBSD: distinfo,v 1.17 2015/04/18 17:44:12 tnn Exp $
 
 SHA1 (glu-9.0.0.tar.bz2) = c2814bbaf1e60e28a75ec80f4646047c0da742bd
 RMD160 (glu-9.0.0.tar.bz2) = 567991e97a0702699d9db33f45c2dc0cef1006f1
 Size (glu-9.0.0.tar.bz2) = 493206 bytes
+SHA1 (patch-src_libtess_sweep.c) = b7f9ca4e1a83e0081b3cfa418f378e33392f7f65
diff -r c14996e01315 -r 7a4cd37567d1 graphics/glu/patches/patch-src_libtess_sweep.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/glu/patches/patch-src_libtess_sweep.c    Sat Apr 18 17:44:12 2015 +0000
@@ -0,0 +1,50 @@
+$NetBSD: patch-src_libtess_sweep.c,v 1.1 2015/04/18 17:44:12 tnn Exp $
+
+Fixes segfaults and crashes in applications using libGLU.
+
+--- src/libtess/sweep.c.orig   2012-09-15 00:48:54.000000000 +0000
++++ src/libtess/sweep.c
+@@ -546,7 +546,9 @@ static int CheckForRightSplice( GLUtesse
+     if( EdgeSign( eUp->Dst, eLo->Org, eUp->Org ) < 0 ) return FALSE;
+ 
+     /* eLo->Org appears to be above eUp, so splice eLo->Org into eUp */
+-    RegionAbove(regUp)->dirty = regUp->dirty = TRUE;
++    if (RegionAbove(regUp))
++        RegionAbove(regUp)->dirty = TRUE;
++    regUp->dirty = TRUE;
+     if (__gl_meshSplitEdge( eUp->Sym ) == NULL) longjmp(tess->env,1);
+     if ( !__gl_meshSplice( eLo->Oprev, eUp ) ) longjmp(tess->env,1);
+   }
+@@ -584,7 +586,9 @@ static int CheckForLeftSplice( GLUtessel
+     if( EdgeSign( eUp->Dst, eLo->Dst, eUp->Org ) < 0 ) return FALSE;
+ 
+     /* eLo->Dst is above eUp, so splice eLo->Dst into eUp */
+-    RegionAbove(regUp)->dirty = regUp->dirty = TRUE;
++    if (RegionAbove(regUp))
++        RegionAbove(regUp)->dirty = TRUE;
++    regUp->dirty = TRUE;
+     e = __gl_meshSplitEdge( eUp );
+     if (e == NULL) longjmp(tess->env,1);
+     if ( !__gl_meshSplice( eLo->Sym, e ) ) longjmp(tess->env,1);
+@@ -718,7 +722,9 @@ static int CheckForIntersect( GLUtessela
+      * (and wait for ConnectRightVertex to splice it appropriately).
+      */
+     if( EdgeSign( dstUp, tess->event, &isect ) >= 0 ) {
+-      RegionAbove(regUp)->dirty = regUp->dirty = TRUE;
++      if (RegionAbove(regUp))
++          RegionAbove(regUp)->dirty = TRUE;
++      regUp->dirty = TRUE;
+       if (__gl_meshSplitEdge( eUp->Sym ) == NULL) longjmp(tess->env,1);
+       eUp->Org->s = tess->event->s;
+       eUp->Org->t = tess->event->t;
+@@ -753,7 +759,9 @@ static int CheckForIntersect( GLUtessela
+      longjmp(tess->env,1);
+   }
+   GetIntersectData( tess, eUp->Org, orgUp, dstUp, orgLo, dstLo );
+-  RegionAbove(regUp)->dirty = regUp->dirty = regLo->dirty = TRUE;
++  if (RegionAbove(regUp))
++      RegionAbove(regUp)->dirty = TRUE;
++  regUp->dirty = regLo->dirty = TRUE;
+   return FALSE;
+ }
+ 



Home | Main Index | Thread Index | Old Index