summaryrefslogtreecommitdiff
path: root/dev-qt
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-qt
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-qt')
-rw-r--r--dev-qt/assistant/Manifest4
-rw-r--r--dev-qt/assistant/assistant-4.8.5.ebuild65
-rw-r--r--dev-qt/assistant/assistant-4.8.6-r1.ebuild57
-rw-r--r--dev-qt/assistant/assistant-4.8.7.ebuild54
-rw-r--r--dev-qt/assistant/assistant-5.4.2.ebuild38
-rw-r--r--dev-qt/assistant/files/assistant-4.8.2+gcc-4.7.patch12
-rw-r--r--dev-qt/assistant/files/disable-webkit.patch26
-rw-r--r--dev-qt/assistant/metadata.xml13
-rw-r--r--dev-qt/designer/Manifest4
-rw-r--r--dev-qt/designer/designer-4.8.5.ebuild84
-rw-r--r--dev-qt/designer/designer-4.8.6-r1.ebuild61
-rw-r--r--dev-qt/designer/designer-4.8.7.ebuild58
-rw-r--r--dev-qt/designer/designer-5.4.2.ebuild41
-rw-r--r--dev-qt/designer/metadata.xml17
-rw-r--r--dev-qt/linguist-tools/Manifest1
-rw-r--r--dev-qt/linguist-tools/linguist-tools-5.4.2.ebuild36
-rw-r--r--dev-qt/linguist-tools/metadata.xml12
-rw-r--r--dev-qt/linguist/Manifest4
-rw-r--r--dev-qt/linguist/linguist-4.8.5.ebuild51
-rw-r--r--dev-qt/linguist/linguist-4.8.6-r1.ebuild43
-rw-r--r--dev-qt/linguist/linguist-4.8.7.ebuild40
-rw-r--r--dev-qt/linguist/linguist-5.4.2.ebuild29
-rw-r--r--dev-qt/linguist/metadata.xml13
-rw-r--r--dev-qt/metadata.xml14
-rw-r--r--dev-qt/pixeltool/Manifest4
-rw-r--r--dev-qt/pixeltool/metadata.xml13
-rw-r--r--dev-qt/pixeltool/pixeltool-4.8.5.ebuild45
-rw-r--r--dev-qt/pixeltool/pixeltool-4.8.6-r1.ebuild36
-rw-r--r--dev-qt/pixeltool/pixeltool-4.8.7.ebuild33
-rw-r--r--dev-qt/pixeltool/pixeltool-5.4.2.ebuild27
-rw-r--r--dev-qt/qdbus/Manifest1
-rw-r--r--dev-qt/qdbus/metadata.xml9
-rw-r--r--dev-qt/qdbus/qdbus-5.4.2.ebuild26
-rw-r--r--dev-qt/qdbusviewer/Manifest4
-rw-r--r--dev-qt/qdbusviewer/metadata.xml13
-rw-r--r--dev-qt/qdbusviewer/qdbusviewer-4.8.5.ebuild51
-rw-r--r--dev-qt/qdbusviewer/qdbusviewer-4.8.6-r1.ebuild43
-rw-r--r--dev-qt/qdbusviewer/qdbusviewer-4.8.7.ebuild40
-rw-r--r--dev-qt/qdbusviewer/qdbusviewer-5.4.2.ebuild28
-rw-r--r--dev-qt/qdoc/Manifest1
-rw-r--r--dev-qt/qdoc/metadata.xml9
-rw-r--r--dev-qt/qdoc/qdoc-5.4.2.ebuild25
-rw-r--r--dev-qt/qt-creator/Manifest3
-rw-r--r--dev-qt/qt-creator/metadata.xml33
-rw-r--r--dev-qt/qt-creator/qt-creator-2.8.1.ebuild122
-rw-r--r--dev-qt/qt-creator/qt-creator-3.2.2.ebuild130
-rw-r--r--dev-qt/qt-creator/qt-creator-3.4.2.ebuild150
-rw-r--r--dev-qt/qt-docs/Manifest2
-rw-r--r--dev-qt/qt-docs/metadata.xml9
-rw-r--r--dev-qt/qt-docs/qt-docs-5.4.2_p0.ebuild32
-rw-r--r--dev-qt/qt-docs/qt-docs-5.5.0_p0.ebuild32
-rw-r--r--dev-qt/qt-meta/metadata.xml10
-rw-r--r--dev-qt/qt-meta/qt-meta-4.8.5.ebuild41
-rw-r--r--dev-qt/qt-mobility/Manifest1
-rw-r--r--dev-qt/qt-mobility/metadata.xml29
-rw-r--r--dev-qt/qt-mobility/qt-mobility-1.2.2_p20130703-r1.ebuild151
-rw-r--r--dev-qt/qt3support/Manifest3
-rw-r--r--dev-qt/qt3support/metadata.xml13
-rw-r--r--dev-qt/qt3support/qt3support-4.8.5.ebuild45
-rw-r--r--dev-qt/qt3support/qt3support-4.8.6-r1.ebuild37
-rw-r--r--dev-qt/qt3support/qt3support-4.8.7.ebuild34
-rw-r--r--dev-qt/qtbearer/Manifest3
-rw-r--r--dev-qt/qtbearer/metadata.xml13
-rw-r--r--dev-qt/qtbearer/qtbearer-4.8.5.ebuild58
-rw-r--r--dev-qt/qtbearer/qtbearer-4.8.6-r1.ebuild47
-rw-r--r--dev-qt/qtbearer/qtbearer-4.8.7.ebuild44
-rw-r--r--dev-qt/qtchooser/Manifest1
-rw-r--r--dev-qt/qtchooser/metadata.xml5
-rw-r--r--dev-qt/qtchooser/qtchooser-0_p20150102.ebuild77
-rw-r--r--dev-qt/qtconcurrent/Manifest1
-rw-r--r--dev-qt/qtconcurrent/metadata.xml9
-rw-r--r--dev-qt/qtconcurrent/qtconcurrent-5.4.2.ebuild24
-rw-r--r--dev-qt/qtcore/Manifest4
-rw-r--r--dev-qt/qtcore/files/CVE-2013-4549-01-disallow-deep-or-widely-nested-entity-refs.patch114
-rw-r--r--dev-qt/qtcore/files/CVE-2013-4549-02-fully-expand-entities.patch124
-rw-r--r--dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch81
-rw-r--r--dev-qt/qtcore/files/qtcore-4.8.5-moc-boost-lexical-cast.patch12
-rw-r--r--dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch94
-rw-r--r--dev-qt/qtcore/files/qtcore-4.8.6-QNAM-corruptions-fix.patch431
-rw-r--r--dev-qt/qtcore/metadata.xml16
-rw-r--r--dev-qt/qtcore/qtcore-4.8.5-r2.ebuild178
-rw-r--r--dev-qt/qtcore/qtcore-4.8.6-r2.ebuild87
-rw-r--r--dev-qt/qtcore/qtcore-4.8.7.ebuild89
-rw-r--r--dev-qt/qtcore/qtcore-5.4.2.ebuild41
-rw-r--r--dev-qt/qtdbus/Manifest4
-rw-r--r--dev-qt/qtdbus/files/qtdbus-4.7-qdbusintegrator-no-const.patch11
-rw-r--r--dev-qt/qtdbus/files/qtdbus-4.8.4-qdbusconnection-silence-warning.patch14
-rw-r--r--dev-qt/qtdbus/metadata.xml13
-rw-r--r--dev-qt/qtdbus/qtdbus-4.8.5.ebuild53
-rw-r--r--dev-qt/qtdbus/qtdbus-4.8.6-r1.ebuild44
-rw-r--r--dev-qt/qtdbus/qtdbus-4.8.7.ebuild41
-rw-r--r--dev-qt/qtdbus/qtdbus-5.4.2.ebuild40
-rw-r--r--dev-qt/qtdeclarative/Manifest4
-rw-r--r--dev-qt/qtdeclarative/metadata.xml20
-rw-r--r--dev-qt/qtdeclarative/qtdeclarative-4.8.5.ebuild76
-rw-r--r--dev-qt/qtdeclarative/qtdeclarative-4.8.6-r1.ebuild55
-rw-r--r--dev-qt/qtdeclarative/qtdeclarative-4.8.7.ebuild52
-rw-r--r--dev-qt/qtdeclarative/qtdeclarative-5.4.2.ebuild46
-rw-r--r--dev-qt/qtdemo/Manifest3
-rw-r--r--dev-qt/qtdemo/files/qtdemo-4.6-plugandpaint.patch13
-rw-r--r--dev-qt/qtdemo/metadata.xml22
-rw-r--r--dev-qt/qtdemo/qtdemo-4.8.5-r1.ebuild116
-rw-r--r--dev-qt/qtdemo/qtdemo-4.8.6-r1.ebuild97
-rw-r--r--dev-qt/qtdemo/qtdemo-4.8.7.ebuild97
-rw-r--r--dev-qt/qtdiag/Manifest1
-rw-r--r--dev-qt/qtdiag/metadata.xml9
-rw-r--r--dev-qt/qtdiag/qtdiag-5.4.2.ebuild26
-rw-r--r--dev-qt/qtgraphicaleffects/Manifest1
-rw-r--r--dev-qt/qtgraphicaleffects/metadata.xml9
-rw-r--r--dev-qt/qtgraphicaleffects/qtgraphicaleffects-5.4.2.ebuild28
-rw-r--r--dev-qt/qtgui/Manifest5
-rw-r--r--dev-qt/qtgui/files/qtgui-4.7.3-cups.patch84
-rw-r--r--dev-qt/qtgui/files/qtgui-4.8.5-CVE-2015-0295.patch40
-rw-r--r--dev-qt/qtgui/files/qtgui-4.8.5-cleanlooks-floating-point-exception.patch38
-rw-r--r--dev-qt/qtgui/files/qtgui-4.8.5-disable-gtk-theme-check.patch22
-rw-r--r--dev-qt/qtgui/files/qtgui-4.8.5-dont-crash-on-broken-GIF-images.patch43
-rw-r--r--dev-qt/qtgui/files/qtgui-4.8.5-keyboard-shortcuts.patch41
-rw-r--r--dev-qt/qtgui/files/qtgui-4.8.5-libjpeg-9.patch84
-rw-r--r--dev-qt/qtgui/files/qtgui-4.8.5-qclipboard-delay.patch33
-rw-r--r--dev-qt/qtgui/files/qtgui-4.8.6-CVE-2015-1858.patch63
-rw-r--r--dev-qt/qtgui/files/qtgui-4.8.6-CVE-2015-1860.patch31
-rw-r--r--dev-qt/qtgui/metadata.xml28
-rw-r--r--dev-qt/qtgui/qtgui-4.8.5-r4.ebuild216
-rw-r--r--dev-qt/qtgui/qtgui-4.8.6-r4.ebuild175
-rw-r--r--dev-qt/qtgui/qtgui-4.8.7.ebuild167
-rw-r--r--dev-qt/qtgui/qtgui-5.4.2-r1.ebuild150
-rw-r--r--dev-qt/qthelp/Manifest6
-rw-r--r--dev-qt/qthelp/files/qthelp-4.8.5-fix-compat.patch21
-rw-r--r--dev-qt/qthelp/files/qthelp-4.8.6-compat-install.patch35
-rw-r--r--dev-qt/qthelp/files/qthelp-4.8.6-compat-syncqt.patch25
-rw-r--r--dev-qt/qthelp/metadata.xml15
-rw-r--r--dev-qt/qthelp/qthelp-4.8.5-r2.ebuild127
-rw-r--r--dev-qt/qthelp/qthelp-4.8.6-r3.ebuild115
-rw-r--r--dev-qt/qthelp/qthelp-4.8.7.ebuild112
-rw-r--r--dev-qt/qthelp/qthelp-5.4.2.ebuild32
-rw-r--r--dev-qt/qtimageformats/Manifest1
-rw-r--r--dev-qt/qtimageformats/metadata.xml9
-rw-r--r--dev-qt/qtimageformats/qtimageformats-5.4.2.ebuild24
-rw-r--r--dev-qt/qtlockedfile/Manifest2
-rw-r--r--dev-qt/qtlockedfile/files/qtlockedfile.prf6
-rw-r--r--dev-qt/qtlockedfile/metadata.xml5
-rw-r--r--dev-qt/qtlockedfile/qtlockedfile-2.4.1_p20130904.ebuild46
-rw-r--r--dev-qt/qtlockedfile/qtlockedfile-2.4.1_p20150629.ebuild77
-rw-r--r--dev-qt/qtmultimedia/Manifest4
-rw-r--r--dev-qt/qtmultimedia/files/qtmultimedia-4.8.0-alsa.patch25
-rw-r--r--dev-qt/qtmultimedia/metadata.xml15
-rw-r--r--dev-qt/qtmultimedia/qtmultimedia-4.8.5.ebuild60
-rw-r--r--dev-qt/qtmultimedia/qtmultimedia-4.8.6-r1.ebuild47
-rw-r--r--dev-qt/qtmultimedia/qtmultimedia-4.8.7.ebuild44
-rw-r--r--dev-qt/qtmultimedia/qtmultimedia-5.4.2-r1.ebuild63
-rw-r--r--dev-qt/qtnetwork/Manifest1
-rw-r--r--dev-qt/qtnetwork/metadata.xml15
-rw-r--r--dev-qt/qtnetwork/qtnetwork-5.4.2.ebuild51
-rw-r--r--dev-qt/qtopengl/Manifest4
-rw-r--r--dev-qt/qtopengl/metadata.xml17
-rw-r--r--dev-qt/qtopengl/qtopengl-4.8.5.ebuild64
-rw-r--r--dev-qt/qtopengl/qtopengl-4.8.6-r1.ebuild49
-rw-r--r--dev-qt/qtopengl/qtopengl-4.8.7.ebuild46
-rw-r--r--dev-qt/qtopengl/qtopengl-5.4.2.ebuild35
-rw-r--r--dev-qt/qtopenvg/Manifest3
-rw-r--r--dev-qt/qtopenvg/metadata.xml13
-rw-r--r--dev-qt/qtopenvg/qtopenvg-4.8.5.ebuild62
-rw-r--r--dev-qt/qtopenvg/qtopenvg-4.8.6-r1.ebuild46
-rw-r--r--dev-qt/qtopenvg/qtopenvg-4.8.7.ebuild43
-rw-r--r--dev-qt/qtpaths/Manifest1
-rw-r--r--dev-qt/qtpaths/metadata.xml9
-rw-r--r--dev-qt/qtpaths/qtpaths-5.4.2.ebuild24
-rw-r--r--dev-qt/qtphonon/Manifest3
-rw-r--r--dev-qt/qtphonon/metadata.xml15
-rw-r--r--dev-qt/qtphonon/qtphonon-4.8.5.ebuild54
-rw-r--r--dev-qt/qtphonon/qtphonon-4.8.6-r1.ebuild53
-rw-r--r--dev-qt/qtphonon/qtphonon-4.8.7.ebuild51
-rw-r--r--dev-qt/qtpositioning/Manifest1
-rw-r--r--dev-qt/qtpositioning/metadata.xml13
-rw-r--r--dev-qt/qtpositioning/qtpositioning-5.4.2.ebuild36
-rw-r--r--dev-qt/qtprintsupport/Manifest1
-rw-r--r--dev-qt/qtprintsupport/metadata.xml12
-rw-r--r--dev-qt/qtprintsupport/qtprintsupport-5.4.2.ebuild43
-rw-r--r--dev-qt/qtquick1/Manifest1
-rw-r--r--dev-qt/qtquick1/metadata.xml14
-rw-r--r--dev-qt/qtquick1/qtquick1-5.4.2.ebuild50
-rw-r--r--dev-qt/qtquickcontrols/Manifest1
-rw-r--r--dev-qt/qtquickcontrols/metadata.xml12
-rw-r--r--dev-qt/qtquickcontrols/qtquickcontrols-5.4.2.ebuild33
-rw-r--r--dev-qt/qtscript/Manifest4
-rw-r--r--dev-qt/qtscript/files/4.8.2-javascriptcore-x32.patch12
-rw-r--r--dev-qt/qtscript/metadata.xml14
-rw-r--r--dev-qt/qtscript/qtscript-4.8.5.ebuild62
-rw-r--r--dev-qt/qtscript/qtscript-4.8.6-r2.ebuild40
-rw-r--r--dev-qt/qtscript/qtscript-4.8.7.ebuild37
-rw-r--r--dev-qt/qtscript/qtscript-5.4.2.ebuild30
-rw-r--r--dev-qt/qtsensors/Manifest1
-rw-r--r--dev-qt/qtsensors/metadata.xml12
-rw-r--r--dev-qt/qtsensors/qtsensors-5.4.2.ebuild27
-rw-r--r--dev-qt/qtserialport/Manifest1
-rw-r--r--dev-qt/qtserialport/metadata.xml9
-rw-r--r--dev-qt/qtserialport/qtserialport-5.4.2.ebuild20
-rw-r--r--dev-qt/qtsingleapplication/Manifest2
-rw-r--r--dev-qt/qtsingleapplication/files/2.6.1_p20130904-no-gui.patch67
-rw-r--r--dev-qt/qtsingleapplication/files/2.6.1_p20130904-unbundle-qtlockedfile.patch81
-rw-r--r--dev-qt/qtsingleapplication/files/qtsingleapplication.prf9
-rw-r--r--dev-qt/qtsingleapplication/files/qtsinglecoreapplication.prf8
-rw-r--r--dev-qt/qtsingleapplication/metadata.xml5
-rw-r--r--dev-qt/qtsingleapplication/qtsingleapplication-2.6.1_p20130904-r1.ebuild60
-rw-r--r--dev-qt/qtsingleapplication/qtsingleapplication-2.6.1_p20150629.ebuild96
-rw-r--r--dev-qt/qtsql/Manifest4
-rw-r--r--dev-qt/qtsql/metadata.xml14
-rw-r--r--dev-qt/qtsql/qtsql-4.8.5.ebuild73
-rw-r--r--dev-qt/qtsql/qtsql-4.8.6-r1.ebuild63
-rw-r--r--dev-qt/qtsql/qtsql-4.8.7.ebuild60
-rw-r--r--dev-qt/qtsql/qtsql-5.4.2.ebuild54
-rw-r--r--dev-qt/qtsvg/Manifest4
-rw-r--r--dev-qt/qtsvg/metadata.xml13
-rw-r--r--dev-qt/qtsvg/qtsvg-4.8.5.ebuild61
-rw-r--r--dev-qt/qtsvg/qtsvg-4.8.6-r1.ebuild46
-rw-r--r--dev-qt/qtsvg/qtsvg-4.8.7.ebuild43
-rw-r--r--dev-qt/qtsvg/qtsvg-5.4.2.ebuild24
-rw-r--r--dev-qt/qttest/Manifest4
-rw-r--r--dev-qt/qttest/metadata.xml13
-rw-r--r--dev-qt/qttest/qttest-4.8.5.ebuild45
-rw-r--r--dev-qt/qttest/qttest-4.8.6-r1.ebuild36
-rw-r--r--dev-qt/qttest/qttest-4.8.7.ebuild33
-rw-r--r--dev-qt/qttest/qttest-5.4.2.ebuild30
-rw-r--r--dev-qt/qttranslations/Manifest3
-rw-r--r--dev-qt/qttranslations/metadata.xml9
-rw-r--r--dev-qt/qttranslations/qttranslations-4.8.6-r1.ebuild44
-rw-r--r--dev-qt/qttranslations/qttranslations-4.8.7.ebuild41
-rw-r--r--dev-qt/qttranslations/qttranslations-5.4.2.ebuild20
-rw-r--r--dev-qt/qtwayland/Manifest1
-rw-r--r--dev-qt/qtwayland/metadata.xml14
-rw-r--r--dev-qt/qtwayland/qtwayland-5.4.2.ebuild38
-rw-r--r--dev-qt/qtwebchannel/Manifest1
-rw-r--r--dev-qt/qtwebchannel/metadata.xml12
-rw-r--r--dev-qt/qtwebchannel/qtwebchannel-5.4.2.ebuild27
-rw-r--r--dev-qt/qtwebkit/Manifest5
-rw-r--r--dev-qt/qtwebkit/files/4.10.4-use-correct-icu-typedef.patch40
-rw-r--r--dev-qt/qtwebkit/files/4.8.2-javascriptcore-x32.patch11
-rw-r--r--dev-qt/qtwebkit/files/qtwebkit-4.8.1-no-use-ld-gold.patch17
-rw-r--r--dev-qt/qtwebkit/files/qtwebkit-5.2.1-disable-gstreamer.patch15
-rw-r--r--dev-qt/qtwebkit/files/qtwebkit-5.3.2-use-gstreamer010.patch18
-rw-r--r--dev-qt/qtwebkit/files/qtwebkit-5.4.2-system-leveldb.patch25
-rw-r--r--dev-qt/qtwebkit/metadata.xml19
-rw-r--r--dev-qt/qtwebkit/qtwebkit-4.10.4.ebuild125
-rw-r--r--dev-qt/qtwebkit/qtwebkit-4.8.5.ebuild83
-rw-r--r--dev-qt/qtwebkit/qtwebkit-4.8.6-r1.ebuild79
-rw-r--r--dev-qt/qtwebkit/qtwebkit-4.8.7.ebuild76
-rw-r--r--dev-qt/qtwebkit/qtwebkit-5.4.2.ebuild101
-rw-r--r--dev-qt/qtwebsockets/Manifest1
-rw-r--r--dev-qt/qtwebsockets/metadata.xml12
-rw-r--r--dev-qt/qtwebsockets/qtwebsockets-5.4.2.ebuild28
-rw-r--r--dev-qt/qtwidgets/Manifest1
-rw-r--r--dev-qt/qtwidgets/metadata.xml14
-rw-r--r--dev-qt/qtwidgets/qtwidgets-5.4.2.ebuild43
-rw-r--r--dev-qt/qtx11extras/Manifest1
-rw-r--r--dev-qt/qtx11extras/metadata.xml9
-rw-r--r--dev-qt/qtx11extras/qtx11extras-5.4.2.ebuild21
-rw-r--r--dev-qt/qtxml/Manifest1
-rw-r--r--dev-qt/qtxml/metadata.xml9
-rw-r--r--dev-qt/qtxml/qtxml-5.4.2.ebuild26
-rw-r--r--dev-qt/qtxmlpatterns/Manifest4
-rw-r--r--dev-qt/qtxmlpatterns/metadata.xml9
-rw-r--r--dev-qt/qtxmlpatterns/qtxmlpatterns-4.8.5.ebuild48
-rw-r--r--dev-qt/qtxmlpatterns/qtxmlpatterns-4.8.6-r1.ebuild37
-rw-r--r--dev-qt/qtxmlpatterns/qtxmlpatterns-4.8.7.ebuild34
-rw-r--r--dev-qt/qtxmlpatterns/qtxmlpatterns-5.4.2.ebuild20
265 files changed, 9881 insertions, 0 deletions
diff --git a/dev-qt/assistant/Manifest b/dev-qt/assistant/Manifest
new file mode 100644
index 000000000000..20dcfa73ac8a
--- /dev/null
+++ b/dev-qt/assistant/Manifest
@@ -0,0 +1,4 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qttools-opensource-src-5.4.2.tar.xz 9333100 SHA256 edf3d7e00227f9989101da84b2fdf8eaf1a5b7863dc5e0d26bb0f39303e8b6b4 SHA512 55aa04eae16b71e78d4432e7d59b2052392d13652a3e9beff15a6503f2e88e77a9b48279121d8eee943a898799155c05b167d986bf01fae84b5db0a9a1759148 WHIRLPOOL 9123ff33a35c03adaa6d3374e86b539e9481ec78467bd72ad6f2d832e76e7aafd9b2f2da0420111e1aa8a66c4950b0478d8a6ae4c0f0e05a20c8334196b077e8
diff --git a/dev-qt/assistant/assistant-4.8.5.ebuild b/dev-qt/assistant/assistant-4.8.5.ebuild
new file mode 100644
index 000000000000..d08564ee00cd
--- /dev/null
+++ b/dev-qt/assistant/assistant-4.8.5.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils qt4-build
+
+DESCRIPTION="Tool for viewing on-line documentation in Qt help file format"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+fi
+
+IUSE="webkit"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=]
+ ~dev-qt/qthelp-${PV}[aqua=,debug=]
+ ~dev-qt/qtsql-${PV}[aqua=,debug=,sqlite]
+ webkit? ( ~dev-qt/qtwebkit-${PV}[aqua=,debug=] )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.8.2+gcc-4.7.patch"
+)
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="tools/assistant/tools/assistant"
+ QT4_EXTRACT_DIRECTORIES="
+ include
+ src
+ tools"
+
+ qt4-build_pkg_setup
+}
+
+src_prepare() {
+ # bug 401173
+ use webkit || PATCHES+=("${FILESDIR}/disable-webkit.patch")
+
+ qt4-build_src_prepare
+}
+
+src_configure() {
+ myconf+="
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-multimedia -no-opengl -no-phonon -no-svg -no-xmlpatterns
+ $(qt_use webkit)"
+
+ qt4-build_src_configure
+}
+
+src_install() {
+ qt4-build_src_install
+
+ doicon tools/assistant/tools/assistant/images/assistant.png
+ make_desktop_entry assistant Assistant assistant 'Qt;Development;Documentation'
+}
diff --git a/dev-qt/assistant/assistant-4.8.6-r1.ebuild b/dev-qt/assistant/assistant-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..fc4c237c260a
--- /dev/null
+++ b/dev-qt/assistant/assistant-4.8.6-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils qt4-build-multilib
+
+DESCRIPTION="Tool for viewing on-line documentation in Qt help file format"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm ia64 ppc ppc64"
+else
+ KEYWORDS="alpha amd64 arm ia64 ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+fi
+
+IUSE="webkit"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qthelp-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtsql-${PV}[aqua=,debug=,sqlite,${MULTILIB_USEDEP}]
+ webkit? ( ~dev-qt/qtwebkit-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.8.2+gcc-4.7.patch"
+)
+
+QT4_TARGET_DIRECTORIES="tools/assistant/tools/assistant"
+
+src_prepare() {
+ # bug 401173
+ use webkit || PATCHES+=("${FILESDIR}/disable-webkit.patch")
+
+ qt4-build-multilib_src_prepare
+}
+
+multilib_src_configure() {
+ local myconf=(
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-multimedia -no-opengl -no-phonon -no-svg -no-xmlpatterns
+ $(qt_use webkit)
+ )
+ qt4_multilib_src_configure
+}
+
+multilib_src_install_all() {
+ qt4_multilib_src_install_all
+
+ doicon tools/assistant/tools/assistant/images/assistant.png
+ make_desktop_entry assistant Assistant assistant 'Qt;Development;Documentation'
+}
diff --git a/dev-qt/assistant/assistant-4.8.7.ebuild b/dev-qt/assistant/assistant-4.8.7.ebuild
new file mode 100644
index 000000000000..f50bdf939146
--- /dev/null
+++ b/dev-qt/assistant/assistant-4.8.7.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils qt4-build-multilib
+
+DESCRIPTION="Tool for viewing on-line documentation in Qt help file format"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+fi
+
+IUSE="webkit"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qthelp-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtsql-${PV}[aqua=,debug=,sqlite,${MULTILIB_USEDEP}]
+ webkit? ( ~dev-qt/qtwebkit-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.8.2+gcc-4.7.patch"
+)
+
+QT4_TARGET_DIRECTORIES="tools/assistant/tools/assistant"
+
+src_prepare() {
+ # bug 401173
+ use webkit || PATCHES+=("${FILESDIR}/disable-webkit.patch")
+
+ qt4-build-multilib_src_prepare
+}
+
+multilib_src_configure() {
+ local myconf=(
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-multimedia -no-opengl -no-phonon -no-svg -no-xmlpatterns
+ $(qt_use webkit)
+ )
+ qt4_multilib_src_configure
+}
+
+multilib_src_install_all() {
+ qt4_multilib_src_install_all
+
+ doicon tools/assistant/tools/assistant/images/assistant.png
+ make_desktop_entry assistant Assistant assistant 'Qt;Development;Documentation'
+}
diff --git a/dev-qt/assistant/assistant-5.4.2.ebuild b/dev-qt/assistant/assistant-5.4.2.ebuild
new file mode 100644
index 000000000000..da3f3e978fbd
--- /dev/null
+++ b/dev-qt/assistant/assistant-5.4.2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qttools"
+inherit qt5-build
+
+DESCRIPTION="Tool for viewing on-line documentation in Qt help file format"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="webkit"
+
+DEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtgui-${PV}:5
+ >=dev-qt/qthelp-${PV}:5
+ >=dev-qt/qtnetwork-${PV}:5
+ >=dev-qt/qtprintsupport-${PV}:5
+ >=dev-qt/qtsql-${PV}:5[sqlite]
+ >=dev-qt/qtwidgets-${PV}:5
+ webkit? ( >=dev-qt/qtwebkit-${PV}:5 )
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/assistant/assistant
+)
+
+src_prepare() {
+ qt_use_disable_mod webkit webkitwidgets \
+ src/assistant/assistant/assistant.pro
+
+ qt5-build_src_prepare
+}
diff --git a/dev-qt/assistant/files/assistant-4.8.2+gcc-4.7.patch b/dev-qt/assistant/files/assistant-4.8.2+gcc-4.7.patch
new file mode 100644
index 000000000000..1cf70275f634
--- /dev/null
+++ b/dev-qt/assistant/files/assistant-4.8.2+gcc-4.7.patch
@@ -0,0 +1,12 @@
+--- tools/assistant/tools/assistant/mainwindow.cpp 2012-06-27 03:02:37.539564947 +0200
++++ tools/assistant/tools/assistant/mainwindow.cpp 2012-06-27 03:03:18.843561620 +0200
+@@ -944,8 +944,7 @@ void MainWindow::updateApplicationFont()
+ if (helpEngine.usesAppFont())
+ font = helpEngine.appFont();
+
+- const QWidgetList &widgets = qApp->allWidgets();
+- foreach (QWidget* widget, widgets)
++ foreach (QWidget* widget, QApplication::allWidgets())
+ widget->setFont(font);
+ }
+
diff --git a/dev-qt/assistant/files/disable-webkit.patch b/dev-qt/assistant/files/disable-webkit.patch
new file mode 100644
index 000000000000..61bca05148e5
--- /dev/null
+++ b/dev-qt/assistant/files/disable-webkit.patch
@@ -0,0 +1,26 @@
+Index: qt-everywhere-opensource-src-4.8.9999/tools/assistant/tools/assistant/assistant.pro
+===================================================================
+--- qt-everywhere-opensource-src-4.8.9999.orig/tools/assistant/tools/assistant/assistant.pro
++++ qt-everywhere-opensource-src-4.8.9999/tools/assistant/tools/assistant/assistant.pro
+@@ -2,7 +2,6 @@ include(../../../shared/fontpanel/fontpa
+ TEMPLATE = app
+ LANGUAGE = C++
+ TARGET = assistant
+-contains(QT_CONFIG, webkit):QT += webkit
+ CONFIG += qt \
+ warn_on \
+ help
+@@ -81,11 +80,8 @@ SOURCES += aboutdialog.cpp \
+ openpageswidget.cpp \
+ openpagesmanager.cpp \
+ openpagesswitcher.cpp
+-contains(QT_CONFIG, webkit) {
+- SOURCES += helpviewer_qwv.cpp
+-} else {
+- SOURCES += helpviewer_qtb.cpp
+-}
++
++SOURCES += helpviewer_qtb.cpp
+
+ FORMS += bookmarkdialog.ui \
+ bookmarkmanagerwidget.ui \ \ No newline at end of file
diff --git a/dev-qt/assistant/metadata.xml b/dev-qt/assistant/metadata.xml
new file mode 100644
index 000000000000..258aee1d6e0d
--- /dev/null
+++ b/dev-qt/assistant/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/designer/Manifest b/dev-qt/designer/Manifest
new file mode 100644
index 000000000000..20dcfa73ac8a
--- /dev/null
+++ b/dev-qt/designer/Manifest
@@ -0,0 +1,4 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qttools-opensource-src-5.4.2.tar.xz 9333100 SHA256 edf3d7e00227f9989101da84b2fdf8eaf1a5b7863dc5e0d26bb0f39303e8b6b4 SHA512 55aa04eae16b71e78d4432e7d59b2052392d13652a3e9beff15a6503f2e88e77a9b48279121d8eee943a898799155c05b167d986bf01fae84b5db0a9a1759148 WHIRLPOOL 9123ff33a35c03adaa6d3374e86b539e9481ec78467bd72ad6f2d832e76e7aafd9b2f2da0420111e1aa8a66c4950b0478d8a6ae4c0f0e05a20c8334196b077e8
diff --git a/dev-qt/designer/designer-4.8.5.ebuild b/dev-qt/designer/designer-4.8.5.ebuild
new file mode 100644
index 000000000000..da1ffbdd5e17
--- /dev/null
+++ b/dev-qt/designer/designer-4.8.5.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils qt4-build
+
+DESCRIPTION="WYSIWYG tool for designing and building Qt-based GUIs"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+DESIGNER_PLUGINS="declarative phonon qt3support webkit"
+IUSE="${DESIGNER_PLUGINS} kde"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=]
+ ~dev-qt/qtscript-${PV}[aqua=,debug=]
+ declarative? ( ~dev-qt/qtdeclarative-${PV}[aqua=,debug=] )
+ phonon? ( !kde? ( ~dev-qt/qtphonon-${PV}[aqua=,debug=] ) )
+ qt3support? ( ~dev-qt/qt3support-${PV}[aqua=,debug=] )
+ webkit? ( ~dev-qt/qtwebkit-${PV}[aqua=,debug=] )
+"
+RDEPEND="${DEPEND}"
+PDEPEND="phonon? ( kde? ( media-libs/phonon[designer,qt4] ) )"
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="tools/designer"
+ QT4_EXTRACT_DIRECTORIES="
+ include
+ src
+ tools"
+
+ qt4-build_pkg_setup
+}
+
+src_prepare() {
+ qt4-build_src_prepare
+
+ local plugin
+ for plugin in ${DESIGNER_PLUGINS}; do
+ if ! use ${plugin} || ( [[ ${plugin} == phonon ]] && use kde ); then
+ sed -i -e "/\<${plugin}\>/d" \
+ tools/designer/src/plugins/plugins.pro || die
+ fi
+ done
+}
+
+src_configure() {
+ myconf+="
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-svg -no-webkit -no-phonon -no-opengl"
+
+ qt4-build_src_configure
+}
+
+src_install() {
+ qt4-build_src_install
+
+ # qt-creator
+ # some qt-creator headers are located
+ # under /usr/include/qt4/QtDesigner/private.
+ # those headers are just includes of the headers
+ # which are located under tools/designer/src/lib/*
+ # So instead of installing both, we create the private folder
+ # and drop tools/designer/src/lib/* headers in it.
+ if use aqua && [[ ${CHOST##*-darwin} -ge 9 ]]; then
+ insinto "${QTLIBDIR#${EPREFIX}}"/QtDesigner.framework/Headers/private/
+ else
+ insinto "${QTHEADERDIR#${EPREFIX}}"/QtDesigner/private/
+ fi
+ doins "${S}"/tools/designer/src/lib/shared/*
+ doins "${S}"/tools/designer/src/lib/sdk/*
+
+ doicon tools/designer/src/designer/images/designer.png
+ make_desktop_entry designer Designer designer 'Qt;Development;GUIDesigner'
+}
diff --git a/dev-qt/designer/designer-4.8.6-r1.ebuild b/dev-qt/designer/designer-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..59da51d991b5
--- /dev/null
+++ b/dev-qt/designer/designer-4.8.6-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils qt4-build-multilib
+
+DESCRIPTION="WYSIWYG tool for designing and building Qt-based GUIs"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm hppa ia64 ppc ppc64"
+else
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+DESIGNER_PLUGINS="declarative phonon qt3support webkit"
+IUSE="${DESIGNER_PLUGINS} kde"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtscript-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ declarative? ( ~dev-qt/qtdeclarative-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+ phonon? ( !kde? ( ~dev-qt/qtphonon-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] ) )
+ qt3support? ( ~dev-qt/qt3support-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+ webkit? ( ~dev-qt/qtwebkit-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}"
+PDEPEND="phonon? ( kde? ( media-libs/phonon[designer,qt4] ) )"
+
+QT4_TARGET_DIRECTORIES="tools/designer"
+
+src_prepare() {
+ qt4-build-multilib_src_prepare
+
+ local plugin
+ for plugin in ${DESIGNER_PLUGINS}; do
+ if ! use ${plugin} || ( [[ ${plugin} == phonon ]] && use kde ); then
+ sed -i -e "/\<${plugin}\>/d" \
+ tools/designer/src/plugins/plugins.pro || die
+ fi
+ done
+}
+
+multilib_src_configure() {
+ local myconf=(
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-svg -no-webkit -no-phonon -no-opengl
+ )
+ qt4_multilib_src_configure
+}
+
+multilib_src_install_all() {
+ qt4_multilib_src_install_all
+
+ doicon tools/designer/src/designer/images/designer.png
+ make_desktop_entry designer Designer designer 'Qt;Development;GUIDesigner'
+}
diff --git a/dev-qt/designer/designer-4.8.7.ebuild b/dev-qt/designer/designer-4.8.7.ebuild
new file mode 100644
index 000000000000..ebc8d43c73d9
--- /dev/null
+++ b/dev-qt/designer/designer-4.8.7.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils qt4-build-multilib
+
+DESCRIPTION="WYSIWYG tool for designing and building Qt-based GUIs"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+DESIGNER_PLUGINS="declarative phonon qt3support webkit"
+IUSE="${DESIGNER_PLUGINS} kde"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtscript-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ declarative? ( ~dev-qt/qtdeclarative-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+ phonon? ( !kde? ( ~dev-qt/qtphonon-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] ) )
+ qt3support? ( ~dev-qt/qt3support-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+ webkit? ( ~dev-qt/qtwebkit-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}"
+PDEPEND="phonon? ( kde? ( media-libs/phonon[designer,qt4] ) )"
+
+QT4_TARGET_DIRECTORIES="tools/designer"
+
+src_prepare() {
+ qt4-build-multilib_src_prepare
+
+ local plugin
+ for plugin in ${DESIGNER_PLUGINS}; do
+ if ! use ${plugin} || ( [[ ${plugin} == phonon ]] && use kde ); then
+ sed -i -e "/\<${plugin}\>/d" \
+ tools/designer/src/plugins/plugins.pro || die
+ fi
+ done
+}
+
+multilib_src_configure() {
+ local myconf=(
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-svg -no-webkit -no-phonon -no-opengl
+ )
+ qt4_multilib_src_configure
+}
+
+multilib_src_install_all() {
+ qt4_multilib_src_install_all
+
+ doicon tools/designer/src/designer/images/designer.png
+ make_desktop_entry designer Designer designer 'Qt;Development;GUIDesigner'
+}
diff --git a/dev-qt/designer/designer-5.4.2.ebuild b/dev-qt/designer/designer-5.4.2.ebuild
new file mode 100644
index 000000000000..253b61ffb99a
--- /dev/null
+++ b/dev-qt/designer/designer-5.4.2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qttools"
+inherit qt5-build
+
+DESCRIPTION="WYSIWYG tool for designing and building Qt-based GUIs"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="declarative webkit"
+
+DEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtgui-${PV}:5
+ >=dev-qt/qtnetwork-${PV}:5
+ >=dev-qt/qtprintsupport-${PV}:5
+ >=dev-qt/qtwidgets-${PV}:5
+ >=dev-qt/qtxml-${PV}:5
+ declarative? ( >=dev-qt/qtdeclarative-${PV}:5[widgets] )
+ webkit? ( >=dev-qt/qtwebkit-${PV}:5 )
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/designer
+)
+
+src_prepare() {
+ qt_use_disable_mod declarative quickwidgets \
+ src/designer/src/plugins/plugins.pro
+
+ qt_use_disable_mod webkit webkitwidgets \
+ src/designer/src/plugins/plugins.pro
+
+ qt5-build_src_prepare
+}
diff --git a/dev-qt/designer/metadata.xml b/dev-qt/designer/metadata.xml
new file mode 100644
index 000000000000..d5e349c54759
--- /dev/null
+++ b/dev-qt/designer/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="declarative">Build the qdeclarativeview plugin</flag>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ <flag name="phonon">Build the phononwidgets plugin</flag>
+ <flag name="qt3support">Build the qt3supportwidgets plugin</flag>
+ <flag name="webkit">Build the qwebview plugin</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/linguist-tools/Manifest b/dev-qt/linguist-tools/Manifest
new file mode 100644
index 000000000000..021b32a107b9
--- /dev/null
+++ b/dev-qt/linguist-tools/Manifest
@@ -0,0 +1 @@
+DIST qttools-opensource-src-5.4.2.tar.xz 9333100 SHA256 edf3d7e00227f9989101da84b2fdf8eaf1a5b7863dc5e0d26bb0f39303e8b6b4 SHA512 55aa04eae16b71e78d4432e7d59b2052392d13652a3e9beff15a6503f2e88e77a9b48279121d8eee943a898799155c05b167d986bf01fae84b5db0a9a1759148 WHIRLPOOL 9123ff33a35c03adaa6d3374e86b539e9481ec78467bd72ad6f2d832e76e7aafd9b2f2da0420111e1aa8a66c4950b0478d8a6ae4c0f0e05a20c8334196b077e8
diff --git a/dev-qt/linguist-tools/linguist-tools-5.4.2.ebuild b/dev-qt/linguist-tools/linguist-tools-5.4.2.ebuild
new file mode 100644
index 000000000000..3ff0b4ab9543
--- /dev/null
+++ b/dev-qt/linguist-tools/linguist-tools-5.4.2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qttools"
+inherit qt5-build
+
+DESCRIPTION="Tools for working with Qt translation data files"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="qml"
+
+DEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtxml-${PV}:5
+ qml? ( >=dev-qt/qtdeclarative-${PV}:5 )
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/linguist
+)
+
+src_prepare() {
+ sed -i -e '/SUBDIRS += linguist/d' \
+ src/linguist/linguist.pro || die
+
+ qt_use_disable_mod qml qmldevtools-private \
+ src/linguist/lupdate/lupdate.pro
+
+ qt5-build_src_prepare
+}
diff --git a/dev-qt/linguist-tools/metadata.xml b/dev-qt/linguist-tools/metadata.xml
new file mode 100644
index 000000000000..7fd11f84adca
--- /dev/null
+++ b/dev-qt/linguist-tools/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <use>
+ <flag name="qml">Enable QML support in lupdate</flag>
+ </use>
+ <herd>qt</herd>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/linguist/Manifest b/dev-qt/linguist/Manifest
new file mode 100644
index 000000000000..20dcfa73ac8a
--- /dev/null
+++ b/dev-qt/linguist/Manifest
@@ -0,0 +1,4 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qttools-opensource-src-5.4.2.tar.xz 9333100 SHA256 edf3d7e00227f9989101da84b2fdf8eaf1a5b7863dc5e0d26bb0f39303e8b6b4 SHA512 55aa04eae16b71e78d4432e7d59b2052392d13652a3e9beff15a6503f2e88e77a9b48279121d8eee943a898799155c05b167d986bf01fae84b5db0a9a1759148 WHIRLPOOL 9123ff33a35c03adaa6d3374e86b539e9481ec78467bd72ad6f2d832e76e7aafd9b2f2da0420111e1aa8a66c4950b0478d8a6ae4c0f0e05a20c8334196b077e8
diff --git a/dev-qt/linguist/linguist-4.8.5.ebuild b/dev-qt/linguist/linguist-4.8.5.ebuild
new file mode 100644
index 000000000000..89e537dbe366
--- /dev/null
+++ b/dev-qt/linguist/linguist-4.8.5.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils qt4-build
+
+DESCRIPTION="Graphical tool for translating Qt applications"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/designer-${PV}[aqua=,debug=]
+ ~dev-qt/qtcore-${PV}[aqua=,debug=]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=]
+"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="tools/linguist/linguist"
+ QT4_EXTRACT_DIRECTORIES="
+ include
+ src
+ tools"
+
+ qt4-build_pkg_setup
+}
+
+src_configure() {
+ myconf+="
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-svg -no-webkit -no-phonon -no-opengl"
+
+ qt4-build_src_configure
+}
+
+src_install() {
+ qt4-build_src_install
+
+ newicon tools/linguist/linguist/images/icons/linguist-128-32.png linguist.png
+ make_desktop_entry linguist Linguist linguist 'Qt;Development;Translation'
+}
diff --git a/dev-qt/linguist/linguist-4.8.6-r1.ebuild b/dev-qt/linguist/linguist-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..ae3578b8ae7f
--- /dev/null
+++ b/dev-qt/linguist/linguist-4.8.6-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils qt4-build-multilib
+
+DESCRIPTION="Graphical tool for translating Qt applications"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm hppa ia64 ppc ppc64"
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/designer-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="tools/linguist/linguist"
+
+multilib_src_configure() {
+ local myconf=(
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-svg -no-webkit -no-phonon -no-opengl
+ )
+ qt4_multilib_src_configure
+}
+
+multilib_src_install_all() {
+ qt4_multilib_src_install_all
+
+ newicon tools/linguist/linguist/images/icons/linguist-128-32.png linguist.png
+ make_desktop_entry linguist Linguist linguist 'Qt;Development;Translation'
+}
diff --git a/dev-qt/linguist/linguist-4.8.7.ebuild b/dev-qt/linguist/linguist-4.8.7.ebuild
new file mode 100644
index 000000000000..c4256337c754
--- /dev/null
+++ b/dev-qt/linguist/linguist-4.8.7.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils qt4-build-multilib
+
+DESCRIPTION="Graphical tool for translating Qt applications"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/designer-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="tools/linguist/linguist"
+
+multilib_src_configure() {
+ local myconf=(
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-svg -no-webkit -no-phonon -no-opengl
+ )
+ qt4_multilib_src_configure
+}
+
+multilib_src_install_all() {
+ qt4_multilib_src_install_all
+
+ newicon tools/linguist/linguist/images/icons/linguist-128-32.png linguist.png
+ make_desktop_entry linguist Linguist linguist 'Qt;Development;Translation'
+}
diff --git a/dev-qt/linguist/linguist-5.4.2.ebuild b/dev-qt/linguist/linguist-5.4.2.ebuild
new file mode 100644
index 000000000000..51ac0b44ca0c
--- /dev/null
+++ b/dev-qt/linguist/linguist-5.4.2.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qttools"
+inherit qt5-build
+
+DESCRIPTION="Graphical tool for translating Qt applications"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+fi
+
+IUSE=""
+
+DEPEND="
+ >=dev-qt/designer-${PV}:5
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtgui-${PV}:5
+ >=dev-qt/qtprintsupport-${PV}:5
+ >=dev-qt/qtwidgets-${PV}:5
+ >=dev-qt/qtxml-${PV}:5
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/linguist/linguist
+)
diff --git a/dev-qt/linguist/metadata.xml b/dev-qt/linguist/metadata.xml
new file mode 100644
index 000000000000..258aee1d6e0d
--- /dev/null
+++ b/dev-qt/linguist/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/metadata.xml b/dev-qt/metadata.xml
new file mode 100644
index 000000000000..798c9b87977f
--- /dev/null
+++ b/dev-qt/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The dev-qt category contains packages for the Qt framework modules and
+ directly related libraries and development applications from the upstream
+ Qt Project. Do not add other packages to this category.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría dev-qt contiene paquetes para los módulos del marco de trabajo
+ Qt y las librerías y aplicaciones de desarrollo directamente relacionadas
+ del proyecto Qt. No añadir otros paquetes a esta categoría.
+ </longdescription>
+</catmetadata>
diff --git a/dev-qt/pixeltool/Manifest b/dev-qt/pixeltool/Manifest
new file mode 100644
index 000000000000..20dcfa73ac8a
--- /dev/null
+++ b/dev-qt/pixeltool/Manifest
@@ -0,0 +1,4 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qttools-opensource-src-5.4.2.tar.xz 9333100 SHA256 edf3d7e00227f9989101da84b2fdf8eaf1a5b7863dc5e0d26bb0f39303e8b6b4 SHA512 55aa04eae16b71e78d4432e7d59b2052392d13652a3e9beff15a6503f2e88e77a9b48279121d8eee943a898799155c05b167d986bf01fae84b5db0a9a1759148 WHIRLPOOL 9123ff33a35c03adaa6d3374e86b539e9481ec78467bd72ad6f2d832e76e7aafd9b2f2da0420111e1aa8a66c4950b0478d8a6ae4c0f0e05a20c8334196b077e8
diff --git a/dev-qt/pixeltool/metadata.xml b/dev-qt/pixeltool/metadata.xml
new file mode 100644
index 000000000000..258aee1d6e0d
--- /dev/null
+++ b/dev-qt/pixeltool/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/pixeltool/pixeltool-4.8.5.ebuild b/dev-qt/pixeltool/pixeltool-4.8.5.ebuild
new file mode 100644
index 000000000000..0f74e18c8964
--- /dev/null
+++ b/dev-qt/pixeltool/pixeltool-4.8.5.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build
+
+DESCRIPTION="Qt screen magnifier"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=]
+ !<dev-qt/qthelp-4.8.5:4
+"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="tools/pixeltool"
+ QT4_EXTRACT_DIRECTORIES="
+ include
+ src/corelib
+ src/gui
+ tools/pixeltool"
+
+ qt4-build_pkg_setup
+}
+
+src_configure() {
+ myconf+="
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-svg -no-webkit -no-phonon -no-opengl"
+
+ qt4-build_src_configure
+}
diff --git a/dev-qt/pixeltool/pixeltool-4.8.6-r1.ebuild b/dev-qt/pixeltool/pixeltool-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..0442239c2fbf
--- /dev/null
+++ b/dev-qt/pixeltool/pixeltool-4.8.6-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="Qt screen magnifier"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm ia64 ppc ppc64"
+else
+ KEYWORDS="alpha amd64 arm ia64 ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ !<dev-qt/qthelp-4.8.5:4
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="tools/pixeltool"
+
+multilib_src_configure() {
+ local myconf=(
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-svg -no-webkit -no-phonon -no-opengl
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/pixeltool/pixeltool-4.8.7.ebuild b/dev-qt/pixeltool/pixeltool-4.8.7.ebuild
new file mode 100644
index 000000000000..5cc9d5cb5dd8
--- /dev/null
+++ b/dev-qt/pixeltool/pixeltool-4.8.7.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="Qt screen magnifier"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ !<dev-qt/qthelp-4.8.5:4
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="tools/pixeltool"
+
+multilib_src_configure() {
+ local myconf=(
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-svg -no-webkit -no-phonon -no-opengl
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/pixeltool/pixeltool-5.4.2.ebuild b/dev-qt/pixeltool/pixeltool-5.4.2.ebuild
new file mode 100644
index 000000000000..f1a9f732cb29
--- /dev/null
+++ b/dev-qt/pixeltool/pixeltool-5.4.2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qttools"
+inherit qt5-build
+
+DESCRIPTION="Qt screen magnifier"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+fi
+
+IUSE=""
+
+DEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtgui-${PV}:5
+ >=dev-qt/qtnetwork-${PV}:5
+ >=dev-qt/qtwidgets-${PV}:5
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/pixeltool
+)
diff --git a/dev-qt/qdbus/Manifest b/dev-qt/qdbus/Manifest
new file mode 100644
index 000000000000..021b32a107b9
--- /dev/null
+++ b/dev-qt/qdbus/Manifest
@@ -0,0 +1 @@
+DIST qttools-opensource-src-5.4.2.tar.xz 9333100 SHA256 edf3d7e00227f9989101da84b2fdf8eaf1a5b7863dc5e0d26bb0f39303e8b6b4 SHA512 55aa04eae16b71e78d4432e7d59b2052392d13652a3e9beff15a6503f2e88e77a9b48279121d8eee943a898799155c05b167d986bf01fae84b5db0a9a1759148 WHIRLPOOL 9123ff33a35c03adaa6d3374e86b539e9481ec78467bd72ad6f2d832e76e7aafd9b2f2da0420111e1aa8a66c4950b0478d8a6ae4c0f0e05a20c8334196b077e8
diff --git a/dev-qt/qdbus/metadata.xml b/dev-qt/qdbus/metadata.xml
new file mode 100644
index 000000000000..afb3b434585b
--- /dev/null
+++ b/dev-qt/qdbus/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qdbus/qdbus-5.4.2.ebuild b/dev-qt/qdbus/qdbus-5.4.2.ebuild
new file mode 100644
index 000000000000..17e425aca903
--- /dev/null
+++ b/dev-qt/qdbus/qdbus-5.4.2.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qttools"
+inherit qt5-build
+
+DESCRIPTION="Interface to Qt applications communicating over D-Bus"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+fi
+
+IUSE=""
+
+DEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtdbus-${PV}:5
+ >=dev-qt/qtxml-${PV}:5
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/qdbus/qdbus
+)
diff --git a/dev-qt/qdbusviewer/Manifest b/dev-qt/qdbusviewer/Manifest
new file mode 100644
index 000000000000..20dcfa73ac8a
--- /dev/null
+++ b/dev-qt/qdbusviewer/Manifest
@@ -0,0 +1,4 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qttools-opensource-src-5.4.2.tar.xz 9333100 SHA256 edf3d7e00227f9989101da84b2fdf8eaf1a5b7863dc5e0d26bb0f39303e8b6b4 SHA512 55aa04eae16b71e78d4432e7d59b2052392d13652a3e9beff15a6503f2e88e77a9b48279121d8eee943a898799155c05b167d986bf01fae84b5db0a9a1759148 WHIRLPOOL 9123ff33a35c03adaa6d3374e86b539e9481ec78467bd72ad6f2d832e76e7aafd9b2f2da0420111e1aa8a66c4950b0478d8a6ae4c0f0e05a20c8334196b077e8
diff --git a/dev-qt/qdbusviewer/metadata.xml b/dev-qt/qdbusviewer/metadata.xml
new file mode 100644
index 000000000000..258aee1d6e0d
--- /dev/null
+++ b/dev-qt/qdbusviewer/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qdbusviewer/qdbusviewer-4.8.5.ebuild b/dev-qt/qdbusviewer/qdbusviewer-4.8.5.ebuild
new file mode 100644
index 000000000000..233cfeb40892
--- /dev/null
+++ b/dev-qt/qdbusviewer/qdbusviewer-4.8.5.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils qt4-build
+
+DESCRIPTION="Graphical tool that lets you introspect D-Bus objects and messages"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=]
+ ~dev-qt/qtdbus-${PV}[aqua=,debug=]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=]
+"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="tools/qdbus/qdbusviewer"
+ QT4_EXTRACT_DIRECTORIES="
+ include
+ src
+ tools/qdbus"
+
+ qt4-build_pkg_setup
+}
+
+src_configure() {
+ myconf+="
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-svg -no-webkit -no-phonon -no-opengl"
+
+ qt4-build_src_configure
+}
+
+src_install() {
+ qt4-build_src_install
+
+ newicon tools/qdbus/qdbusviewer/images/qdbusviewer-128.png qdbusviewer.png
+ make_desktop_entry qdbusviewer QDBusViewer qdbusviewer 'Qt;Development'
+}
diff --git a/dev-qt/qdbusviewer/qdbusviewer-4.8.6-r1.ebuild b/dev-qt/qdbusviewer/qdbusviewer-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..c9de1e559d25
--- /dev/null
+++ b/dev-qt/qdbusviewer/qdbusviewer-4.8.6-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils qt4-build-multilib
+
+DESCRIPTION="Graphical tool that lets you introspect D-Bus objects and messages"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm hppa ia64 ppc ppc64"
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtdbus-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="tools/qdbus/qdbusviewer"
+
+multilib_src_configure() {
+ local myconf=(
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-svg -no-webkit -no-phonon -no-opengl
+ )
+ qt4_multilib_src_configure
+}
+
+multilib_src_install_all() {
+ qt4_multilib_src_install_all
+
+ newicon tools/qdbus/qdbusviewer/images/qdbusviewer-128.png qdbusviewer.png
+ make_desktop_entry qdbusviewer QDBusViewer qdbusviewer 'Qt;Development'
+}
diff --git a/dev-qt/qdbusviewer/qdbusviewer-4.8.7.ebuild b/dev-qt/qdbusviewer/qdbusviewer-4.8.7.ebuild
new file mode 100644
index 000000000000..e4dcc3274a2c
--- /dev/null
+++ b/dev-qt/qdbusviewer/qdbusviewer-4.8.7.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils qt4-build-multilib
+
+DESCRIPTION="Graphical tool that lets you introspect D-Bus objects and messages"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtdbus-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="tools/qdbus/qdbusviewer"
+
+multilib_src_configure() {
+ local myconf=(
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-svg -no-webkit -no-phonon -no-opengl
+ )
+ qt4_multilib_src_configure
+}
+
+multilib_src_install_all() {
+ qt4_multilib_src_install_all
+
+ newicon tools/qdbus/qdbusviewer/images/qdbusviewer-128.png qdbusviewer.png
+ make_desktop_entry qdbusviewer QDBusViewer qdbusviewer 'Qt;Development'
+}
diff --git a/dev-qt/qdbusviewer/qdbusviewer-5.4.2.ebuild b/dev-qt/qdbusviewer/qdbusviewer-5.4.2.ebuild
new file mode 100644
index 000000000000..5c5f0ab659c9
--- /dev/null
+++ b/dev-qt/qdbusviewer/qdbusviewer-5.4.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qttools"
+inherit qt5-build
+
+DESCRIPTION="Graphical tool that lets you introspect D-Bus objects and messages"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+fi
+
+IUSE=""
+
+DEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtdbus-${PV}:5
+ >=dev-qt/qtgui-${PV}:5
+ >=dev-qt/qtwidgets-${PV}:5
+ >=dev-qt/qtxml-${PV}:5
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/qdbus/qdbusviewer
+)
diff --git a/dev-qt/qdoc/Manifest b/dev-qt/qdoc/Manifest
new file mode 100644
index 000000000000..0c465bb8036b
--- /dev/null
+++ b/dev-qt/qdoc/Manifest
@@ -0,0 +1 @@
+DIST qtbase-opensource-src-5.4.2.tar.xz 46354192 SHA256 9fc4f720b8b5a8b8e4a7d45e13ce4d5b86756ad46fb406386637eb2de5fd5a74 SHA512 029da83969614bc9b3803c76242af62911e3c6de171b116b5cb8e2823cad0514ab705cc3fa331e042c679caeb099de4e9cd7ddea92959f675dda82533e3ad7fe WHIRLPOOL 5f352f78a779c5d042f04966a010b10af706c4db94976870721a550e3ab7eaf2695b3582c86cdcc3a11de36283e11fe65797f96e59df96fa367b16b72b5f9213
diff --git a/dev-qt/qdoc/metadata.xml b/dev-qt/qdoc/metadata.xml
new file mode 100644
index 000000000000..afb3b434585b
--- /dev/null
+++ b/dev-qt/qdoc/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qdoc/qdoc-5.4.2.ebuild b/dev-qt/qdoc/qdoc-5.4.2.ebuild
new file mode 100644
index 000000000000..71331d02f08c
--- /dev/null
+++ b/dev-qt/qdoc/qdoc-5.4.2.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="Qt documentation generator"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}
+ ~dev-qt/qtxml-${PV}
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/tools/qdoc
+)
diff --git a/dev-qt/qt-creator/Manifest b/dev-qt/qt-creator/Manifest
new file mode 100644
index 000000000000..22e0b3c27fd8
--- /dev/null
+++ b/dev-qt/qt-creator/Manifest
@@ -0,0 +1,3 @@
+DIST qt-creator-2.8.1-src.tar.gz 24381282 SHA256 d5ae007a297a4288d0e95fd605edbfb8aee80f6788c7a6cfb9cb297f50c364b9 SHA512 954b0caa9a4c6b7debf62562f3c8f1b4edee13488867208e7d41544b244a111024f2c4c144e4b44e98973cf1d7b5885c13c0b6996ade58e204887eb13bb999cb WHIRLPOOL 1aa5018e19315bd2528580ffa388ff17d96666747e4abad28ea4bcd38315e6efc66379cdda90cb32c17dd1631d0ebedff422e53ee0b9b3c40d7a5766ff4dd9b4
+DIST qt-creator-opensource-src-3.2.2.tar.gz 22789455 SHA256 a115f1d7b08446dcfeb79537f3d8d251dbc3c9808d0ff377efe5c4fad7dbd8f0 SHA512 f85381eb6f56d787e5efe02407c4b6f949fd2a766a25567ceccb3a002ec7dd9c6277d9cf39ef0afdd8e110d7bc7436344756225784009a2e01ba9fd8428f885e WHIRLPOOL aa65009cffbc10161cdd9f8e70121c5b2e80df034bb1e06400558a947dcf3284cc23d1b162f85a7ed19af216f0d94d0c5f997c0072c3f19149f64e528fde36a7
+DIST qt-creator-opensource-src-3.4.2.tar.gz 23239370 SHA256 f57df9954768badb252154a51cca9b21a4903f8e003ef944d25801cde1754bab SHA512 65a93574bf6dd35ef4769d4e8a40cb183b2904af6cd32616c15e57654ab575280e7a5d0bbe43296a012e79127831b46fa21890d65472e0c781a95461e5a50812 WHIRLPOOL a56fbb9ea76e9cc7886ee447503c4f7ca646ebf19a113ab95b9b3788d8d75871850c358f13bbd3093f544c65c65f916006cb7571a73292376a7629c236cf0e74
diff --git a/dev-qt/qt-creator/metadata.xml b/dev-qt/qt-creator/metadata.xml
new file mode 100644
index 000000000000..2f6432bee49b
--- /dev/null
+++ b/dev-qt/qt-creator/metadata.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>pesa@gentoo.org</email>
+ <name>Davide Pesavento</name>
+</maintainer>
+<herd>qt</herd>
+<use>
+ <flag name="android">Build plugin for Android devices</flag>
+ <flag name="autotools">Enable autotools project manager plugin</flag>
+ <flag name="baremetal">Build plugin for bare metal devices</flag>
+ <flag name="bazaar">Add support for <pkg>dev-vcs/bzr</pkg> version control system</flag>
+ <flag name="clang">Build clang-based code model plugin</flag>
+ <flag name="clearcase">Add support for IBM ClearCase version control system (requires manual installation of ClearCase client)</flag>
+ <flag name="cmake">Enable cmake project manager plugin</flag>
+ <flag name="fakevim">Enable support for vim-like key bindings</flag>
+ <flag name="ios">Build plugin for Apple iOS devices</flag>
+ <flag name="madde">Enable integration with MADDE (Maemo Application Development and Debugging Environment)</flag>
+ <flag name="mercurial">Add support for <pkg>dev-vcs/mercurial</pkg> version control system</flag>
+ <flag name="perforce">Add support for Perforce version control system (requires manual installation of Perforce client)</flag>
+ <flag name="python">Enable Python source code editor</flag>
+ <flag name="qbs">Enable QBS project manager plugin</flag>
+ <flag name="qnx">Build plugin for QNX/Blackberry devices</flag>
+ <flag name="systemd">Add support for retrieving application output from journald</flag>
+ <flag name="valgrind">Add support for memory debugging using <pkg>dev-util/valgrind</pkg></flag>
+ <flag name="winrt">Build plugin for WinRT devices</flag>
+</use>
+<upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/qtcreator/</doc>
+</upstream>
+</pkgmetadata>
diff --git a/dev-qt/qt-creator/qt-creator-2.8.1.ebuild b/dev-qt/qt-creator/qt-creator-2.8.1.ebuild
new file mode 100644
index 000000000000..12e9df9028c5
--- /dev/null
+++ b/dev-qt/qt-creator/qt-creator-2.8.1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PLOCALES="cs de es fr it ja pl ru sl uk zh_CN zh_TW"
+
+inherit eutils l10n multilib qt4-r2
+
+DESCRIPTION="Lightweight IDE for C++/QML development centering around Qt"
+HOMEPAGE="http://doc.qt.io/qtcreator/"
+LICENSE="LGPL-2.1"
+
+if [[ ${PV} == *9999* ]]; then
+ inherit git-2
+ EGIT_REPO_URI="git://code.qt.io/${PN}/${PN}.git
+ https://code.qt.io/git/${PN}/${PN}.git"
+else
+ MY_PV=${PV/_/-}
+ MY_P=${PN}-${MY_PV}-src
+ [[ ${MY_PV} == ${PV} ]] && MY_REL=official || MY_REL=development
+ SRC_URI="http://download.qt.io/${MY_REL}_releases/${PN/-}/${PV%.*}/${MY_PV}/${MY_P}.tar.gz"
+ S=${WORKDIR}/${MY_P}
+fi
+
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc x86"
+
+QTC_PLUGINS=(android autotools:autotoolsprojectmanager bazaar
+ clearcase cmake:cmakeprojectmanager cvs fakevim git
+ madde mercurial perforce qnx subversion valgrind)
+IUSE="debug doc examples test ${QTC_PLUGINS[@]%:*}"
+
+# minimum Qt version required
+QT_PV="4.8.5:4"
+
+CDEPEND="
+ =dev-libs/botan-1.10*[threads]
+ >=dev-qt/designer-${QT_PV}
+ >=dev-qt/qtcore-${QT_PV}[ssl]
+ >=dev-qt/qtdeclarative-${QT_PV}[accessibility]
+ >=dev-qt/qtgui-${QT_PV}[accessibility]
+ >=dev-qt/qthelp-${QT_PV}[doc?]
+ >=dev-qt/qtscript-${QT_PV}
+ >=dev-qt/qtsql-${QT_PV}
+ >=dev-qt/qtsvg-${QT_PV}[accessibility]
+"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ test? ( >=dev-qt/qttest-${QT_PV} )
+"
+RDEPEND="${CDEPEND}
+ >=sys-devel/gdb-7.2[python]
+ examples? ( >=dev-qt/qtdemo-${QT_PV} )
+"
+PDEPEND="
+ autotools? ( sys-devel/autoconf )
+ bazaar? ( dev-vcs/bzr )
+ cmake? ( dev-util/cmake )
+ cvs? ( dev-vcs/cvs )
+ git? ( dev-vcs/git )
+ mercurial? ( dev-vcs/mercurial )
+ subversion? ( dev-vcs/subversion )
+ valgrind? ( dev-util/valgrind )
+"
+
+src_prepare() {
+ qt4-r2_src_prepare
+
+ # disable unwanted plugins
+ for plugin in "${QTC_PLUGINS[@]#[+-]}"; do
+ if ! use ${plugin%:*}; then
+ einfo "Disabling ${plugin%:*} plugin"
+ sed -i -re "/^\s+${plugin#*:}\>/d" src/plugins/plugins.pro \
+ || die "failed to disable ${plugin%:*} plugin"
+ fi
+ done
+
+ # fix translations
+ sed -i -e "/^LANGUAGES =/ s:=.*:= $(l10n_get_locales):" \
+ share/qtcreator/translations/translations.pro || die
+
+ # remove bundled qbs
+ rm -rf src/shared/qbs || die
+}
+
+src_configure() {
+ EQMAKE4_EXCLUDE="share/qtcreator/templates/*
+ tests/*"
+ eqmake4 IDE_LIBRARY_BASENAME="$(get_libdir)" \
+ IDE_PACKAGE_MODE=1 \
+ TEST=$(use test && echo 1 || echo 0) \
+ USE_SYSTEM_BOTAN=1
+}
+
+src_test() {
+ echo ">>> Test phase [QTest]: ${CATEGORY}/${PF}"
+ cd tests/auto || die
+
+ EQMAKE4_EXCLUDE="valgrind/*"
+ eqmake4 IDE_LIBRARY_BASENAME="$(get_libdir)"
+
+ emake check
+}
+
+src_install() {
+ emake INSTALL_ROOT="${ED}usr" install
+
+ dodoc dist/{changes-*,known-issues}
+
+ # install documentation
+ if use doc; then
+ emake docs
+ insinto /usr/share/doc/${PF}
+ doins share/doc/qtcreator/qtcreator{,-dev}.qch
+ docompress -x /usr/share/doc/${PF}/qtcreator{,-dev}.qch
+ fi
+
+ # install desktop file
+ make_desktop_entry qtcreator 'Qt Creator' QtProject-qtcreator 'Qt;Development;IDE'
+}
diff --git a/dev-qt/qt-creator/qt-creator-3.2.2.ebuild b/dev-qt/qt-creator/qt-creator-3.2.2.ebuild
new file mode 100644
index 000000000000..20796e00e2e0
--- /dev/null
+++ b/dev-qt/qt-creator/qt-creator-3.2.2.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PLOCALES="cs de fr ja pl ru sl uk zh_CN zh_TW"
+
+inherit eutils l10n multilib qmake-utils virtualx
+
+DESCRIPTION="Lightweight IDE for C++/QML development centering around Qt"
+HOMEPAGE="http://doc.qt.io/qtcreator/"
+LICENSE="|| ( LGPL-2.1 LGPL-3 )"
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI=(
+ "git://code.qt.io/${PN}/${PN}.git"
+ "https://code.qt.io/git/${PN}/${PN}.git"
+ )
+else
+ MY_PV=${PV/_/-}
+ MY_P=${PN}-opensource-src-${MY_PV}
+ [[ ${MY_PV} == ${PV} ]] && MY_REL=official || MY_REL=development
+ SRC_URI="http://download.qt.io/${MY_REL}_releases/${PN/-}/${PV%.*}/${MY_PV}/${MY_P}.tar.gz"
+ S=${WORKDIR}/${MY_P}
+fi
+
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+
+QTC_PLUGINS=(android autotools:autotoolsprojectmanager baremetal bazaar
+ clang:clangcodemodel clearcase cmake:cmakeprojectmanager cvs git
+ ios mercurial perforce python:pythoneditor qnx subversion valgrind)
+IUSE="debug doc test webkit ${QTC_PLUGINS[@]%:*}"
+
+# minimum Qt version required
+QT_PV="4.8.5:4"
+
+RDEPEND="
+ =dev-libs/botan-1.10*[threads]
+ >=dev-qt/designer-${QT_PV}
+ >=dev-qt/qtcore-${QT_PV}[ssl]
+ >=dev-qt/qtdeclarative-${QT_PV}[accessibility]
+ >=dev-qt/qtgui-${QT_PV}[accessibility]
+ >=dev-qt/qthelp-${QT_PV}[doc?]
+ >=dev-qt/qtscript-${QT_PV}
+ >=dev-qt/qtsql-${QT_PV}
+ >=dev-qt/qtsvg-${QT_PV}[accessibility]
+ >=sys-devel/gdb-7.5[client,python]
+ clang? ( >=sys-devel/clang-3.2:= )
+ webkit? ( >=dev-qt/qtwebkit-${QT_PV} )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( >=dev-qt/qttest-${QT_PV} )
+"
+PDEPEND="
+ autotools? ( sys-devel/autoconf )
+ bazaar? ( dev-vcs/bzr )
+ cmake? ( dev-util/cmake )
+ cvs? ( dev-vcs/cvs )
+ git? ( dev-vcs/git )
+ mercurial? ( dev-vcs/mercurial )
+ subversion? ( dev-vcs/subversion )
+ valgrind? ( dev-util/valgrind )
+"
+
+src_prepare() {
+ # disable unwanted plugins
+ for plugin in "${QTC_PLUGINS[@]#[+-]}"; do
+ if ! use ${plugin%:*}; then
+ einfo "Disabling ${plugin%:*} plugin"
+ sed -i -re "/(^\s+|SUBDIRS\s*\+=\s*)(${plugin#*:})\>/d" \
+ src/plugins/plugins.pro || die "failed to disable ${plugin%:*} plugin"
+ fi
+ done
+
+ # automagic dep on qtwebkit (bug 538236)
+ if ! use webkit; then
+ sed -i -e 's/contains(QT_CONFIG, webkit).*$/DEFINES += QT_NO_WEBKIT/' \
+ src/plugins/help/help.pro || die "failed to disable webkit"
+ fi
+
+ # disable broken or unreliable tests
+ sed -i -e '/lexer/d' tests/auto/cplusplus/cplusplus.pro || die
+ sed -i -e '/dumpers\.pro/d' tests/auto/debugger/debugger.pro || die
+ sed -i -e '/CONFIG -=/ s/$/ testcase/' tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin?/plugin?.pro || die
+ sed -i -e '/parsertests\.pro/d' tests/auto/valgrind/memcheck/memcheck.pro || die
+
+ # fix translations
+ sed -i -e "/^LANGUAGES =/ s:=.*:= $(l10n_get_locales):" \
+ share/qtcreator/translations/translations.pro || die
+
+ # remove bundled qbs
+ rm -rf src/shared/qbs || die
+}
+
+src_configure() {
+ EQMAKE4_EXCLUDE="share/qtcreator/templates/*
+ tests/*"
+ eqmake4 IDE_LIBRARY_BASENAME="$(get_libdir)" \
+ IDE_PACKAGE_MODE=1 \
+ LLVM_INSTALL_DIR="${EPREFIX}/usr" \
+ $(use test && echo BUILD_TESTS=1) \
+ USE_SYSTEM_BOTAN=1
+}
+
+src_test() {
+ cd tests/auto || die
+ VIRTUALX_COMMAND=default virtualmake
+}
+
+src_install() {
+ emake INSTALL_ROOT="${ED}usr" install
+
+ dodoc dist/{changes-*,known-issues}
+
+ # install documentation
+ if use doc; then
+ emake docs
+ # don't use ${PF} or the doc will not be found
+ insinto /usr/share/doc/qtcreator
+ doins share/doc/qtcreator/qtcreator{,-dev}.qch
+ docompress -x /usr/share/doc/qtcreator/qtcreator{,-dev}.qch
+ fi
+
+ # install desktop file
+ make_desktop_entry qtcreator 'Qt Creator' QtProject-qtcreator 'Qt;Development;IDE'
+}
diff --git a/dev-qt/qt-creator/qt-creator-3.4.2.ebuild b/dev-qt/qt-creator/qt-creator-3.4.2.ebuild
new file mode 100644
index 000000000000..fde9f62e4831
--- /dev/null
+++ b/dev-qt/qt-creator/qt-creator-3.4.2.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PLOCALES="cs de fr ja pl ru sl uk zh_CN zh_TW"
+
+inherit eutils l10n multilib qmake-utils virtualx
+
+DESCRIPTION="Lightweight IDE for C++/QML development centering around Qt"
+HOMEPAGE="http://doc.qt.io/qtcreator/"
+LICENSE="|| ( LGPL-2.1 LGPL-3 )"
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI=(
+ "git://code.qt.io/${PN}/${PN}.git"
+ "https://code.qt.io/git/${PN}/${PN}.git"
+ )
+else
+ MY_PV=${PV/_/-}
+ MY_P=${PN}-opensource-src-${MY_PV}
+ [[ ${MY_PV} == ${PV} ]] && MY_REL=official || MY_REL=development
+ SRC_URI="http://download.qt.io/${MY_REL}_releases/${PN/-}/${PV%.*}/${MY_PV}/${MY_P}.tar.gz"
+ S=${WORKDIR}/${MY_P}
+fi
+
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+QTC_PLUGINS=('android:android|qmakeandroidsupport' autotools:autotoolsprojectmanager baremetal
+ bazaar clang:clangcodemodel clearcase cmake:cmakeprojectmanager cvs git ios mercurial
+ perforce python:pythoneditor qbs:qbsprojectmanager qnx subversion valgrind winrt)
+IUSE="doc systemd test webkit ${QTC_PLUGINS[@]%:*}"
+
+# minimum Qt version required
+QT_PV="5.3.2:5"
+
+RDEPEND="
+ =dev-libs/botan-1.10*[threads]
+ >=dev-qt/designer-${QT_PV}
+ >=dev-qt/qtconcurrent-${QT_PV}
+ >=dev-qt/qtcore-${QT_PV}
+ >=dev-qt/qtdeclarative-${QT_PV}[widgets]
+ >=dev-qt/qtgui-${QT_PV}
+ >=dev-qt/qthelp-${QT_PV}
+ >=dev-qt/qtnetwork-${QT_PV}[ssl]
+ >=dev-qt/qtprintsupport-${QT_PV}
+ >=dev-qt/qtquick1-${QT_PV}
+ >=dev-qt/qtquickcontrols-${QT_PV}
+ >=dev-qt/qtscript-${QT_PV}
+ >=dev-qt/qtsql-${QT_PV}
+ >=dev-qt/qtsvg-${QT_PV}
+ >=dev-qt/qtwidgets-${QT_PV}
+ >=dev-qt/qtx11extras-${QT_PV}
+ >=dev-qt/qtxml-${QT_PV}
+ >=sys-devel/gdb-7.5[client,python]
+ clang? ( >=sys-devel/clang-3.2:= )
+ qbs? ( >=dev-util/qbs-1.4.1 )
+ systemd? ( sys-apps/systemd:= )
+ webkit? ( >=dev-qt/qtwebkit-${QT_PV} )
+"
+DEPEND="${RDEPEND}
+ >=dev-qt/linguist-tools-${QT_PV}
+ virtual/pkgconfig
+ doc? ( >=dev-qt/qdoc-${QT_PV} )
+ test? ( >=dev-qt/qttest-${QT_PV} )
+"
+for x in ${PLOCALES}; do
+ # qt translations must be installed for qt-creator translations to work
+ RDEPEND+=" linguas_${x}? ( >=dev-qt/qttranslations-${QT_PV} )"
+done
+unset x
+
+PDEPEND="
+ autotools? ( sys-devel/autoconf )
+ bazaar? ( dev-vcs/bzr )
+ cmake? ( dev-util/cmake )
+ cvs? ( dev-vcs/cvs )
+ git? ( dev-vcs/git )
+ mercurial? ( dev-vcs/mercurial )
+ subversion? ( dev-vcs/subversion )
+ valgrind? ( dev-util/valgrind )
+"
+
+src_prepare() {
+ # disable unwanted plugins
+ for plugin in "${QTC_PLUGINS[@]#[+-]}"; do
+ if ! use ${plugin%:*}; then
+ einfo "Disabling ${plugin%:*} plugin"
+ sed -i -re "/(^\s+|SUBDIRS\s*\+=\s*)(${plugin#*:})\>/d" \
+ src/plugins/plugins.pro || die "failed to disable ${plugin%:*} plugin"
+ fi
+ done
+
+ # automagic dep on qtwebkit (bug 538236)
+ if ! use webkit; then
+ sed -i -e 's/isEmpty(QT\.webkitwidgets\.name)/true/' \
+ src/plugins/help/help.pro || die "failed to disable webkit"
+ fi
+
+ # disable broken or unreliable tests
+ sed -i -e '/lexer/d' tests/auto/cplusplus/cplusplus.pro || die
+ sed -i -e '/dumpers\.pro/d' tests/auto/debugger/debugger.pro || die
+ sed -i -e '/CONFIG -=/ s/$/ testcase/' tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin?/plugin?.pro || die
+ sed -i -e '/parsertests\.pro/d' tests/auto/valgrind/memcheck/memcheck.pro || die
+
+ # fix translations
+ sed -i -e "/^LANGUAGES =/ s:=.*:= $(l10n_get_locales):" \
+ share/qtcreator/translations/translations.pro || die
+
+ # remove bundled qbs
+ rm -rf src/shared/qbs || die
+}
+
+src_configure() {
+ eqmake5 IDE_LIBRARY_BASENAME="$(get_libdir)" \
+ IDE_PACKAGE_MODE=1 \
+ LLVM_INSTALL_DIR="${EPREFIX}/usr" \
+ QBS_INSTALL_DIR="${EPREFIX}/usr" \
+ CONFIG+=qbs_disable_rpath \
+ CONFIG+=qbs_enable_project_file_updates \
+ $(use systemd && echo CONFIG+=journald) \
+ $(use test && echo BUILD_TESTS=1) \
+ USE_SYSTEM_BOTAN=1
+}
+
+src_test() {
+ cd tests/auto || die
+ VIRTUALX_COMMAND=default virtualmake
+}
+
+src_install() {
+ emake INSTALL_ROOT="${ED}usr" install
+
+ dodoc dist/{changes-*,known-issues}
+
+ # install documentation
+ if use doc; then
+ emake docs
+ # don't use ${PF} or the doc will not be found
+ insinto /usr/share/doc/qtcreator
+ doins share/doc/qtcreator/qtcreator{,-dev}.qch
+ docompress -x /usr/share/doc/qtcreator/qtcreator{,-dev}.qch
+ fi
+
+ # install desktop file
+ make_desktop_entry qtcreator 'Qt Creator' QtProject-qtcreator 'Qt;Development;IDE'
+}
diff --git a/dev-qt/qt-docs/Manifest b/dev-qt/qt-docs/Manifest
new file mode 100644
index 000000000000..1c3aed7ecc04
--- /dev/null
+++ b/dev-qt/qt-docs/Manifest
@@ -0,0 +1,2 @@
+DIST 5.4.2-0qt5_docs.7z 78495429 SHA256 c2ac1a18467a0fbb1d2504d78085e6c0d4901442d79895894fcc078fb310c719 SHA512 9e13b1f3e7daa38e91695d193bc67c3ddcc2d0d86febd6c53b4045bebbae7e97171c30990ba702440597861fdcfe780a177918fa334f190970dc933985cb55ff WHIRLPOOL 531521c00af6be74d2b1c4ad782f43cdae8fe8dfe67863582e8672342bd2df653f682fe5aeeb4782c302cf4074d4abe5d1a4356a07899725b062790d58bb1d46
+DIST 5.5.0-0qt5_docs.7z 83725712 SHA256 673ec0493b95cb16fed7600d27dd29478c419a370323f7fda4a8900ffa3c813e SHA512 e3cda1ae5b64ce9cc391f15683621d21c2075cf7bd861a485555d70b25e706c37c64f62d940390c2ae73ed21b1cdb87f1fb643b45d51e42116a048d4e5b14fe5 WHIRLPOOL 007b80b832f9db6691bde1d7fc071eaca54d60515764ab6a181c7d78108d6f9a1709dd44cda14de453f0258fd87006db830713e5212e60784a4921ab8be5c982
diff --git a/dev-qt/qt-docs/metadata.xml b/dev-qt/qt-docs/metadata.xml
new file mode 100644
index 000000000000..b41982b9d583
--- /dev/null
+++ b/dev-qt/qt-docs/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qt-docs/qt-docs-5.4.2_p0.ebuild b/dev-qt/qt-docs/qt-docs-5.4.2_p0.ebuild
new file mode 100644
index 000000000000..e1171d51a551
--- /dev/null
+++ b/dev-qt/qt-docs/qt-docs-5.4.2_p0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit versionator
+
+MY_PV=$(get_version_component_range 1)$(get_version_component_range 2)
+
+DESCRIPTION="Documentation for Qt5, for use with Qt Creator and other tools"
+HOMEPAGE="https://www.qt.io/"
+SRC_URI="http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_${MY_PV}_src_doc_examples/qt.${MY_PV}.doc/${PV/_p/-}qt5_docs.7z"
+
+LICENSE="FDL-1.3"
+SLOT="5"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="app-arch/p7zip"
+
+S=${WORKDIR}/Docs/Qt-$(get_version_component_range 1-2)
+
+src_install() {
+ # remove global docs that conflict with qtcore
+ rm -rf global
+
+ # ${PV} instead of ${PF} is intentional
+ local dest=/usr/share/doc/qt-${PV%%_p*}
+ insinto "${dest}"
+ doins -r *
+ docompress -x "${dest}"
+}
diff --git a/dev-qt/qt-docs/qt-docs-5.5.0_p0.ebuild b/dev-qt/qt-docs/qt-docs-5.5.0_p0.ebuild
new file mode 100644
index 000000000000..e1171d51a551
--- /dev/null
+++ b/dev-qt/qt-docs/qt-docs-5.5.0_p0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit versionator
+
+MY_PV=$(get_version_component_range 1)$(get_version_component_range 2)
+
+DESCRIPTION="Documentation for Qt5, for use with Qt Creator and other tools"
+HOMEPAGE="https://www.qt.io/"
+SRC_URI="http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_${MY_PV}_src_doc_examples/qt.${MY_PV}.doc/${PV/_p/-}qt5_docs.7z"
+
+LICENSE="FDL-1.3"
+SLOT="5"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="app-arch/p7zip"
+
+S=${WORKDIR}/Docs/Qt-$(get_version_component_range 1-2)
+
+src_install() {
+ # remove global docs that conflict with qtcore
+ rm -rf global
+
+ # ${PV} instead of ${PF} is intentional
+ local dest=/usr/share/doc/qt-${PV%%_p*}
+ insinto "${dest}"
+ doins -r *
+ docompress -x "${dest}"
+}
diff --git a/dev-qt/qt-meta/metadata.xml b/dev-qt/qt-meta/metadata.xml
new file mode 100644
index 000000000000..57efc4651f96
--- /dev/null
+++ b/dev-qt/qt-meta/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="kde">Select <pkg>media-libs/phonon</pkg> as Phonon variant (needed for KDE)</flag>
+ <flag name="openvg">Enable the QtOpenVG module</flag>
+ <flag name="qt3support">Enable the Qt3Support library for Qt4</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-qt/qt-meta/qt-meta-4.8.5.ebuild b/dev-qt/qt-meta/qt-meta-4.8.5.ebuild
new file mode 100644
index 000000000000..b812f55f6c24
--- /dev/null
+++ b/dev-qt/qt-meta/qt-meta-4.8.5.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Cross-platform application development framework (metapackage)"
+HOMEPAGE="https://www.qt.io/"
+
+LICENSE="metapackage"
+SLOT="4"
+KEYWORDS="amd64 ~arm ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="+dbus examples kde openvg +qt3support +webkit"
+
+DEPEND=""
+RDEPEND="
+ >=dev-qt/assistant-${PV}:4
+ >=dev-qt/designer-${PV}:4
+ >=dev-qt/linguist-${PV}:4
+ >=dev-qt/pixeltool-${PV}:4
+ dbus? ( >=dev-qt/qdbusviewer-${PV}:4 )
+ qt3support? ( >=dev-qt/qt3support-${PV}:4 )
+ >=dev-qt/qtbearer-${PV}:4
+ >=dev-qt/qtcore-${PV}:4
+ dbus? ( >=dev-qt/qtdbus-${PV}:4 )
+ >=dev-qt/qtdeclarative-${PV}:4
+ examples? ( >=dev-qt/qtdemo-${PV}:4 )
+ >=dev-qt/qtgui-${PV}:4
+ >=dev-qt/qthelp-${PV}:4
+ >=dev-qt/qtmultimedia-${PV}:4
+ >=dev-qt/qtopengl-${PV}:4
+ openvg? ( >=dev-qt/qtopenvg-${PV}:4 )
+ kde? ( media-libs/phonon[qt4] )
+ !kde? ( || ( >=dev-qt/qtphonon-${PV}:4 media-libs/phonon[qt4] ) )
+ >=dev-qt/qtscript-${PV}:4
+ >=dev-qt/qtsql-${PV}:4
+ >=dev-qt/qtsvg-${PV}:4
+ >=dev-qt/qttest-${PV}:4
+ webkit? ( >=dev-qt/qtwebkit-${PV}:4 )
+ >=dev-qt/qtxmlpatterns-${PV}:4
+"
diff --git a/dev-qt/qt-mobility/Manifest b/dev-qt/qt-mobility/Manifest
new file mode 100644
index 000000000000..45455e7eab4a
--- /dev/null
+++ b/dev-qt/qt-mobility/Manifest
@@ -0,0 +1 @@
+DIST qt-mobility-1.2.2_p20130703.tar.xz 16748672 SHA256 c4f1578a8384a520744ece9c19639600029d1fac2b55e0f110ec5700911aad44 SHA512 51e960dbcab3641906043c0e3dc6c44da2a66d11a15f5ec255776cef299d1403eeb0df55ee953567fdafd4c2a88a6514dcf1e2f8ba0af574c44e02e809f42287 WHIRLPOOL 4e7ee4039fbb4e8f8cfd7f720d232ddf79d61c3cd62ad5851e490c9284badf3431852eb56dfea18e3caf350e2e0ccd50f3244abc04bd68ffc6f6de67e644d3c4
diff --git a/dev-qt/qt-mobility/metadata.xml b/dev-qt/qt-mobility/metadata.xml
new file mode 100644
index 000000000000..557271548b9f
--- /dev/null
+++ b/dev-qt/qt-mobility/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>qt</herd>
+<use>
+ <flag name="bluetooth">Enable Bluetooth support in QtConnectivity and QtSystemInfo modules</flag>
+ <flag name="connectivity">Build the QtConnectivity module</flag>
+ <flag name="contacts">Build the QtContacts module</flag>
+ <flag name="feedback">Build the QtFeedback module</flag>
+ <flag name="gallery">Build the QtGallery module</flag>
+ <flag name="location">Build the QtLocation module</flag>
+ <flag name="messaging">Build the QtMessaging module</flag>
+ <flag name="multimedia">Build the QtMultimediaKit module</flag>
+ <flag name="networkmanager">Enable NetworkManager support in QtBearer and QtSystemInfo modules</flag>
+ <flag name="organizer">Build the QtOrganizer module</flag>
+ <flag name="publishsubscribe">Build the QtPublishSubscribe module</flag>
+ <flag name="pulseaudio">Enable PulseAudio support in QtMultimediaKit module</flag>
+ <flag name="qml">Build QML bindings</flag>
+ <flag name="sensors">Build the QtSensors module</flag>
+ <flag name="serviceframework">Build the QtServiceFramework module</flag>
+ <flag name="systeminfo">Build the QtSystemInfo module</flag>
+ <flag name="tools">Build various useful tools (e.g.: qcrmlgen, servicexmlgen, vsexplorer, ...)</flag>
+ <flag name="versit">Build the QtVersit module</flag>
+</use>
+<upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc-snapshots.qt.io/qt-mobility/index.html</doc>
+</upstream>
+</pkgmetadata>
diff --git a/dev-qt/qt-mobility/qt-mobility-1.2.2_p20130703-r1.ebuild b/dev-qt/qt-mobility/qt-mobility-1.2.2_p20130703-r1.ebuild
new file mode 100644
index 000000000000..541be1f16714
--- /dev/null
+++ b/dev-qt/qt-mobility/qt-mobility-1.2.2_p20130703-r1.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib qt4-r2
+
+DESCRIPTION="Additional Qt APIs for mobile devices and desktop platforms"
+HOMEPAGE="http://doc-snapshots.qt.io/qt-mobility/index.html"
+SRC_URI="http://dev.gentoo.org/~pesa/distfiles/${P}.tar.xz"
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc ~ppc64 x86"
+
+QT_MOBILITY_MODULES=(connectivity +contacts feedback gallery location
+ messaging multimedia organizer publishsubscribe
+ sensors serviceframework systeminfo versit)
+IUSE="bluetooth debug doc networkmanager pulseaudio qml +tools
+ ${QT_MOBILITY_MODULES[@]}"
+
+REQUIRED_USE="
+ || ( ${QT_MOBILITY_MODULES[@]#[+-]} )
+ versit? ( contacts )
+"
+
+RDEPEND="
+ >=dev-qt/qtcore-4.8.0:4
+ connectivity? (
+ >=dev-qt/qtdbus-4.8.0:4
+ bluetooth? ( net-wireless/bluez )
+ )
+ contacts? ( >=dev-qt/qtgui-4.8.0:4 )
+ gallery? ( >=dev-qt/qtdbus-4.8.0:4 )
+ location? (
+ >=dev-qt/qtdeclarative-4.8.0:4
+ >=dev-qt/qtgui-4.8.0:4
+ >=dev-qt/qtsql-4.8.0:4[sqlite]
+ )
+ messaging? ( >=net-libs/qmf-4.0 )
+ multimedia? (
+ >=dev-qt/qtgui-4.8.0-r4:4[xv]
+ >=dev-qt/qtopengl-4.8.0:4
+ media-libs/alsa-lib
+ media-libs/gstreamer:0.10
+ media-libs/gst-plugins-bad:0.10
+ media-libs/gst-plugins-base:0.10
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXv
+ pulseaudio? ( media-sound/pulseaudio[alsa] )
+ )
+ publishsubscribe? (
+ tools? ( >=dev-qt/qtgui-4.8.0:4 )
+ )
+ qml? ( >=dev-qt/qtdeclarative-4.8.0:4 )
+ serviceframework? (
+ >=dev-qt/qtdbus-4.8.0:4
+ >=dev-qt/qtsql-4.8.0:4[sqlite]
+ tools? ( >=dev-qt/qtgui-4.8.0:4 )
+ )
+ systeminfo? (
+ >=dev-qt/qtdbus-4.8.0:4
+ >=dev-qt/qtgui-4.8.0:4
+ sys-apps/util-linux
+ virtual/libudev:=
+ x11-libs/libX11
+ x11-libs/libXrandr
+ bluetooth? ( net-wireless/bluez )
+ networkmanager? ( net-misc/networkmanager )
+ )
+ versit? ( >=dev-qt/qtgui-4.8.0:4 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( >=dev-qt/qthelp-4.8.0:4 )
+ multimedia? (
+ sys-kernel/linux-headers
+ x11-proto/videoproto
+ )
+ systeminfo? ( sys-kernel/linux-headers )
+"
+
+src_prepare() {
+ qt4-r2_src_prepare
+
+ # disable building of code snippets in doc/
+ # and translations (they aren't actually translated)
+ sed -i -re '/SUBDIRS \+= (doc|translations)/d' qtmobility.pro || die
+
+ # fix automagic dependency on qt-declarative
+ if ! use qml; then
+ sed -i -e '/SUBDIRS += declarative/d' plugins/plugins.pro || die
+ fi
+}
+
+src_configure() {
+ # figure out which modules to build
+ local modules=
+ for mod in "${QT_MOBILITY_MODULES[@]#[+-]}"; do
+ use ${mod} && modules+="${mod} "
+ done
+
+ # custom configure script
+ local myconf=(
+ ./configure
+ -prefix "${EPREFIX}/usr"
+ -headerdir "${EPREFIX}/usr/include/qt4"
+ -libdir "${EPREFIX}/usr/$(get_libdir)/qt4"
+ -plugindir "${EPREFIX}/usr/$(get_libdir)/qt4/plugins"
+ $(use debug && echo -debug || echo -release)
+ $(use doc || echo -no-docs)
+ $(use tools || echo -no-tools)
+ -modules "${modules}"
+ )
+ echo "${myconf[@]}"
+ "${myconf[@]}" || die "configure failed"
+
+ # fix automagic dependency on bluez
+ if ! use bluetooth; then
+ sed -i -e '/^bluez_enabled =/s:yes:no:' config.pri || die
+ fi
+
+ # fix automagic dependency on networkmanager
+ if ! use networkmanager; then
+ sed -i -e '/^networkmanager_enabled =/s:yes:no:' config.pri || die
+ fi
+
+ # fix automagic dependency on pulseaudio
+ if ! use pulseaudio; then
+ sed -i -e '/^pulseaudio_enabled =/s:yes:no:' config.pri || die
+ fi
+
+ eqmake4 -recursive
+}
+
+src_compile() {
+ qt4-r2_src_compile
+
+ use doc && emake docs
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ if use doc; then
+ dodoc -r doc/html
+ dodoc doc/qch/qtmobility.qch
+ docompress -x /usr/share/doc/${PF}/qtmobility.qch
+ fi
+}
diff --git a/dev-qt/qt3support/Manifest b/dev-qt/qt3support/Manifest
new file mode 100644
index 000000000000..ac4ca6af0d23
--- /dev/null
+++ b/dev-qt/qt3support/Manifest
@@ -0,0 +1,3 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
diff --git a/dev-qt/qt3support/metadata.xml b/dev-qt/qt3support/metadata.xml
new file mode 100644
index 000000000000..258aee1d6e0d
--- /dev/null
+++ b/dev-qt/qt3support/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qt3support/qt3support-4.8.5.ebuild b/dev-qt/qt3support/qt3support-4.8.5.ebuild
new file mode 100644
index 000000000000..62467da75478
--- /dev/null
+++ b/dev-qt/qt3support/qt3support-4.8.5.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-build
+
+DESCRIPTION="The Qt3Support module for the Qt toolkit"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+IUSE="+accessibility"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,qt3support]
+ ~dev-qt/qtgui-${PV}[accessibility=,aqua=,debug=,qt3support]
+ ~dev-qt/qtsql-${PV}[aqua=,debug=,qt3support]
+"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/qt3support
+ src/tools/uic3
+ tools/porting"
+
+ QT4_EXTRACT_DIRECTORIES="
+ src
+ include
+ tools"
+
+ qt4-build_pkg_setup
+}
+
+src_configure() {
+ myconf+="
+ -qt3support
+ $(qt_use accessibility)"
+
+ qt4-build_src_configure
+}
diff --git a/dev-qt/qt3support/qt3support-4.8.6-r1.ebuild b/dev-qt/qt3support/qt3support-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..3260d42e488f
--- /dev/null
+++ b/dev-qt/qt3support/qt3support-4.8.6-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="The Qt3Support module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm hppa ia64 ppc ppc64"
+else
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="+accessibility"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,qt3support,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[accessibility=,aqua=,debug=,qt3support,${MULTILIB_USEDEP}]
+ ~dev-qt/qtsql-${PV}[aqua=,debug=,qt3support,${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="
+ src/qt3support
+ src/tools/uic3
+ tools/porting"
+
+multilib_src_configure() {
+ local myconf=(
+ -qt3support
+ $(qt_use accessibility)
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qt3support/qt3support-4.8.7.ebuild b/dev-qt/qt3support/qt3support-4.8.7.ebuild
new file mode 100644
index 000000000000..93372ee45d32
--- /dev/null
+++ b/dev-qt/qt3support/qt3support-4.8.7.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="The Qt3Support module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="+accessibility"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,qt3support,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[accessibility=,aqua=,debug=,qt3support,${MULTILIB_USEDEP}]
+ ~dev-qt/qtsql-${PV}[aqua=,debug=,qt3support,${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="
+ src/qt3support
+ src/tools/uic3
+ tools/porting"
+
+multilib_src_configure() {
+ local myconf=(
+ -qt3support
+ $(qt_use accessibility)
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtbearer/Manifest b/dev-qt/qtbearer/Manifest
new file mode 100644
index 000000000000..ac4ca6af0d23
--- /dev/null
+++ b/dev-qt/qtbearer/Manifest
@@ -0,0 +1,3 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
diff --git a/dev-qt/qtbearer/metadata.xml b/dev-qt/qtbearer/metadata.xml
new file mode 100644
index 000000000000..258aee1d6e0d
--- /dev/null
+++ b/dev-qt/qtbearer/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtbearer/qtbearer-4.8.5.ebuild b/dev-qt/qtbearer/qtbearer-4.8.5.ebuild
new file mode 100644
index 000000000000..12788696a2f2
--- /dev/null
+++ b/dev-qt/qtbearer/qtbearer-4.8.5.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-build
+
+DESCRIPTION="The network bearer plugins for the Qt toolkit"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+fi
+IUSE="connman networkmanager"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=]
+ connman? ( ~dev-qt/qtdbus-${PV}[aqua=,debug=] )
+ networkmanager? ( ~dev-qt/qtdbus-${PV}[aqua=,debug=] )
+"
+RDEPEND="${DEPEND}
+ connman? ( net-misc/connman )
+ networkmanager? ( net-misc/networkmanager )
+"
+
+pkg_setup() {
+ QT4_EXTRACT_DIRECTORIES="
+ include/QtCore
+ include/QtDBus
+ include/QtNetwork
+ src/corelib
+ src/dbus
+ src/network
+ src/plugins/bearer
+ src/plugins/qpluginbase.pri"
+
+ QT4_TARGET_DIRECTORIES="
+ src/plugins/bearer/generic
+ $(use connman && echo src/plugins/bearer/connman)
+ $(use networkmanager && echo src/plugins/bearer/networkmanager)"
+
+ qt4-build_pkg_setup
+}
+
+src_configure() {
+ myconf+="
+ $(use connman || use networkmanager || echo -no-dbus)
+ -no-accessibility -no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon
+ -no-phonon-backend -no-svg -no-webkit -no-script -no-scripttools -no-declarative
+ -system-zlib -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg
+ -no-cups -no-gtkstyle -no-nas-sound -no-opengl
+ -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes
+ -no-xrandr -no-xrender -no-mitshm -no-fontconfig -no-freetype -no-xinput -no-xkb"
+
+ qt4-build_src_configure
+}
diff --git a/dev-qt/qtbearer/qtbearer-4.8.6-r1.ebuild b/dev-qt/qtbearer/qtbearer-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..215e9ca01bb7
--- /dev/null
+++ b/dev-qt/qtbearer/qtbearer-4.8.6-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="The network bearer plugins for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm hppa ia64 ppc ppc64"
+else
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd"
+fi
+
+IUSE="connman networkmanager"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ connman? ( ~dev-qt/qtdbus-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+ networkmanager? ( ~dev-qt/qtdbus-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}
+ connman? ( net-misc/connman )
+ networkmanager? ( net-misc/networkmanager )
+"
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/plugins/bearer/generic
+ $(use connman && echo src/plugins/bearer/connman)
+ $(use networkmanager && echo src/plugins/bearer/networkmanager)"
+}
+
+multilib_src_configure() {
+ local myconf=(
+ $(use connman || use networkmanager || echo -no-dbus)
+ -no-accessibility -no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon
+ -no-phonon-backend -no-svg -no-webkit -no-script -no-scripttools -no-declarative
+ -system-zlib -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg
+ -no-cups -no-gtkstyle -no-nas-sound -no-opengl
+ -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes
+ -no-xrandr -no-xrender -no-mitshm -no-fontconfig -no-freetype -no-xinput -no-xkb
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtbearer/qtbearer-4.8.7.ebuild b/dev-qt/qtbearer/qtbearer-4.8.7.ebuild
new file mode 100644
index 000000000000..1acda2e3a05e
--- /dev/null
+++ b/dev-qt/qtbearer/qtbearer-4.8.7.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="The network bearer plugins for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+fi
+
+IUSE="connman networkmanager"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ connman? ( ~dev-qt/qtdbus-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+ networkmanager? ( ~dev-qt/qtdbus-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}
+ connman? ( net-misc/connman )
+ networkmanager? ( net-misc/networkmanager )
+"
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/plugins/bearer/generic
+ $(use connman && echo src/plugins/bearer/connman)
+ $(use networkmanager && echo src/plugins/bearer/networkmanager)"
+}
+
+multilib_src_configure() {
+ local myconf=(
+ $(use connman || use networkmanager || echo -no-dbus)
+ -no-accessibility -no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon
+ -no-phonon-backend -no-svg -no-webkit -no-script -no-scripttools -no-declarative
+ -system-zlib -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg
+ -no-cups -no-gtkstyle -no-nas-sound -no-opengl
+ -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes
+ -no-xrandr -no-xrender -no-mitshm -no-fontconfig -no-freetype -no-xinput -no-xkb
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtchooser/Manifest b/dev-qt/qtchooser/Manifest
new file mode 100644
index 000000000000..da8277d8904b
--- /dev/null
+++ b/dev-qt/qtchooser/Manifest
@@ -0,0 +1 @@
+DIST qtchooser-0_p20150102.tar.xz 30936 SHA256 7b6d622d3a57a1467c57b4ca368220540085698cb7ad226ed782931599e85757 SHA512 15e08f1aaa22ba45d41adda57b9da76f3667d15ab92448b6a95b44287e5043fcae368ddcea1e2b84565d3a96edacbcd68bc515054ffaa81dde4064c9a992dbae WHIRLPOOL 4617444cf9764a82f10f3ff8fdf1102d9c5fdd76c77966c661a5256a98221117696ffccf83ed5b961a53d7b5ff5e0a7f6454627a6ab43427583edf9e3660a1bb
diff --git a/dev-qt/qtchooser/metadata.xml b/dev-qt/qtchooser/metadata.xml
new file mode 100644
index 000000000000..dc439f7e84f5
--- /dev/null
+++ b/dev-qt/qtchooser/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>qt</herd>
+</pkgmetadata>
diff --git a/dev-qt/qtchooser/qtchooser-0_p20150102.ebuild b/dev-qt/qtchooser/qtchooser-0_p20150102.ebuild
new file mode 100644
index 000000000000..8acfc178f098
--- /dev/null
+++ b/dev-qt/qtchooser/qtchooser-0_p20150102.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qmake-utils toolchain-funcs
+
+DESCRIPTION="Qt4/Qt5 version chooser"
+HOMEPAGE="https://qt.gitorious.org/qt/qtchooser"
+SRC_URI="http://dev.gentoo.org/~pesa/distfiles/${P}.tar.xz"
+
+LICENSE="|| ( LGPL-2.1 GPL-3 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 x86"
+IUSE="qt5 test"
+
+DEPEND="qt5? ( test? (
+ dev-qt/qtcore:5
+ dev-qt/qttest:5
+ ) )"
+RDEPEND="
+ !<dev-qt/assistant-4.8.6:4
+ !<dev-qt/designer-4.8.6:4
+ !<dev-qt/linguist-4.8.6:4
+ !<dev-qt/pixeltool-4.8.6:4
+ !<dev-qt/qdbusviewer-4.8.6:4
+ !<dev-qt/qt3support-4.8.6:4
+ !<dev-qt/qtbearer-4.8.6:4
+ !<dev-qt/qtcore-4.8.6:4
+ !<dev-qt/qtdbus-4.8.6:4
+ !<dev-qt/qtdeclarative-4.8.6:4
+ !<dev-qt/qtdemo-4.8.6:4
+ !<dev-qt/qtgui-4.8.6:4
+ !<dev-qt/qthelp-4.8.6:4
+ !<dev-qt/qtmultimedia-4.8.6:4
+ !<dev-qt/qtopengl-4.8.6:4
+ !<dev-qt/qtopenvg-4.8.6:4
+ !<dev-qt/qtphonon-4.8.6:4
+ !<dev-qt/qtscript-4.8.6:4
+ !<dev-qt/qtsql-4.8.6:4
+ !<dev-qt/qtsvg-4.8.6:4
+ !<dev-qt/qttest-4.8.6:4
+ !<dev-qt/qtwebkit-4.8.6:4
+ !<dev-qt/qtxmlpatterns-4.8.6:4
+"
+
+qtchooser_make() {
+ emake \
+ CXX="$(tc-getCXX)" \
+ LFLAGS="${LDFLAGS}" \
+ prefix="${EPREFIX}/usr" \
+ "$@"
+}
+
+src_compile() {
+ qtchooser_make
+}
+
+src_test() {
+ use qt5 || return
+
+ pushd tests/auto >/dev/null || die
+ eqmake5
+ popd >/dev/null || die
+
+ qtchooser_make check
+}
+
+src_install() {
+ qtchooser_make INSTALL_ROOT="${D}" install
+
+ keepdir /etc/xdg/qtchooser
+
+ # TODO: bash and zsh completion
+ # newbashcomp scripts/${PN}.bash ${PN}
+}
diff --git a/dev-qt/qtconcurrent/Manifest b/dev-qt/qtconcurrent/Manifest
new file mode 100644
index 000000000000..0c465bb8036b
--- /dev/null
+++ b/dev-qt/qtconcurrent/Manifest
@@ -0,0 +1 @@
+DIST qtbase-opensource-src-5.4.2.tar.xz 46354192 SHA256 9fc4f720b8b5a8b8e4a7d45e13ce4d5b86756ad46fb406386637eb2de5fd5a74 SHA512 029da83969614bc9b3803c76242af62911e3c6de171b116b5cb8e2823cad0514ab705cc3fa331e042c679caeb099de4e9cd7ddea92959f675dda82533e3ad7fe WHIRLPOOL 5f352f78a779c5d042f04966a010b10af706c4db94976870721a550e3ab7eaf2695b3582c86cdcc3a11de36283e11fe65797f96e59df96fa367b16b72b5f9213
diff --git a/dev-qt/qtconcurrent/metadata.xml b/dev-qt/qtconcurrent/metadata.xml
new file mode 100644
index 000000000000..afb3b434585b
--- /dev/null
+++ b/dev-qt/qtconcurrent/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtconcurrent/qtconcurrent-5.4.2.ebuild b/dev-qt/qtconcurrent/qtconcurrent-5.4.2.ebuild
new file mode 100644
index 000000000000..a42b6e8a0c1c
--- /dev/null
+++ b/dev-qt/qtconcurrent/qtconcurrent-5.4.2.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="Multi-threading concurrence support library for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/concurrent
+)
diff --git a/dev-qt/qtcore/Manifest b/dev-qt/qtcore/Manifest
new file mode 100644
index 000000000000..48eaa826faf5
--- /dev/null
+++ b/dev-qt/qtcore/Manifest
@@ -0,0 +1,4 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qtbase-opensource-src-5.4.2.tar.xz 46354192 SHA256 9fc4f720b8b5a8b8e4a7d45e13ce4d5b86756ad46fb406386637eb2de5fd5a74 SHA512 029da83969614bc9b3803c76242af62911e3c6de171b116b5cb8e2823cad0514ab705cc3fa331e042c679caeb099de4e9cd7ddea92959f675dda82533e3ad7fe WHIRLPOOL 5f352f78a779c5d042f04966a010b10af706c4db94976870721a550e3ab7eaf2695b3582c86cdcc3a11de36283e11fe65797f96e59df96fa367b16b72b5f9213
diff --git a/dev-qt/qtcore/files/CVE-2013-4549-01-disallow-deep-or-widely-nested-entity-refs.patch b/dev-qt/qtcore/files/CVE-2013-4549-01-disallow-deep-or-widely-nested-entity-refs.patch
new file mode 100644
index 000000000000..c472d4212ffa
--- /dev/null
+++ b/dev-qt/qtcore/files/CVE-2013-4549-01-disallow-deep-or-widely-nested-entity-refs.patch
@@ -0,0 +1,114 @@
+From 512a1ce0698d370c313bb561bbf078935fa0342e Mon Sep 17 00:00:00 2001
+From: Mitch Curtis <mitch.curtis@digia.com>
+Date: Thu, 7 Nov 2013 09:36:29 +0100
+Subject: Disallow deep or widely nested entity references.
+
+Nested references with a depth of 2 or greater will fail. References
+that partially expand to greater than 1024 characters will also fail.
+
+This is a backport of 46a8885ae486e238a39efa5119c2714f328b08e4.
+
+Change-Id: I0c2e1fa13d6ccb5f88641dae2ed3f28bfdeaf609
+Reviewed-by: Richard J. Moore <rich@kde.org>
+Reviewed-by: Lars Knoll <lars.knoll@digia.com>
+
+diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
+index a1777c5..3904632 100644
+--- a/src/xml/sax/qxml.cpp
++++ b/src/xml/sax/qxml.cpp
+@@ -424,6 +424,10 @@ private:
+ int stringValueLen;
+ QString emptyStr;
+
++ // The limit to the amount of times the DTD parsing functions can be called
++ // for the DTD currently being parsed.
++ int dtdRecursionLimit;
++
+ const QString &string();
+ void stringClear();
+ void stringAddC(QChar);
+@@ -492,6 +496,7 @@ private:
+ void unexpectedEof(ParseFunction where, int state);
+ void parseFailed(ParseFunction where, int state);
+ void pushParseState(ParseFunction function, int state);
++ bool isPartiallyExpandedEntityValueTooLarge(QString *errorMessage);
+
+ Q_DECLARE_PUBLIC(QXmlSimpleReader)
+ QXmlSimpleReader *q_ptr;
+@@ -2759,6 +2764,7 @@ QXmlSimpleReaderPrivate::QXmlSimpleReaderPrivate(QXmlSimpleReader *reader)
+ useNamespacePrefixes = false;
+ reportWhitespaceCharData = true;
+ reportEntities = false;
++ dtdRecursionLimit = 2;
+ }
+
+ QXmlSimpleReaderPrivate::~QXmlSimpleReaderPrivate()
+@@ -5018,6 +5024,11 @@ bool QXmlSimpleReaderPrivate::parseDoctype()
+ }
+ break;
+ case Mup:
++ if (dtdRecursionLimit > 0 && parameterEntities.size() > dtdRecursionLimit) {
++ reportParseError(QString::fromLatin1(
++ "DTD parsing exceeded recursion limit of %1.").arg(dtdRecursionLimit));
++ return false;
++ }
+ if (!parseMarkupdecl()) {
+ parseFailed(&QXmlSimpleReaderPrivate::parseDoctype, state);
+ return false;
+@@ -6627,6 +6638,37 @@ bool QXmlSimpleReaderPrivate::parseChoiceSeq()
+ return false;
+ }
+
++bool QXmlSimpleReaderPrivate::isPartiallyExpandedEntityValueTooLarge(QString *errorMessage)
++{
++ const QString value = string();
++ QMap<QString, int> referencedEntityCounts;
++ foreach (QString entityName, entities.keys()) {
++ for (int i = 0; i < value.size() && i != -1; ) {
++ i = value.indexOf(entityName, i);
++ if (i != -1) {
++ // The entityName we're currently trying to find
++ // was matched in this string; increase our count.
++ ++referencedEntityCounts[entityName];
++ i += entityName.size();
++ }
++ }
++ }
++
++ foreach (QString entityName, referencedEntityCounts.keys()) {
++ const int timesReferenced = referencedEntityCounts[entityName];
++ const QString entityValue = entities[entityName];
++ if (entityValue.size() * timesReferenced > 1024) {
++ if (errorMessage) {
++ *errorMessage = QString::fromLatin1("The XML entity \"%1\""
++ "expands too a string that is too large to process when "
++ "referencing \"%2\" %3 times.").arg(entityName).arg(entityName).arg(timesReferenced);
++ }
++ return true;
++ }
++ }
++ return false;
++}
++
+ /*
+ Parse a EntityDecl [70].
+
+@@ -6721,6 +6763,15 @@ bool QXmlSimpleReaderPrivate::parseEntityDecl()
+ switch (state) {
+ case EValue:
+ if ( !entityExist(name())) {
++ QString errorMessage;
++ if (isPartiallyExpandedEntityValueTooLarge(&errorMessage)) {
++ // The entity at entityName is entityValue.size() characters
++ // long in its unexpanded form, and was mentioned timesReferenced times,
++ // resulting in a string that would be greater than 1024 characters.
++ reportParseError(errorMessage);
++ return false;
++ }
++
+ entities.insert(name(), string());
+ if (declHnd) {
+ if (!declHnd->internalEntityDecl(name(), string())) {
+--
+1.8.5.2
+
diff --git a/dev-qt/qtcore/files/CVE-2013-4549-02-fully-expand-entities.patch b/dev-qt/qtcore/files/CVE-2013-4549-02-fully-expand-entities.patch
new file mode 100644
index 000000000000..03ef64f22d86
--- /dev/null
+++ b/dev-qt/qtcore/files/CVE-2013-4549-02-fully-expand-entities.patch
@@ -0,0 +1,124 @@
+From cecceb0cdd87482124a73ecf537f3445d68be13e Mon Sep 17 00:00:00 2001
+From: Mitch Curtis <mitch.curtis@digia.com>
+Date: Tue, 12 Nov 2013 13:44:56 +0100
+Subject: Fully expand entities to ensure deep or widely nested ones fail
+ parsing
+
+With 512a1ce0698d370c313bb561bbf078935fa0342e, we failed when parsing
+entities whose partially expanded size was greater than 1024
+characters. That was not enough, so now we fully expand all entities.
+
+This is a backport of f1053d94f59f053ce4acad9320df14f1fbe4faac.
+
+Change-Id: I41dd6f4525c63e82fd320a22d19248169627f7e0
+Reviewed-by: Richard J. Moore <rich@kde.org>
+
+diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
+index 3904632..befa801 100644
+--- a/src/xml/sax/qxml.cpp
++++ b/src/xml/sax/qxml.cpp
+@@ -426,7 +426,9 @@ private:
+
+ // The limit to the amount of times the DTD parsing functions can be called
+ // for the DTD currently being parsed.
+- int dtdRecursionLimit;
++ static const int dtdRecursionLimit = 2;
++ // The maximum amount of characters an entity value may contain, after expansion.
++ static const int entityCharacterLimit = 1024;
+
+ const QString &string();
+ void stringClear();
+@@ -496,7 +498,7 @@ private:
+ void unexpectedEof(ParseFunction where, int state);
+ void parseFailed(ParseFunction where, int state);
+ void pushParseState(ParseFunction function, int state);
+- bool isPartiallyExpandedEntityValueTooLarge(QString *errorMessage);
++ bool isExpandedEntityValueTooLarge(QString *errorMessage);
+
+ Q_DECLARE_PUBLIC(QXmlSimpleReader)
+ QXmlSimpleReader *q_ptr;
+@@ -2764,7 +2766,6 @@ QXmlSimpleReaderPrivate::QXmlSimpleReaderPrivate(QXmlSimpleReader *reader)
+ useNamespacePrefixes = false;
+ reportWhitespaceCharData = true;
+ reportEntities = false;
+- dtdRecursionLimit = 2;
+ }
+
+ QXmlSimpleReaderPrivate::~QXmlSimpleReaderPrivate()
+@@ -6638,30 +6639,43 @@ bool QXmlSimpleReaderPrivate::parseChoiceSeq()
+ return false;
+ }
+
+-bool QXmlSimpleReaderPrivate::isPartiallyExpandedEntityValueTooLarge(QString *errorMessage)
++bool QXmlSimpleReaderPrivate::isExpandedEntityValueTooLarge(QString *errorMessage)
+ {
+- const QString value = string();
+- QMap<QString, int> referencedEntityCounts;
+- foreach (QString entityName, entities.keys()) {
+- for (int i = 0; i < value.size() && i != -1; ) {
+- i = value.indexOf(entityName, i);
+- if (i != -1) {
+- // The entityName we're currently trying to find
+- // was matched in this string; increase our count.
+- ++referencedEntityCounts[entityName];
+- i += entityName.size();
++ QMap<QString, int> literalEntitySizes;
++ // The entity at (QMap<QString,) referenced the entities at (QMap<QString,) (int>) times.
++ QMap<QString, QMap<QString, int> > referencesToOtherEntities;
++ QMap<QString, int> expandedSizes;
++
++ // For every entity, check how many times all entity names were referenced in its value.
++ foreach (QString toSearch, entities.keys()) {
++ // The amount of characters that weren't entity names, but literals, like 'X'.
++ QString leftOvers = entities.value(toSearch);
++ // How many times was entityName referenced by toSearch?
++ foreach (QString entityName, entities.keys()) {
++ for (int i = 0; i < leftOvers.size() && i != -1; ) {
++ i = leftOvers.indexOf(QString::fromLatin1("&%1;").arg(entityName), i);
++ if (i != -1) {
++ leftOvers.remove(i, entityName.size() + 2);
++ // The entityName we're currently trying to find was matched in this string; increase our count.
++ ++referencesToOtherEntities[toSearch][entityName];
++ }
+ }
+ }
++ literalEntitySizes[toSearch] = leftOvers.size();
+ }
+
+- foreach (QString entityName, referencedEntityCounts.keys()) {
+- const int timesReferenced = referencedEntityCounts[entityName];
+- const QString entityValue = entities[entityName];
+- if (entityValue.size() * timesReferenced > 1024) {
++ foreach (QString entity, referencesToOtherEntities.keys()) {
++ expandedSizes[entity] = literalEntitySizes[entity];
++ foreach (QString referenceTo, referencesToOtherEntities.value(entity).keys()) {
++ const int references = referencesToOtherEntities.value(entity).value(referenceTo);
++ // The total size of an entity's value is the expanded size of all of its referenced entities, plus its literal size.
++ expandedSizes[entity] += expandedSizes[referenceTo] * references + literalEntitySizes[referenceTo] * references;
++ }
++
++ if (expandedSizes[entity] > entityCharacterLimit) {
+ if (errorMessage) {
+- *errorMessage = QString::fromLatin1("The XML entity \"%1\""
+- "expands too a string that is too large to process when "
+- "referencing \"%2\" %3 times.").arg(entityName).arg(entityName).arg(timesReferenced);
++ *errorMessage = QString::fromLatin1("The XML entity \"%1\" expands too a string that is too large to process (%2 characters > %3).");
++ *errorMessage = (*errorMessage).arg(entity).arg(expandedSizes[entity]).arg(entityCharacterLimit);
+ }
+ return true;
+ }
+@@ -6764,10 +6778,7 @@ bool QXmlSimpleReaderPrivate::parseEntityDecl()
+ case EValue:
+ if ( !entityExist(name())) {
+ QString errorMessage;
+- if (isPartiallyExpandedEntityValueTooLarge(&errorMessage)) {
+- // The entity at entityName is entityValue.size() characters
+- // long in its unexpanded form, and was mentioned timesReferenced times,
+- // resulting in a string that would be greater than 1024 characters.
++ if (isExpandedEntityValueTooLarge(&errorMessage)) {
+ reportParseError(errorMessage);
+ return false;
+ }
+--
+1.8.5.2
+
diff --git a/dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch b/dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch
new file mode 100644
index 000000000000..0fcc1fa6561d
--- /dev/null
+++ b/dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch
@@ -0,0 +1,81 @@
+From 267feb2de49eed0823ca0c29f1cd5238537c7116 Mon Sep 17 00:00:00 2001
+From: Jan-Marek Glogowski <glogow@fbihome.de>
+Date: Thu, 6 Mar 2014 18:44:43 +0100
+Subject: Honor ExcludeSocketNotifiers in glib event loop
+
+Implements QEventLoop::ExcludeSocketNotifiers in the same way
+QEventLoop::X11ExcludeTimers is already implemented for the glib
+event loop.
+
+This prevents crashes when QClipboard checks for clipboard events
+and
+ qApp->clipboard()->setProperty( "useEventLoopWhenWaiting", true );
+is set.
+
+Task-number: QTBUG-34614
+Task-number: QTBUG-37380
+
+Change-Id: Id4e2a74c6bdf8c3b439a4e3813d24d11368b607d
+---
+ src/corelib/kernel/qeventdispatcher_glib.cpp | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp
+index 0b0e308..ba522fa 100644
+--- a/src/corelib/kernel/qeventdispatcher_glib.cpp
++++ b/src/corelib/kernel/qeventdispatcher_glib.cpp
+@@ -65,6 +65,7 @@ struct GPollFDWithQSocketNotifier
+ struct GSocketNotifierSource
+ {
+ GSource source;
++ QEventLoop::ProcessEventsFlags processEventsFlags;
+ QList<GPollFDWithQSocketNotifier *> pollfds;
+ };
+
+@@ -80,6 +81,9 @@ static gboolean socketNotifierSourceCheck(GSource *source)
+ GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source);
+
+ bool pending = false;
++ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers)
++ return pending;
++
+ for (int i = 0; !pending && i < src->pollfds.count(); ++i) {
+ GPollFDWithQSocketNotifier *p = src->pollfds.at(i);
+
+@@ -103,6 +107,9 @@ static gboolean socketNotifierSourceDispatch(GSource *source, GSourceFunc, gpoin
+ QEvent event(QEvent::SockAct);
+
+ GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source);
++ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers)
++ return true;
++
+ for (int i = 0; i < src->pollfds.count(); ++i) {
+ GPollFDWithQSocketNotifier *p = src->pollfds.at(i);
+
+@@ -331,6 +338,7 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context)
+ reinterpret_cast<GSocketNotifierSource *>(g_source_new(&socketNotifierSourceFuncs,
+ sizeof(GSocketNotifierSource)));
+ (void) new (&socketNotifierSource->pollfds) QList<GPollFDWithQSocketNotifier *>();
++ socketNotifierSource->processEventsFlags = QEventLoop::AllEvents;
+ g_source_set_can_recurse(&socketNotifierSource->source, true);
+ g_source_attach(&socketNotifierSource->source, mainContext);
+
+@@ -416,6 +424,7 @@ bool QEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags)
+ // tell postEventSourcePrepare() and timerSource about any new flags
+ QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags;
+ d->timerSource->processEventsFlags = flags;
++ d->socketNotifierSource->processEventsFlags = flags;
+
+ if (!(flags & QEventLoop::EventLoopExec)) {
+ // force timers to be sent at normal priority
+@@ -427,6 +436,7 @@ bool QEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags)
+ result = g_main_context_iteration(d->mainContext, canWait);
+
+ d->timerSource->processEventsFlags = savedFlags;
++ d->socketNotifierSource->processEventsFlags = savedFlags;
+
+ if (canWait)
+ emit awake();
+--
+2.0.0
+
diff --git a/dev-qt/qtcore/files/qtcore-4.8.5-moc-boost-lexical-cast.patch b/dev-qt/qtcore/files/qtcore-4.8.5-moc-boost-lexical-cast.patch
new file mode 100644
index 000000000000..b464c926b0e1
--- /dev/null
+++ b/dev-qt/qtcore/files/qtcore-4.8.5-moc-boost-lexical-cast.patch
@@ -0,0 +1,12 @@
+Index: qt-everywhere-opensource-src-4.8.9999/src/tools/moc/main.cpp
+===================================================================
+--- qt-everywhere-opensource-src-4.8.9999.orig/src/tools/moc/main.cpp
++++ qt-everywhere-opensource-src-4.8.9999/src/tools/moc/main.cpp
+@@ -190,6 +190,7 @@ int runMoc(int _argc, char **_argv)
+
+ // Workaround a bug while parsing the boost/type_traits/has_operator.hpp header. See QTBUG-22829
+ pp.macros["BOOST_TT_HAS_OPERATOR_HPP_INCLUDED"];
++ pp.macros["BOOST_LEXICAL_CAST_INCLUDED"];
+
+ QByteArray filename;
+ QByteArray output;
diff --git a/dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch b/dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch
new file mode 100644
index 000000000000..6d3bf2f2cde2
--- /dev/null
+++ b/dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch
@@ -0,0 +1,94 @@
+--- src/corelib/kernel/qeventdispatcher_glib.cpp.sav 2014-03-28 15:26:37.000000000 +0100
++++ src/corelib/kernel/qeventdispatcher_glib.cpp 2014-04-24 09:44:09.358659204 +0200
+@@ -255,22 +255,30 @@ struct GPostEventSource
+ GSource source;
+ QAtomicInt serialNumber;
+ int lastSerialNumber;
++ QEventLoop::ProcessEventsFlags processEventsFlags;
+ QEventDispatcherGlibPrivate *d;
+ };
+
+ static gboolean postEventSourcePrepare(GSource *s, gint *timeout)
+ {
++ GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
+ QThreadData *data = QThreadData::current();
+ if (!data)
+ return false;
+
++ QEventLoop::ProcessEventsFlags excludeAllFlags
++ = QEventLoop::ExcludeUserInputEvents
++ | QEventLoop::ExcludeSocketNotifiers
++ | QEventLoop::X11ExcludeTimers;
++ if ((source->processEventsFlags & excludeAllFlags) == excludeAllFlags)
++ return false;
++
+ gint dummy;
+ if (!timeout)
+ timeout = &dummy;
+ const bool canWait = data->canWaitLocked();
+ *timeout = canWait ? -1 : 0;
+
+- GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
+ return (!canWait
+ || (source->serialNumber != source->lastSerialNumber));
+ }
+@@ -284,8 +292,14 @@ static gboolean postEventSourceDispatch(
+ {
+ GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
+ source->lastSerialNumber = source->serialNumber;
+- QCoreApplication::sendPostedEvents();
+- source->d->runTimersOnceWithNormalPriority();
++ QEventLoop::ProcessEventsFlags excludeAllFlags
++ = QEventLoop::ExcludeUserInputEvents
++ | QEventLoop::ExcludeSocketNotifiers
++ | QEventLoop::X11ExcludeTimers;
++ if ((source->processEventsFlags & excludeAllFlags) != excludeAllFlags) {
++ QCoreApplication::sendPostedEvents();
++ source->d->runTimersOnceWithNormalPriority();
++ }
+ return true; // i dunno, george...
+ }
+
+@@ -329,6 +343,7 @@ QEventDispatcherGlibPrivate::QEventDispa
+ postEventSource = reinterpret_cast<GPostEventSource *>(g_source_new(&postEventSourceFuncs,
+ sizeof(GPostEventSource)));
+ postEventSource->serialNumber = 1;
++ postEventSource->processEventsFlags = QEventLoop::AllEvents;
+ postEventSource->d = this;
+ g_source_set_can_recurse(&postEventSource->source, true);
+ g_source_attach(&postEventSource->source, mainContext);
+@@ -423,6 +438,7 @@ bool QEventDispatcherGlib::processEvents
+
+ // tell postEventSourcePrepare() and timerSource about any new flags
+ QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags;
++ d->postEventSource->processEventsFlags = flags;
+ d->timerSource->processEventsFlags = flags;
+ d->socketNotifierSource->processEventsFlags = flags;
+
+@@ -435,6 +451,7 @@ bool QEventDispatcherGlib::processEvents
+ while (!result && canWait)
+ result = g_main_context_iteration(d->mainContext, canWait);
+
++ d->postEventSource->processEventsFlags = savedFlags;
+ d->timerSource->processEventsFlags = savedFlags;
+ d->socketNotifierSource->processEventsFlags = savedFlags;
+
+--- src/corelib/kernel/qeventdispatcher_unix.cpp.sav 2013-06-07 07:16:52.000000000 +0200
++++ src/corelib/kernel/qeventdispatcher_unix.cpp 2014-04-24 09:43:06.927589535 +0200
+@@ -905,7 +905,15 @@ bool QEventDispatcherUNIX::processEvents
+
+ // we are awake, broadcast it
+ emit awake();
+- QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
++
++ QEventLoop::ProcessEventsFlags excludeAllFlags
++ = QEventLoop::ExcludeUserInputEvents
++ | QEventLoop::ExcludeSocketNotifiers
++ | QEventLoop::X11ExcludeTimers;
++ if ((flags & excludeAllFlags) == excludeAllFlags)
++ return false;
++ if(( flags & excludeAllFlags ) != excludeAllFlags )
++ QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
+
+ int nevents = 0;
+ const bool canWait = (d->threadData->canWaitLocked()
diff --git a/dev-qt/qtcore/files/qtcore-4.8.6-QNAM-corruptions-fix.patch b/dev-qt/qtcore/files/qtcore-4.8.6-QNAM-corruptions-fix.patch
new file mode 100644
index 000000000000..1d83caa3a260
--- /dev/null
+++ b/dev-qt/qtcore/files/qtcore-4.8.6-QNAM-corruptions-fix.patch
@@ -0,0 +1,431 @@
+From fa81aa6d027049e855b76f5408586a288f160575 Mon Sep 17 00:00:00 2001
+From: Markus Goetz <markus@woboq.com>
+Date: Tue, 28 Apr 2015 11:57:36 +0200
+Subject: QNAM: Fix upload corruptions when server closes connection
+
+This patch fixes several upload corruptions if the server closes the connection
+while/before we send data into it. They happen inside multiple places in the HTTP
+layer and are explained in the comments.
+Corruptions are:
+* The upload byte device has an in-flight signal with pending upload data, if
+it gets reset (because server closes the connection) then the re-send of the
+request was sometimes taking this stale in-flight pending upload data.
+* Because some signals were DirectConnection and some were QueuedConnection, there
+was a chance that a direct signal overtakes a queued signal. The state machine
+then sent data down the socket which was buffered there (and sent later) although
+it did not match the current state of the state machine when it was actually sent.
+* A socket was seen as being able to have requests sent even though it was not
+encrypted yet. This relates to the previous corruption where data is stored inside
+the socket's buffer and then sent later.
+
+The included auto test produces all fixed corruptions, I detected no regressions
+via the other tests.
+This code also adds a bit of sanity checking to protect from possible further
+problems.
+
+[ChangeLog][QtNetwork] Fix HTTP(s) upload corruption when server closes connection
+
+(cherry picked from commit qtbase/cff39fba10ffc10ee4dcfdc66ff6528eb26462d3)
+Change-Id: I9793297be6cf3edfb75b65ba03b65f7a133ef194
+Reviewed-by: Richard J. Moore <rich@kde.org>
+---
+ src/corelib/io/qnoncontiguousbytedevice.cpp | 19 +++
+ src/corelib/io/qnoncontiguousbytedevice_p.h | 4 +
+ .../access/qhttpnetworkconnectionchannel.cpp | 47 +++++-
+ src/network/access/qhttpthreaddelegate_p.h | 36 ++++-
+ src/network/access/qnetworkaccesshttpbackend.cpp | 24 ++-
+ src/network/access/qnetworkaccesshttpbackend_p.h | 5 +-
+ tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 174 ++++++++++++++++++++-
+ 7 files changed, 280 insertions(+), 29 deletions(-)
+
+diff --git a/src/corelib/io/qnoncontiguousbytedevice.cpp b/src/corelib/io/qnoncontiguousbytedevice.cpp
+index bf58eee..1a0591e 100644
+--- a/src/corelib/io/qnoncontiguousbytedevice.cpp
++++ b/src/corelib/io/qnoncontiguousbytedevice.cpp
+@@ -245,6 +245,12 @@ qint64 QNonContiguousByteDeviceByteArrayImpl::size()
+ return byteArray->size();
+ }
+
++qint64 QNonContiguousByteDeviceByteArrayImpl::pos()
++{
++ return currentPosition;
++}
++
++
+ QNonContiguousByteDeviceRingBufferImpl::QNonContiguousByteDeviceRingBufferImpl(QSharedPointer<QRingBuffer> rb)
+ : QNonContiguousByteDevice(), currentPosition(0)
+ {
+@@ -296,6 +302,11 @@ qint64 QNonContiguousByteDeviceRingBufferImpl::size()
+ return ringBuffer->size();
+ }
+
++qint64 QNonContiguousByteDeviceRingBufferImpl::pos()
++{
++ return currentPosition;
++}
++
+ QNonContiguousByteDeviceIoDeviceImpl::QNonContiguousByteDeviceIoDeviceImpl(QIODevice *d)
+ : QNonContiguousByteDevice(),
+ currentReadBuffer(0), currentReadBufferSize(16*1024),
+@@ -415,6 +426,14 @@ qint64 QNonContiguousByteDeviceIoDeviceImpl::size()
+ return device->size() - initialPosition;
+ }
+
++qint64 QNonContiguousByteDeviceIoDeviceImpl::pos()
++{
++ if (device->isSequential())
++ return -1;
++
++ return device->pos();
++}
++
+ QByteDeviceWrappingIoDevice::QByteDeviceWrappingIoDevice(QNonContiguousByteDevice *bd) : QIODevice((QObject*)0)
+ {
+ byteDevice = bd;
+diff --git a/src/corelib/io/qnoncontiguousbytedevice_p.h b/src/corelib/io/qnoncontiguousbytedevice_p.h
+index b6966eb..d1a99a1 100644
+--- a/src/corelib/io/qnoncontiguousbytedevice_p.h
++++ b/src/corelib/io/qnoncontiguousbytedevice_p.h
+@@ -69,6 +69,7 @@ public:
+ virtual const char* readPointer(qint64 maximumLength, qint64 &len) = 0;
+ virtual bool advanceReadPointer(qint64 amount) = 0;
+ virtual bool atEnd() = 0;
++ virtual qint64 pos() { return -1; }
+ virtual bool reset() = 0;
+ void disableReset();
+ bool isResetDisabled() { return resetDisabled; }
+@@ -108,6 +109,7 @@ public:
+ bool atEnd();
+ bool reset();
+ qint64 size();
++ qint64 pos();
+ protected:
+ QByteArray* byteArray;
+ qint64 currentPosition;
+@@ -123,6 +125,7 @@ public:
+ bool atEnd();
+ bool reset();
+ qint64 size();
++ qint64 pos();
+ protected:
+ QSharedPointer<QRingBuffer> ringBuffer;
+ qint64 currentPosition;
+@@ -140,6 +143,7 @@ public:
+ bool atEnd();
+ bool reset();
+ qint64 size();
++ qint64 pos();
+ protected:
+ QIODevice* device;
+ QByteArray* currentReadBuffer;
+diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
+index 550e090..db2f712 100644
+--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
++++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
+@@ -107,15 +107,19 @@ void QHttpNetworkConnectionChannel::init()
+ socket->setProxy(QNetworkProxy::NoProxy);
+ #endif
+
++ // We want all signals (except the interactive ones) be connected as QueuedConnection
++ // because else we're falling into cases where we recurse back into the socket code
++ // and mess up the state. Always going to the event loop (and expecting that when reading/writing)
++ // is safer.
+ QObject::connect(socket, SIGNAL(bytesWritten(qint64)),
+ this, SLOT(_q_bytesWritten(qint64)),
+- Qt::DirectConnection);
++ Qt::QueuedConnection);
+ QObject::connect(socket, SIGNAL(connected()),
+ this, SLOT(_q_connected()),
+- Qt::DirectConnection);
++ Qt::QueuedConnection);
+ QObject::connect(socket, SIGNAL(readyRead()),
+ this, SLOT(_q_readyRead()),
+- Qt::DirectConnection);
++ Qt::QueuedConnection);
+
+ // The disconnected() and error() signals may already come
+ // while calling connectToHost().
+@@ -144,13 +148,13 @@ void QHttpNetworkConnectionChannel::init()
+ // won't be a sslSocket if encrypt is false
+ QObject::connect(sslSocket, SIGNAL(encrypted()),
+ this, SLOT(_q_encrypted()),
+- Qt::DirectConnection);
++ Qt::QueuedConnection);
+ QObject::connect(sslSocket, SIGNAL(sslErrors(QList<QSslError>)),
+ this, SLOT(_q_sslErrors(QList<QSslError>)),
+ Qt::DirectConnection);
+ QObject::connect(sslSocket, SIGNAL(encryptedBytesWritten(qint64)),
+ this, SLOT(_q_encryptedBytesWritten(qint64)),
+- Qt::DirectConnection);
++ Qt::QueuedConnection);
+ }
+ #endif
+ }
+@@ -163,7 +167,8 @@ void QHttpNetworkConnectionChannel::close()
+ else
+ state = QHttpNetworkConnectionChannel::ClosingState;
+
+- socket->close();
++ if (socket)
++ socket->close();
+ }
+
+
+@@ -280,6 +285,14 @@ bool QHttpNetworkConnectionChannel::sendRequest()
+ // nothing to read currently, break the loop
+ break;
+ } else {
++ if (written != uploadByteDevice->pos()) {
++ // Sanity check. This was useful in tracking down an upload corruption.
++ qWarning() << "QHttpProtocolHandler: Internal error in sendRequest. Expected to write at position" << written << "but read device is at" << uploadByteDevice->pos();
++ Q_ASSERT(written == uploadByteDevice->pos());
++ connection->d_func()->emitReplyError(socket, reply, QNetworkReply::ProtocolFailure);
++ return false;
++ }
++
+ qint64 currentWriteSize = socket->write(readPointer, currentReadSize);
+ if (currentWriteSize == -1 || currentWriteSize != currentReadSize) {
+ // socket broke down
+@@ -639,6 +652,14 @@ bool QHttpNetworkConnectionChannel::ensureConnection()
+ }
+ return false;
+ }
++
++ // This code path for ConnectedState
++ if (pendingEncrypt) {
++ // Let's only be really connected when we have received the encrypted() signal. Else the state machine seems to mess up
++ // and corrupt the things sent to the server.
++ return false;
++ }
++
+ return true;
+ }
+
+@@ -980,6 +1001,13 @@ void QHttpNetworkConnectionChannel::_q_readyRead()
+ void QHttpNetworkConnectionChannel::_q_bytesWritten(qint64 bytes)
+ {
+ Q_UNUSED(bytes);
++
++ if (ssl) {
++ // In the SSL case we want to send data from encryptedBytesWritten signal since that one
++ // is the one going down to the actual network, not only into some SSL buffer.
++ return;
++ }
++
+ // bytes have been written to the socket. write even more of them :)
+ if (isSocketWriting())
+ sendRequest();
+@@ -1029,7 +1057,7 @@ void QHttpNetworkConnectionChannel::_q_connected()
+
+ // ### FIXME: if the server closes the connection unexpectedly, we shouldn't send the same broken request again!
+ //channels[i].reconnectAttempts = 2;
+- if (!pendingEncrypt) {
++ if (!pendingEncrypt && !ssl) { // FIXME: Didn't work properly with pendingEncrypt only, we should refactor this into an EncrypingState
+ state = QHttpNetworkConnectionChannel::IdleState;
+ if (!reply)
+ connection->d_func()->dequeueRequest(socket);
+@@ -1157,7 +1185,10 @@ void QHttpNetworkConnectionChannel::_q_proxyAuthenticationRequired(const QNetwor
+
+ void QHttpNetworkConnectionChannel::_q_uploadDataReadyRead()
+ {
+- sendRequest();
++ if (reply && state == QHttpNetworkConnectionChannel::WritingState) {
++ // There might be timing issues, make sure to only send upload data if really in that state
++ sendRequest();
++ }
+ }
+
+ #ifndef QT_NO_OPENSSL
+diff --git a/src/network/access/qhttpthreaddelegate_p.h b/src/network/access/qhttpthreaddelegate_p.h
+index 7648325..9dd0deb 100644
+--- a/src/network/access/qhttpthreaddelegate_p.h
++++ b/src/network/access/qhttpthreaddelegate_p.h
+@@ -190,6 +190,7 @@ protected:
+ QByteArray m_dataArray;
+ bool m_atEnd;
+ qint64 m_size;
++ qint64 m_pos; // to match calls of haveDataSlot with the expected position
+ public:
+ QNonContiguousByteDeviceThreadForwardImpl(bool aE, qint64 s)
+ : QNonContiguousByteDevice(),
+@@ -197,7 +198,8 @@ public:
+ m_amount(0),
+ m_data(0),
+ m_atEnd(aE),
+- m_size(s)
++ m_size(s),
++ m_pos(0)
+ {
+ }
+
+@@ -205,6 +207,11 @@ public:
+ {
+ }
+
++ qint64 pos()
++ {
++ return m_pos;
++ }
++
+ const char* readPointer(qint64 maximumLength, qint64 &len)
+ {
+ if (m_amount > 0) {
+@@ -232,11 +239,10 @@ public:
+
+ m_amount -= a;
+ m_data += a;
++ m_pos += a;
+
+- // To main thread to inform about our state
+- emit processedData(a);
+-
+- // FIXME possible optimization, already ask user thread for some data
++ // To main thread to inform about our state. The m_pos will be sent as a sanity check.
++ emit processedData(m_pos, a);
+
+ return true;
+ }
+@@ -253,10 +259,21 @@ public:
+ {
+ m_amount = 0;
+ m_data = 0;
++ m_dataArray.clear();
++
++ if (wantDataPending) {
++ // had requested the user thread to send some data (only 1 in-flight at any moment)
++ wantDataPending = false;
++ }
+
+ // Communicate as BlockingQueuedConnection
+ bool b = false;
+ emit resetData(&b);
++ if (b) {
++ // the reset succeeded, we're at pos 0 again
++ m_pos = 0;
++ // the HTTP code will anyway abort the request if !b.
++ }
+ return b;
+ }
+
+@@ -267,8 +284,13 @@ public:
+
+ public slots:
+ // From user thread:
+- void haveDataSlot(QByteArray dataArray, bool dataAtEnd, qint64 dataSize)
++ void haveDataSlot(qint64 pos, QByteArray dataArray, bool dataAtEnd, qint64 dataSize)
+ {
++ if (pos != m_pos) {
++ // Sometimes when re-sending a request in the qhttpnetwork* layer there is a pending haveData from the
++ // user thread on the way to us. We need to ignore it since it is the data for the wrong(later) chunk.
++ return;
++ }
+ wantDataPending = false;
+
+ m_dataArray = dataArray;
+@@ -288,7 +310,7 @@ signals:
+
+ // to main thread:
+ void wantData(qint64);
+- void processedData(qint64);
++ void processedData(qint64 pos, qint64 amount);
+ void resetData(bool *b);
+ };
+
+diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
+index cc67258..fe2f627 100644
+--- a/src/network/access/qnetworkaccesshttpbackend.cpp
++++ b/src/network/access/qnetworkaccesshttpbackend.cpp
+@@ -193,6 +193,7 @@ QNetworkAccessHttpBackendFactory::create(QNetworkAccessManager::Operation op,
+ QNetworkAccessHttpBackend::QNetworkAccessHttpBackend()
+ : QNetworkAccessBackend()
+ , statusCode(0)
++ , uploadByteDevicePosition(false)
+ , pendingDownloadDataEmissions(new QAtomicInt())
+ , pendingDownloadProgressEmissions(new QAtomicInt())
+ , loadingFromCache(false)
+@@ -610,9 +611,9 @@ void QNetworkAccessHttpBackend::postRequest()
+ forwardUploadDevice->setParent(delegate); // needed to make sure it is moved on moveToThread()
+ delegate->httpRequest.setUploadByteDevice(forwardUploadDevice);
+
+- // From main thread to user thread:
+- QObject::connect(this, SIGNAL(haveUploadData(QByteArray, bool, qint64)),
+- forwardUploadDevice, SLOT(haveDataSlot(QByteArray, bool, qint64)), Qt::QueuedConnection);
++ // From user thread to http thread:
++ QObject::connect(this, SIGNAL(haveUploadData(qint64,QByteArray,bool,qint64)),
++ forwardUploadDevice, SLOT(haveDataSlot(qint64,QByteArray,bool,qint64)), Qt::QueuedConnection);
+ QObject::connect(uploadByteDevice.data(), SIGNAL(readyRead()),
+ forwardUploadDevice, SIGNAL(readyRead()),
+ Qt::QueuedConnection);
+@@ -620,8 +621,8 @@ void QNetworkAccessHttpBackend::postRequest()
+ // From http thread to user thread:
+ QObject::connect(forwardUploadDevice, SIGNAL(wantData(qint64)),
+ this, SLOT(wantUploadDataSlot(qint64)));
+- QObject::connect(forwardUploadDevice, SIGNAL(processedData(qint64)),
+- this, SLOT(sentUploadDataSlot(qint64)));
++ QObject::connect(forwardUploadDevice,SIGNAL(processedData(qint64, qint64)),
++ this, SLOT(sentUploadDataSlot(qint64,qint64)));
+ connect(forwardUploadDevice, SIGNAL(resetData(bool*)),
+ this, SLOT(resetUploadDataSlot(bool*)),
+ Qt::BlockingQueuedConnection); // this is the only one with BlockingQueued!
+@@ -915,12 +916,21 @@ void QNetworkAccessHttpBackend::replySslConfigurationChanged(const QSslConfigura
+ void QNetworkAccessHttpBackend::resetUploadDataSlot(bool *r)
+ {
+ *r = uploadByteDevice->reset();
++ if (*r) {
++ // reset our own position which is used for the inter-thread communication
++ uploadByteDevicePosition = 0;
++ }
+ }
+
+ // Coming from QNonContiguousByteDeviceThreadForwardImpl in HTTP thread
+-void QNetworkAccessHttpBackend::sentUploadDataSlot(qint64 amount)
++void QNetworkAccessHttpBackend::sentUploadDataSlot(qint64 pos, qint64 amount)
+ {
++ if (uploadByteDevicePosition + amount != pos) {
++ // Sanity check, should not happen.
++ error(QNetworkReply::UnknownNetworkError, "");
++ }
+ uploadByteDevice->advanceReadPointer(amount);
++ uploadByteDevicePosition += amount;
+ }
+
+ // Coming from QNonContiguousByteDeviceThreadForwardImpl in HTTP thread
+@@ -933,7 +943,7 @@ void QNetworkAccessHttpBackend::wantUploadDataSlot(qint64 maxSize)
+ QByteArray dataArray(data, currentUploadDataLength);
+
+ // Communicate back to HTTP thread
+- emit haveUploadData(dataArray, uploadByteDevice->atEnd(), uploadByteDevice->size());
++ emit haveUploadData(uploadByteDevicePosition, dataArray, uploadByteDevice->atEnd(), uploadByteDevice->size());
+ }
+
+ /*
+diff --git a/src/network/access/qnetworkaccesshttpbackend_p.h b/src/network/access/qnetworkaccesshttpbackend_p.h
+index 13519c6..b4ed67c 100644
+--- a/src/network/access/qnetworkaccesshttpbackend_p.h
++++ b/src/network/access/qnetworkaccesshttpbackend_p.h
+@@ -112,7 +112,7 @@ signals:
+
+ void startHttpRequestSynchronously();
+
+- void haveUploadData(QByteArray dataArray, bool dataAtEnd, qint64 dataSize);
++ void haveUploadData(const qint64 pos, QByteArray dataArray, bool dataAtEnd, qint64 dataSize);
+ private slots:
+ // From HTTP thread:
+ void replyDownloadData(QByteArray);
+@@ -129,13 +129,14 @@ private slots:
+ // From QNonContiguousByteDeviceThreadForwardImpl in HTTP thread:
+ void resetUploadDataSlot(bool *r);
+ void wantUploadDataSlot(qint64);
+- void sentUploadDataSlot(qint64);
++ void sentUploadDataSlot(qint64, qint64);
+
+ bool sendCacheContents(const QNetworkCacheMetaData &metaData);
+
+ private:
+ QHttpNetworkRequest httpRequest; // There is also a copy in the HTTP thread
+ int statusCode;
++ qint64 uploadByteDevicePosition;
+ QString reasonPhrase;
+ // Will be increased by HTTP thread:
+ QSharedPointer<QAtomicInt> pendingDownloadDataEmissions;
+
diff --git a/dev-qt/qtcore/metadata.xml b/dev-qt/qtcore/metadata.xml
new file mode 100644
index 000000000000..9b129875cee4
--- /dev/null
+++ b/dev-qt/qtcore/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ <flag name="glib">Enable <pkg>dev-libs/glib</pkg> eventloop support</flag>
+ <flag name="qt3support">Enable the Qt3Support libraries for Qt4. Note that
+ this does not mean you can compile pure Qt3 programs with Qt4.</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtcore/qtcore-4.8.5-r2.ebuild b/dev-qt/qtcore/qtcore-4.8.5-r2.ebuild
new file mode 100644
index 000000000000..d1dacc5bb497
--- /dev/null
+++ b/dev-qt/qtcore/qtcore-4.8.5-r2.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build
+
+DESCRIPTION="Cross-platform application development framework"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+IUSE="+glib iconv icu qt3support ssl"
+
+DEPEND="
+ sys-libs/zlib
+ glib? ( dev-libs/glib:2 )
+ icu? ( >=dev-libs/icu-49:= )
+ ssl? ( dev-libs/openssl:0 )
+ !dev-qt/qttranslations:4
+ !<x11-libs/cairo-1.10.2-r2
+"
+RDEPEND="${DEPEND}"
+PDEPEND="
+ qt3support? ( ~dev-qt/qtgui-${PV}[aqua=,debug=,glib=,qt3support] )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.8.5-moc-boost-lexical-cast.patch"
+ "${FILESDIR}/${PN}-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch" # bug 514968
+ "${FILESDIR}/${PN}-4.8.5-qeventdispatcher-recursive.patch" # bug 514968
+ "${FILESDIR}/CVE-2013-4549-01-disallow-deep-or-widely-nested-entity-refs.patch"
+ "${FILESDIR}/CVE-2013-4549-02-fully-expand-entities.patch"
+)
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/tools/bootstrap
+ src/tools/moc
+ src/tools/rcc
+ src/tools/uic
+ src/corelib
+ src/xml
+ src/network
+ src/plugins/codecs
+ tools/linguist/lconvert
+ tools/linguist/lrelease
+ tools/linguist/lupdate"
+
+ QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
+ include
+ src/plugins/plugins.pro
+ src/plugins/qpluginbase.pri
+ src/src.pro
+ src/3rdparty/des
+ src/3rdparty/harfbuzz
+ src/3rdparty/md4
+ src/3rdparty/md5
+ src/3rdparty/sha1
+ src/3rdparty/easing
+ src/3rdparty/zlib_dependency.pri
+ src/declarative
+ src/gui
+ src/script
+ tools/shared
+ tools/linguist/shared
+ translations"
+
+ qt4-build_pkg_setup
+}
+
+src_prepare() {
+ # Don't pre-strip, bug 235026
+ for i in kr jp cn tw; do
+ echo "CONFIG+=nostrip" >> "${S}"/src/plugins/codecs/${i}/${i}.pro
+ done
+
+ qt4-build_src_prepare
+
+ # bug 172219
+ sed -i -e "s:CXXFLAGS.*=:CXXFLAGS=${CXXFLAGS} :" \
+ "${S}/qmake/Makefile.unix" || die "sed qmake/Makefile.unix CXXFLAGS failed"
+ sed -i -e "s:LFLAGS.*=:LFLAGS=${LDFLAGS} :" \
+ "${S}/qmake/Makefile.unix" || die "sed qmake/Makefile.unix LDFLAGS failed"
+
+ # bug 427782
+ sed -i -e "/^CPPFLAGS/s/-g//" \
+ "${S}/qmake/Makefile.unix" || die "sed qmake/Makefile.unix CPPFLAGS failed"
+ sed -i -e "s/setBootstrapVariable QMAKE_CFLAGS_RELEASE/QMakeVar set QMAKE_CFLAGS_RELEASE/" \
+ -e "s/setBootstrapVariable QMAKE_CXXFLAGS_RELEASE/QMakeVar set QMAKE_CXXFLAGS_RELEASE/" \
+ "${S}/configure" || die "sed configure setBootstrapVariable failed"
+}
+
+src_configure() {
+ myconf+="
+ -no-accessibility -no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon
+ -no-phonon-backend -no-svg -no-webkit -no-script -no-scripttools -no-declarative
+ -system-zlib -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg
+ -no-cups -no-dbus -no-gtkstyle -no-nas-sound -no-opengl -no-openvg
+ -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes
+ -no-xrandr -no-xrender -no-mitshm -no-fontconfig -no-freetype -no-xinput -no-xkb
+ $(qt_use glib)
+ $(qt_use iconv)
+ $(qt_use icu)
+ $(use ssl && echo -openssl-linked || echo -no-openssl)
+ $(qt_use qt3support)"
+
+ qt4-build_src_configure
+}
+
+src_install() {
+ dobin bin/{qmake,moc,rcc,uic,lconvert,lrelease,lupdate}
+
+ install_directories src/{corelib,xml,network,plugins/codecs}
+
+ emake INSTALL_ROOT="${D}" install_mkspecs
+
+ # install private headers
+ insinto "${QTHEADERDIR#${EPREFIX}}"/QtCore/private
+ find "${S}"/src/corelib -type f -name "*_p.h" -exec doins {} +
+
+ # use freshly built libraries
+ local DYLD_FPATH=
+ [[ -d "${S}"/lib/QtCore.framework ]] \
+ && DYLD_FPATH=$(for x in "${S}"/lib/*.framework; do echo -n ":$x"; done)
+ DYLD_LIBRARY_PATH="${S}/lib${DYLD_FPATH}" \
+ LD_LIBRARY_PATH="${S}/lib" \
+ "${S}"/bin/lrelease translations/*.ts \
+ || die "generating translations failed"
+ insinto "${QTTRANSDIR#${EPREFIX}}"
+ doins translations/*.qm
+
+ setqtenv
+ fix_library_files
+
+ # List all the multilib libdirs
+ local libdirs=
+ for libdir in $(get_all_libdirs); do
+ libdirs+=":${EPREFIX}/usr/${libdir}/qt4"
+ done
+
+ cat <<-EOF > "${T}"/44qt4
+ LDPATH="${libdirs:1}"
+ EOF
+ doenvd "${T}"/44qt4
+
+ dodir "${QTDATADIR#${EPREFIX}}"/mkspecs/gentoo
+ mv "${D}/${QTDATADIR}"/mkspecs/qconfig.pri "${D}${QTDATADIR}"/mkspecs/gentoo \
+ || die "failed to move qconfig.pri"
+
+ # Framework hacking
+ if use aqua && [[ ${CHOST#*-darwin} -ge 9 ]]; then
+ # TODO: do this better
+ sed -i -e '2a#include <QtCore/Gentoo/gentoo-qconfig.h>\n' \
+ "${D}${QTLIBDIR}"/QtCore.framework/Headers/qconfig.h \
+ || die "sed for qconfig.h failed."
+ dosym "${QTHEADERDIR#${EPREFIX}}"/Gentoo "${QTLIBDIR#${EPREFIX}}"/QtCore.framework/Headers/Gentoo
+ else
+ sed -i -e '2a#include <Gentoo/gentoo-qconfig.h>\n' \
+ "${D}${QTHEADERDIR}"/QtCore/qconfig.h \
+ "${D}${QTHEADERDIR}"/Qt/qconfig.h \
+ || die "sed for qconfig.h failed"
+ fi
+
+ QCONFIG_DEFINE="QT_ZLIB"
+ install_qconfigs
+
+ # remove .la files
+ prune_libtool_files
+
+ keepdir "${QTSYSCONFDIR#${EPREFIX}}"
+
+ # Framework magic
+ fix_includes
+}
diff --git a/dev-qt/qtcore/qtcore-4.8.6-r2.ebuild b/dev-qt/qtcore/qtcore-4.8.6-r2.ebuild
new file mode 100644
index 000000000000..09fed4ad7f90
--- /dev/null
+++ b/dev-qt/qtcore/qtcore-4.8.6-r2.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="Cross-platform application development framework"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE="+glib iconv icu qt3support ssl"
+
+DEPEND="
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ glib? ( dev-libs/glib:2[${MULTILIB_USEDEP}] )
+ iconv? ( >=virtual/libiconv-0-r2[${MULTILIB_USEDEP}] )
+ icu? ( dev-libs/icu:=[${MULTILIB_USEDEP}] )
+ ssl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}"
+PDEPEND="
+ ~dev-qt/qttranslations-${PV}
+ qt3support? ( ~dev-qt/qtgui-${PV}[aqua=,debug=,glib=,qt3support,${MULTILIB_USEDEP}] )
+"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/qt4/Qt/qconfig.h
+ /usr/include/qt4/QtCore/qconfig.h
+)
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.8.5-moc-boost-lexical-cast.patch"
+ "${FILESDIR}/${PN}-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch" # bug 514968
+ "${FILESDIR}/${PN}-4.8.5-qeventdispatcher-recursive.patch" # bug 514968
+ "${FILESDIR}/${PN}-4.8.6-QNAM-corruptions-fix.patch" # bug 548622
+)
+
+QT4_TARGET_DIRECTORIES="
+ src/tools/bootstrap
+ src/tools/moc
+ src/tools/rcc
+ src/tools/uic
+ src/corelib
+ src/network
+ src/xml
+ src/plugins/codecs/cn
+ src/plugins/codecs/jp
+ src/plugins/codecs/kr
+ src/plugins/codecs/tw
+ tools/linguist/lconvert
+ tools/linguist/lrelease
+ tools/linguist/lupdate"
+
+QCONFIG_DEFINE="QT_ZLIB"
+
+src_prepare() {
+ qt4-build-multilib_src_prepare
+
+ # bug 172219
+ sed -i -e "s:CXXFLAGS.*=:CXXFLAGS=${CXXFLAGS} :" \
+ -e "s:LFLAGS.*=:LFLAGS=${LDFLAGS} :" \
+ qmake/Makefile.unix || die "sed qmake/Makefile.unix failed"
+
+ # bug 427782
+ sed -i -e '/^CPPFLAGS\s*=/ s/-g //' \
+ qmake/Makefile.unix || die "sed CPPFLAGS in qmake/Makefile.unix failed"
+ sed -i -e 's/setBootstrapVariable QMAKE_CFLAGS_RELEASE/QMakeVar set QMAKE_CFLAGS_RELEASE/' \
+ -e 's/setBootstrapVariable QMAKE_CXXFLAGS_RELEASE/QMakeVar set QMAKE_CXXFLAGS_RELEASE/' \
+ configure || die "sed configure setBootstrapVariable failed"
+}
+
+multilib_src_configure() {
+ local myconf=(
+ -no-accessibility -no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon
+ -no-phonon-backend -no-svg -no-webkit -no-script -no-scripttools -no-declarative
+ -system-zlib -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg
+ -no-cups -no-dbus -no-gtkstyle -no-nas-sound -no-opengl -no-openvg
+ -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes
+ -no-xrandr -no-xrender -no-mitshm -no-fontconfig -no-freetype -no-xinput -no-xkb
+ $(qt_use glib)
+ $(qt_use iconv)
+ $(qt_use icu)
+ $(use ssl && echo -openssl-linked || echo -no-openssl)
+ $(qt_use qt3support)
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtcore/qtcore-4.8.7.ebuild b/dev-qt/qtcore/qtcore-4.8.7.ebuild
new file mode 100644
index 000000000000..e8c48cb7b78b
--- /dev/null
+++ b/dev-qt/qtcore/qtcore-4.8.7.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="Cross-platform application development framework"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="+glib iconv icu qt3support ssl"
+
+DEPEND="
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ glib? ( dev-libs/glib:2[${MULTILIB_USEDEP}] )
+ iconv? ( >=virtual/libiconv-0-r2[${MULTILIB_USEDEP}] )
+ icu? ( dev-libs/icu:=[${MULTILIB_USEDEP}] )
+ ssl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}"
+PDEPEND="
+ ~dev-qt/qttranslations-${PV}
+ qt3support? ( ~dev-qt/qtgui-${PV}[aqua=,debug=,glib=,qt3support,${MULTILIB_USEDEP}] )
+"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/qt4/Qt/qconfig.h
+ /usr/include/qt4/QtCore/qconfig.h
+)
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.8.5-moc-boost-lexical-cast.patch"
+ "${FILESDIR}/${PN}-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch" # bug 514968
+ "${FILESDIR}/${PN}-4.8.5-qeventdispatcher-recursive.patch" # bug 514968
+)
+
+QT4_TARGET_DIRECTORIES="
+ src/tools/bootstrap
+ src/tools/moc
+ src/tools/rcc
+ src/tools/uic
+ src/corelib
+ src/network
+ src/xml
+ src/plugins/codecs/cn
+ src/plugins/codecs/jp
+ src/plugins/codecs/kr
+ src/plugins/codecs/tw
+ tools/linguist/lconvert
+ tools/linguist/lrelease
+ tools/linguist/lupdate"
+
+QCONFIG_DEFINE="QT_ZLIB"
+
+src_prepare() {
+ qt4-build-multilib_src_prepare
+
+ # bug 172219
+ sed -i -e "s:CXXFLAGS.*=:CXXFLAGS=${CXXFLAGS} :" \
+ -e "s:LFLAGS.*=:LFLAGS=${LDFLAGS} :" \
+ qmake/Makefile.unix || die "sed qmake/Makefile.unix failed"
+
+ # bug 427782
+ sed -i -e '/^CPPFLAGS\s*=/ s/-g //' \
+ qmake/Makefile.unix || die "sed CPPFLAGS in qmake/Makefile.unix failed"
+ sed -i -e 's/setBootstrapVariable QMAKE_CFLAGS_RELEASE/QMakeVar set QMAKE_CFLAGS_RELEASE/' \
+ -e 's/setBootstrapVariable QMAKE_CXXFLAGS_RELEASE/QMakeVar set QMAKE_CXXFLAGS_RELEASE/' \
+ configure || die "sed configure setBootstrapVariable failed"
+}
+
+multilib_src_configure() {
+ local myconf=(
+ -no-accessibility -no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon
+ -no-phonon-backend -no-svg -no-webkit -no-script -no-scripttools -no-declarative
+ -system-zlib -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg
+ -no-cups -no-dbus -no-gtkstyle -no-nas-sound -no-opengl -no-openvg
+ -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes
+ -no-xrandr -no-xrender -no-mitshm -no-fontconfig -no-freetype -no-xinput -no-xkb
+ $(qt_use glib)
+ $(qt_use iconv)
+ $(qt_use icu)
+ $(use ssl && echo -openssl-linked || echo -no-openssl)
+ $(qt_use qt3support)
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtcore/qtcore-5.4.2.ebuild b/dev-qt/qtcore/qtcore-5.4.2.ebuild
new file mode 100644
index 000000000000..6ba815b7a468
--- /dev/null
+++ b/dev-qt/qtcore/qtcore-5.4.2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="Cross-platform application development framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="icu systemd"
+
+DEPEND="
+ dev-libs/glib:2
+ >=dev-libs/libpcre-8.35[pcre16]
+ >=sys-libs/zlib-1.2.5
+ virtual/libiconv
+ icu? ( dev-libs/icu:= )
+ systemd? ( sys-apps/systemd )
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/tools/bootstrap
+ src/tools/moc
+ src/tools/rcc
+ src/corelib
+ src/tools/qlalr
+)
+
+src_configure() {
+ local myconf=(
+ $(qt_use icu)
+ $(qt_use systemd journald)
+ )
+ qt5-build_src_configure
+}
diff --git a/dev-qt/qtdbus/Manifest b/dev-qt/qtdbus/Manifest
new file mode 100644
index 000000000000..48eaa826faf5
--- /dev/null
+++ b/dev-qt/qtdbus/Manifest
@@ -0,0 +1,4 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qtbase-opensource-src-5.4.2.tar.xz 46354192 SHA256 9fc4f720b8b5a8b8e4a7d45e13ce4d5b86756ad46fb406386637eb2de5fd5a74 SHA512 029da83969614bc9b3803c76242af62911e3c6de171b116b5cb8e2823cad0514ab705cc3fa331e042c679caeb099de4e9cd7ddea92959f675dda82533e3ad7fe WHIRLPOOL 5f352f78a779c5d042f04966a010b10af706c4db94976870721a550e3ab7eaf2695b3582c86cdcc3a11de36283e11fe65797f96e59df96fa367b16b72b5f9213
diff --git a/dev-qt/qtdbus/files/qtdbus-4.7-qdbusintegrator-no-const.patch b/dev-qt/qtdbus/files/qtdbus-4.7-qdbusintegrator-no-const.patch
new file mode 100644
index 000000000000..086eb47a071c
--- /dev/null
+++ b/dev-qt/qtdbus/files/qtdbus-4.7-qdbusintegrator-no-const.patch
@@ -0,0 +1,11 @@
+--- src/dbus/qdbusintegrator.cpp.orig 2011-03-12 02:11:32.313467991 +0100
++++ src/dbus/qdbusintegrator.cpp 2011-03-12 02:11:03.795809176 +0100
+@@ -71,7 +71,7 @@
+ static bool isDebugging;
+ #define qDBusDebug if (!::isDebugging); else qDebug
+
+-Q_GLOBAL_STATIC_WITH_ARGS(const QString, orgFreedesktopDBusString, (QLatin1String(DBUS_SERVICE_DBUS)))
++Q_GLOBAL_STATIC_WITH_ARGS(QString, orgFreedesktopDBusString, (QLatin1String(DBUS_SERVICE_DBUS)))
+
+ static inline QString dbusServiceString()
+ { return *orgFreedesktopDBusString(); }
diff --git a/dev-qt/qtdbus/files/qtdbus-4.8.4-qdbusconnection-silence-warning.patch b/dev-qt/qtdbus/files/qtdbus-4.8.4-qdbusconnection-silence-warning.patch
new file mode 100644
index 000000000000..dd3a5a02298e
--- /dev/null
+++ b/dev-qt/qtdbus/files/qtdbus-4.8.4-qdbusconnection-silence-warning.patch
@@ -0,0 +1,14 @@
+diff -up qt-everywhere-opensource-src-4.8.3/src/dbus/qdbusconnection.cpp.qdbusconnection_no_debug.patch qt-everywhere-opensource-src-4.8.3/src/dbus/qdbusconnection.cpp
+--- qt-everywhere-opensource-src-4.8.3/src/dbus/qdbusconnection.cpp.qdbusconnection_no_debug.patch 2012-09-06 02:33:44.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.3/src/dbus/qdbusconnection.cpp 2012-09-11 08:55:29.854026815 -0500
+@@ -1109,8 +1109,10 @@ public:
+ // make sure this connection is running on the main thread
+ QCoreApplication *instance = QCoreApplication::instance();
+ if (!instance) {
++#ifndef QT_NO_DEBUG
+ qWarning("QDBusConnection: %s D-Bus connection created before QCoreApplication. Application may misbehave.",
+ type == SessionBus ? "session" : type == SystemBus ? "system" : "generic");
++#endif
+ } else if (QDBusConnectionPrivate::d(*this)) {
+ QDBusConnectionPrivate::d(*this)->moveToThread(instance->thread());
+ }
diff --git a/dev-qt/qtdbus/metadata.xml b/dev-qt/qtdbus/metadata.xml
new file mode 100644
index 000000000000..258aee1d6e0d
--- /dev/null
+++ b/dev-qt/qtdbus/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtdbus/qtdbus-4.8.5.ebuild b/dev-qt/qtdbus/qtdbus-4.8.5.ebuild
new file mode 100644
index 000000000000..d37d32d954bf
--- /dev/null
+++ b/dev-qt/qtdbus/qtdbus-4.8.5.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-build
+
+DESCRIPTION="The DBus module for the Qt toolkit"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=]
+ >=sys-apps/dbus-1.2
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.7-qdbusintegrator-no-const.patch"
+ "${FILESDIR}/${PN}-4.8.4-qdbusconnection-silence-warning.patch"
+)
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/dbus
+ tools/qdbus/qdbus
+ tools/qdbus/qdbusxml2cpp
+ tools/qdbus/qdbuscpp2xml"
+
+ QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
+ include/QtCore
+ include/QtDBus
+ include/QtXml
+ src/corelib
+ src/xml"
+
+ QCONFIG_ADD="dbus dbus-linked"
+ QCONFIG_DEFINE="QT_DBUS"
+
+ qt4-build_pkg_setup
+}
+
+src_configure() {
+ myconf+=" -dbus-linked"
+
+ qt4-build_src_configure
+}
diff --git a/dev-qt/qtdbus/qtdbus-4.8.6-r1.ebuild b/dev-qt/qtdbus/qtdbus-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..1dc853cbfd50
--- /dev/null
+++ b/dev-qt/qtdbus/qtdbus-4.8.6-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="The DBus module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm hppa ia64 ppc ppc64"
+else
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ sys-apps/dbus[${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.7-qdbusintegrator-no-const.patch"
+ "${FILESDIR}/${PN}-4.8.4-qdbusconnection-silence-warning.patch"
+)
+
+QT4_TARGET_DIRECTORIES="
+ src/dbus
+ tools/qdbus/qdbus
+ tools/qdbus/qdbusxml2cpp
+ tools/qdbus/qdbuscpp2xml"
+
+QCONFIG_ADD="dbus dbus-linked"
+QCONFIG_DEFINE="QT_DBUS"
+
+multilib_src_configure() {
+ local myconf=(
+ -dbus-linked
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtdbus/qtdbus-4.8.7.ebuild b/dev-qt/qtdbus/qtdbus-4.8.7.ebuild
new file mode 100644
index 000000000000..344bac52f481
--- /dev/null
+++ b/dev-qt/qtdbus/qtdbus-4.8.7.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="The DBus module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ sys-apps/dbus[${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.7-qdbusintegrator-no-const.patch"
+ "${FILESDIR}/${PN}-4.8.4-qdbusconnection-silence-warning.patch"
+)
+
+QT4_TARGET_DIRECTORIES="
+ src/dbus
+ tools/qdbus/qdbus
+ tools/qdbus/qdbusxml2cpp
+ tools/qdbus/qdbuscpp2xml"
+
+QCONFIG_ADD="dbus dbus-linked"
+QCONFIG_DEFINE="QT_DBUS"
+
+multilib_src_configure() {
+ local myconf=(
+ -dbus-linked
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtdbus/qtdbus-5.4.2.ebuild b/dev-qt/qtdbus/qtdbus-5.4.2.ebuild
new file mode 100644
index 000000000000..aa947524554c
--- /dev/null
+++ b/dev-qt/qtdbus/qtdbus-5.4.2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The D-Bus module for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}
+ >=sys-apps/dbus-1.4.20
+ >=sys-libs/zlib-1.2.5
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/dbus
+ src/tools/qdbusxml2cpp
+ src/tools/qdbuscpp2xml
+)
+
+QT5_GENTOO_CONFIG=(
+ :dbus
+ :dbus-linked:
+)
+
+src_configure() {
+ local myconf=(
+ -dbus-linked
+ )
+ qt5-build_src_configure
+}
diff --git a/dev-qt/qtdeclarative/Manifest b/dev-qt/qtdeclarative/Manifest
new file mode 100644
index 000000000000..a7510e129eec
--- /dev/null
+++ b/dev-qt/qtdeclarative/Manifest
@@ -0,0 +1,4 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qtdeclarative-opensource-src-5.4.2.tar.xz 18497092 SHA256 b73021d78fffe7894c5fde998a767a866b09811c7e210f8e46f252a32be741ae SHA512 be8b28dfafc20364e0056739f94432750493372b423f2351715d1ec0942cee71b36f6a86db5d6f450c291b147a07632dd1573b76601c0d5eb4c2fdaed717bb93 WHIRLPOOL f8666b6b95a386363d1217c1e9ed70fd127340741ff9b9d177f8694945775b41b7db224a5a401fca721311290c1b0f9a5ccf8521433fb11a72c8dbf5dc1c0d47
diff --git a/dev-qt/qtdeclarative/metadata.xml b/dev-qt/qtdeclarative/metadata.xml
new file mode 100644
index 000000000000..f96540a49918
--- /dev/null
+++ b/dev-qt/qtdeclarative/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ <flag name="gles2">Use GLES 2.0 or later instead of full OpenGL</flag>
+ <flag name="localstorage">Build the LocalStorage import for QtQuick (requires QtSql)</flag>
+ <flag name="qt3support">Enable the Qt3Support libraries for Qt4. Note that
+ this does not mean you can compile pure Qt3 programs with Qt4.</flag>
+ <flag name="webkit">Build the WebView QML component</flag>
+ <flag name="widgets">Enable QtWidgets support</flag>
+ <flag name="xml">Build the XmlListModel import for QtQuick (requires QtXmlPatterns)</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtdeclarative/qtdeclarative-4.8.5.ebuild b/dev-qt/qtdeclarative/qtdeclarative-4.8.5.ebuild
new file mode 100644
index 000000000000..cba6eb61d1a2
--- /dev/null
+++ b/dev-qt/qtdeclarative/qtdeclarative-4.8.5.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-build
+
+DESCRIPTION="The Declarative module for the Qt toolkit"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+fi
+IUSE="+accessibility qt3support webkit"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,qt3support=]
+ ~dev-qt/qtgui-${PV}[accessibility=,aqua=,debug=,qt3support=]
+ ~dev-qt/qtopengl-${PV}[aqua=,debug=,qt3support=]
+ ~dev-qt/qtscript-${PV}[aqua=,debug=]
+ ~dev-qt/qtsql-${PV}[aqua=,debug=,qt3support=]
+ ~dev-qt/qtsvg-${PV}[accessibility=,aqua=,debug=]
+ ~dev-qt/qtxmlpatterns-${PV}[aqua=,debug=]
+ qt3support? ( ~dev-qt/qt3support-${PV}[accessibility=,aqua=,debug=] )
+ webkit? ( ~dev-qt/qtwebkit-${PV}[aqua=,debug=] )
+"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/declarative
+ src/imports
+ src/plugins/qmltooling
+ tools/qml
+ tools/qmlplugindump"
+
+ if use webkit; then
+ QT4_TARGET_DIRECTORIES+=" src/3rdparty/webkit/Source/WebKit/qt/declarative"
+ fi
+
+ QT4_EXTRACT_DIRECTORIES="
+ include
+ src
+ tools
+ translations"
+
+ QCONFIG_ADD="declarative"
+ QCONFIG_DEFINE="QT_DECLARATIVE"
+
+ qt4-build_pkg_setup
+}
+
+src_configure() {
+ myconf+="
+ -declarative -no-gtkstyle
+ $(qt_use accessibility)
+ $(qt_use qt3support)
+ $(qt_use webkit)"
+ qt4-build_src_configure
+}
+
+src_install() {
+ qt4-build_src_install
+
+ # install private headers
+ if use aqua && [[ ${CHOST##*-darwin} -ge 9 ]]; then
+ insinto "${QTLIBDIR#${EPREFIX}}"/QtDeclarative.framework/Headers/private
+ # ran for the 2nd time, need it for the updated headers
+ fix_includes
+ else
+ insinto "${QTHEADERDIR#${EPREFIX}}"/QtDeclarative/private
+ fi
+ find "${S}"/src/declarative/ -type f -name "*_p.h" -exec doins {} +
+}
diff --git a/dev-qt/qtdeclarative/qtdeclarative-4.8.6-r1.ebuild b/dev-qt/qtdeclarative/qtdeclarative-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..c2b97dcd2cb2
--- /dev/null
+++ b/dev-qt/qtdeclarative/qtdeclarative-4.8.6-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="The Declarative module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm hppa ia64 ppc ppc64"
+else
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+fi
+
+IUSE="+accessibility qt3support webkit"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,qt3support=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[accessibility=,aqua=,debug=,qt3support=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtopengl-${PV}[aqua=,debug=,qt3support=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtscript-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtsql-${PV}[aqua=,debug=,qt3support=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtsvg-${PV}[accessibility=,aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtxmlpatterns-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ qt3support? ( ~dev-qt/qt3support-${PV}[accessibility=,aqua=,debug=,${MULTILIB_USEDEP}] )
+ webkit? ( ~dev-qt/qtwebkit-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="
+ src/declarative
+ src/imports
+ src/plugins/qmltooling
+ tools/qml
+ tools/qmlplugindump"
+
+QCONFIG_ADD="declarative"
+QCONFIG_DEFINE="QT_DECLARATIVE"
+
+pkg_setup() {
+ use webkit && QT4_TARGET_DIRECTORIES+="
+ src/3rdparty/webkit/Source/WebKit/qt/declarative"
+}
+
+multilib_src_configure() {
+ local myconf=(
+ -declarative -no-gtkstyle
+ $(qt_use accessibility)
+ $(qt_use qt3support)
+ $(qt_use webkit)
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtdeclarative/qtdeclarative-4.8.7.ebuild b/dev-qt/qtdeclarative/qtdeclarative-4.8.7.ebuild
new file mode 100644
index 000000000000..0f8589cd7769
--- /dev/null
+++ b/dev-qt/qtdeclarative/qtdeclarative-4.8.7.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="The Declarative module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+fi
+
+IUSE="+accessibility qt3support webkit"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,qt3support=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[accessibility=,aqua=,debug=,qt3support=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtopengl-${PV}[aqua=,debug=,qt3support=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtscript-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtsql-${PV}[aqua=,debug=,qt3support=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtsvg-${PV}[accessibility=,aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtxmlpatterns-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ qt3support? ( ~dev-qt/qt3support-${PV}[accessibility=,aqua=,debug=,${MULTILIB_USEDEP}] )
+ webkit? ( ~dev-qt/qtwebkit-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="
+ src/declarative
+ src/imports
+ src/plugins/qmltooling
+ tools/qml
+ tools/qmlplugindump"
+
+QCONFIG_ADD="declarative"
+QCONFIG_DEFINE="QT_DECLARATIVE"
+
+pkg_setup() {
+ use webkit && QT4_TARGET_DIRECTORIES+="
+ src/3rdparty/webkit/Source/WebKit/qt/declarative"
+}
+
+multilib_src_configure() {
+ local myconf=(
+ -declarative -no-gtkstyle
+ $(qt_use accessibility)
+ $(qt_use qt3support)
+ $(qt_use webkit)
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtdeclarative/qtdeclarative-5.4.2.ebuild b/dev-qt/qtdeclarative/qtdeclarative-5.4.2.ebuild
new file mode 100644
index 000000000000..70af74e3ce74
--- /dev/null
+++ b/dev-qt/qtdeclarative/qtdeclarative-5.4.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt5-build
+
+DESCRIPTION="The QML and Quick modules for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="gles2 localstorage +widgets xml"
+
+# qtgui[gles2=] is needed because of bug 504322
+DEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtgui-${PV}:5[gles2=]
+ >=dev-qt/qtnetwork-${PV}:5
+ >=dev-qt/qttest-${PV}:5
+ localstorage? ( >=dev-qt/qtsql-${PV}:5 )
+ widgets? ( >=dev-qt/qtwidgets-${PV}:5[gles2=] )
+ xml? ( >=dev-qt/qtxmlpatterns-${PV}:5 )
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ use localstorage || sed -i -e '/localstorage/d' \
+ src/imports/imports.pro || die
+
+ use widgets || sed -i -e 's/contains(QT_CONFIG, no-widgets)/true/' \
+ src/qmltest/qmltest.pro || die
+
+ qt_use_disable_mod widgets widgets \
+ src/src.pro \
+ tools/tools.pro \
+ tools/qmlscene/qmlscene.pro \
+ tools/qml/qml.pro
+
+ qt_use_disable_mod xml xmlpatterns \
+ src/imports/imports.pro \
+ tests/auto/quick/quick.pro
+
+ qt5-build_src_prepare
+}
diff --git a/dev-qt/qtdemo/Manifest b/dev-qt/qtdemo/Manifest
new file mode 100644
index 000000000000..ac4ca6af0d23
--- /dev/null
+++ b/dev-qt/qtdemo/Manifest
@@ -0,0 +1,3 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
diff --git a/dev-qt/qtdemo/files/qtdemo-4.6-plugandpaint.patch b/dev-qt/qtdemo/files/qtdemo-4.6-plugandpaint.patch
new file mode 100644
index 000000000000..262996aa1068
--- /dev/null
+++ b/dev-qt/qtdemo/files/qtdemo-4.6-plugandpaint.patch
@@ -0,0 +1,13 @@
+diff --git a/examples/tools/plugandpaint/plugandpaint.pro b/examples/tools/plugandpaint/plugandpaint.pro
+index 9616eb8..e188bc1 100644
+--- a/examples/tools/plugandpaint/plugandpaint.pro
++++ b/examples/tools/plugandpaint/plugandpaint.pro
+@@ -10,7 +10,7 @@ SOURCES = main.cpp \
+ symbian {
+ LIBS = -lpnp_basictools.lib
+ } else {
+- LIBS = -L$${QT_BUILD_TREE}/examples/tools/plugandpaint/plugins -lpnp_basictools
++ LIBS += -L$${QT_BUILD_TREE}/examples/tools/plugandpaint/plugins -lpnp_basictools
+ }
+
+ if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {
diff --git a/dev-qt/qtdemo/metadata.xml b/dev-qt/qtdemo/metadata.xml
new file mode 100644
index 000000000000..17de06fe1199
--- /dev/null
+++ b/dev-qt/qtdemo/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="dbus">Build QtDBus examples and demos</flag>
+ <flag name="declarative">Build QtDeclarative examples and demos</flag>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ <flag name="multimedia">Build QtMultimedia examples and demos</flag>
+ <flag name="opengl">Build QtOpenGL examples and demos</flag>
+ <flag name="openvg">Build QtOpenVG examples and demos</flag>
+ <flag name="phonon">Build Phonon examples and demos</flag>
+ <flag name="qt3support">Build Qt3Support examples and demos</flag>
+ <flag name="webkit">Build QtWebKit examples and demos</flag>
+ <flag name="xmlpatterns">Build QtXmlPatterns examples and demos</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtdemo/qtdemo-4.8.5-r1.ebuild b/dev-qt/qtdemo/qtdemo-4.8.5-r1.ebuild
new file mode 100644
index 000000000000..2607b79b9ac4
--- /dev/null
+++ b/dev-qt/qtdemo/qtdemo-4.8.5-r1.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-build
+
+DESCRIPTION="Demonstration module and examples for the Qt toolkit"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="amd64 ~arm ppc ppc64 x86 ~x64-macos"
+fi
+IUSE="dbus declarative kde multimedia opengl openvg phonon qt3support webkit xmlpatterns"
+
+DEPEND="
+ ~dev-qt/designer-${PV}[aqua=,debug=]
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,qt3support?]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,qt3support?]
+ ~dev-qt/qthelp-${PV}[aqua=,debug=]
+ ~dev-qt/qtscript-${PV}[aqua=,debug=]
+ ~dev-qt/qtsql-${PV}[aqua=,debug=,qt3support?]
+ ~dev-qt/qtsvg-${PV}[aqua=,debug=]
+ ~dev-qt/qttest-${PV}[aqua=,debug=]
+ dbus? ( ~dev-qt/qtdbus-${PV}[aqua=,debug=] )
+ declarative? ( ~dev-qt/qtdeclarative-${PV}[aqua=,debug=,webkit?] )
+ multimedia? ( ~dev-qt/qtmultimedia-${PV}[aqua=,debug=] )
+ opengl? ( ~dev-qt/qtopengl-${PV}[aqua=,debug=,qt3support?] )
+ openvg? ( ~dev-qt/qtopenvg-${PV}[aqua=,debug=,qt3support?] )
+ phonon? (
+ kde? ( media-libs/phonon[aqua=,qt4] )
+ !kde? ( || ( ~dev-qt/qtphonon-${PV}[aqua=,debug=] media-libs/phonon[aqua=,qt4] ) )
+ )
+ qt3support? ( ~dev-qt/qt3support-${PV}[aqua=,debug=] )
+ webkit? ( ~dev-qt/qtwebkit-${PV}[aqua=,debug=] )
+ xmlpatterns? ( ~dev-qt/qtxmlpatterns-${PV}[aqua=,debug=] )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.6-plugandpaint.patch"
+)
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ demos
+ examples"
+ QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
+ doc/src/images
+ include
+ src
+ tools"
+
+ qt4-build_pkg_setup
+}
+
+src_prepare() {
+ qt4-build_src_prepare
+
+ # Array mapping USE flags to subdirs
+ local flags_subdirs_map=(
+ 'dbus'
+ 'declarative:declarative'
+ 'multimedia:spectrum'
+ 'opengl:boxes|glhypnotizer'
+ 'openvg'
+ 'phonon:mediaplayer'
+ 'webkit:browser'
+ 'xmlpatterns'
+ )
+
+ # Disable unwanted examples/demos
+ for flag in "${flags_subdirs_map[@]}"; do
+ if ! use ${flag%:*}; then
+ einfo "Disabling ${flag%:*} examples"
+ sed -i -e "/SUBDIRS += ${flag%:*}/d" \
+ examples/examples.pro || die
+
+ if [[ ${flag} == *:* ]]; then
+ einfo "Disabling ${flag%:*} demos"
+ sed -i -re "/SUBDIRS \+= demos_(${flag#*:})/d" \
+ demos/demos.pro || die
+ fi
+ fi
+ done
+
+ if ! use qt3support; then
+ einfo "Disabling qt3support examples"
+ sed -i -e '/QT_CONFIG, qt3support/d' \
+ examples/graphicsview/graphicsview.pro || die
+ fi
+}
+
+src_configure() {
+ myconf+="
+ $(qt_use dbus)
+ $(qt_use declarative)
+ $(qt_use multimedia) -no-audio-backend
+ $(qt_use opengl)
+ $(qt_use openvg)
+ $(qt_use phonon) -no-phonon-backend
+ $(qt_use qt3support)
+ $(qt_use webkit)
+ $(qt_use xmlpatterns)"
+
+ qt4-build_src_configure
+}
+
+src_install() {
+ insinto "${QTDOCDIR#${EPREFIX}}"/src
+ doins -r doc/src/images
+
+ qt4-build_src_install
+}
diff --git a/dev-qt/qtdemo/qtdemo-4.8.6-r1.ebuild b/dev-qt/qtdemo/qtdemo-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..c984ec83e408
--- /dev/null
+++ b/dev-qt/qtdemo/qtdemo-4.8.6-r1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="Demonstration module and examples for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="arm ppc ppc64"
+else
+ KEYWORDS="amd64 arm ppc ppc64 x86 ~x64-macos"
+fi
+
+IUSE="dbus declarative kde multimedia opengl openvg phonon webkit xmlpatterns"
+
+DEPEND="
+ ~dev-qt/designer-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qthelp-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtscript-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtsql-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtsvg-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qttest-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ dbus? ( ~dev-qt/qtdbus-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+ declarative? ( ~dev-qt/qtdeclarative-${PV}[aqua=,debug=,webkit?,${MULTILIB_USEDEP}] )
+ multimedia? ( ~dev-qt/qtmultimedia-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+ opengl? ( ~dev-qt/qtopengl-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+ openvg? ( ~dev-qt/qtopenvg-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+ phonon? (
+ kde? ( media-libs/phonon[aqua=,qt4] )
+ !kde? ( || ( ~dev-qt/qtphonon-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] media-libs/phonon[aqua=,qt4] ) )
+ )
+ webkit? ( ~dev-qt/qtwebkit-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+ xmlpatterns? ( ~dev-qt/qtxmlpatterns-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.6-plugandpaint.patch"
+)
+
+QT4_TARGET_DIRECTORIES="
+ demos
+ examples"
+
+src_prepare() {
+ qt4-build-multilib_src_prepare
+
+ # Array mapping USE flags to subdirs
+ local flags_subdirs_map=(
+ 'dbus'
+ 'declarative:declarative'
+ 'multimedia:spectrum'
+ 'opengl:boxes|glhypnotizer'
+ 'openvg'
+ 'phonon:mediaplayer'
+ 'webkit:browser'
+ 'xmlpatterns'
+ )
+
+ # Disable unwanted examples/demos
+ for flag in "${flags_subdirs_map[@]}"; do
+ if ! use ${flag%:*}; then
+ einfo "Disabling ${flag%:*} examples"
+ sed -i -e "/SUBDIRS += ${flag%:*}/d" \
+ examples/examples.pro || die
+
+ if [[ ${flag} == *:* ]]; then
+ einfo "Disabling ${flag%:*} demos"
+ sed -i -re "/SUBDIRS \+= demos_(${flag#*:})/d" \
+ demos/demos.pro || die
+ fi
+ fi
+ done
+
+ # Remove bogus dependency on qt3support (bug 510042)
+ sed -i -e 's/contains(QT_CONFIG, qt3support)://' \
+ examples/graphicsview/graphicsview.pro || die
+}
+
+multilib_src_configure() {
+ local myconf=(
+ $(qt_use dbus)
+ $(qt_use declarative)
+ $(qt_use multimedia) -no-audio-backend
+ $(qt_use opengl)
+ $(qt_use openvg)
+ $(qt_native_use phonon) -no-phonon-backend
+ $(qt_use webkit)
+ $(qt_use xmlpatterns)
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtdemo/qtdemo-4.8.7.ebuild b/dev-qt/qtdemo/qtdemo-4.8.7.ebuild
new file mode 100644
index 000000000000..f3cc44200d36
--- /dev/null
+++ b/dev-qt/qtdemo/qtdemo-4.8.7.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="Demonstration module and examples for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x64-macos"
+fi
+
+IUSE="dbus declarative kde multimedia opengl openvg phonon webkit xmlpatterns"
+
+DEPEND="
+ ~dev-qt/designer-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qthelp-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtscript-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtsql-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtsvg-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qttest-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ dbus? ( ~dev-qt/qtdbus-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+ declarative? ( ~dev-qt/qtdeclarative-${PV}[aqua=,debug=,webkit?,${MULTILIB_USEDEP}] )
+ multimedia? ( ~dev-qt/qtmultimedia-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+ opengl? ( ~dev-qt/qtopengl-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+ openvg? ( ~dev-qt/qtopenvg-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+ phonon? (
+ kde? ( >=media-libs/phonon-4.8.3-r1[aqua=,qt4,${MULTILIB_USEDEP}] )
+ !kde? ( || (
+ ~dev-qt/qtphonon-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ >=media-libs/phonon-4.8.3-r1[aqua=,qt4,${MULTILIB_USEDEP}]
+ ) )
+ )
+ webkit? ( ~dev-qt/qtwebkit-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+ xmlpatterns? ( ~dev-qt/qtxmlpatterns-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.6-plugandpaint.patch"
+)
+
+QT4_TARGET_DIRECTORIES="
+ demos
+ examples"
+
+src_prepare() {
+ qt4-build-multilib_src_prepare
+
+ # Array mapping USE flags to subdirs
+ local flags_subdirs_map=(
+ 'dbus'
+ 'declarative:declarative'
+ 'multimedia:spectrum'
+ 'opengl:boxes|glhypnotizer'
+ 'openvg'
+ 'phonon:mediaplayer'
+ 'webkit:browser'
+ 'xmlpatterns'
+ )
+
+ # Disable unwanted examples/demos
+ for flag in "${flags_subdirs_map[@]}"; do
+ if ! use ${flag%:*}; then
+ einfo "Disabling ${flag%:*} examples"
+ sed -i -e "/SUBDIRS += ${flag%:*}/d" \
+ examples/examples.pro || die
+
+ if [[ ${flag} == *:* ]]; then
+ einfo "Disabling ${flag%:*} demos"
+ sed -i -re "/SUBDIRS \+= demos_(${flag#*:})/d" \
+ demos/demos.pro || die
+ fi
+ fi
+ done
+
+ # Remove bogus dependency on qt3support (bug 510042)
+ sed -i -e 's/contains(QT_CONFIG, qt3support)://' \
+ examples/graphicsview/graphicsview.pro || die
+}
+
+multilib_src_configure() {
+ local myconf=(
+ $(qt_use dbus)
+ $(qt_use declarative)
+ $(qt_use multimedia) -no-audio-backend
+ $(qt_use opengl)
+ $(qt_use openvg)
+ $(qt_use phonon) -no-phonon-backend
+ $(qt_use webkit)
+ $(qt_use xmlpatterns)
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtdiag/Manifest b/dev-qt/qtdiag/Manifest
new file mode 100644
index 000000000000..021b32a107b9
--- /dev/null
+++ b/dev-qt/qtdiag/Manifest
@@ -0,0 +1 @@
+DIST qttools-opensource-src-5.4.2.tar.xz 9333100 SHA256 edf3d7e00227f9989101da84b2fdf8eaf1a5b7863dc5e0d26bb0f39303e8b6b4 SHA512 55aa04eae16b71e78d4432e7d59b2052392d13652a3e9beff15a6503f2e88e77a9b48279121d8eee943a898799155c05b167d986bf01fae84b5db0a9a1759148 WHIRLPOOL 9123ff33a35c03adaa6d3374e86b539e9481ec78467bd72ad6f2d832e76e7aafd9b2f2da0420111e1aa8a66c4950b0478d8a6ae4c0f0e05a20c8334196b077e8
diff --git a/dev-qt/qtdiag/metadata.xml b/dev-qt/qtdiag/metadata.xml
new file mode 100644
index 000000000000..afb3b434585b
--- /dev/null
+++ b/dev-qt/qtdiag/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtdiag/qtdiag-5.4.2.ebuild b/dev-qt/qtdiag/qtdiag-5.4.2.ebuild
new file mode 100644
index 000000000000..c07bccc9175e
--- /dev/null
+++ b/dev-qt/qtdiag/qtdiag-5.4.2.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qttools"
+inherit qt5-build
+
+DESCRIPTION="Tool for reporting diagnostic information about Qt and its environment"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="+ssl"
+
+DEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtgui-${PV}:5
+ >=dev-qt/qtnetwork-${PV}:5[ssl=]
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/qtdiag
+)
diff --git a/dev-qt/qtgraphicaleffects/Manifest b/dev-qt/qtgraphicaleffects/Manifest
new file mode 100644
index 000000000000..ce122fb41f16
--- /dev/null
+++ b/dev-qt/qtgraphicaleffects/Manifest
@@ -0,0 +1 @@
+DIST qtgraphicaleffects-opensource-src-5.4.2.tar.xz 14324140 SHA256 ba8f477be1b0675ce36f48530db050d2922b2a0d6ff80c46559245a94aede80a SHA512 205896a2551a2be99b015c4254ec5195f97ff99d266e377caaffe02033d5c0aa9d7509b781f5316074ebe5e2d8e768b90db81d19a2233f98c887c57a25046c38 WHIRLPOOL 4424a57f760cc8d7bbf71b890bf3eea50b01eb2f4a1b36e88c945a47adb05a6a7badca0066552f523c4807dc7ee40ea70dd5f79cc33d45a4a5f3d334152f150d
diff --git a/dev-qt/qtgraphicaleffects/metadata.xml b/dev-qt/qtgraphicaleffects/metadata.xml
new file mode 100644
index 000000000000..afb3b434585b
--- /dev/null
+++ b/dev-qt/qtgraphicaleffects/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtgraphicaleffects/qtgraphicaleffects-5.4.2.ebuild b/dev-qt/qtgraphicaleffects/qtgraphicaleffects-5.4.2.ebuild
new file mode 100644
index 000000000000..8a680ca8ed28
--- /dev/null
+++ b/dev-qt/qtgraphicaleffects/qtgraphicaleffects-5.4.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt5-build virtualx
+
+DESCRIPTION="Set of QML types for adding visual effects to user interfaces"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+fi
+
+IUSE=""
+
+RDEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtdeclarative-${PV}:5
+ >=dev-qt/qtxmlpatterns-${PV}:5
+"
+DEPEND="${RDEPEND}
+ test? ( >=dev-qt/qtgui-${PV}:5 )
+"
+
+src_test() {
+ local VIRTUALX_COMMAND="qt5-build_src_test"
+ virtualmake
+}
diff --git a/dev-qt/qtgui/Manifest b/dev-qt/qtgui/Manifest
new file mode 100644
index 000000000000..925c3e0278ae
--- /dev/null
+++ b/dev-qt/qtgui/Manifest
@@ -0,0 +1,5 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qtbase-opensource-src-5.4.2.tar.xz 46354192 SHA256 9fc4f720b8b5a8b8e4a7d45e13ce4d5b86756ad46fb406386637eb2de5fd5a74 SHA512 029da83969614bc9b3803c76242af62911e3c6de171b116b5cb8e2823cad0514ab705cc3fa331e042c679caeb099de4e9cd7ddea92959f675dda82533e3ad7fe WHIRLPOOL 5f352f78a779c5d042f04966a010b10af706c4db94976870721a550e3ab7eaf2695b3582c86cdcc3a11de36283e11fe65797f96e59df96fa367b16b72b5f9213
+DIST qtgui-systemtrayicon-plugin-system.patch 51377 SHA256 e8582ebb2a5db99bf85789585516459ace42fc2b57fc7d5ff6156a2819bda282 SHA512 0d74b61e23af2e8ef0619ee616c4b775761514f53ba79bcb25b32b7e55beab3575c0d279ba1b016498804023bb78f8cff61964ce56f80642f648406f7c303679 WHIRLPOOL 03cc247a2a0e3b77fc541fa0b47abb125c8f7b304037f2067488861f12fdab25d3b3b3a7cf90626c229aa85a2d43ae4319c0f838b6eeb5ecdfe838a365ed8a58
diff --git a/dev-qt/qtgui/files/qtgui-4.7.3-cups.patch b/dev-qt/qtgui/files/qtgui-4.7.3-cups.patch
new file mode 100644
index 000000000000..e0305e11b89a
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-4.7.3-cups.patch
@@ -0,0 +1,84 @@
+diff -ur qt-everywhere-opensource-src-4.6.2/src/gui/dialogs/qprintdialog_unix.cpp qt-everywhere-opensource-src-4.6.2-cups/src/gui/dialogs/qprintdialog_unix.cpp
+--- qt-everywhere-opensource-src-4.6.2/src/gui/dialogs/qprintdialog_unix.cpp 2010-02-11 16:55:22.000000000 +0100
++++ qt-everywhere-opensource-src-4.6.2-cups/src/gui/dialogs/qprintdialog_unix.cpp 2010-02-28 04:34:16.000000000 +0100
+@@ -569,6 +569,32 @@
+ void QPrintDialogPrivate::selectPrinter(QCUPSSupport *cups)
+ {
+ options.duplex->setEnabled(cups && cups->ppdOption("Duplex"));
++
++ if (cups) {
++ const ppd_option_t* duplex = cups->ppdOption("Duplex");
++ if (duplex) {
++ // copy default ppd duplex to qt dialog
++ if (qstrcmp(duplex->defchoice, "DuplexTumble") == 0)
++ options.duplexShort->setChecked(true);
++ else if (qstrcmp(duplex->defchoice, "DuplexNoTumble") == 0)
++ options.duplexLong->setChecked(true);
++ else
++ options.noDuplex->setChecked(true);
++ }
++
++ if (cups->currentPPD()) {
++ // set default color
++ if (cups->currentPPD()->color_device)
++ options.color->setChecked(true);
++ else
++ options.grayscale->setChecked(true);
++ }
++
++ // set collation
++ const ppd_option_t *collate = cups->ppdOption("Collate");
++ if (collate)
++ options.collate->setChecked(qstrcmp(collate->defchoice, "True")==0);
++ }
+ }
+ #endif
+
+diff -ur qt-everywhere-opensource-src-4.6.2/src/gui/painting/qprinter.cpp qt-everywhere-opensource-src-4.6.2-cups/src/gui/painting/qprinter.cpp
+--- qt-everywhere-opensource-src-4.6.2/src/gui/painting/qprinter.cpp 2010-02-11 16:55:22.000000000 +0100
++++ qt-everywhere-opensource-src-4.6.2-cups/src/gui/painting/qprinter.cpp 2010-02-28 04:55:15.000000000 +0100
+@@ -627,6 +627,44 @@
+ && d_ptr->paintEngine->type() != QPaintEngine::MacPrinter) {
+ setOutputFormat(QPrinter::PdfFormat);
+ }
++
++#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
++ // fill in defaults from ppd file
++ QCUPSSupport cups;
++
++ int printernum = -1;
++ for (int i = 0; i < cups.availablePrintersCount(); i++) {
++ if (printerName().toLocal8Bit() == cups.availablePrinters()[i].name)
++ printernum = i;
++ }
++ if (printernum >= 0) {
++ cups.setCurrentPrinter(printernum);
++
++ const ppd_option_t* duplex = cups.ppdOption("Duplex");
++ if (duplex) {
++ // copy default ppd duplex to qt dialog
++ if (qstrcmp(duplex->defchoice, "DuplexTumble") == 0)
++ setDuplex(DuplexShortSide);
++ else if (qstrcmp(duplex->defchoice, "DuplexNoTumble") == 0)
++ setDuplex(DuplexLongSide);
++ else
++ setDuplex(DuplexNone);
++ }
++
++ if (cups.currentPPD()) {
++ // set default color
++ if (cups.currentPPD()->color_device)
++ setColorMode(Color);
++ else
++ setColorMode(GrayScale);
++ }
++
++ // set collation
++ const ppd_option_t *collate = cups.ppdOption("Collate");
++ if (collate)
++ setCollateCopies(qstrcmp(collate->defchoice, "True")==0);
++ }
++#endif
+ }
+
+ /*!
diff --git a/dev-qt/qtgui/files/qtgui-4.8.5-CVE-2015-0295.patch b/dev-qt/qtgui/files/qtgui-4.8.5-CVE-2015-0295.patch
new file mode 100644
index 000000000000..3ac87d8dc369
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-4.8.5-CVE-2015-0295.patch
@@ -0,0 +1,40 @@
+From e50aa2252cdd5cb53eef7d8c4503c7edff634f68 Mon Sep 17 00:00:00 2001
+From: "Richard J. Moore" <rich@kde.org>
+Date: Tue, 24 Feb 2015 19:02:35 +0000
+Subject: [PATCH] Fix a division by zero when processing malformed BMP files.
+
+This fixes a division by 0 when processing a maliciously crafted BMP
+file. No impact beyond DoS.
+
+Backport of 661f6bfd032dacc62841037732816a583640e187
+
+Task-number: QTBUG-44547
+Change-Id: I43f06e752b11cb50669101460902a82b885ae618
+Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
+---
+ src/gui/image/qbmphandler.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp
+index b22e842..30fa9e0 100644
+--- a/src/gui/image/qbmphandler.cpp
++++ b/src/gui/image/qbmphandler.cpp
+@@ -319,10 +319,16 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
+ }
+ } else if (comp == BMP_BITFIELDS && (nbits == 16 || nbits == 32)) {
+ red_shift = calc_shift(red_mask);
++ if (((red_mask >> red_shift) + 1) == 0)
++ return false;
+ red_scale = 256 / ((red_mask >> red_shift) + 1);
+ green_shift = calc_shift(green_mask);
++ if (((green_mask >> green_shift) + 1) == 0)
++ return false;
+ green_scale = 256 / ((green_mask >> green_shift) + 1);
+ blue_shift = calc_shift(blue_mask);
++ if (((blue_mask >> blue_shift) + 1) == 0)
++ return false;
+ blue_scale = 256 / ((blue_mask >> blue_shift) + 1);
+ } else if (comp == BMP_RGB && (nbits == 24 || nbits == 32)) {
+ blue_mask = 0x000000ff;
+--
+2.0.5 \ No newline at end of file
diff --git a/dev-qt/qtgui/files/qtgui-4.8.5-cleanlooks-floating-point-exception.patch b/dev-qt/qtgui/files/qtgui-4.8.5-cleanlooks-floating-point-exception.patch
new file mode 100644
index 000000000000..a54efef0d78b
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-4.8.5-cleanlooks-floating-point-exception.patch
@@ -0,0 +1,38 @@
+From 0db65e148dcb4d5e5b98475f207d41a287c401a1 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Wed, 28 May 2014 00:22:55 -0400
+Subject: [PATCH] Cleanlooks style: Fix floating point exception
+
+In QCleanlooksStyle::drawControl, if indeterminate == true and
+rect.width() == 4, we will end up with slideWidth of zero, and
+take a mod by zero when calculating the value of step.
+
+This causes a crash in Quassel 0.10; see
+https://bugs.gentoo.org/show_bug.cgi?id=507124
+
+Instead, calculate slideWidth based on max(width, minWidth) where
+minWidth was already set as 4, ensuring that slideWidth >= 2.
+
+Change-Id: I6678789105e359fa26c99409f449cad0ba3bd0ae
+(cherry picked from qtstyleplugins/8ff2ac6035fb1d01f5c0054ba14afb949410e3a7)
+Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
+---
+ src/gui/styles/qcleanlooksstyle.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp
+index 504734a..3f665ca 100644
+--- a/src/gui/styles/qcleanlooksstyle.cpp
++++ b/src/gui/styles/qcleanlooksstyle.cpp
+@@ -1773,7 +1773,7 @@ void QCleanlooksStyle::drawControl(ControlElement element, const QStyleOption *o
+ }
+ } else {
+ Q_D(const QCleanlooksStyle);
+- int slideWidth = ((rect.width() - 4) * 2) / 3;
++ int slideWidth = (qMax(rect.width() - 4, minWidth) * 2) / 3;
+ int step = ((d->animateStep * slideWidth) / d->animationFps) % slideWidth;
+ if ((((d->animateStep * slideWidth) / d->animationFps) % (2 * slideWidth)) >= slideWidth)
+ step = slideWidth - step;
+--
+2.0.0
+
diff --git a/dev-qt/qtgui/files/qtgui-4.8.5-disable-gtk-theme-check.patch b/dev-qt/qtgui/files/qtgui-4.8.5-disable-gtk-theme-check.patch
new file mode 100644
index 000000000000..9a9f773537e4
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-4.8.5-disable-gtk-theme-check.patch
@@ -0,0 +1,22 @@
+diff -up qt-everywhere-opensource-src-4.8.5/src/gui/styles/qgtkstyle_p.cpp.qgtkstyle_disable_gtk_theme_check qt-everywhere-opensource-src-4.8.5/src/gui/styles/qgtkstyle_p.cpp
+--- qt-everywhere-opensource-src-4.8.5/src/gui/styles/qgtkstyle_p.cpp.qgtkstyle_disable_gtk_theme_check 2013-06-09 16:28:22.938840346 -0500
++++ qt-everywhere-opensource-src-4.8.5/src/gui/styles/qgtkstyle_p.cpp 2013-06-09 17:03:01.781125479 -0500
+@@ -503,18 +503,6 @@ void QGtkStylePrivate::initGtkWidgets()
+ return;
+ }
+
+- static QString themeName;
+- if (!gtkWidgetMap()->contains("GtkWindow") && themeName.isEmpty()) {
+- themeName = getThemeName();
+-
+- if (themeName == QLS("Qt") || themeName == QLS("Qt4")) {
+- // Due to namespace conflicts with Qt3 and obvious recursion with Qt4,
+- // we cannot support the GTK_Qt Gtk engine
+- qWarning("QGtkStyle cannot be used together with the GTK_Qt engine.");
+- return;
+- }
+- }
+-
+ if (QGtkStylePrivate::gtk_init) {
+ // Gtk will set the Qt error handler so we have to reset it afterwards
+ x11ErrorHandler qt_x_errhandler = XSetErrorHandler(0);
diff --git a/dev-qt/qtgui/files/qtgui-4.8.5-dont-crash-on-broken-GIF-images.patch b/dev-qt/qtgui/files/qtgui-4.8.5-dont-crash-on-broken-GIF-images.patch
new file mode 100644
index 000000000000..d800caf97421
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-4.8.5-dont-crash-on-broken-GIF-images.patch
@@ -0,0 +1,43 @@
+From f1b76c126c476c155af8c404b97c42cd1a709333 Mon Sep 17 00:00:00 2001
+From: Lars Knoll <lars.knoll@digia.com>
+Date: Thu, 24 Apr 2014 15:33:27 +0200
+Subject: Don't crash on broken GIF images
+
+Broken GIF images could set invalid width and height
+values inside the image, leading to Qt creating a null
+QImage for it. In that case we need to abort decoding
+the image and return an error.
+
+Initial patch by Rich Moore.
+
+Backport of Id82a4036f478bd6e49c402d6598f57e7e5bb5e1e from Qt 5
+
+Task-number: QTBUG-38367
+Change-Id: I0680740018aaa8356d267b7af3f01fac3697312a
+Security-advisory: CVE-2014-0190
+Reviewed-by: Richard J. Moore <rich@kde.org>
+---
+ src/gui/image/qgifhandler.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/gui/image/qgifhandler.cpp b/src/gui/image/qgifhandler.cpp
+index 3324f04..5199dd3 100644
+--- a/src/gui/image/qgifhandler.cpp
++++ b/src/gui/image/qgifhandler.cpp
+@@ -359,6 +359,13 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length,
+ memset(bits, 0, image->byteCount());
+ }
+
++ // Check if the previous attempt to create the image failed. If it
++ // did then the image is broken and we should give up.
++ if (image->isNull()) {
++ state = Error;
++ return -1;
++ }
++
+ disposePrevious(image);
+ disposed = false;
+
+--
+1.9.3
+
diff --git a/dev-qt/qtgui/files/qtgui-4.8.5-keyboard-shortcuts.patch b/dev-qt/qtgui/files/qtgui-4.8.5-keyboard-shortcuts.patch
new file mode 100644
index 000000000000..c975ebfaca2d
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-4.8.5-keyboard-shortcuts.patch
@@ -0,0 +1,41 @@
+From 0c03af0d4d928bdbb32b09eedb1dba3ce59e5278 Mon Sep 17 00:00:00 2001
+From: Gatis Paeglis <gatis.paeglis@digia.com>
+Date: Sat, 31 Aug 2013 21:22:47 +0200
+Subject: [PATCH] Revert "QTBUG-15319: fix shortcuts with secondary Xkb
+ layout."
+
+The change which attempted to fix QTBUG-15319 broke keyboard
+shortcuts for non latin keyboard layouts.
+
+This patch reverts QTBUG-15319 (f45cdeda8) since it caused a
+regression.
+
+Task-number: QTBUG-32908
+
+Change-Id: I47d7984fa7986d5218d1f3ff1fc36d2ec67c9ba7
+Reviewed-by: David Faure <david.faure@kdab.com>
+---
+ src/gui/kernel/qkeymapper_x11.cpp | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/src/gui/kernel/qkeymapper_x11.cpp b/src/gui/kernel/qkeymapper_x11.cpp
+index 005ff3f..7daa41d 100644
+--- a/src/gui/kernel/qkeymapper_x11.cpp
++++ b/src/gui/kernel/qkeymapper_x11.cpp
+@@ -282,12 +282,9 @@ QList<int> QKeyMapperPrivate::possibleKeysXKB(QKeyEvent *event)
+
+ // first, translate key only using lock modifiers (there are no Qt equivalents for these, so we must
+ // always use them when determining the baseKeySym)
+- // Note: the Xkb group to be used for the conversion keycode->keysym has to be given to
+- // XkbLookupKeySym(). This information is contained in the bits 8 to 15 of xmodifiers.
+- // See https://bugreports.qt-project.org/browse/QTBUG-15319 .
+ KeySym baseKeySym;
+ uint consumedModifiers;
+- if (!XkbLookupKeySym(X11->display, xkeycode, (xmodifiers & (0xff00 | LockMask | qt_num_lock_mask)),
++ if (!XkbLookupKeySym(X11->display, xkeycode, (xmodifiers & (LockMask | qt_num_lock_mask)),
+ &consumedModifiers, &baseKeySym))
+ return QList<int>();
+
+--
+1.8.3.2
+
diff --git a/dev-qt/qtgui/files/qtgui-4.8.5-libjpeg-9.patch b/dev-qt/qtgui/files/qtgui-4.8.5-libjpeg-9.patch
new file mode 100644
index 000000000000..47d35e232499
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-4.8.5-libjpeg-9.patch
@@ -0,0 +1,84 @@
+From 2a9ea11f4dea51f9e75036aab8e7a23f0eb4bd1f Mon Sep 17 00:00:00 2001
+From: aavit <eirik.aavitsland@digia.com>
+Date: Tue, 10 Sep 2013 11:46:51 +0200
+Subject: Compilation fix for libjpeg release 9
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+In the latest libjpeg version, the "boolean" type is changed so that
+true and false no longer can be used instead of TRUE and FALSE.
+
+Also, purge some ancient code remains meant to support a now defunct
+OS´s idea about the boolean type.
+
+Task-number: QTBUG-33166
+Change-Id: Iebbdf300cfdc22775954de65f985358424ed2b49
+Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
+(cherry picked from qtbase/fad6aa619bf6eb048821a58065433f6b598c10e4)
+---
+ src/gui/image/qjpeghandler.cpp | 27 +++++----------------------
+ 1 file changed, 5 insertions(+), 22 deletions(-)
+
+diff --git a/src/gui/image/qjpeghandler.cpp b/src/gui/image/qjpeghandler.cpp
+index a8700b7..ba5c469 100644
+--- a/src/gui/image/qjpeghandler.cpp
++++ b/src/gui/image/qjpeghandler.cpp
+@@ -157,11 +157,7 @@ static boolean qt_fill_input_buffer(j_decompress_ptr cinfo)
+ } else {
+ src->bytes_in_buffer = num_read;
+ }
+-#if defined(Q_OS_UNIXWARE)
+- return B_TRUE;
+-#else
+- return true;
+-#endif
++ return TRUE;
+ }
+
+ static void qt_skip_input_data(j_decompress_ptr cinfo, long num_bytes)
+@@ -489,11 +485,7 @@ static boolean qt_empty_output_buffer(j_compress_ptr cinfo)
+ dest->next_output_byte = dest->buffer;
+ dest->free_in_buffer = max_buf;
+
+-#if defined(Q_OS_UNIXWARE)
+- return B_TRUE;
+-#else
+- return true;
+-#endif
++ return TRUE;
+ }
+
+ static void qt_term_destination(j_compress_ptr cinfo)
+@@ -584,13 +576,8 @@ static bool write_jpeg_image(const QImage &image, QIODevice *device, int sourceQ
+
+
+ int quality = sourceQuality >= 0 ? qMin(sourceQuality,100) : 75;
+-#if defined(Q_OS_UNIXWARE)
+- jpeg_set_quality(&cinfo, quality, B_TRUE /* limit to baseline-JPEG values */);
+- jpeg_start_compress(&cinfo, B_TRUE);
+-#else
+- jpeg_set_quality(&cinfo, quality, true /* limit to baseline-JPEG values */);
+- jpeg_start_compress(&cinfo, true);
+-#endif
++ jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */);
++ jpeg_start_compress(&cinfo, TRUE);
+
+ row_pointer[0] = new uchar[cinfo.image_width*cinfo.input_components];
+ int w = cinfo.image_width;
+@@ -751,11 +738,7 @@ bool QJpegHandlerPrivate::readJpegHeader(QIODevice *device)
+ err.error_exit = my_error_exit;
+
+ if (!setjmp(err.setjmp_buffer)) {
+- #if defined(Q_OS_UNIXWARE)
+- (void) jpeg_read_header(&info, B_TRUE);
+- #else
+- (void) jpeg_read_header(&info, true);
+- #endif
++ (void) jpeg_read_header(&info, TRUE);
+
+ int width = 0;
+ int height = 0;
+--
+2.0.0
+
diff --git a/dev-qt/qtgui/files/qtgui-4.8.5-qclipboard-delay.patch b/dev-qt/qtgui/files/qtgui-4.8.5-qclipboard-delay.patch
new file mode 100644
index 000000000000..d46f8c541872
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-4.8.5-qclipboard-delay.patch
@@ -0,0 +1,33 @@
+From a83ddc5212736f89a0b94667c495494fe6861d63 Mon Sep 17 00:00:00 2001
+From: Michael Palimaka <kensington@gentoo.org>
+Date: Mon, 16 Jun 2014 23:52:24 +1000
+Subject: Fix delay with QClipboard and useEventLoop.
+
+This manifests when using LibreOffice with KDE integration. When KFileDialog is
+open, the clipboard is repeatedly polled causing a visible delay since using
+QClipboard in "useEventLoop" mode adds 50ms delay to every single clipboard
+fetch.
+
+Change-Id: Id30cda7b983ae7c949fa270d04f772fa44fc21cd
+Task-number: QTBUG-38585
+---
+ src/gui/kernel/qclipboard_x11.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/gui/kernel/qclipboard_x11.cpp b/src/gui/kernel/qclipboard_x11.cpp
+index 14bf088..5f442b9 100644
+--- a/src/gui/kernel/qclipboard_x11.cpp
++++ b/src/gui/kernel/qclipboard_x11.cpp
+@@ -548,7 +548,8 @@ bool QX11Data::clipboardWaitForEvent(Window win, int type, XEvent *event, int ti
+ return false;
+
+ XSync(X11->display, false);
+- usleep(50000);
++ if (!XPending(X11->display))
++ usleep(5000);
+
+ now.start();
+
+--
+2.0.0
+
diff --git a/dev-qt/qtgui/files/qtgui-4.8.6-CVE-2015-1858.patch b/dev-qt/qtgui/files/qtgui-4.8.6-CVE-2015-1858.patch
new file mode 100644
index 000000000000..c1aac444a644
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-4.8.6-CVE-2015-1858.patch
@@ -0,0 +1,63 @@
+From 3e55cd6dc467303a3c35312e9fcb255c2c048b32 Mon Sep 17 00:00:00 2001
+From: Eirik Aavitsland <eirik.aavitsland@theqtcompany.com>
+Date: Wed, 11 Mar 2015 13:34:01 +0100
+Subject: Fixes crash in bmp and ico image decoding
+
+Fuzzing test revealed that for certain malformed bmp and ico files,
+the handler would segfault.
+
+Change-Id: I19d45145f31e7f808f7f6a1a1610270ea4159cbe
+(cherry picked from qtbase/2adbbae5432aa9d8cc41c6fcf55c2e310d2d4078)
+Reviewed-by: Richard J. Moore <rich@kde.org>
+---
+ src/gui/image/qbmphandler.cpp | 13 +++++++------
+ src/plugins/imageformats/ico/qicohandler.cpp | 2 +-
+ 2 files changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp
+index 30fa9e0..17a880b 100644
+--- a/src/gui/image/qbmphandler.cpp
++++ b/src/gui/image/qbmphandler.cpp
+@@ -478,12 +478,6 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
+ p = data + (h-y-1)*bpl;
+ break;
+ case 2: // delta (jump)
+- // Protection
+- if ((uint)x >= (uint)w)
+- x = w-1;
+- if ((uint)y >= (uint)h)
+- y = h-1;
+-
+ {
+ quint8 tmp;
+ d->getChar((char *)&tmp);
+@@ -491,6 +485,13 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
+ d->getChar((char *)&tmp);
+ y += tmp;
+ }
++
++ // Protection
++ if ((uint)x >= (uint)w)
++ x = w-1;
++ if ((uint)y >= (uint)h)
++ y = h-1;
++
+ p = data + (h-y-1)*bpl + x;
+ break;
+ default: // absolute mode
+diff --git a/src/plugins/imageformats/ico/qicohandler.cpp b/src/plugins/imageformats/ico/qicohandler.cpp
+index 1a88605..3c34765 100644
+--- a/src/plugins/imageformats/ico/qicohandler.cpp
++++ b/src/plugins/imageformats/ico/qicohandler.cpp
+@@ -571,7 +571,7 @@ QImage ICOReader::iconAt(int index)
+ QImage::Format format = QImage::Format_ARGB32;
+ if (icoAttrib.nbits == 24)
+ format = QImage::Format_RGB32;
+- else if (icoAttrib.ncolors == 2)
++ else if (icoAttrib.ncolors == 2 && icoAttrib.depth == 1)
+ format = QImage::Format_Mono;
+ else if (icoAttrib.ncolors > 0)
+ format = QImage::Format_Indexed8;
+--
+cgit v0.11.0
+
diff --git a/dev-qt/qtgui/files/qtgui-4.8.6-CVE-2015-1860.patch b/dev-qt/qtgui/files/qtgui-4.8.6-CVE-2015-1860.patch
new file mode 100644
index 000000000000..d881db8d5b86
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-4.8.6-CVE-2015-1860.patch
@@ -0,0 +1,31 @@
+From a1cf194c54be57d6ab55dfd26b9562a60532208e Mon Sep 17 00:00:00 2001
+From: Eirik Aavitsland <eirik.aavitsland@theqtcompany.com>
+Date: Wed, 11 Mar 2015 09:00:41 +0100
+Subject: Fixes crash in gif image decoder
+
+Fuzzing test revealed that for certain malformed gif files,
+qgifhandler would segfault.
+
+Change-Id: I5bb6f60e1c61849e0d8c735edc3869945e5331c1
+(cherry picked from qtbase/ea2c5417fcd374302f5019e67f72af5facbd29f6)
+Reviewed-by: Richard J. Moore <rich@kde.org>
+---
+ src/gui/image/qgifhandler.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/gui/image/qgifhandler.cpp b/src/gui/image/qgifhandler.cpp
+index 5199dd3..49aa2a6 100644
+--- a/src/gui/image/qgifhandler.cpp
++++ b/src/gui/image/qgifhandler.cpp
+@@ -944,6 +944,8 @@ void QGIFFormat::fillRect(QImage *image, int col, int row, int w, int h, QRgb co
+
+ void QGIFFormat::nextY(unsigned char *bits, int bpl)
+ {
++ if (out_of_bounds)
++ return;
+ int my;
+ switch (interlace) {
+ case 0: // Non-interlaced
+--
+cgit v0.11.0
+
diff --git a/dev-qt/qtgui/metadata.xml b/dev-qt/qtgui/metadata.xml
new file mode 100644
index 000000000000..b85699b26290
--- /dev/null
+++ b/dev-qt/qtgui/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="egl">Use EGL instead of default GLX to manage OpenGL contexts</flag>
+ <flag name="eglfs">Compile EGL Full Screen/Single Surface support</flag>
+ <flag name="evdev">Enable evdev input support</flag>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ <flag name="gles2">Use GLES 2.0 or later instead of full OpenGL</flag>
+ <flag name="glib">Enable <pkg>dev-libs/glib</pkg> eventloop support</flag>
+ <flag name="gtkstyle">Build a Qt style called GTK+ that mimics the active
+ GTK+ theme</flag>
+ <flag name="harfbuzz">Use <pkg>media-libs/harfbuzz</pkg> for text shaping</flag>
+ <flag name="ibus">Build the IBus input method plugin</flag>
+ <flag name="qt3support">Enable the Qt3Support libraries for Qt4. Note that
+ this does not mean you can compile pure Qt3 programs with Qt4.</flag>
+ <flag name="trace">
+ Build the 'trace' graphicssystem engine which allows to record
+ all drawing operations into a trace buffer. The trace can be replayed
+ later with the qttracereplay tool.</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtgui/qtgui-4.8.5-r4.ebuild b/dev-qt/qtgui/qtgui-4.8.5-r4.ebuild
new file mode 100644
index 000000000000..b5cda8de1576
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-4.8.5-r4.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils qt4-build
+
+DESCRIPTION="The GUI module for the Qt toolkit"
+SRC_URI+=" http://dev.gentoo.org/~pesa/patches/${PN}-systemtrayicon-plugin-system.patch"
+
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm hppa ia64 ppc ppc64 sparc"
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="+accessibility cups egl +glib gtkstyle mng nas nis qt3support tiff trace xinerama +xv"
+
+REQUIRED_USE="
+ gtkstyle? ( glib )
+"
+
+# cairo[-qt4] is needed because of bug 454066
+RDEPEND="
+ app-eselect/eselect-qtgraphicssystem
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,glib=,qt3support=]
+ ~dev-qt/qtscript-${PV}[aqua=,debug=]
+ media-libs/fontconfig
+ media-libs/freetype:2
+ media-libs/libpng:0=
+ sys-libs/zlib
+ virtual/jpeg:0
+ !aqua? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ xinerama? ( x11-libs/libXinerama )
+ xv? ( x11-libs/libXv )
+ )
+ cups? ( net-print/cups )
+ egl? ( media-libs/mesa[egl] )
+ glib? ( dev-libs/glib:2 )
+ gtkstyle? (
+ x11-libs/cairo[-qt4(-)]
+ x11-libs/gtk+:2[aqua=]
+ )
+ mng? ( >=media-libs/libmng-1.0.9:= )
+ nas? ( >=media-libs/nas-1.5 )
+ tiff? ( media-libs/tiff:0 )
+ !<dev-qt/qthelp-4.8.5:4
+"
+DEPEND="${RDEPEND}
+ !aqua? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ xinerama? ( x11-proto/xineramaproto )
+ xv? ( x11-proto/videoproto )
+ )
+"
+PDEPEND="qt3support? ( ~dev-qt/qt3support-${PV}[aqua=,debug=] )"
+
+PATCHES=(
+ "${DISTDIR}/${PN}-systemtrayicon-plugin-system.patch" # bug 503880
+ "${FILESDIR}/${PN}-4.7.3-cups.patch" # bug 323257
+ "${FILESDIR}/${PN}-4.8.5-cleanlooks-floating-point-exception.patch" # bug 507124
+ "${FILESDIR}/${PN}-4.8.5-disable-gtk-theme-check.patch" # bug 491226
+ "${FILESDIR}/${PN}-4.8.5-dont-crash-on-broken-GIF-images.patch" # bug 508984
+ "${FILESDIR}/${PN}-4.8.5-keyboard-shortcuts.patch" # bug 477796
+ "${FILESDIR}/${PN}-4.8.5-libjpeg-9.patch" # bug 480182
+ "${FILESDIR}/${PN}-4.8.5-qclipboard-delay.patch" # bug 514968
+ "${FILESDIR}/${PN}-4.8.5-CVE-2015-0295.patch" # bug 541972
+)
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/gui
+ src/scripttools
+ src/plugins/imageformats/gif
+ src/plugins/imageformats/ico
+ src/plugins/imageformats/jpeg
+ src/plugins/imageformats/tga
+ src/plugins/inputmethods"
+
+ QT4_EXTRACT_DIRECTORIES="
+ examples/desktop/systray
+ include
+ src"
+
+ use accessibility && QT4_TARGET_DIRECTORIES+=" src/plugins/accessible/widgets"
+ use mng && QT4_TARGET_DIRECTORIES+=" src/plugins/imageformats/mng"
+ use tiff && QT4_TARGET_DIRECTORIES+=" src/plugins/imageformats/tiff"
+ use trace && QT4_TARGET_DIRECTORIES+=" src/plugins/graphicssystems/trace tools/qttracereplay"
+
+ # mac version does not contain qtconfig?
+ [[ ${CHOST} != *-darwin* ]] && QT4_TARGET_DIRECTORIES+=" tools/qtconfig"
+
+ QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES} ${QT4_EXTRACT_DIRECTORIES}"
+
+ qt4-build_pkg_setup
+}
+
+src_prepare() {
+ qt4-build_src_prepare
+
+ # Add -xvideo to the list of accepted configure options
+ sed -i -e 's:|-xinerama|:&-xvideo|:' configure || die
+}
+
+src_configure() {
+ myconf="$(qt_use accessibility)
+ $(qt_use cups)
+ $(qt_use glib)
+ $(qt_use mng libmng system)
+ $(qt_use nas nas-sound system)
+ $(qt_use nis)
+ $(qt_use tiff libtiff system)
+ $(qt_use egl)
+ $(qt_use qt3support)
+ $(qt_use gtkstyle)
+ $(qt_use xinerama)
+ $(qt_use xv xvideo)"
+
+ myconf+="
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-svg -no-webkit -no-phonon -no-opengl"
+
+ # bug 367045
+ [[ ${CHOST} == *86*-apple-darwin* ]] && myconf+=" -no-ssse3"
+
+ qt4-build_src_configure
+
+ if use gtkstyle; then
+ sed -i -e 's:-I/usr/include/qt4 ::' src/gui/Makefile || die "sed failed"
+ fi
+
+ sed -i -e 's:-I/usr/include/qt4/QtGui ::' src/gui/Makefile || die "sed failed"
+}
+
+src_install() {
+ QCONFIG_ADD="
+ mitshm tablet x11sm xcursor xfixes xinput xkb xrandr xrender xshape xsync
+ fontconfig system-freetype gif png system-png jpeg system-jpeg
+ $(usev accessibility)
+ $(usev cups)
+ $(use mng && echo system-mng)
+ $(usev nas)
+ $(usev nis)
+ $(use tiff && echo system-tiff)
+ $(usev xinerama)
+ $(use xv && echo xvideo)"
+ QCONFIG_REMOVE="no-freetype no-gif no-jpeg no-png no-gui"
+ QCONFIG_DEFINE="$(use accessibility && echo QT_ACCESSIBILITY)
+ $(use cups && echo QT_CUPS)
+ $(use egl && echo QT_EGL)
+ QT_FONTCONFIG QT_FREETYPE
+ $(use gtkstyle && echo QT_STYLE_GTK)
+ QT_IMAGEFORMAT_JPEG QT_IMAGEFORMAT_PNG
+ $(use mng && echo QT_IMAGEFORMAT_MNG)
+ $(use nas && echo QT_NAS)
+ $(use nis && echo QT_NIS)
+ $(use tiff && echo QT_IMAGEFORMAT_TIFF)
+ QT_SESSIONMANAGER QT_SHAPE QT_TABLET QT_XCURSOR QT_XFIXES
+ $(use xinerama && echo QT_XINERAMA)
+ QT_XINPUT QT_XKB QT_XRANDR QT_XRENDER QT_XSYNC
+ $(use xv && echo QT_XVIDEO)"
+
+ qt4-build_src_install
+
+ # install private headers
+ if use aqua && [[ ${CHOST##*-darwin} -ge 9 ]]; then
+ insinto "${QTLIBDIR#${EPREFIX}}"/QtGui.framework/Headers/private/
+ else
+ insinto "${QTHEADERDIR#${EPREFIX}}"/QtGui/private
+ fi
+ find "${S}"/src/gui -type f -name '*_p.h' -exec doins {} +
+
+ if use aqua && [[ ${CHOST##*-darwin} -ge 9 ]]; then
+ # rerun to get links to headers right
+ fix_includes
+ fi
+
+ # touch the available graphics systems
+ dodir /usr/share/qt4/graphicssystems
+ echo "default" > "${ED}"/usr/share/qt4/graphicssystems/raster || die
+ echo "" > "${ED}"/usr/share/qt4/graphicssystems/native || die
+
+ newicon tools/qtconfig/images/appicon.png qtconfig.png
+ make_desktop_entry qtconfig 'Qt Configuration Tool' qtconfig 'Qt;Settings;DesktopSettings'
+
+ # bug 388551
+ if use gtkstyle; then
+ local tempfile=${T}/${PN}${SLOT}.sh
+ cat <<-EOF > "${tempfile}"
+ export GTK2_RC_FILES=\${HOME}/.gtkrc-2.0
+ EOF
+ insinto /etc/profile.d
+ doins "${tempfile}"
+ fi
+}
+
+pkg_postinst() {
+ qt4-build_pkg_postinst
+
+ # raster is the default graphicssystem, set it on first install
+ eselect qtgraphicssystem set raster --use-old
+}
diff --git a/dev-qt/qtgui/qtgui-4.8.6-r4.ebuild b/dev-qt/qtgui/qtgui-4.8.6-r4.ebuild
new file mode 100644
index 000000000000..c6da334cbe59
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-4.8.6-r4.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils qt4-build-multilib
+
+DESCRIPTION="The GUI module for the Qt toolkit"
+SRC_URI+=" http://dev.gentoo.org/~pesa/patches/${PN}-systemtrayicon-plugin-system.patch"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm hppa ia64 ppc ppc64"
+else
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="+accessibility cups egl +glib gtkstyle mng nas nis qt3support tiff trace xinerama +xv"
+
+REQUIRED_USE="
+ gtkstyle? ( glib )
+"
+
+# cairo[-qt4] is needed because of bug 454066
+RDEPEND="
+ app-eselect/eselect-qtgraphicssystem
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,glib=,qt3support=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtscript-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ >=media-libs/fontconfig-2.10.2-r1[${MULTILIB_USEDEP}]
+ >=media-libs/freetype-2.4.11-r1:2[${MULTILIB_USEDEP}]
+ media-libs/libpng:0=[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ virtual/jpeg:0[${MULTILIB_USEDEP}]
+ !aqua? (
+ >=x11-libs/libICE-1.0.8-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libSM-1.2.1-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.5.0-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXcursor-1.1.13-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.1-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXfixes-5.0-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXi-1.6.2-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrandr-1.4.0-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrender-0.9.7-r1[${MULTILIB_USEDEP}]
+ xinerama? ( >=x11-libs/libXinerama-1.1.2-r1[${MULTILIB_USEDEP}] )
+ xv? ( >=x11-libs/libXv-1.0.7-r1[${MULTILIB_USEDEP}] )
+ )
+ cups? ( net-print/cups[${MULTILIB_USEDEP}] )
+ egl? ( media-libs/mesa[egl,${MULTILIB_USEDEP}] )
+ glib? ( dev-libs/glib:2[${MULTILIB_USEDEP}] )
+ gtkstyle? (
+ >=x11-libs/cairo-1.12[-qt4(-),${MULTILIB_USEDEP}]
+ >=x11-libs/gtk+-2.24.23-r1:2[aqua=,${MULTILIB_USEDEP}]
+ )
+ mng? ( >=media-libs/libmng-1.0.10-r2:=[${MULTILIB_USEDEP}] )
+ nas? ( >=media-libs/nas-1.9.3-r1[${MULTILIB_USEDEP}] )
+ tiff? ( >=media-libs/tiff-4.0.3-r2:0[${MULTILIB_USEDEP}] )
+ !<dev-qt/qthelp-4.8.5:4
+"
+DEPEND="${RDEPEND}
+ !aqua? (
+ >=x11-proto/inputproto-2.2-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
+ xinerama? ( >=x11-proto/xineramaproto-1.2.1-r1[${MULTILIB_USEDEP}] )
+ xv? ( >=x11-proto/videoproto-2.3.1-r1[${MULTILIB_USEDEP}] )
+ )
+"
+PDEPEND="
+ qt3support? ( ~dev-qt/qt3support-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+"
+
+PATCHES=(
+ "${DISTDIR}/${PN}-systemtrayicon-plugin-system.patch" # bug 503880
+ "${FILESDIR}/${PN}-4.7.3-cups.patch" # bug 323257
+ "${FILESDIR}/${PN}-4.8.5-cleanlooks-floating-point-exception.patch" # bug 507124
+ "${FILESDIR}/${PN}-4.8.5-disable-gtk-theme-check.patch" # bug 491226
+ "${FILESDIR}/${PN}-4.8.5-dont-crash-on-broken-GIF-images.patch" # bug 508984
+ "${FILESDIR}/${PN}-4.8.5-qclipboard-delay.patch" # bug 514968
+ "${FILESDIR}/${PN}-4.8.5-CVE-2015-0295.patch" # bug 541972
+ "${FILESDIR}/${PN}-4.8.6-CVE-2015-1858.patch" # bug 546174 - also covers CVE-2015-1859
+ "${FILESDIR}/${PN}-4.8.6-CVE-2015-1860.patch" # bug 546174
+)
+
+QT4_TARGET_DIRECTORIES="
+ src/gui
+ src/scripttools
+ src/plugins/imageformats/gif
+ src/plugins/imageformats/ico
+ src/plugins/imageformats/jpeg
+ src/plugins/imageformats/tga
+ src/plugins/inputmethods"
+
+pkg_setup() {
+ use accessibility && QT4_TARGET_DIRECTORIES+=" src/plugins/accessible/widgets"
+ use mng && QT4_TARGET_DIRECTORIES+=" src/plugins/imageformats/mng"
+ use tiff && QT4_TARGET_DIRECTORIES+=" src/plugins/imageformats/tiff"
+ use trace && QT4_TARGET_DIRECTORIES+=" src/plugins/graphicssystems/trace tools/qttracereplay"
+
+ [[ ${CHOST} != *-darwin* ]] && QT4_TARGET_DIRECTORIES+=" tools/qtconfig"
+
+ QCONFIG_ADD="
+ mitshm tablet x11sm xcursor xfixes xinput xkb xrandr xrender xshape xsync
+ fontconfig system-freetype gif png system-png jpeg system-jpeg
+ $(usev accessibility)
+ $(usev cups)
+ $(use mng && echo system-mng)
+ $(usev nas)
+ $(usev nis)
+ $(use tiff && echo system-tiff)
+ $(usev xinerama)
+ $(use xv && echo xvideo)"
+ QCONFIG_REMOVE="no-freetype no-gif no-jpeg no-png no-gui"
+ QCONFIG_DEFINE="$(use accessibility && echo QT_ACCESSIBILITY)
+ $(use cups && echo QT_CUPS)
+ $(use egl && echo QT_EGL)
+ QT_FONTCONFIG QT_FREETYPE
+ $(use gtkstyle && echo QT_STYLE_GTK)
+ QT_IMAGEFORMAT_JPEG QT_IMAGEFORMAT_PNG
+ $(use mng && echo QT_IMAGEFORMAT_MNG)
+ $(use nas && echo QT_NAS)
+ $(use nis && echo QT_NIS)
+ $(use tiff && echo QT_IMAGEFORMAT_TIFF)
+ QT_SESSIONMANAGER QT_SHAPE QT_TABLET QT_XCURSOR QT_XFIXES
+ $(use xinerama && echo QT_XINERAMA)
+ QT_XINPUT QT_XKB QT_XRANDR QT_XRENDER QT_XSYNC
+ $(use xv && echo QT_XVIDEO)"
+}
+
+src_prepare() {
+ qt4-build-multilib_src_prepare
+
+ # Add -xvideo to the list of accepted configure options
+ sed -i -e 's:|-xinerama|:&-xvideo|:' configure || die
+}
+
+multilib_src_configure() {
+ local myconf=(
+ $(qt_use accessibility)
+ $(qt_use cups)
+ $(qt_use glib)
+ $(qt_use mng libmng system)
+ $(qt_use nas nas-sound system)
+ $(qt_use nis)
+ $(qt_use tiff libtiff system)
+ $(qt_use egl)
+ $(qt_use qt3support)
+ $(qt_use gtkstyle)
+ $(qt_use xinerama)
+ $(qt_use xv xvideo)
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-svg -no-webkit -no-phonon -no-opengl
+ )
+ qt4_multilib_src_configure
+}
+
+multilib_src_install_all() {
+ qt4_multilib_src_install_all
+
+ dodir /usr/share/qt4/graphicssystems
+ echo "default" > "${ED}"/usr/share/qt4/graphicssystems/raster || die
+ echo "" > "${ED}"/usr/share/qt4/graphicssystems/native || die
+
+ if has tools/qtconfig ${QT4_TARGET_DIRECTORIES}; then
+ newicon tools/qtconfig/images/appicon.png qtconfig.png
+ make_desktop_entry qtconfig 'Qt Configuration Tool' qtconfig 'Qt;Settings;DesktopSettings'
+ fi
+}
+
+pkg_postinst() {
+ qt4-build-multilib_pkg_postinst
+
+ # raster is the default graphicssystem, set it on first install
+ eselect qtgraphicssystem set raster --use-old
+}
diff --git a/dev-qt/qtgui/qtgui-4.8.7.ebuild b/dev-qt/qtgui/qtgui-4.8.7.ebuild
new file mode 100644
index 000000000000..14169250e851
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-4.8.7.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils qt4-build-multilib
+
+DESCRIPTION="The GUI module for the Qt toolkit"
+SRC_URI+=" http://dev.gentoo.org/~pesa/patches/${PN}-systemtrayicon-plugin-system.patch"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="+accessibility cups egl +glib gtkstyle mng nas nis qt3support tiff trace xinerama +xv"
+
+REQUIRED_USE="
+ gtkstyle? ( glib )
+"
+
+# cairo[-qt4] is needed because of bug 454066
+RDEPEND="
+ app-eselect/eselect-qtgraphicssystem
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,glib=,qt3support=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtscript-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ >=media-libs/fontconfig-2.10.2-r1[${MULTILIB_USEDEP}]
+ >=media-libs/freetype-2.4.11-r1:2[${MULTILIB_USEDEP}]
+ media-libs/libpng:0=[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ virtual/jpeg:0[${MULTILIB_USEDEP}]
+ !aqua? (
+ >=x11-libs/libICE-1.0.8-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libSM-1.2.1-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.5.0-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXcursor-1.1.13-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.1-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXfixes-5.0-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXi-1.6.2-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrandr-1.4.0-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrender-0.9.7-r1[${MULTILIB_USEDEP}]
+ xinerama? ( >=x11-libs/libXinerama-1.1.2-r1[${MULTILIB_USEDEP}] )
+ xv? ( >=x11-libs/libXv-1.0.7-r1[${MULTILIB_USEDEP}] )
+ )
+ cups? ( net-print/cups[${MULTILIB_USEDEP}] )
+ egl? ( media-libs/mesa[egl,${MULTILIB_USEDEP}] )
+ glib? ( dev-libs/glib:2[${MULTILIB_USEDEP}] )
+ gtkstyle? (
+ >=x11-libs/cairo-1.12[-qt4(-),${MULTILIB_USEDEP}]
+ >=x11-libs/gtk+-2.24.23-r1:2[aqua=,${MULTILIB_USEDEP}]
+ )
+ mng? ( >=media-libs/libmng-1.0.10-r2:=[${MULTILIB_USEDEP}] )
+ nas? ( >=media-libs/nas-1.9.3-r1[${MULTILIB_USEDEP}] )
+ tiff? ( >=media-libs/tiff-4.0.3-r2:0[${MULTILIB_USEDEP}] )
+ !<dev-qt/qthelp-4.8.5:4
+"
+DEPEND="${RDEPEND}
+ !aqua? (
+ >=x11-proto/inputproto-2.2-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
+ xinerama? ( >=x11-proto/xineramaproto-1.2.1-r1[${MULTILIB_USEDEP}] )
+ xv? ( >=x11-proto/videoproto-2.3.1-r1[${MULTILIB_USEDEP}] )
+ )
+"
+PDEPEND="
+ qt3support? ( ~dev-qt/qt3support-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+"
+
+PATCHES=(
+ "${DISTDIR}/${PN}-systemtrayicon-plugin-system.patch" # bug 503880
+ "${FILESDIR}/${PN}-4.7.3-cups.patch" # bug 323257
+ "${FILESDIR}/${PN}-4.8.5-disable-gtk-theme-check.patch" # bug 491226
+ "${FILESDIR}/${PN}-4.8.5-qclipboard-delay.patch" # bug 514968
+)
+
+QT4_TARGET_DIRECTORIES="
+ src/gui
+ src/scripttools
+ src/plugins/imageformats/gif
+ src/plugins/imageformats/ico
+ src/plugins/imageformats/jpeg
+ src/plugins/imageformats/tga
+ src/plugins/inputmethods"
+
+pkg_setup() {
+ use accessibility && QT4_TARGET_DIRECTORIES+=" src/plugins/accessible/widgets"
+ use mng && QT4_TARGET_DIRECTORIES+=" src/plugins/imageformats/mng"
+ use tiff && QT4_TARGET_DIRECTORIES+=" src/plugins/imageformats/tiff"
+ use trace && QT4_TARGET_DIRECTORIES+=" src/plugins/graphicssystems/trace tools/qttracereplay"
+
+ [[ ${CHOST} != *-darwin* ]] && QT4_TARGET_DIRECTORIES+=" tools/qtconfig"
+
+ QCONFIG_ADD="
+ mitshm tablet x11sm xcursor xfixes xinput xkb xrandr xrender xshape xsync
+ fontconfig system-freetype gif png system-png jpeg system-jpeg
+ $(usev accessibility)
+ $(usev cups)
+ $(use mng && echo system-mng)
+ $(usev nas)
+ $(usev nis)
+ $(use tiff && echo system-tiff)
+ $(usev xinerama)
+ $(use xv && echo xvideo)"
+ QCONFIG_REMOVE="no-freetype no-gif no-jpeg no-png no-gui"
+ QCONFIG_DEFINE="$(use accessibility && echo QT_ACCESSIBILITY)
+ $(use cups && echo QT_CUPS)
+ $(use egl && echo QT_EGL)
+ QT_FONTCONFIG QT_FREETYPE
+ $(use gtkstyle && echo QT_STYLE_GTK)
+ QT_IMAGEFORMAT_JPEG QT_IMAGEFORMAT_PNG
+ $(use mng && echo QT_IMAGEFORMAT_MNG)
+ $(use nas && echo QT_NAS)
+ $(use nis && echo QT_NIS)
+ $(use tiff && echo QT_IMAGEFORMAT_TIFF)
+ QT_SESSIONMANAGER QT_SHAPE QT_TABLET QT_XCURSOR QT_XFIXES
+ $(use xinerama && echo QT_XINERAMA)
+ QT_XINPUT QT_XKB QT_XRANDR QT_XRENDER QT_XSYNC
+ $(use xv && echo QT_XVIDEO)"
+}
+
+src_prepare() {
+ qt4-build-multilib_src_prepare
+
+ # Add -xvideo to the list of accepted configure options
+ sed -i -e 's:|-xinerama|:&-xvideo|:' configure || die
+}
+
+multilib_src_configure() {
+ local myconf=(
+ $(qt_use accessibility)
+ $(qt_use cups)
+ $(qt_use glib)
+ $(qt_use mng libmng system)
+ $(qt_use nas nas-sound system)
+ $(qt_use nis)
+ $(qt_use tiff libtiff system)
+ $(qt_use egl)
+ $(qt_use qt3support)
+ $(qt_use gtkstyle)
+ $(qt_use xinerama)
+ $(qt_use xv xvideo)
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -fontconfig -no-svg -no-webkit -no-phonon -no-opengl
+ )
+ qt4_multilib_src_configure
+}
+
+multilib_src_install_all() {
+ qt4_multilib_src_install_all
+
+ dodir /usr/share/qt4/graphicssystems
+ echo "default" > "${ED}"/usr/share/qt4/graphicssystems/raster || die
+ echo "" > "${ED}"/usr/share/qt4/graphicssystems/native || die
+
+ if has tools/qtconfig ${QT4_TARGET_DIRECTORIES}; then
+ newicon tools/qtconfig/images/appicon.png qtconfig.png
+ make_desktop_entry qtconfig 'Qt Configuration Tool' qtconfig 'Qt;Settings;DesktopSettings'
+ fi
+}
+
+pkg_postinst() {
+ qt4-build-multilib_pkg_postinst
+
+ # raster is the default graphicssystem, set it on first install
+ eselect qtgraphicssystem set raster --use-old
+}
diff --git a/dev-qt/qtgui/qtgui-5.4.2-r1.ebuild b/dev-qt/qtgui/qtgui-5.4.2-r1.ebuild
new file mode 100644
index 000000000000..317b16bdeb9b
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.4.2-r1.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+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 ~ppc64 ~x86"
+fi
+
+# TODO: directfb, linuxfb, kms integration in eglfs
+
+IUSE="accessibility dbus egl eglfs evdev +gif gles2 gtkstyle
+ +harfbuzz ibus jpeg +png +udev +xcb"
+REQUIRED_USE="
+ || ( eglfs xcb )
+ accessibility? ( dbus xcb )
+ egl? ( evdev )
+ eglfs? ( egl )
+ ibus? ( dbus )
+"
+
+RDEPEND="
+ dev-libs/glib:2
+ ~dev-qt/qtcore-${PV}
+ media-libs/fontconfig
+ media-libs/freetype:2
+ >=sys-libs/zlib-1.2.5
+ virtual/opengl
+ dbus? ( ~dev-qt/qtdbus-${PV} )
+ egl? ( media-libs/mesa[egl] )
+ evdev? ( sys-libs/mtdev )
+ gtkstyle? (
+ x11-libs/gtk+:2
+ x11-libs/pango
+ !!x11-libs/cairo[qt4]
+ )
+ gles2? ( media-libs/mesa[gles2] )
+ harfbuzz? ( >=media-libs/harfbuzz-0.9.32:= )
+ jpeg? ( virtual/jpeg:0 )
+ png? ( media-libs/libpng:0= )
+ udev? ( virtual/libudev:= )
+ xcb? (
+ x11-libs/libICE
+ x11-libs/libSM
+ >=x11-libs/libX11-1.5
+ >=x11-libs/libXi-1.6
+ x11-libs/libXrender
+ >=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
+ src/plugins/platformthemes
+)
+
+QT5_GENTOO_CONFIG=(
+ accessibility:accessibility-atspi-bridge
+ egl
+ eglfs
+ evdev
+ evdev:mtdev:
+ :fontconfig
+ :system-freetype:FREETYPE
+ !:no-freetype:
+ !gif:no-gif:
+ gles2::OPENGL_ES
+ gles2:opengles2:OPENGL_ES_2
+ gtkstyle:gtkstyle:
+ gtkstyle:gtk2:STYLE_GTK
+ !:no-gui:
+ harfbuzz:system-harfbuzz:HARFBUZZ
+ !harfbuzz:no-harfbuzz:
+ jpeg:system-jpeg:IMAGEFORMAT_JPEG
+ !jpeg:no-jpeg:
+ :opengl
+ png:png:
+ png:system-png:IMAGEFORMAT_PNG
+ !png:no-png:
+ udev:libudev:
+ xcb:xcb:
+ xcb:xcb-glx:
+ xcb:xcb-plugin:
+ xcb:xcb-render:
+ xcb:xcb-sm:
+ xcb:xcb-xlib:
+ xcb:xinput2:
+ xcb::XKB
+)
+
+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)
+
+ # avoid automagic dep on qtdbus
+ use dbus || sed -i -e 's/contains(QT_CONFIG, dbus)/false/' \
+ src/platformsupport/platformsupport.pro || die
+
+ qt_use_disable_mod ibus dbus \
+ src/plugins/platforminputcontexts/platforminputcontexts.pro
+
+ qt5-build_src_prepare
+}
+
+src_configure() {
+ local myconf=(
+ $(usex dbus -dbus-linked '')
+ $(qt_use egl)
+ $(qt_use eglfs)
+ $(qt_use evdev)
+ $(qt_use evdev mtdev)
+ -fontconfig
+ -system-freetype
+ $(usex gif '' -no-gif)
+ $(qt_use gtkstyle)
+ $(qt_use harfbuzz harfbuzz system)
+ $(qt_use jpeg libjpeg system)
+ -opengl $(usex gles2 es2 desktop)
+ $(qt_use png libpng system)
+ $(qt_use udev libudev)
+ $(qt_use xcb xcb system)
+ $(qt_use xcb xkbcommon system)
+ $(use xcb && echo -xcb-xlib -xinput2 -xkb -xrender)
+ )
+ qt5-build_src_configure
+}
diff --git a/dev-qt/qthelp/Manifest b/dev-qt/qthelp/Manifest
new file mode 100644
index 000000000000..7fd640873742
--- /dev/null
+++ b/dev-qt/qthelp/Manifest
@@ -0,0 +1,6 @@
+DIST qt-assistant-compat-headers-4.7.tar.gz 448 SHA256 73ae604834cc89d6c67bafc65bb5d3cadaec23076d02711fc0c30a85df3d8580 SHA512 da14cb9904591f4389862cf1e1c96f923e72b7b904d57787d68feae2c90d52bf713e930442aa3abd4b457c3cc66c88b94e23df5fc25e33e01f1ed4d3093460bb WHIRLPOOL 26c42c101aab36a8d0355f1243226f6b8bd5a477c5aafece7e036f18a9fcfe98ae016042befe494fca0c42b825e29539825466c1ddb720102fa6c65e9cbaec61
+DIST qt-assistant-qassistantclient-library-compat-src-4.6.3.tar.gz 329896 SHA256 e698be8fc0d32c5f0b5b46cafcb8f615accaed524b864e58b99b64b7b5549c2d SHA512 a4050d93e448d29004d71d5ea670e60242f1272399f65db084dd928150f26404d37544d011d75bbb1c62f227752f92b86a4f4382dc54f0681a3df6da738af106 WHIRLPOOL 9c2822ae2f1ee7c4f63236cc95eb0cb025f088e1f13e0a154fabdad5af6209b0e4cdda86d23061bf35fe5919a1909ed162bbc4835da79fdf1b187461aa948a1b
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qttools-opensource-src-5.4.2.tar.xz 9333100 SHA256 edf3d7e00227f9989101da84b2fdf8eaf1a5b7863dc5e0d26bb0f39303e8b6b4 SHA512 55aa04eae16b71e78d4432e7d59b2052392d13652a3e9beff15a6503f2e88e77a9b48279121d8eee943a898799155c05b167d986bf01fae84b5db0a9a1759148 WHIRLPOOL 9123ff33a35c03adaa6d3374e86b539e9481ec78467bd72ad6f2d832e76e7aafd9b2f2da0420111e1aa8a66c4950b0478d8a6ae4c0f0e05a20c8334196b077e8
diff --git a/dev-qt/qthelp/files/qthelp-4.8.5-fix-compat.patch b/dev-qt/qthelp/files/qthelp-4.8.5-fix-compat.patch
new file mode 100644
index 000000000000..cc7621969991
--- /dev/null
+++ b/dev-qt/qthelp/files/qthelp-4.8.5-fix-compat.patch
@@ -0,0 +1,21 @@
+--- tools/assistant/compat/compat.pro 2010-10-08 16:54:09.804000000 +0300
++++ tools/assistant/compat/compat.pro 2010-10-08 16:54:37.884000000 +0300
+@@ -14,6 +14,8 @@
+
+ PROJECTNAME = Assistant
+
++DESTDIR = ../../../bin
++
+ FORMS += helpdialog.ui \
+ mainwindow.ui \
+ tabbedbrowser.ui \
+@@ -59,6 +61,9 @@
+ TARGET = Assistant_adp
+ }
+
++target.path=$$[QT_INSTALL_BINS]
++INSTALLS += target
++
+ TRANSLATIONS = translations/assistant_adp_de.ts \
+ translations/assistant_adp_ja.ts \
+ translations/assistant_adp_pl.ts \
diff --git a/dev-qt/qthelp/files/qthelp-4.8.6-compat-install.patch b/dev-qt/qthelp/files/qthelp-4.8.6-compat-install.patch
new file mode 100644
index 000000000000..e157381c8f05
--- /dev/null
+++ b/dev-qt/qthelp/files/qthelp-4.8.6-compat-install.patch
@@ -0,0 +1,35 @@
+From 89f99089abe0c1369a78a3bb8e2a576c513ec809 Mon Sep 17 00:00:00 2001
+From: Davide Pesavento <pesa@gentoo.org>
+Date: Wed, 6 May 2015 23:21:54 +0200
+Subject: [PATCH] Install assistant_adp binary.
+
+---
+ tools/assistant/compat/compat.pro | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/tools/assistant/compat/compat.pro b/tools/assistant/compat/compat.pro
+index 171106a..a14e3f8 100755
+--- a/tools/assistant/compat/compat.pro
++++ b/tools/assistant/compat/compat.pro
+@@ -14,6 +14,8 @@ QT += xml network
+
+ PROJECTNAME = Assistant
+
++DESTDIR = ../../../bin
++
+ FORMS += helpdialog.ui \
+ mainwindow.ui \
+ tabbedbrowser.ui \
+@@ -59,6 +61,9 @@ mac {
+ TARGET = Assistant_adp
+ }
+
++target.path = $$[QT_INSTALL_BINS]
++INSTALLS += target
++
+ TRANSLATIONS = translations/assistant_adp_de.ts \
+ translations/assistant_adp_ja.ts \
+ translations/assistant_adp_pl.ts \
+--
+2.4.0
+
diff --git a/dev-qt/qthelp/files/qthelp-4.8.6-compat-syncqt.patch b/dev-qt/qthelp/files/qthelp-4.8.6-compat-syncqt.patch
new file mode 100644
index 000000000000..4ba6b6ff7417
--- /dev/null
+++ b/dev-qt/qthelp/files/qthelp-4.8.6-compat-syncqt.patch
@@ -0,0 +1,25 @@
+From 37725ccec4d26148dde377d78c71046e8b6a6de9 Mon Sep 17 00:00:00 2001
+From: Davide Pesavento <pesa@gentoo.org>
+Date: Wed, 6 May 2015 22:44:57 +0200
+Subject: [PATCH] Teach syncqt how to handle the QtAssistant compat headers.
+
+See https://bugs.gentoo.org/show_bug.cgi?id=529398#c47
+---
+ bin/syncqt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/bin/syncqt b/bin/syncqt
+index dd94d4d..cc5a7bf 100755
+--- a/bin/syncqt
++++ b/bin/syncqt
+@@ -81,6 +81,7 @@ my %modules = ( # path to module name map
+ "ActiveQt" => "$basedir/src/activeqt",
+ "QtTest" => "$basedir/src/testlib",
+ "QtHelp" => "$basedir/tools/assistant/lib",
++ "QtAssistant" => "$basedir/tools/assistant/compat/lib",
+ "QtDesigner" => "$basedir/tools/designer/src/lib",
+ "QtUiTools" => "$basedir/tools/designer/src/uitools",
+ "QtDBus" => "$basedir/src/dbus",
+--
+2.4.0
+
diff --git a/dev-qt/qthelp/metadata.xml b/dev-qt/qthelp/metadata.xml
new file mode 100644
index 000000000000..3c78bba70f89
--- /dev/null
+++ b/dev-qt/qthelp/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="compat">Build the extra compatibility layer required by a few packages, see
+ http://blog.qt.digia.com/blog/2010/06/22/qt-assistant-compat-version-available-as-extra-source-package/</flag>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qthelp/qthelp-4.8.5-r2.ebuild b/dev-qt/qthelp/qthelp-4.8.5-r2.ebuild
new file mode 100644
index 000000000000..630ade335152
--- /dev/null
+++ b/dev-qt/qthelp/qthelp-4.8.5-r2.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils qt4-build
+
+DESCRIPTION="The Help module for the Qt toolkit"
+SRC_URI+="
+ compat? (
+ http://download.qt.io/archive/qt/4.6/qt-assistant-qassistantclient-library-compat-src-4.6.3.tar.gz
+ http://dev.gentoo.org/~pesa/distfiles/qt-assistant-compat-headers-4.7.tar.gz
+ )"
+
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+fi
+
+IUSE="compat doc"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=]
+ ~dev-qt/qtsql-${PV}[aqua=,debug=,sqlite]
+ compat? (
+ ~dev-qt/qtdbus-${PV}[aqua=,debug=]
+ sys-libs/zlib
+ )
+"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ tools/assistant/lib/fulltextsearch
+ tools/assistant/lib
+ tools/assistant/tools/qhelpgenerator
+ tools/assistant/tools/qcollectiongenerator
+ tools/assistant/tools/qhelpconverter
+ tools/qdoc3"
+ QT4_EXTRACT_DIRECTORIES="
+ demos
+ doc
+ examples
+ include
+ src
+ tools"
+
+ use compat && QT4_TARGET_DIRECTORIES+="
+ tools/assistant/compat
+ tools/assistant/compat/lib"
+
+ qt4-build_pkg_setup
+}
+
+src_unpack() {
+ qt4-build_src_unpack
+
+ # compat version
+ # http://blog.qt.digia.com/blog/2010/06/22/qt-assistant-compat-version-available-as-extra-source-package/
+ if use compat; then
+ unpack qt-assistant-qassistantclient-library-compat-src-4.6.3.tar.gz \
+ qt-assistant-compat-headers-4.7.tar.gz
+ mv "${WORKDIR}"/qt-assistant-qassistantclient-library-compat-version-4.6.3 \
+ "${S}"/tools/assistant/compat || die
+ mv "${WORKDIR}"/QtAssistant "${S}"/include/ || die
+ fi
+}
+
+src_prepare() {
+ qt4-build_src_prepare
+
+ use compat && epatch "${FILESDIR}"/${PN}-4.8.5-fix-compat.patch
+
+ # bug 348034
+ sed -i -e '/^sub-qdoc3\.depends/d' doc/doc.pri || die
+}
+
+src_configure() {
+ myconf+="
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -no-multimedia -no-opengl -no-phonon -no-qt3support -no-svg -no-webkit -no-xmlpatterns
+ -no-nas-sound -no-cups -no-nis -fontconfig"
+
+ qt4-build_src_configure
+}
+
+src_compile() {
+ # help libQtHelp find freshly built libQtCLucene (bug #289811)
+ export LD_LIBRARY_PATH="${S}/lib:${QTLIBDIR}"
+ export DYLD_LIBRARY_PATH="${S}/lib:${S}/lib/QtHelp.framework"
+
+ qt4-build_src_compile
+
+ # ugly hack to build docs
+ "${S}"/bin/qmake "LIBS+=-L${QTLIBDIR}" "CONFIG+=nostrip" || die
+
+ if use doc; then
+ emake docs
+ elif [[ ${QT4_BUILD_TYPE} == release ]]; then
+ # live ebuild cannot build qch_docs, it will build them through emake docs
+ emake qch_docs
+ fi
+}
+
+src_install() {
+ qt4-build_src_install
+
+ emake INSTALL_ROOT="${D}" install_qchdocs
+
+ # do not compress .qch files
+ docompress -x "${QTDOCDIR}"/qch
+
+ if use doc; then
+ emake INSTALL_ROOT="${D}" install_htmldocs
+ fi
+
+ if use compat; then
+ insinto "${QTDATADIR#${EPREFIX}}"/mkspecs/features
+ doins tools/assistant/compat/features/assistant.prf
+ fi
+}
diff --git a/dev-qt/qthelp/qthelp-4.8.6-r3.ebuild b/dev-qt/qthelp/qthelp-4.8.6-r3.ebuild
new file mode 100644
index 000000000000..c74d57733ebe
--- /dev/null
+++ b/dev-qt/qthelp/qthelp-4.8.6-r3.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="The Help module for the Qt toolkit"
+SRC_URI+="
+ compat? (
+ http://download.qt.io/archive/qt/4.6/qt-assistant-qassistantclient-library-compat-src-4.6.3.tar.gz
+ http://dev.gentoo.org/~pesa/distfiles/qt-assistant-compat-headers-4.7.tar.gz
+ )"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm ia64 ppc ppc64"
+else
+ KEYWORDS="alpha amd64 arm ia64 ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+fi
+
+IUSE="compat doc"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtsql-${PV}[aqua=,debug=,sqlite,${MULTILIB_USEDEP}]
+ compat? (
+ ~dev-qt/qtdbus-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ )
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="
+ tools/assistant/lib/fulltextsearch
+ tools/assistant/lib
+ tools/assistant/tools/qhelpgenerator
+ tools/assistant/tools/qcollectiongenerator
+ tools/assistant/tools/qhelpconverter
+ tools/qdoc3"
+
+pkg_setup() {
+ use compat && QT4_TARGET_DIRECTORIES+="
+ tools/assistant/compat
+ tools/assistant/compat/lib"
+}
+
+src_unpack() {
+ qt4-build-multilib_src_unpack
+
+ # compat version
+ # http://blog.qt.io/blog/2010/06/22/qt-assistant-compat-version-available-as-extra-source-package/
+ if use compat; then
+ mv "${WORKDIR}"/qt-assistant-qassistantclient-library-compat-version-4.6.3 "${S}"/tools/assistant/compat || die
+ mv "${WORKDIR}"/QtAssistant "${S}"/include || die
+ find "${S}"/tools/assistant/compat -type f -execdir chmod a-x '{}' + || die
+ fi
+}
+
+src_prepare() {
+ use compat && PATCHES+=(
+ "${FILESDIR}/${PN}-4.8.6-compat-install.patch"
+ "${FILESDIR}/${PN}-4.8.6-compat-syncqt.patch"
+ )
+
+ qt4-build-multilib_src_prepare
+
+ # prevent rebuild of QtCore and QtXml (bug 348034)
+ sed -i -e '/^sub-qdoc3\.depends/d' doc/doc.pri || die
+}
+
+multilib_src_configure() {
+ local myconf=(
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -no-multimedia -no-opengl -no-phonon -no-qt3support -no-svg -no-webkit -no-xmlpatterns
+ -no-nas-sound -no-cups -no-nis -fontconfig
+ )
+ qt4_multilib_src_configure
+}
+
+multilib_src_compile() {
+ qt4_multilib_src_compile
+
+ # release tarballs are shipped with prebuilt docs
+ if [[ ${QT4_BUILD_TYPE} == live ]] && multilib_is_native_abi; then
+ # qhelpgenerator needs libQtHelp.so.4
+ export LD_LIBRARY_PATH=${BUILD_DIR}/lib
+ export DYLD_LIBRARY_PATH=${BUILD_DIR}/lib:${BUILD_DIR}/lib/QtHelp.framework
+ emake docs
+ fi
+}
+
+multilib_src_install() {
+ qt4_multilib_src_install
+
+ if multilib_is_native_abi; then
+ emake INSTALL_ROOT="${D}" install_qchdocs
+ use doc && emake INSTALL_ROOT="${D}" install_htmldocs
+
+ # do not compress .qch files
+ docompress -x "${QT4_DOCDIR#${EPREFIX}}"/qch
+ fi
+}
+
+multilib_src_install_all() {
+ qt4_multilib_src_install_all
+
+ if use compat; then
+ insinto "${QT4_DATADIR#${EPREFIX}}"/mkspecs/features
+ doins tools/assistant/compat/features/assistant.prf
+ fi
+}
diff --git a/dev-qt/qthelp/qthelp-4.8.7.ebuild b/dev-qt/qthelp/qthelp-4.8.7.ebuild
new file mode 100644
index 000000000000..2be3f5537adc
--- /dev/null
+++ b/dev-qt/qthelp/qthelp-4.8.7.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="The Help module for the Qt toolkit"
+SRC_URI+="
+ compat? (
+ http://download.qt.io/archive/qt/4.6/qt-assistant-qassistantclient-library-compat-src-4.6.3.tar.gz
+ http://dev.gentoo.org/~pesa/distfiles/qt-assistant-compat-headers-4.7.tar.gz
+ )"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+fi
+
+IUSE="compat doc"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtsql-${PV}[aqua=,debug=,sqlite,${MULTILIB_USEDEP}]
+ compat? (
+ ~dev-qt/qtdbus-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ )
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="
+ tools/assistant/lib/fulltextsearch
+ tools/assistant/lib
+ tools/assistant/tools/qhelpgenerator
+ tools/assistant/tools/qcollectiongenerator
+ tools/assistant/tools/qhelpconverter
+ tools/qdoc3"
+
+pkg_setup() {
+ use compat && QT4_TARGET_DIRECTORIES+="
+ tools/assistant/compat
+ tools/assistant/compat/lib"
+}
+
+src_unpack() {
+ qt4-build-multilib_src_unpack
+
+ # compat version
+ # http://blog.qt.io/blog/2010/06/22/qt-assistant-compat-version-available-as-extra-source-package/
+ if use compat; then
+ mv "${WORKDIR}"/qt-assistant-qassistantclient-library-compat-version-4.6.3 "${S}"/tools/assistant/compat || die
+ mv "${WORKDIR}"/QtAssistant "${S}"/include || die
+ find "${S}"/tools/assistant/compat -type f -execdir chmod a-x '{}' + || die
+ fi
+}
+
+src_prepare() {
+ use compat && PATCHES+=(
+ "${FILESDIR}/${PN}-4.8.6-compat-install.patch"
+ "${FILESDIR}/${PN}-4.8.6-compat-syncqt.patch"
+ )
+
+ qt4-build-multilib_src_prepare
+
+ # prevent rebuild of QtCore and QtXml (bug 348034)
+ sed -i -e '/^sub-qdoc3\.depends/d' doc/doc.pri || die
+}
+
+multilib_src_configure() {
+ local myconf=(
+ -system-libpng -system-libjpeg -system-zlib
+ -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite2 -no-sql-odbc
+ -sm -xshape -xsync -xcursor -xfixes -xrandr -xrender -mitshm -xinput -xkb
+ -no-multimedia -no-opengl -no-phonon -no-qt3support -no-svg -no-webkit -no-xmlpatterns
+ -no-nas-sound -no-cups -no-nis -fontconfig
+ )
+ qt4_multilib_src_configure
+}
+
+multilib_src_compile() {
+ qt4_multilib_src_compile
+
+ # release tarballs are shipped with prebuilt docs
+ if [[ ${QT4_BUILD_TYPE} == live ]] && multilib_is_native_abi; then
+ # qhelpgenerator needs libQtHelp.so.4
+ export LD_LIBRARY_PATH=${BUILD_DIR}/lib
+ export DYLD_LIBRARY_PATH=${BUILD_DIR}/lib:${BUILD_DIR}/lib/QtHelp.framework
+ emake docs
+ fi
+}
+
+multilib_src_install() {
+ qt4_multilib_src_install
+
+ if multilib_is_native_abi; then
+ emake INSTALL_ROOT="${D}" install_qchdocs
+ use doc && emake INSTALL_ROOT="${D}" install_htmldocs
+
+ # do not compress .qch files
+ docompress -x "${QT4_DOCDIR#${EPREFIX}}"/qch
+ fi
+}
+
+multilib_src_install_all() {
+ qt4_multilib_src_install_all
+
+ if use compat; then
+ insinto "${QT4_DATADIR#${EPREFIX}}"/mkspecs/features
+ doins tools/assistant/compat/features/assistant.prf
+ fi
+}
diff --git a/dev-qt/qthelp/qthelp-5.4.2.ebuild b/dev-qt/qthelp/qthelp-5.4.2.ebuild
new file mode 100644
index 000000000000..03559acb3c0a
--- /dev/null
+++ b/dev-qt/qthelp/qthelp-5.4.2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qttools"
+inherit qt5-build
+
+DESCRIPTION="The Help module for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+fi
+
+IUSE=""
+
+DEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtgui-${PV}:5
+ >=dev-qt/qtnetwork-${PV}:5
+ >=dev-qt/qtsql-${PV}:5[sqlite]
+ >=dev-qt/qtwidgets-${PV}:5
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/assistant/clucene
+ src/assistant/help
+ src/assistant/qcollectiongenerator
+ src/assistant/qhelpconverter
+ src/assistant/qhelpgenerator
+)
diff --git a/dev-qt/qtimageformats/Manifest b/dev-qt/qtimageformats/Manifest
new file mode 100644
index 000000000000..1285016e0a72
--- /dev/null
+++ b/dev-qt/qtimageformats/Manifest
@@ -0,0 +1 @@
+DIST qtimageformats-opensource-src-5.4.2.tar.xz 2108112 SHA256 8b2b25a29259bc991351fc88d07340d481dfb2cbb450be831d31977a9334deda SHA512 8c0531cc981dc36c88cc420ae5ea9e069ffc217fd3ea3745e6956cf547e17ec8fb244ce2df1735b8b6b750da1f70925956dbded457f8c7f820db53837efbaff0 WHIRLPOOL e183c8c83d66bded1b884a005f4297e665e827512430a0681f615f0fa31abaffa216903be9afb21a6a792317b8a4f1635f332d821a667b6d2092870ea5fde67c
diff --git a/dev-qt/qtimageformats/metadata.xml b/dev-qt/qtimageformats/metadata.xml
new file mode 100644
index 000000000000..afb3b434585b
--- /dev/null
+++ b/dev-qt/qtimageformats/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtimageformats/qtimageformats-5.4.2.ebuild b/dev-qt/qtimageformats/qtimageformats-5.4.2.ebuild
new file mode 100644
index 000000000000..df2e85f7da3d
--- /dev/null
+++ b/dev-qt/qtimageformats/qtimageformats-5.4.2.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt5-build
+
+DESCRIPTION="Additional format plugins for the Qt image I/O system"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+fi
+
+IUSE=""
+
+DEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtgui-${PV}:5
+ media-libs/jasper
+ media-libs/libmng:=
+ media-libs/libwebp:=
+ media-libs/tiff:0
+"
+RDEPEND="${DEPEND}"
diff --git a/dev-qt/qtlockedfile/Manifest b/dev-qt/qtlockedfile/Manifest
new file mode 100644
index 000000000000..d90810f75f22
--- /dev/null
+++ b/dev-qt/qtlockedfile/Manifest
@@ -0,0 +1,2 @@
+DIST qt-solutions-20130904.tar.xz 751536 SHA256 fc27b49883269a21ced2d3cb543eb78e79223afe5933bbc7d3194146f72f8884 SHA512 9e50d0a7d9fee08a72a3c6dee1d3fe45d04ae0930a967d81eff457f6c0ff53ac8449ef1d8241a5ce75ca2dcf9f4a2fe27b899647748d11060c3ab5767c3d0e75 WHIRLPOOL b933a301de905cffab8393a7adf055ed2f5198f1572657f5993e016746340d9862017982308ac11310add272ae1cd5c3435054dce2dd9d7ee5a9c92baf1878c2
+DIST qt-solutions-20150629.tar.xz 710488 SHA256 cfa88a67c8396878eaa98f39b7648482fabb73988549cc404816c29212cf6503 SHA512 a95ed58f0218cd90d734a40eedd173b896fa0138ad235f3157d7bee538b16c5f385d93bae483fd22267f2984389b9940bb85ba0cd3d25c16124d56abb39568f5 WHIRLPOOL 23a273cfa2d0bc3834487c9e325c73d0038877c5a5085493ceb37ee5dc03cc4d2cddf4f46f5a89045fcbfe7f6dd03b678d56f3167fb750374d44879f11ded8b7
diff --git a/dev-qt/qtlockedfile/files/qtlockedfile.prf b/dev-qt/qtlockedfile/files/qtlockedfile.prf
new file mode 100644
index 000000000000..93d656e69586
--- /dev/null
+++ b/dev-qt/qtlockedfile/files/qtlockedfile.prf
@@ -0,0 +1,6 @@
+INCLUDEPATH *= $$[QT_INSTALL_HEADERS]/QtSolutions
+greaterThan(QT_MAJOR_VERSION, 4) {
+LIBS *= -lQt$${QT_MAJOR_VERSION}Solutions_LockedFile-2.4
+} else {
+LIBS *= -lQtSolutions_LockedFile-2.4
+}
diff --git a/dev-qt/qtlockedfile/metadata.xml b/dev-qt/qtlockedfile/metadata.xml
new file mode 100644
index 000000000000..ab02f994fdd2
--- /dev/null
+++ b/dev-qt/qtlockedfile/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+</pkgmetadata>
diff --git a/dev-qt/qtlockedfile/qtlockedfile-2.4.1_p20130904.ebuild b/dev-qt/qtlockedfile/qtlockedfile-2.4.1_p20130904.ebuild
new file mode 100644
index 000000000000..c8ff09e7661c
--- /dev/null
+++ b/dev-qt/qtlockedfile/qtlockedfile-2.4.1_p20130904.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-r2
+
+MY_P=qt-solutions-${PV#*_p}
+
+DESCRIPTION="QFile extension with advisory locking functions"
+HOMEPAGE="https://code.qt.io/cgit/qt-solutions/qt-solutions.git/"
+SRC_URI="http://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.xz"
+
+LICENSE="|| ( LGPL-2.1 GPL-3 )"
+SLOT="0"
+KEYWORDS="amd64 arm ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
+IUSE="doc"
+
+DEPEND="dev-qt/qtcore:4"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}/${PN}
+
+src_prepare() {
+ qt4-r2_src_prepare
+
+ echo 'SOLUTIONS_LIBRARY = yes' > config.pri
+ echo 'QT -= gui' >> src/qtlockedfile.pri
+
+ sed -i -e "s/-head/-${PV%.*}/" common.pri || die
+ sed -i -e '/SUBDIRS+=example/d' ${PN}.pro || die
+}
+
+src_install() {
+ dodoc README.TXT
+
+ dolib.so lib/*
+ insinto /usr/include/qt4/QtSolutions/
+ doins src/QtLockedFile src/${PN}.h
+
+ insinto /usr/share/qt4/mkspecs/features/
+ doins "${FILESDIR}"/${PN}.prf
+
+ use doc && dohtml -r doc/html
+}
diff --git a/dev-qt/qtlockedfile/qtlockedfile-2.4.1_p20150629.ebuild b/dev-qt/qtlockedfile/qtlockedfile-2.4.1_p20150629.ebuild
new file mode 100644
index 000000000000..a1609f6086f7
--- /dev/null
+++ b/dev-qt/qtlockedfile/qtlockedfile-2.4.1_p20150629.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multibuild qmake-utils
+
+MY_P=qt-solutions-${PV#*_p}
+
+DESCRIPTION="QFile extension with advisory locking functions"
+HOMEPAGE="https://code.qt.io/cgit/qt-solutions/qt-solutions.git/"
+SRC_URI="http://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.xz"
+
+LICENSE="|| ( LGPL-2.1 GPL-3 )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc +qt4 qt5"
+
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+DEPEND="
+ qt4? ( dev-qt/qtcore:4 )
+ qt5? ( dev-qt/qtcore:5 )
+"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}/${PN}
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
+}
+
+src_prepare() {
+ echo 'SOLUTIONS_LIBRARY = yes' > config.pri
+ echo 'QT -= gui' >> src/qtlockedfile.pri
+
+ sed -i -e "s/-head/-${PV%.*}/" common.pri || die
+ sed -i -e '/SUBDIRS+=example/d' ${PN}.pro || die
+
+ multibuild_copy_sources
+}
+
+src_configure() {
+ myconfigure() {
+ if [[ ${MULTIBUILD_VARIANT} == qt4 ]]; then
+ eqmake4
+ fi
+ if [[ ${MULTIBUILD_VARIANT} == qt5 ]]; then
+ eqmake5
+ fi
+ }
+ multibuild_foreach_variant run_in_build_dir myconfigure
+}
+
+src_compile() {
+ multibuild_foreach_variant run_in_build_dir default
+}
+
+src_install() {
+ dodoc README.TXT
+ use doc && dodoc -r doc/html
+
+ myinstall() {
+ # libraries
+ dolib.so lib/*
+
+ # headers
+ insinto "$(${MULTIBUILD_VARIANT}_get_headerdir)"/QtSolutions
+ doins src/QtLockedFile src/${PN}.h
+
+ # .prf files
+ insinto "$(${MULTIBUILD_VARIANT}_get_mkspecsdir)"/features
+ doins "${FILESDIR}"/${PN}.prf
+ }
+ multibuild_foreach_variant run_in_build_dir myinstall
+}
diff --git a/dev-qt/qtmultimedia/Manifest b/dev-qt/qtmultimedia/Manifest
new file mode 100644
index 000000000000..9b8d7116deb2
--- /dev/null
+++ b/dev-qt/qtmultimedia/Manifest
@@ -0,0 +1,4 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qtmultimedia-opensource-src-5.4.2.tar.xz 3407336 SHA256 d2668c7922412344384482239d34bee66d8ebb6d9fa9d025cc4a5aa990664940 SHA512 8d8757ff9d9d736618cc57e0872722668b6f2455ec194a700dc03a352a9bfbe90135f06fe05f3aeed2981d837b6c9cc338a8d6cc25f5f253016499244ca873d2 WHIRLPOOL 8bcda95d8aba5760a8270d90a46482cb023ec15d7bfcaf4c33591037a5353b8f3d3d3177aa2e794163c48ee571ac98679c3c3e166e91d14eecb0f28a267d529f
diff --git a/dev-qt/qtmultimedia/files/qtmultimedia-4.8.0-alsa.patch b/dev-qt/qtmultimedia/files/qtmultimedia-4.8.0-alsa.patch
new file mode 100644
index 000000000000..8bd40edb1e80
--- /dev/null
+++ b/dev-qt/qtmultimedia/files/qtmultimedia-4.8.0-alsa.patch
@@ -0,0 +1,25 @@
+--- qt-everywhere-opensource-src-4.8.0.orig/configure 2012-03-13 00:45:02.502205702 +0100
++++ qt-everywhere-opensource-src-4.8.0/configure 2012-03-13 00:47:40.386231881 +0100
+@@ -1049,7 +1049,7 @@
+ VAL=no
+ ;;
+ #Qt style yes options
+- -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles|-icu)
++ -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles|-icu|-alsa)
+ VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
+ VAL=yes
+ ;;
+@@ -2399,6 +2399,13 @@
+ else
+ UNKNOWN_OPT=yes
+ fi
++ ;;
++ alsa)
++ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
++ CFG_ALSA="$VAL"
++ else
++ UNKNOWN_OPT=yes
++ fi
+ ;;
+ *)
+ UNKNOWN_OPT=yes
diff --git a/dev-qt/qtmultimedia/metadata.xml b/dev-qt/qtmultimedia/metadata.xml
new file mode 100644
index 000000000000..b408e5c69af4
--- /dev/null
+++ b/dev-qt/qtmultimedia/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ <flag name="qml">Build QML/QtQuick bindings and imports</flag>
+ <flag name="widgets">Build the QtMultimediaWidgets module</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtmultimedia/qtmultimedia-4.8.5.ebuild b/dev-qt/qtmultimedia/qtmultimedia-4.8.5.ebuild
new file mode 100644
index 000000000000..b1e129f7e69d
--- /dev/null
+++ b/dev-qt/qtmultimedia/qtmultimedia-4.8.5.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-build
+
+DESCRIPTION="The Multimedia module for the Qt toolkit"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="amd64 arm ~ia64 ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+fi
+IUSE="alsa"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=]
+ alsa? ( media-libs/alsa-lib )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.8.0-alsa.patch"
+)
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/multimedia"
+
+ QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
+ include/Qt
+ include/QtCore
+ include/QtGui
+ include/QtMultimedia
+ src/src.pro
+ src/corelib
+ src/gui"
+
+ QCONFIG_ADD="multimedia"
+ QCONFIG_DEFINE="QT_MULTIMEDIA"
+
+ qt4-build_pkg_setup
+}
+
+src_configure() {
+ myconf+="
+ -multimedia -audio-backend
+ $(qt_use alsa)
+ -no-accessibility -no-qt3support -no-xmlpatterns -no-phonon -no-phonon-backend
+ -no-svg -no-webkit -no-script -no-scripttools -no-declarative
+ -system-zlib -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg -no-openssl
+ -no-cups -no-dbus -no-gtkstyle -no-nas-sound -no-opengl
+ -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes
+ -no-xrandr -no-xrender -no-mitshm -no-fontconfig -no-freetype -no-xinput -no-xkb"
+
+ qt4-build_src_configure
+}
diff --git a/dev-qt/qtmultimedia/qtmultimedia-4.8.6-r1.ebuild b/dev-qt/qtmultimedia/qtmultimedia-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..fd70391e226f
--- /dev/null
+++ b/dev-qt/qtmultimedia/qtmultimedia-4.8.6-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="The Multimedia module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="arm ppc ppc64"
+else
+ KEYWORDS="amd64 arm ~ia64 ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+fi
+
+IUSE="alsa"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.8.0-alsa.patch"
+)
+
+QT4_TARGET_DIRECTORIES="src/multimedia"
+
+QCONFIG_ADD="multimedia"
+QCONFIG_DEFINE="QT_MULTIMEDIA"
+
+multilib_src_configure() {
+ local myconf=(
+ -multimedia -audio-backend
+ $(qt_use alsa)
+ -no-accessibility -no-qt3support -no-xmlpatterns -no-phonon -no-phonon-backend
+ -no-svg -no-webkit -no-script -no-scripttools -no-declarative
+ -system-zlib -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg -no-openssl
+ -no-cups -no-dbus -no-gtkstyle -no-nas-sound -no-opengl
+ -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes
+ -no-xrandr -no-xrender -no-mitshm -no-fontconfig -no-freetype -no-xinput -no-xkb
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtmultimedia/qtmultimedia-4.8.7.ebuild b/dev-qt/qtmultimedia/qtmultimedia-4.8.7.ebuild
new file mode 100644
index 000000000000..69dec093f4ef
--- /dev/null
+++ b/dev-qt/qtmultimedia/qtmultimedia-4.8.7.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="The Multimedia module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+fi
+
+IUSE="alsa"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.8.0-alsa.patch"
+)
+
+QT4_TARGET_DIRECTORIES="src/multimedia"
+
+QCONFIG_ADD="multimedia"
+QCONFIG_DEFINE="QT_MULTIMEDIA"
+
+multilib_src_configure() {
+ local myconf=(
+ -multimedia -audio-backend
+ $(qt_use alsa)
+ -no-accessibility -no-qt3support -no-xmlpatterns -no-phonon -no-phonon-backend
+ -no-svg -no-webkit -no-script -no-scripttools -no-declarative
+ -system-zlib -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg -no-openssl
+ -no-cups -no-dbus -no-gtkstyle -no-nas-sound -no-opengl
+ -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes
+ -no-xrandr -no-xrender -no-mitshm -no-fontconfig -no-freetype -no-xinput -no-xkb
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtmultimedia/qtmultimedia-5.4.2-r1.ebuild b/dev-qt/qtmultimedia/qtmultimedia-5.4.2-r1.ebuild
new file mode 100644
index 000000000000..d8cd46dcc6b5
--- /dev/null
+++ b/dev-qt/qtmultimedia/qtmultimedia-5.4.2-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt5-build
+
+DESCRIPTION="The Multimedia module for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="alsa +gstreamer openal opengl pulseaudio qml widgets"
+
+RDEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtgui-${PV}:5
+ >=dev-qt/qtnetwork-${PV}:5
+ alsa? ( media-libs/alsa-lib )
+ gstreamer? (
+ media-libs/gstreamer:0.10
+ media-libs/gst-plugins-bad:0.10
+ media-libs/gst-plugins-base:0.10
+ )
+ pulseaudio? ( media-sound/pulseaudio )
+ qml? (
+ >=dev-qt/qtdeclarative-${PV}:5
+ openal? ( media-libs/openal )
+ )
+ widgets? (
+ >=dev-qt/qtwidgets-${PV}:5
+ opengl? ( >=dev-qt/qtopengl-${PV}:5 )
+ )
+"
+DEPEND="${RDEPEND}
+ gstreamer? ( x11-proto/videoproto )
+"
+
+src_prepare() {
+ # do not rely on qtbase configuration
+ sed -i -e 's/contains(QT_CONFIG, \(alsa\|pulseaudio\))://' \
+ qtmultimedia.pro || die
+
+ qt_use_compile_test alsa
+ qt_use_compile_test gstreamer
+ qt_use_compile_test openal
+ qt_use_compile_test pulseaudio
+
+ qt_use_disable_mod opengl opengl \
+ src/multimediawidgets/multimediawidgets.pro
+
+ qt_use_disable_mod qml quick \
+ src/src.pro \
+ src/plugins/plugins.pro
+
+ qt_use_disable_mod widgets widgets \
+ src/src.pro \
+ src/gsttools/gsttools.pro \
+ src/plugins/gstreamer/common.pri
+
+ qt5-build_src_prepare
+}
diff --git a/dev-qt/qtnetwork/Manifest b/dev-qt/qtnetwork/Manifest
new file mode 100644
index 000000000000..0c465bb8036b
--- /dev/null
+++ b/dev-qt/qtnetwork/Manifest
@@ -0,0 +1 @@
+DIST qtbase-opensource-src-5.4.2.tar.xz 46354192 SHA256 9fc4f720b8b5a8b8e4a7d45e13ce4d5b86756ad46fb406386637eb2de5fd5a74 SHA512 029da83969614bc9b3803c76242af62911e3c6de171b116b5cb8e2823cad0514ab705cc3fa331e042c679caeb099de4e9cd7ddea92959f675dda82533e3ad7fe WHIRLPOOL 5f352f78a779c5d042f04966a010b10af706c4db94976870721a550e3ab7eaf2695b3582c86cdcc3a11de36283e11fe65797f96e59df96fa367b16b72b5f9213
diff --git a/dev-qt/qtnetwork/metadata.xml b/dev-qt/qtnetwork/metadata.xml
new file mode 100644
index 000000000000..371b3c0d935a
--- /dev/null
+++ b/dev-qt/qtnetwork/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="bindist">Disable EC support via <pkg>dev-libs/openssl</pkg></flag>
+ <flag name="connman">Enable <pkg>net-misc/connman</pkg>-based bearer plugin</flag>
+ <flag name="networkmanager">Enable <pkg>net-misc/networkmanager</pkg>-based
+ bearer plugin</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtnetwork/qtnetwork-5.4.2.ebuild b/dev-qt/qtnetwork/qtnetwork-5.4.2.ebuild
new file mode 100644
index 000000000000..8f266a5b5112
--- /dev/null
+++ b/dev-qt/qtnetwork/qtnetwork-5.4.2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="Network abstraction library for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="bindist connman networkmanager +ssl"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}
+ >=sys-libs/zlib-1.2.5
+ connman? ( ~dev-qt/qtdbus-${PV} )
+ networkmanager? ( ~dev-qt/qtdbus-${PV} )
+ ssl? ( dev-libs/openssl:0[bindist=] )
+"
+RDEPEND="${DEPEND}
+ connman? ( net-misc/connman )
+ networkmanager? ( net-misc/networkmanager )
+"
+
+QT5_TARGET_SUBDIRS=(
+ src/network
+ src/plugins/bearer/generic
+)
+
+QT5_GENTOO_CONFIG=(
+ ssl::SSL
+ ssl::OPENSSL
+ ssl:openssl-linked:LINKED_OPENSSL
+)
+
+pkg_setup() {
+ use connman && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/connman)
+ use networkmanager && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/networkmanager)
+}
+
+src_configure() {
+ local myconf=(
+ $(use connman || use networkmanager && echo -dbus-linked)
+ $(use ssl && echo -openssl-linked)
+ )
+ qt5-build_src_configure
+}
diff --git a/dev-qt/qtopengl/Manifest b/dev-qt/qtopengl/Manifest
new file mode 100644
index 000000000000..48eaa826faf5
--- /dev/null
+++ b/dev-qt/qtopengl/Manifest
@@ -0,0 +1,4 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qtbase-opensource-src-5.4.2.tar.xz 46354192 SHA256 9fc4f720b8b5a8b8e4a7d45e13ce4d5b86756ad46fb406386637eb2de5fd5a74 SHA512 029da83969614bc9b3803c76242af62911e3c6de171b116b5cb8e2823cad0514ab705cc3fa331e042c679caeb099de4e9cd7ddea92959f675dda82533e3ad7fe WHIRLPOOL 5f352f78a779c5d042f04966a010b10af706c4db94976870721a550e3ab7eaf2695b3582c86cdcc3a11de36283e11fe65797f96e59df96fa367b16b72b5f9213
diff --git a/dev-qt/qtopengl/metadata.xml b/dev-qt/qtopengl/metadata.xml
new file mode 100644
index 000000000000..34cefc306941
--- /dev/null
+++ b/dev-qt/qtopengl/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="egl">Use EGL instead of default GLX to manage OpenGL
+ contexts on the desktop</flag>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ <flag name="gles2">Use GLES 2.0 or later instead of full OpenGL</flag>
+ <flag name="qt3support">Enable the Qt3Support libraries for Qt4</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtopengl/qtopengl-4.8.5.ebuild b/dev-qt/qtopengl/qtopengl-4.8.5.ebuild
new file mode 100644
index 000000000000..683afb554ba6
--- /dev/null
+++ b/dev-qt/qtopengl/qtopengl-4.8.5.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-build
+
+DESCRIPTION="The OpenGL module for the Qt toolkit"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+IUSE="egl qt3support"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,qt3support=]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,egl=,qt3support=]
+ virtual/opengl
+"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/opengl
+ src/plugins/graphicssystems/opengl"
+
+ QT4_EXTRACT_DIRECTORIES="
+ include/QtCore
+ include/QtGui
+ include/QtOpenGL
+ src/corelib
+ src/gui
+ src/opengl
+ src/plugins
+ src/3rdparty"
+
+ QCONFIG_ADD="opengl"
+ QCONFIG_DEFINE="QT_OPENGL"
+
+ qt4-build_pkg_setup
+}
+
+src_configure() {
+ myconf+="
+ -opengl
+ $(qt_use qt3support)
+ $(qt_use egl)"
+
+ qt4-build_src_configure
+
+ # Not building tools/designer/src/plugins/tools/view3d as it's
+ # commented out of the build in the source
+}
+
+src_install() {
+ qt4-build_src_install
+
+ # touch the available graphics systems
+ dodir /usr/share/qt4/graphicssystems
+ echo "experimental" > "${ED}"/usr/share/qt4/graphicssystems/opengl || die
+}
diff --git a/dev-qt/qtopengl/qtopengl-4.8.6-r1.ebuild b/dev-qt/qtopengl/qtopengl-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..f1c2fce89c0a
--- /dev/null
+++ b/dev-qt/qtopengl/qtopengl-4.8.6-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="The OpenGL module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm hppa ia64 ppc ppc64"
+else
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="egl qt3support"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,qt3support=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,egl=,qt3support=,${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.5.0-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrender-0.9.7-r1[${MULTILIB_USEDEP}]
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="
+ src/opengl
+ src/plugins/graphicssystems/opengl"
+
+QCONFIG_ADD="opengl"
+QCONFIG_DEFINE="QT_OPENGL"
+
+multilib_src_configure() {
+ local myconf=(
+ -opengl
+ $(qt_use qt3support)
+ $(qt_use egl)
+ )
+ qt4_multilib_src_configure
+}
+
+multilib_src_install_all() {
+ qt4_multilib_src_install_all
+
+ dodir /usr/share/qt4/graphicssystems
+ echo "experimental" > "${ED}"/usr/share/qt4/graphicssystems/opengl || die
+}
diff --git a/dev-qt/qtopengl/qtopengl-4.8.7.ebuild b/dev-qt/qtopengl/qtopengl-4.8.7.ebuild
new file mode 100644
index 000000000000..cd1cd279bd55
--- /dev/null
+++ b/dev-qt/qtopengl/qtopengl-4.8.7.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="The OpenGL module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="egl qt3support"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,qt3support=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,egl=,qt3support=,${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.5.0-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrender-0.9.7-r1[${MULTILIB_USEDEP}]
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="
+ src/opengl
+ src/plugins/graphicssystems/opengl"
+
+QCONFIG_ADD="opengl"
+QCONFIG_DEFINE="QT_OPENGL"
+
+multilib_src_configure() {
+ local myconf=(
+ -opengl
+ $(qt_use qt3support)
+ $(qt_use egl)
+ )
+ qt4_multilib_src_configure
+}
+
+multilib_src_install_all() {
+ qt4_multilib_src_install_all
+
+ dodir /usr/share/qt4/graphicssystems
+ echo "experimental" > "${ED}"/usr/share/qt4/graphicssystems/opengl || die
+}
diff --git a/dev-qt/qtopengl/qtopengl-5.4.2.ebuild b/dev-qt/qtopengl/qtopengl-5.4.2.ebuild
new file mode 100644
index 000000000000..d11b859cc87e
--- /dev/null
+++ b/dev-qt/qtopengl/qtopengl-5.4.2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qtbase"
+VIRTUALX_REQUIRED="test"
+inherit qt5-build
+
+DESCRIPTION="OpenGL support library for the Qt5 framework (deprecated)"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="gles2"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}
+ ~dev-qt/qtgui-${PV}[gles2=]
+ ~dev-qt/qtwidgets-${PV}[gles2=]
+ virtual/opengl
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/opengl
+)
+
+src_configure() {
+ local myconf=(
+ -opengl $(usex gles2 es2 desktop)
+ )
+ qt5-build_src_configure
+}
diff --git a/dev-qt/qtopenvg/Manifest b/dev-qt/qtopenvg/Manifest
new file mode 100644
index 000000000000..ac4ca6af0d23
--- /dev/null
+++ b/dev-qt/qtopenvg/Manifest
@@ -0,0 +1,3 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
diff --git a/dev-qt/qtopenvg/metadata.xml b/dev-qt/qtopenvg/metadata.xml
new file mode 100644
index 000000000000..ac06367e1c10
--- /dev/null
+++ b/dev-qt/qtopenvg/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="exceptions">Build with support for exceptions</flag>
+ <flag name="qt3support">Enable the Qt3Support libraries for Qt4</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtopenvg/qtopenvg-4.8.5.ebuild b/dev-qt/qtopenvg/qtopenvg-4.8.5.ebuild
new file mode 100644
index 000000000000..db2fdd76efc6
--- /dev/null
+++ b/dev-qt/qtopenvg/qtopenvg-4.8.5.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-build
+
+DESCRIPTION="The OpenVG module for the Qt toolkit"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="amd64 ~arm ~ia64 ppc ~ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+IUSE="qt3support"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,qt3support=]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,egl,qt3support=]
+ media-libs/mesa[egl,openvg]
+"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/openvg
+ src/plugins/graphicssystems/openvg"
+
+ QT4_EXTRACT_DIRECTORIES="
+ include/QtCore
+ include/QtGui
+ include/QtOpenVG
+ src/corelib
+ src/gui
+ src/openvg
+ src/plugins
+ src/3rdparty"
+
+ QCONFIG_ADD="openvg"
+ QCONFIG_DEFINE="QT_OPENVG"
+
+ qt4-build_pkg_setup
+}
+
+src_configure() {
+ gltype="desktop"
+
+ myconf+="
+ -openvg -egl
+ $(qt_use qt3support)"
+
+ qt4-build_src_configure
+}
+
+src_install() {
+ qt4-build_src_install
+
+ # touch the available graphics systems
+ dodir /usr/share/qt4/graphicssystems
+ echo "experimental" > "${ED}"/usr/share/qt4/graphicssystems/openvg || die
+}
diff --git a/dev-qt/qtopenvg/qtopenvg-4.8.6-r1.ebuild b/dev-qt/qtopenvg/qtopenvg-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..914081e4f430
--- /dev/null
+++ b/dev-qt/qtopenvg/qtopenvg-4.8.6-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="The OpenVG module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="amd64 arm ~ia64 ppc ~ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="qt3support"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,qt3support=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,egl,qt3support=,${MULTILIB_USEDEP}]
+ media-libs/mesa[egl,openvg,${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="
+ src/openvg
+ src/plugins/graphicssystems/openvg"
+
+QCONFIG_ADD="openvg"
+QCONFIG_DEFINE="QT_OPENVG"
+
+multilib_src_configure() {
+ local myconf=(
+ -openvg -egl
+ $(qt_use qt3support)
+ )
+ qt4_multilib_src_configure
+}
+
+multilib_src_install_all() {
+ qt4_multilib_src_install_all
+
+ dodir /usr/share/qt4/graphicssystems
+ echo "experimental" > "${ED}"/usr/share/qt4/graphicssystems/openvg || die
+}
diff --git a/dev-qt/qtopenvg/qtopenvg-4.8.7.ebuild b/dev-qt/qtopenvg/qtopenvg-4.8.7.ebuild
new file mode 100644
index 000000000000..97782b85b3cb
--- /dev/null
+++ b/dev-qt/qtopenvg/qtopenvg-4.8.7.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="The OpenVG module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="qt3support"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,qt3support=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,egl,qt3support=,${MULTILIB_USEDEP}]
+ media-libs/mesa[egl,openvg,${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="
+ src/openvg
+ src/plugins/graphicssystems/openvg"
+
+QCONFIG_ADD="openvg"
+QCONFIG_DEFINE="QT_OPENVG"
+
+multilib_src_configure() {
+ local myconf=(
+ -openvg -egl
+ $(qt_use qt3support)
+ )
+ qt4_multilib_src_configure
+}
+
+multilib_src_install_all() {
+ qt4_multilib_src_install_all
+
+ dodir /usr/share/qt4/graphicssystems
+ echo "experimental" > "${ED}"/usr/share/qt4/graphicssystems/openvg || die
+}
diff --git a/dev-qt/qtpaths/Manifest b/dev-qt/qtpaths/Manifest
new file mode 100644
index 000000000000..021b32a107b9
--- /dev/null
+++ b/dev-qt/qtpaths/Manifest
@@ -0,0 +1 @@
+DIST qttools-opensource-src-5.4.2.tar.xz 9333100 SHA256 edf3d7e00227f9989101da84b2fdf8eaf1a5b7863dc5e0d26bb0f39303e8b6b4 SHA512 55aa04eae16b71e78d4432e7d59b2052392d13652a3e9beff15a6503f2e88e77a9b48279121d8eee943a898799155c05b167d986bf01fae84b5db0a9a1759148 WHIRLPOOL 9123ff33a35c03adaa6d3374e86b539e9481ec78467bd72ad6f2d832e76e7aafd9b2f2da0420111e1aa8a66c4950b0478d8a6ae4c0f0e05a20c8334196b077e8
diff --git a/dev-qt/qtpaths/metadata.xml b/dev-qt/qtpaths/metadata.xml
new file mode 100644
index 000000000000..afb3b434585b
--- /dev/null
+++ b/dev-qt/qtpaths/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtpaths/qtpaths-5.4.2.ebuild b/dev-qt/qtpaths/qtpaths-5.4.2.ebuild
new file mode 100644
index 000000000000..017dd584962e
--- /dev/null
+++ b/dev-qt/qtpaths/qtpaths-5.4.2.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qttools"
+inherit qt5-build
+
+DESCRIPTION="Tool to query Qt path information"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+fi
+
+IUSE=""
+
+DEPEND="
+ >=dev-qt/qtcore-${PV}:5
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/qtpaths
+)
diff --git a/dev-qt/qtphonon/Manifest b/dev-qt/qtphonon/Manifest
new file mode 100644
index 000000000000..ac4ca6af0d23
--- /dev/null
+++ b/dev-qt/qtphonon/Manifest
@@ -0,0 +1,3 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
diff --git a/dev-qt/qtphonon/metadata.xml b/dev-qt/qtphonon/metadata.xml
new file mode 100644
index 000000000000..81cb7d93d178
--- /dev/null
+++ b/dev-qt/qtphonon/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ <flag name="qt3support">Enable the Qt3Support libraries for Qt4. Note that
+ this does not mean you can compile pure Qt3 programs with Qt4.</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtphonon/qtphonon-4.8.5.ebuild b/dev-qt/qtphonon/qtphonon-4.8.5.ebuild
new file mode 100644
index 000000000000..b70091fdfdf9
--- /dev/null
+++ b/dev-qt/qtphonon/qtphonon-4.8.5.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-build
+
+DESCRIPTION="The Phonon module for the Qt toolkit"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="amd64 arm hppa ~ia64 ppc ppc64 x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+IUSE="dbus qt3support"
+
+DEPEND="
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,qt3support=]
+ !kde-apps/phonon-kde
+ !kde-base/phonon-xine
+ !media-libs/phonon
+ !media-sound/phonon
+ !aqua? ( media-libs/gstreamer:0.10
+ media-plugins/gst-plugins-meta:0.10 )
+ aqua? ( ~dev-qt/qtopengl-${PV}[aqua=,debug=,qt3support=] )
+ dbus? ( ~dev-qt/qtdbus-${PV}[aqua=,debug=] )
+"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/phonon
+ src/plugins/phonon"
+
+ QT4_EXTRACT_DIRECTORIES="
+ include
+ src"
+
+ QCONFIG_ADD="phonon"
+ QCONFIG_DEFINE="QT_PHONON
+ $(use !aqua && echo QT_GSTREAMER)"
+
+ qt4-build_pkg_setup
+}
+
+src_configure() {
+ myconf+="
+ -phonon -phonon-backend -no-opengl -no-svg
+ $(qt_use dbus qdbus)
+ $(qt_use qt3support)"
+
+ qt4-build_src_configure
+}
diff --git a/dev-qt/qtphonon/qtphonon-4.8.6-r1.ebuild b/dev-qt/qtphonon/qtphonon-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..fe6646e28878
--- /dev/null
+++ b/dev-qt/qtphonon/qtphonon-4.8.6-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="The Phonon module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="arm hppa ppc ppc64"
+else
+ KEYWORDS="amd64 arm hppa ~ia64 ppc ppc64 x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="dbus qt3support"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,qt3support=,${MULTILIB_USEDEP}]
+ aqua? ( ~dev-qt/qtopengl-${PV}[aqua=,debug=,qt3support=,${MULTILIB_USEDEP}] )
+ !aqua? (
+ >=media-libs/gstreamer-0.10.36-r1:0.10[${MULTILIB_USEDEP}]
+ >=media-plugins/gst-plugins-meta-0.10-r9:0.10[${MULTILIB_USEDEP}]
+ )
+ dbus? ( ~dev-qt/qtdbus-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+ !kde-apps/phonon-kde
+ !media-libs/phonon
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="
+ src/phonon
+ src/plugins/phonon"
+
+QCONFIG_ADD="phonon"
+
+pkg_setup() {
+ QCONFIG_DEFINE="
+ QT_PHONON
+ $(use aqua || echo QT_GSTREAMER)"
+}
+
+multilib_src_configure() {
+ local myconf=(
+ -phonon -phonon-backend
+ -no-opengl -no-svg
+ $(qt_use dbus qdbus)
+ $(qt_use qt3support)
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtphonon/qtphonon-4.8.7.ebuild b/dev-qt/qtphonon/qtphonon-4.8.7.ebuild
new file mode 100644
index 000000000000..efed283ad200
--- /dev/null
+++ b/dev-qt/qtphonon/qtphonon-4.8.7.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="The Phonon module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="dbus qt3support"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,qt3support=,${MULTILIB_USEDEP}]
+ aqua? ( ~dev-qt/qtopengl-${PV}[aqua=,debug=,qt3support=,${MULTILIB_USEDEP}] )
+ !aqua? (
+ >=media-libs/gstreamer-0.10.36-r1:0.10[${MULTILIB_USEDEP}]
+ >=media-plugins/gst-plugins-meta-0.10-r9:0.10[${MULTILIB_USEDEP}]
+ )
+ dbus? ( ~dev-qt/qtdbus-${PV}[aqua=,debug=,${MULTILIB_USEDEP}] )
+ !kde-apps/phonon-kde
+ !media-libs/phonon
+ !media-libs/phonon-gstreamer
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="
+ src/phonon
+ src/plugins/phonon"
+
+QCONFIG_ADD="phonon"
+
+pkg_setup() {
+ QCONFIG_DEFINE="
+ QT_PHONON
+ $(use aqua || echo QT_GSTREAMER)"
+}
+
+multilib_src_configure() {
+ local myconf=(
+ -phonon -phonon-backend
+ -no-opengl -no-svg
+ $(qt_use dbus qdbus)
+ $(qt_use qt3support)
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtpositioning/Manifest b/dev-qt/qtpositioning/Manifest
new file mode 100644
index 000000000000..98304b11636a
--- /dev/null
+++ b/dev-qt/qtpositioning/Manifest
@@ -0,0 +1 @@
+DIST qtlocation-opensource-src-5.4.2.tar.xz 3325280 SHA256 dc4af26e5398222aade1f7e405b6c8c0caaca7de0df910b8da20c5ff058583ec SHA512 89b9983a8dca4948602f62a6fa1447479a84c140b56d452599c77c641107bf495a3ef52b3a80fcf37839e918f90cac0381d4f5dfbb57d97b7a5a08033d57cf85 WHIRLPOOL ec7607f236ac66de959ba01b2132683d94a5fd74d11f6a511691e745c1358654da6cda1f201ebb7e7d0a46a9d4858c386bf254319539817e69e1991f5bfca95f
diff --git a/dev-qt/qtpositioning/metadata.xml b/dev-qt/qtpositioning/metadata.xml
new file mode 100644
index 000000000000..0d64dfddc921
--- /dev/null
+++ b/dev-qt/qtpositioning/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="geoclue">Use enhanced location information from <pkg>app-misc/geoclue</pkg></flag>
+ <flag name="qml">Build QML bindings</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtpositioning/qtpositioning-5.4.2.ebuild b/dev-qt/qtpositioning/qtpositioning-5.4.2.ebuild
new file mode 100644
index 000000000000..aeb0529b91da
--- /dev/null
+++ b/dev-qt/qtpositioning/qtpositioning-5.4.2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qtlocation"
+inherit qt5-build
+
+DESCRIPTION="Physical position determination library for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+fi
+
+# TODO: src/plugins/position/gypsy
+IUSE="geoclue qml"
+
+RDEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ geoclue? (
+ app-misc/geoclue:0
+ dev-libs/glib:2
+ )
+ qml? ( >=dev-qt/qtdeclarative-${PV}:5 )
+"
+DEPEND="${RDEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/positioning
+ src/plugins/position/positionpoll
+)
+
+pkg_setup() {
+ use geoclue && QT5_TARGET_SUBDIRS+=(src/plugins/position/geoclue)
+ use qml && QT5_TARGET_SUBDIRS+=(src/imports/positioning)
+}
diff --git a/dev-qt/qtprintsupport/Manifest b/dev-qt/qtprintsupport/Manifest
new file mode 100644
index 000000000000..0c465bb8036b
--- /dev/null
+++ b/dev-qt/qtprintsupport/Manifest
@@ -0,0 +1 @@
+DIST qtbase-opensource-src-5.4.2.tar.xz 46354192 SHA256 9fc4f720b8b5a8b8e4a7d45e13ce4d5b86756ad46fb406386637eb2de5fd5a74 SHA512 029da83969614bc9b3803c76242af62911e3c6de171b116b5cb8e2823cad0514ab705cc3fa331e042c679caeb099de4e9cd7ddea92959f675dda82533e3ad7fe WHIRLPOOL 5f352f78a779c5d042f04966a010b10af706c4db94976870721a550e3ab7eaf2695b3582c86cdcc3a11de36283e11fe65797f96e59df96fa367b16b72b5f9213
diff --git a/dev-qt/qtprintsupport/metadata.xml b/dev-qt/qtprintsupport/metadata.xml
new file mode 100644
index 000000000000..8090c86ce18c
--- /dev/null
+++ b/dev-qt/qtprintsupport/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="gles2">Use GLES 2.0 or later instead of full OpenGL</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtprintsupport/qtprintsupport-5.4.2.ebuild b/dev-qt/qtprintsupport/qtprintsupport-5.4.2.ebuild
new file mode 100644
index 000000000000..ec7526ad114f
--- /dev/null
+++ b/dev-qt/qtprintsupport/qtprintsupport-5.4.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qtbase"
+VIRTUALX_REQUIRED="test"
+inherit qt5-build
+
+DESCRIPTION="Printing support library for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="cups gles2"
+
+RDEPEND="
+ ~dev-qt/qtcore-${PV}
+ ~dev-qt/qtgui-${PV}[gles2=]
+ ~dev-qt/qtwidgets-${PV}[gles2=]
+ cups? ( >=net-print/cups-1.4 )
+"
+DEPEND="${RDEPEND}
+ test? ( ~dev-qt/qtnetwork-${PV} )
+"
+
+QT5_TARGET_SUBDIRS=(
+ src/printsupport
+ src/plugins/printsupport
+)
+
+QT5_GENTOO_CONFIG=(
+ cups
+)
+
+src_configure() {
+ local myconf=(
+ $(qt_use cups)
+ -opengl $(usex gles2 es2 desktop)
+ )
+ qt5-build_src_configure
+}
diff --git a/dev-qt/qtquick1/Manifest b/dev-qt/qtquick1/Manifest
new file mode 100644
index 000000000000..da7ae304dd67
--- /dev/null
+++ b/dev-qt/qtquick1/Manifest
@@ -0,0 +1 @@
+DIST qtquick1-opensource-src-5.4.2.tar.xz 16021692 SHA256 7773275c796e588bf3b8cd4fc6af8b9a81a98feedc8d910c1ddc85a14af8e804 SHA512 9e2ba69506f948f222a5049a0b8ec4d4f2d48aade7ed2fe27d22cde63e0b40fc286f358b5e81a3d1ce20f8fdb3b14e903442adf6f73283cf2c81cff10c293a4f WHIRLPOOL ca332f20d0d5412a1d06ff41c3ae96febb95a734227c8911279d5eb41e451a27916b3cf1da4e91793c93f9800e9c7633477ef93582f67df052c9693eac9487ed
diff --git a/dev-qt/qtquick1/metadata.xml b/dev-qt/qtquick1/metadata.xml
new file mode 100644
index 000000000000..ff6648b7ae99
--- /dev/null
+++ b/dev-qt/qtquick1/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="designer">Build plugin for <pkg>dev-qt/designer</pkg></flag>
+ <flag name="webkit">Build the WebView import for QtQuick1 (requires QtWebKit)</flag>
+ <flag name="xml">Build the XmlListModel import for QtQuick1 (requires QtXmlPatterns)</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtquick1/qtquick1-5.4.2.ebuild b/dev-qt/qtquick1/qtquick1-5.4.2.ebuild
new file mode 100644
index 000000000000..fa275e29a367
--- /dev/null
+++ b/dev-qt/qtquick1/qtquick1-5.4.2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt5-build
+
+DESCRIPTION="Legacy declarative UI module for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="designer opengl webkit xml"
+
+# see bug 542698 for pinned dev-qt/designer dependency
+DEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtgui-${PV}:5
+ >=dev-qt/qtnetwork-${PV}:5
+ >=dev-qt/qtscript-${PV}:5
+ >=dev-qt/qtsql-${PV}:5
+ >=dev-qt/qtwidgets-${PV}:5
+ designer? (
+ ~dev-qt/designer-${PV}
+ >=dev-qt/qtdeclarative-${PV}:5
+ )
+ opengl? ( >=dev-qt/qtopengl-${PV}:5 )
+ webkit? ( >=dev-qt/qtwebkit-${PV}:5 )
+ xml? ( >=dev-qt/qtxmlpatterns-${PV}:5 )
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ qt_use_disable_mod designer designer \
+ src/plugins/plugins.pro
+
+ qt_use_disable_mod opengl opengl \
+ src/imports/imports.pro \
+ tools/qml/qml.pri
+
+ qt_use_disable_mod webkit webkitwidgets \
+ src/imports/imports.pro
+
+ qt_use_disable_mod xml xmlpatterns \
+ src/declarative/declarative.pro \
+ src/declarative/util/util.pri
+
+ qt5-build_src_prepare
+}
diff --git a/dev-qt/qtquickcontrols/Manifest b/dev-qt/qtquickcontrols/Manifest
new file mode 100644
index 000000000000..31bb81808ac9
--- /dev/null
+++ b/dev-qt/qtquickcontrols/Manifest
@@ -0,0 +1 @@
+DIST qtquickcontrols-opensource-src-5.4.2.tar.xz 950732 SHA256 e720d6b029078682d788c0e3df14057cab8a3ba0ecfdc35c9b9bf6dc061bff8c SHA512 0fdcdee97552f4eec0b2d103794984a3c03393eb3f824c7717265f3e74cee5f4d6c4172dc91462f34ba51daec5efd9ffaf31721b693a33bd3c1048d36abe28de WHIRLPOOL 0dcc6fe6cbd884b1f0331331dd9e6d8ffef4ce03d6e6fe14e3657b20518d6c1f3413477593217d910ed76e2a21926dc36f37377bb32f59cbba40bb8f3238b917
diff --git a/dev-qt/qtquickcontrols/metadata.xml b/dev-qt/qtquickcontrols/metadata.xml
new file mode 100644
index 000000000000..728463d459e8
--- /dev/null
+++ b/dev-qt/qtquickcontrols/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="widgets">Enable QtWidgets support</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtquickcontrols/qtquickcontrols-5.4.2.ebuild b/dev-qt/qtquickcontrols/qtquickcontrols-5.4.2.ebuild
new file mode 100644
index 000000000000..72da41531786
--- /dev/null
+++ b/dev-qt/qtquickcontrols/qtquickcontrols-5.4.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt5-build
+
+DESCRIPTION="Set of controls used in conjunction with Qt Quick to build complete interfaces"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="widgets"
+
+DEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtdeclarative-${PV}:5
+ >=dev-qt/qtgui-${PV}:5
+ widgets? ( >=dev-qt/qtwidgets-${PV}:5 )
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ qt_use_disable_mod widgets widgets \
+ src/src.pro \
+ src/controls/Private/private.pri \
+ tests/auto/activeFocusOnTab/activeFocusOnTab.pro \
+ tests/auto/controls/controls.pro \
+ tests/auto/testplugin/testplugin.pro
+
+ qt5-build_src_prepare
+}
diff --git a/dev-qt/qtscript/Manifest b/dev-qt/qtscript/Manifest
new file mode 100644
index 000000000000..7708da76b2aa
--- /dev/null
+++ b/dev-qt/qtscript/Manifest
@@ -0,0 +1,4 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qtscript-opensource-src-5.4.2.tar.xz 2591672 SHA256 e042e444de4c759b562f6e8097a668b84bea5b9ccd8290d18931a2cc80affa47 SHA512 b04afc3f55291925d9239cd5cf4ea9a3e0b47709f77c757efed13c32530b324be294930c58dd610d4a477e5fe757e325c4daf5890512e63a4c7eaa13912ba1f4 WHIRLPOOL 0df41017c279828556caeda18fac13eba2a667fb8de3bb24d7bf3609eb77e17767c2e4096d3a507d6f3e17ade8746feb309d237630aa82eacab6ab9504d68256
diff --git a/dev-qt/qtscript/files/4.8.2-javascriptcore-x32.patch b/dev-qt/qtscript/files/4.8.2-javascriptcore-x32.patch
new file mode 100644
index 000000000000..35a157337cf9
--- /dev/null
+++ b/dev-qt/qtscript/files/4.8.2-javascriptcore-x32.patch
@@ -0,0 +1,12 @@
+diff -urN qt-everywhere-opensource-src-4.8.2.orig/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h qt-everywhere-opensource-src-4.8.2/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
+--- qt-everywhere-opensource-src-4.8.2.orig/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2012-06-14 16:17:21.328043461 +0200
++++ qt-everywhere-opensource-src-4.8.2/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2012-06-14 16:42:13.699386250 +0200
+@@ -884,7 +884,7 @@
+ #endif
+
+ #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64)
+-#if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(AIX64) || CPU(SPARC64)
++#if (CPU(X86_64) && defined(__LP64__) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(AIX64) || CPU(SPARC64)
+ #define WTF_USE_JSVALUE64 1
+ #elif CPU(ARM) || CPU(PPC64)
+ #define WTF_USE_JSVALUE32 1
diff --git a/dev-qt/qtscript/metadata.xml b/dev-qt/qtscript/metadata.xml
new file mode 100644
index 000000000000..9b505e691d02
--- /dev/null
+++ b/dev-qt/qtscript/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ <flag name="scripttools">Build the QtScriptTools module (requires QtWidgets)</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtscript/qtscript-4.8.5.ebuild b/dev-qt/qtscript/qtscript-4.8.5.ebuild
new file mode 100644
index 000000000000..af795b186498
--- /dev/null
+++ b/dev-qt/qtscript/qtscript-4.8.5.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-build
+
+DESCRIPTION="The QtScript module for the Qt toolkit"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+IUSE="iconv +jit"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=]
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/4.8.2-javascriptcore-x32.patch" )
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/script"
+
+ QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
+ include/Qt
+ include/QtCore
+ include/QtScript
+ src/3rdparty/javascriptcore
+ src/corelib"
+
+ QCONFIG_ADD="script"
+ QCONFIG_DEFINE="QT_SCRIPT"
+
+ qt4-build_pkg_setup
+}
+
+src_configure() {
+ myconf+="
+ $(qt_use iconv)
+ $(qt_use jit javascript-jit)
+ -no-xkb -no-fontconfig -no-xrender -no-xrandr -no-xfixes -no-xcursor -no-xinerama
+ -no-xshape -no-sm -no-opengl -no-nas-sound -no-dbus -no-cups -no-nis -no-gif
+ -no-libpng -no-libmng -no-libjpeg -no-openssl -system-zlib -no-webkit -no-phonon
+ -no-qt3support -no-xmlpatterns -no-freetype -no-libtiff
+ -no-accessibility -no-fontconfig -no-glib -no-opengl -no-svg
+ -no-gtkstyle"
+
+ qt4-build_src_configure
+}
+
+src_install() {
+ qt4-build_src_install
+
+ # install private headers
+ insinto "${QTHEADERDIR#${EPREFIX}}"/QtScript/private
+ find "${S}"/src/script -type f -name "*_p.h" -exec doins {} +
+}
diff --git a/dev-qt/qtscript/qtscript-4.8.6-r2.ebuild b/dev-qt/qtscript/qtscript-4.8.6-r2.ebuild
new file mode 100644
index 000000000000..93e7540a847c
--- /dev/null
+++ b/dev-qt/qtscript/qtscript-4.8.6-r2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="The QtScript module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm hppa ia64 ppc ppc64"
+else
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="+jit"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="src/script"
+
+QCONFIG_ADD="script"
+QCONFIG_DEFINE="QT_SCRIPT"
+
+multilib_src_configure() {
+ local myconf=(
+ $(qt_use jit javascript-jit)
+ -no-xkb -no-fontconfig -no-xrender -no-xrandr -no-xfixes -no-xcursor -no-xinerama
+ -no-xshape -no-sm -no-opengl -no-nas-sound -no-dbus -no-cups -no-nis -no-gif
+ -no-libpng -no-libmng -no-libjpeg -no-openssl -system-zlib -no-webkit -no-phonon
+ -no-qt3support -no-xmlpatterns -no-freetype -no-libtiff
+ -no-accessibility -no-fontconfig -no-glib -no-opengl -no-svg
+ -no-gtkstyle
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtscript/qtscript-4.8.7.ebuild b/dev-qt/qtscript/qtscript-4.8.7.ebuild
new file mode 100644
index 000000000000..22954160520e
--- /dev/null
+++ b/dev-qt/qtscript/qtscript-4.8.7.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="The QtScript module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="+jit"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="src/script"
+
+QCONFIG_ADD="script"
+QCONFIG_DEFINE="QT_SCRIPT"
+
+multilib_src_configure() {
+ local myconf=(
+ $(qt_use jit javascript-jit)
+ -no-xkb -no-fontconfig -no-xrender -no-xrandr -no-xfixes -no-xcursor -no-xinerama
+ -no-xshape -no-sm -no-opengl -no-nas-sound -no-dbus -no-cups -no-nis -no-gif
+ -no-libpng -no-libmng -no-libjpeg -no-openssl -system-zlib -no-webkit -no-phonon
+ -no-qt3support -no-xmlpatterns -no-freetype -no-libtiff
+ -no-accessibility -no-fontconfig -no-glib -no-opengl -no-svg
+ -no-gtkstyle
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtscript/qtscript-5.4.2.ebuild b/dev-qt/qtscript/qtscript-5.4.2.ebuild
new file mode 100644
index 000000000000..a0aa0dc6d66b
--- /dev/null
+++ b/dev-qt/qtscript/qtscript-5.4.2.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt5-build
+
+DESCRIPTION="Application scripting library for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="scripttools"
+
+DEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ scripttools? (
+ >=dev-qt/qtgui-${PV}:5
+ >=dev-qt/qtwidgets-${PV}:5
+ )
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ qt_use_disable_mod scripttools widgets \
+ src/src.pro
+
+ qt5-build_src_prepare
+}
diff --git a/dev-qt/qtsensors/Manifest b/dev-qt/qtsensors/Manifest
new file mode 100644
index 000000000000..d21b99e1b170
--- /dev/null
+++ b/dev-qt/qtsensors/Manifest
@@ -0,0 +1 @@
+DIST qtsensors-opensource-src-5.4.2.tar.xz 1982708 SHA256 8e6d961df033733a08b3d050515b9aacf7846c643fe5789c42fc55df96dc5cf9 SHA512 6f415bef4fd70aad0be00a097cf6330a1c501a072dc21459a8e7d70c732e7bdf381409eb9b868c46b5ebd7d5285d1f49e5a84dcf86c64f3e06dc553685f73466 WHIRLPOOL 79847c6b8c5dc4353888ea8a345a26a6f1a8490a6a701719e6330ee01562781fd01f544caa18af19927ffd9c1444dfaa2b54295ec344b7d828bc7094ac3eee66
diff --git a/dev-qt/qtsensors/metadata.xml b/dev-qt/qtsensors/metadata.xml
new file mode 100644
index 000000000000..bee66c84d291
--- /dev/null
+++ b/dev-qt/qtsensors/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="qml">Build QML bindings</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtsensors/qtsensors-5.4.2.ebuild b/dev-qt/qtsensors/qtsensors-5.4.2.ebuild
new file mode 100644
index 000000000000..8b6fd4a1955c
--- /dev/null
+++ b/dev-qt/qtsensors/qtsensors-5.4.2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt5-build
+
+DESCRIPTION="Hardware sensor access library for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="qml"
+
+RDEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ qml? ( >=dev-qt/qtdeclarative-${PV}:5 )
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ qt_use_disable_mod qml quick \
+ src/src.pro
+
+ qt5-build_src_prepare
+}
diff --git a/dev-qt/qtserialport/Manifest b/dev-qt/qtserialport/Manifest
new file mode 100644
index 000000000000..6f4aaef8d7b4
--- /dev/null
+++ b/dev-qt/qtserialport/Manifest
@@ -0,0 +1 @@
+DIST qtserialport-opensource-src-5.4.2.tar.xz 262316 SHA256 93cd414e809beed424eee018338e84742509fc4bc78e5649fbaf370a562ed7c0 SHA512 e52c0d10f51af7546a77372276c20c008c647d1d43c4a267f13e484d88d0cbbb565fd1b93a9526b721357f6c6caaedb458d888c87d6826346d417eafdf5c4166 WHIRLPOOL 567e30cd8f3ea47ef401b7564f595b4b8359d4b1278bd3648c0b1dcaad5859e0594092176cd31bd314093cd39c35e6978a5b98e5916345b38edeed96c5e69cbb
diff --git a/dev-qt/qtserialport/metadata.xml b/dev-qt/qtserialport/metadata.xml
new file mode 100644
index 000000000000..afb3b434585b
--- /dev/null
+++ b/dev-qt/qtserialport/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtserialport/qtserialport-5.4.2.ebuild b/dev-qt/qtserialport/qtserialport-5.4.2.ebuild
new file mode 100644
index 000000000000..8acbb4671015
--- /dev/null
+++ b/dev-qt/qtserialport/qtserialport-5.4.2.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt5-build
+
+DESCRIPTION="Serial port abstraction library for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+fi
+
+IUSE=""
+
+DEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ virtual/udev
+"
+RDEPEND="${DEPEND}"
diff --git a/dev-qt/qtsingleapplication/Manifest b/dev-qt/qtsingleapplication/Manifest
new file mode 100644
index 000000000000..d90810f75f22
--- /dev/null
+++ b/dev-qt/qtsingleapplication/Manifest
@@ -0,0 +1,2 @@
+DIST qt-solutions-20130904.tar.xz 751536 SHA256 fc27b49883269a21ced2d3cb543eb78e79223afe5933bbc7d3194146f72f8884 SHA512 9e50d0a7d9fee08a72a3c6dee1d3fe45d04ae0930a967d81eff457f6c0ff53ac8449ef1d8241a5ce75ca2dcf9f4a2fe27b899647748d11060c3ab5767c3d0e75 WHIRLPOOL b933a301de905cffab8393a7adf055ed2f5198f1572657f5993e016746340d9862017982308ac11310add272ae1cd5c3435054dce2dd9d7ee5a9c92baf1878c2
+DIST qt-solutions-20150629.tar.xz 710488 SHA256 cfa88a67c8396878eaa98f39b7648482fabb73988549cc404816c29212cf6503 SHA512 a95ed58f0218cd90d734a40eedd173b896fa0138ad235f3157d7bee538b16c5f385d93bae483fd22267f2984389b9940bb85ba0cd3d25c16124d56abb39568f5 WHIRLPOOL 23a273cfa2d0bc3834487c9e325c73d0038877c5a5085493ceb37ee5dc03cc4d2cddf4f46f5a89045fcbfe7f6dd03b678d56f3167fb750374d44879f11ded8b7
diff --git a/dev-qt/qtsingleapplication/files/2.6.1_p20130904-no-gui.patch b/dev-qt/qtsingleapplication/files/2.6.1_p20130904-no-gui.patch
new file mode 100644
index 000000000000..19019e2892a4
--- /dev/null
+++ b/dev-qt/qtsingleapplication/files/2.6.1_p20130904-no-gui.patch
@@ -0,0 +1,67 @@
+From f66352d6c2918123466bd72aee2118b9167562af Mon Sep 17 00:00:00 2001
+From: Davide Pesavento <davidepesa@gmail.com>
+Date: Sat, 28 Dec 2013 16:43:18 +0100
+Subject: [PATCH] no gui
+
+---
+ buildlib/buildlib.pro | 4 +++-
+ src/qtsingleapplication.pri | 11 +++++------
+ src/qtsinglecoreapplication.pri | 2 +-
+ 3 files changed, 9 insertions(+), 8 deletions(-)
+
+diff --git a/buildlib/buildlib.pro b/buildlib/buildlib.pro
+index 37dddcd..f7c6508 100644
+--- a/buildlib/buildlib.pro
++++ b/buildlib/buildlib.pro
+@@ -2,7 +2,9 @@ TEMPLATE=lib
+ CONFIG += qt dll qtsingleapplication-buildlib
+ mac:CONFIG += absolute_library_soname
+ win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release build_all
+-include(../src/qtsingleapplication.pri)
++include(../common.pri)
++include(../src/qtsinglecoreapplication.pri)
++exists(../config.pri):!infile(../config.pri, QTSA_NO_GUI, yes):include(../src/qtsingleapplication.pri)
+ TARGET = $$QTSINGLEAPPLICATION_LIBNAME
+ DESTDIR = $$QTSINGLEAPPLICATION_LIBDIR
+ win32 {
+diff --git a/src/qtsingleapplication.pri b/src/qtsingleapplication.pri
+index 02c9e5b..772924d 100644
+--- a/src/qtsingleapplication.pri
++++ b/src/qtsingleapplication.pri
+@@ -1,15 +1,14 @@
+-include(../common.pri)
+-INCLUDEPATH += $$PWD
+-DEPENDPATH += $$PWD
+-QT *= network
++INCLUDEPATH *= $$PWD
++DEPENDPATH *= $$PWD
++QT *= gui network
+ greaterThan(QT_MAJOR_VERSION, 4): QT *= widgets
+ CONFIG *= qtlockedfile
+
+ qtsingleapplication-uselib:!qtsingleapplication-buildlib {
+ LIBS += -L$$QTSINGLEAPPLICATION_LIBDIR -l$$QTSINGLEAPPLICATION_LIBNAME
+ } else {
+- SOURCES += $$PWD/qtsingleapplication.cpp $$PWD/qtlocalpeer.cpp
+- HEADERS += $$PWD/qtsingleapplication.h $$PWD/qtlocalpeer.h
++ SOURCES += $$PWD/qtsingleapplication.cpp
++ HEADERS += $$PWD/qtsingleapplication.h
+ }
+
+ win32 {
+diff --git a/src/qtsinglecoreapplication.pri b/src/qtsinglecoreapplication.pri
+index f5b8414..bf14a3f 100644
+--- a/src/qtsinglecoreapplication.pri
++++ b/src/qtsinglecoreapplication.pri
+@@ -3,7 +3,7 @@ DEPENDPATH += $$PWD
+ HEADERS += $$PWD/qtsinglecoreapplication.h $$PWD/qtlocalpeer.h
+ SOURCES += $$PWD/qtsinglecoreapplication.cpp $$PWD/qtlocalpeer.cpp
+
+-QT *= network
++QT = core network
+ CONFIG *= qtlockedfile
+
+ win32:contains(TEMPLATE, lib):contains(CONFIG, shared) {
+--
+1.8.5.2
+
diff --git a/dev-qt/qtsingleapplication/files/2.6.1_p20130904-unbundle-qtlockedfile.patch b/dev-qt/qtsingleapplication/files/2.6.1_p20130904-unbundle-qtlockedfile.patch
new file mode 100644
index 000000000000..93c78fab9bab
--- /dev/null
+++ b/dev-qt/qtsingleapplication/files/2.6.1_p20130904-unbundle-qtlockedfile.patch
@@ -0,0 +1,81 @@
+From 62210d463f87abb0584ce699915e1845cacaa480 Mon Sep 17 00:00:00 2001
+From: Davide Pesavento <davidepesa@gmail.com>
+Date: Sat, 28 Dec 2013 16:33:15 +0100
+Subject: [PATCH] unbundle qtlockedfile
+
+---
+ src/qtlocalpeer.cpp | 11 +----------
+ src/qtlocalpeer.h | 2 +-
+ src/qtsingleapplication.pri | 1 +
+ src/qtsinglecoreapplication.pri | 1 +
+ 4 files changed, 4 insertions(+), 11 deletions(-)
+
+diff --git a/src/qtlocalpeer.cpp b/src/qtlocalpeer.cpp
+index 332b064..f17e662 100644
+--- a/src/qtlocalpeer.cpp
++++ b/src/qtlocalpeer.cpp
+@@ -55,15 +55,6 @@ static PProcessIdToSessionId pProcessIdToSessionId = 0;
+ #include <unistd.h>
+ #endif
+
+-namespace QtLP_Private {
+-#include "qtlockedfile.cpp"
+-#if defined(Q_OS_WIN)
+-#include "qtlockedfile_win.cpp"
+-#else
+-#include "qtlockedfile_unix.cpp"
+-#endif
+-}
+-
+ const char* QtLocalPeer::ack = "ack";
+
+ QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId)
+@@ -114,7 +105,7 @@ bool QtLocalPeer::isClient()
+ if (lockFile.isLocked())
+ return false;
+
+- if (!lockFile.lock(QtLP_Private::QtLockedFile::WriteLock, false))
++ if (!lockFile.lock(QtLockedFile::WriteLock, false))
+ return true;
+
+ bool res = server->listen(socketName);
+diff --git a/src/qtlocalpeer.h b/src/qtlocalpeer.h
+index 1b533b1..1127735 100644
+--- a/src/qtlocalpeer.h
++++ b/src/qtlocalpeer.h
+@@ -68,7 +68,7 @@ protected:
+ QString id;
+ QString socketName;
+ QLocalServer* server;
+- QtLP_Private::QtLockedFile lockFile;
++ QtLockedFile lockFile;
+
+ private:
+ static const char* ack;
+diff --git a/src/qtsingleapplication.pri b/src/qtsingleapplication.pri
+index 6f2bced..02c9e5b 100644
+--- a/src/qtsingleapplication.pri
++++ b/src/qtsingleapplication.pri
+@@ -3,6 +3,7 @@ INCLUDEPATH += $$PWD
+ DEPENDPATH += $$PWD
+ QT *= network
+ greaterThan(QT_MAJOR_VERSION, 4): QT *= widgets
++CONFIG *= qtlockedfile
+
+ qtsingleapplication-uselib:!qtsingleapplication-buildlib {
+ LIBS += -L$$QTSINGLEAPPLICATION_LIBDIR -l$$QTSINGLEAPPLICATION_LIBNAME
+diff --git a/src/qtsinglecoreapplication.pri b/src/qtsinglecoreapplication.pri
+index d2d6cc3..f5b8414 100644
+--- a/src/qtsinglecoreapplication.pri
++++ b/src/qtsinglecoreapplication.pri
+@@ -4,6 +4,7 @@ HEADERS += $$PWD/qtsinglecoreapplication.h $$PWD/qtlocalpeer.h
+ SOURCES += $$PWD/qtsinglecoreapplication.cpp $$PWD/qtlocalpeer.cpp
+
+ QT *= network
++CONFIG *= qtlockedfile
+
+ win32:contains(TEMPLATE, lib):contains(CONFIG, shared) {
+ DEFINES += QT_QTSINGLECOREAPPLICATION_EXPORT=__declspec(dllexport)
+--
+1.8.5.2
+
diff --git a/dev-qt/qtsingleapplication/files/qtsingleapplication.prf b/dev-qt/qtsingleapplication/files/qtsingleapplication.prf
new file mode 100644
index 000000000000..3171424fd04f
--- /dev/null
+++ b/dev-qt/qtsingleapplication/files/qtsingleapplication.prf
@@ -0,0 +1,9 @@
+INCLUDEPATH *= $$[QT_INSTALL_HEADERS]/QtSolutions
+greaterThan(QT_MAJOR_VERSION, 4) {
+LIBS *= -lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication-2.6
+QT *= widgets
+} else {
+LIBS *= -lQtSolutions_SingleApplication-2.6
+}
+QT *= network
+CONFIG *= qtlockedfile
diff --git a/dev-qt/qtsingleapplication/files/qtsinglecoreapplication.prf b/dev-qt/qtsingleapplication/files/qtsinglecoreapplication.prf
new file mode 100644
index 000000000000..87d2a9583dbd
--- /dev/null
+++ b/dev-qt/qtsingleapplication/files/qtsinglecoreapplication.prf
@@ -0,0 +1,8 @@
+INCLUDEPATH *= $$[QT_INSTALL_HEADERS]/QtSolutions
+greaterThan(QT_MAJOR_VERSION, 4) {
+LIBS *= -lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication-2.6
+} else {
+LIBS *= -lQtSolutions_SingleApplication-2.6
+}
+QT *= network
+CONFIG *= qtlockedfile
diff --git a/dev-qt/qtsingleapplication/metadata.xml b/dev-qt/qtsingleapplication/metadata.xml
new file mode 100644
index 000000000000..ab02f994fdd2
--- /dev/null
+++ b/dev-qt/qtsingleapplication/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+</pkgmetadata>
diff --git a/dev-qt/qtsingleapplication/qtsingleapplication-2.6.1_p20130904-r1.ebuild b/dev-qt/qtsingleapplication/qtsingleapplication-2.6.1_p20130904-r1.ebuild
new file mode 100644
index 000000000000..c49a4e453f33
--- /dev/null
+++ b/dev-qt/qtsingleapplication/qtsingleapplication-2.6.1_p20130904-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-r2
+
+MY_P=qt-solutions-${PV#*_p}
+
+DESCRIPTION="Qt library to start applications only once per user"
+HOMEPAGE="https://code.qt.io/cgit/qt-solutions/qt-solutions.git/"
+SRC_URI="http://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.xz"
+
+LICENSE="|| ( LGPL-2.1 GPL-3 )"
+SLOT="0"
+KEYWORDS="amd64 arm ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
+IUSE="X doc"
+
+DEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtlockedfile
+ X? ( dev-qt/qtgui:4 )
+"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}/${PN}
+
+PATCHES=(
+ "${FILESDIR}/${PV}-unbundle-qtlockedfile.patch"
+ "${FILESDIR}/${PV}-no-gui.patch"
+)
+
+src_prepare() {
+ qt4-r2_src_prepare
+
+ echo 'SOLUTIONS_LIBRARY = yes' > config.pri
+ use X || echo 'QTSA_NO_GUI = yes' >> config.pri
+
+ sed -i -e "s/-head/-${PV%.*}/" common.pri || die
+ sed -i -e '/SUBDIRS+=examples/d' ${PN}.pro || die
+
+ # to ensure unbundling
+ rm -f src/qtlockedfile*
+}
+
+src_install() {
+ dodoc README.TXT
+
+ dolib.so lib/*
+ insinto /usr/include/qt4/QtSolutions
+ doins src/qtsinglecoreapplication.h
+ use X && doins src/{QtSingleApplication,${PN}.h}
+
+ insinto /usr/share/qt4/mkspecs/features
+ doins "${FILESDIR}"/qtsinglecoreapplication.prf
+ use X && doins "${FILESDIR}"/${PN}.prf
+
+ use doc && dohtml -r doc/html
+}
diff --git a/dev-qt/qtsingleapplication/qtsingleapplication-2.6.1_p20150629.ebuild b/dev-qt/qtsingleapplication/qtsingleapplication-2.6.1_p20150629.ebuild
new file mode 100644
index 000000000000..d8bbdf9753e3
--- /dev/null
+++ b/dev-qt/qtsingleapplication/qtsingleapplication-2.6.1_p20150629.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multibuild qmake-utils
+
+MY_P=qt-solutions-${PV#*_p}
+
+DESCRIPTION="Qt library to start applications only once per user"
+HOMEPAGE="https://code.qt.io/cgit/qt-solutions/qt-solutions.git/"
+SRC_URI="http://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.xz"
+
+LICENSE="|| ( LGPL-2.1 GPL-3 )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc +qt4 qt5 X"
+
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+DEPEND="
+ dev-qt/qtlockedfile[qt4?,qt5?]
+ qt4? (
+ dev-qt/qtcore:4
+ X? ( dev-qt/qtgui:4 )
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtnetwork:5
+ X? (
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ )
+ )
+"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}/${PN}
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/2.6.1_p20130904-unbundle-qtlockedfile.patch"
+ epatch "${FILESDIR}/2.6.1_p20130904-no-gui.patch"
+
+ echo 'SOLUTIONS_LIBRARY = yes' > config.pri
+ use X || echo 'QTSA_NO_GUI = yes' >> config.pri
+
+ sed -i -e "s/-head/-${PV%.*}/" common.pri || die
+ sed -i -e '/SUBDIRS+=examples/d' ${PN}.pro || die
+
+ # to ensure unbundling
+ rm -f src/qtlockedfile*
+
+ multibuild_copy_sources
+}
+
+src_configure() {
+ myconfigure() {
+ if [[ ${MULTIBUILD_VARIANT} == qt4 ]]; then
+ eqmake4
+ fi
+ if [[ ${MULTIBUILD_VARIANT} == qt5 ]]; then
+ eqmake5
+ fi
+ }
+ multibuild_foreach_variant run_in_build_dir myconfigure
+}
+
+src_compile() {
+ multibuild_foreach_variant run_in_build_dir default
+}
+
+src_install() {
+ dodoc README.TXT
+ use doc && dodoc -r doc/html
+
+ myinstall() {
+ # libraries
+ dolib.so lib/*
+
+ # headers
+ insinto "$(${MULTIBUILD_VARIANT}_get_headerdir)"/QtSolutions
+ doins src/qtsinglecoreapplication.h
+ use X && doins src/{QtSingleApplication,${PN}.h}
+
+ # .prf files
+ insinto "$(${MULTIBUILD_VARIANT}_get_mkspecsdir)"/features
+ doins "${FILESDIR}"/qtsinglecoreapplication.prf
+ use X && doins "${FILESDIR}"/${PN}.prf
+ }
+ multibuild_foreach_variant run_in_build_dir myinstall
+}
diff --git a/dev-qt/qtsql/Manifest b/dev-qt/qtsql/Manifest
new file mode 100644
index 000000000000..48eaa826faf5
--- /dev/null
+++ b/dev-qt/qtsql/Manifest
@@ -0,0 +1,4 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qtbase-opensource-src-5.4.2.tar.xz 46354192 SHA256 9fc4f720b8b5a8b8e4a7d45e13ce4d5b86756ad46fb406386637eb2de5fd5a74 SHA512 029da83969614bc9b3803c76242af62911e3c6de171b116b5cb8e2823cad0514ab705cc3fa331e042c679caeb099de4e9cd7ddea92959f675dda82533e3ad7fe WHIRLPOOL 5f352f78a779c5d042f04966a010b10af706c4db94976870721a550e3ab7eaf2695b3582c86cdcc3a11de36283e11fe65797f96e59df96fa367b16b72b5f9213
diff --git a/dev-qt/qtsql/metadata.xml b/dev-qt/qtsql/metadata.xml
new file mode 100644
index 000000000000..dc8562cfec93
--- /dev/null
+++ b/dev-qt/qtsql/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ <flag name="qt3support">Enable the Qt3Support libraries for Qt4</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtsql/qtsql-4.8.5.ebuild b/dev-qt/qtsql/qtsql-4.8.5.ebuild
new file mode 100644
index 000000000000..6bc8acc2fefd
--- /dev/null
+++ b/dev-qt/qtsql/qtsql-4.8.5.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit multilib qt4-build
+
+DESCRIPTION="The SQL module for the Qt toolkit"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+IUSE="firebird freetds mysql oci8 odbc postgres qt3support +sqlite"
+
+REQUIRED_USE="
+ || ( firebird freetds mysql oci8 odbc postgres sqlite )
+"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,qt3support=]
+ firebird? ( dev-db/firebird )
+ freetds? ( dev-db/freetds )
+ mysql? ( virtual/mysql )
+ oci8? ( dev-db/oracle-instantclient-basic )
+ odbc? ( || ( dev-db/unixODBC dev-db/libiodbc ) )
+ postgres? ( dev-db/postgresql )
+ sqlite? ( dev-db/sqlite:3 )
+"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/sql
+ src/plugins/sqldrivers"
+
+ QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
+ include/Qt
+ include/QtCore
+ include/QtSql
+ src/src.pro
+ src/corelib
+ src/plugins
+ src/tools/tools.pro"
+
+ qt4-build_pkg_setup
+}
+
+src_configure() {
+ myconf+="
+ $(qt_use firebird sql-ibase plugin)
+ $(qt_use freetds sql-tds plugin)
+ $(qt_use mysql sql-mysql plugin) $(use mysql && echo "-I${EPREFIX}/usr/include/mysql -L${EPREFIX}/usr/$(get_libdir)/mysql")
+ $(qt_use oci8 sql-oci plugin) $(use oci8 && echo "-I${ORACLE_HOME}/include -L${ORACLE_HOME}/$(get_libdir)")
+ $(qt_use odbc sql-odbc plugin) $(use odbc && echo "-I${EPREFIX}/usr/include/iodbc")
+ $(qt_use postgres sql-psql plugin) $(use postgres && echo "-I${EPREFIX}/usr/include/postgresql/pgsql")
+ $(qt_use sqlite sql-sqlite plugin) $(use sqlite && echo -system-sqlite)
+ -no-sql-db2
+ -no-sql-sqlite2
+ -no-sql-symsql
+ $(qt_use qt3support)
+ -no-accessibility -no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon
+ -no-phonon-backend -no-svg -no-webkit -no-script -no-scripttools -no-declarative
+ -system-zlib -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg -no-openssl
+ -no-cups -no-dbus -no-gtkstyle -no-nas-sound -no-opengl
+ -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes
+ -no-xrandr -no-xrender -no-mitshm -no-fontconfig -no-freetype -no-xinput -no-xkb
+ -no-glib"
+
+ qt4-build_src_configure
+}
diff --git a/dev-qt/qtsql/qtsql-4.8.6-r1.ebuild b/dev-qt/qtsql/qtsql-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..06104dc2588a
--- /dev/null
+++ b/dev-qt/qtsql/qtsql-4.8.6-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib qt4-build-multilib
+
+DESCRIPTION="The SQL module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm hppa ia64 ppc ppc64"
+else
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="freetds mysql oci8 odbc postgres qt3support +sqlite"
+
+REQUIRED_USE="
+ || ( freetds mysql oci8 odbc postgres sqlite )
+"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,qt3support=,${MULTILIB_USEDEP}]
+ freetds? ( dev-db/freetds )
+ mysql? ( >=virtual/mysql-5.6-r2:=[${MULTILIB_USEDEP}] )
+ oci8? ( >=dev-db/oracle-instantclient-basic-11.2.0.4[${MULTILIB_USEDEP}] )
+ odbc? ( || (
+ >=dev-db/unixODBC-2.3.2-r2[${MULTILIB_USEDEP}]
+ >=dev-db/libiodbc-3.52.8-r2[${MULTILIB_USEDEP}]
+ ) )
+ postgres? ( dev-db/postgresql:* )
+ sqlite? ( >=dev-db/sqlite-3.8.3:3[${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="
+ src/sql
+ src/plugins/sqldrivers"
+
+multilib_src_configure() {
+ local myconf=(
+ $(qt_native_use freetds sql-tds plugin)
+ $(qt_use mysql sql-mysql plugin) $(use mysql && echo "-I${EPREFIX}/usr/include/mysql -L${EPREFIX}/usr/$(get_libdir)/mysql")
+ $(qt_use oci8 sql-oci plugin) $(use oci8 && echo "-I${ORACLE_HOME}/include -L${ORACLE_HOME}/$(get_libdir)")
+ $(qt_use odbc sql-odbc plugin) $(use odbc && echo "-I${EPREFIX}/usr/include/iodbc")
+ $(qt_native_use postgres sql-psql plugin) $(use postgres && multilib_is_native_abi && echo "-I${EPREFIX}/usr/include/postgresql/pgsql")
+ $(qt_use sqlite sql-sqlite plugin) $(use sqlite && echo -system-sqlite)
+ -no-sql-db2
+ -no-sql-ibase
+ -no-sql-sqlite2
+ -no-sql-symsql
+ $(qt_use qt3support)
+ -no-accessibility -no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon
+ -no-phonon-backend -no-svg -no-webkit -no-script -no-scripttools -no-declarative
+ -system-zlib -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg -no-openssl
+ -no-cups -no-dbus -no-gtkstyle -no-nas-sound -no-opengl
+ -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes
+ -no-xrandr -no-xrender -no-mitshm -no-fontconfig -no-freetype -no-xinput -no-xkb
+ -no-glib
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtsql/qtsql-4.8.7.ebuild b/dev-qt/qtsql/qtsql-4.8.7.ebuild
new file mode 100644
index 000000000000..1db82d0777a2
--- /dev/null
+++ b/dev-qt/qtsql/qtsql-4.8.7.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib qt4-build-multilib
+
+DESCRIPTION="The SQL module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="freetds mysql oci8 odbc postgres qt3support +sqlite"
+
+REQUIRED_USE="
+ || ( freetds mysql oci8 odbc postgres sqlite )
+"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,qt3support=,${MULTILIB_USEDEP}]
+ freetds? ( dev-db/freetds )
+ mysql? ( >=virtual/mysql-5.6-r2:=[${MULTILIB_USEDEP}] )
+ oci8? ( >=dev-db/oracle-instantclient-basic-11.2.0.4[${MULTILIB_USEDEP}] )
+ odbc? ( || (
+ >=dev-db/unixODBC-2.3.2-r2[${MULTILIB_USEDEP}]
+ >=dev-db/libiodbc-3.52.8-r2[${MULTILIB_USEDEP}]
+ ) )
+ postgres? ( dev-db/postgresql:* )
+ sqlite? ( >=dev-db/sqlite-3.8.3:3[${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="
+ src/sql
+ src/plugins/sqldrivers"
+
+multilib_src_configure() {
+ local myconf=(
+ $(qt_native_use freetds sql-tds plugin)
+ $(qt_use mysql sql-mysql plugin) $(use mysql && echo "-I${EPREFIX}/usr/include/mysql -L${EPREFIX}/usr/$(get_libdir)/mysql")
+ $(qt_use oci8 sql-oci plugin) $(use oci8 && echo "-I${ORACLE_HOME}/include -L${ORACLE_HOME}/$(get_libdir)")
+ $(qt_use odbc sql-odbc plugin) $(use odbc && echo "-I${EPREFIX}/usr/include/iodbc")
+ $(qt_native_use postgres sql-psql plugin) $(use postgres && multilib_is_native_abi && echo "-I${EPREFIX}/usr/include/postgresql/pgsql")
+ $(qt_use sqlite sql-sqlite plugin) $(use sqlite && echo -system-sqlite)
+ -no-sql-db2
+ -no-sql-ibase
+ -no-sql-sqlite2
+ -no-sql-symsql
+ $(qt_use qt3support)
+ -no-accessibility -no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon
+ -no-phonon-backend -no-svg -no-webkit -no-script -no-scripttools -no-declarative
+ -system-zlib -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg -no-openssl
+ -no-cups -no-dbus -no-gtkstyle -no-nas-sound -no-opengl
+ -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes
+ -no-xrandr -no-xrender -no-mitshm -no-fontconfig -no-freetype -no-xinput -no-xkb
+ -no-glib
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtsql/qtsql-5.4.2.ebuild b/dev-qt/qtsql/qtsql-5.4.2.ebuild
new file mode 100644
index 000000000000..2f6e79636b1b
--- /dev/null
+++ b/dev-qt/qtsql/qtsql-5.4.2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qtbase"
+inherit multilib qt5-build
+
+DESCRIPTION="SQL abstraction library for the Qt5 tooolkit"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="freetds mysql oci8 odbc postgres +sqlite"
+
+REQUIRED_USE="
+ || ( freetds mysql oci8 odbc postgres sqlite )
+"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}
+ freetds? ( dev-db/freetds )
+ mysql? ( virtual/mysql:= )
+ oci8? ( dev-db/oracle-instantclient-basic )
+ odbc? ( || ( dev-db/unixODBC dev-db/libiodbc ) )
+ postgres? ( dev-db/postgresql:* )
+ sqlite? ( dev-db/sqlite:3 )
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/sql
+ src/plugins/sqldrivers
+)
+
+src_configure() {
+ local myconf=(
+ $(qt_use freetds sql-tds plugin)
+ $(qt_use mysql sql-mysql plugin)
+ $(qt_use oci8 sql-oci plugin)
+ $(qt_use odbc sql-odbc plugin)
+ $(qt_use postgres sql-psql plugin)
+ $(qt_use sqlite sql-sqlite plugin)
+ $(use sqlite && echo -system-sqlite)
+ )
+
+ use mysql && myconf+=("-I${EPREFIX}/usr/include/mysql" "-L${EPREFIX}/usr/$(get_libdir)/mysql")
+ use oci8 && myconf+=("-I${ORACLE_HOME}/include" "-L${ORACLE_HOME}/$(get_libdir)")
+ use odbc && myconf+=("-I${EPREFIX}/usr/include/iodbc")
+ use postgres && myconf+=("-I${EPREFIX}/usr/include/postgresql/pgsql")
+
+ qt5-build_src_configure
+}
diff --git a/dev-qt/qtsvg/Manifest b/dev-qt/qtsvg/Manifest
new file mode 100644
index 000000000000..7f78bb5ec127
--- /dev/null
+++ b/dev-qt/qtsvg/Manifest
@@ -0,0 +1,4 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qtsvg-opensource-src-5.4.2.tar.xz 1793936 SHA256 7f2a66a9bc55eace254505475a31b4d53f0baa74b65a81da59bb93122eb35eb7 SHA512 78d389a02b8f713b34b34b464f4b7886545baa01c6eeb99dc03a7c467cb1ec72a16dc1eeb03e1b1b622354eeb873aa6a4aba2f2c9b603c2910ba84949a5311f7 WHIRLPOOL 4a61d94cf9ea118bc51562e3cbb0a783f515d80ae81092e98fcf17c6d76b6f94376c7313271e937b145f057be99438fb16a66bc62109641437a96154316f5705
diff --git a/dev-qt/qtsvg/metadata.xml b/dev-qt/qtsvg/metadata.xml
new file mode 100644
index 000000000000..258aee1d6e0d
--- /dev/null
+++ b/dev-qt/qtsvg/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtsvg/qtsvg-4.8.5.ebuild b/dev-qt/qtsvg/qtsvg-4.8.5.ebuild
new file mode 100644
index 000000000000..23b3df6cce58
--- /dev/null
+++ b/dev-qt/qtsvg/qtsvg-4.8.5.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-build
+
+DESCRIPTION="The SVG module for the Qt toolkit"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+IUSE="+accessibility"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=]
+ ~dev-qt/qtgui-${PV}[accessibility=,aqua=,debug=]
+ sys-libs/zlib
+"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/svg
+ src/plugins/imageformats/svg
+ src/plugins/iconengines/svgiconengine"
+
+ QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
+ include/QtSvg
+ include/Qt
+ include/QtGui
+ include/QtCore
+ include/QtXml
+ src/corelib
+ src/gui
+ src/plugins
+ src/xml
+ src/3rdparty"
+
+ QCONFIG_ADD="svg"
+ QCONFIG_DEFINE="QT_SVG"
+
+ qt4-build_pkg_setup
+}
+
+src_configure() {
+ myconf+="
+ -svg
+ $(qt_use accessibility)
+ -no-xkb -no-xrender
+ -no-xrandr -no-xfixes -no-xcursor -no-xinerama -no-xshape -no-sm
+ -no-opengl -no-nas-sound -no-dbus -no-cups -no-nis -no-gif -no-libpng
+ -no-libmng -no-libjpeg -no-openssl -system-zlib -no-webkit -no-phonon
+ -no-qt3support -no-xmlpatterns -no-freetype -no-libtiff
+ -no-fontconfig -no-glib -no-gtkstyle"
+
+ qt4-build_src_configure
+}
diff --git a/dev-qt/qtsvg/qtsvg-4.8.6-r1.ebuild b/dev-qt/qtsvg/qtsvg-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..be2ed413fc32
--- /dev/null
+++ b/dev-qt/qtsvg/qtsvg-4.8.6-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="The SVG module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm hppa ia64 ppc ppc64"
+else
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="+accessibility"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[accessibility=,aqua=,debug=,${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="
+ src/svg
+ src/plugins/imageformats/svg
+ src/plugins/iconengines/svgiconengine"
+
+QCONFIG_ADD="svg"
+QCONFIG_DEFINE="QT_SVG"
+
+multilib_src_configure() {
+ local myconf=(
+ -svg
+ $(qt_use accessibility)
+ -no-xkb -no-xrender
+ -no-xrandr -no-xfixes -no-xcursor -no-xinerama -no-xshape -no-sm
+ -no-opengl -no-nas-sound -no-dbus -no-cups -no-nis -no-gif -no-libpng
+ -no-libmng -no-libjpeg -no-openssl -system-zlib -no-webkit -no-phonon
+ -no-qt3support -no-xmlpatterns -no-freetype -no-libtiff
+ -no-fontconfig -no-glib -no-gtkstyle
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtsvg/qtsvg-4.8.7.ebuild b/dev-qt/qtsvg/qtsvg-4.8.7.ebuild
new file mode 100644
index 000000000000..82a19294be9e
--- /dev/null
+++ b/dev-qt/qtsvg/qtsvg-4.8.7.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="The SVG module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="+accessibility"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[accessibility=,aqua=,debug=,${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="
+ src/svg
+ src/plugins/imageformats/svg
+ src/plugins/iconengines/svgiconengine"
+
+QCONFIG_ADD="svg"
+QCONFIG_DEFINE="QT_SVG"
+
+multilib_src_configure() {
+ local myconf=(
+ -svg
+ $(qt_use accessibility)
+ -no-xkb -no-xrender
+ -no-xrandr -no-xfixes -no-xcursor -no-xinerama -no-xshape -no-sm
+ -no-opengl -no-nas-sound -no-dbus -no-cups -no-nis -no-gif -no-libpng
+ -no-libmng -no-libjpeg -no-openssl -system-zlib -no-webkit -no-phonon
+ -no-qt3support -no-xmlpatterns -no-freetype -no-libtiff
+ -no-fontconfig -no-glib -no-gtkstyle
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtsvg/qtsvg-5.4.2.ebuild b/dev-qt/qtsvg/qtsvg-5.4.2.ebuild
new file mode 100644
index 000000000000..43abaeeb978f
--- /dev/null
+++ b/dev-qt/qtsvg/qtsvg-5.4.2.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt5-build
+
+DESCRIPTION="SVG rendering library for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE=""
+
+RDEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtgui-${PV}:5
+ >=dev-qt/qtwidgets-${PV}:5
+ >=sys-libs/zlib-1.2.5
+"
+DEPEND="${RDEPEND}
+ test? ( >=dev-qt/qtxml-${PV}:5 )
+"
diff --git a/dev-qt/qttest/Manifest b/dev-qt/qttest/Manifest
new file mode 100644
index 000000000000..48eaa826faf5
--- /dev/null
+++ b/dev-qt/qttest/Manifest
@@ -0,0 +1,4 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qtbase-opensource-src-5.4.2.tar.xz 46354192 SHA256 9fc4f720b8b5a8b8e4a7d45e13ce4d5b86756ad46fb406386637eb2de5fd5a74 SHA512 029da83969614bc9b3803c76242af62911e3c6de171b116b5cb8e2823cad0514ab705cc3fa331e042c679caeb099de4e9cd7ddea92959f675dda82533e3ad7fe WHIRLPOOL 5f352f78a779c5d042f04966a010b10af706c4db94976870721a550e3ab7eaf2695b3582c86cdcc3a11de36283e11fe65797f96e59df96fa367b16b72b5f9213
diff --git a/dev-qt/qttest/metadata.xml b/dev-qt/qttest/metadata.xml
new file mode 100644
index 000000000000..258aee1d6e0d
--- /dev/null
+++ b/dev-qt/qttest/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qttest/qttest-4.8.5.ebuild b/dev-qt/qttest/qttest-4.8.5.ebuild
new file mode 100644
index 000000000000..c712f12fd602
--- /dev/null
+++ b/dev-qt/qttest/qttest-4.8.5.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-build
+
+DESCRIPTION="The QtTest module for unit testing Qt applications and libraries"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=]
+"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/testlib"
+
+ QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
+ include/QtTest
+ include/QtCore
+ src/corelib"
+
+ qt4-build_pkg_setup
+}
+
+src_configure() {
+ myconf+="
+ -no-xkb -no-fontconfig -no-xrender -no-xrandr -no-xfixes -no-xcursor
+ -no-xinerama -no-xshape -no-sm -no-opengl
+ -no-nas-sound -no-dbus -no-cups -no-nis -no-gif -no-libpng
+ -no-libmng -no-libjpeg -no-openssl -system-zlib -no-webkit -no-phonon
+ -no-qt3support -no-xmlpatterns -no-freetype -no-libtiff
+ -no-accessibility -no-fontconfig -no-glib -no-svg"
+
+ qt4-build_src_configure
+}
diff --git a/dev-qt/qttest/qttest-4.8.6-r1.ebuild b/dev-qt/qttest/qttest-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..f7bea9c10973
--- /dev/null
+++ b/dev-qt/qttest/qttest-4.8.6-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="The QtTest module for unit testing Qt applications and libraries"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm hppa ia64 ppc ppc64"
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="src/testlib"
+
+multilib_src_configure() {
+ local myconf=(
+ -no-xkb -no-fontconfig -no-xrender -no-xrandr -no-xfixes -no-xcursor
+ -no-xinerama -no-xshape -no-sm -no-opengl
+ -no-nas-sound -no-dbus -no-cups -no-nis -no-gif -no-libpng
+ -no-libmng -no-libjpeg -no-openssl -system-zlib -no-webkit -no-phonon
+ -no-qt3support -no-xmlpatterns -no-freetype -no-libtiff
+ -no-accessibility -no-fontconfig -no-glib -no-svg
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qttest/qttest-4.8.7.ebuild b/dev-qt/qttest/qttest-4.8.7.ebuild
new file mode 100644
index 000000000000..cc92e4638e08
--- /dev/null
+++ b/dev-qt/qttest/qttest-4.8.7.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="The QtTest module for unit testing Qt applications and libraries"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="src/testlib"
+
+multilib_src_configure() {
+ local myconf=(
+ -no-xkb -no-fontconfig -no-xrender -no-xrandr -no-xfixes -no-xcursor
+ -no-xinerama -no-xshape -no-sm -no-opengl
+ -no-nas-sound -no-dbus -no-cups -no-nis -no-gif -no-libpng
+ -no-libmng -no-libjpeg -no-openssl -system-zlib -no-webkit -no-phonon
+ -no-qt3support -no-xmlpatterns -no-freetype -no-libtiff
+ -no-accessibility -no-fontconfig -no-glib -no-svg
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qttest/qttest-5.4.2.ebuild b/dev-qt/qttest/qttest-5.4.2.ebuild
new file mode 100644
index 000000000000..26e4bc2d3e8c
--- /dev/null
+++ b/dev-qt/qttest/qttest-5.4.2.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qtbase"
+VIRTUALX_REQUIRED="test"
+inherit qt5-build
+
+DESCRIPTION="Unit testing library for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE=""
+
+RDEPEND="
+ ~dev-qt/qtcore-${PV}
+"
+DEPEND="${RDEPEND}
+ test? (
+ ~dev-qt/qtgui-${PV}
+ ~dev-qt/qtxml-${PV}
+ )
+"
+
+QT5_TARGET_SUBDIRS=(
+ src/testlib
+)
diff --git a/dev-qt/qttranslations/Manifest b/dev-qt/qttranslations/Manifest
new file mode 100644
index 000000000000..7b63da614a9e
--- /dev/null
+++ b/dev-qt/qttranslations/Manifest
@@ -0,0 +1,3 @@
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qttranslations-opensource-src-5.4.2.tar.xz 1104996 SHA256 9ab6ddb730b1862781991b4ccf53ceaa3f21e9f8bf1c5c49930f7d135832942c SHA512 550e0fcea83155fd4e7e483c92c53f18c733f2fa6c5f179957e0c9f25692acb08975be63fd70974bfe3db7c2efd069e5e915410a8bc34870a26628ce4f99f021 WHIRLPOOL ad9bc0f0bce2e2a41308020ca41d6a7e8c3c22240bb22a1e3187a12645eb36ea4403f98bcf6bb2af6a68c37233d8c38828bad11b831cbde7aa60f0a3b8994711
diff --git a/dev-qt/qttranslations/metadata.xml b/dev-qt/qttranslations/metadata.xml
new file mode 100644
index 000000000000..afb3b434585b
--- /dev/null
+++ b/dev-qt/qttranslations/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qttranslations/qttranslations-4.8.6-r1.ebuild b/dev-qt/qttranslations/qttranslations-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..327b3f156826
--- /dev/null
+++ b/dev-qt/qttranslations/qttranslations-4.8.6-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="Translation files for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm hppa ia64 ppc ppc64"
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}
+"
+RDEPEND=""
+
+QT4_TARGET_DIRECTORIES="translations"
+
+multilib_src_configure() {
+ if multilib_is_native_abi; then
+ qt4_prepare_env
+ qt4_symlink_tools_to_build_dir
+ qt4_foreach_target_subdir qt4_qmake
+ fi
+}
+
+multilib_src_compile() {
+ multilib_is_native_abi && qt4_multilib_src_compile
+}
+
+multilib_src_test() {
+ :
+}
+
+multilib_src_install() {
+ multilib_is_native_abi && qt4_multilib_src_install
+}
diff --git a/dev-qt/qttranslations/qttranslations-4.8.7.ebuild b/dev-qt/qttranslations/qttranslations-4.8.7.ebuild
new file mode 100644
index 000000000000..abaa361b7929
--- /dev/null
+++ b/dev-qt/qttranslations/qttranslations-4.8.7.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="Translation files for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}
+"
+RDEPEND=""
+
+QT4_TARGET_DIRECTORIES="translations"
+
+multilib_src_configure() {
+ if multilib_is_native_abi; then
+ qt4_prepare_env
+ qt4_symlink_tools_to_build_dir
+ qt4_foreach_target_subdir qt4_qmake
+ fi
+}
+
+multilib_src_compile() {
+ multilib_is_native_abi && qt4_multilib_src_compile
+}
+
+multilib_src_test() {
+ :
+}
+
+multilib_src_install() {
+ multilib_is_native_abi && qt4_multilib_src_install
+}
diff --git a/dev-qt/qttranslations/qttranslations-5.4.2.ebuild b/dev-qt/qttranslations/qttranslations-5.4.2.ebuild
new file mode 100644
index 000000000000..e8c2c9b6cf20
--- /dev/null
+++ b/dev-qt/qttranslations/qttranslations-5.4.2.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt5-build
+
+DESCRIPTION="Translation files for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+fi
+
+IUSE=""
+
+DEPEND="
+ >=dev-qt/linguist-tools-${PV}:5
+ >=dev-qt/qtcore-${PV}:5
+"
+RDEPEND=""
diff --git a/dev-qt/qtwayland/Manifest b/dev-qt/qtwayland/Manifest
new file mode 100644
index 000000000000..ac44608238e4
--- /dev/null
+++ b/dev-qt/qtwayland/Manifest
@@ -0,0 +1 @@
+DIST qtwayland-opensource-src-5.4.2.tar.xz 248468 SHA256 e04dbeced39186ea39078bfe78de2c4fda4da28c4af6170fe0f48283ddbcf592 SHA512 45f41a3d02c26bb26136303e1b6155397e65eb0e2a630aa68e53fe4d772a7f4e5c96f4d567a62fd84f681becd64e462fbc128d72b9f6403a505455656e5db9f6 WHIRLPOOL 79abad30df883922414b8cedcf3b34ac17e5ff2f5717edac23f0938f78d8dc93d599a1fa265871313ed2f82498f8d389c618eed2cdff560daeaa215c8eb2ae42
diff --git a/dev-qt/qtwayland/metadata.xml b/dev-qt/qtwayland/metadata.xml
new file mode 100644
index 000000000000..0f135c2d9872
--- /dev/null
+++ b/dev-qt/qtwayland/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="egl">Use EGL instead of GLX to manage OpenGL contexts</flag>
+ <flag name="qml">Build QML/QtQuick bindings</flag>
+ <flag name="wayland-compositor">Build Qt compositor for wayland</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtwayland/qtwayland-5.4.2.ebuild b/dev-qt/qtwayland/qtwayland-5.4.2.ebuild
new file mode 100644
index 000000000000..d7cffa1182d3
--- /dev/null
+++ b/dev-qt/qtwayland/qtwayland-5.4.2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt5-build
+
+DESCRIPTION="Wayland platform plugin for Qt"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="egl qml wayland-compositor xcomposite"
+
+DEPEND="
+ >=dev-libs/wayland-1.3.0
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtgui-${PV}:5[egl=]
+ media-libs/mesa[egl?]
+ >=x11-libs/libxkbcommon-0.2.0
+ qml? ( >=dev-qt/qtdeclarative-${PV}:5 )
+ xcomposite? (
+ x11-libs/libX11
+ x11-libs/libXcomposite
+ )
+"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ if use wayland-compositor; then
+ echo "CONFIG += wayland-compositor" >> "${QT5_BUILD_DIR}"/.qmake.cache
+ fi
+
+ qt_use_compile_test xcomposite
+
+ qt5-build_src_configure
+}
diff --git a/dev-qt/qtwebchannel/Manifest b/dev-qt/qtwebchannel/Manifest
new file mode 100644
index 000000000000..16a3dd49911c
--- /dev/null
+++ b/dev-qt/qtwebchannel/Manifest
@@ -0,0 +1 @@
+DIST qtwebchannel-opensource-src-5.4.2.tar.xz 84620 SHA256 56e3a75b67cb512b2a1e212590fff43e7b648515cda1d673e44139f896fcc16f SHA512 b197675543e3e247f35147e8570172f7e1bc98755f370a8e7a29849fb810eabf2ea5dc121106b9830210c3ffbb4f6d9388ed75eacdd6946bb4dc9b52c985afc2 WHIRLPOOL 3daf70ebab0c1f7991364831da0d8d51df81a218e1e41beacdb2da047bfba787396eaa187ef49eedd6b5f690b7f72fe06f07c9b5b03f1e8f641ed1aab74da7cd
diff --git a/dev-qt/qtwebchannel/metadata.xml b/dev-qt/qtwebchannel/metadata.xml
new file mode 100644
index 000000000000..ddad9f75dce8
--- /dev/null
+++ b/dev-qt/qtwebchannel/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="qml">Build QML/QtQuick bindings and imports</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtwebchannel/qtwebchannel-5.4.2.ebuild b/dev-qt/qtwebchannel/qtwebchannel-5.4.2.ebuild
new file mode 100644
index 000000000000..b3c9b854605b
--- /dev/null
+++ b/dev-qt/qtwebchannel/qtwebchannel-5.4.2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt5-build
+
+DESCRIPTION="Qt5 framework module for integrating C++ and QML applications with HTML/JavaScript clients"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+IUSE="qml"
+
+DEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ qml? ( >=dev-qt/qtdeclarative-${PV}:5 )
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ qt_use_disable_mod qml quick src/src.pro
+ qt_use_disable_mod qml qml src/webchannel/webchannel.pro
+
+ qt5-build_src_prepare
+}
diff --git a/dev-qt/qtwebkit/Manifest b/dev-qt/qtwebkit/Manifest
new file mode 100644
index 000000000000..ab474ac6f917
--- /dev/null
+++ b/dev-qt/qtwebkit/Manifest
@@ -0,0 +1,5 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qtwebkit-2.3.4.tar.gz 51648808 SHA256 c6cfa9d068f7eb024fee3f6c24f5b8b726997f669007587f35ed4a97d40097ca SHA512 f7aa3762f84b8ef6c75ceb40beaad750b5c09bb3f14964cda17b42f489ff2c876e35678b57404057e909948160450a144de67ad1337a42992dc5a1d4b796bec4 WHIRLPOOL 1d8e78a8d7f920b132ed79dbc6a6a71b784080d8aa4b9123f22797efa6062eb4f85236ab66f3232900a131049d7c78fc5fc333511b161dc72c30434cd7fef542
+DIST qtwebkit-opensource-src-5.4.2.tar.xz 33460988 SHA256 3e4243e14001f47b8842f72287728b731f8b62b480bd72a1b0e2a9cfe25dce6d SHA512 edb0a8ad63f70d85324af08f46070cc386fd27ff858f590a592f71583cddade897b305527ec3bb8d7a4d491c9d141af04d783ea101e6c40f683df16297652ff3 WHIRLPOOL 49490e7633e8e95abf4d3f0f17b173e40b7df0ce658d56f87dfd4bc73ab9700823e7ea7d5e9c61edb5a06552df5ead701b059d14a8074afa4bad22f77b622fea
diff --git a/dev-qt/qtwebkit/files/4.10.4-use-correct-icu-typedef.patch b/dev-qt/qtwebkit/files/4.10.4-use-correct-icu-typedef.patch
new file mode 100644
index 000000000000..3e4816255fed
--- /dev/null
+++ b/dev-qt/qtwebkit/files/4.10.4-use-correct-icu-typedef.patch
@@ -0,0 +1,40 @@
+From 916f00008b602ae1b260106e7fb1274d2282f61f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= <jkt@flaska.net>
+Date: Tue, 3 Sep 2013 16:59:35 +0200
+Subject: [PATCH] ICU has defined UChar32 to be an int32_t since 2002
+
+This fixes the build failure of qtwebkit23 on my Gentoo machine.
+---
+ Source/WTF/wtf/unicode/qt4/UnicodeQt4.h | 2 +-
+ Source/WTF/wtf/unicode/wchar/UnicodeWchar.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Source/WTF/wtf/unicode/qt4/UnicodeQt4.h b/Source/WTF/wtf/unicode/qt4/UnicodeQt4.h
+index a2d1ad4..392d2db 100644
+--- a/Source/WTF/wtf/unicode/qt4/UnicodeQt4.h
++++ b/Source/WTF/wtf/unicode/qt4/UnicodeQt4.h
+@@ -69,7 +69,7 @@ typedef uint16_t UChar;
+ #endif
+
+ #if !USE(ICU_UNICODE)
+-typedef uint32_t UChar32;
++typedef int32_t UChar32;
+ #endif
+
+ namespace WTF {
+diff --git a/Source/WTF/wtf/unicode/wchar/UnicodeWchar.h b/Source/WTF/wtf/unicode/wchar/UnicodeWchar.h
+index 10c2026..db8944e 100644
+--- a/Source/WTF/wtf/unicode/wchar/UnicodeWchar.h
++++ b/Source/WTF/wtf/unicode/wchar/UnicodeWchar.h
+@@ -31,7 +31,7 @@
+ #include <wtf/unicode/UnicodeMacrosFromICU.h>
+
+ typedef wchar_t UChar;
+-typedef uint32_t UChar32;
++typedef int32_t UChar32;
+
+ namespace WTF {
+ namespace Unicode {
+--
+1.7.1
+
diff --git a/dev-qt/qtwebkit/files/4.8.2-javascriptcore-x32.patch b/dev-qt/qtwebkit/files/4.8.2-javascriptcore-x32.patch
new file mode 100644
index 000000000000..16f52d9cb07e
--- /dev/null
+++ b/dev-qt/qtwebkit/files/4.8.2-javascriptcore-x32.patch
@@ -0,0 +1,11 @@
+--- src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h.orig 2012-07-17 15:06:26.692276108 +0000
++++ src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h 2012-07-17 15:06:54.480928701 +0000
+@@ -993,7 +993,7 @@
+ #endif
+
+ #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32_64)
+-#if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS))) \
++#if (CPU(X86_64) && defined(__LP64__) && (OS(UNIX) || OS(WINDOWS))) \
+ || (CPU(IA64) && !CPU(IA64_32)) \
+ || CPU(ALPHA) \
+ || CPU(SPARC64) \
diff --git a/dev-qt/qtwebkit/files/qtwebkit-4.8.1-no-use-ld-gold.patch b/dev-qt/qtwebkit/files/qtwebkit-4.8.1-no-use-ld-gold.patch
new file mode 100644
index 000000000000..d29d5da7f04c
--- /dev/null
+++ b/dev-qt/qtwebkit/files/qtwebkit-4.8.1-no-use-ld-gold.patch
@@ -0,0 +1,17 @@
+diff -urN qt-everywhere-opensource-src-4.8.1.orig/src/3rdparty/webkit/Source/common.pri qt-everywhere-opensource-src-4.8.1/src/3rdparty/webkit/Source/common.pri
+--- qt-everywhere-opensource-src-4.8.1.orig/src/3rdparty/webkit/Source/common.pri 2012-04-28 12:39:16.884473572 +0200
++++ qt-everywhere-opensource-src-4.8.1/src/3rdparty/webkit/Source/common.pri 2012-04-28 12:41:14.245006363 +0200
+@@ -3,13 +3,6 @@
+ contains(JAVASCRIPTCORE_JIT,yes): DEFINES+=ENABLE_JIT=1
+ contains(JAVASCRIPTCORE_JIT,no): DEFINES+=ENABLE_JIT=0
+
+-linux-g++ {
+-isEmpty($$(SBOX_DPKG_INST_ARCH)):exists(/usr/bin/ld.gold) {
+- message(Using gold linker)
+- QMAKE_LFLAGS+=-fuse-ld=gold
+-}
+-}
+-
+ # We use this flag on production branches
+ # See https://bugs.webkit.org/show_bug.cgi?id=60824
+ CONFIG += production
diff --git a/dev-qt/qtwebkit/files/qtwebkit-5.2.1-disable-gstreamer.patch b/dev-qt/qtwebkit/files/qtwebkit-5.2.1-disable-gstreamer.patch
new file mode 100644
index 000000000000..05e41a17f556
--- /dev/null
+++ b/dev-qt/qtwebkit/files/qtwebkit-5.2.1-disable-gstreamer.patch
@@ -0,0 +1,15 @@
+--- Tools/qmake/mkspecs/features/features.prf 2014-03-19 18:35:47.795676444 +0000
++++ Tools/qmake/mkspecs/features/features.prf 2014-03-19 18:36:38.602433220 +0000
+@@ -99,12 +99,6 @@
+
+ # HTML5 Media Support for builds with GStreamer
+ unix:!mac:!contains(QT_CONFIG, no-pkg-config) {
+- packagesExist("glib-2.0 gio-2.0 gstreamer-1.0 gstreamer-plugins-base-1.0") {
+- WEBKIT_CONFIG += video use_gstreamer
+- } else: packagesExist("glib-2.0 gio-2.0 \'gstreamer-0.10 >= 0.10.30\' \'gstreamer-plugins-base-0.10 >= 0.10.30\'") {
+- WEBKIT_CONFIG += video use_gstreamer use_gstreamer010
+- }
+- use?(gstreamer): WEBKIT_CONFIG += use_native_fullscreen_video
+ }
+
+ !enable?(video):qtHaveModule(multimediawidgets) {
diff --git a/dev-qt/qtwebkit/files/qtwebkit-5.3.2-use-gstreamer010.patch b/dev-qt/qtwebkit/files/qtwebkit-5.3.2-use-gstreamer010.patch
new file mode 100644
index 000000000000..1c02e45690b4
--- /dev/null
+++ b/dev-qt/qtwebkit/files/qtwebkit-5.3.2-use-gstreamer010.patch
@@ -0,0 +1,18 @@
+--- Tools/qmake/mkspecs/features/features.prf 2014-09-27 11:09:50.010617142 +0100
++++ Tools/qmake/mkspecs/features/features.prf 2014-09-27 11:17:10.741678989 +0100
+@@ -96,14 +96,8 @@
+ use?(3d_graphics): WEBKIT_CONFIG += webgl
+
+ # HTML5 Media Support for builds with GStreamer
+- unix:!mac:!contains(QT_CONFIG, no-pkg-config) {
+- packagesExist("glib-2.0 gio-2.0 gstreamer-1.0 gstreamer-plugins-base-1.0") {
+- WEBKIT_CONFIG += video use_gstreamer
+- } else: packagesExist("glib-2.0 gio-2.0 \'gstreamer-0.10 >= 0.10.30\' \'gstreamer-plugins-base-0.10 >= 0.10.30\'") {
+- WEBKIT_CONFIG += video use_gstreamer use_gstreamer010
+- }
++ WEBKIT_CONFIG += video use_gstreamer use_gstreamer010
+ use?(gstreamer): WEBKIT_CONFIG += use_native_fullscreen_video
+- }
+
+ !enable?(video):qtHaveModule(multimediawidgets) {
+ WEBKIT_CONFIG += video use_qt_multimedia
diff --git a/dev-qt/qtwebkit/files/qtwebkit-5.4.2-system-leveldb.patch b/dev-qt/qtwebkit/files/qtwebkit-5.4.2-system-leveldb.patch
new file mode 100644
index 000000000000..0a476c646c52
--- /dev/null
+++ b/dev-qt/qtwebkit/files/qtwebkit-5.4.2-system-leveldb.patch
@@ -0,0 +1,25 @@
+Correct header location so system dev-libs/leveldb can be detected.
+
+--- Tools/qmake/config.tests/leveldb/leveldb.cpp
++++ Tools/qmake/config.tests/leveldb/leveldb.cpp
+@@ -19,7 +19,7 @@
+
+ #include <leveldb/db.h>
+ #include <leveldb/env.h>
+-#include <helpers/memenv/memenv.h>
++#include <leveldb/helpers/memenv.h>
+
+ int main(int, char**)
+ {
+
+--- Source/WebCore/platform/leveldb/LevelDBDatabase.cpp
++++ Source/WebCore/platform/leveldb/LevelDBDatabase.cpp
+@@ -38,7 +38,7 @@
+ #include <leveldb/comparator.h>
+ #include <leveldb/db.h>
+ #include <leveldb/env.h>
+-#include <helpers/memenv/memenv.h>
++#include <leveldb/helpers/memenv.h>
+ #include <leveldb/slice.h>
+ #include <string>
+ #include <wtf/PassOwnPtr.h>
diff --git a/dev-qt/qtwebkit/metadata.xml b/dev-qt/qtwebkit/metadata.xml
new file mode 100644
index 000000000000..8640de507d56
--- /dev/null
+++ b/dev-qt/qtwebkit/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ <flag name="gstreamer">Enable HTML5 audio/video support via <pkg>media-libs/gstreamer</pkg></flag>
+ <flag name="gstreamer010">Enable HTML5 audio/video support via legacy <pkg>media-libs/gstreamer:0.10</pkg></flag>
+ <flag name="multimedia">Enable HTML5 audio/video support via <pkg>dev-qt/qtmultimedia</pkg></flag>
+ <flag name="printsupport">Enable printing via <pkg>dev-qt/qtprintsupport</pkg></flag>
+ <flag name="qml">Build QML/QtQuick bindings</flag>
+ <flag name="webp">Add support for WebP image format</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtwebkit/qtwebkit-4.10.4.ebuild b/dev-qt/qtwebkit/qtwebkit-4.10.4.ebuild
new file mode 100644
index 000000000000..ab983ae44b46
--- /dev/null
+++ b/dev-qt/qtwebkit/qtwebkit-4.10.4.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+inherit eutils multilib python-any-r1 qmake-utils toolchain-funcs multilib-minimal
+
+MY_PV=${PV/4.10/2.3}
+
+DESCRIPTION="The WebKit module for the Qt toolkit"
+HOMEPAGE="https://www.qt.io/ http://trac.webkit.org/wiki/QtWebKit"
+SRC_URI="mirror://kde/stable/${PN}-2.3/${MY_PV}/src/${PN}-${MY_PV}.tar.gz"
+
+LICENSE="|| ( LGPL-2.1 GPL-3 )"
+SLOT="4"
+KEYWORDS="~amd64"
+IUSE="debug +gstreamer"
+
+RDEPEND="
+ >=dev-db/sqlite-3.8.3:3[${MULTILIB_USEDEP}]
+ dev-libs/libxml2:2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ >=dev-qt/qtcore-4.8.6-r1:4[ssl,${MULTILIB_USEDEP}]
+ >=dev-qt/qtdeclarative-4.8.6-r1:4[${MULTILIB_USEDEP}]
+ >=dev-qt/qtgui-4.8.6-r1:4[${MULTILIB_USEDEP}]
+ >=dev-qt/qtopengl-4.8.6-r1:4[${MULTILIB_USEDEP}]
+ >=dev-qt/qtscript-4.8.6-r1:4[${MULTILIB_USEDEP}]
+ >=dev-qt/qtsql-4.8.6-r1:4[sqlite,${MULTILIB_USEDEP}]
+ >=media-libs/fontconfig-2.10.2-r1[${MULTILIB_USEDEP}]
+ media-libs/libpng:0=[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ virtual/jpeg:0[${MULTILIB_USEDEP}]
+ virtual/libudev:=[${MULTILIB_USEDEP}]
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ x11-libs/libX11[${MULTILIB_USEDEP}]
+ x11-libs/libXrender[${MULTILIB_USEDEP}]
+ gstreamer? (
+ dev-libs/glib:2[${MULTILIB_USEDEP}]
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
+ )
+"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-lang/perl
+ dev-lang/ruby
+ dev-util/gperf
+ sys-devel/bison
+ sys-devel/flex
+ virtual/perl-Digest-MD5
+ virtual/perl-File-Spec
+ virtual/perl-Getopt-Long
+ virtual/pkgconfig[${MULTILIB_USEDEP}]
+"
+
+S=${WORKDIR}
+
+PATCHES=(
+ "${FILESDIR}/${PV}-use-correct-icu-typedef.patch"
+)
+
+src_prepare() {
+ # examples cause a sandbox violation (bug 458222)
+ sed -i -e '/SUBDIRS += examples/d' Source/QtWebKit.pro || die
+
+ # respect CXXFLAGS
+ sed -i -e '/QMAKE_CXXFLAGS_RELEASE.*=/d' \
+ Source/WTF/WTF.pro \
+ Source/JavaScriptCore/Target.pri || die
+
+ # apply patches
+ [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
+ epatch_user
+}
+
+multilib_src_compile() {
+ local -x \
+ QTDIR=${EPREFIX}/usr/$(get_libdir)/qt4 \
+ WEBKITOUTPUTDIR=${BUILD_DIR}
+
+ local myconf=(
+ "${S}"/Tools/Scripts/build-webkit
+ --qt
+ # tell the build system where to find the qmake binary for the current ABI
+ --qmake="$(qt4_get_bindir)"/qmake
+ --qmakearg="CONFIG+=nostrip DEFINES+=HAVE_QTTESTLIB=0"
+ --makeargs="${MAKEOPTS}"
+ --$(usex debug debug release)
+ --$(usex gstreamer video no-video)
+ # disable WebKit2 since it requires Qt5
+ --no-webkit2
+ # prevent automagic dependency on qt-mobility (bug 547350)
+ --no-geolocation
+ --no-device-orientation
+ --no-orientation-events
+ # copied from eqmake4
+ QMAKE_AR="'$(tc-getAR) cqs'"
+ QMAKE_CC="'$(tc-getCC)'"
+ QMAKE_CXX="'$(tc-getCXX)'"
+ QMAKE_LINK="'$(tc-getCXX)'"
+ QMAKE_LINK_C="'$(tc-getCC)'"
+ QMAKE_OBJCOPY="'$(tc-getOBJCOPY)'"
+ QMAKE_RANLIB=
+ QMAKE_STRIP=
+ QMAKE_CFLAGS="'${CFLAGS}'"
+ QMAKE_CFLAGS_RELEASE=
+ QMAKE_CFLAGS_DEBUG=
+ QMAKE_CXXFLAGS="'${CXXFLAGS}'"
+ QMAKE_CXXFLAGS_RELEASE=
+ QMAKE_CXXFLAGS_DEBUG=
+ QMAKE_LFLAGS="'${LDFLAGS}'"
+ QMAKE_LFLAGS_RELEASE=
+ QMAKE_LFLAGS_DEBUG=
+ )
+ echo "${myconf[@]}"
+ "${myconf[@]}" || die
+}
+
+multilib_src_install() {
+ emake INSTALL_ROOT="${D}" install -C $(usex debug Debug Release)
+
+ # move pkgconfig file to the correct location
+ mv "${ED}"/usr/$(get_libdir){/qt4/pkgconfig,} || die
+}
diff --git a/dev-qt/qtwebkit/qtwebkit-4.8.5.ebuild b/dev-qt/qtwebkit/qtwebkit-4.8.5.ebuild
new file mode 100644
index 000000000000..d7de5b417345
--- /dev/null
+++ b/dev-qt/qtwebkit/qtwebkit-4.8.5.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build flag-o-matic
+
+DESCRIPTION="The WebKit module for the Qt toolkit"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="amd64 arm ia64 ~mips ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+IUSE="+gstreamer icu +jit"
+
+# libxml2[!icu?] is needed for bugs 407315 and 411091
+DEPEND="
+ dev-db/sqlite:3
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,ssl]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=]
+ ~dev-qt/qtxmlpatterns-${PV}[aqua=,debug=]
+ x11-libs/libX11
+ x11-libs/libXrender
+ gstreamer? (
+ dev-libs/glib:2
+ dev-libs/libxml2:2[!icu?]
+ >=media-libs/gstreamer-0.10.36:0.10
+ >=media-libs/gst-plugins-base-0.10.36:0.10
+ )
+ icu? ( dev-libs/icu:= )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.8.1-no-use-ld-gold.patch"
+ "${FILESDIR}/4.8.2-javascriptcore-x32.patch"
+)
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/3rdparty/webkit/Source/JavaScriptCore
+ src/3rdparty/webkit/Source/WebCore
+ src/3rdparty/webkit/Source/WebKit/qt"
+
+ QT4_EXTRACT_DIRECTORIES="
+ include
+ src"
+
+ QCONFIG_ADD="webkit"
+ QCONFIG_DEFINE="QT_WEBKIT"
+
+ qt4-build_pkg_setup
+}
+
+src_prepare() {
+ # Fix version number in generated pkgconfig file, bug 406443
+ sed -i -e 's/^isEmpty(QT_BUILD_TREE)://' \
+ src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro || die
+
+ # Remove -Werror from CXXFLAGS
+ sed -i -e '/QMAKE_CXXFLAGS\s*+=/ s:-Werror::g' \
+ src/3rdparty/webkit/Source/WebKit.pri || die
+
+ if use icu; then
+ sed -i -e '/CONFIG\s*+=\s*text_breaking_with_icu/ s:^#\s*::' \
+ src/3rdparty/webkit/Source/JavaScriptCore/JavaScriptCore.pri || die
+ fi
+
+ qt4-build_src_prepare
+}
+
+src_configure() {
+ myconf+="
+ -webkit
+ -system-sqlite
+ $(qt_use icu)
+ $(qt_use jit javascript-jit)
+ $(use gstreamer || echo -DENABLE_VIDEO=0)"
+
+ qt4-build_src_configure
+}
diff --git a/dev-qt/qtwebkit/qtwebkit-4.8.6-r1.ebuild b/dev-qt/qtwebkit/qtwebkit-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..78f4e0ed9d6b
--- /dev/null
+++ b/dev-qt/qtwebkit/qtwebkit-4.8.6-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="The WebKit module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="arm ia64 ppc ppc64"
+else
+ KEYWORDS="amd64 arm ia64 ~mips ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="+gstreamer icu +jit"
+
+# libxml2[!icu?] is needed for bugs 407315 and 411091
+DEPEND="
+ >=dev-db/sqlite-3.8.3:3[${MULTILIB_USEDEP}]
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,ssl,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtxmlpatterns-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.5.0-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrender-0.9.7-r1[${MULTILIB_USEDEP}]
+ gstreamer? (
+ dev-libs/glib:2[${MULTILIB_USEDEP}]
+ dev-libs/libxml2:2[!icu?,${MULTILIB_USEDEP}]
+ >=media-libs/gstreamer-0.10.36-r1:0.10[${MULTILIB_USEDEP}]
+ >=media-libs/gst-plugins-base-0.10.36-r1:0.10[${MULTILIB_USEDEP}]
+ )
+ icu? ( dev-libs/icu:=[${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/4.8.2-javascriptcore-x32.patch"
+)
+
+QT4_TARGET_DIRECTORIES="
+ src/3rdparty/webkit/Source/JavaScriptCore
+ src/3rdparty/webkit/Source/WebCore
+ src/3rdparty/webkit/Source/WebKit/qt"
+
+QCONFIG_ADD="webkit"
+QCONFIG_DEFINE="QT_WEBKIT"
+
+src_prepare() {
+ # Remove -Werror from CXXFLAGS
+ sed -i -e '/QMAKE_CXXFLAGS\s*+=/ s:-Werror::g' \
+ src/3rdparty/webkit/Source/WebKit.pri || die
+
+ # Fix version number in generated pkgconfig file (bug 406443)
+ sed -i -e 's/^isEmpty(QT_BUILD_TREE)://' \
+ src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro || die
+
+ # Prevent automagic dependency on qt-mobility (bug 547350)
+ sed -i -e 's/contains(MOBILITY_CONFIG,\s*\w\+)/false/' \
+ src/3rdparty/webkit/Source/WebCore/features.pri || die
+
+ if use icu; then
+ sed -i -e '/CONFIG\s*+=\s*text_breaking_with_icu/ s:^#\s*::' \
+ src/3rdparty/webkit/Source/JavaScriptCore/JavaScriptCore.pri || die
+ fi
+
+ qt4-build-multilib_src_prepare
+}
+
+multilib_src_configure() {
+ local myconf=(
+ -webkit
+ -system-sqlite
+ $(qt_use icu)
+ $(qt_use jit javascript-jit)
+ $(use gstreamer || echo -DENABLE_VIDEO=0)
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtwebkit/qtwebkit-4.8.7.ebuild b/dev-qt/qtwebkit/qtwebkit-4.8.7.ebuild
new file mode 100644
index 000000000000..d20cbc2e3d9d
--- /dev/null
+++ b/dev-qt/qtwebkit/qtwebkit-4.8.7.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="The WebKit module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="+gstreamer icu +jit"
+
+# libxml2[!icu?] is needed for bugs 407315 and 411091
+DEPEND="
+ >=dev-db/sqlite-3.8.3:3[${MULTILIB_USEDEP}]
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,ssl,${MULTILIB_USEDEP}]
+ ~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ ~dev-qt/qtxmlpatterns-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.5.0-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrender-0.9.7-r1[${MULTILIB_USEDEP}]
+ gstreamer? (
+ dev-libs/glib:2[${MULTILIB_USEDEP}]
+ dev-libs/libxml2:2[!icu?,${MULTILIB_USEDEP}]
+ >=media-libs/gstreamer-0.10.36-r1:0.10[${MULTILIB_USEDEP}]
+ >=media-libs/gst-plugins-base-0.10.36-r1:0.10[${MULTILIB_USEDEP}]
+ )
+ icu? ( dev-libs/icu:=[${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/4.8.2-javascriptcore-x32.patch"
+)
+
+QT4_TARGET_DIRECTORIES="
+ src/3rdparty/webkit/Source/JavaScriptCore
+ src/3rdparty/webkit/Source/WebCore
+ src/3rdparty/webkit/Source/WebKit/qt"
+
+QCONFIG_ADD="webkit"
+QCONFIG_DEFINE="QT_WEBKIT"
+
+src_prepare() {
+ # Remove -Werror from CXXFLAGS
+ sed -i -e '/QMAKE_CXXFLAGS\s*+=/ s:-Werror::g' \
+ src/3rdparty/webkit/Source/WebKit.pri || die
+
+ # Fix version number in generated pkgconfig file (bug 406443)
+ sed -i -e 's/^isEmpty(QT_BUILD_TREE)://' \
+ src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro || die
+
+ # Prevent automagic dependency on qt-mobility (bug 547350)
+ sed -i -e 's/contains(MOBILITY_CONFIG,\s*\w\+)/false/' \
+ src/3rdparty/webkit/Source/WebCore/features.pri || die
+
+ if use icu; then
+ sed -i -e '/CONFIG\s*+=\s*text_breaking_with_icu/ s:^#\s*::' \
+ src/3rdparty/webkit/Source/JavaScriptCore/JavaScriptCore.pri || die
+ fi
+
+ qt4-build-multilib_src_prepare
+}
+
+multilib_src_configure() {
+ local myconf=(
+ -webkit
+ -system-sqlite
+ $(qt_use icu)
+ $(qt_use jit javascript-jit)
+ $(use gstreamer || echo -DENABLE_VIDEO=0)
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtwebkit/qtwebkit-5.4.2.ebuild b/dev-qt/qtwebkit/qtwebkit-5.4.2.ebuild
new file mode 100644
index 000000000000..372e5339817f
--- /dev/null
+++ b/dev-qt/qtwebkit/qtwebkit-5.4.2.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+inherit python-any-r1 qt5-build
+
+DESCRIPTION="WebKit rendering library for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+fi
+
+# TODO: qttestlib, geolocation, orientation/sensors
+
+IUSE="gstreamer gstreamer010 multimedia opengl printsupport qml udev webp"
+REQUIRED_USE="?? ( gstreamer gstreamer010 multimedia )"
+
+RDEPEND="
+ dev-db/sqlite:3
+ dev-libs/icu:=
+ >=dev-libs/leveldb-1.18-r1
+ dev-libs/libxml2:2
+ dev-libs/libxslt
+ >=dev-qt/qtcore-${PV}:5[icu]
+ >=dev-qt/qtgui-${PV}:5
+ >=dev-qt/qtnetwork-${PV}:5
+ >=dev-qt/qtsql-${PV}:5
+ >=dev-qt/qtwidgets-${PV}:5
+ media-libs/fontconfig:1.0
+ media-libs/libpng:0=
+ >=sys-libs/zlib-1.2.5
+ virtual/jpeg:0
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXcomposite
+ x11-libs/libXrender
+ gstreamer? (
+ dev-libs/glib:2
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ )
+ gstreamer010? (
+ dev-libs/glib:2
+ media-libs/gstreamer:0.10
+ media-libs/gst-plugins-base:0.10
+ )
+ multimedia? ( >=dev-qt/qtmultimedia-${PV}:5[widgets] )
+ opengl? ( >=dev-qt/qtopengl-${PV}:5 )
+ printsupport? ( >=dev-qt/qtprintsupport-${PV}:5 )
+ qml? ( >=dev-qt/qtdeclarative-${PV}:5 )
+ udev? ( virtual/udev )
+ webp? ( media-libs/libwebp:0= )
+"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-lang/ruby
+ dev-util/gperf
+ sys-devel/bison
+ sys-devel/flex
+ virtual/rubygems
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.4.2-system-leveldb.patch"
+)
+
+src_prepare() {
+ # ensure bundled library cannot be used
+ rm -r Source/ThirdParty/leveldb || die
+
+ # bug 466216
+ sed -i -e '/CONFIG +=/s/rpath//' \
+ Source/WebKit/qt/declarative/{experimental/experimental,public}.pri \
+ Tools/qmake/mkspecs/features/{force_static_libs_as_shared,unix/default_post}.prf \
+ || die
+
+ if use gstreamer010; then
+ epatch "${FILESDIR}/${PN}-5.3.2-use-gstreamer010.patch"
+ elif ! use gstreamer; then
+ epatch "${FILESDIR}/${PN}-5.2.1-disable-gstreamer.patch"
+ fi
+ use multimedia || sed -i -e '/WEBKIT_CONFIG += video use_qt_multimedia/d' \
+ Tools/qmake/mkspecs/features/features.prf || die
+ use opengl || sed -i -e '/contains(QT_CONFIG, opengl): WEBKIT_CONFIG += use_3d_graphics/d' \
+ Tools/qmake/mkspecs/features/features.prf || die
+ use printsupport || sed -i -e '/WEBKIT_CONFIG += have_qtprintsupport/d' \
+ Tools/qmake/mkspecs/features/features.prf || die
+ use qml || sed -i -e '/have?(QTQUICK): SUBDIRS += declarative/d' \
+ Source/QtWebKit.pro || die
+ use udev || sed -i -e '/linux: WEBKIT_CONFIG += gamepad/d' \
+ Tools/qmake/mkspecs/features/features.prf || die
+ use webp || sed -i -e '/config_libwebp: WEBKIT_CONFIG += use_webp/d' \
+ Tools/qmake/mkspecs/features/features.prf || die
+
+ # bug 458222
+ sed -i -e '/SUBDIRS += examples/d' Source/QtWebKit.pro || die
+
+ qt5-build_src_prepare
+}
diff --git a/dev-qt/qtwebsockets/Manifest b/dev-qt/qtwebsockets/Manifest
new file mode 100644
index 000000000000..7f513f382b6b
--- /dev/null
+++ b/dev-qt/qtwebsockets/Manifest
@@ -0,0 +1 @@
+DIST qtwebsockets-opensource-src-5.4.2.tar.xz 120636 SHA256 44a61a8576190697fb1a112ef982cf1da86c6d1744335d7b8e168f3190a26153 SHA512 e1d81269122f1d80f09ad4bfb8724ce26f172100e5e644e36841c71ca75b48277ae2191a49256dddf48ab8520bf1e0461f0eccdd3ffbd050785983a0c33899a5 WHIRLPOOL ed21e667e725481be8423e9f5727ae1eaaaca7079f9e7c67e33afc62fbb12caa84c2327bf4f6fdde2ced4c05e2327312639fc8344a421e9bfb13c7c5d324887d
diff --git a/dev-qt/qtwebsockets/metadata.xml b/dev-qt/qtwebsockets/metadata.xml
new file mode 100644
index 000000000000..bee66c84d291
--- /dev/null
+++ b/dev-qt/qtwebsockets/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="qml">Build QML bindings</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtwebsockets/qtwebsockets-5.4.2.ebuild b/dev-qt/qtwebsockets/qtwebsockets-5.4.2.ebuild
new file mode 100644
index 000000000000..be842d81b23a
--- /dev/null
+++ b/dev-qt/qtwebsockets/qtwebsockets-5.4.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt5-build
+
+DESCRIPTION="Implementation of the WebSocket protocol for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="qml"
+
+DEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtnetwork-${PV}:5
+ qml? ( >=dev-qt/qtdeclarative-${PV}:5 )
+
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ qt_use_disable_mod qml quick src/src.pro
+
+ qt5-build_src_prepare
+}
diff --git a/dev-qt/qtwidgets/Manifest b/dev-qt/qtwidgets/Manifest
new file mode 100644
index 000000000000..0c465bb8036b
--- /dev/null
+++ b/dev-qt/qtwidgets/Manifest
@@ -0,0 +1 @@
+DIST qtbase-opensource-src-5.4.2.tar.xz 46354192 SHA256 9fc4f720b8b5a8b8e4a7d45e13ce4d5b86756ad46fb406386637eb2de5fd5a74 SHA512 029da83969614bc9b3803c76242af62911e3c6de171b116b5cb8e2823cad0514ab705cc3fa331e042c679caeb099de4e9cd7ddea92959f675dda82533e3ad7fe WHIRLPOOL 5f352f78a779c5d042f04966a010b10af706c4db94976870721a550e3ab7eaf2695b3582c86cdcc3a11de36283e11fe65797f96e59df96fa367b16b72b5f9213
diff --git a/dev-qt/qtwidgets/metadata.xml b/dev-qt/qtwidgets/metadata.xml
new file mode 100644
index 000000000000..4727795ad761
--- /dev/null
+++ b/dev-qt/qtwidgets/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="gles2">Use GLES 2.0 or later instead of full OpenGL</flag>
+ <flag name="gtkstyle">Build a Qt style called GTK+ that mimics the active
+ GTK+ theme</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtwidgets/qtwidgets-5.4.2.ebuild b/dev-qt/qtwidgets/qtwidgets-5.4.2.ebuild
new file mode 100644
index 000000000000..83886f4e537b
--- /dev/null
+++ b/dev-qt/qtwidgets/qtwidgets-5.4.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="Set of UI elements for creating classic desktop-style user interfaces for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+# keep IUSE defaults in sync with qtgui
+IUSE="gles2 gtkstyle +png +xcb"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}
+ ~dev-qt/qtgui-${PV}[gles2=,gtkstyle=,png=,xcb?]
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/tools/uic
+ src/widgets
+)
+
+QT5_GENTOO_CONFIG=(
+ !:no-widgets:
+)
+
+src_configure() {
+ local myconf=(
+ $(qt_use gtkstyle)
+ -opengl $(usex gles2 es2 desktop)
+ $(qt_use png libpng system)
+ $(qt_use xcb xcb system)
+ $(qt_use xcb xkbcommon system)
+ $(use xcb && echo -xcb-xlib -xinput2 -xkb -xrender)
+ )
+ qt5-build_src_configure
+}
diff --git a/dev-qt/qtx11extras/Manifest b/dev-qt/qtx11extras/Manifest
new file mode 100644
index 000000000000..5e811b621e2d
--- /dev/null
+++ b/dev-qt/qtx11extras/Manifest
@@ -0,0 +1 @@
+DIST qtx11extras-opensource-src-5.4.2.tar.xz 25484 SHA256 f6ff62df88810304937664aa5a0b0ad4fd981ed0e30920d08fd76dd525f7fe49 SHA512 c309d6d2c5a3a802656b2414b676ba3d105f4f0e2ceba1d7e9a5e0d2f64e2e50306252b132e38b6801a6db597f33e27a1682f6db24a4167b127d17afa7ad4d4c WHIRLPOOL edf5eb006f5fd84e95acfd504337334ef16af4b5f181197d88e9247b74882866a74810609e6e3089d32f9057a1e50b427c205c2e33f63edc4dfaa3d518769dee
diff --git a/dev-qt/qtx11extras/metadata.xml b/dev-qt/qtx11extras/metadata.xml
new file mode 100644
index 000000000000..afb3b434585b
--- /dev/null
+++ b/dev-qt/qtx11extras/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtx11extras/qtx11extras-5.4.2.ebuild b/dev-qt/qtx11extras/qtx11extras-5.4.2.ebuild
new file mode 100644
index 000000000000..c22571bf2e7e
--- /dev/null
+++ b/dev-qt/qtx11extras/qtx11extras-5.4.2.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt5-build
+
+DESCRIPTION="Linux/X11-specific support library for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE=""
+
+RDEPEND="
+ ~dev-qt/qtcore-${PV}
+ ~dev-qt/qtgui-${PV}[xcb]
+ ~dev-qt/qtwidgets-${PV}
+"
+DEPEND="${RDEPEND}"
diff --git a/dev-qt/qtxml/Manifest b/dev-qt/qtxml/Manifest
new file mode 100644
index 000000000000..0c465bb8036b
--- /dev/null
+++ b/dev-qt/qtxml/Manifest
@@ -0,0 +1 @@
+DIST qtbase-opensource-src-5.4.2.tar.xz 46354192 SHA256 9fc4f720b8b5a8b8e4a7d45e13ce4d5b86756ad46fb406386637eb2de5fd5a74 SHA512 029da83969614bc9b3803c76242af62911e3c6de171b116b5cb8e2823cad0514ab705cc3fa331e042c679caeb099de4e9cd7ddea92959f675dda82533e3ad7fe WHIRLPOOL 5f352f78a779c5d042f04966a010b10af706c4db94976870721a550e3ab7eaf2695b3582c86cdcc3a11de36283e11fe65797f96e59df96fa367b16b72b5f9213
diff --git a/dev-qt/qtxml/metadata.xml b/dev-qt/qtxml/metadata.xml
new file mode 100644
index 000000000000..afb3b434585b
--- /dev/null
+++ b/dev-qt/qtxml/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtxml/qtxml-5.4.2.ebuild b/dev-qt/qtxml/qtxml-5.4.2.ebuild
new file mode 100644
index 000000000000..d083df6e9755
--- /dev/null
+++ b/dev-qt/qtxml/qtxml-5.4.2.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="SAX and DOM implementation library for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE=""
+
+RDEPEND="
+ ~dev-qt/qtcore-${PV}
+"
+DEPEND="${RDEPEND}
+ test? ( ~dev-qt/qtnetwork-${PV} )
+"
+
+QT5_TARGET_SUBDIRS=(
+ src/xml
+)
diff --git a/dev-qt/qtxmlpatterns/Manifest b/dev-qt/qtxmlpatterns/Manifest
new file mode 100644
index 000000000000..ec468f6f68b2
--- /dev/null
+++ b/dev-qt/qtxmlpatterns/Manifest
@@ -0,0 +1,4 @@
+DIST qt-everywhere-opensource-src-4.8.5.tar.gz 241491467 SHA256 eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138 SHA512 47118d1aa30c59a1eb74e805023cd060edcb35bb0944fe6651889254b75acbd4b83700ba92a9bc215663474d26330cb44f084098c380fac9270742659e5864eb WHIRLPOOL a18f47fd91b522d1543e415aff4f5056202e0cab03da9cfcae9fe2d4118cb1dd1d5fd6a5e2edb9c1e4a68563188d44440e234d268d9c0aef6e3ca3f0988dd357
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
+DIST qtxmlpatterns-opensource-src-5.4.2.tar.xz 1315912 SHA256 aa7fd8aae6f53f74a69048756197746a3e0ac7fc53f8678b8202c470b1fd272b SHA512 7909c395807395e6635e857d99ecbc39d8b0d253b93947398a72899a2434ecd4fa99e229aba404c94667690a0407b76eb651723b0a1dc0b1fb4a47707b44707e WHIRLPOOL a72813a70aee52c0ff9d700c43abaa27d5aba0d8e8b9cc541c3e9794dcabd7458e8253eae90369fd86e4cc50f0a5b08ec490e35e333a1b954af5dad2eb65452b
diff --git a/dev-qt/qtxmlpatterns/metadata.xml b/dev-qt/qtxmlpatterns/metadata.xml
new file mode 100644
index 000000000000..afb3b434585b
--- /dev/null
+++ b/dev-qt/qtxmlpatterns/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtxmlpatterns/qtxmlpatterns-4.8.5.ebuild b/dev-qt/qtxmlpatterns/qtxmlpatterns-4.8.5.ebuild
new file mode 100644
index 000000000000..5a446e92a778
--- /dev/null
+++ b/dev-qt/qtxmlpatterns/qtxmlpatterns-4.8.5.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-build
+
+DESCRIPTION="The XmlPatterns module for the Qt toolkit"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=]
+"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/xmlpatterns
+ tools/xmlpatterns
+ tools/xmlpatternsvalidator"
+
+ QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
+ include/QtCore
+ include/QtNetwork
+ include/QtXml
+ include/QtXmlPatterns
+ src/network
+ src/xml
+ src/corelib"
+
+ QCONFIG_ADD="xmlpatterns"
+ QCONFIG_DEFINE="QT_XMLPATTERNS"
+
+ qt4-build_pkg_setup
+}
+
+src_configure() {
+ myconf+=" -xmlpatterns"
+
+ qt4-build_src_configure
+}
diff --git a/dev-qt/qtxmlpatterns/qtxmlpatterns-4.8.6-r1.ebuild b/dev-qt/qtxmlpatterns/qtxmlpatterns-4.8.6-r1.ebuild
new file mode 100644
index 000000000000..36734bc99955
--- /dev/null
+++ b/dev-qt/qtxmlpatterns/qtxmlpatterns-4.8.6-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="The XmlPatterns module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS="alpha arm hppa ia64 ppc ppc64"
+else
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="
+ src/xmlpatterns
+ tools/xmlpatterns
+ tools/xmlpatternsvalidator"
+
+QCONFIG_ADD="xmlpatterns"
+QCONFIG_DEFINE="QT_XMLPATTERNS"
+
+multilib_src_configure() {
+ local myconf=(
+ -xmlpatterns
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtxmlpatterns/qtxmlpatterns-4.8.7.ebuild b/dev-qt/qtxmlpatterns/qtxmlpatterns-4.8.7.ebuild
new file mode 100644
index 000000000000..eb8453e4c735
--- /dev/null
+++ b/dev-qt/qtxmlpatterns/qtxmlpatterns-4.8.7.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="The XmlPatterns module for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="
+ src/xmlpatterns
+ tools/xmlpatterns
+ tools/xmlpatternsvalidator"
+
+QCONFIG_ADD="xmlpatterns"
+QCONFIG_DEFINE="QT_XMLPATTERNS"
+
+multilib_src_configure() {
+ local myconf=(
+ -xmlpatterns
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtxmlpatterns/qtxmlpatterns-5.4.2.ebuild b/dev-qt/qtxmlpatterns/qtxmlpatterns-5.4.2.ebuild
new file mode 100644
index 000000000000..7f447f537a23
--- /dev/null
+++ b/dev-qt/qtxmlpatterns/qtxmlpatterns-5.4.2.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt5-build
+
+DESCRIPTION="XPath, XQuery, and XSLT support library for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE=""
+
+DEPEND="
+ >=dev-qt/qtcore-${PV}:5
+ >=dev-qt/qtnetwork-${PV}:5
+"
+RDEPEND="${DEPEND}"