commit:     9c14167df269d12147b428deb815efc3dc33caed
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  7 01:04:46 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Jan 15 20:07:55 2017 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=9c14167d

kde-apps/kio-extras: Add USE=activities,man, fix DEPENDs

Package-Manager: portage-2.3.0

 .../kio-extras-16.12.1-activities-optional.patch   | 52 ++++++++++++++++++++++
 .../files/kio-extras-16.12.1-man-optional.patch    | 48 ++++++++++++++++++++
 .../kio-extras/kio-extras-16.12.49.9999.ebuild     | 21 ++++++---
 kde-apps/kio-extras/kio-extras-9999.ebuild         | 17 ++++---
 kde-apps/kio-extras/metadata.xml                   |  2 +
 5 files changed, 128 insertions(+), 12 deletions(-)

diff --git 
a/kde-apps/kio-extras/files/kio-extras-16.12.1-activities-optional.patch 
b/kde-apps/kio-extras/files/kio-extras-16.12.1-activities-optional.patch
new file mode 100644
index 0000000..efa79a9
--- /dev/null
+++ b/kde-apps/kio-extras/files/kio-extras-16.12.1-activities-optional.patch
@@ -0,0 +1,52 @@
+From a84100dce8a32de89c6a854c965c0c54f1126563 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlech...@gmail.com>
+Date: Mon, 2 Jan 2017 02:16:40 +0100
+Subject: [PATCH 1/2] Make activities kioslave optional
+
+Not everyone builds this for a Plasma desktop, Qt5Sql is already only
+searched for in that subdirectory, so this gives some nice modularity.
+
+REVIEW: 129783
+---
+ CMakeLists.txt | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index edc2639..5ac418b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -39,7 +39,6 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
+     Solid
+     Bookmarks
+     GuiAddons
+-    Activities
+ )
+ # As this is the check used for linkage, only require it in the same 
location...
+ if (UNIX)
+@@ -56,6 +55,12 @@ include(ECMOptionalAddSubdirectory)
+ 
+ add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
+ 
++find_package(KF5Activities QUIET)
++set_package_properties(KF5Activities PROPERTIES
++    PURPOSE "Provides the activities:/ kioslave and fileitem plugin."
++    TYPE OPTIONAL
++)
++
+ find_package(SLP)
+ set_package_properties(SLP PROPERTIES DESCRIPTION "SLP (Service Location 
Protocol) implementation"
+                        URL "http://www.openslp.org/";
+@@ -126,7 +131,9 @@ endif()
+ add_subdirectory( doc )
+ 
+ add_subdirectory( about )
+-add_subdirectory( activities )
++if(KF5Activities_FOUND)
++  add_subdirectory( activities )
++endif()
+ add_subdirectory( bookmarks )
+ add_subdirectory( filter )
+ if(Phonon4Qt5_FOUND)
+-- 
+2.10.2
+

diff --git a/kde-apps/kio-extras/files/kio-extras-16.12.1-man-optional.patch 
b/kde-apps/kio-extras/files/kio-extras-16.12.1-man-optional.patch
new file mode 100644
index 0000000..9c6452b
--- /dev/null
+++ b/kde-apps/kio-extras/files/kio-extras-16.12.1-man-optional.patch
@@ -0,0 +1,48 @@
+From c9f618e75f4d84a8c48cb321a477c68c6dbf9f08 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlech...@gmail.com>
+Date: Mon, 2 Jan 2017 02:35:08 +0100
+Subject: [PATCH 2/2] Make KF5KHtml dependency optional, only used by man
+
+REVIEW: 129783
+---
+ CMakeLists.txt | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5ac418b..7de37ea 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -34,7 +34,6 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
+     IconThemes
+     I18n
+     KIO
+-    KHtml
+     KDELibs4Support
+     Solid
+     Bookmarks
+@@ -124,6 +123,11 @@ if(UNIX)
+     if(NOT OFFT_IS_64BIT)
+         message(FATAL_ERROR "Large file support is not enabled.")
+     endif()
++
++    find_package(KF5KHtml QUIET)
++    set_package_properties(KF5KHtml PROPERTIES TYPE OPTIONAL
++                           PURPOSE "Needed to build the man kioslave"
++                           )
+ else()
+     # FIXME: on windows we ignore support until trash gets integrated
+ endif()
+@@ -158,7 +162,9 @@ if (MTP_FOUND)
+ endif()
+ 
+ if(NOT WIN32)
+-   add_subdirectory( man )
++   if(KF5KHtml_FOUND)
++     add_subdirectory( man )
++   endif()
+    check_include_files(rpc/rpc.h HAVE_RPC_RPC_H)
+    add_feature_info("NFS kioslave" HAVE_RPC_RPC_H "The RPC library is needed 
to build the NFS kioslave")
+    if(HAVE_RPC_RPC_H)
+-- 
+2.10.2
+

diff --git a/kde-apps/kio-extras/kio-extras-16.12.49.9999.ebuild 
b/kde-apps/kio-extras/kio-extras-16.12.49.9999.ebuild
index c9136a0..9bd4ad6 100644
--- a/kde-apps/kio-extras/kio-extras-16.12.49.9999.ebuild
+++ b/kde-apps/kio-extras/kio-extras-16.12.49.9999.ebuild
@@ -13,10 +13,9 @@ inherit kde5
 DESCRIPTION="KIO plugins present a filesystem-like view of arbitrary data"
 HOMEPAGE="https://projects.kde.org/projects/kde/workspace/kio-extras";
 KEYWORDS=""
-IUSE="exif htmlthumbs mtp openexr phonon samba +sftp slp"
+IUSE="activities exif htmlthumbs +man mtp openexr phonon samba +sftp slp"
 
 COMMON_DEPEND="
-       $(add_frameworks_dep kactivities)
        $(add_frameworks_dep karchive 'bzip2,lzma')
        $(add_frameworks_dep kbookmarks)
        $(add_frameworks_dep kcodecs)
@@ -27,7 +26,6 @@ COMMON_DEPEND="
        $(add_frameworks_dep kdelibs4support)
        $(add_frameworks_dep kdnssd)
        $(add_frameworks_dep kguiaddons)
-       $(add_frameworks_dep khtml)
        $(add_frameworks_dep ki18n)
        $(add_frameworks_dep kiconthemes)
        $(add_frameworks_dep kio)
@@ -39,18 +37,22 @@ COMMON_DEPEND="
        $(add_qt_dep qtdbus)
        $(add_qt_dep qtgui)
        $(add_qt_dep qtnetwork)
-       $(add_qt_dep qtsql)
        $(add_qt_dep qtsvg)
        $(add_qt_dep qtwidgets)
        $(add_qt_dep qtxml)
        virtual/jpeg:0
+       activities? (
+               $(add_frameworks_dep kactivities)
+               $(add_qt_dep qtsql)
+       )
        exif? ( media-gfx/exiv2:= )
        htmlthumbs? ( $(add_qt_dep qtwebengine) )
+       man? ( $(add_frameworks_dep khtml) )
        mtp? ( media-libs/libmtp:= )
        openexr? ( media-libs/openexr )
        phonon? ( media-libs/phonon[qt5] )
-       samba? ( || ( <net-fs/samba-4.0.0_alpha1[smbclient] 
>=net-fs/samba-4.0.0_alpha1[client] ) )
-       sftp? ( >=net-libs/libssh-0.6.0:=[sftp] )
+       samba? ( net-fs/samba[client] )
+       sftp? ( net-libs/libssh:=[sftp] )
        slp? ( net-libs/openslp )
 "
 RDEPEND="${COMMON_DEPEND}
@@ -63,10 +65,17 @@ DEPEND="${COMMON_DEPEND}
 # requires running kde environment
 RESTRICT+=" test"
 
+PATCHES=(
+       "${FILESDIR}/${PN}"-16.12.1-activities-optional.patch
+       "${FILESDIR}/${PN}"-16.12.1-man-optional.patch
+)
+
 src_configure() {
        local mycmakeargs=(
+               $(cmake-utils_use_find_package activities KF5Activities)
                $(cmake-utils_use_find_package exif Exiv2)
                $(cmake-utils_use_find_package htmlthumbs Qt5WebEngineWidgets)
+               $(cmake-utils_use_find_package man KF5KHtml)
                $(cmake-utils_use_find_package mtp Mtp)
                $(cmake-utils_use_find_package openexr OpenEXR)
                $(cmake-utils_use_find_package phonon Phonon4Qt5)

diff --git a/kde-apps/kio-extras/kio-extras-9999.ebuild 
b/kde-apps/kio-extras/kio-extras-9999.ebuild
index c9136a0..b756157 100644
--- a/kde-apps/kio-extras/kio-extras-9999.ebuild
+++ b/kde-apps/kio-extras/kio-extras-9999.ebuild
@@ -13,10 +13,9 @@ inherit kde5
 DESCRIPTION="KIO plugins present a filesystem-like view of arbitrary data"
 HOMEPAGE="https://projects.kde.org/projects/kde/workspace/kio-extras";
 KEYWORDS=""
-IUSE="exif htmlthumbs mtp openexr phonon samba +sftp slp"
+IUSE="activities exif htmlthumbs +man mtp openexr phonon samba +sftp slp"
 
 COMMON_DEPEND="
-       $(add_frameworks_dep kactivities)
        $(add_frameworks_dep karchive 'bzip2,lzma')
        $(add_frameworks_dep kbookmarks)
        $(add_frameworks_dep kcodecs)
@@ -27,7 +26,6 @@ COMMON_DEPEND="
        $(add_frameworks_dep kdelibs4support)
        $(add_frameworks_dep kdnssd)
        $(add_frameworks_dep kguiaddons)
-       $(add_frameworks_dep khtml)
        $(add_frameworks_dep ki18n)
        $(add_frameworks_dep kiconthemes)
        $(add_frameworks_dep kio)
@@ -39,18 +37,22 @@ COMMON_DEPEND="
        $(add_qt_dep qtdbus)
        $(add_qt_dep qtgui)
        $(add_qt_dep qtnetwork)
-       $(add_qt_dep qtsql)
        $(add_qt_dep qtsvg)
        $(add_qt_dep qtwidgets)
        $(add_qt_dep qtxml)
        virtual/jpeg:0
+       activities? (
+               $(add_frameworks_dep kactivities)
+               $(add_qt_dep qtsql)
+       )
        exif? ( media-gfx/exiv2:= )
        htmlthumbs? ( $(add_qt_dep qtwebengine) )
+       man? ( $(add_frameworks_dep khtml) )
        mtp? ( media-libs/libmtp:= )
        openexr? ( media-libs/openexr )
        phonon? ( media-libs/phonon[qt5] )
-       samba? ( || ( <net-fs/samba-4.0.0_alpha1[smbclient] 
>=net-fs/samba-4.0.0_alpha1[client] ) )
-       sftp? ( >=net-libs/libssh-0.6.0:=[sftp] )
+       samba? ( net-fs/samba[client] )
+       sftp? ( net-libs/libssh:=[sftp] )
        slp? ( net-libs/openslp )
 "
 RDEPEND="${COMMON_DEPEND}
@@ -58,6 +60,7 @@ RDEPEND="${COMMON_DEPEND}
 "
 DEPEND="${COMMON_DEPEND}
        x11-misc/shared-mime-info
+       man? ( dev-util/gperf )
 "
 
 # requires running kde environment
@@ -65,8 +68,10 @@ RESTRICT+=" test"
 
 src_configure() {
        local mycmakeargs=(
+               $(cmake-utils_use_find_package activities KF5Activities)
                $(cmake-utils_use_find_package exif Exiv2)
                $(cmake-utils_use_find_package htmlthumbs Qt5WebEngineWidgets)
+               $(cmake-utils_use_find_package man Gperf)
                $(cmake-utils_use_find_package mtp Mtp)
                $(cmake-utils_use_find_package openexr OpenEXR)
                $(cmake-utils_use_find_package phonon Phonon4Qt5)

diff --git a/kde-apps/kio-extras/metadata.xml b/kde-apps/kio-extras/metadata.xml
index 75cdaad..c32c832 100644
--- a/kde-apps/kio-extras/metadata.xml
+++ b/kde-apps/kio-extras/metadata.xml
@@ -6,7 +6,9 @@
                <name>Gentoo KDE Project</name>
        </maintainer>
        <use>
+               <flag name="activities">Enable activities kioslave and fileitem 
plugin</flag>
                <flag name="htmlthumbs">Enable HTML thumbnail previews via 
<pkg>dev-qt/qtwebengine</pkg></flag>
+               <flag name="man">Enable manpages kioslave</flag>
                <flag name="phonon">Enable file audio preview plugin using 
<pkg>media-libs/phonon</pkg></flag>
                <flag name="sftp">Enable SFTP protocol support using 
<pkg>net-libs/libssh</pkg></flag>
        </use>

Reply via email to