Submitted By:            Bruce Dubbs <bdubbs at linuxfromscratch dot org>
Date:                    2015-06-30
Initial Package Version: 27-01-15
Upstream Status:         Not submitted
Origin:                  Self
Description:             Fixes building with gcc-5.1

diff -Naur frei0r-snapshot-27-01-15.orig/src/filter/facedetect/facedetect.cpp frei0r-snapshot-27-01-15/src/filter/facedetect/facedetect.cpp
--- frei0r-snapshot-27-01-15.orig/src/filter/facedetect/facedetect.cpp	2015-01-26 21:00:03.000000000 -0600
+++ frei0r-snapshot-27-01-15/src/filter/facedetect/facedetect.cpp	2015-06-30 21:29:45.952115578 -0500
@@ -257,11 +257,11 @@
     {
         double scale = this->scale == 0? 1.0 : this->scale;
         CvScalar colors[5] = {
-            {{cvRound(color[0].r * 255), cvRound(color[0].g * 255), cvRound(color[0].b * 255), cvRound(alpha * 255)}},
-            {{cvRound(color[1].r * 255), cvRound(color[1].g * 255), cvRound(color[1].b * 255), cvRound(alpha * 255)}},
-            {{cvRound(color[2].r * 255), cvRound(color[2].g * 255), cvRound(color[2].b * 255), cvRound(alpha * 255)}},
-            {{cvRound(color[3].r * 255), cvRound(color[3].g * 255), cvRound(color[3].b * 255), cvRound(alpha * 255)}},
-            {{cvRound(color[4].r * 255), cvRound(color[4].g * 255), cvRound(color[4].b * 255), cvRound(alpha * 255)}},
+            CvScalar(cvRound(color[0].r * 255), cvRound(color[0].g * 255), cvRound(color[0].b * 255), cvRound(alpha * 255)),
+            CvScalar(cvRound(color[1].r * 255), cvRound(color[1].g * 255), cvRound(color[1].b * 255), cvRound(alpha * 255)),
+            CvScalar(cvRound(color[2].r * 255), cvRound(color[2].g * 255), cvRound(color[2].b * 255), cvRound(alpha * 255)),
+            CvScalar(cvRound(color[3].r * 255), cvRound(color[3].g * 255), cvRound(color[3].b * 255), cvRound(alpha * 255)),
+            CvScalar(cvRound(color[4].r * 255), cvRound(color[4].g * 255), cvRound(color[4].b * 255), cvRound(alpha * 255)),
         };
         
         for (int i = 0; i < (objects ? objects->total : 0); i++)
@@ -285,14 +285,17 @@
                 }
             case 1:
                 {
-                    CvBox2D box = {{center.x, center.y}, {r->width / scale, (r->height / scale) * 1.2}, 90};
+                    CvBox2D box = 
+                       CvBox2D(CvPoint2D32f(center.x, center.y), 
+                               CvSize2D32f(r->width / scale, (r->height / scale) * 1.2), 
+                               90.0);
                     cvEllipseBox(image, box, colors[i % 5], thickness, linetype);
                     break;
                 }
             case 2:
                 {
-                    CvPoint pt1 = {r->x / scale, r->y / scale};
-                    CvPoint pt2 = {(r->x + r->width) / scale, (r->y + r->height) / scale};
+                    CvPoint pt1 = CvPoint(r->x / scale, r->y / scale);
+                    CvPoint pt2 = CvPoint((r->x + r->width) / scale, (r->y + r->height) / scale);
                     cvRectangle(image, pt1, pt2, colors[i % 5], thickness, linetype);
                     break;
                 }
