From 4d371b0149250cb00325c1c492ad3c82193584ee Mon Sep 17 00:00:00 2001 From: sthen Date: Wed, 28 Jan 2009 15:14:55 +0000 Subject: [PATCH] - fix implicit casts, from maintainer - remove an attempt to free() static memory. - better COMMENT ok David Coppa (maintainer) --- games/numptyphysics/Makefile | 5 +++-- games/numptyphysics/patches/patch-Http_cpp | 12 +++++++++-- games/numptyphysics/patches/patch-Path_cpp | 24 ++++++++++++++++++++++ 3 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 games/numptyphysics/patches/patch-Path_cpp diff --git a/games/numptyphysics/Makefile b/games/numptyphysics/Makefile index 43218c79bc8..1f49d612ab1 100644 --- a/games/numptyphysics/Makefile +++ b/games/numptyphysics/Makefile @@ -1,8 +1,9 @@ -# $OpenBSD: Makefile,v 1.1.1.1 2009/01/28 10:12:35 sthen Exp $ +# $OpenBSD: Makefile,v 1.2 2009/01/28 15:14:55 sthen Exp $ -COMMENT = Drawing physics-based puzzle game +COMMENT = physics-based drawing puzzle game DISTNAME = numptyphysics-0.3.r20090104 +PKGNAME = ${DISTNAME}p0 EXTRACT_SUFX = .tar.bz2 CATEGORIES = games diff --git a/games/numptyphysics/patches/patch-Http_cpp b/games/numptyphysics/patches/patch-Http_cpp index 4b1e60427e8..fc0c52e6faf 100644 --- a/games/numptyphysics/patches/patch-Http_cpp +++ b/games/numptyphysics/patches/patch-Http_cpp @@ -1,6 +1,6 @@ -$OpenBSD: patch-Http_cpp,v 1.1.1.1 2009/01/28 10:12:35 sthen Exp $ +$OpenBSD: patch-Http_cpp,v 1.2 2009/01/28 15:14:55 sthen Exp $ --- Http.cpp.orig Thu Oct 23 09:51:17 2008 -+++ Http.cpp Tue Jan 27 13:47:09 2009 ++++ Http.cpp Wed Jan 28 14:23:33 2009 @@ -60,7 +60,7 @@ static bool parseUri( const char * uri, if ( strncmp(uri,"http://",strlen("http://"))==0 ) { uri += strlen("http://"); @@ -19,3 +19,11 @@ $OpenBSD: patch-Http_cpp,v 1.1.1.1 2009/01/28 10:12:35 sthen Exp $ fprintf(stderr,"Http::get host=%s port=%d file=%s\n",outHost,*outPort,outPath); return true; } +@@ -103,7 +103,6 @@ bool Http::get( const char* uri, + } + + fclose ( m_file ); +- free( host ); + return m_size > 0; + } + diff --git a/games/numptyphysics/patches/patch-Path_cpp b/games/numptyphysics/patches/patch-Path_cpp new file mode 100644 index 00000000000..5c17ba4c2bd --- /dev/null +++ b/games/numptyphysics/patches/patch-Path_cpp @@ -0,0 +1,24 @@ +--- Path.cpp.orig Thu Oct 23 09:51:17 2008 ++++ Path.cpp Wed Jan 28 14:23:19 2009 +@@ -80,8 +80,8 @@ Path& Path::rotate(const b2Mat22& rot) + + for (int i=0;i(j1 * at(i).x + j2 * at(i).y), ++ static_cast(k1 * at(i).x + k2 * at(i).y) ); + } + return *this; + } +@@ -89,8 +89,8 @@ Path& Path::rotate(const b2Mat22& rot) + Path& Path::scale(float32 factor) + { + for (int i=0;i(at(i).x * factor); ++ at(i).y = static_cast(at(i).y * factor); + } + return *this; + }