ASR_BASE

Change-Id: Icf3719cc0afe3eeb3edc7fa80a2eb5199ca9dda1
diff --git a/external/subpack/utils/rrdtool1/patches/001-no_ordering_cd_joke.patch b/external/subpack/utils/rrdtool1/patches/001-no_ordering_cd_joke.patch
new file mode 100644
index 0000000..073c310
--- /dev/null
+++ b/external/subpack/utils/rrdtool1/patches/001-no_ordering_cd_joke.patch
@@ -0,0 +1,20 @@
+--- a/configure
++++ b/configure
+@@ -24873,17 +24873,12 @@ echo "$as_me:$LINENO: result: and out ag
+ echo "${ECHO_T}and out again" >&6
+ 
+ echo $ECHO_N "ordering CD from http://people.ee.ethz.ch/~oetiker/wish $ac_c" 1>&6
+-sleep 1
+ echo $ECHO_N ".$ac_c" 1>&6
+-sleep 2
+ echo $ECHO_N ".$ac_c" 1>&6
+-sleep 1
+ echo $ECHO_N ".$ac_c" 1>&6
+-sleep 3
+ echo $ECHO_N ".$ac_c" 1>&6
+ echo $ECHO_N ".$ac_c" 1>&6
+ echo $ECHO_N ".$ac_c" 1>&6
+-sleep 2
+ echo "$as_me:$LINENO: result:  just kidding ;-)" >&5
+ echo "${ECHO_T} just kidding ;-)" >&6
+ echo
diff --git a/external/subpack/utils/rrdtool1/patches/002-no_timezone.patch b/external/subpack/utils/rrdtool1/patches/002-no_timezone.patch
new file mode 100644
index 0000000..67bc9b1
--- /dev/null
+++ b/external/subpack/utils/rrdtool1/patches/002-no_timezone.patch
@@ -0,0 +1,24 @@
+--- a/src/rrd_tool.c
++++ b/src/rrd_tool.c
+@@ -225,11 +225,8 @@ int main(int argc, char *argv[])
+ 	  struct rusage  myusage;
+ 	  struct timeval starttime;
+ 	  struct timeval currenttime;
+-	  struct timezone tz;
+ 
+-	    tz.tz_minuteswest =0;
+-	    tz.tz_dsttime=0;
+-	    gettimeofday(&starttime,&tz);
++	    gettimeofday(&starttime,NULL);
+ #endif
+ 
+ 	    while (fgets(aLine, sizeof(aLine)-1, stdin)){
+@@ -252,7 +249,7 @@ int main(int argc, char *argv[])
+ 
+ #if HAVE_GETRUSAGE
+ 		getrusage(RUSAGE_SELF,&myusage);
+-		gettimeofday(&currenttime,&tz);
++		gettimeofday(&currenttime,NULL);
+ 		printf("OK u:%1.2f s:%1.2f r:%1.2f\n",
+ 		       (double)myusage.ru_utime.tv_sec+
+ 		       (double)myusage.ru_utime.tv_usec/1000000.0,
diff --git a/external/subpack/utils/rrdtool1/patches/020-x86-float-cast.patch b/external/subpack/utils/rrdtool1/patches/020-x86-float-cast.patch
new file mode 100644
index 0000000..1de2234
--- /dev/null
+++ b/external/subpack/utils/rrdtool1/patches/020-x86-float-cast.patch
@@ -0,0 +1,11 @@
+--- a/src/rrd_format.h
++++ b/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/external/subpack/utils/rrdtool1/patches/030-pod2man-stderr.patch b/external/subpack/utils/rrdtool1/patches/030-pod2man-stderr.patch
new file mode 100644
index 0000000..38deac7
--- /dev/null
+++ b/external/subpack/utils/rrdtool1/patches/030-pod2man-stderr.patch
@@ -0,0 +1,11 @@
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -35,7 +35,7 @@ iman_DATA = $(MAN)
+ all-local: link txt man html
+ 
+ .pod.1 .pm.1 .pl.1:
+-	pod2man --release=$(VERSION) --center=RRDtool $<  > $@
++	pod2man --stderr --release=$(VERSION) --center=RRDtool $<  > $@
+ 
+ .1.txt:
+ 	@NROFF@ -man -Tlp $< > $@ || echo @NROFF@ failed > $@
diff --git a/external/subpack/utils/rrdtool1/patches/040-no-e-notation-on-log-display.patch b/external/subpack/utils/rrdtool1/patches/040-no-e-notation-on-log-display.patch
new file mode 100644
index 0000000..4555167
--- /dev/null
+++ b/external/subpack/utils/rrdtool1/patches/040-no-e-notation-on-log-display.patch
@@ -0,0 +1,27 @@
+--- a/src/rrd_graph.c
++++ b/src/rrd_graph.c
+@@ -2049,7 +2049,7 @@ horizontal_log_grid(gdImagePtr gif, imag
+     char     graph_label[100];
+     gdPoint  polyPoints[4];
+     int      styleMinor[2],styleMajor[2];
+-    double   value, pixperstep, minstep;
++    double   value, pixperstep, minstep, yval;
+ 
+     /* find grid spaceing */
+     pixpex= (double)im->ysize / (log10(im->maxval) - log10(im->minval));
+@@ -2118,7 +2118,14 @@ horizontal_log_grid(gdImagePtr gif, imag
+ 	    
+ 	    gdImageLine(gif, polyPoints[0].x,polyPoints[0].y,
+ 			polyPoints[1].x,polyPoints[0].y,gdStyled);
+-	    sprintf(graph_label,"%3.0e",value * yloglab[majoridx][i]);
++	    yval = value * yloglab[majoridx][i];
++	    if (yval >= 100000) {
++		    sprintf(graph_label,"%3.0e", yval);
++	    } else {
++		    if (yval == 1) /* prints as 1e+00 */
++			yval = 0;
++		    sprintf(graph_label,"%5.0f", yval);
++	    }
+ 	    gdImageString(gif, SmallFont,
+ 			  (polyPoints[0].x - (strlen(graph_label) * 
+ 					      SmallFont->w)-7),