Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix undefined behavior (promoted from a warning to an error in recent…

… gcc)

by casting string objects to const char * before passing to printf.

While here, switch PKG_DESTDIR_SUPPORT from "destdir" to "user-destdir"
(no reason I can see for the former, it appears to date way back) and
add patch comments.

PKGREVISION -> 9, since with netbsd-5 and older -current the issue wasn't
fatal at compile time.
  • Loading branch information...
commit d24f8d356959f142836290df18d4919f1334a3e1 1 parent 747b7ab
dholland authored
View
7 cad/boolean/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.51 2011/11/01 06:00:42 sbd Exp $
+# $NetBSD: Makefile,v 1.52 2012/01/03 01:18:46 dholland Exp $
#
DISTNAME= boolean_6_99
PKGNAME= boolean-6.99
-PKGREVISION= 8
+PKGREVISION= 9
CATEGORIES= cad graphics
MASTER_SITES= http://boolean.klaasholwerda.nl/download/boolzip/
EXTRACT_SUFX= .tgz
@@ -12,7 +12,7 @@ MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://boolean.klaasholwerda.nl/bool.html
COMMENT= GDSII viewer/editor + (boolean) operations on sets of 2d polygons
-PKG_DESTDIR_SUPPORT= destdir
+PKG_DESTDIR_SUPPORT= user-destdir
WRKSRC= ${WRKDIR}/boolean
@@ -41,6 +41,7 @@ do-install:
${INSTALL_SCRIPT} ${WRKSRC}/bin/boolean.sh ${DESTDIR}${PREFIX}/bin/boolean
${INSTALL_PROGRAM} ${WRKSRC}/bin/edit ${DESTDIR}${PREFIX}/bin/edit
+.include "../../x11/gtk2/buildlink3.mk"
.include "../../x11/wxGTK28/buildlink3.mk"
.include "../../x11/wxGTK28-contrib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
View
7 cad/boolean/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.15 2009/08/14 19:09:48 joerg Exp $
+$NetBSD: distinfo,v 1.16 2012/01/03 01:18:46 dholland Exp $
SHA1 (boolean_6_99.tgz) = 03e8dc7c9aa2886b0d5663669248c507524c5b22
RMD160 (boolean_6_99.tgz) = 7977bb140169fa15a7dde9709ba1867e763b7b9c
Size (boolean_6_99.tgz) = 4270460 bytes
-SHA1 (patch-aa) = f2c2d15bc27941d172babbb7add4ddbeddb211df
-SHA1 (patch-ab) = d9c45fc98a82edba6e59ba1c774b73992152b072
+SHA1 (patch-aa) = 0ca93dd87f8c314d718b63a14a94cbea7739b5a3
+SHA1 (patch-ab) = 688efee8aeb2f2616a6f67a2dbfd1055d48cb9b3
+SHA1 (patch-apps_edit_src_intrface_strucdlg_cpp) = 44637ca6b71f722c55f0986ee31ee29f35fe8858
View
4 cad/boolean/patches/patch-aa
@@ -1,4 +1,6 @@
-$NetBSD: patch-aa,v 1.5 2009/08/14 19:09:49 joerg Exp $
+$NetBSD: patch-aa,v 1.6 2012/01/03 01:18:46 dholland Exp $
+
+Configure for pkgsrc.
--- bin/boolean.sh.orig 2007-02-27 08:54:20.000000000 +0100
+++ bin/boolean.sh
View
6 cad/boolean/patches/patch-ab
@@ -1,8 +1,10 @@
-$NetBSD: patch-ab,v 1.5 2009/08/14 19:09:49 joerg Exp $
+$NetBSD: patch-ab,v 1.6 2012/01/03 01:18:46 dholland Exp $
+
+- configure for pkgsrc
--- bin/FindwxWidgets.cmake.orig 2009-08-14 18:59:11.000000000 +0200
+++ bin/FindwxWidgets.cmake
-@@ -137,9 +137,9 @@ SET( wxWidgets_UCD "" )
+@@ -137,9 +137,9 @@ SET( wxWidgets_UCD "" )
SET( wxWidgets_DBG "" )
OPTION( wxWidgets_USE_MONOLITHIC "Use wxWidgets build as monolithic library" OFF)
View
24 cad/boolean/patches/patch-apps_edit_src_intrface_strucdlg_cpp
@@ -0,0 +1,24 @@
+$NetBSD: patch-apps_edit_src_intrface_strucdlg_cpp,v 1.1 2012/01/03 01:18:46 dholland Exp $
+
+Avoid undefined behvior, caught by gcc.
+
+--- apps/edit/src/intrface/strucdlg.cpp~ 2006-05-03 11:41:00.000000000 +0000
++++ apps/edit/src/intrface/strucdlg.cpp
+@@ -286,7 +286,7 @@ void StructuresDialog::CmOk(wxCommandEve
+ selectedStruct = selectedStruct.Mid( 0, top );
+ _structure = _structurelist->GetStructure(selectedStruct);
+ if (_structure)
+- GLOB->CMDH->DoCommand("viewstructure %s",selectedStruct);
++ GLOB->CMDH->DoCommand("viewstructure %s", (const char *)selectedStruct);
+ }
+
+ // OK button pressed: get the choosen structure
+@@ -299,7 +299,7 @@ void StructuresDialog::CmShow(wxCommandE
+ selectedStruct = selectedStruct.Mid( 0, top );
+ _structure = _structurelist->GetStructure(selectedStruct);
+ if (_structure)
+- GLOB->CMDH->DoCommand("viewstructure %s",selectedStruct);
++ GLOB->CMDH->DoCommand("viewstructure %s", (const char *)selectedStruct);
+ }
+
+ Structure* StructuresDialog::GetStructure()
Please sign in to comment.
Something went wrong with that request. Please try again.