Updating link to change in openSUSE:Factory/digikam revision 150.0

OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/digikam?expand=0&rev=4e26d727c8db9eb9c5af783513dfe754
This commit is contained in:
OBS User buildservice-autocommit 2016-09-30 13:22:10 +00:00 committed by Git OBS Bridge
parent f20242bf98
commit a83eadc474
11 changed files with 242 additions and 1032 deletions

View File

@ -1,17 +0,0 @@
diff -burNE digikam-4.14.0/core/libs/dimg/filters/lens/lensfuniface.h digikam-4.14.0_work/core/libs/dimg/filters/lens/lensfuniface.h
--- digikam-4.14.0/core/libs/dimg/filters/lens/lensfuniface.h 2015-10-13 23:58:21.000000000 +0200
+++ digikam-4.14.0_work/core/libs/dimg/filters/lens/lensfuniface.h 2016-05-12 10:35:13.461127704 +0200
@@ -24,10 +24,10 @@
// Lib LensFun includes
-extern "C"
-{
+// extern "C"
+// {
#include <lensfun.h>
-}
+// }
// local includes

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9d7bcb689d8c29be2e81976f0a043220f442a24f2071284044e7f1a799a7fdad
size 59805228

View File

@ -1,50 +0,0 @@
Index: digikam-4.5.0/core/CMakeLists.txt
===================================================================
--- digikam-4.5.0.orig/core/CMakeLists.txt
+++ digikam-4.5.0/core/CMakeLists.txt
@@ -125,20 +125,6 @@ DETECT_OPENCV(${OPENCV_MIN_VERSION} cor
set(KDCRAW_MIN_VERSION "2.2.0")
-if(KDCRAW_VERSION)
-
- message(STATUS "libkdcraw: Found version ${KDCRAW_VERSION} (required: ${KDCRAW_MIN_VERSION})")
- if(${KDCRAW_VERSION} VERSION_LESS ${KDCRAW_MIN_VERSION})
- set(KDCRAW_FOUND FALSE)
- endif()
-
-else()
-
- message(WARNING "libkdcraw: Version information not found, your version is probably too old.")
- set(KDCRAW_FOUND FALSE)
-
-endif()
-
# -- check the libkgeomap version -----------------------------------------------------------------
set(KGEOMAP_MIN_VERSION "3.0.0")
Index: digikam-4.5.0/extra/kipi-plugins/CMakeLists.txt
===================================================================
--- digikam-4.5.0.orig/extra/kipi-plugins/CMakeLists.txt
+++ digikam-4.5.0/extra/kipi-plugins/CMakeLists.txt
@@ -75,20 +75,6 @@ if(KIPI_FOUND)
set(KDCRAW_MIN_VERSION "2.2.0")
- if(KDCRAW_VERSION)
-
- message(STATUS "libkdcraw: Found version ${KDCRAW_VERSION} (required: ${KDCRAW_MIN_VERSION})")
- if (${KDCRAW_VERSION} VERSION_LESS ${KDCRAW_MIN_VERSION})
- set(KDCRAW_FOUND FALSE)
- endif()
-
- else()
-
- message(WARNING "libkdcraw: Version information not found, your version is probably too old.")
- set(KDCRAW_FOUND FALSE)
-
- endif()
-
# -- Optional dependencies detection required by some plugins -------------------------------------
MACRO_OPTIONAL_FIND_PACKAGE(EXPAT) # For DNGConverter: XMP SDK need Expat library to compile.

3
digikam-5.2.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cf243fc1518b5bb6e289573c76d89b5fdcc50be89f6312b276af3320763c9260
size 143583460

View File

@ -1,25 +0,0 @@
Index: core/libs/3rdparty/cimg/CImg.h
===================================================================
--- core/libs/3rdparty/cimg/CImg.h.orig
+++ core/libs/3rdparty/cimg/CImg.h
@@ -5673,7 +5673,7 @@ namespace cimg_library {
if (usage) {
cimg_std::fprintf(cimg_stdout,"\n %s%s%s",cimg::t_red,cimg::basename(argv[0]),cimg::t_normal);
cimg_std::fprintf(cimg_stdout," : %s",usage);
- cimg_std::fprintf(cimg_stdout," (%s, %s)\n\n",__DATE__,__TIME__);
+ cimg_std::fprintf(cimg_stdout,"\n\n");
}
if (defaut) cimg_std::fprintf(cimg_stdout,"%s\n",defaut);
}
@@ -5759,9 +5759,9 @@ namespace cimg_library {
**/
inline void info() {
char tmp[1024] = { 0 };
- cimg_std::fprintf(cimg_stdout,"\n %sCImg Library %u.%u.%u%s, compiled %s ( %s ) with the following flags :\n\n",
+ cimg_std::fprintf(cimg_stdout,"\n %sCImg Library %u.%u.%u%s, compiled with the following flags :\n\n",
cimg::t_red,cimg_version/100,(cimg_version/10)%10,cimg_version%10,
- cimg::t_normal,__DATE__,__TIME__);
+ cimg::t_normal);
cimg_std::fprintf(cimg_stdout," > Operating System : %s%-13s%s %s('cimg_OS'=%d)%s\n",
cimg::t_bold,

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:876cf37cdb6856f66d0cd1d0b857a2a02609a12220d4e203c887d371fcb8aeb9
size 9651384

View File

@ -1,3 +1,82 @@
-------------------------------------------------------------------
Thu Sep 29 22:19:22 UTC 2016 - lbeltrame@kde.org
- Workaround kde#369517 by removing libvkontakte translations
(not built but installed anyway)
-------------------------------------------------------------------
Tue Sep 27 11:42:16 UTC 2016 - lbeltrame@kde.org
- Ensure akonadi-contact-devel is not pulled in for ppc64, as
QWebEngine is not available for that platform
-------------------------------------------------------------------
Sun Sep 25 12:08:37 UTC 2016 - wbauer@tmo.at
- Don't disable building the documentation any more, kde#365135 is
fixed in 5.2.0
-------------------------------------------------------------------
Sat Sep 24 10:09:11 UTC 2016 - fabian@ritter-vogt.de
- Update to Digikam v5.2.0: https://www.digikam.org/node/758
* many bugfixes
* updated documentation
- Remove build-32bits.patch again, fixed upstream
- Add threadweaver and gphoto buildrequires
- Enable appstyles to not force fusion style
- Fix miscellaneous rpmlint warnings
-------------------------------------------------------------------
Wed Aug 10 14:39:26 UTC 2016 - wbauer@tmo.at
- Add find_libastro-qt5.patch to fix build of geolocation support
in Leap 42.1
-------------------------------------------------------------------
Wed Aug 10 08:56:28 UTC 2016 - fabian@ritter-vogt.de
- Update to Digikam v5.1.0: https://www.digikam.org/node/756
* many bugfixes
* supports new RAW cameras
- Add build-32bits.patch to fix build on 32-bit x86
-------------------------------------------------------------------
Fri Jul 15 15:39:44 UTC 2016 - wbauer@tmo.at
- Enable mediaplayer (Qt5Multimedia support)
-------------------------------------------------------------------
Wed Jul 13 09:30:19 UTC 2016 - tittiatcoke@gmail.com
- Drop unused build dependency on sqlite2
- Obsolete the kipi-plugins5 package
-------------------------------------------------------------------
Sun Jul 10 21:34:47 UTC 2016 - nico.kruber@gmail.com
- raise dependency on libkipi version
-------------------------------------------------------------------
Fri Jul 8 09:47:19 UTC 2016 - tittiatcoke@gmail.com
- Update to Digikam v5.0
* Now Qt5/KF5 based
- Drop patches no longer required:
- fix_opencv3.patch
- digikam-4.14.0-lensfun-0.3.2.patch
- digikam-4.4.0.no-kdcraw.version-check.patch
- remove-gplv2-only.patch
- digikam-buildtime.patch
- Drop library tarball, as we now depend on the external libraries
- digikam-libs.tar.bz2
- Disable documentation for now based on bko#365135
-------------------------------------------------------------------
Thu Jun 2 05:59:05 UTC 2016 - mlin@suse.com

View File

@ -17,109 +17,94 @@
Name: digikam
Version: 4.14.0
Version: 5.2.0
Release: 0
%define rversion 4.14.0
%define libversion 15.12.0
Summary: A KDE Photo Manager
License: GPL-2.0+
Group: Productivity/Graphics/Viewers
Url: http://www.digikam.org/
Source0: http://download.kde.org/stable/%{name}/%{name}-%{rversion}.tar.bz2
Source1: digikam-libs.tar.bz2
# PATCH-FIX-OPENSUSE digikam-buildtime.patch -- Remove build time references so build-compare can do its work
Patch0: digikam-buildtime.patch
# PATCH-FIX-OPENSUSE remove-gplv2-only.patch idoenmez@suse.de bnc#711963 -- Remove GPLv2 only files from the build system
Patch3: remove-gplv2-only.patch
# PATCH-FIX-UPSTREAM digikam-4.4.0.no-kdcraw.version-check.patch -- version check for libkdcraw currently broken
Patch6: digikam-4.4.0.no-kdcraw.version-check.patch
# PATCH-FIX-OPENSUSE fix_opencv3.patch -- Fix the internal libkface to work with openCV version 3.0. This is based on upstream changes
Patch100: fix_opencv3.patch
# PATCH: Building with lensfun 0.3.2
Patch999: digikam-4.14.0-lensfun-0.3.2.patch
BuildRequires: ImageMagick-devel
Source0: http://download.kde.org/stable/%{name}/%{name}-%{version}.tar.xz
# PATCH-FIX-OPENSUSE find_libastro-qt5.patch -- fix build of geolocation support in Leap 42.1
Patch2: find_libastro-qt5.patch
#This pulls in QWebEngine, which is not available on ppc64
%ifarch %ix86 x86_64 %arm aarch64 mips mips64
BuildRequires: akonadi-contact-devel
%endif
BuildRequires: baloo5-devel
BuildRequires: bison
BuildRequires: boost-devel
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gdk-pixbuf-devel
%if 0%{?suse_version} <= 1310 || 0%{?suse_version} == 1320
BuildRequires: libkdcraw-devel
BuildRequires: libkexiv2-devel
BuildRequires: libkface-devel
BuildRequires: libkgeomap-devel
BuildRequires: libksane-devel
BuildRequires: libmediawiki-devel
BuildRequires: pkgconfig(libkipi) >= 2.0.0
# libkgeomap package provides older lib with same so name.
Requires: libkgeomap2
%else
BuildRequires: libexiv2-devel
BuildRequires: libmarblewidget-devel
BuildRequires: libraw-devel
BuildRequires: sane-backends-devel
%endif
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
%if 0%{?suse_version} > 1310
BuildRequires: baloo-devel
%endif
%if 0%{?suse_version} > 1310
BuildRequires: gstreamer-plugins-qt-devel
%else
BuildRequires: gstreamer-0_10-plugins-qt-devel
%endif
BuildRequires: graphviz-devel
BuildRequires: gtk2-devel
BuildRequires: kfilemetadata5-devel
BuildRequires: khtml-devel
BuildRequires: ki18n-devel
BuildRequires: kitemmodels-devel
BuildRequires: knotifyconfig-devel
BuildRequires: lensfun
BuildRequires: lensfun-devel
%if 0%{?suse_version} > 1230
BuildRequires: libeigen3-devel
%endif
BuildRequires: libexiv2-devel
BuildRequires: libexpat-devel
BuildRequires: libgphoto2-devel
BuildRequires: libgcrypt-devel
BuildRequires: libgphoto2-devel >= 2.4.0
# It invokes "gphoto2" for determining the API version
BuildRequires: gphoto
BuildRequires: libgpod-devel
BuildRequires: libjasper-devel
BuildRequires: libkde4-devel
%if 0%{?suse_version} < 1320
BuildRequires: libkdepimlibs4-devel
%endif
%if 0%{?suse_version} > 1230
BuildRequires: libkqoauth-devel
%endif
BuildRequires: libMagick++-devel
BuildRequires: libkvkontakte-devel
%if 0%{?suse_version} < 1320 && !0%{?is_opensuse}
# from 13.2 upwards, and also Leap 42.1 (1315 && is_opensuse) we prefer lcms2
BuildRequires: liblcms-devel
%else
BuildRequires: libkdcraw-devel >= 15.12.0
BuildRequires: libkexiv2-devel >= 15.12.0
BuildRequires: libkface-devel >= 15.12.0
BuildRequires: libkgeomap-devel > 15.12.0
BuildRequires: libkipi-devel >= 16.04.0
BuildRequires: libksane-devel >= 15.12.0
BuildRequires: liblcms2-devel
%endif
BuildRequires: liblqr-devel
BuildRequires: libmysqlclient-devel
BuildRequires: libmysqld-devel
BuildRequires: libpgf-devel
BuildRequires: libqca2-devel
BuildRequires: libqjson-devel
BuildRequires: libusb-1_0-devel
BuildRequires: libusb-compat-devel
%if 0%{?suse_version} <= 1320 && !0%{?is_opensuse}
BuildRequires: libqca-qt5-devel
BuildRequires: libtiff-devel
BuildRequires: libusb-devel
BuildRequires: marble-devel
%endif
BuildRequires: opencv-devel >= 2.4.5
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(glu)
%if 0%{?suse_version}
BuildRequires: mysql
BuildRequires: opencv-qt5-devel
BuildRequires: phonon4qt5-devel
BuildRequires: soprano-backend-redland
BuildRequires: threadweaver-devel >= 5.1.0
BuildRequires: update-desktop-files
%endif
BuildRequires: xorg-x11-devel
BuildRequires: cmake(KF5CalendarCore)
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5Multimedia)
BuildRequires: pkgconfig(Qt5OpenGL)
BuildRequires: pkgconfig(Qt5Sql)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(Qt5WebKitWidgets)
BuildRequires: pkgconfig(Qt5X11Extras)
BuildRequires: pkgconfig(Qt5XmlPatterns)
Requires: kipi-plugins >= %{version}
Requires: libqt4-sql-mysql
Requires: libqt4-sql-sqlite
Recommends: %{name}-doc
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%requires_ge libkipi8
%kde4_runtime_requires
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315
Requires: digikam-libs
%endif
Requires: exiv2 >= 0.25
Recommends: showfoto
# Got merged into libimageeditor in 5.2.0
Provides: %{name}-plugin-color = %{version}
Obsoletes: %{name}-plugin-color < %{version}
Provides: %{name}-plugin-decorate = %{version}
Obsoletes: %{name}-plugin-decorate < %{version}
Provides: %{name}-plugin-enhance = %{version}
Obsoletes: %{name}-plugin-enhance < %{version}
Provides: %{name}-plugin-fxfilters = %{version}
Obsoletes: %{name}-plugin-fxfilters < %{version}
Provides: %{name}-plugin-transform = %{version}
Obsoletes: %{name}-plugin-transform < %{version}
Obsoletes: digikam-libs < %{version}
%description
digiKam is a simple digital photo management application for KDE, which
@ -138,82 +123,6 @@ BuildArch: noarch
%description doc
This package contains the documentation for digikam
# split out Image modification plugins. Upstream ships them with a
# .metainfo.xml file, which is meant to list them as extensions in a
# Software center. The ones we want installed by default we tag as Supplements(%{name}.
%package plugin-color
Summary: DigiKam: ImagePlugin-Color
License: GPL-2.0+
Group: Productivity/Graphics/Viewers
Supplements: %{name}
%description plugin-color
A tool to correct colors of image
%package plugin-decorate
Summary: DigiKam: ImagePlugin-Decorate
License: GPL-2.0+
Group: Productivity/Graphics/Viewers
Supplements: %{name}
%description plugin-decorate
A tool to decorate an image
%package plugin-enhance
Summary: DigiKam: ImagePlugin-Enhance
License: GPL-2.0+
Group: Productivity/Graphics/Viewers
Supplements: %{name}
%description plugin-enhance
digiKam plugin to enhance photographs
%package plugin-fxfilters
Summary: DigiKam: ImagePlugin-FxFilters
License: GPL-2.0+
Group: Productivity/Graphics/Viewers
Supplements: %{name}
%description plugin-fxfilters
Special effect filters plugin for digiKam
%package plugin-transform
Summary: DigiKam: ImagePlugin-Color
License: GPL-2.0+
Group: Productivity/Graphics/Viewers
Supplements: %{name}
%description plugin-transform
A tool to transform image geometry
# split out acquireimage plugin in order to allow the main
# kipi-plugins package to be included on livecd (acquireimage
# requires sane-backends, which is blocked for livecd)
%package -n kipi-plugins-acquireimage
Summary: KDE Plug-Ins for Image Manipulation - Acquireimage plugin
License: GPL-2.0+
Group: Productivity/Graphics/Other
Requires: kipi-plugins = %{version}
Supplements: packageand(kipi-plugins:sane-backends)
%kde4_runtime_requires
%description -n kipi-plugins-acquireimage
This is the Acquireimage plugin from the kipi plugins package.
# split out geolocation plugin in order to allow the main
# kipi-plugins package to be included on livecd (geolocation
# requires marble, which is blocked for livecd)
%package -n kipi-plugins-geolocation
Summary: KDE Plug-Ins for Image Manipulation - Geolocation plugin
License: GPL-2.0+
Group: Productivity/Graphics/Other
Requires: kipi-plugins = %{version}
Supplements: packageand(kipi-plugins:marble)
%kde4_runtime_requires
%description -n kipi-plugins-geolocation
This is the Geolocation plugin from the kipi plugins package.
%package -n kipi-plugins
Summary: KDE Plug-Ins for Image Manipulation
License: GPL-2.0+
@ -223,66 +132,56 @@ Recommends: enblend-enfuse
Recommends: hugin
Recommends: kipi-plugins-lang = %{version}
Supplements: packageand(kipi-plugins:marble)
%kde4_runtime_requires
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315
Requires: digikam-libs
Requires: kipi-plugin-icons
%endif
Obsoletes: kipi-plugins-acquireimage < %{version}
Obsoletes: kipi-plugins-geolocation < %{version}
Obsoletes: kipi-plugins5 < %{version}
Provides: kipi-plugins5 = %{version}
Obsoletes: kipi-plugin-icons < %{version}
Provides: kipi-plugin-icons = %{version}
%description -n kipi-plugins
A set of plug-ins for the KDE KIPI interface, used by some KDE imaging
applications.
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315
%package libs
Summary: Libraries required to run digikam
%package -n showfoto
Summary: DigiKam: Showfoto
License: GPL-2.0+
Group: Productivity/Graphics/Viewers
#Require the lib for the shared icons
Requires: libKF5Kipi31_0_0
Recommends: marble-data
Obsoletes: libkdcraw23 < %{libversion}
Provides: libkdcraw23 = %{libversion}
Obsoletes: libkexiv2-11 < %{libversion}
Provides: libkexiv2-11 = %{libversion}
Obsoletes: libkface3 < %{libversion}
Provides: libkface3 = %{libversion}
Obsoletes: libkgeomap2 < %{libversion}
Provides: libkgeomap2 = %{libversion}
Obsoletes: libkipi11 < %{libversion}
Provides: libkipi11 = %{libversion}
Obsoletes: libksane0 < %{libversion}
Provides: libksane0 = %{libversion}
Obsoletes: libmediawiki1 < %{libversion}
Provides: libmediawiki1 = %{libversion}
Supplements: %{name}
%description libs
These are the libraries libkipi, libkdcraw, libkgeomap, libkexiv2, libksane and libkface which are
required for digikam to run. Upstream these libraries have moved to KF5, but digikam is still KDE4 based
%endif
%description -n showfoto
Additional program to browse and view photos
%package -n libdigikamcore5
Summary: The main digikam libraries
License: GPL-2.0+
Group: Development/Libraries/KDE
%description -n libdigikamcore5
The main digikam libraries that are being shared between showfoto and digikam
%lang_package
%lang_package -n kipi-plugins
%prep
%setup -q -n %{name}-%{rversion} -a 1
%patch0
%patch3
%patch6 -p1
%patch100 -p1
%patch999 -p1
%setup -q -n %{name}-%{version}
%if 0%{?is_opensuse} && 0%{?sle_version} == 120100
# we renamed libastro to libastro-qt5 in Leap 42.1, make FindMARBLE.cmake find it
%patch2 -p1
%endif
# Remove build time references so build-compare can do its work
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" core/app/utils/version.h.cmake.in
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M')
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" core/app/utils/digikam_version.h.cmake.in
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/g" extra/kipi-plugins/common/libkipiplugins/tools/kpversion.h.cmake.in
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/g" core/libs/dimg/filters/greycstoration/cimg/CImg.h
sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/g" core/libs/dimg/filters/greycstoration/cimg/CImg.h
pushd extra/kipi-plugins
# Remove GPL-v2 only files
rm gpssync/borrowed/modeltest.cpp
rm gpssync/borrowed/modeltest.h
popd
# Workaround for kde#369517 - vkontakte installs translations even if not built
rm -f po/*/kipiplugin_vkontakte.po
rm -f po/*/libkvkontakte.po
%build
%if 0%{?suse_version} < 1320 && !0%{?is_opensuse}
@ -290,77 +189,42 @@ EXTRA_FLAGS="-DENABLE_LCMS2=OFF"
%else
EXTRA_FLAGS="-DENABLE_LCMS2=ON"
%endif
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315
EXTRA_FLAGS+=" -DDIGIKAMSC_COMPILE_LIBKIPI=ON -DDIGIKAMSC_COMPILE_LIBKEXIV2=ON -DDIGIKAMSC_COMPILE_LIBKDCRAW=ON"
EXTRA_FLAGS+=" -DDIGIKAMSC_COMPILE_LIBKSANE=ON -DDIGIKAMSC_COMPILE_LIBKFACE=ON"
EXTRA_FLAGS+=" -DDIGIKAMSC_COMPILE_LIBKGEOMAP=ON -DDIGIKAMSC_COMPILE_LIBMEDIAWIKI=ON"
%endif
%cmake_kde4 -d build -- -DENABLE_OPENCV3=ON -DENABLE_MYSQLSUPPORT=TRUE -DENABLE_INTERNALMYSQL=FALSE -DENABLE_KDEPIMLIBSSUPPORT=TRUE $EXTRA_FLAGS
# there are files in there that are so heavy to the compiler, that one is enough
%cmake_kf5 -d build -- -DKFACE_EXTERNAL_FINDOPENCV:BOOL=TRUE -DENABLE_APPSTYLES=ON -DENABLE_MYSQLSUPPORT=on -DENABLE_KINOTIFY=ON -DENABLE_OPENCV3=ON -DENABLE_MEDIAPLAYER=ON
%make_jobs VERBOSE=1
%install
%kde4_makeinstall -C build
%kf5_makeinstall -C build
# Not needed, the package doesn't actually provide any shared libraries
rm -f %{buildroot}%{_kde4_libdir}/libdigikamcore.so
rm -f %{buildroot}%{_kde4_libdir}/libdigikamdatabase.so
rm -f %{buildroot}%{_kde4_libdir}/libkipiplugins.so
rm -f %{buildroot}%{_kf5_libdir}/libdigikamcore.so
rm -f %{buildroot}%{_kf5_libdir}/libdigikamdatabase.so
rm -f %{buildroot}%{_kf5_libdir}/libdigikamgui.so
rm -f %{buildroot}%{_kf5_libdir}/libKF5kipiplugins.so
# Not needed
rm -fv %{buildroot}%{_kde4_libdir}/*.a
rm -fv %{buildroot}%{_kf5_libdir}/*.a
rm -rf $RPM_BUILD_ROOT/usr/share/locale/x-test
%if 0%{?suse_version}
%suse_update_desktop_file -r %{name} Qt KDE Graphics Photography
%suse_update_desktop_file -r showfoto Qt KDE Graphics Photography
%suse_update_desktop_file -r dngconverter Qt KDE Graphics Photography
%suse_update_desktop_file -r expoblending Qt KDE Graphics Photography
%suse_update_desktop_file -r panoramagui Qt KDE Graphics Photography
%suse_update_desktop_file -r scangui Qt KDE Graphics Scanning
%suse_update_desktop_file -r org.kde.digikam Qt KDE Graphics Photography
%suse_update_desktop_file -r org.kde.showfoto Qt KDE Graphics Photography
%endif
%find_lang %{name}
%if 0%{?kde_updatedapps}
%find_lang libkipi libkipi.lang
%else
rm -f %{buildroot}/usr/share/locale/*/LC_MESSAGES/libkipi.mo
%endif
%find_lang kipiplugins kipiplugin.lang
for l in acquireimages advancedslideshow batchprocessimages calendar debianscreenshots dlnaexport dngconverter dropbox expoblending facebook flashexport flickrexport galleryexport googledrive gpssync htmlexport imageshackexport imageviewer imgurexport ipodexport jalbumexport jpeglossless kioexportimport kmlexport kopete metadataedit panorama photolayouteditor piwigoexport printimages rajceexport rawconverter removeredeyes sendimages shwup smug timeadjust videoslideshow vkontakte wikimedia yandexfotki;
for i in dropbox googleservices sendimages facebook flashexport flickr imageshack imgur kmlexport piwigo printimages rajce remotestorage sendimages smug yandexfotki
do
%find_lang kipiplugin_$l kipiplugin.lang
%find_lang kipiplugin_$i kipiplugin.lang
done
# this allows the icon to be used as an application icon safely
for res in 16x16 22x22 32x32 48x48 64x64 128x128
do
pushd %{buildroot}%{_kde4_iconsdir}/hicolor/$res/apps/
ln -s %{_kde4_iconsdir}/oxygen/$res/apps/rawconverter.png
popd
done
pushd %{buildroot}%{_kde4_iconsdir}/hicolor/scalable/apps/
ln -s %{_kde4_iconsdir}/oxygen/scalable/apps/rawconverter.svgz
popd
# symlink solid actions into place known to Plasma 5, remove once digikam is KF5-based
mkdir -p %{buildroot}%{_datadir}/solid/actions
pushd %{buildroot}%{_kde4_appsdir}/solid/actions/
for i in *.desktop; do
ln -s %{_kde4_appsdir}/solid/actions/$i %{buildroot}%{_datadir}/solid/actions/
done
popd
%fdupes -s %{buildroot}
%kde_post_install
%post -n libdigikamcore5 -p /sbin/ldconfig
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%postun -n libdigikamcore5 -p /sbin/ldconfig
%post -n kipi-plugins -p /sbin/ldconfig
@ -369,158 +233,61 @@ popd
%files
%defattr(-,root,root,-)
%doc core/{AUTHORS,COPYING,COPYING-CMAKE-SCRIPTS,COPYING.LIB,ChangeLog,NEWS,README}
%{_kde4_applicationsdir}/digikam.desktop
%{_kde4_applicationsdir}/showfoto.desktop
%{_kde4_appsdir}/digikam/
%{_kde4_appsdir}/kconf_update/adjustlevelstool.upd
%{_kde4_appsdir}/showfoto/
%{_kde4_appsdir}/solid
%dir %{_datadir}/solid
%dir %{_datadir}/solid/actions
%{_datadir}/solid/actions/*.desktop
%{_kde4_bindir}/cleanup_digikamdb
%{_kde4_bindir}/digikam
%{_kde4_bindir}/digitaglinktree
%{_kde4_bindir}/showfoto
%dir %{_kde4_iconsdir}/hicolor/*
%dir %{_kde4_iconsdir}/hicolor/*/apps
%{_kde4_iconsdir}/hicolor/*/apps/digikam.*
%{_kde4_iconsdir}/hicolor/*/apps/showfoto.*
%{_kde4_libdir}/libdigikamcore.so.*
%{_kde4_libdir}/libdigikamdatabase.so.*
%{_kde4_modulesdir}/kio_digikamalbums.so
%{_kde4_modulesdir}/kio_digikamdates.so
%{_kde4_modulesdir}/kio_digikammapimages.so
%{_kde4_modulesdir}/kio_digikamsearch.so
%{_kde4_modulesdir}/kio_digikamtags.so
%{_kde4_servicesdir}/digikam*
%{_kde4_servicetypesdir}/digikamimageplugin.desktop
%dir %{_kde4_datadir}/appdata
%{_kde4_datadir}/appdata/digikam.appdata.xml
%{_kde4_datadir}/appdata/showfoto.appdata.xml
%{_bindir}/digikam
%{_bindir}/digitaglinktree
%{_bindir}/cleanup_digikamdb
%{_kf5_applicationsdir}/org.kde.digikam.desktop
%_kf5_iconsdir/hicolor/*/apps/digikam.*
%_kf5_iconsdir/hicolor/*/apps/expoblending.*
%_kf5_iconsdir/hicolor/*/actions/
%_datadir/digikam/
%dir %_datadir/solid
%dir %_datadir/solid/actions
%_datadir/solid/actions/digikam-opencamera.desktop
%_datadir/kxmlgui5/digikam/
%_datadir/knotifications5/digikam.notifyrc
# For Leap 42.1
%dir %{_kf5_appstreamdir}
%{_kf5_appstreamdir}/org.kde.digikam.appdata.xml
%_kf5_iconsdir/hicolor/*/apps/panorama.*
%files plugin-color
%files -n showfoto
%defattr(-,root,root)
%{_kde4_modulesdir}/digikamimageplugin_color.so
%{_kde4_datadir}/appdata/digiKam-ImagePlugin_Color.metainfo.xml
%{_bindir}/showfoto
%{_kf5_applicationsdir}/org.kde.showfoto.desktop
%_kf5_iconsdir/hicolor/*/apps/showfoto.*
%_datadir/showfoto/
%_datadir/kxmlgui5/showfoto/
# For Leap 42.1
%dir %{_kf5_appstreamdir}
%{_kf5_appstreamdir}/org.kde.showfoto.appdata.xml
%files plugin-decorate
%files -n libdigikamcore5
%defattr(-,root,root)
%{_kde4_modulesdir}/digikamimageplugin_decorate.so
%{_kde4_datadir}/appdata/digiKam-ImagePlugin_Decorate.metainfo.xml
%files plugin-enhance
%defattr(-,root,root)
%{_kde4_modulesdir}/digikamimageplugin_enhance.so
%{_kde4_datadir}/appdata/digiKam-ImagePlugin_Enhance.metainfo.xml
%files plugin-fxfilters
%defattr(-,root,root)
%{_kde4_modulesdir}/digikamimageplugin_fxfilters.so
%{_kde4_datadir}/appdata/digiKam-ImagePlugin_FxFilters.metainfo.xml
%files plugin-transform
%defattr(-,root,root)
%{_kde4_modulesdir}/digikamimageplugin_transform.so
%{_kde4_datadir}/appdata/digiKam-ImagePlugin_Transform.metainfo.xml
%{_libdir}/libdigikam*.so*
%files doc
%defattr(-,root,root,-)
%doc COPYING.DOC
%doc %{_kde4_htmldir}/*/
%doc doc/COPYING.DOC
%doc %{_mandir}/man1/cleanup_digikamdb.1%{ext_man}
%doc %{_mandir}/man1/digitaglinktree.1%{ext_man}
%doc %{_kf5_htmldir}/*/
%files lang -f %{name}.lang
%defattr(-,root,root,-)
%exclude %{_kde4_htmldir}/
%files -n kipi-plugins
%defattr(-,root,root,-)
%doc extra/kipi-plugins/{AUTHORS,COPYING,COPYING-ADOBE,COPYING-CMAKE-SCRIPTS,ChangeLog,NEWS,README,TODO}
%{_kde4_applicationsdir}/*.desktop
%exclude %{_kde4_applicationsdir}/digikam.desktop
%exclude %{_kde4_applicationsdir}/showfoto.desktop
%exclude %{_kde4_applicationsdir}/scangui.desktop
%{_kde4_appsdir}/kipiplugin_*
%{_kde4_appsdir}/photolayoutseditor
%{_kde4_appsdir}/kipi/tips
%{_kde4_appsdir}/kipi/*ui.rc
%{_kde4_bindir}/dngconverter
%{_kde4_bindir}/expoblending
%{_kde4_bindir}/panoramagui
%{_kde4_bindir}/photolayoutseditor
%{_kde4_configkcfgdir}/photolayoutseditor.kcfg
%dir %{_kde4_iconsdir}/hicolor/24x24/apps
%{_kde4_iconsdir}/hicolor/*/actions/*.*
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315
%exclude %{_kde4_iconsdir}/hicolor/*/apps/kipi-*.*
%else
%{_kde4_iconsdir}/hicolor/*/apps/kipi-*.*
%endif
%exclude %{_kde4_iconsdir}/hicolor/*/apps/kipi-gpsimagetag.png
%{_kde4_iconsdir}/hicolor/*/apps/photolayoutseditor.*
%{_kde4_iconsdir}/hicolor/*/apps/rawconverter.*
%{_kde4_iconsdir}/oxygen/*/apps/rawconverter.*
%{_kde4_libdir}/libkipiplugins.so.*
%{_kde4_modulesdir}/kipiplugin_*.so
%exclude %{_kde4_modulesdir}/kipiplugin_acquireimages.so
%exclude %{_kde4_modulesdir}/kipiplugin_gpssync.so
%{_kde4_servicesdir}/kipiplugin_*.desktop
%exclude %{_kde4_servicesdir}/kipiplugin_acquireimages.desktop
%exclude %{_kde4_servicesdir}/kipiplugin_gpssync.desktop
%{_kde4_servicetypesdir}/photolayoutseditorborderplugin.desktop
%{_kde4_servicetypesdir}/photolayoutseditoreffectplugin.desktop
%dir %{_kde4_sharedir}/templates
%{_kde4_sharedir}/templates/kipiplugins_photolayoutseditor/
%doc extra/kipi-plugins/{AUTHORS,COPYING,COPYING-CMAKE-SCRIPTS,ChangeLog,NEWS,README,TODO}
%_libdir/libKF5kipiplugins.so*
%{_kf5_plugindir}/kipiplugin_*.so
%{_kf5_applicationsdir}/kipiplugins.desktop
%{_kf5_iconsdir}/hicolor/*/apps/kipi-*.*
%{_datadir}/kipiplugin_*/
%{_kf5_servicesdir}/kipiplugin_*.desktop
%{_kf5_kxmlguidir}/kipi/
%files -n kipi-plugins-lang -f kipiplugin.lang
%defattr(-,root,root,-)
%exclude %{_kde4_htmldir}/en/kipi-plugins
%files -n kipi-plugins-acquireimage
%defattr(-,root,root,-)
%{_kde4_applicationsdir}/scangui.desktop
%{_kde4_bindir}/scangui
%{_kde4_modulesdir}/kipiplugin_acquireimages.so
%{_kde4_servicesdir}/kipiplugin_acquireimages.desktop
%files -n kipi-plugins-geolocation
%defattr(-,root,root)
%{_kde4_appsdir}/gpssync
%{_kde4_iconsdir}/hicolor/*/apps/kipi-gpsimagetag.png
%{_kde4_modulesdir}/kipiplugin_gpssync.so
%{_kde4_servicesdir}/kipiplugin_gpssync.desktop
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%files libs
%defattr(-,root,root)
%_libdir/cmake/Kface-3.5.0/
%_libdir/cmake/libkexiv2-2.4.0/
%_libdir/libkdcraw.so*
%_libdir/libkexiv2.so*
%_libdir/libkface.so*
%_libdir/libkgeomap.so*
%_libdir/libkipi.so*
%_libdir/libksane.so*
%_libdir/libmediawiki.so*
%_kde4_iconsdir/hicolor/*/apps/kdcraw.png
# maybe not the best way to do this, but it works and is easier to remove later
%exclude %_kde4_iconsdir/hicolor/*/apps/kipi.png
%_kde4_appsdir/kipi/
%_kde4_appsdir/libkdcraw/
%_kde4_appsdir/libkexiv2/
%_kde4_appsdir/libkface/
%_kde4_appsdir/libkgeomap/
%_kde4_servicetypesdir/kipiplugin.desktop
%exclude %_kde4_appsdir/kipi/kipiplugin_*
%exclude %_kde4_appsdir/kipi/tips
%endif
%changelog

12
find_libastro-qt5.patch Normal file
View File

@ -0,0 +1,12 @@
diff -urB digikam/core/cmake/modules/FindMarble.cmake new/core/cmake/modules/FindMarble.cmake
--- digikam/core/cmake/modules/FindMarble.cmake 2015-10-17 08:33:01.347270719 +0200
+++ new/core/cmake/modules/FindMarble.cmake 2015-10-17 12:07:56.423127921 +0200
@@ -19,7 +19,7 @@
FIND_PATH( MARBLE_INCLUDE_DIR NAMES marble/MarbleModel.h )
FIND_LIBRARY( MARBLE_LIBRARIES NAMES marblewidget-qt5 marblewidget-qt5d )
-FIND_LIBRARY( ASTRO_LIBRARIES NAMES astro astrod )
+FIND_LIBRARY( ASTRO_LIBRARIES NAMES astro-qt5 astro-qt5d )
INCLUDE( FindPackageHandleStandardArgs )

View File

@ -1,541 +0,0 @@
diff -urNB a/extra/libkface/CMakeLists.txt b/extra/libkface/CMakeLists.txt
--- a/extra/libkface/CMakeLists.txt 2015-09-03 23:22:44.000000000 +0200
+++ b/extra/libkface/CMakeLists.txt 2016-03-04 07:53:19.390177947 +0100
@@ -29,8 +29,33 @@
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
+# OpenCV detection
include(MacroOpenCV)
-DETECT_OPENCV(2.4.9 core highgui objdetect contrib legacy imgproc)
+
+if(ENABLE_OPENCV3)
+
+ set(OPENCV_MIN_VERSION "3.0.0")
+ DETECT_OPENCV(${OPENCV_MIN_VERSION} core face highgui objdetect imgproc)
+
+ if(${OpenCV_FOUND})
+ if(${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()
+ endif()
+
+else()
+ set(OPENCV_MIN_VERSION "2.4.9")
+ DETECT_OPENCV(${OPENCV_MIN_VERSION} core highgui objdetect contrib legacy imgproc)
+
+ if(${OpenCV_FOUND})
+ if(${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()
+
+endif()
include_directories(${OpenCV_INCLUDE_DIRS})
diff -urNB a/extra/libkface/libkface/CMakeLists.txt b/extra/libkface/libkface/CMakeLists.txt
--- a/extra/libkface/libkface/CMakeLists.txt 2015-09-03 23:22:44.000000000 +0200
+++ b/extra/libkface/libkface/CMakeLists.txt 2016-03-04 08:17:38.604392033 +0100
@@ -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.
diff -urNB a/extra/libkface/libkface/detection/opencvfacedetector.cpp b/extra/libkface/libkface/detection/opencvfacedetector.cpp
--- a/extra/libkface/libkface/detection/opencvfacedetector.cpp 2015-09-03 23:22:44.000000000 +0200
+++ b/extra/libkface/libkface/detection/opencvfacedetector.cpp 2016-03-04 09:00:03.837203004 +0100
@@ -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);
}
diff -urNB a/extra/libkface/libkface/libopencv.h.cmake.in b/extra/libkface/libkface/libopencv.h.cmake.in
--- a/extra/libkface/libkface/libopencv.h.cmake.in 2015-09-03 23:22:44.000000000 +0200
+++ b/extra/libkface/libkface/libopencv.h.cmake.in 2016-03-04 08:17:46.260398775 +0100
@@ -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,15 +49,22 @@
#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(ENABLE_OPENCV3)
+# 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>
diff -urNB a/extra/libkface/libkface/recognition-opencv-lbph/facerec_borrowed.cpp b/extra/libkface/libkface/recognition-opencv-lbph/facerec_borrowed.cpp
--- a/extra/libkface/libkface/recognition-opencv-lbph/facerec_borrowed.cpp 2015-09-03 23:22:44.000000000 +0200
+++ b/extra/libkface/libkface/recognition-opencv-lbph/facerec_borrowed.cpp 2016-03-04 11:03:01.968939437 +0100
@@ -36,6 +36,8 @@
*
* ============================================================ */
+#define QT_NO_EMIT
+
#include "facerec_borrowed.h"
// C++ includes
@@ -375,7 +377,11 @@
}
}
+#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 @@
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 @@
{
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 @@
// 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 @@
double mean = sum / it->second.size();
s += QString("%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
}
kDebug() << s;
@@ -462,7 +487,7 @@
// 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 @@
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 @@
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 @@
predict(_src, label, dummy);
return label;
}
+#endif
// Static method ----------------------------------------------------
@@ -531,14 +568,15 @@
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 -urNB a/extra/libkface/libkface/recognition-opencv-lbph/facerec_borrowed.h b/extra/libkface/libkface/recognition-opencv-lbph/facerec_borrowed.h
--- a/extra/libkface/libkface/recognition-opencv-lbph/facerec_borrowed.h 2015-09-03 23:22:44.000000000 +0200
+++ b/extra/libkface/libkface/recognition-opencv-lbph/facerec_borrowed.h 2016-03-04 10:59:51.244576351 +0100
@@ -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);
@@ -116,6 +125,8 @@
*/
void update(cv::InputArrayOfArrays src, cv::InputArray labels);
+
+#if OPENCV_TEST_VERSION(3,1,0)
/**
* Predicts the label of a query image in src.
*/
@@ -125,6 +136,13 @@
* 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().
@@ -139,6 +157,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 +167,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
diff -urNB a/extra/libkface/libkface/recognition-opencv-lbph/lbphfacemodel.cpp b/extra/libkface/libkface/recognition-opencv-lbph/lbphfacemodel.cpp
--- a/extra/libkface/libkface/recognition-opencv-lbph/lbphfacemodel.cpp 2015-09-03 23:22:44.000000000 +0200
+++ b/extra/libkface/libkface/recognition-opencv-lbph/lbphfacemodel.cpp 2016-03-04 08:17:46.260398775 +0100
@@ -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,7 +84,11 @@
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)
kWarning() << "LBPHFaceRecognizer pointer is null";
@@ -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++)
{

View File

@ -1,12 +0,0 @@
Index: extra/kipi-plugins/gpssync/CMakeLists.txt
===================================================================
--- extra/kipi-plugins/gpssync/CMakeLists.txt.orig
+++ extra/kipi-plugins/gpssync/CMakeLists.txt
@@ -43,7 +43,6 @@ if(KDE4_BUILD_TESTS)
#add_definitions(-DGPSSYNC_MODELTEST)
set(kipiplugin_gpssync_PART_SRCS
${kipiplugin_gpssync_PART_SRCS}
- ${CMAKE_CURRENT_SOURCE_DIR}/borrowed/modeltest.cpp
)
endif()