pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/geography/opencpn The SIGSEGV worked around by patch-s...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8feee747afdc
branches:  trunk
changeset: 347589:8feee747afdc
user:      bouyer <bouyer%pkgsrc.org@localhost>
date:      Wed May 25 14:38:48 2016 +0000

description:
The SIGSEGV worked around by patch-src_glu_libtess_sweep.c are in fact
due to a wrong value GLU_TESS_MAX_COORD on NetBSD. See
http://mail-index.netbsd.org/tech-x11/2016/05/25/msg001733.html

Work around this by reordering -I flags so that the local GL/glu.h is used
before the one from the buildlink directory.

While there change build type from debug to release.
Bump PKGREVISION.

diffstat:

 geography/opencpn/Makefile                              |   6 +-
 geography/opencpn/distinfo                              |   4 +-
 geography/opencpn/patches/patch-src_glu_CMakeLists.txt  |  16 ++++
 geography/opencpn/patches/patch-src_glu_libtess_sweep.c |  61 -----------------
 4 files changed, 21 insertions(+), 66 deletions(-)

diffs (126 lines):

diff -r b096fd2d6737 -r 8feee747afdc geography/opencpn/Makefile
--- a/geography/opencpn/Makefile        Wed May 25 13:17:41 2016 +0000
+++ b/geography/opencpn/Makefile        Wed May 25 14:38:48 2016 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.5 2016/03/14 11:01:06 bouyer Exp $
+# $NetBSD: Makefile,v 1.6 2016/05/25 14:38:48 bouyer Exp $
 #
 
 VERSION=       4.2.0
-#PKGREVISION=  1
+PKGREVISION=   1
 DISTNAME=      OpenCPN-${VERSION}
 PKGNAME=       opencpn-${VERSION}
 CATEGORIES=    geography
@@ -22,7 +22,7 @@
 
 CMAKE_ARGS+=   -DPREFIX:PATH=${PREFIX} -DPREFIX_PLUGINS:PATH=${PREFIX}/lib/opencpn
 CMAKE_ARGS+=   -DBUNDLE_DOCS=ON -DBUNDLE_GSHHS=CRUDE -DBUNDLE_TCDATA=ON
-CMAKE_ARGS+=   -DCMAKE_BUILD_TYPE=Debug
+CMAKE_ARGS+=   -DCMAKE_BUILD_TYPE=Release
 CMAKE_MODULE_PATH_OVERRIDE = \
        plugins/chartdldr_pi/CMakeLists.txt \
        plugins/dashboard_pi/CMakeLists.txt \
diff -r b096fd2d6737 -r 8feee747afdc geography/opencpn/distinfo
--- a/geography/opencpn/distinfo        Wed May 25 13:17:41 2016 +0000
+++ b/geography/opencpn/distinfo        Wed May 25 14:38:48 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2016/05/21 10:50:41 bouyer Exp $
+$NetBSD: distinfo,v 1.9 2016/05/25 14:38:48 bouyer Exp $
 
 SHA1 (OpenCPN-4.2.0-a555b4988b50f555be052394c184ef26c5ad0e8a.zip) = 39baa5f89ded9a5c62824e6e1445dbfc4f168578
 RMD160 (OpenCPN-4.2.0-a555b4988b50f555be052394c184ef26c5ad0e8a.zip) = d344b9caffe40dabcad1d9ac148ce54d75f1573c
@@ -17,7 +17,7 @@
 SHA1 (patch-src_chartimg.cpp) = f0e3841ab1920dcab74462a5007b74e905d794c0
 SHA1 (patch-src_chcanv.cpp) = af76f36b6fd6d613720945195d5a24902012a020
 SHA1 (patch-src_crashprint.cpp) = a96e8aa980eb3b19c3dce3343582511d608e6625
-SHA1 (patch-src_glu_libtess_sweep.c) = 68e3e69239d8bdce353bcad0f5606be5b447b5a7
+SHA1 (patch-src_glu_CMakeLists.txt) = d63494a41071097252ac9e2cb95db75041f30b62
 SHA1 (patch-src_mipmap_mipmap.c) = 3bdb2c37e7a6d89fc6a531af6e0396a1ff385aeb
 SHA1 (patch-src_printtable.cpp) = 940e7f42dd7e6a9776db2009027989ca79429cb1
 SHA1 (patch-src_routeprintout.cpp) = bbf135bd71e3fc87100b0c6d4e200f68754937c3
diff -r b096fd2d6737 -r 8feee747afdc geography/opencpn/patches/patch-src_glu_CMakeLists.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/geography/opencpn/patches/patch-src_glu_CMakeLists.txt    Wed May 25 14:38:48 2016 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_glu_CMakeLists.txt,v 1.1 2016/05/25 14:38:48 bouyer Exp $
+Make sure to use our glu.h before the base libraries ones.
+
+--- src/glu/CMakeLists.txt.orig        2016-05-25 16:23:41.000000000 +0200
++++ src/glu/CMakeLists.txt     2016-05-25 16:24:01.000000000 +0200
+@@ -17,8 +17,8 @@
+   ADD_DEFINITIONS( " -g -fno-strict-aliasing -O2")
+ ENDIF(NOT WIN32 AND NOT APPLE)
+ 
+-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
+-INCLUDE_DIRECTORIES(include)
++INCLUDE_DIRECTORIES(BEFORE ${CMAKE_SOURCE_DIR}/include)
++INCLUDE_DIRECTORIES(BEFORE include)
+ 
+ IF(WIN32)
+     IF(MSVC)
diff -r b096fd2d6737 -r 8feee747afdc geography/opencpn/patches/patch-src_glu_libtess_sweep.c
--- a/geography/opencpn/patches/patch-src_glu_libtess_sweep.c   Wed May 25 13:17:41 2016 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-$NetBSD: patch-src_glu_libtess_sweep.c,v 1.1 2016/03/14 11:01:06 bouyer Exp $
-Fix segfault; it seems that RegionAbove(regUp) can return NULL
-
---- src/glu/libtess/sweep.c.orig       2016-02-03 18:44:17.000000000 +0100
-+++ src/glu/libtess/sweep.c    2016-02-11 13:50:32.000000000 +0100
-@@ -33,6 +33,7 @@
- */
- 
- #include "gluos.h"
-+#include <stdio.h>
- #include <assert.h>
- #include <stddef.h>
- #include <setjmp.h>           /* longjmp */
-@@ -546,7 +547,9 @@
-     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 +587,9 @@
-     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) != NULL)
-+        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);
-@@ -1025,15 +1030,23 @@
-   tmp.eUp = vEvent->anEdge->Sym;
-   /* __GL_DICTLISTKEY */ /* __gl_dictListSearch */
-   regUp = (ActiveRegion *)dictKey( dictSearch( tess->dict, &tmp ));
--  regLo = RegionBelow( regUp );
-+  if (regUp == NULL) {
-+      fprintf(stderr, "ConnectLeftVertex botch 1\n");
-+      return;
-+  }
-   eUp = regUp->eUp;
--  eLo = regLo->eUp;
- 
-   /* Try merging with U or L first */
-   if( EdgeSign( eUp->Dst, vEvent, eUp->Org ) == 0 ) {
-     ConnectLeftDegenerate( tess, regUp, vEvent );
-     return;
-   }
-+  regLo = RegionBelow( regUp );
-+  if (regLo == NULL) {
-+      fprintf(stderr, "ConnectLeftVertex botch 2\n");
-+      return;
-+  }
-+  eLo = regLo->eUp;
- 
-   /* Connect vEvent to rightmost processed vertex of either chain.
-    * e->Dst is the vertex that we will connect to vEvent.



Home | Main Index | Thread Index | Old Index