[csw-devel] SF.net SVN: gar:[11466] csw/mgar/pkg/gource/trunk
dmichelsen at users.sourceforge.net
dmichelsen at users.sourceforge.net
Mon Nov 1 16:30:52 CET 2010
Revision: 11466
http://gar.svn.sourceforge.net/gar/?rev=11466&view=rev
Author: dmichelsen
Date: 2010-11-01 15:30:52 +0000 (Mon, 01 Nov 2010)
Log Message:
-----------
gource: Add more patches
Modified Paths:
--------------
csw/mgar/pkg/gource/trunk/Makefile
Added Paths:
-----------
csw/mgar/pkg/gource/trunk/files/0002-Use-double-functions-and-proper-casts-in-lack-of-flo.patch
Modified: csw/mgar/pkg/gource/trunk/Makefile
===================================================================
--- csw/mgar/pkg/gource/trunk/Makefile 2010-11-01 15:22:54 UTC (rev 11465)
+++ csw/mgar/pkg/gource/trunk/Makefile 2010-11-01 15:30:52 UTC (rev 11466)
@@ -9,12 +9,25 @@
MASTER_SITES = $(GOOGLE_MIRROR)
DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz
-PATCHFILES = 0001-Make-sure-we-have-a-prototype-for-sqrt.patch
+PATCHFILES = 0001-Make-sure-we-have-a-prototype-for-sqrt.patch
+PATCHFILES += 0002-Use-double-functions-and-proper-casts-in-lack-of-flo.patch
# We define upstream file regex so we can be notifed of new upstream software release
UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz
+RUNTIME_DEP_PKGS_CSWgource += CSWlibsdl
+RUNTIME_DEP_PKGS_CSWgource += CSWpng
+RUNTIME_DEP_PKGS_CSWgource += CSWmesa
+RUNTIME_DEP_PKGS_CSWgource += CSWstlport
+RUNTIME_DEP_PKGS_CSWgource += CSWpcrert
+RUNTIME_DEP_PKGS_CSWgource += CSWftgl
+RUNTIME_DEP_PKGS_CSWgource += CSWsdlimage
+RUNTIME_DEP_PKGS_CSWgource += CSWglew
+RUNTIME_DEP_PKGS_CSWgource += CSWjpeg
+
EXTRA_CXXFLAGS = -library=stlport4
CONFIGURE_ARGS = $(DIRPATHS)
+TEST_TARGET = check
+
include gar/category.mk
Added: csw/mgar/pkg/gource/trunk/files/0002-Use-double-functions-and-proper-casts-in-lack-of-flo.patch
===================================================================
--- csw/mgar/pkg/gource/trunk/files/0002-Use-double-functions-and-proper-casts-in-lack-of-flo.patch (rev 0)
+++ csw/mgar/pkg/gource/trunk/files/0002-Use-double-functions-and-proper-casts-in-lack-of-flo.patch 2010-11-01 15:30:52 UTC (rev 11466)
@@ -0,0 +1,116 @@
+From 3a19f7de7499cbd0a15be6aab3412813b08bcbaa Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Mon, 1 Nov 2010 16:17:23 +0100
+Subject: [PATCH] Use double functions and proper casts in lack of float-functions
+
+---
+ src/commitlog.cpp | 2 +-
+ src/core/fxfont.cpp | 4 ++--
+ src/dirnode.cpp | 4 ++--
+ src/gource.cpp | 12 ++++++------
+ 4 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/src/commitlog.cpp b/src/commitlog.cpp
+index a884ba1..59d7f24 100644
+--- a/src/commitlog.cpp
++++ b/src/commitlog.cpp
+@@ -248,7 +248,7 @@ RCommitFile::RCommitFile(const std::string& filename, const std::string& action,
+
+ //prepend a root slash
+ if(this->filename[0] != '/') {
+- this->filename.insert(0, 1, '/');
++ this->filename.insert((unsigned)0, 1, '/');
+ }
+
+ this->action = action;
+diff --git a/src/core/fxfont.cpp b/src/core/fxfont.cpp
+index 956e8ce..1cb0969 100644
+--- a/src/core/fxfont.cpp
++++ b/src/core/fxfont.cpp
+@@ -96,8 +96,8 @@ void FXFont::render(float x, float y, const std::string & text) const{
+
+
+ if(round) {
+- x = roundf(x);
+- y = roundf(y);
++ x = floor(x);
++ y = floor(y);
+ }
+
+ glPushMatrix();
+diff --git a/src/dirnode.cpp b/src/dirnode.cpp
+index 9a05002..5b20209 100644
+--- a/src/dirnode.cpp
++++ b/src/dirnode.cpp
+@@ -537,7 +537,7 @@ void RDirNode::calcRadius() {
+ //this->dir_radius_sqrt = sqrt(dir_radius); //dir_radius_sqrt is not used
+
+ // this->parent_radius = std::max(1.0, parent_circ / PI);
+- this->parent_radius = std::max(1.0, sqrt(total_file_area) * gGourceDirPadding);
++ this->parent_radius = std::max(1.0, (double) sqrt(total_file_area) * gGourceDirPadding);
+ }
+
+ float RDirNode::distanceToParent() const{
+@@ -778,7 +778,7 @@ vec2f RDirNode::calcFileDest(int max_files, int file_no) {
+
+ float frac = arc * 0.5 + arc * file_no;
+
+- vec2f dest = vec2f(sinf(frac*PI*2.0), cosf(frac*PI*2.0));
++ vec2f dest = vec2f(sin(frac*PI*2.0), cos(frac*PI*2.0));
+
+ return dest;
+ }
+diff --git a/src/gource.cpp b/src/gource.cpp
+index 0249c93..81ef726 100644
+--- a/src/gource.cpp
++++ b/src/gource.cpp
+@@ -684,7 +684,7 @@ void Gource::keyPress(SDL_KeyboardEvent *e) {
+
+ if (e->keysym.unicode == SDLK_EQUALS || e->keysym.unicode == SDLK_PLUS) {
+ if(gGourceSettings.days_per_second>=1.0) {
+- gGourceSettings.days_per_second = std::min(30.0f, floorf(gGourceSettings.days_per_second) + 1.0f);
++ gGourceSettings.days_per_second = std::min(30.0f, floor(gGourceSettings.days_per_second) + 1.0f);
+ } else {
+ gGourceSettings.days_per_second = std::min(1.0f, gGourceSettings.days_per_second * 2.0f);
+ }
+@@ -692,7 +692,7 @@ void Gource::keyPress(SDL_KeyboardEvent *e) {
+
+ if (e->keysym.unicode == SDLK_MINUS) {
+ if(gGourceSettings.days_per_second>1.0) {
+- gGourceSettings.days_per_second = std::max(0.0f, floorf(gGourceSettings.days_per_second) - 1.0f);
++ gGourceSettings.days_per_second = std::max(0.0f, floor(gGourceSettings.days_per_second) - 1.0f);
+ } else {
+ gGourceSettings.days_per_second = std::max(0.0f, gGourceSettings.days_per_second * 0.5f);
+ }
+@@ -717,7 +717,7 @@ void Gource::keyPress(SDL_KeyboardEvent *e) {
+ if(e->keysym.unicode == SDLK_PERIOD) {
+
+ if(time_scale>=1.0) {
+- time_scale = std::min(4.0f, floorf(time_scale) + 1.0f);
++ time_scale = std::min(4.0f, floor(time_scale) + 1.0f);
+ } else {
+ time_scale = std::min(1.0f, time_scale * 2.0f);
+ }
+@@ -726,7 +726,7 @@ void Gource::keyPress(SDL_KeyboardEvent *e) {
+ if(e->keysym.unicode == SDLK_COMMA) {
+
+ if(time_scale>1.0) {
+- time_scale = std::max(0.0f, floorf(time_scale) - 1.0f);
++ time_scale = std::max(0.0f, floor(time_scale) - 1.0f);
+ } else {
+ time_scale = std::max(0.25f, time_scale * 0.5f);
+ }
+@@ -1320,8 +1320,8 @@ void Gource::logic(float t, float dt) {
+ //apply rotation
+ if(rotate_angle != 0.0f) {
+
+- float s = sinf(rotate_angle);
+- float c = cosf(rotate_angle);
++ float s = sin(rotate_angle);
++ float c = cos(rotate_angle);
+
+ root->rotate(s, c);
+
+--
+1.7.2.2
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list