From dc45b83b28fb83e9659492066e347b8dc60bc9e3 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 4 Feb 2018 12:30:23 +0000 Subject: gentoo resync 04.02.2018 --- dev-qt/qtgui/Manifest | 4 + dev-qt/qtgui/files/qtgui-5.9.4-qsimpledrag.patch | 170 ++++++++++++++++++++++ dev-qt/qtgui/qtgui-5.9.4-r1.ebuild | 173 +++++++++++++++++++++++ dev-qt/qtgui/qtgui-5.9.4.ebuild | 169 ++++++++++++++++++++++ 4 files changed, 516 insertions(+) create mode 100644 dev-qt/qtgui/files/qtgui-5.9.4-qsimpledrag.patch create mode 100644 dev-qt/qtgui/qtgui-5.9.4-r1.ebuild create mode 100644 dev-qt/qtgui/qtgui-5.9.4.ebuild (limited to 'dev-qt/qtgui') diff --git a/dev-qt/qtgui/Manifest b/dev-qt/qtgui/Manifest index c5afb9982af2..0db86677415a 100644 --- a/dev-qt/qtgui/Manifest +++ b/dev-qt/qtgui/Manifest @@ -3,11 +3,15 @@ AUX qtgui-4.8.5-disable-gtk-theme-check.patch 1166 BLAKE2B 638fa282166a5ede48ff2 AUX qtgui-4.8.5-qclipboard-delay.patch 1135 BLAKE2B 5972ab258ba5c60346f83a0c402edd39ea3c1fa777c59c6691e793d300956f1d966f37f6f35c187c95074872f8ccfb4b4cac8b255da462ddd3744cc67bc21108 SHA512 00c901fc9b9bd5b8ce45e8bb4dd4eda8832df7eda104ae1614d7cdac681d23f0daad543d0480f1d9366e2644833db680e0526660472a6cf1a907b803acf76517 AUX qtgui-5.7.1-qclipboard.patch 1791 BLAKE2B a7753b78631bab6774ab5bd20deba153ee44dd41202531824571ff0596f9b731958b125a75fe464d8039bc327e5588f53f70b3be4c5a4eb640bf77af554d5552 SHA512 c765e7f1cf2e10b4fa90b2c4e3a4a39c9001996d4837eb86c1d298531dd30fc1f6a215addfd1bec88526451d7b2ff3ba8a53a330776c94851e79b1964336759c AUX qtgui-5.7.1-x32.patch 1161 BLAKE2B 5d475369d8a6312f0a2ab205b64739c9d7fd8b44132b10b00d29fb774ad837c45d6f50b4af776f7fa5fc2b19de9068922d1df5951084c5770e8a23f57b14f9c9 SHA512 61f6cc40c2897e17c0a71cb1d79bf8e6c69cbacf6409ae0d96f485584bd6a930484ecff709c208ca78335418e022c68151d096505f5db2179cb6c4c8b065c116 +AUX qtgui-5.9.4-qsimpledrag.patch 6887 BLAKE2B 9da87acfe69c1cb8b1dd92b05a7b919d01227d0aa1316adfe97261bd59a7e0eb3b1e6d9b0896cc2f6a6a64eac3f31f72039a3acc2767998a668656acc8d8ffc2 SHA512 8229b87a40287c3c6e74d5aec9bfc346a1e0f7002687ba661573566ff5f700c99819850fc97f07d3a36d63ba83348f2ab315f835e44abce22242b4d1f29e7c7b DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 BLAKE2B 6e9b8870692c36e894dc401b65fa38961cf7d033cd712770c273fd45b3221720648087c53787eae7d455c417d64e09f716da48377837fb5f2b52b901d06b1cf3 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 DIST qtbase-opensource-src-5.7.1.tar.xz 44992616 BLAKE2B d845ff8316f6f91089e23b74c025ad8e6160eb7ba75017cba34c2ad2f7b475fc4e36d337b945935bc2850bd140d743b9a5e3d23399b6d3151b85109da9f56ba8 SHA512 0506a3a856f76e5ba182e3382a515282b6096f3900fbdc14cd5aec425105ab61922e0ada0361234387335ceb80b3c69e39cd34d75476c2946c4371e7b8c0827f DIST qtbase-opensource-src-5.9.3.tar.xz 45160080 BLAKE2B 234eb778c90b5867ae53129da010968563d3fa66fe87e3ad50d2d4e968ecbf41812270a66c24fce27b318a7c6b5be90e518ee1b6bb14fb11985f2269a708899c SHA512 256ffb8760e94c0f87790ed35e210d0c9613e14314ff442dd763cc93fbd5caa6c11c95f5d44b12a7687fb93c9f857878132cf6d76e5933f647ca7beb54b18c7c +DIST qtbase-opensource-src-5.9.4.tar.xz 45182168 BLAKE2B 39ecddf2b767c68a9b91e0af10ff3b94ea6074803d22a2fdd3802d32a001ebc302e323b5012fb14b881bf89d031f011d383d3f76f6d28bdeaed61a5bac4f9ce0 SHA512 82be3af6cbe83458a17a5dc53b9f57e56d9c1dbc1bae11e36c5a44e11b1f4cf62ef609cb775f55bfad7be38fbfeffc9cf12dd557bf7c64cbd26634c024a394dd DIST qtgui-systemtrayicon-plugin-system.patch 51377 BLAKE2B 2b57d485c9ceb2b7e23cd6f8aa3be955e70d779ab0ca849148435e2a212a2db48948dc689c06eb8aea484513081df56d86584cb98ad4d64fb86ceb15eb802f38 SHA512 0d74b61e23af2e8ef0619ee616c4b775761514f53ba79bcb25b32b7e55beab3575c0d279ba1b016498804023bb78f8cff61964ce56f80642f648406f7c303679 EBUILD qtgui-4.8.7.ebuild 5656 BLAKE2B 4f91f3c72d65000c97d04dbc443b0a1214486f0c429a70592d19cc338ebca5052fe52a3b0a68f30094fa0610b85ef6ad9fc0a7899211cfc22b9515f579f6fddf SHA512 2298d7ef9176166dd21f24ce690c61d7ae4c0d5016908a9c4119f1c8f66a51d143cddf8f6b5bb4232815f5e2bf842abe0de72432bd487629b3cb6ca938d7cee7 EBUILD qtgui-5.7.1-r1.ebuild 3792 BLAKE2B 0a65c076358bcacde64a74df90e471d4fdde27308b88556c7dc66563f9ffaafae2cf2d073cfd6232a31a488f240f357960a9daa8989c203bc904b710b8d7555f SHA512 f8d57932f30b17ea72cdebe7aa268e022df15a29bc3c3e2789f8c68b54a29e89d8c9b9a489cd6d5492e88dbc6f35cd9872d02ce920ef7b8d17878bfbfee10a7e EBUILD qtgui-5.9.3.ebuild 3501 BLAKE2B 44db6447d096a35dc08e6faf86fd7b72c311710daa7c0804bb4ea97b44b4a063c7b44cdf20cfe5c1c0fb2caa060327453d66d023c7a3e3e2afed3f00742bc9e5 SHA512 9c770692dab57be3a295ef287885928ae337ddc4aa0976147be3b808e9b2b8ff1700de8a2f2250eb503e51d4f0aafed64073e7cb035540fae0a836e3294b2b8f +EBUILD qtgui-5.9.4-r1.ebuild 3610 BLAKE2B 0b8403f242e97209bca6e2fad465b878d24be22e1616b5b30c01a15c6ff08de8843eaffdc7e3b3c74ab942c2b8a4e77ea833a529740801a3b878a39672ca53ab SHA512 03d925259cfee10866fecebf77db94f022c29e28321668c28ac7a29aad4eae444e30084ef8871161821f520f54dbec609f1298931ab57dda1b9a8a20222f8041 +EBUILD qtgui-5.9.4.ebuild 3545 BLAKE2B fb542e056bdc514c590b44916fe4b0cd7abbe482e5c01a684414a75071bfada21aa1af2ebdda35ded51f9aac4ef065411ba9e7f5ddddb818980479ff4205076e SHA512 5a23e97f9b44365c28ebc73cfde6f2656c78a2b0fa18073f4107e2bec61b4147771cf8a87f59f29e8ae39385a389f92150b7881a54b6ceb9fb45b110b5221df0 MISC metadata.xml 1862 BLAKE2B 062b123eab07ca09b1b6d63a9ce814a921b523c1861552a4f12903ccc8f627cf78e240d322c52b3a404ff154822a9cb42f894da5bc74a924d89dd51a42576115 SHA512 cba45629873eba71f152885640e51ad324b0dbb702c45811b4a1785a0af3baa7ce39923dfd0dbf7748d604e9a053d6580defdad75ad5ae228d37424d9b54e530 diff --git a/dev-qt/qtgui/files/qtgui-5.9.4-qsimpledrag.patch b/dev-qt/qtgui/files/qtgui-5.9.4-qsimpledrag.patch new file mode 100644 index 000000000000..60d2ec424f47 --- /dev/null +++ b/dev-qt/qtgui/files/qtgui-5.9.4-qsimpledrag.patch @@ -0,0 +1,170 @@ +From 4a7771f206d4b29be549d3827c36a46679d90de6 Mon Sep 17 00:00:00 2001 +From: Eike Hein +Date: Sun, 7 Jan 2018 13:02:01 +0900 +Subject: [PATCH] QSimpleDrag: Fix mouse release coords for delayed event + transmission + +On platforms such as XCB, the drag cursor pixmap is shown via a window +(a QShapedPixmapWindow) under the cursor. + +The mouse button release event at the end of the drag is received in +this QXcbWindow, but intercepted by an event filter that QSimpleDrag +installs on the QApplication. It then resends it unmodified(!) after +the drag has ended and the drag pixmap window destroyed, causing it to +be delivered to the new top-level window. + +The local coordinates in the unmodified QMouseEvent are local to the +drag pixmap window and don't match the window it is delayed-transmitted +to. + +This ends up having fatal, user-visible effects particularly in Qt +Quick: QQuickWindow synthesizes a hover event once per frame using +the last received mouse coordinates, here: the release posted by +QSimpleDrag. This is done to update the hover event state for items +under the cursor when the mouse hasn't moved (e.g. QQuickMouseArea:: +containsMouse). The bogus event coordinates in the release event then +usually end up causing an item near the top-left of the QQuickWindow +to assume it is hovered (because drag pixmap windows tend to be small), +even when the mouse cursor is actually far away from it at the end of +the drag. + +This shows up e.g. in the Plasma 5 desktop, where dragging an icon +on the desktop will cause the icon at the top-left of the screen (if +any) to switch to hovered state, as the release coordinates on the +drag pixmap window (showing a dragged icon) fall into the geometry +of the top-left icon. + +QSimpleDrag contains a topLevelAt() function to find the top-level +window under the global cursor coordinates that is not the drag +pixmap window. This is used by the drop event delivery code. + +This patch uses this function to find the relevant top-level window, +then asks it to map the global cusor coordinates to its local +coordinate system, then synthesizes a new QMouseEvent with local +coordinates computed in this fashion. As a result the window now +gets a release event with coordinates that make sense and are +correct. + +Task-number: QTBUG-66103 +Change-Id: I04ebe6ccd4a991fdd4b540ff0227973ea8896a9d +Reviewed-by: Eike Hein +Reviewed-by: Shawn Rutledge +--- + src/gui/kernel/qsimpledrag.cpp | 32 +++++++++++++++++++++++++++----- + src/gui/kernel/qsimpledrag_p.h | 6 +++--- + 2 files changed, 30 insertions(+), 8 deletions(-) + +diff --git a/src/gui/kernel/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp +index a1e25dc..87d3ba5 100644 +--- a/src/gui/kernel/qsimpledrag.cpp ++++ b/src/gui/kernel/qsimpledrag.cpp +@@ -58,6 +58,7 @@ + + #include + #include ++#include + + #include + #include +@@ -69,6 +70,8 @@ QT_BEGIN_NAMESPACE + + #ifndef QT_NO_DRAGANDDROP + ++Q_LOGGING_CATEGORY(lcDnd, "qt.gui.dnd") ++ + static QWindow* topLevelAt(const QPoint &pos) + { + QWindowList list = QGuiApplication::topLevelWindows(); +@@ -94,10 +97,10 @@ static QWindow* topLevelAt(const QPoint &pos) + */ + + QBasicDrag::QBasicDrag() : +- m_restoreCursor(false), m_eventLoop(0), ++ m_current_window(nullptr), m_restoreCursor(false), m_eventLoop(nullptr), + m_executed_drop_action(Qt::IgnoreAction), m_can_drop(false), +- m_drag(0), m_drag_icon_window(0), m_useCompositing(true), +- m_screen(Q_NULLPTR) ++ m_drag(nullptr), m_drag_icon_window(nullptr), m_useCompositing(true), ++ m_screen(nullptr) + { + } + +@@ -161,6 +164,7 @@ bool QBasicDrag::eventFilter(QObject *o, QEvent *e) + return true; // Eat all mouse move events + } + case QEvent::MouseButtonRelease: ++ { + disableEventFilter(); + if (canDrop()) { + QPoint nativePosition = getNativeMousePos(e, m_drag_icon_window); +@@ -169,8 +173,25 @@ bool QBasicDrag::eventFilter(QObject *o, QEvent *e) + cancel(); + } + exitDndEventLoop(); +- QCoreApplication::postEvent(o, new QMouseEvent(*static_cast(e))); ++ ++ // If a QShapedPixmapWindow (drag feedback) is being dragged along, the ++ // mouse event's localPos() will be relative to that, which is useless. ++ // We want a position relative to the window where the drag ends, if possible (?). ++ // If there is no such window (belonging to this Qt application), ++ // make the event relative to the window where the drag started. (QTBUG-66103) ++ const QMouseEvent *release = static_cast(e); ++ const QWindow *releaseWindow = topLevelAt(release->globalPos()); ++ qCDebug(lcDnd) << "mouse released over" << releaseWindow << "after drag from" << m_current_window << "globalPos" << release->globalPos(); ++ if (!releaseWindow) ++ releaseWindow = m_current_window; ++ QPoint releaseWindowPos = (releaseWindow ? releaseWindow->mapFromGlobal(release->globalPos()) : release->globalPos()); ++ QMouseEvent *newRelease = new QMouseEvent(release->type(), ++ releaseWindowPos, releaseWindowPos, release->screenPos(), ++ release->button(), release->buttons(), ++ release->modifiers(), release->source()); ++ QCoreApplication::postEvent(o, newRelease); + return true; // defer mouse release events until drag event loop has returned ++ } + case QEvent::MouseButtonDblClick: + case QEvent::Wheel: + return true; +@@ -349,7 +370,7 @@ static inline QPoint fromNativeGlobalPixels(const QPoint &point) + into account. + */ + +-QSimpleDrag::QSimpleDrag() : m_current_window(0) ++QSimpleDrag::QSimpleDrag() + { + } + +@@ -373,6 +394,7 @@ void QSimpleDrag::startDrag() + updateCursor(Qt::IgnoreAction); + } + setExecutedDropAction(Qt::IgnoreAction); ++ qCDebug(lcDnd) << "drag began from" << m_current_window<< "cursor pos" << QCursor::pos() << "can drop?" << canDrop(); + } + + void QSimpleDrag::cancel() +diff --git a/src/gui/kernel/qsimpledrag_p.h b/src/gui/kernel/qsimpledrag_p.h +index 0b8a0bc..bbd7f7f 100644 +--- a/src/gui/kernel/qsimpledrag_p.h ++++ b/src/gui/kernel/qsimpledrag_p.h +@@ -105,6 +105,9 @@ protected: + + QDrag *drag() const { return m_drag; } + ++protected: ++ QWindow *m_current_window; ++ + private: + void enableEventFilter(); + void disableEventFilter(); +@@ -132,9 +135,6 @@ protected: + virtual void cancel() Q_DECL_OVERRIDE; + virtual void move(const QPoint &globalPos) Q_DECL_OVERRIDE; + virtual void drop(const QPoint &globalPos) Q_DECL_OVERRIDE; +- +-private: +- QWindow *m_current_window; + }; + + #endif // QT_NO_DRAGANDDROP +-- +2.7.4 + diff --git a/dev-qt/qtgui/qtgui-5.9.4-r1.ebuild b/dev-qt/qtgui/qtgui-5.9.4-r1.ebuild new file mode 100644 index 000000000000..97069b8f2c4e --- /dev/null +++ b/dev-qt/qtgui/qtgui-5.9.4-r1.ebuild @@ -0,0 +1,173 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +QT5_MODULE="qtbase" +inherit qt5-build + +DESCRIPTION="The GUI module and platform plugins for the Qt5 framework" + +if [[ ${QT5_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86" +fi + +# TODO: linuxfb + +IUSE="accessibility dbus egl eglfs evdev +gif gles2 ibus + jpeg +libinput +png tslib tuio +udev vnc +xcb" +REQUIRED_USE=" + || ( eglfs xcb ) + accessibility? ( dbus xcb ) + eglfs? ( egl ) + ibus? ( dbus ) + libinput? ( udev ) + xcb? ( gles2? ( egl ) ) +" + +RDEPEND=" + dev-libs/glib:2 + ~dev-qt/qtcore-${PV} + media-libs/fontconfig + >=media-libs/freetype-2.6.1:2 + >=media-libs/harfbuzz-1.0.6:= + >=sys-libs/zlib-1.2.5 + virtual/opengl + dbus? ( ~dev-qt/qtdbus-${PV} ) + egl? ( media-libs/mesa[egl] ) + eglfs? ( + media-libs/mesa[gbm] + x11-libs/libdrm + ) + evdev? ( sys-libs/mtdev ) + gles2? ( media-libs/mesa[gles2] ) + jpeg? ( virtual/jpeg:0 ) + libinput? ( + dev-libs/libinput:= + x11-libs/libxkbcommon + ) + png? ( media-libs/libpng:0= ) + tslib? ( x11-libs/tslib ) + tuio? ( ~dev-qt/qtnetwork-${PV} ) + udev? ( virtual/libudev:= ) + vnc? ( ~dev-qt/qtnetwork-${PV} ) + xcb? ( + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + >=x11-libs/libXi-1.7.5 + >=x11-libs/libxcb-1.10:=[xkb] + >=x11-libs/libxkbcommon-0.4.1[X] + x11-libs/xcb-util-image + x11-libs/xcb-util-keysyms + x11-libs/xcb-util-renderutil + x11-libs/xcb-util-wm + ) +" +DEPEND="${RDEPEND} + evdev? ( sys-kernel/linux-headers ) + udev? ( sys-kernel/linux-headers ) +" +PDEPEND=" + ibus? ( app-i18n/ibus ) +" + +PATCHES=( + "${FILESDIR}/${P}-qsimpledrag.patch" # QTBUG-66103 +) + +QT5_TARGET_SUBDIRS=( + src/gui + src/openglextensions + src/platformheaders + src/platformsupport + src/plugins/generic + src/plugins/imageformats + src/plugins/platforms + src/plugins/platforminputcontexts +) + +QT5_GENTOO_CONFIG=( + accessibility:accessibility-atspi-bridge + egl + eglfs + eglfs:eglfs_egldevice: + eglfs:eglfs_gbm: + evdev + evdev:mtdev: + :fontconfig + :system-freetype:FREETYPE + !:no-freetype: + !gif:no-gif: + gles2::OPENGL_ES + gles2:opengles2:OPENGL_ES_2 + !:no-gui: + :system-harfbuzz:HARFBUZZ + !:no-harfbuzz: + jpeg:system-jpeg:IMAGEFORMAT_JPEG + !jpeg:no-jpeg: + libinput + libinput:xkbcommon-evdev: + :opengl + png:png: + png:system-png:IMAGEFORMAT_PNG + !png:no-png: + tslib + udev:libudev: + xcb:xcb: + xcb:xcb-glx: + xcb:xcb-plugin: + xcb:xcb-render: + xcb:xcb-sm: + xcb:xcb-xlib: + xcb:xinput2: + xcb::XKB +) + +QT5_GENTOO_PRIVATE_CONFIG=( + :gui +) + +src_prepare() { + # egl_x11 is activated when both egl and xcb are enabled + use egl && QT5_GENTOO_CONFIG+=(xcb:egl_x11) || QT5_GENTOO_CONFIG+=(egl:egl_x11) + + qt_use_disable_config dbus dbus \ + src/platformsupport/themes/genericunix/genericunix.pri + + qt_use_disable_config tuio udpsocket src/plugins/generic/generic.pro + + qt_use_disable_mod ibus dbus \ + src/plugins/platforminputcontexts/platforminputcontexts.pro + + use vnc || sed -i -e '/SUBDIRS += vnc/d' \ + src/plugins/platforms/platforms.pro || die + + qt5-build_src_prepare +} + +src_configure() { + local myconf=( + $(usex dbus -dbus-linked '') + $(qt_use egl) + $(qt_use eglfs) + $(usex eglfs '-gbm -kms' '') + $(qt_use evdev) + $(qt_use evdev mtdev) + -fontconfig + -system-freetype + $(usex gif '' -no-gif) + -gui + -system-harfbuzz + $(qt_use jpeg libjpeg system) + $(qt_use libinput) + $(qt_use libinput xkbcommon-evdev) + -opengl $(usex gles2 es2 desktop) + $(qt_use png libpng system) + $(qt_use tslib) + $(qt_use udev libudev) + $(qt_use xcb xcb system) + $(qt_use xcb xkbcommon-x11 system) + $(usex xcb '-xcb-xlib -xinput2 -xkb' '') + ) + qt5-build_src_configure +} diff --git a/dev-qt/qtgui/qtgui-5.9.4.ebuild b/dev-qt/qtgui/qtgui-5.9.4.ebuild new file mode 100644 index 000000000000..16af003c8d1f --- /dev/null +++ b/dev-qt/qtgui/qtgui-5.9.4.ebuild @@ -0,0 +1,169 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +QT5_MODULE="qtbase" +inherit qt5-build + +DESCRIPTION="The GUI module and platform plugins for the Qt5 framework" + +if [[ ${QT5_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86" +fi + +# TODO: linuxfb + +IUSE="accessibility dbus egl eglfs evdev +gif gles2 ibus + jpeg +libinput +png tslib tuio +udev vnc +xcb" +REQUIRED_USE=" + || ( eglfs xcb ) + accessibility? ( dbus xcb ) + eglfs? ( egl ) + ibus? ( dbus ) + libinput? ( udev ) + xcb? ( gles2? ( egl ) ) +" + +RDEPEND=" + dev-libs/glib:2 + ~dev-qt/qtcore-${PV} + media-libs/fontconfig + >=media-libs/freetype-2.6.1:2 + >=media-libs/harfbuzz-1.0.6:= + >=sys-libs/zlib-1.2.5 + virtual/opengl + dbus? ( ~dev-qt/qtdbus-${PV} ) + egl? ( media-libs/mesa[egl] ) + eglfs? ( + media-libs/mesa[gbm] + x11-libs/libdrm + ) + evdev? ( sys-libs/mtdev ) + gles2? ( media-libs/mesa[gles2] ) + jpeg? ( virtual/jpeg:0 ) + libinput? ( + dev-libs/libinput:= + x11-libs/libxkbcommon + ) + png? ( media-libs/libpng:0= ) + tslib? ( x11-libs/tslib ) + tuio? ( ~dev-qt/qtnetwork-${PV} ) + udev? ( virtual/libudev:= ) + vnc? ( ~dev-qt/qtnetwork-${PV} ) + xcb? ( + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + >=x11-libs/libXi-1.7.5 + >=x11-libs/libxcb-1.10:=[xkb] + >=x11-libs/libxkbcommon-0.4.1[X] + x11-libs/xcb-util-image + x11-libs/xcb-util-keysyms + x11-libs/xcb-util-renderutil + x11-libs/xcb-util-wm + ) +" +DEPEND="${RDEPEND} + evdev? ( sys-kernel/linux-headers ) + udev? ( sys-kernel/linux-headers ) +" +PDEPEND=" + ibus? ( app-i18n/ibus ) +" + +QT5_TARGET_SUBDIRS=( + src/gui + src/openglextensions + src/platformheaders + src/platformsupport + src/plugins/generic + src/plugins/imageformats + src/plugins/platforms + src/plugins/platforminputcontexts +) + +QT5_GENTOO_CONFIG=( + accessibility:accessibility-atspi-bridge + egl + eglfs + eglfs:eglfs_egldevice: + eglfs:eglfs_gbm: + evdev + evdev:mtdev: + :fontconfig + :system-freetype:FREETYPE + !:no-freetype: + !gif:no-gif: + gles2::OPENGL_ES + gles2:opengles2:OPENGL_ES_2 + !:no-gui: + :system-harfbuzz:HARFBUZZ + !:no-harfbuzz: + jpeg:system-jpeg:IMAGEFORMAT_JPEG + !jpeg:no-jpeg: + libinput + libinput:xkbcommon-evdev: + :opengl + png:png: + png:system-png:IMAGEFORMAT_PNG + !png:no-png: + tslib + udev:libudev: + xcb:xcb: + xcb:xcb-glx: + xcb:xcb-plugin: + xcb:xcb-render: + xcb:xcb-sm: + xcb:xcb-xlib: + xcb:xinput2: + xcb::XKB +) + +QT5_GENTOO_PRIVATE_CONFIG=( + :gui +) + +src_prepare() { + # egl_x11 is activated when both egl and xcb are enabled + use egl && QT5_GENTOO_CONFIG+=(xcb:egl_x11) || QT5_GENTOO_CONFIG+=(egl:egl_x11) + + qt_use_disable_config dbus dbus \ + src/platformsupport/themes/genericunix/genericunix.pri + + qt_use_disable_config tuio udpsocket src/plugins/generic/generic.pro + + qt_use_disable_mod ibus dbus \ + src/plugins/platforminputcontexts/platforminputcontexts.pro + + use vnc || sed -i -e '/SUBDIRS += vnc/d' \ + src/plugins/platforms/platforms.pro || die + + qt5-build_src_prepare +} + +src_configure() { + local myconf=( + $(usex dbus -dbus-linked '') + $(qt_use egl) + $(qt_use eglfs) + $(usex eglfs '-gbm -kms' '') + $(qt_use evdev) + $(qt_use evdev mtdev) + -fontconfig + -system-freetype + $(usex gif '' -no-gif) + -gui + -system-harfbuzz + $(qt_use jpeg libjpeg system) + $(qt_use libinput) + $(qt_use libinput xkbcommon-evdev) + -opengl $(usex gles2 es2 desktop) + $(qt_use png libpng system) + $(qt_use tslib) + $(qt_use udev libudev) + $(qt_use xcb xcb system) + $(qt_use xcb xkbcommon-x11 system) + $(usex xcb '-xcb-xlib -xinput2 -xkb' '') + ) + qt5-build_src_configure +} -- cgit v1.2.3