commit: 4ec78c708422cbd311ff4ea57f2c955e1c0f34f6 Author: Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com> AuthorDate: Sun Nov 15 01:41:58 2015 +0000 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> CommitDate: Sun Nov 15 16:17:28 2015 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=4ec78c70
kde-apps/dolphin-plugins: Add USE=mercurial, make plugins optional Patch upstreamed in Applications/15.12 already, fixes bug 559918 https://bugs.gentoo.org/show_bug.cgi?id=559918 Package-Manager: portage-2.2.20.1 .../dolphin-plugins-15.12.49.9999.ebuild | 44 +++++++++++++--- .../dolphin-plugins/dolphin-plugins-9999.ebuild | 46 ++++++++++++++--- ...dolphin-plugins-15.11.80-plugins-optional.patch | 59 ++++++++++++++++++++++ 3 files changed, 133 insertions(+), 16 deletions(-) diff --git a/kde-apps/dolphin-plugins/dolphin-plugins-15.12.49.9999.ebuild b/kde-apps/dolphin-plugins/dolphin-plugins-15.12.49.9999.ebuild index ac7d39a..470f2bb 100644 --- a/kde-apps/dolphin-plugins/dolphin-plugins-15.12.49.9999.ebuild +++ b/kde-apps/dolphin-plugins/dolphin-plugins-15.12.49.9999.ebuild @@ -9,23 +9,39 @@ inherit kde5 DESCRIPTION="Extra Dolphin plugins" KEYWORDS="" -IUSE="bazaar dropbox git subversion" +IUSE="bazaar dropbox git mercurial subversion" -DEPEND=" - $(add_frameworks_dep kcompletion) - $(add_frameworks_dep kconfig) +# FIXME: required in root CMakeLists.txt, but: +# kdelibs4support only required by git? +# kxmlgui, qtnetwork only required by dropbox? +COMMON_DEPEND=" $(add_frameworks_dep kcoreaddons) $(add_frameworks_dep kdelibs4support) $(add_frameworks_dep ki18n) $(add_frameworks_dep kio) - $(add_frameworks_dep ktextwidgets) $(add_frameworks_dep kxmlgui) $(add_kdeapps_dep dolphin) dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 + git? ( + $(add_frameworks_dep kcompletion) + $(add_frameworks_dep kconfig) + $(add_frameworks_dep ktextwidgets) + ) + mercurial? ( + $(add_frameworks_dep kcompletion) + $(add_frameworks_dep kconfig) + $(add_frameworks_dep kservice) + $(add_frameworks_dep ktexteditor) + $(add_frameworks_dep ktextwidgets) + $(add_frameworks_dep kwidgetsaddons) + ) " -RDEPEND="${DEPEND} +DEPEND="${COMMON_DEPEND} + sys-devel/gettext +" +RDEPEND="${COMMON_DEPEND} $(add_kdeapps_dep kompare) bazaar? ( dev-vcs/bzr ) dropbox? ( net-misc/dropbox-cli ) @@ -33,12 +49,24 @@ RDEPEND="${DEPEND} subversion? ( dev-vcs/subversion ) " +src_configure() { + local mycmakeargs=( + $(cmake-utils_use_build bazaar) + $(cmake-utils_use_build dropbox) + $(cmake-utils_use_build git) + $(cmake-utils_use_build mercurial hg) + $(cmake-utils_use_build subversion svn) + ) + + kde5_src_configure +} + src_install() { - { use bazaar || use dropbox || use git || use subversion; } && kde5_src_install + { use bazaar || use dropbox || use git || use subversion || use mercurial; } && kde5_src_install } pkg_postinst() { - if ! use bazaar && ! use dropbox && ! use git && ! use subversion ; then + if ! use bazaar && ! use dropbox && ! use git && ! use subversion && ! use mercurial; then einfo einfo "You have disabled all plugin use flags. If you want to have vcs" einfo "integration in dolphin, enable those of your needs." diff --git a/kde-apps/dolphin-plugins/dolphin-plugins-9999.ebuild b/kde-apps/dolphin-plugins/dolphin-plugins-9999.ebuild index ac7d39a..ffae86f 100644 --- a/kde-apps/dolphin-plugins/dolphin-plugins-9999.ebuild +++ b/kde-apps/dolphin-plugins/dolphin-plugins-9999.ebuild @@ -9,23 +9,39 @@ inherit kde5 DESCRIPTION="Extra Dolphin plugins" KEYWORDS="" -IUSE="bazaar dropbox git subversion" +IUSE="bazaar dropbox git mercurial subversion" -DEPEND=" - $(add_frameworks_dep kcompletion) - $(add_frameworks_dep kconfig) +# FIXME: required in root CMakeLists.txt, but: +# kdelibs4support only required by git? +# kxmlgui, qtnetwork only required by dropbox? +COMMON_DEPEND=" $(add_frameworks_dep kcoreaddons) $(add_frameworks_dep kdelibs4support) $(add_frameworks_dep ki18n) $(add_frameworks_dep kio) - $(add_frameworks_dep ktextwidgets) $(add_frameworks_dep kxmlgui) $(add_kdeapps_dep dolphin) dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 + git? ( + $(add_frameworks_dep kcompletion) + $(add_frameworks_dep kconfig) + $(add_frameworks_dep ktextwidgets) + ) + mercurial? ( + $(add_frameworks_dep kcompletion) + $(add_frameworks_dep kconfig) + $(add_frameworks_dep kservice) + $(add_frameworks_dep ktexteditor) + $(add_frameworks_dep ktextwidgets) + $(add_frameworks_dep kwidgetsaddons) + ) " -RDEPEND="${DEPEND} +DEPEND="${COMMON_DEPEND} + sys-devel/gettext +" +RDEPEND="${COMMON_DEPEND} $(add_kdeapps_dep kompare) bazaar? ( dev-vcs/bzr ) dropbox? ( net-misc/dropbox-cli ) @@ -33,12 +49,26 @@ RDEPEND="${DEPEND} subversion? ( dev-vcs/subversion ) " +PATCHES=( "${FILESDIR}/${PN}-15.11.80-plugins-optional.patch" ) + +src_configure() { + local mycmakeargs=( + $(cmake-utils_use_build bazaar) + $(cmake-utils_use_build dropbox) + $(cmake-utils_use_build git) + $(cmake-utils_use_build mercurial hg) + $(cmake-utils_use_build subversion svn) + ) + + kde5_src_configure +} + src_install() { - { use bazaar || use dropbox || use git || use subversion; } && kde5_src_install + { use bazaar || use dropbox || use git || use subversion || use mercurial; } && kde5_src_install } pkg_postinst() { - if ! use bazaar && ! use dropbox && ! use git && ! use subversion ; then + if ! use bazaar && ! use dropbox && ! use git && ! use subversion && ! use mercurial; then einfo einfo "You have disabled all plugin use flags. If you want to have vcs" einfo "integration in dolphin, enable those of your needs." diff --git a/kde-apps/dolphin-plugins/files/dolphin-plugins-15.11.80-plugins-optional.patch b/kde-apps/dolphin-plugins/files/dolphin-plugins-15.11.80-plugins-optional.patch new file mode 100644 index 0000000..4c54da8 --- /dev/null +++ b/kde-apps/dolphin-plugins/files/dolphin-plugins-15.11.80-plugins-optional.patch @@ -0,0 +1,59 @@ +commit b988f38446d9bfedd2f025e6717bdc348cbd98c6 +Author: Andreas Sturmlechner <andreas.sturmlech...@gmail.com> +Date: Sun Nov 15 00:50:58 2015 +0100 + + Actually make hg optional (and other plugins while at it) + + The existing approach does not work, because if you take KF5WidgetsAddons out + of the equation, required KF5XmlGui (among others) will be disabled as well. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b793655..6986ffa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,24 +32,18 @@ set_package_properties(DolphinVcs PROPERTIES + PURPOSE "Provides the version control plugin interface." + ) + +-find_package(KF5 ${KF5_MIN_VERSION} OPTIONAL_COMPONENTS +- TextEditor +- WidgetsAddons +-) +- + include(KDEInstallDirs) + include(KDECMakeSettings) + include(KDECompilerSettings) + include(ECMMarkNonGuiExecutable) ++include(ECMOptionalAddSubdirectory) + + include_directories(${CMAKE_CURRENT_BINARY_DIR}) + +-add_subdirectory(svn) +-add_subdirectory(git) +-add_subdirectory(bazaar) +-add_subdirectory(dropbox) +-if (KF5TextEditor_FOUND AND KF5WidgetsAddons_FOUND) +- add_subdirectory(hg) +-endif() ++ecm_optional_add_subdirectory(svn) ++ecm_optional_add_subdirectory(git) ++ecm_optional_add_subdirectory(bazaar) ++ecm_optional_add_subdirectory(dropbox) ++ecm_optional_add_subdirectory(hg) + + feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) +diff --git a/hg/CMakeLists.txt b/hg/CMakeLists.txt +index a5e1c7f..fb770e2 100644 +--- a/hg/CMakeLists.txt ++++ b/hg/CMakeLists.txt +@@ -1,5 +1,10 @@ + project(fileviewhgplugin) + ++find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS ++ TextEditor ++ WidgetsAddons ++) ++ + add_definitions(-DTRANSLATION_DOMAIN=\"fileviewhgplugin\" -DQT_NO_URL_CAST_FROM_STRING) + + set(fileviewhgplugin_SRCS