From: Jo-Philipp Wich Date: Mon, 23 Jan 2012 13:55:11 +0000 (+0000) Subject: [packages] rrdtool, rrdtool-1.0.x: backport upstream commit r2069 X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;hb=32922b2df9608a4cc85cc1707852e74326a6d41f [packages] rrdtool, rrdtool-1.0.x: backport upstream commit r2069 Explicitely cast float cookie value to double, fixes erroneous "RRD was created on another architecture" errors on x86. Patches provided by Thomas Heil SVN-Revision: 29874 --- diff --git a/libs/rrdtool-1.0.x/Makefile b/libs/rrdtool-1.0.x/Makefile index 4e0eebc5c8..22a1fe6111 100644 --- a/libs/rrdtool-1.0.x/Makefile +++ b/libs/rrdtool-1.0.x/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2006-2012 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rrdtool1 PKG_VERSION:=1.0.50 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_BUILD_DIR:=$(BUILD_DIR)/rrdtool-$(PKG_VERSION) PKG_SOURCE:=rrdtool-$(PKG_VERSION).tar.gz diff --git a/libs/rrdtool-1.0.x/patches/020-x86-float-cast.patch b/libs/rrdtool-1.0.x/patches/020-x86-float-cast.patch new file mode 100644 index 0000000000..5b8a66276b --- /dev/null +++ b/libs/rrdtool-1.0.x/patches/020-x86-float-cast.patch @@ -0,0 +1,13 @@ +Index: rrdtool-1.0.50/src/rrd_format.h +=================================================================== +--- rrdtool-1.0.50.orig/src/rrd_format.h ++++ rrdtool-1.0.50/src/rrd_format.h +@@ -20,7 +20,7 @@ + + #define RRD_COOKIE "RRD" + #define RRD_VERSION "0001" +-#define FLOAT_COOKIE 8.642135E130 ++#define FLOAT_COOKIE ((double)8.642135E130) + + #if defined(WIN32) + #define DNAN ((double)fmod(0.0,0.0)) diff --git a/utils/rrdtool/Makefile b/utils/rrdtool/Makefile index 381fa0431e..c73b4e1109 100644 --- a/utils/rrdtool/Makefile +++ b/utils/rrdtool/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2009 OpenWrt.org +# Copyright (C) 2007-2012 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rrdtool PKG_VERSION:=1.2.30 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://oss.oetiker.ch/rrdtool/pub/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git a/utils/rrdtool/patches/020-x86-float-cast.patch b/utils/rrdtool/patches/020-x86-float-cast.patch new file mode 100644 index 0000000000..f3824041e0 --- /dev/null +++ b/utils/rrdtool/patches/020-x86-float-cast.patch @@ -0,0 +1,13 @@ +Index: rrdtool-1.2.30/src/rrd_format.h +=================================================================== +--- rrdtool-1.2.30.orig/src/rrd_format.h ++++ rrdtool-1.2.30/src/rrd_format.h +@@ -22,7 +22,7 @@ + /* #define RRD_VERSION "0002" */ + /* changed because microsecond precision requires another field */ + #define RRD_VERSION "0003" +-#define FLOAT_COOKIE 8.642135E130 ++#define FLOAT_COOKIE ((double)8.642135E130) + + #include "rrd_nan_inf.h" +