Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:yukoff:openSUSE:Leap:42.1:Backports
kdegraphics-thumbnailers.4228
0001-Initial-port-to-Frameworks.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Initial-port-to-Frameworks.patch of Package kdegraphics-thumbnailers.4228
From 010ca9359c20606e98d6c507f0b135cf4fc6c88e Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan <hrvoje.senjan@gmail.com> Date: Mon, 27 Oct 2014 11:45:18 +0100 Subject: [PATCH 1/3] Initial port to Frameworks KDcraw still needs some fixing to be usable to the outside world --- CMakeLists.txt | 48 ++++++++++++++++++++++++++++++++++-------------- ps/CMakeLists.txt | 4 ++-- ps/gscreator.cpp | 3 +-- raw/CMakeLists.txt | 8 ++------ raw/rawcreator.cpp | 6 +++--- 5 files changed, 42 insertions(+), 27 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 47bd2fb0f89b10fe8a3c5d05db59e8a484001fd1..c65fb3ab0ccba89095a1c105c2f98e2993819747 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,23 +1,43 @@ project(kdegraphics-thumbnailers) -find_package(KDE4 REQUIRED) -include(KDE4Defaults) -include(MacroLibrary) -include(MacroOptionalAddSubdirectory) +cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) +set(QT_MIN_VERSION "5.2.0") -add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) -include_directories(${KDE4_INCLUDES}) +find_package(ECM 1.0.0 REQUIRED NO_MODULE) +set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) -macro_optional_find_package(Kexiv2) -macro_optional_find_package(Kdcraw) +include(ECMOptionalAddSubdirectory) +include(KDEInstallDirs) +include(KDECMakeSettings) +include(KDECompilerSettings) +include(FeatureSummary) -macro_log_feature(KEXIV2_FOUND "libkexiv2" "A library for reading and writing image metadata" "www.kde.org" FALSE "" "Required to build the RAW thumbnailer") -macro_log_feature(KDCRAW_FOUND "libkdcraw" "A library for accessing raw files" "www.kde.org" FALSE "" "Required to build the RAW thumbnailer") +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Gui) +find_package(KF5 REQUIRED COMPONENTS KIO) -macro_optional_add_subdirectory(ps) +add_definitions(${QT_DEFINITIONS} -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) -if(KEXIV2_FOUND AND KDCRAW_FOUND) -macro_optional_add_subdirectory(raw) +find_package(KF5KExiv2) +set_package_properties("KF5KExiv2" PROPERTIES + DESCRIPTION "A library for reading and writing image metadata" + URL "www.kde.org" + TYPE OPTIONAL + PURPOSE "Required to build the RAW thumbnailer" +) + +find_package(KF5KDcraw) +set_package_properties("KF5KDcraw" PROPERTIES + DESCRIPTION "A library for accessing raw files" + URL "www.kde.org" + TYPE OPTIONAL + PURPOSE "Required to build the RAW thumbnailer" +) + + +ecm_optional_add_subdirectory(ps) + +if(KF5KExiv2_FOUND AND KF5KDcraw_FOUND) +ecm_optional_add_subdirectory(raw) endif() -macro_display_feature_log() +feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/ps/CMakeLists.txt b/ps/CMakeLists.txt index b6643a3a157ad6f3179d389c2a60250ec8c15576..92ea9c26fc8f21adb5dda072694c0af15d92445e 100644 --- a/ps/CMakeLists.txt +++ b/ps/CMakeLists.txt @@ -3,10 +3,10 @@ set(gsthumbnail_PART_SRCS gscreator.cpp dscparse.cpp dscparse_adapter.cpp) -kde4_add_plugin(gsthumbnail ${gsthumbnail_PART_SRCS}) +add_library(gsthumbnail MODULE ${gsthumbnail_PART_SRCS}) -target_link_libraries(gsthumbnail ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} ${QT_QTGUI_LIBRARY} ) +target_link_libraries(gsthumbnail Qt5::Gui KF5::KIOWidgets ) install(TARGETS gsthumbnail DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/ps/gscreator.cpp b/ps/gscreator.cpp index 2650e306f1481c4cfa676130ca7f55313fa6f0bf..df2de700d5b6f549838406e0b3c9d35396923f4e 100644 --- a/ps/gscreator.cpp +++ b/ps/gscreator.cpp @@ -67,7 +67,6 @@ #include <sys/wait.h> #include <fcntl.h> #include <errno.h> -#include <kdemacros.h> #include <qcolor.h> #include <qfile.h> @@ -82,7 +81,7 @@ extern "C" { - KDE_EXPORT ThumbCreator *new_creator() + Q_DECL_EXPORT ThumbCreator *new_creator() { return new GSCreator; } diff --git a/raw/CMakeLists.txt b/raw/CMakeLists.txt index adce793f9545f4492721a5fbc6aabaf481fd3814..f5d18f56cc62c9fb6a6f926b1c973cc37d4203bf 100644 --- a/raw/CMakeLists.txt +++ b/raw/CMakeLists.txt @@ -1,16 +1,12 @@ project(rawthumbnail) -## includes and linking -include_directories(${KEXIV2_INCLUDE_DIR} ${KDCRAW_INCLUDE_DIR}) - - #sources set(rawthumbnail_SRCS rawcreator.cpp) -kde4_add_plugin(rawthumbnail ${rawthumbnail_SRCS}) +add_library(rawthumbnail MODULE ${rawthumbnail_SRCS}) ## includes and linking -target_link_libraries(rawthumbnail ${KDE4_KIO_LIBS} ${KDCRAW_LIBRARIES} ${KEXIV2_LIBRARIES} ${QT_QTGUI_LIBRARY} ${KDE4_KDECORE_LIBS}) +target_link_libraries(rawthumbnail Qt5::Gui KF5::KIOWidgets KF5::Kdcraw KF5::Kexiv2) ## install the plugin install(TARGETS rawthumbnail DESTINATION ${PLUGIN_INSTALL_DIR}) diff --git a/raw/rawcreator.cpp b/raw/rawcreator.cpp index 48d27492691b70affa5aa70a7a08c98bf0e4d6ba..e3c9ed4279a2feda5afa1f18bf24c76c4d6c1ecc 100644 --- a/raw/rawcreator.cpp +++ b/raw/rawcreator.cpp @@ -21,12 +21,12 @@ #include <QImage> -#include <libkdcraw/kdcraw.h> -#include <libkexiv2/kexiv2.h> +#include <kdcraw/kdcraw.h> +#include <kexiv2/kexiv2.h> extern "C" { - KDE_EXPORT ThumbCreator *new_creator() + Q_DECL_EXPORT ThumbCreator *new_creator() { return new RAWCreator; } -- 2.5.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor