commit:     12fb25bab236353f95dd1a1c9c0ca13a2256f981
Author:     Johannes Huber <johu <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 11 19:41:51 2016 +0000
Commit:     Johannes Huber <johu <AT> gentoo <DOT> org>
CommitDate: Sun Dec 11 19:41:51 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12fb25ba

kde-apps/libkface: Drop slot 4

Package-Manager: portage-2.3.3

 kde-apps/libkface/Manifest                         |   3 -
 .../libkface/files/libkface-15.08.2-opencv3.patch  | 438 ---------------------
 .../files/libkface-15.08.3-opencv3.1.patch         | 167 --------
 kde-apps/libkface/libkface-15.08.3.ebuild          |  31 --
 kde-apps/libkface/libkface-4.12.0.ebuild           |  24 --
 kde-apps/libkface/libkface-4.4.0.ebuild            |  38 --
 6 files changed, 701 deletions(-)

diff --git a/kde-apps/libkface/Manifest b/kde-apps/libkface/Manifest
index b121c3f..d2be47e 100644
--- a/kde-apps/libkface/Manifest
+++ b/kde-apps/libkface/Manifest
@@ -1,5 +1,2 @@
-DIST digikam-4.12.0.tar.bz2 69527960 SHA256 
15043afb04733e059460165bc3cdf58dc42a67d7a349fbe12c2ebbe1946e3420 SHA512 
a5ebe481ef9803475cd2d4d198b0d093753ecb71367662f0e83a151ab34a2ff071139b28c1d9600279463fed96745b025db86d24b059b0794bc4a2b50338df85
 WHIRLPOOL 
cf29c3555ce41a298c9760287996d8edee76ff8a6ec42b503f55059e40b35f91cf56afb054f641e800f6e630d851491c2f77e0bd67020feefe8d6adf36a643f5
-DIST digikam-4.4.0.tar.bz2 68871203 SHA256 
5c68a2d200f5b502706128ea64839319aad333fb79548f49ecc92594e280d4e9 SHA512 
4992fad1e574fc44eac53f3ac8d4ab78ccbf8e04beb54a211a9afc20af1efb6f8bacedea07e403f490e7f70a74ed5ac02d4f9b939dfaf25f64a4a9bda0a7d94a
 WHIRLPOOL 
7a05ab9926227232a1cf52bf68da45b849b982e840b171f702610acce85a1ce8e59967a02e845a0ef19c316daee835861573aca40dc7b28422cf7d6d56119e2c
-DIST libkface-15.08.3.tar.xz 8986224 SHA256 
8f8314724f71041c4b3b6e2127ebaaddcfcf36415b20544740c4e11a5c203b4a SHA512 
8be93902584a0bbb01d64b93f2f2b2dd0aa87ce1ec13d35d35f7f7d5f62b24214be8e0224d55eb82391cbd70b30d6a5d2799b4f1ab2b2c933254440cf12cd81f
 WHIRLPOOL 
f37568f2bbf5248e9ca3569782113d6bd425d509146c53eff3243bf716cfb9160cb4de372c4099ef934db73a8d0040c50c4e4df603e0fac905b78c3d92f4a122
 DIST libkface-16.04.3.tar.xz 8987296 SHA256 
5737d76d739561a048b52895b226bf66ee916e3593562a46dc3f2dc99e01a757 SHA512 
b4d47e83115488faa12d12798049057c5e01ec55cf322f0ff5a2bb414e22629ddf43ced8c5f369aad9f2345376ec02132fe33dee0bc430d19d971ace025fda3d
 WHIRLPOOL 
e115567066c6adbc87e98713dcf10212ce3f60caf6aa7bd87c2ea4333964d7f93e5ff4c592b7d8bc665a6a67dcd8fde266ad96124e69d79201d8d9302cb5cefa
 DIST libkface-16.08.3.tar.xz 8987232 SHA256 
e76d2c420f9f3314e3acc6ba725759205717cdad328677d187f1914dfe4d9676 SHA512 
c670d098e0db0c4b549a7a97e41f64a287c572dfb7ff4f267082324507e4d701e25fc4f8fe0c456f59dc2862b8d91f438d56640fb63271ee226c1774d973d45b
 WHIRLPOOL 
24c7f1013cf760d590d282c2c8e2b98802c8e6c41b71f387eb95e5d15ddfb4631572a02ffb10eb47f2be7c721df26c85bff7a074b4ce858bca364ce7808f24e7

diff --git a/kde-apps/libkface/files/libkface-15.08.2-opencv3.patch 
b/kde-apps/libkface/files/libkface-15.08.2-opencv3.patch
deleted file mode 100644
index 02056a0..00000000
--- a/kde-apps/libkface/files/libkface-15.08.2-opencv3.patch
+++ /dev/null
@@ -1,438 +0,0 @@
-This is a combination of the following upstream commits to support opencv3, in 
order:
-
-a53bcebbfc4e6c42ee73adddc41f8c2f8f8f39c8 apply patch #94414 to support OpenCV3
-b95b5ae012fecdd0a85b094728d00a69bc4b4a7c bump version about OpenCV3 support
-d61c07bf6213774fa06380c466e7dc5438c03745 add rules if not right OpenCV version 
is found
-bd69e872ea43447a11282988b1f20bdf4d4f50a7 polish
-dc62c0e0ea55d189d918501cce4d92f4198a1a0c use same OpenCV logic than digiKam 
and kipi-plugins
-
---- a/CMakeLists.txt   2015-03-21 14:57:53.000000000 +0100
-+++ b/CMakeLists.txt   2015-10-16 21:47:13.382898572 +0200
-@@ -9,6 +9,8 @@
- message(STATUS 
"----------------------------------------------------------------------------------")
- message(STATUS "Starting CMake configuration for: libkface")
- 
-+option(ENABLE_OPENCV3 "Build libkface with OpenCV3 instead OpenCV2 
(default=OFF)" OFF)
-+
- find_package(Qt4 4.6.0 REQUIRED)
- find_package(KDE4 REQUIRED)
- 
-@@ -29,7 +31,26 @@
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} 
${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
- 
- include(MacroOpenCV)
--DETECT_OPENCV(2.4.9 core highgui objdetect contrib legacy imgproc)
-+
-+if(ENABLE_OPENCV3)
-+
-+    DETECT_OPENCV(3.0.0 core face highgui objdetect imgproc)
-+
-+    if(${OpenCV_FOUND} AND ${OpenCV_VERSION} VERSION_LESS 3.0.0)
-+        message(STATUS "ENABLE_OPENCV3 option is enabled and OpenCV < 3.0.0 
have been found. Disabled ENABLE_OPENCV3")
-+        set(OpenCV_FOUND FALSE)
-+    endif()
-+
-+else()
-+
-+    DETECT_OPENCV(2.4.9 core highgui objdetect contrib legacy imgproc)
-+
-+    if(${OpenCV_FOUND} AND ${OpenCV_VERSION} VERSION_GREATER 2.4.99)
-+        message(STATUS "ENABLE_OPENCV3 option is disabled and OpenCV >= 3.0.0 
have been found. Enabled ENABLE_OPENCV3")
-+        set(OpenCV_FOUND FALSE)
-+    endif()
-+
-+endif()
- 
- include_directories(${OpenCV_INCLUDE_DIRS})
- 
-@@ -48,11 +69,12 @@
-     # 3.3.0 => 2.0.0     (Added a "simple" training method using image data 
directly for a single image)
-     # 3.4.0 => 2.0.0     (Added a "simple" training method using image data 
directly for an image list)
-     # 3.5.0 => 3.0.0     (Added d private internal container to reduce binary 
uncompatibility with Identity class)
-+    # 3.5.1 => 3.0.0     (Added OpenCV3 support)
- 
-     # Library API version
-     set(KFACE_LIB_MAJOR_VERSION "3")
-     set(KFACE_LIB_MINOR_VERSION "5")
--    set(KFACE_LIB_PATCH_VERSION "0")
-+    set(KFACE_LIB_PATCH_VERSION "1")
- 
-     # Suffix to add at end of version string. Usual values are:
-     # "-git"   : alpha code unstable from git. Do not use in production
---- a/README   2015-03-21 14:57:53.000000000 +0100
-+++ b/README   2015-10-16 21:47:13.376898647 +0200
-@@ -21,6 +21,11 @@
- libkde     >= 4.4.x                    http://www.kde.org
- libopencv  >= 2.4.9                    http://opencv.willowgarage.com/wiki    
(with opencv 'haarcascades' data files)
- 
-+CMake compilation options to custom libkface:
-+
-+Use CMake "-DENABLE_OPENCV3=on"        flag to compile libkface source code 
using OpenCV3 instead OpenCV2 (disabled by default).
-+                                       OpenCV3 support needs extra contrib 
modules package, especially 'face' and 'legacy' components.
-+
- -- INSTALL ------------------------------------------------------------
- 
- In order to compile, especially when QT3/Qt4 are installed at the same time,
---- a/libkface/CMakeLists.txt  2015-03-21 14:57:53.000000000 +0100
-+++ b/libkface/CMakeLists.txt  2015-10-16 21:47:13.376898647 +0200
-@@ -1,5 +1,5 @@
- #
--# Copyright (c) 2010-2014, Gilles Caulier, <caulier dot gilles at gmail dot 
com>
-+# Copyright (c) 2010-2015, Gilles Caulier, <caulier dot gilles at gmail dot 
com>
- #
- # Redistribution and use is allowed according to the terms of the BSD license.
- # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
---- a/libkface/detection/opencvfacedetector.cpp        2015-03-21 
14:57:53.000000000 +0100
-+++ b/libkface/detection/opencvfacedetector.cpp        2015-10-16 
21:47:13.382898572 +0200
-@@ -18,7 +18,7 @@
-  *         <a href="alexjironkin at gmail dot com">alexjironkin at gmail dot 
com</a>
-  * @author Copyright (C) 2010 by Aditya Bhatt
-  *         <a href="adityabhatt at gmail dot com">adityabhatt at gmail dot 
com</a>
-- * @author Copyright (C) 2010-2014 by Gilles Caulier
-+ * @author Copyright (C) 2010-2015 by Gilles Caulier
-  *         <a href="mailto:caulier dot gilles at gmail dot com">caulier dot 
gilles at gmail dot com</a>
-  * @author Copyright (C) 2010-2013 by Marcel Wiesweg
-  *         <a href="mailto:marcel dot wiesweg at gmx dot de">marcel dot 
wiesweg at gmx dot de</a>
-@@ -136,13 +136,14 @@
- 
-     cv::Size getOriginalWindowSize() const
-     {
-+#if OPENCV_VERSION <= OPENCV_MAKE_VERSION(2,4,99)
-         // This is a HACK which may break any time. Work around the fact that 
getOriginalWindowSize()
-         // always returns (0,0) and we need these values.
-         if (oldCascade)
-         {
-             return oldCascade->orig_window_size;
-         }
--
-+#endif
-         return cv::Size(0, 0);
-     }
- 
---- a/libkface/libopencv.h.cmake.in    2015-03-21 14:57:53.000000000 +0100
-+++ b/libkface/libopencv.h.cmake.in    2015-10-16 21:47:13.382898572 +0200
-@@ -7,7 +7,7 @@
-  * @date   2010-06-16
-  * @brief  Wrapper for OpenCV header files
-  *
-- * @author Copyright (C) 2012-2014 by Gilles Caulier
-+ * @author Copyright (C) 2012-2015 by Gilles Caulier
-  *         <a href="mailto:caulier dot gilles at gmail dot com">caulier dot 
gilles at gmail dot com</a>
-  *
-  * This program is free software; you can redistribute it
-@@ -31,16 +31,16 @@
- 
- // Pragma directives to reduce warnings from OpenCV header files.
- #if not defined(__APPLE__) && defined(__GNUC__)
--#pragma GCC diagnostic push
--#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
--#pragma GCC diagnostic ignored "-Woverloaded-virtual"
-+#   pragma GCC diagnostic push
-+#   pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
-+#   pragma GCC diagnostic ignored "-Woverloaded-virtual"
- #endif
- 
- #if defined(__APPLE__) && defined(__clang__)
--#pragma clang diagnostic push
--#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
--#pragma clang diagnostic ignored "-Woverloaded-virtual"
--#pragma clang diagnostic ignored "-Wcast-align"
-+#   pragma clang diagnostic push
-+#   pragma clang diagnostic ignored "-Wnon-virtual-dtor"
-+#   pragma clang diagnostic ignored "-Woverloaded-virtual"
-+#   pragma clang diagnostic ignored "-Wcast-align"
- #endif
- 
- // OpenCV includes
-@@ -49,25 +49,32 @@
- 
- #define OPENCV_MAKE_VERSION(major,minor,patch) (((major) << 16) | ((minor) << 
8) | (patch))
- #define OPENCV_VERSION                         
OPENCV_MAKE_VERSION(CV_MAJOR_VERSION,CV_MINOR_VERSION,CV_SUBMINOR_VERSION)
--#define OPENCV_TEST_VERSION(major,minor,patch) ( OPENCV_VERSION >= 
OPENCV_MAKE_VERSION(major,minor,patch) )
-+#define OPENCV_TEST_VERSION(major,minor,patch) ( OPENCV_VERSION < 
OPENCV_MAKE_VERSION(major,minor,patch) )
- 
--#include <opencv2/core/core.hpp>
--#include <opencv2/core/internal.hpp>
--#include <opencv2/contrib/contrib.hpp>
-+#if OPENCV_TEST_VERSION(3,0,0)
-+#   include <opencv2/core/core.hpp>
-+#   include <opencv2/core/internal.hpp>
-+#   include <opencv2/contrib/contrib.hpp>
-+#else
-+#   include <opencv2/face.hpp>
-+#   include <opencv2/core.hpp>
-+#endif
- 
- // for old-style code
-+#if OPENCV_VERSION <= OPENCV_MAKE_VERSION(2,4,99)
-+#   include <opencv2/legacy/compat.hpp>
-+#endif
- #include <opencv2/opencv.hpp>
--#include <opencv2/legacy/compat.hpp>
- #include <opencv2/highgui/highgui_c.h>
- #include <opencv/cvaux.h>
- 
- // Restore warnings
- #if not defined(__APPLE__) && defined(__GNUC__)
--#pragma GCC diagnostic pop
-+#   pragma GCC diagnostic pop
- #endif
- 
- #if defined(__APPLE__) && defined(__clang__)
--#pragma clang diagnostic pop
-+#   pragma clang diagnostic pop
- #endif
- 
- #endif // LIB_OPEN_CV_H
---- a/libkface/recognition-opencv-lbph/facerec_borrowed.h      2015-03-21 
14:57:53.000000000 +0100
-+++ b/libkface/recognition-opencv-lbph/facerec_borrowed.h      2015-10-16 
21:47:13.382898572 +0200
-@@ -45,7 +45,11 @@
- namespace KFaceIface
- {
- 
-+#if OPENCV_TEST_VERSION(3,0,0)
- class LBPHFaceRecognizer : public cv::FaceRecognizer
-+#else
-+class LBPHFaceRecognizer : public cv::face::FaceRecognizer
-+#endif
- {
- public:
- 
-@@ -99,8 +103,13 @@
- 
-     ~LBPHFaceRecognizer() {}
- 
-+#if OPENCV_TEST_VERSION(3,0,0)
-     using cv::FaceRecognizer::save;
-     using cv::FaceRecognizer::load;
-+#else
-+    using cv::face::FaceRecognizer::save;
-+    using cv::face::FaceRecognizer::load;
-+#endif
- 
-     static cv::Ptr<LBPHFaceRecognizer> create(int radius=1, int neighbors=8, 
int grid_x=8, int grid_y=8, double threshold = DBL_MAX, PredictionStatistics 
statistics = NearestNeighbor);
- 
-@@ -139,6 +148,8 @@
-     /**
-      * Getter functions.
-      */
-+#if OPENCV_TEST_VERSION(3,0,0)
-+
-     int neighbors() const { return m_neighbors; }
-     int radius()    const { return m_radius;    }
-     int grid_x()    const { return m_grid_x;    }
-@@ -147,6 +158,34 @@
-     // NOTE: Implementation done through CV_INIT_ALGORITHM macro from OpenCV.
-     cv::AlgorithmInfo* info() const;
- 
-+#else
-+
-+    int getNeighbors() const                             { return 
m_neighbors;            }
-+    void setNeighbors(int _neighbors)                    { m_neighbors = 
_neighbors;      }
-+
-+    int getRadius()    const                             { return m_radius;   
            }
-+    void setRadius(int radius)                           { m_radius = radius; 
            }
-+
-+    int getGrid_x()    const                             { return m_grid_x;   
            }
-+    void setGrid_x(int _grid_x)                          { m_grid_x = 
_grid_x;            }
-+
-+    int getGrid_y()    const                             { return m_grid_y;   
            }
-+    void setGrid_y(int _grid_y)                          { m_grid_y = 
_grid_y;            }
-+
-+    double getThreshold() const                          { return 
m_threshold;            }
-+    void setThreshold(double _threshold)                 { m_threshold = 
_threshold;      }
-+
-+    void setHistograms(std::vector<cv::Mat> _histograms) { m_histograms = 
_histograms;    }
-+    std::vector<cv::Mat> getHistograms() const           { return 
m_histograms;           }
-+
-+    void setLabels(cv::Mat _labels)                      { m_labels = 
_labels;            }
-+    cv::Mat getLabels() const                            { return m_labels;   
            }
-+
-+    void setStatistic(int _statistic)                    { m_statisticsMode = 
_statistic; }
-+    int getStatistic() const                             { return 
m_statisticsMode;       }
-+
-+#endif
-+
- private:
- 
-     /** Computes a LBPH model with images in src and
---- a/libkface/recognition-opencv-lbph/lbphfacemodel.cpp       2015-03-21 
14:57:53.000000000 +0100
-+++ b/libkface/recognition-opencv-lbph/lbphfacemodel.cpp       2015-10-16 
21:47:13.383898559 +0200
-@@ -61,7 +61,11 @@
-     : cv::Ptr<LBPHFaceRecognizer>(LBPHFaceRecognizer::create()),
-       databaseId(0)
- {
-+#if OPENCV_TEST_VERSION(3,0,0)
-     ptr()->set("threshold", 100.0);
-+#else
-+    ptr()->setThreshold(100.0);
-+#endif
- }
- 
- LBPHFaceModel::~LBPHFaceModel()
-@@ -80,9 +84,13 @@
- 
- const LBPHFaceRecognizer* LBPHFaceModel::ptr() const
- {
-+#if OPENCV_TEST_VERSION(3,0,0)
-     const LBPHFaceRecognizer* const ptr = 
cv::Ptr<LBPHFaceRecognizer>::operator const KFaceIface::LBPHFaceRecognizer*();
-+#else
-+    const LBPHFaceRecognizer* const ptr = 
cv::Ptr<LBPHFaceRecognizer>::operator KFaceIface::LBPHFaceRecognizer*();
-+#endif
- 
--    if (!ptr) 
-+    if (!ptr)
-         kWarning() << "LBPHFaceRecognizer pointer is null";
- 
-     return ptr;
-@@ -90,47 +98,83 @@
- 
- int LBPHFaceModel::radius() const
- {
-+#if OPENCV_TEST_VERSION(3,0,0)
-     return ptr()->get<int>("radius");
-+#else
-+    return ptr()->getRadius();
-+#endif
- }
- 
- void LBPHFaceModel::setRadius(int radius)
- {
-+#if OPENCV_TEST_VERSION(3,0,0)
-     ptr()->set("radius", radius);
-+#else
-+    ptr()->setRadius(radius);
-+#endif
- }
- 
- int LBPHFaceModel::neighbors() const
- {
-+#if OPENCV_TEST_VERSION(3,0,0)
-     return ptr()->get<int>("neighbors");
-+#else
-+    return ptr()->getNeighbors();
-+#endif
- }
- 
- void LBPHFaceModel::setNeighbors(int neighbors)
- {
-+#if OPENCV_TEST_VERSION(3,0,0)
-     ptr()->set("neighbors", neighbors);
-+#else
-+    ptr()->setNeighbors(neighbors);
-+#endif
- }
- 
- int LBPHFaceModel::gridX() const
- {
-+#if OPENCV_TEST_VERSION(3,0,0)
-     return ptr()->get<int>("grid_x");
-+#else
-+    return ptr()->getGrid_x();
-+#endif
- }
- 
- void LBPHFaceModel::setGridX(int grid_x)
- {
-+#if OPENCV_TEST_VERSION(3,0,0)
-     ptr()->set("grid_x", grid_x);
-+#else
-+    ptr()->setGrid_x(grid_x);
-+#endif
- }
- 
- int LBPHFaceModel::gridY() const
- {
-+#if OPENCV_TEST_VERSION(3,0,0)
-     return ptr()->get<int>("grid_y");
-+#else
-+    return ptr()->getGrid_y();
-+#endif
- }
- 
- void LBPHFaceModel::setGridY(int grid_y)
- {
-+#if OPENCV_TEST_VERSION(3,0,0)
-     ptr()->set("grid_y", grid_y);
-+#else
-+    ptr()->setGrid_y(grid_y);
-+#endif
- }
- 
- OpenCVMatData LBPHFaceModel::histogramData(int index) const
- {
-+#if OPENCV_TEST_VERSION(3,0,0)
-     return OpenCVMatData(ptr()->get<std::vector<cv::Mat> 
>("histograms").at(index));
-+#else
-+    return OpenCVMatData(ptr()->getHistograms().at(index));
-+#endif
- }
- 
- QList<LBPHistogramMetadata> LBPHFaceModel::histogramMetadata() const
-@@ -168,12 +212,24 @@
-         m_histogramMetadata << metadata;
-     }
- 
-+#if OPENCV_TEST_VERSION(3,0,0)
-     std::vector<cv::Mat> currentHistograms = ptr()->get<std::vector<cv::Mat> 
>("histograms");
-     cv::Mat currentLabels                  = ptr()->get<cv::Mat>("labels");
-+#else
-+    std::vector<cv::Mat> currentHistograms = ptr()->getHistograms();
-+    cv::Mat currentLabels                  = ptr()->getLabels();
-+#endif
-+
-     currentHistograms.insert(currentHistograms.end(), newHistograms.begin(), 
newHistograms.end());
-     currentLabels.push_back(newLabels);
-+
-+#if OPENCV_TEST_VERSION(3,0,0)
-     ptr()->set("histograms", currentHistograms);
--    ptr()->set("labels", currentLabels);
-+    ptr()->set("labels",     currentLabels);
-+#else
-+    ptr()->setHistograms(currentHistograms);
-+    ptr()->setLabels(currentLabels);
-+#endif
- 
- /*
-     //Most cumbersome and inefficient way through a file storage which we 
were forced to use if we used standard OpenCV
-@@ -215,7 +271,11 @@
- 
-     // Update local information
-     // We assume new labels are simply appended
-+#if OPENCV_TEST_VERSION(3,0,0)
-     cv::Mat currentLabels = ptr()->get<cv::Mat>("labels");
-+#else
-+    cv::Mat currentLabels = ptr()->getLabels();
-+#endif
- 
-     for (int i = m_histogramMetadata.size() ; i < currentLabels.rows ; i++)
-     {
---- a/libkface/recognition-opencv-lbph/facerec_borrowed.cpp
-+++ b/libkface/recognition-opencv-lbph/facerec_borrowed.cpp
-@@ -531,15 +531,17 @@
-     return ptr;
- }
- 
--CV_INIT_ALGORITHM(LBPHFaceRecognizer, "FaceRecognizer.LBPH-KFaceIface",
--                  obj.info()->addParam(obj, "radius",     obj.m_radius);
--                  obj.info()->addParam(obj, "neighbors",  obj.m_neighbors);
--                  obj.info()->addParam(obj, "grid_x",     obj.m_grid_x);
--                  obj.info()->addParam(obj, "grid_y",     obj.m_grid_y);
--                  obj.info()->addParam(obj, "threshold",  obj.m_threshold);
--                  obj.info()->addParam(obj, "histograms", obj.m_histograms);  
       // modification: Make Read/Write
--                  obj.info()->addParam(obj, "labels",     obj.m_labels);      
       // modification: Make Read/Write
--                  obj.info()->addParam(obj, "statistic",  
obj.m_statisticsMode));    // modification: Add parameter
-+#if OPENCV_VERSION <= OPENCV_MAKE_VERSION(2,4,99)
-+    CV_INIT_ALGORITHM(LBPHFaceRecognizer, "FaceRecognizer.LBPH-KFaceIface",
-+                      obj.info()->addParam(obj, "radius",     obj.m_radius);
-+                      obj.info()->addParam(obj, "neighbors",  
obj.m_neighbors);
-+                      obj.info()->addParam(obj, "grid_x",     obj.m_grid_x);
-+                      obj.info()->addParam(obj, "grid_y",     obj.m_grid_y);
-+                      obj.info()->addParam(obj, "threshold",  
obj.m_threshold);
-+                      obj.info()->addParam(obj, "histograms", 
obj.m_histograms);         // modification: Make Read/Write
-+                      obj.info()->addParam(obj, "labels",     obj.m_labels);  
           // modification: Make Read/Write
-+                      obj.info()->addParam(obj, "statistic",  
obj.m_statisticsMode));    // modification: Add parameter
-+#endif
- 
- } // namespace KFaceIface
- 

diff --git a/kde-apps/libkface/files/libkface-15.08.3-opencv3.1.patch 
b/kde-apps/libkface/files/libkface-15.08.3-opencv3.1.patch
deleted file mode 100644
index bc242b5..00000000
--- a/kde-apps/libkface/files/libkface-15.08.3-opencv3.1.patch
+++ /dev/null
@@ -1,167 +0,0 @@
-diff --git a/libkface/recognition-opencv-lbph/facerec_borrowed.h 
b/libkface/recognition-opencv-lbph/facerec_borrowed.h
-index 27ad77a..f197d22 100644
---- a/libkface/recognition-opencv-lbph/facerec_borrowed.h
-+++ b/libkface/recognition-opencv-lbph/facerec_borrowed.h
-@@ -125,6 +125,8 @@ public:
-      */
-     void update(cv::InputArrayOfArrays src, cv::InputArray labels);
- 
-+
-+#if OPENCV_TEST_VERSION(3,1,0)
-     /**
-      * Predicts the label of a query image in src.
-      */
-@@ -134,6 +136,13 @@ public:
-      * Predicts the label and confidence for a given sample.
-      */
-     void predict(cv::InputArray _src, int &label, double &dist) const;
-+#else
-+    using cv::face::FaceRecognizer::predict;
-+    /*
-+     * Predict
-+     */
-+    void predict(cv::InputArray src, cv::Ptr<cv::face::PredictCollector> 
collector, const int state = 0) const override;
-+#endif
- 
-     /**
-      * See FaceRecognizer::load().
-diff --git a/libkface/recognition-opencv-lbph/facerec_borrowed.cpp 
b/libkface/recognition-opencv-lbph/facerec_borrowed.cpp
-index 748691e..3c37ce2 100644
---- a/libkface/recognition-opencv-lbph/facerec_borrowed.cpp
-+++ b/libkface/recognition-opencv-lbph/facerec_borrowed.cpp
-@@ -36,6 +36,8 @@
-  *
-  * ============================================================ */
- 
-+#define QT_NO_EMIT
-+
- #include "facerec_borrowed.h"
- 
- // C++ includes
-@@ -375,7 +377,11 @@ void LBPHFaceRecognizer::train(InputArrayOfArrays 
_in_src, InputArray _inm_label
-     }
- }
- 
-+#if OPENCV_TEST_VERSION(3,1,0)
- void LBPHFaceRecognizer::predict(InputArray _src, int &minClass, double 
&minDist) const
-+#else
-+void LBPHFaceRecognizer::predict(cv::InputArray _src, 
cv::Ptr<cv::face::PredictCollector> collector, const int state) const
-+#endif
- {
-     if(m_histograms.empty())
-     {
-@@ -394,8 +400,12 @@ void LBPHFaceRecognizer::predict(InputArray _src, int 
&minClass, double &minDist
-                                       m_grid_y,                               
                           /* grid size y                 */
-                                       true                                    
                           /* normed histograms           */
-                                      );
-+#if OPENCV_TEST_VERSION(3,1,0)
-     minDist      = DBL_MAX;
-     minClass     = -1;
-+#else
-+    collector->init((int)m_histograms.size(), state);
-+#endif
- 
-     // This is the standard method
- 
-@@ -406,11 +416,19 @@ void LBPHFaceRecognizer::predict(InputArray _src, int 
&minClass, double &minDist
-         {
-             double dist = compareHist(m_histograms[sampleIdx], query, 
CV_COMP_CHISQR);
- 
-+#if OPENCV_TEST_VERSION(3,1,0)
-             if((dist < minDist) && (dist < m_threshold))
-             {
-                 minDist  = dist;
-                 minClass = m_labels.at<int>((int) sampleIdx);
-             }
-+#else
-+            int label = m_labels.at<int>((int) sampleIdx);
-+            if (!collector->emit(label, dist, state))
-+            {
-+                return;
-+            }
-+#endif
-         }
-     }
- 
-@@ -422,7 +440,7 @@ void LBPHFaceRecognizer::predict(InputArray _src, int 
&minClass, double &minDist
-         // Create map "label -> vector of distances to all histograms for 
this label"
-         std::map<int, std::vector<int> > distancesMap;
- 
--        for(size_t sampleIdx = 0; sampleIdx < m_histograms.size(); 
sampleIdx++) 
-+        for(size_t sampleIdx = 0; sampleIdx < m_histograms.size(); 
sampleIdx++)
-         {
-             double dist                 = 
compareHist(m_histograms[sampleIdx], query, CV_COMP_CHISQR);
-             std::vector<int>& distances = distancesMap[m_labels.at<int>((int) 
sampleIdx)];
-@@ -445,11 +463,18 @@ void LBPHFaceRecognizer::predict(InputArray _src, int 
&minClass, double &minDist
-             double mean = sum / it->second.size();
-             s          += QString::fromLatin1("%1: %2 - 
").arg(it->first).arg(mean);
- 
-+#if OPENCV_TEST_VERSION(3,1,0)
-             if((mean < minDist) && (mean < m_threshold))
-             {
-                 minDist = mean;
-                 minClass = it->first;
-             }
-+#else
-+            if (!collector->emit(it->first, mean, state))
-+            {
-+                return;
-+            }
-+#endif
-         }
- 
-         qCDebug(LIBKFACE_LOG) << s;
-@@ -462,7 +487,7 @@ void LBPHFaceRecognizer::predict(InputArray _src, int 
&minClass, double &minDist
-         // map "label -> number of histograms"
-         std::map<int, int> countMap;
- 
--        for(size_t sampleIdx = 0; sampleIdx < m_histograms.size(); 
sampleIdx++) 
-+        for(size_t sampleIdx = 0; sampleIdx < m_histograms.size(); 
sampleIdx++)
-         {
-             int label   = m_labels.at<int>((int) sampleIdx);
-             double dist = compareHist(m_histograms[sampleIdx], query, 
CV_COMP_CHISQR);
-@@ -480,7 +505,9 @@ void LBPHFaceRecognizer::predict(InputArray _src, int 
&minClass, double &minDist
-             scoreMap[it->second]++;
-         }
- 
-+#if OPENCV_TEST_VERSION(3,1,0)
-         minDist = 0;
-+#endif
-         QString s("Nearest Neighbor score: ");
- 
-         for (std::map<int,int>::iterator it = scoreMap.begin(); it != 
scoreMap.end(); ++it)
-@@ -488,17 +515,26 @@ void LBPHFaceRecognizer::predict(InputArray _src, int 
&minClass, double &minDist
-             double score = double(it->second) / countMap.at(it->first);
-             s           += QString("%1/%2 %3  
").arg(it->second).arg(countMap.at(it->first)).arg(score);
- 
-+#if OPENCV_TEST_VERSION(3,1,0)
-             if (score > minDist)
-             {
-                 minDist  = score;
-                 minClass = it->first;
-             }
-+#else
-+            // large is better thus it is -score.
-+            if (!collector->emit(it->first, -score, state))
-+            {
-+                return;
-+            }
-+#endif
-         }
- 
-         kDebug() << s;
-     }
- }
- 
-+#if OPENCV_TEST_VERSION(3,1,0)
- int LBPHFaceRecognizer::predict(InputArray _src) const
- {
-     int    label;
-@@ -506,6 +542,7 @@ int LBPHFaceRecognizer::predict(InputArray _src) const
-     predict(_src, label, dummy);
-     return label;
- }
-+#endif
- 
- // Static method ----------------------------------------------------
- 

diff --git a/kde-apps/libkface/libkface-15.08.3.ebuild 
b/kde-apps/libkface/libkface-15.08.3.ebuild
deleted file mode 100644
index b959bee..00000000
--- a/kde-apps/libkface/libkface-15.08.3.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-
-inherit kde4-base
-
-DESCRIPTION="Qt/C++ wrapper around LibFace to perform face recognition and 
detection"
-HOMEPAGE="https://projects.kde.org/projects/kde/kdegraphics/libs/libkface";
-SRC_URI="mirror://kde/Attic/applications/${PV}/src/${P}.tar.xz"
-
-LICENSE="GPL-2"
-KEYWORDS=" ~amd64 ~x86"
-IUSE=""
-
-DEPEND="media-libs/opencv:=[contrib(+)]"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
-       "${FILESDIR}/${PN}-15.08.2-opencv3.patch"
-       "${FILESDIR}/${PN}-15.08.3-opencv3.1.patch"
-)
-
-src_configure() {
-       local mycmakeargs=(
-               -DENABLE_OPENCV3=$(has_version ">=media-libs/opencv-3" && echo 
yes || echo no)
-       )
-
-       kde4-base_src_configure
-}

diff --git a/kde-apps/libkface/libkface-4.12.0.ebuild 
b/kde-apps/libkface/libkface-4.12.0.ebuild
deleted file mode 100644
index 16219b3..00000000
--- a/kde-apps/libkface/libkface-4.12.0.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-MY_PV="${PV/_/-}"
-MY_P="digikam-${MY_PV}"
-KDE_LINGUAS=""
-inherit kde4-base
-
-DESCRIPTION="Qt/C++ wrapper around LibFace to perform face recognition and 
detection"
-HOMEPAGE="http://www.digikam.org/";
-SRC_URI="mirror://kde/stable/digikam/${MY_P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="4/3"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND=">=media-libs/opencv-2.4.9 <media-libs/opencv-3.0.0"
-RDEPEND="${DEPEND}"
-
-S=${WORKDIR}/${MY_P}/extra/${PN}

diff --git a/kde-apps/libkface/libkface-4.4.0.ebuild 
b/kde-apps/libkface/libkface-4.4.0.ebuild
deleted file mode 100644
index 6707b62..00000000
--- a/kde-apps/libkface/libkface-4.4.0.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-DIGIKAMPN=digikam
-
-KDE_LINGUAS=""
-KDE_MINIMAL="4.10"
-
-CMAKE_MIN_VERSION=2.8
-
-inherit kde4-base
-
-MY_PV=${PV/_/-}
-MY_P="digikam-${MY_PV}"
-SRC_URI="mirror://kde/stable/digikam/${MY_P}.tar.bz2"
-
-DESCRIPTION="Qt/C++ wrapper around LibFace to perform face recognition and 
detection"
-HOMEPAGE="http://www.digikam.org/";
-
-LICENSE="GPL-2"
-KEYWORDS="amd64 x86"
-IUSE=""
-SLOT=4
-
-DEPEND=">=media-libs/opencv-2.4.9"
-RDEPEND=${DEPEND}
-
-S=${WORKDIR}/${MY_P}/extra/${PN}
-
-src_configure() {
-       mycmakeargs=(
-               -DFORCED_UNBUNDLE=ON
-       )
-       kde4-base_src_configure
-}

Reply via email to