diff options
author | bouyer <bouyer@pkgsrc.org> | 2016-05-25 14:38:48 +0000 |
---|---|---|
committer | bouyer <bouyer@pkgsrc.org> | 2016-05-25 14:38:48 +0000 |
commit | 74423ad904d01e34fc759f3758b1da50f628bceb (patch) | |
tree | f93cf5d3e389b1523e6655879da1f9de91f0e830 /geography | |
parent | 5e2fe3b4c9f666863c6a0c53c6a749e9955bf2ea (diff) | |
download | pkgsrc-74423ad904d01e34fc759f3758b1da50f628bceb.tar.gz |
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 (limited to 'geography')
-rw-r--r-- | geography/opencpn/Makefile | 6 | ||||
-rw-r--r-- | geography/opencpn/distinfo | 4 | ||||
-rw-r--r-- | geography/opencpn/patches/patch-src_glu_CMakeLists.txt | 16 | ||||
-rw-r--r-- | geography/opencpn/patches/patch-src_glu_libtess_sweep.c | 61 |
4 files changed, 21 insertions, 66 deletions
diff --git a/geography/opencpn/Makefile b/geography/opencpn/Makefile index 6679655f616..d0be37e8546 100644 --- a/geography/opencpn/Makefile +++ b/geography/opencpn/Makefile @@ -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 @@ USE_CMAKE= yes 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 --git a/geography/opencpn/distinfo b/geography/opencpn/distinfo index 8571668d6bd..d0f3d81d06a 100644 --- a/geography/opencpn/distinfo +++ b/geography/opencpn/distinfo @@ -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_chart1.cpp) = ae7c1d8a59c9a275914a613205de71e2dca89dc6 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 --git a/geography/opencpn/patches/patch-src_glu_CMakeLists.txt b/geography/opencpn/patches/patch-src_glu_CMakeLists.txt new file mode 100644 index 00000000000..c9b13d49486 --- /dev/null +++ b/geography/opencpn/patches/patch-src_glu_CMakeLists.txt @@ -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 --git a/geography/opencpn/patches/patch-src_glu_libtess_sweep.c b/geography/opencpn/patches/patch-src_glu_libtess_sweep.c deleted file mode 100644 index f2114f05a96..00000000000 --- a/geography/opencpn/patches/patch-src_glu_libtess_sweep.c +++ /dev/null @@ -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. |