From 3c9a7c91047a2fc86b0531c6edf837a79e15072f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 20 May 2018 15:00:52 +0100 Subject: kde-plasma/kde-gtk-config : drop gnome-base/gsettings-desktop-schemas dependency --- ...elf-or-try-again-with-a-option-to-disable.patch | 250 +++++++++++++++++++++ .../kde-gtk-config/kde-gtk-config-5.12.5-r1.ebuild | 53 +++++ .../kde-gtk-config/kde-gtk-config-5.12.5.ebuild | 52 ----- 3 files changed, 303 insertions(+), 52 deletions(-) create mode 100644 kde-plasma/kde-gtk-config/files/redhat-or-not-go-dconf-and-flatpak-yourself-or-try-again-with-a-option-to-disable.patch create mode 100644 kde-plasma/kde-gtk-config/kde-gtk-config-5.12.5-r1.ebuild delete mode 100644 kde-plasma/kde-gtk-config/kde-gtk-config-5.12.5.ebuild (limited to 'kde-plasma/kde-gtk-config') diff --git a/kde-plasma/kde-gtk-config/files/redhat-or-not-go-dconf-and-flatpak-yourself-or-try-again-with-a-option-to-disable.patch b/kde-plasma/kde-gtk-config/files/redhat-or-not-go-dconf-and-flatpak-yourself-or-try-again-with-a-option-to-disable.patch new file mode 100644 index 00000000..865c7332 --- /dev/null +++ b/kde-plasma/kde-gtk-config/files/redhat-or-not-go-dconf-and-flatpak-yourself-or-try-again-with-a-option-to-disable.patch @@ -0,0 +1,250 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3fb4e1a..d1e32f0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,14 +8,11 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${ECM_MODULE_P + find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Widgets Test) + find_package(KF5 REQUIRED COMPONENTS I18n KIO ConfigWidgets NewStuff Archive KCMUtils IconThemes) + find_package(X11 REQUIRED) +-find_package(GTK3 REQUIRED) +-find_package(GSettingSchemas REQUIRED) + + include_directories( +- ${CMAKE_SOURCE_DIR} +- ${CMAKE_SOURCE_DIR}/src +- ${CMAKE_SOURCE_DIR}/src/ui +- ${GTK3_INCLUDE_DIRS} ++ ${CMAKE_SOURCE_DIR} ++ ${CMAKE_SOURCE_DIR}/src ++ ${CMAKE_SOURCE_DIR}/src/ui + ) + + include(ECMSetupVersion) +@@ -40,21 +37,21 @@ set(kcm_SRCS + src/appearencegtk.cpp + src/abstractappearance.cpp + src/thread.cpp +- src/installer.cpp ++ src/installer.cpp + src/gtkconfigkcmodule.cpp +- src/dialog_installer.cpp +- src/dialog_uninstaller.cpp ++ src/dialog_installer.cpp ++ src/dialog_uninstaller.cpp + src/fontshelpers.cpp + ) + +-ki18n_wrap_ui(kcm_SRCS +- src/ui/gui.ui +- src/ui/dialog_installer.ui ++ki18n_wrap_ui(kcm_SRCS ++ src/ui/gui.ui ++ src/ui/dialog_installer.ui + src/ui/dialog_uninstaller.ui + ) + add_library(kcm_kdegtkconfig MODULE ${kcm_SRCS}) + target_compile_definitions(kcm_kdegtkconfig PRIVATE -DPROJECT_VERSION="${PROJECT_VERSION}") +-target_link_libraries(kcm_kdegtkconfig ${X11_Xcursor_LIB} ${GIO2_LIBRARY} ${GLIB2_LIBRARY} ${GTK3_LIBRARY} ${GOBJECT2_LIBRARY} KF5::ConfigCore KF5::I18n KF5::KIOWidgets KF5::NewStuff KF5::Archive KF5::NewStuff KF5::ConfigWidgets KF5::IconThemes) ++target_link_libraries(kcm_kdegtkconfig ${X11_Xcursor_LIB} KF5::ConfigCore KF5::I18n KF5::KIOWidgets KF5::NewStuff KF5::Archive KF5::NewStuff KF5::ConfigWidgets KF5::IconThemes) + + kcoreaddons_desktop_to_json(kcm_kdegtkconfig kde-gtk-config.desktop) + +diff --git a/cmake/modules/FindGSettingSchemas.cmake b/cmake/modules/FindGSettingSchemas.cmake +deleted file mode 100644 +index 6d70a2e..0000000 +--- a/cmake/modules/FindGSettingSchemas.cmake ++++ /dev/null +@@ -1,23 +0,0 @@ +-find_package(PkgConfig) +- +-pkg_check_modules(PC_GLIB2 REQUIRED glib-2.0) +- +-find_path(GLIB_SCHEMAS_DIR org.gnome.desktop.interface.gschema.xml +- HINTS ${PC_GLIB2_PREFIX}/share +- PATH_SUFFIXES glib-2.0/schemas) +- +-if (GLIB_SCHEMAS_DIR) +- set(GSettingSchemas_FOUND true) +-else() +- set(GSettingSchemas_FOUND false) +-endif() +- +-include(FindPackageHandleStandardArgs) +-find_package_handle_standard_args(GSettingSchemas +- FOUND_VAR +- GSettingSchemas_FOUND +- REQUIRED_VARS +- GSettingSchemas_FOUND +-) +- +-mark_as_advanced(GSettingSchemas_FOUND) +diff --git a/cmake/modules/FindGTK3.cmake b/cmake/modules/FindGTK3.cmake +index f178523..8da67fd 100644 +--- a/cmake/modules/FindGTK3.cmake ++++ b/cmake/modules/FindGTK3.cmake +@@ -35,7 +35,7 @@ FIND_PATH( + GLIB2_INCLUDE_DIR_PART1 glib.h + HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS} + PATH_SUFFIXES glib-2.0) +- ++ + FIND_PATH( + GLIB2_INCLUDE_DIR_PART2 glibconfig.h + HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS} +@@ -58,7 +58,7 @@ FIND_PATH( + GOBJECT2_INCLUDE_DIR_PART1 glib.h + HINTS ${PC_GOBJECT2_INCLUDEDIR} ${PC_GOBJECT2_INCLUDE_DIRS} + PATH_SUFFIXES gobject-2.0) +- ++ + FIND_PATH( + GOBJECT2_INCLUDE_DIR_PART2 gobject.h + HINTS ${PC_GOBJECT2_INCLUDEDIR} ${PC_GOBJECT2_INCLUDE_DIRS} +@@ -70,30 +70,6 @@ FIND_LIBRARY( + GOBJECT2_LIBRARY NAMES gobject-2.0 + HINTS ${PC_GOBJECT2_LIBDIR} ${PC_GOBJECT2_LIBRARY_DIRS}) + +-# +-# gio +-# +-PKG_CHECK_MODULES(PC_GIO2 REQUIRED gio-2.0) +- +-SET(GLIB2_DEFINITIONS ${PC_GIO2_CXXFLAGS_OTHER}) +- +-FIND_PATH( +- GIO2_INCLUDE_DIR_PART1 glib.h +- HINTS ${PC_GIO2_INCLUDEDIR} ${PC_GIO2_INCLUDE_DIRS} +- PATH_SUFFIXES gio) +- +-FIND_PATH( +- GIO2_INCLUDE_DIR_PART2 gio.h +- HINTS ${PC_GIO2_INCLUDEDIR} ${PC_GIO2_INCLUDE_DIRS} +- PATH_SUFFIXES glib-2.0/gio) +- +-SET(GIO2_INCLUDE_DIR ${GIO2_INCLUDE_DIR_PART1} ${GIO2_INCLUDE_DIR_PART2}) +- +-FIND_LIBRARY( +- GIO2_LIBRARY NAMES gio-2.0 +- HINTS ${PC_GIO2_LIBDIR} ${PC_GIO2_LIBRARY_DIRS}) +- +- + # + # pango + # +@@ -164,7 +140,7 @@ FIND_LIBRARY( + # + # + SET(GTK3_LIBRARY_DIRS ${GTK3_LIBRARY} ${GLIB2_LIBRARY} ${PANGO_LIBRARY} ${CAIRO_LIBRARY} ${GDKPIXBUF_LIBRARY} ${ATK_LIBRARY}) +-SET(GTK3_INCLUDE_DIRS ${GTK3_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${GIO2_INCLUDE_DIR} ${PANGO_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} ${GDKPIXBUF_INCLUDE_DIR} ${ATK_INCLUDE_DIR}) ++SET(GTK3_INCLUDE_DIRS ${GTK3_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${PANGO_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} ${GDKPIXBUF_INCLUDE_DIR} ${ATK_INCLUDE_DIR}) + + INCLUDE(FindPackageHandleStandardArgs) + +diff --git a/gtkproxies/CMakeLists.txt b/gtkproxies/CMakeLists.txt +index cd6ab1e..9a0f3bb 100644 +--- a/gtkproxies/CMakeLists.txt ++++ b/gtkproxies/CMakeLists.txt +@@ -1,6 +1,6 @@ + find_package(GTK2 REQUIRED) + +-include_directories(BEFORE ${GTK2_INCLUDE_DIRS}) ++include_directories(${GTK2_INCLUDE_DIRS}) + + add_executable(reload_gtk_apps reload.c) + target_link_libraries(reload_gtk_apps ${GTK2_LIBRARIES}) +diff --git a/src/appearancegtk3.cpp b/src/appearancegtk3.cpp +index 113f5bc..6d3019f 100644 +--- a/src/appearancegtk3.cpp ++++ b/src/appearancegtk3.cpp +@@ -1,5 +1,5 @@ + /* KDE GTK Configuration Module +- * ++ * + * Copyright 2011 José Antonio Sanchez Reynaga + * Copyright 2011 Aleix Pol Gonzalez + * +@@ -10,13 +10,13 @@ + * later version accepted by the membership of KDE e.V. (or its + * successor approved by the membership of KDE e.V.), which shall + * act as a proxy defined in Section 6 of version 3 of the license. +- * ++ * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. +- * +- * You should have received a copy of the GNU Lesser General Public ++ * ++ * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + */ + +@@ -28,11 +28,6 @@ + #include + #include + +-#undef signals +-#include +-#include +-#define signals Q_SIGNALS +- + QStringList AppearanceGTK3::installedThemes() const + { + QFileInfoList availableThemes; +@@ -125,7 +120,7 @@ QString AppearanceGTK3::defaultConfigFile() const + QString root = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation); + if(root.isEmpty()) + root = QFileInfo(QDir::home(), ".config").absoluteFilePath(); +- ++ + return root + '/' + configFileName(); + } + +@@ -159,33 +154,6 @@ bool AppearanceGTK3::loadSettings() + + bool AppearanceGTK3::saveSettings() const + { +- // FIXME kdebz#387417 +- // We should maybe use GSettings everywhere in future, but at this moment we +- // need this to have this configuration available in sandboxed applications which +- // is only possible through dconf +- gtk_init(nullptr, nullptr); +- +- g_autoptr(GSettings) gsettings = g_settings_new("org.gnome.desktop.interface"); +- g_settings_set_string(gsettings, "gtk-theme", m_settings["theme"].toUtf8().constData()); +- g_settings_set_string(gsettings, "icon-theme", m_settings["icon"].toUtf8().constData()); +- g_settings_set_string(gsettings, "cursor-theme", m_settings["cursor"].toUtf8().constData()); +- g_settings_set_string(gsettings, "font-name", m_settings["font"].toUtf8().constData()); +- +- QString toolbarStyle; +- if (m_settings["toolbar_style"] == QStringLiteral("GTK_TOOLBAR_ICONS")) { +- toolbarStyle = QStringLiteral("icons"); +- } else if (m_settings["toolbar_style"] == QStringLiteral("GTK_TOOLBAR_TEXT")) { +- toolbarStyle = QStringLiteral("text"); +- } else if (m_settings["toolbar_style"] == QStringLiteral("GTK_TOOLBAR_BOTH")) { +- toolbarStyle = QStringLiteral("both"); +- } else if (m_settings["toolbar_style"] == QStringLiteral("GTK_TOOLBAR_BOTH_HORIZ")) { +- toolbarStyle = QStringLiteral("both-horiz"); +- } +- +- g_settings_set_string(gsettings, "toolbar-style", toolbarStyle.toUtf8().constData()); +- +- g_object_set(gtk_settings_get_default(), "gtk-application-prefer-dark-theme", getApplicationPreferDarkTheme(), nullptr); +- + auto cfg = KSharedConfig::openConfig(configFileName(), KConfig::NoGlobals); + return saveSettings(cfg); + } +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index e523444..4467f3b 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -2,7 +2,7 @@ macro(add_kgc_test name) + add_executable(${name} ${name}.cpp ${ARGV}) + add_test(${name} ${name}) + ecm_mark_as_test(${name}) +- target_link_libraries(${name} ${GIO2_LIBRARY} ${GLIB2_LIBRARY} ${GTK3_LIBRARY} ${GOBJECT2_LIBRARY} Qt5::Core Qt5::Gui Qt5::Test KF5::ConfigCore) ++ target_link_libraries(${name} Qt5::Core Qt5::Gui Qt5::Test KF5::ConfigCore) + target_include_directories(${name} PRIVATE ${CMAKE_BINARY_DIR}) + endmacro(add_kgc_test) + diff --git a/kde-plasma/kde-gtk-config/kde-gtk-config-5.12.5-r1.ebuild b/kde-plasma/kde-gtk-config/kde-gtk-config-5.12.5-r1.ebuild new file mode 100644 index 00000000..d34f057a --- /dev/null +++ b/kde-plasma/kde-gtk-config/kde-gtk-config-5.12.5-r1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +KDE_TEST="forceoptional" +VIRTUALX_REQUIRED="test" +inherit kde5 + +DESCRIPTION="KDE Plasma systemsettings kcm to set GTK application look&feel" +HOMEPAGE="https://cgit.kde.org/kde-gtk-config.git" +LICENSE="GPL-3" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="" + +DEPEND=" + $(add_frameworks_dep karchive) + $(add_frameworks_dep kcmutils) + $(add_frameworks_dep kconfigwidgets) + $(add_frameworks_dep kcoreaddons) + $(add_frameworks_dep ki18n) + $(add_frameworks_dep kiconthemes) + $(add_frameworks_dep kio) + $(add_frameworks_dep knewstuff) + $(add_frameworks_dep kwidgetsaddons) + $(add_qt_dep qtgui) + $(add_qt_dep qtwidgets) + dev-libs/glib:2 + x11-libs/gtk+:2 + x11-libs/gtk+:3 + x11-libs/libXcursor +" +RDEPEND="${DEPEND} + $(add_plasma_dep kde-cli-tools) + !kde-plasma/kde-gtk-config:4 +" + +PATCHES=( "${FILESDIR}"/redhat-or-not-go-dconf-and-flatpak-yourself-or-try-again-with-a-option-to-disable.patch ) + +src_configure() { + local mycmakeargs=( + -DDATA_INSTALL_DIR="${EPREFIX}/usr/share" + ) + + kde5_src_configure +} + +pkg_postinst() { + kde5_pkg_postinst + elog "If you notice missing icons in your GTK applications, you may have to install" + elog "the corresponding themes for GTK. A good guess would be x11-themes/oxygen-gtk" + elog "for example." +} diff --git a/kde-plasma/kde-gtk-config/kde-gtk-config-5.12.5.ebuild b/kde-plasma/kde-gtk-config/kde-gtk-config-5.12.5.ebuild deleted file mode 100644 index 13b77b96..00000000 --- a/kde-plasma/kde-gtk-config/kde-gtk-config-5.12.5.ebuild +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -KDE_TEST="forceoptional" -VIRTUALX_REQUIRED="test" -inherit kde5 - -DESCRIPTION="KDE Plasma systemsettings kcm to set GTK application look&feel" -HOMEPAGE="https://cgit.kde.org/kde-gtk-config.git" -LICENSE="GPL-3" -KEYWORDS="~amd64 ~arm ~x86" -IUSE="" - -DEPEND=" - $(add_frameworks_dep karchive) - $(add_frameworks_dep kcmutils) - $(add_frameworks_dep kconfigwidgets) - $(add_frameworks_dep kcoreaddons) - $(add_frameworks_dep ki18n) - $(add_frameworks_dep kiconthemes) - $(add_frameworks_dep kio) - $(add_frameworks_dep knewstuff) - $(add_frameworks_dep kwidgetsaddons) - $(add_qt_dep qtgui) - $(add_qt_dep qtwidgets) - dev-libs/glib:2 - gnome-base/gsettings-desktop-schemas - x11-libs/gtk+:2 - x11-libs/gtk+:3 - x11-libs/libXcursor -" -RDEPEND="${DEPEND} - $(add_plasma_dep kde-cli-tools) - !kde-plasma/kde-gtk-config:4 -" - -src_configure() { - local mycmakeargs=( - -DDATA_INSTALL_DIR="${EPREFIX}/usr/share" - ) - - kde5_src_configure -} - -pkg_postinst() { - kde5_pkg_postinst - elog "If you notice missing icons in your GTK applications, you may have to install" - elog "the corresponding themes for GTK. A good guess would be x11-themes/oxygen-gtk" - elog "for example." -} -- cgit v1.2.3