Bläddra i källkod

x11-themes/qtcurve: Add temporary ebuild to avoid https://bugs.kde.org/show_bug.cgi?id=368672

eegorov 8 år sedan
förälder
incheckning
f1b6226a00

+ 6 - 0
x11-themes/qtcurve/ChangeLog

@@ -2,6 +2,12 @@
 # Copyright 1999-2016 Gentoo Foundation; Distributed under the GPL v2
 # $Id$
 
+*qtcurve-9999-r0 (10 Oct 2016)
+
+  10 Oct 2016; eegorov <egor.y.egorov@gmail.com> +qtcurve-9999-r0.ebuild,
+  +files/qtcurve-remove-filedialog-hooks.patch:
+  Add temporary ebuild to avoid https://bugs.kde.org/show_bug.cgi?id=368672
+
   27 May 2016; eegorov <egor.y.egorov@gmail.com> qtcurve-9999-r1.ebuild:
   Migrate to EAPI=6
 

+ 88 - 0
x11-themes/qtcurve/files/qtcurve-remove-filedialog-hooks.patch

@@ -0,0 +1,88 @@
+diff --git a/qt4/style/qtcurve.cpp b/qt4/style/qtcurve.cpp
+index 8bc70cd..b4d737f 100644
+--- a/qt4/style/qtcurve.cpp
++++ b/qt4/style/qtcurve.cpp
+@@ -123,25 +123,6 @@
+ // TODO! REMOVE THIS WHEN KDE'S ICON SETTINGS ACTUALLY WORK!!!
+ #define FIX_DISABLED_ICONS
+ 
+-extern QString (*qt_filedialog_existing_directory_hook)(
+-    QWidget *parent, const QString &caption, const QString &dir,
+-    QFileDialog::Options options);
+-
+-extern QString (*qt_filedialog_open_filename_hook)(
+-    QWidget *parent, const QString &caption, const QString &dir,
+-    const QString &filter, QString *selectedFilter,
+-    QFileDialog::Options options);
+-
+-extern QStringList (*qt_filedialog_open_filenames_hook)(
+-    QWidget * parent, const QString &caption, const QString &dir,
+-    const QString &filter, QString *selectedFilter,
+-    QFileDialog::Options options);
+-
+-extern QString (*qt_filedialog_save_filename_hook)(
+-    QWidget *parent, const QString &caption, const QString &dir,
+-    const QString &filter, QString *selectedFilter,
+-    QFileDialog::Options options);
+-
+ namespace QtCurve {
+ 
+ static inline void
+@@ -1399,13 +1380,6 @@ void Style::polish(QApplication *app)
+         opts.menuBgndAppearance=APPEARANCE_FLAT;
+     }
+ 
+-    if (opts.useQtFileDialogApps.contains(appName)) {
+-        qt_filedialog_existing_directory_hook = 0L;
+-        qt_filedialog_open_filename_hook = 0L;
+-        qt_filedialog_open_filenames_hook = 0L;
+-        qt_filedialog_save_filename_hook = 0L;
+-    }
+-
+     BASE_STYLE::polish(app);
+     if (opts.hideShortcutUnderline) {
+         app->installEventFilter(itsShortcutHandler);
+diff --git a/qt5/style/qtcurve_api.cpp b/qt5/style/qtcurve_api.cpp
+index d724241..5495a62 100644
+--- a/qt5/style/qtcurve_api.cpp
++++ b/qt5/style/qtcurve_api.cpp
+@@ -69,25 +69,6 @@
+ 
+ #include <QDebug>
+ 
+-extern QString (*qt_filedialog_existing_directory_hook)(
+-    QWidget *parent, const QString &caption, const QString &dir,
+-    QFileDialog::Options options);
+-
+-extern QString (*qt_filedialog_open_filename_hook)(
+-    QWidget *parent, const QString &caption, const QString &dir,
+-    const QString &filter, QString *selectedFilter,
+-    QFileDialog::Options options);
+-
+-extern QStringList (*qt_filedialog_open_filenames_hook)(
+-    QWidget * parent, const QString &caption, const QString &dir,
+-    const QString &filter, QString *selectedFilter,
+-    QFileDialog::Options options);
+-
+-extern QString (*qt_filedialog_save_filename_hook)(
+-    QWidget *parent, const QString &caption, const QString &dir,
+-    const QString &filter, QString *selectedFilter,
+-    QFileDialog::Options options);
+-
+ namespace QtCurve {
+ 
+ void
+@@ -162,13 +143,6 @@ Style::polish(QApplication *app)
+         opts.menuBgndAppearance = APPEARANCE_FLAT;
+     }
+ 
+-    if (opts.useQtFileDialogApps.contains(appName)) {
+-        qt_filedialog_existing_directory_hook = 0L;
+-        qt_filedialog_open_filename_hook = 0L;
+-        qt_filedialog_open_filenames_hook = 0L;
+-        qt_filedialog_save_filename_hook = 0L;
+-    }
+-
+     BASE_STYLE::polish(app);
+     if (opts.hideShortcutUnderline) {
+         app->installEventFilter(itsShortcutHandler);

+ 112 - 0
x11-themes/qtcurve/qtcurve-9999-r0.ebuild

@@ -0,0 +1,112 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+KDE_REQUIRED="optional"
+inherit kde4-base
+KDE_AUTODEPS=false
+KDE_DEBUG=false
+KDE_HANDBOOK=false # needed for kde5.eclass, but misinterpreted by kde4-base.eclass
+inherit kde5 cmake-multilib
+
+DESCRIPTION="A set of widget styles for Qt and GTK2"
+HOMEPAGE="https://projects.kde.org/projects/playground/base/qtcurve"
+
+if [[ ${PV} == *9999* ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/eegorov/qtcurve.git"
+	EGIT_COMMIT=c1543d2f27e5ac6f6424537a53e3764233967e68
+	KEYWORDS=""
+else
+	SRC_URI="https://github.com/QtCurve/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
+		https://github.com/QtCurve/${PN}/commit/69047935dd4a9549d238cbc457e9c3cfa37386ae.patch -> ${P}-old_config_file.patch"
+	KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+X gtk kde kf5 nls +qt4 qt5 windeco"
+REQUIRED_USE="gtk? ( X )
+	kde? ( qt4 X )
+	kf5? ( qt5 )
+	windeco? ( kde )
+	|| ( gtk qt4 qt5 )"
+
+RDEPEND="X? ( x11-libs/libxcb[${MULTILIB_USEDEP}]
+		x11-libs/libX11[${MULTILIB_USEDEP}]
+		x11-libs/xcb-util-image[${MULTILIB_USEDEP}] )
+	gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
+	qt4? ( dev-qt/qtdbus:4[${MULTILIB_USEDEP}]
+		dev-qt/qtgui:4[${MULTILIB_USEDEP}]
+		dev-qt/qtsvg:4[${MULTILIB_USEDEP}] )
+	qt5? ( dev-qt/qtdeclarative:5
+		dev-qt/qtgui:5
+		dev-qt/qtsvg:5
+		dev-qt/qtwidgets:5
+		X? ( dev-qt/qtdbus:5
+			dev-qt/qtx11extras:5 ) )
+	kde? ( $(add_kdebase_dep systemsettings)
+		windeco? ( $(add_kdebase_dep kwin) ) )
+	kf5? ( $(add_frameworks_dep extra-cmake-modules)
+		$(add_frameworks_dep karchive)
+		$(add_frameworks_dep kconfig)
+		$(add_frameworks_dep kconfigwidgets)
+		$(add_frameworks_dep ki18n)
+		$(add_frameworks_dep kdelibs4support)
+		$(add_frameworks_dep kio)
+		$(add_frameworks_dep kwidgetsaddons)
+		$(add_frameworks_dep kxmlgui) )
+	!x11-themes/gtk-engines-qtcurve"
+DEPEND="${RDEPEND}
+	virtual/pkgconfig
+	nls? ( sys-devel/gettext )"
+
+DOCS=( AUTHORS ChangeLog.md README.md TODO.md )
+
+[[ ${PV} == *9999* ]] || PATCHES=( "${DISTDIR}/${P}-old_config_file.patch" )
+PATCHES+=(
+	"${FILESDIR}/qtcurve-remove-filedialog-hooks.patch"
+)
+
+pkg_pretend() {
+	if [[ "$(multilib_get_enabled_abis)" != "${DEFAULT_ABI}" ]]; then
+		use qt5 && elog "Qt5 is not (yet) multilib-aware, qtcurve will be built for Qt5 with native ABI only"
+		use kde && elog "KDE is not (yet) multilib-aware, qtcurve will be built for KDE with native ABI only"
+		use kf5 && elog "KF5 is not (yet) multilib-aware, qtcurve will be built for KF5 with native ABI only"
+	fi
+}
+
+pkg_setup() {
+	use kde && kde4-base_pkg_setup
+}
+
+multilib_src_configure() {
+	local mycmakeargs
+
+	if multilib_is_native_abi; then
+		mycmakeargs=(
+			-DQTC_QT4_ENABLE_KDE=$(usex kde)
+			-DQTC_QT4_ENABLE_KWIN=$(usex windeco)
+			-DENABLE_QT5=$(usex qt5)
+			-QTC_QT5_ENABLE_KDE=$(usex kf5)
+		)
+	else
+		mycmakeargs=(
+			-DQTC_QT4_ENABLE_KDE=OFF
+			-DQTC_QT4_ENABLE_KWIN=OFF
+			-DQTC_QT5_ENABLE_KDE=OFF
+			-DENABLE_QT5=OFF
+		)
+	fi
+
+	mycmakeargs+=(
+		-DLIB_INSTALL_DIR=/usr/$(get_libdir)
+		-DENABLE_GTK2=$(usex gtk)
+		-DENABLE_QT4=$(usex qt4)
+		-DQTC_ENABLE_X11=$(usex X)
+		$(is_final_abi && usex nls && echo -DQTC_INSTALL_PO=ON || echo -DQTC_INSTALL_PO=OFF)
+	)
+	cmake-utils_src_configure
+}