summaryrefslogtreecommitdiffstats
path: root/dev-qt
diff options
context:
space:
mode:
Diffstat (limited to 'dev-qt')
-rw-r--r--dev-qt/qt-meta/metadata.xml8
-rw-r--r--dev-qt/qt-meta/qt-meta-3.3.8d.ebuild25
-rw-r--r--dev-qt/qt-meta/qt-meta-3.9999.ebuild25
-rw-r--r--dev-qt/qt/Manifest17
-rw-r--r--dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2012-12-12_02_54_53-Ensure-that-a-valid-DPI-is-always-set-cbe0a27.patch26
-rw-r--r--dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-01-13_02_45_04-Verify-desktop-widget-screen-number-before-applying-size-changes-This-resolves-Bug-1378-b8ca17c.patch38
-rw-r--r--dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-02-20_21_52_12-Doublebuffer-QIconView-to-reduce-flicker-This-closes-Bug-1408-897cd5c.patch98
-rw-r--r--dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-03-02_12_16_10-Fix-textbox-trails-introduced-with-GIT-commit-82b71e49-This-resolves-Bug-1408-a78eb9c.patch19
-rw-r--r--dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-13_13_31_15-Properly-set-WM_CLASS-atom-even-if-Display-pointer-was-passed-to-TQApplication-This-relates-to-Bug-1443-045b2d9.patch46
-rw-r--r--dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-16_17_34_08-Fix-fatal-X11-errors-when-both-external-display-and-command-arguments-are-provided-to-QApplication-This-resolves-Bug-1456-e7d0f7d.patch42
-rw-r--r--dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_58-Fix-Qt-input-method-failure-This-resolves-Bug-1019-c421de2.patch45
-rw-r--r--dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_59-Fix-qmake-library-search-path-on-64-bit-systems-This-resolves-Bug-1016-e374dac.patch13
-rw-r--r--dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_59-Update-zh-tw-translations-c62cd50.patch253
-rw-r--r--dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_00-Add-0084-compositing-patch-from-RedHat-909c3cb.patch73
-rw-r--r--dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_00-Use-unixODBC-instead-of-obsolete-iODBC-This-closes-Bug-792-Thanks-to-L0ner-for-the-patch-3f779ee.patch59
-rw-r--r--dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_01-Make-basic-integer-QDataStream-reads-resistant-to-corruption-from-underlying-IO-device-failure-60621ef.patch133
-rw-r--r--dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-25_03_21_44-Fix-a-number-of-threading-problems-and-crashes-This-partially-resolves-Bug-1467-part-of-the-original-commit-b8e4f24.patch1052
-rw-r--r--dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-03_03_47_45-Fix-corrupted-titlebar-icons-in-subwindows-of-ARGB-applications-90f4a55.patch63
-rw-r--r--dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-04_17_28_30-Fix-ARGB-mode-stippled-focus-rectangle-showing-underlying-window-contents-Fix-TQColor-not-processing-alpha-channel-in-ARGB-mode-d2240de.patch62
-rw-r--r--dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-08_01_43_38-Fix-spelling-mistakes-169c39a.patch52
-rw-r--r--dev-qt/qt/metadata.xml8
-rw-r--r--dev-qt/qt/qt-3.3.8d-r1.ebuild341
-rw-r--r--dev-qt/qt/qt-3.3.8d.ebuild341
-rw-r--r--dev-qt/qt/qt-3.9999.ebuild396
-rw-r--r--dev-qt/qt4-tqt-engine/Manifest1
-rw-r--r--dev-qt/qt4-tqt-engine/files/qt4-tqt-theme-engine-suppress-annoying-warning-about-qt-version.pacth17
-rw-r--r--dev-qt/qt4-tqt-engine/metadata.xml8
-rw-r--r--dev-qt/qt4-tqt-engine/qt4-tqt-engine-9999.ebuild67
-rw-r--r--dev-qt/tqt/metadata.xml8
-rw-r--r--dev-qt/tqt/tqt-3.9999.ebuild306
-rw-r--r--dev-qt/tqtinterface/Manifest2
-rw-r--r--dev-qt/tqtinterface/metadata.xml12
-rw-r--r--dev-qt/tqtinterface/tqtinterface-3.5.13.1.ebuild30
-rw-r--r--dev-qt/tqtinterface/tqtinterface-3.5.13.2.ebuild30
-rw-r--r--dev-qt/tqtinterface/tqtinterface-9999.ebuild36
35 files changed, 3752 insertions, 0 deletions
diff --git a/dev-qt/qt-meta/metadata.xml b/dev-qt/qt-meta/metadata.xml
new file mode 100644
index 00000000..6e9f5e4a
--- /dev/null
+++ b/dev-qt/qt-meta/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>fatzer2@gmail.com</email>
+ <name>Alexander Golubev</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-qt/qt-meta/qt-meta-3.3.8d.ebuild b/dev-qt/qt-meta/qt-meta-3.3.8d.ebuild
new file mode 100644
index 00000000..d64ac5d3
--- /dev/null
+++ b/dev-qt/qt-meta/qt-meta-3.3.8d.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=3
+
+DESCRIPTION="This is a meta package for a Qt3 toolkit it is needed to keep dependencies clean"
+HOMEPAGE="http://qt.nokia.com/ http://www.trinitydesktop.org/"
+
+LICENSE="|| ( QPL-1.0 GPL-2 GPL-3 )"
+SLOT="3"
+KEYWORDS="amd64 x86"
+IUSE="cups debug doc examples firebird ipv6 mysql nas nis opengl postgres sqlite xinerama"
+
+DEPEND="
+ =dev-qt/qt-${PV}:${SLOT}[cups=,debug=,doc=,examples=,firebird=,ipv6=,mysql=]
+ =dev-qt/qt-${PV}:${SLOT}[nas=,nis=,opengl=,postgres=,sqlite=,xinerama=]"
+RDEPEND="${DEPEND}"
+
+pkg_postinst() {
+ echo
+ einfo "Please note that this meta package is only provided for capability."
+ einfo "No packages should depend directly on this meta package, but on the"
+ einfo "dev-qt/qt:${SLOT} package."
+ echo
+}
diff --git a/dev-qt/qt-meta/qt-meta-3.9999.ebuild b/dev-qt/qt-meta/qt-meta-3.9999.ebuild
new file mode 100644
index 00000000..5999dde5
--- /dev/null
+++ b/dev-qt/qt-meta/qt-meta-3.9999.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=3
+
+DESCRIPTION="This is a meta package for a Qt3 toolkit it is needed to keep dependencies clean"
+HOMEPAGE="http://qt.nokia.com/ http://www.trinitydesktop.org/"
+
+LICENSE="|| ( QPL-1.0 GPL-2 GPL-3 )"
+SLOT="3"
+KEYWORDS=
+IUSE="cups debug doc examples firebird ipv6 mysql nas nis opengl postgres sqlite xinerama"
+
+DEPEND="
+ =dev-qt/qt-${PV}:${SLOT}[cups=,debug=,doc=,examples=,firebird=,ipv6=,mysql=]
+ =dev-qt/qt-${PV}:${SLOT}[nas=,nis=,opengl=,postgres=,sqlite=,xinerama=]"
+RDEPEND="${DEPEND}"
+
+pkg_postinst() {
+ echo
+ einfo "Please note that this meta package is only provided for capability."
+ einfo "No packages should depend directly on this meta package, but on the"
+ einfo "dev-qt/qt:${SLOT} package."
+ echo
+}
diff --git a/dev-qt/qt/Manifest b/dev-qt/qt/Manifest
new file mode 100644
index 00000000..e2d3452b
--- /dev/null
+++ b/dev-qt/qt/Manifest
@@ -0,0 +1,17 @@
+AUX trinity-3.5.13.1..3.5.13.2/qt3-2012-12-12_02_54_53-Ensure-that-a-valid-DPI-is-always-set-cbe0a27.patch 1053 SHA256 6822c2f3c59c621ba853f583f9fdf2cd6b7ac1b069d1a2ec147e2f4ee6a7aa7b SHA512 c2209b9a61c817422df932f7d844f07a85ac3cc0f6a75770cf3eac279419c5b95091d919a533fac94c72e8b2f98004a5c858870a15660c0b33cb0d94a5aeb431 WHIRLPOOL c434a0f5e7d9b801bb0a6a5c68f564b32b876b2c66ab2bd6511b54cc9755c35cd6f2d3bd8e9deba4dd302dcceb0615d408371f36d1129cadd65246f64ff7098c
+AUX trinity-3.5.13.1..3.5.13.2/qt3-2013-01-13_02_45_04-Verify-desktop-widget-screen-number-before-applying-size-changes-This-resolves-Bug-1378-b8ca17c.patch 1412 SHA256 1c53a022a723f25ca9661d9b6baa552e9ff1cf76f6d3cba4f9f19b8b8c547a1a SHA512 d625c0c6adf436de29780ba5bbf077a30c7fcd6b19c69e2191ab6ad40f20d9f2c2dc0ec55ded01c7bf777c5913c9b5bcac8b09ca1c6a04ea25f39d9fcbb8e137 WHIRLPOOL ed27f89056249d06399f709b4ab8fb5f0fbdc43b8db6cb5935045e061666eb1792b79f1564fd840b9fe880debf2fbd770ed54b29cafc1dd46afb2fea519e3e65
+AUX trinity-3.5.13.1..3.5.13.2/qt3-2013-02-20_21_52_12-Doublebuffer-QIconView-to-reduce-flicker-This-closes-Bug-1408-897cd5c.patch 3266 SHA256 c901cebe79142bb81764138eff6bbdb74c126cd4950555f97924000c791aad96 SHA512 d892a88052a713a8f7d1edcbef15c951aac33a25f1f73e90a63f6b1394413678bf4ed12865710b84ddb4d9536dd452bc1c2f88af7a442807aa0f61aeadff0020 WHIRLPOOL c370ab576e8e68e54a5f0b18c19b19013c762f0434b60cbc595d8f5d465e8c81fdb6496080d4b71f78d4de390a7fbff8181dcce6946eb60f0c7825f2fe1473a5
+AUX trinity-3.5.13.1..3.5.13.2/qt3-2013-03-02_12_16_10-Fix-textbox-trails-introduced-with-GIT-commit-82b71e49-This-resolves-Bug-1408-a78eb9c.patch 599 SHA256 03f4a35d89835a0b3de726492b99d83045a6c4c27170f4c0feaa4d7e7cd361e6 SHA512 b779f7669f40796c9c7b7d4c9e1970b930e661b7247927cdb0c668c084a950dc19bdeab4b15326248ec836987160821fed98f467e8bdfe5c2f250ed8db143f07 WHIRLPOOL 3258ff6dfec41829fe2390bca3cb7739d5fc5d00dcc99f4cc0694c6d2d12f0603b4535ebd2874bb99fae767fa8b63f8bc85e58dfe84f5e108f841f693475f616
+AUX trinity-3.5.13.1..3.5.13.2/qt3-2013-04-13_13_31_15-Properly-set-WM_CLASS-atom-even-if-Display-pointer-was-passed-to-TQApplication-This-relates-to-Bug-1443-045b2d9.patch 1640 SHA256 88cce480013054358856e35df7f734f52a2188276d5ac786707aa7f4eef4575b SHA512 0c6ffd19404633c2ec8d6742fead4713227852174b83fb749656daf4117766d08a94624c81c3e2226d524aa904039337811b4a68878f72170ece0a0ad6136df7 WHIRLPOOL a9ffc49517144ff6c02dbb8be969817baec0960b80e0a2637ecfa3da43f0bf556b9df9c9b93b5485389335b3c24b2fa8ef17224db2c3aa2d5acb46519c7d6d6b
+AUX trinity-3.5.13.1..3.5.13.2/qt3-2013-04-16_17_34_08-Fix-fatal-X11-errors-when-both-external-display-and-command-arguments-are-provided-to-QApplication-This-resolves-Bug-1456-e7d0f7d.patch 1138 SHA256 caca943700c410e75d8bfc8c5b0c07c6041f5a4f1b5068a8ae9907aba3c3e1cb SHA512 121681c67a0417b2ead19d5f3ad206f12f3b10bf997ad12315b2fc3dbc3a60487d90a782cb6899bf4e3a4774cfa06d5233752118acc6b113fd79723b0295e39d WHIRLPOOL 56d5a008c5bcc4e2079e549a596900cd7df763af0f45978e8761c4879e45a466652c3b2184ac6c895181b109a68f5d24f12ce36c7cf7cbfbeda3c7f58fea4c3b
+AUX trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_58-Fix-Qt-input-method-failure-This-resolves-Bug-1019-c421de2.patch 1664 SHA256 c28a05e90a19a7a5e73c1d840f2605e2d457f5030242057fd205155f5fd50c1b SHA512 a3ac74e67fc014e0169ceca4d0df953ce6b1897236f090273196ff36133d25b64b66a7b7781695a790760720fd194243c09e3b33a1f02115c96d519db106f3ab WHIRLPOOL a0ec3ad64708840a1a2b2eefd1118979bcdf6c2f158ec5320f626348c3562df6d855864950aa3f00deb22142807f1555af2e2adb64fffdbdfd215962aa968060
+AUX trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_59-Fix-qmake-library-search-path-on-64-bit-systems-This-resolves-Bug-1016-e374dac.patch 484 SHA256 3ad05e0a17420315039834c6816c540b3c4695fa3c4a969bc2b1ea44f0b1542c SHA512 45c68ec9a00eae11195f71926a256c683fb6d237763555f0889f9f780971d382ee0e75f718b960355a932314ec3e8347d9282d6f9961701acef077b36365b92e WHIRLPOOL da7640575b82f94cd606a4777f9916a7ec6a7f163b8105004433356a8bef8a165154980d00c3d579cfdbc00fc10690f0b1e531c69da9b9eb03bdcd5e6c7ff644
+AUX trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_59-Update-zh-tw-translations-c62cd50.patch 10355 SHA256 9c538abc919d0f54ce7615c2d070f353e894ab712637deabd8aeca5560d3c8a1 SHA512 762e98fcf0772f774524f95d1678e976aa5e8c503a123ef23cf0633baa9d068889ec8259379f5bd021ca37c99c48b9f8ca0f6791de10ad670e62e65b52d2450c WHIRLPOOL 7134d02266ec8356568ed493cde3f99f79e41e3ac422ceb81a0b5d0fac5b47473824ea099f774de426eb893bc487672576f312d716dbbd3c9798fb7439edb065
+AUX trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_00-Add-0084-compositing-patch-from-RedHat-909c3cb.patch 2682 SHA256 d2443d46fdfcfa45fc8fd6249efe4a264a3c4c82df6ae786f1d11582321b49be SHA512 a6f5dc4c6ca4502bc12d0e568e6ce8c4d4d9646a7596376db85b58687be32d9569f6b5f663c8eb282595729c4bea110f9c3b5368d6bb1159548d64b33c4dd92f WHIRLPOOL a4e72e38474c336cee82d35208a2119c67d4d3211d6d191bd79abb53c9de580bca47f45544702717f9a22e8da5e7efce120f60b8ee0c78446ea90fc00c71964f
+AUX trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_00-Use-unixODBC-instead-of-obsolete-iODBC-This-closes-Bug-792-Thanks-to-L0ner-for-the-patch-3f779ee.patch 1531 SHA256 ee56a45c2ec961e67a9aeaf0e232af089e8f99e8f012ea6210db0e8b0de46a0c SHA512 7408f786aea8104e0a2372c1d46493e5cae7bd13a71f6b7e25803b40e5a6170833f6e2c23ae5f680ed8924e354e499efb63c21baa18de486f64ab5332d8408cf WHIRLPOOL 9b97795a571579a0bc0782052c23e4bbf3a95947c070aaebc563c84497f6bedfc43640a3a2ffe0a1dd83fb86270f02fc7ba3a2465a9c103e663f12cd2e549765
+AUX trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_01-Make-basic-integer-QDataStream-reads-resistant-to-corruption-from-underlying-IO-device-failure-60621ef.patch 2928 SHA256 c3736f4297d22c076f107a6b5756ac59cf581b86bb88e2a28cb06fd120cba0ad SHA512 46941d3b677bafd84b1b52efbc56b5b5848423d1f8a9a7f83f485939a2092ce6344dcceeccb524e8ca8b97d3defd060644405d70fadc6f51a8ae6b57d55affbe WHIRLPOOL 031431bca71b586e64b60c63600a8832daa5faee3a150534072bba8d74929fc05639a858739622c5e0552088095e840c2a40a9c6530e58a4f50b20de1b5671a7
+AUX trinity-3.5.13.1..3.5.13.2/qt3-2013-04-25_03_21_44-Fix-a-number-of-threading-problems-and-crashes-This-partially-resolves-Bug-1467-part-of-the-original-commit-b8e4f24.patch 25691 SHA256 7f6156a4f927fae9571c6277e1e4619750c7a0a9d9893a102f262f3105affc65 SHA512 0d9e30ec474e25be3c2542337c5e0ae9f1a2e412d006a528180bdcc692cdab7eb584926e26964453591fd3315ce713ca39660ab50c6688fe4eb3f924fa8bc2e0 WHIRLPOOL b54a8ea84d1d0e850675a0e2168bddd971edb3b493c7f52f7d34d239f4541e3856610dcf05d47b297565bec9e2cb9bbe7aada141703c58fc723f9ffa2f13e424
+AUX trinity-3.5.13.1..3.5.13.2/qt3-2013-05-03_03_47_45-Fix-corrupted-titlebar-icons-in-subwindows-of-ARGB-applications-90f4a55.patch 1996 SHA256 707099432bd702883b488ddf5cd5290b327938168392efc4c03a862abef67000 SHA512 e839b2575def437aa98670298e2804f4f826a6483cf7e220193cf7b641b2b68ec2cf731a23ecb2c8e78bf432d778378e93eccb3d7f51b74cdea68aec0e7b0661 WHIRLPOOL c9d7c1882efa0d41cd19cc4fa175216791d40c053b73714fa67f43ed76b428b2471bf9f447373afddecbcaceeb3febaf7f87ba62d9fec97fc5a3f263c5c89ef8
+AUX trinity-3.5.13.1..3.5.13.2/qt3-2013-05-04_17_28_30-Fix-ARGB-mode-stippled-focus-rectangle-showing-underlying-window-contents-Fix-TQColor-not-processing-alpha-channel-in-ARGB-mode-d2240de.patch 2184 SHA256 3893537b4a328495c717d586b135b940b29ca50de9240878cec350e0208f79f3 SHA512 68c73892f8cc011392261267b3a9ed38b4989e9ed3adbe34982ee1d220be9dba503ec9bf383b29f601b2fc11f490db33b7802c21223050d581ea84b683f0943d WHIRLPOOL 10525ee058888558c191dfe0922f45f53df60a9594e921c6cee94ddcbcbfc2efe3aeb18ab73372adfac3ecfb49943ef875cd936ae1bc01f8da2f3a1baba969db
+AUX trinity-3.5.13.1..3.5.13.2/qt3-2013-05-08_01_43_38-Fix-spelling-mistakes-169c39a.patch 3103 SHA256 19e830e3dcdb0888cd00a94ba9acafb9d6b2c22961306d4a796b5fabba63e449 SHA512 107d8c84fd480b8cbcb93b30ca1f78352e53a776d64221378fc4b5fb9f08decc5edec2973377d37785cc02bdd68c7c305dde2c2a1fad3827ea1964b28b72857c WHIRLPOOL c7c073884cbb99451784a2cf27fa7a7b3dce927e9f6be8111875272e58adb4b689f156d4c0f72896dbbc72473597456910422013d487a2082616d08c213b6db5
+DIST qt3-3.5.13.1.tar.gz 16618074 SHA256 6d124412f89eb7c445668e339cd10114778b3efe56f061886364a0b27141a6ff SHA512 7adda5a6ee2c72086e672230dcd9088d39d975ee802dfc1ac4fcbb0b9cdd2feeac3b1a7147663ffb57b285e0631b14735930ea1f33904c37b000d96c0859ae84 WHIRLPOOL e0afdbc051f6d215ad6e46ec6a9756e96d303177d32c21ee7d944a1abe5b58b153da5afb01942b747278b92876203e05076cd18a0e75a51c5ab3c52b6b25eda6
diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2012-12-12_02_54_53-Ensure-that-a-valid-DPI-is-always-set-cbe0a27.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2012-12-12_02_54_53-Ensure-that-a-valid-DPI-is-always-set-cbe0a27.patch
new file mode 100644
index 00000000..313d9ee5
--- /dev/null
+++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2012-12-12_02_54_53-Ensure-that-a-valid-DPI-is-always-set-cbe0a27.patch
@@ -0,0 +1,26 @@
+diff --git a/src/kernel/qpaintdevice_x11.cpp b/src/kernel/qpaintdevice_x11.cpp
+index a755c01..5941657 100644
+--- a/src/kernel/qpaintdevice_x11.cpp
++++ b/src/kernel/qpaintdevice_x11.cpp
+@@ -529,11 +529,16 @@ static void create_dpis()
+ Q_CHECK_PTR( dpisX );
+ Q_CHECK_PTR( dpisY );
+ for ( i = 0; i < screens; i++ ) {
+- dpisX[ i ] = (DisplayWidth(dpy,i) * 254 + DisplayWidthMM(dpy,i)*5)
+-
+- / (DisplayWidthMM(dpy,i)*10);
+- dpisY[ i ] = (DisplayHeight(dpy,i) * 254 + DisplayHeightMM(dpy,i)*5)
+- / (DisplayHeightMM(dpy,i)*10);
++ if (DisplayWidthMM(dpy,i) < 1)
++ dpisX[ i ] = 75; // default the dpi to 75.
++ else
++ dpisX[ i ] = (DisplayWidth(dpy,i) * 254 + DisplayWidthMM(dpy,i)*5)
++ / (DisplayWidthMM(dpy,i)*10);
++ if (DisplayHeightMM(dpy,i) < 1)
++ dpisY[ i ] = 75; // default the dpi to 75.
++ else
++ dpisY[ i ] = (DisplayHeight(dpy,i) * 254 + DisplayHeightMM(dpy,i)*5)
++ / (DisplayHeightMM(dpy,i)*10);
+ }
+ }
+
diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-01-13_02_45_04-Verify-desktop-widget-screen-number-before-applying-size-changes-This-resolves-Bug-1378-b8ca17c.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-01-13_02_45_04-Verify-desktop-widget-screen-number-before-applying-size-changes-This-resolves-Bug-1378-b8ca17c.patch
new file mode 100644
index 00000000..980268de
--- /dev/null
+++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-01-13_02_45_04-Verify-desktop-widget-screen-number-before-applying-size-changes-This-resolves-Bug-1378-b8ca17c.patch
@@ -0,0 +1,38 @@
+diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp
+index 203cb39..4a03d95 100644
+--- a/src/kernel/qapplication_x11.cpp
++++ b/src/kernel/qapplication_x11.cpp
+@@ -3446,13 +3446,26 @@ int QApplication::x11ProcessEvent( XEvent* event )
+ // update the size for desktop widget
+ int scr = XRRRootToScreen( appDpy, event->xany.window );
+ QWidget *w = desktop()->screen( scr );
+- QSize oldSize( w->size() );
+- w->crect.setWidth( DisplayWidth( appDpy, scr ) );
+- w->crect.setHeight( DisplayHeight( appDpy, scr ) );
+- if ( w->size() != oldSize ) {
+- QResizeEvent e( w->size(), oldSize );
+- QApplication::sendEvent( w, &e );
+- emit desktop()->resized( scr );
++
++ if (w) {
++ int widgetScr = -1;
++ // make sure the specified widget is on the same screen that received the XRandR event
++ XWindowAttributes widgetAttr;
++ XGetWindowAttributes(appDpy, w->winId(), &widgetAttr);
++ if (widgetAttr.screen) {
++ widgetScr = XScreenNumberOfScreen(widgetAttr.screen);
++ }
++
++ if ((widgetScr < 0) || (widgetScr == scr)) {
++ QSize oldSize( w->size() );
++ w->crect.setWidth( DisplayWidth( appDpy, scr ) );
++ w->crect.setHeight( DisplayHeight( appDpy, scr ) );
++ if ( w->size() != oldSize ) {
++ QResizeEvent e( w->size(), oldSize );
++ QApplication::sendEvent( w, &e );
++ emit desktop()->resized( scr );
++ }
++ }
+ }
+ }
+ #endif // QT_NO_XRANDR
diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-02-20_21_52_12-Doublebuffer-QIconView-to-reduce-flicker-This-closes-Bug-1408-897cd5c.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-02-20_21_52_12-Doublebuffer-QIconView-to-reduce-flicker-This-closes-Bug-1408-897cd5c.patch
new file mode 100644
index 00000000..6da074b5
--- /dev/null
+++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-02-20_21_52_12-Doublebuffer-QIconView-to-reduce-flicker-This-closes-Bug-1408-897cd5c.patch
@@ -0,0 +1,98 @@
+diff --git a/src/iconview/qiconview.cpp b/src/iconview/qiconview.cpp
+index c1ea8cc..36b5da2 100644
+--- a/src/iconview/qiconview.cpp
++++ b/src/iconview/qiconview.cpp
+@@ -214,6 +214,7 @@ public:
+ QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem,
+ *startDragItem, *pressedItem, *selectAnchor, *renamingItem;
+ QRect *rubber;
++ QPixmap *backBuffer;
+ QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer,
+ *fullRedrawTimer;
+ int rastX, rastY, spacing;
+@@ -2789,6 +2790,7 @@ QIconView::QIconView( QWidget *parent, const char *name, WFlags f )
+ d->currentItem = 0;
+ d->highlightedItem = 0;
+ d->rubber = 0;
++ d->backBuffer = 0;
+ d->scrollTimer = 0;
+ d->startDragItem = 0;
+ d->tmpCurrentItem = 0;
+@@ -2942,6 +2944,8 @@ QIconView::~QIconView()
+ delete item;
+ item = tmp;
+ }
++ delete d->backBuffer;
++ d->backBuffer = 0;
+ delete d->fm;
+ d->fm = 0;
+ #ifndef QT_NO_TOOLTIP
+@@ -4943,6 +4947,47 @@ void QIconView::contentsDropEvent( QDropEvent *e )
+ #endif
+
+ /*!
++ This function grabs all paintevents that otherwise would have been
++ processed by the QScrollView::viewportPaintEvent(). Here we use a
++ doublebuffer to reduce 'on-paint' flickering on QIconView
++ (and of course its children).
++
++ \sa QScrollView::viewportPaintEvent(), QIconView::drawContents()
++*/
++
++void QIconView::bufferedPaintEvent( QPaintEvent* pe )
++{
++ QWidget* vp = viewport();
++ QRect r = pe->rect() & vp->rect();
++ int ex = r.x() + contentsX();
++ int ey = r.y() + contentsY();
++ int ew = r.width();
++ int eh = r.height();
++
++ if ( !d->backBuffer )
++ d->backBuffer = new QPixmap(vp->size());
++ if ( d->backBuffer->size() != vp->size() ) {
++ // Resize function (with hysteresis). Uses a good compromise between memory
++ // consumption and speed (number) of resizes.
++ float newWidth = (float)vp->width();
++ float newHeight = (float)vp->height();
++ if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() )
++ {
++ newWidth *= 1.1892;
++ newHeight *= 1.1892;
++ d->backBuffer->resize( (int)newWidth, (int)newHeight );
++ } else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() )
++ d->backBuffer->resize( (int)newWidth, (int)newHeight );
++ }
++
++ QPainter p;
++ p.begin(d->backBuffer, vp);
++ drawContentsOffset(&p, contentsX(), contentsY(), ex, ey, ew, eh);
++ p.end();
++ bitBlt(vp, r.x(), r.y(), d->backBuffer, r.x(), r.y(), ew, eh);
++}
++
++/*!
+ \reimp
+ */
+
+@@ -5726,7 +5771,7 @@ bool QIconView::eventFilter( QObject * o, QEvent * e )
+ if ( !d->rubber )
+ drawDragShapes( d->oldDragPos );
+ }
+- viewportPaintEvent( (QPaintEvent*)e );
++ bufferedPaintEvent( (QPaintEvent*)e );
+ if ( d->dragging ) {
+ if ( !d->rubber )
+ drawDragShapes( d->oldDragPos );
+diff --git a/src/iconview/qiconview.h b/src/iconview/qiconview.h
+index 97780d8..109779f 100644
+--- a/src/iconview/qiconview.h
++++ b/src/iconview/qiconview.h
+@@ -452,6 +452,7 @@ protected:
+ void contentsDropEvent( QDropEvent *e );
+ #endif
+
++ void bufferedPaintEvent( QPaintEvent* );
+ void resizeEvent( QResizeEvent* e );
+ void keyPressEvent( QKeyEvent *e );
+ void focusInEvent( QFocusEvent *e );
diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-03-02_12_16_10-Fix-textbox-trails-introduced-with-GIT-commit-82b71e49-This-resolves-Bug-1408-a78eb9c.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-03-02_12_16_10-Fix-textbox-trails-introduced-with-GIT-commit-82b71e49-This-resolves-Bug-1408-a78eb9c.patch
new file mode 100644
index 00000000..3a8768d0
--- /dev/null
+++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-03-02_12_16_10-Fix-textbox-trails-introduced-with-GIT-commit-82b71e49-This-resolves-Bug-1408-a78eb9c.patch
@@ -0,0 +1,19 @@
+diff --git a/src/iconview/qiconview.cpp b/src/iconview/qiconview.cpp
+index 36b5da2..4387a19 100644
+--- a/src/iconview/qiconview.cpp
++++ b/src/iconview/qiconview.cpp
+@@ -5770,11 +5770,11 @@ bool QIconView::eventFilter( QObject * o, QEvent * e )
+ if ( d->dragging ) {
+ if ( !d->rubber )
+ drawDragShapes( d->oldDragPos );
+- }
+- bufferedPaintEvent( (QPaintEvent*)e );
+- if ( d->dragging ) {
++ viewportPaintEvent( (QPaintEvent*)e );
+ if ( !d->rubber )
+ drawDragShapes( d->oldDragPos );
++ } else {
++ bufferedPaintEvent( (QPaintEvent*)e );
+ }
+ }
+ return TRUE;
diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-13_13_31_15-Properly-set-WM_CLASS-atom-even-if-Display-pointer-was-passed-to-TQApplication-This-relates-to-Bug-1443-045b2d9.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-13_13_31_15-Properly-set-WM_CLASS-atom-even-if-Display-pointer-was-passed-to-TQApplication-This-relates-to-Bug-1443-045b2d9.patch
new file mode 100644
index 00000000..2daa09f7
--- /dev/null
+++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-13_13_31_15-Properly-set-WM_CLASS-atom-even-if-Display-pointer-was-passed-to-TQApplication-This-relates-to-Bug-1443-045b2d9.patch
@@ -0,0 +1,46 @@
+diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp
+index 7296f4c..0ec4904 100644
+--- a/src/kernel/qapplication.cpp
++++ b/src/kernel/qapplication.cpp
+@@ -320,6 +320,7 @@ void qt_init( int *, char **, QApplication::Type );
+ void qt_cleanup();
+ #if defined(Q_WS_X11)
+ void qt_init( Display* dpy, Qt::HANDLE, Qt::HANDLE );
++void qt_init( int *, char **, Display* dpy, Qt::HANDLE, Qt::HANDLE );
+ #endif
+ Q_EXPORT bool qt_tryModalHelper( QWidget *widget, QWidget **rettop );
+
+@@ -908,7 +909,7 @@ QApplication::QApplication(Display *dpy, int argc, char **argv,
+
+ qt_init( &argc, argv, GuiClient );
+ } else {
+- qt_init(dpy, visual, colormap);
++ qt_init( &argc, argv, dpy, visual, colormap );
+ }
+
+ process_cmdline( &argc, argv );
+diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp
+index 4a03d95..0f9d777 100644
+--- a/src/kernel/qapplication_x11.cpp
++++ b/src/kernel/qapplication_x11.cpp
+@@ -1639,7 +1639,7 @@ void qt_init_internal( int *argcptr, char **argv,
+ }
+ #endif
+
+- if ( display ) {
++ if ( display && ((!argcptr) || (!argv)) ) {
+ // Qt part of other application
+
+ appForeignDpy = TRUE;
+@@ -2439,6 +2439,11 @@ void qt_init( Display *display, Qt::HANDLE visual, Qt::HANDLE colormap )
+ qt_init_internal( 0, 0, display, visual, colormap );
+ }
+
++void qt_init( int *argcptr, char **argv, Display *display, Qt::HANDLE visual, Qt::HANDLE colormap )
++{
++ qt_init_internal( argcptr, argv, display, visual, colormap );
++}
++
+
+ /*****************************************************************************
+ qt_cleanup() - cleans up when the application is finished
diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-16_17_34_08-Fix-fatal-X11-errors-when-both-external-display-and-command-arguments-are-provided-to-QApplication-This-resolves-Bug-1456-e7d0f7d.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-16_17_34_08-Fix-fatal-X11-errors-when-both-external-display-and-command-arguments-are-provided-to-QApplication-This-resolves-Bug-1456-e7d0f7d.patch
new file mode 100644
index 00000000..40426ef8
--- /dev/null
+++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-16_17_34_08-Fix-fatal-X11-errors-when-both-external-display-and-command-arguments-are-provided-to-QApplication-This-resolves-Bug-1456-e7d0f7d.patch
@@ -0,0 +1,42 @@
+diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp
+index 0f9d777..50a2bac 100644
+--- a/src/kernel/qapplication_x11.cpp
++++ b/src/kernel/qapplication_x11.cpp
+@@ -1790,18 +1790,26 @@ void qt_init_internal( int *argcptr, char **argv,
+ }
+ }
+ #endif
+- // Connect to X server
+-
+- if( qt_is_gui_used ) {
+- if ( ( appDpy = XOpenDisplay(appDpyName) ) == 0 ) {
+- qWarning( "%s: cannot connect to X server %s", appName,
+- XDisplayName(appDpyName) );
+- qApp = 0;
+- exit( 1 );
+- }
++ if ( display ) {
++ // Display connection already opened by another application
+
+- if ( appSync ) // if "-sync" argument
+- XSynchronize( appDpy, TRUE );
++ appForeignDpy = TRUE;
++ appDpy = display;
++ }
++ else {
++ // Connect to X server
++
++ if( qt_is_gui_used ) {
++ if ( ( appDpy = XOpenDisplay(appDpyName) ) == 0 ) {
++ qWarning( "%s: cannot connect to X server %s", appName,
++ XDisplayName(appDpyName) );
++ qApp = 0;
++ exit( 1 );
++ }
++
++ if ( appSync ) // if "-sync" argument
++ XSynchronize( appDpy, TRUE );
++ }
+ }
+ }
+ // Common code, regardless of whether display is foreign.
diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_58-Fix-Qt-input-method-failure-This-resolves-Bug-1019-c421de2.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_58-Fix-Qt-input-method-failure-This-resolves-Bug-1019-c421de2.patch
new file mode 100644
index 00000000..3df8e73b
--- /dev/null
+++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_58-Fix-Qt-input-method-failure-This-resolves-Bug-1019-c421de2.patch
@@ -0,0 +1,45 @@
+diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp
+index 50a2bac..9236f3a 100644
+--- a/src/kernel/qapplication_x11.cpp
++++ b/src/kernel/qapplication_x11.cpp
+@@ -195,7 +195,7 @@ static const char *appBTNCol = 0; // application btn color
+ static const char *mwGeometry = 0; // main widget geometry
+ static const char *mwTitle = 0; // main widget title
+ //Ming-Che 10/10
+-char *qt_ximServer = 0; // XIM Server will connect to
++Q_EXPORT char *qt_ximServer = 0; // XIM Server will connect to
+ static bool mwIconic = FALSE; // main widget iconified
+ //Ming-Che 10/10
+ static Display *appDpy = 0; // X11 application display
+@@ -415,13 +415,13 @@ static bool qt_x11EventFilter( XEvent* ev )
+
+ #if !defined(QT_NO_XIM)
+ //XIM qt_xim = 0;
+-XIMStyle qt_xim_style = 0;
+-XIMStyle qt_xim_preferred_style = 0;
+-static XIMStyle xim_default_style = XIMPreeditCallbacks | XIMStatusNothing;
++Q_EXPORT XIMStyle qt_xim_style = 0;
++Q_EXPORT XIMStyle qt_xim_preferred_style = 0;
++Q_EXPORT static XIMStyle xim_default_style = XIMPreeditCallbacks | XIMStatusNothing;
+ #endif
+
+-int qt_ximComposingKeycode=0;
+-QTextCodec * qt_input_mapper = 0;
++Q_EXPORT int qt_ximComposingKeycode=0;
++Q_EXPORT QTextCodec * qt_input_mapper = 0;
+
+ Q_EXPORT Time qt_x_time = CurrentTime;
+ Q_EXPORT Time qt_x_user_time = CurrentTime;
+diff --git a/src/kernel/qinputcontext.h b/src/kernel/qinputcontext.h
+index 99e5d37..5b2650a 100644
+--- a/src/kernel/qinputcontext.h
++++ b/src/kernel/qinputcontext.h
+@@ -69,7 +69,7 @@ struct QInputContextMenu {
+ };
+
+
+-class QInputContext : public QObject
++class Q_EXPORT QInputContext : public QObject
+ {
+ Q_OBJECT
+ public:
diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_59-Fix-qmake-library-search-path-on-64-bit-systems-This-resolves-Bug-1016-e374dac.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_59-Fix-qmake-library-search-path-on-64-bit-systems-This-resolves-Bug-1016-e374dac.patch
new file mode 100644
index 00000000..42d1ce7a
--- /dev/null
+++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_59-Fix-qmake-library-search-path-on-64-bit-systems-This-resolves-Bug-1016-e374dac.patch
@@ -0,0 +1,13 @@
+diff --git a/mkspecs/linux-g++-64/qmake.conf b/mkspecs/linux-g++-64/qmake.conf
+index 716e5c0..f891b3e 100644
+--- a/mkspecs/linux-g++-64/qmake.conf
++++ b/mkspecs/linux-g++-64/qmake.conf
+@@ -45,7 +45,7 @@ QMAKE_LIBDIR =
+ QMAKE_INCDIR_X11 = /usr/X11R6/include
+ QMAKE_LIBDIR_X11 = /usr/X11R6/lib64
+ QMAKE_INCDIR_QT = $(QTDIR)/include
+-QMAKE_LIBDIR_QT = $(QTDIR)/lib
++QMAKE_LIBDIR_QT = $(QTDIR)/lib64
+ QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+ QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib64
+
diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_59-Update-zh-tw-translations-c62cd50.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_59-Update-zh-tw-translations-c62cd50.patch
new file mode 100644
index 00000000..b0cd4d11
--- /dev/null
+++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_59-Update-zh-tw-translations-c62cd50.patch
@@ -0,0 +1,253 @@
+diff --git a/translations/qt_zh-tw.ts b/translations/qt_zh-tw.ts
+index 8260fe4..0f0eaa8 100644
+--- a/translations/qt_zh-tw.ts
++++ b/translations/qt_zh-tw.ts
+@@ -115,7 +115,7 @@
+ </message>
+ <message>
+ <source>Menu</source>
+- <translation>Menu</translation>
++ <translation>選單</translation>
+ </message>
+ <message>
+ <source>Help</source>
+@@ -337,7 +337,7 @@
+ </message>
+ <message>
+ <source>A&amp;lpha channel:</source>
+- <translation>Alpha 色頻(&amp;L):</translation>
++ <translation>透明色頻(&amp;L):</translation>
+ </message>
+ <message>
+ <source>&amp;Basic colors</source>
+@@ -429,11 +429,11 @@
+ </message>
+ <message>
+ <source>Read: %1</source>
+- <translation>讀取: %1</translation>
++ <translation>讀取:%1</translation>
+ </message>
+ <message>
+ <source>Write: %1</source>
+- <translation>寫入: %1</translation>
++ <translation>寫入:%1</translation>
+ </message>
+ <message>
+ <source>Cancel</source>
+@@ -1194,7 +1194,7 @@ to
+ </message>
+ <message>
+ <source>Customize...</source>
+- <translation>自訂...</translation>
++ <translation>自訂…</translation>
+ </message>
+ </context>
+ <context>
+@@ -1264,7 +1264,7 @@ to
+ </message>
+ <message>
+ <source>&lt;h3&gt;About Qt&lt;/h3&gt;&lt;p&gt;This program uses Qt version %1.&lt;/p&gt;&lt;p&gt;Qt is a C++ toolkit for multiplatform GUI &amp;amp; application development.&lt;/p&gt;&lt;p&gt;Qt provides single-source portability across MS&amp;nbsp;Windows, Mac&amp;nbsp;OS&amp;nbsp;X, Linux, and all major commercial Unix variants.&lt;br&gt;Qt is also available for embedded devices.&lt;/p&gt;&lt;p&gt;Qt is a Trolltech product. See &lt;tt&gt;http://www.trolltech.com/qt/&lt;/tt&gt; for more information.&lt;/p&gt;</source>
+- <translation>&lt;h3&gt;關於 Qt&lt;/h3&gt;&lt;p&gt;本程式使用 Qt 版本 %1。&lt;/p&gt;&lt;p&gt;Qt 是用於多平台 GUI 和應用程式開發的 C++ 工具套件。&lt;/p&gt;&lt;p&gt;Qt 為 MS&amp;nbsp;Windows、Mac&amp;nbsp;OS&amp;nbsp;X、Linux 和所有主要的商用 Unix 變異版本,提供跨平台的單一原始碼可攜性。&lt;br&gt;Qt 也可用於內嵌裝置。&lt;/p&gt;&lt;p&gt;Qt 是 Trolltech 的產品。如需詳細資訊,請參閱 &lt;tt&gt;http://www.trolltech.com/qt/&lt;/tt&gt;。&lt;/p&gt;</translation>
++ <translation>&lt;h3&gt;關於 Qt&lt;/h3&gt;&lt;p&gt;本程式使用 Qt 版本 %1。&lt;/p&gt;&lt;p&gt;Qt 是用於多平臺 GUI 和應用程式開發的 C++ 工具套件。&lt;/p&gt;&lt;p&gt;Qt 為 MS&amp;nbsp;Windows、Mac&amp;nbsp;OS&amp;nbsp;X、Linux 和所有主要的商用 Unix 變異版本,提供跨平臺的單一原始碼可攜性。&lt;br&gt;Qt 也可用於內嵌裝置。&lt;/p&gt;&lt;p&gt;Qt 是 Trolltech 的產品。如需詳細資訊,請參閱 &lt;tt&gt;http://www.trolltech.com/qt/&lt;/tt&gt;。&lt;/p&gt;</translation>
+ </message>
+ </context>
+ <context>
+@@ -1282,7 +1282,7 @@ to
+ </message>
+ <message>
+ <source>Aliases: %1</source>
+- <translation>別名: %1</translation>
++ <translation>別名:%1</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+@@ -1338,7 +1338,7 @@ to
+ </message>
+ <message>
+ <source>Browse...</source>
+- <translation>瀏覽...</translation>
++ <translation>瀏覽…</translation>
+ </message>
+ <message>
+ <source>Options</source>
+@@ -1386,123 +1386,123 @@ to
+ </message>
+ <message>
+ <source>A0 (841 x 1189 mm)</source>
+- <translation>A0 (841 x 1189 mm)</translation>
++ <translation>A0 (841 x 1189 公釐)</translation>
+ </message>
+ <message>
+ <source>A1 (594 x 841 mm)</source>
+- <translation>A1 (594 x 841 mm)</translation>
++ <translation>A1 (594 x 841 公釐)</translation>
+ </message>
+ <message>
+ <source>A2 (420 x 594 mm)</source>
+- <translation>A2 (420 x 594 mm)</translation>
++ <translation>A2 (420 x 594 公釐)</translation>
+ </message>
+ <message>
+ <source>A3 (297 x 420 mm)</source>
+- <translation>A3 (297 x 420 mm)</translation>
++ <translation>A3 (297 x 420 公釐)</translation>
+ </message>
+ <message>
+ <source>A4 (210x297 mm, 8.26x11.7 inches)</source>
+- <translation>A4 (210x297 mm,8.26x11.7 英吋)</translation>
++ <translation>A4 (210x297 公釐,8.26x11.7 英吋)</translation>
+ </message>
+ <message>
+ <source>A5 (148 x 210 mm)</source>
+- <translation>A5 (148 x 210 mm)</translation>
++ <translation>A5 (148 x 210 公釐)</translation>
+ </message>
+ <message>
+ <source>A6 (105 x 148 mm)</source>
+- <translation>A6 (105 x 148 mm)</translation>
++ <translation>A6 (105 x 148 公釐)</translation>
+ </message>
+ <message>
+ <source>A7 (74 x 105 mm)</source>
+- <translation>A7 (74 x 105 mm)</translation>
++ <translation>A7 (74 x 105 公釐)</translation>
+ </message>
+ <message>
+ <source>A8 (52 x 74 mm)</source>
+- <translation>A8 (52 x 74 mm)</translation>
++ <translation>A8 (52 x 74 公釐)</translation>
+ </message>
+ <message>
+ <source>A9 (37 x 52 mm)</source>
+- <translation>A9 (37 x 52 mm)</translation>
++ <translation>A9 (37 x 52 公釐)</translation>
+ </message>
+ <message>
+ <source>B0 (1000 x 1414 mm)</source>
+- <translation>B0 (1000 x 1414 mm)</translation>
++ <translation>B0 (1000 x 1414 公釐)</translation>
+ </message>
+ <message>
+ <source>B1 (707 x 1000 mm)</source>
+- <translation>B1 (707 x 1000 mm)</translation>
++ <translation>B1 (707 x 1000 公釐)</translation>
+ </message>
+ <message>
+ <source>B2 (500 x 707 mm)</source>
+- <translation>B2 (500 x 707 mm)</translation>
++ <translation>B2 (500 x 707 公釐)</translation>
+ </message>
+ <message>
+ <source>B3 (353 x 500 mm)</source>
+- <translation>B3 (353 x 500 mm)</translation>
++ <translation>B3 (353 x 500 公釐)</translation>
+ </message>
+ <message>
+ <source>B4 (250 x 353 mm)</source>
+- <translation>B4 (250 x 353 mm)</translation>
++ <translation>B4 (250 x 353 公釐)</translation>
+ </message>
+ <message>
+ <source>B5 (176 x 250 mm, 6.93x9.84 inches)</source>
+- <translation>B5 (176 x 250 mm,6.93x9.84 英吋)</translation>
++ <translation>B5 (176 x 250 公釐,6.93x9.84 英吋)</translation>
+ </message>
+ <message>
+ <source>B6 (125 x 176 mm)</source>
+- <translation>B6 (125 x 176 mm)</translation>
++ <translation>B6 (125 x 176 公釐)</translation>
+ </message>
+ <message>
+ <source>B7 (88 x 125 mm)</source>
+- <translation>B7 (88 x 125 mm)</translation>
++ <translation>B7 (88 x 125 公釐)</translation>
+ </message>
+ <message>
+ <source>B8 (62 x 88 mm)</source>
+- <translation>B8 (62 x 88 mm)</translation>
++ <translation>B8 (62 x 88 公釐)</translation>
+ </message>
+ <message>
+ <source>B9 (44 x 62 mm)</source>
+- <translation>B9 (44 x 62 mm)</translation>
++ <translation>B9 (44 x 62 公釐)</translation>
+ </message>
+ <message>
+ <source>B10 (31 x 44 mm)</source>
+- <translation>B10 (31 x 44 mm)</translation>
++ <translation>B10 (31 x 44 公釐)</translation>
+ </message>
+ <message>
+ <source>C5E (163 x 229 mm)</source>
+- <translation>C5E (163 x 229 mm)</translation>
++ <translation>C5E (163 x 229 公釐)</translation>
+ </message>
+ <message>
+ <source>DLE (110 x 220 mm)</source>
+- <translation>DLE (110 x 220 mm)</translation>
++ <translation>DLE (110 x 220 公釐)</translation>
+ </message>
+ <message>
+ <source>Executive (7.5x10 inches, 191x254 mm)</source>
+- <translation>Executive (7.5x10 英吋,191x254 mm)</translation>
++ <translation>Executive (7.5x10 英吋,191x254 公釐)</translation>
+ </message>
+ <message>
+ <source>Folio (210 x 330 mm)</source>
+- <translation>Folio (210 x 330 mm)</translation>
++ <translation>Folio (210 x 330 公釐)</translation>
+ </message>
+ <message>
+ <source>Ledger (432 x 279 mm)</source>
+- <translation>Ledger (432 x 279 mm)</translation>
++ <translation>Ledger (432 x 279 公釐)</translation>
+ </message>
+ <message>
+ <source>Legal (8.5x14 inches, 216x356 mm)</source>
+- <translation>Legal (8.5x14 英吋,216x356 mm)</translation>
++ <translation>Legal (8.5x14 英吋,216x356 公釐)</translation>
+ </message>
+ <message>
+ <source>Letter (8.5x11 inches, 216x279 mm)</source>
+- <translation>Letter (8.5x11 英吋,216x279 mm)</translation>
++ <translation>Letter (8.5x11 英吋,216x279 公釐)</translation>
+ </message>
+ <message>
+ <source>Tabloid (279 x 432 mm)</source>
+- <translation>Tabloid (279 x 432 mm)</translation>
++ <translation>Tabloid (279 x 432 公釐)</translation>
+ </message>
+ <message>
+ <source>US Common #10 Envelope (105 x 241 mm)</source>
+- <translation>美國一般 10 號信封 (105 x 241 mm)</translation>
++ <translation>美國一般 10 號信封 (105 x 241 公釐)</translation>
+ </message>
+ <message>
+ <source>Setup Printer</source>
+@@ -1691,7 +1691,7 @@ to
+ <name>QToolBar</name>
+ <message>
+ <source>More...</source>
+- <translation>其他...</translation>
++ <translation>其他…</translation>
+ </message>
+ </context>
+ <context>
+@@ -1811,7 +1811,7 @@ to
+ </message>
+ <message>
+ <source>&amp;Help</source>
+- <translation>說明(&amp;H)</translation>
++ <translation>求助(&amp;H)</translation>
+ </message>
+ </context>
+ <context>
+@@ -1988,7 +1988,7 @@ to
+ </message>
+ <message>
+ <source>Paste special...</source>
+- <translation>選擇性貼上...</translation>
++ <translation>選擇性貼上…</translation>
+ </message>
+ <message>
+ <source>Clear</source>
diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_00-Add-0084-compositing-patch-from-RedHat-909c3cb.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_00-Add-0084-compositing-patch-from-RedHat-909c3cb.patch
new file mode 100644
index 00000000..b9be973e
--- /dev/null
+++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_00-Add-0084-compositing-patch-from-RedHat-909c3cb.patch
@@ -0,0 +1,73 @@
+diff --git a/src/kernel/qwidget_x11.cpp b/src/kernel/qwidget_x11.cpp
+index 02fdebf..a095025 100644
+--- a/src/kernel/qwidget_x11.cpp
++++ b/src/kernel/qwidget_x11.cpp
+@@ -558,7 +558,10 @@ void QWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
+ wsa.save_under = True;
+ XChangeWindowAttributes( dpy, id, CWOverrideRedirect | CWSaveUnder,
+ &wsa );
+- x11SetWindowType();
++ XClassHint class_hint;
++ class_hint.res_name = (char *) qAppName(); // application name
++ class_hint.res_class = (char *) qAppClass(); // application class
++ XSetClassHint( dpy, id, &class_hint );
+ } else if ( topLevel && !desktop ) { // top-level widget
+ QWidget *p = parentWidget(); // real parent
+ if (p)
+@@ -621,8 +624,6 @@ void QWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
+ else
+ XDeleteProperty(dpy, id, qt_xa_motif_wm_hints);
+
+- x11SetWindowType();
+-
+ // set _NET_WM_WINDOW_STATE
+ if (curr_winstate > 0)
+ XChangeProperty(dpy, id, qt_net_wm_state, XA_ATOM, 32, PropModeReplace,
+@@ -630,11 +631,6 @@ void QWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
+ else
+ XDeleteProperty(dpy, id, qt_net_wm_state);
+
+- // set _NET_WM_PID
+- long curr_pid = getpid();
+- XChangeProperty(dpy, id, qt_net_wm_pid, XA_CARDINAL, 32, PropModeReplace,
+- (unsigned char *) &curr_pid, 1);
+-
+ #ifndef QT_NO_XSYNC
+ // set _NET_WM_SYNC_COUNTER
+ createSyncCounter();
+@@ -646,19 +642,31 @@ void QWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
+ // when we create a toplevel widget, the frame strut should be dirty
+ fstrut_dirty = 1;
+
++ } else {
++ // non-toplevel widgets don't have a frame, so no need to
++ // update the strut
++ fstrut_dirty = 0;
++ }
++
++ if (initializeWindow && (popup || (topLevel && !desktop))) { // properties set on all toplevel windows
++ x11SetWindowType();
++
++ // set _NET_WM_PID
++ long curr_pid = getpid();
++ XChangeProperty(dpy, id, qt_net_wm_pid, XA_CARDINAL, 32, PropModeReplace,
++ (unsigned char *) &curr_pid, 1);
++
+ // declare the widget's object name as window role
+ XChangeProperty( dpy, id,
+ qt_window_role, XA_STRING, 8, PropModeReplace,
+ (unsigned char *)name(), qstrlen( name() ) );
+
+ // set client leader property
++ if ( !qt_x11_wm_client_leader )
++ qt_x11_create_wm_client_leader();
+ XChangeProperty( dpy, id, qt_wm_client_leader,
+ XA_WINDOW, 32, PropModeReplace,
+ (unsigned char *)&qt_x11_wm_client_leader, 1 );
+- } else {
+- // non-toplevel widgets don't have a frame, so no need to
+- // update the strut
+- fstrut_dirty = 0;
+ }
+
+ if ( initializeWindow ) {
diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_00-Use-unixODBC-instead-of-obsolete-iODBC-This-closes-Bug-792-Thanks-to-L0ner-for-the-patch-3f779ee.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_00-Use-unixODBC-instead-of-obsolete-iODBC-This-closes-Bug-792-Thanks-to-L0ner-for-the-patch-3f779ee.patch
new file mode 100644
index 00000000..278aec43
--- /dev/null
+++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_00-Use-unixODBC-instead-of-obsolete-iODBC-This-closes-Bug-792-Thanks-to-L0ner-for-the-patch-3f779ee.patch
@@ -0,0 +1,59 @@
+diff --git a/plugins/src/sqldrivers/odbc/odbc.pro b/plugins/src/sqldrivers/odbc/odbc.pro
+index ac0cf3c..36d35b5 100644
+--- a/plugins/src/sqldrivers/odbc/odbc.pro
++++ b/plugins/src/sqldrivers/odbc/odbc.pro
+@@ -17,7 +17,7 @@ mac {
+ unix {
+ OBJECTS_DIR = .obj
+ !contains( LIBS, .*odbc.* ) {
+- LIBS *= -liodbc
++ LIBS *= -lodbc
+ }
+ }
+
+diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
+index b09afd2..8b0b58b 100644
+--- a/src/sql/drivers/odbc/qsql_odbc.cpp
++++ b/src/sql/drivers/odbc/qsql_odbc.cpp
+@@ -61,19 +61,18 @@
+ #endif
+
+ // newer platform SDKs use SQLLEN instead of SQLINTEGER
+-#ifdef SQLLEN
++#if defined(SQLLEN) || defined(Q_OS_WIN64) || defined(Q_OS_UNIX)
+ # define QSQLLEN SQLLEN
+ #else
+ # define QSQLLEN SQLINTEGER
+ #endif
+
+-#ifdef SQLULEN
++#if defined(SQLULEN) || defined(Q_OS_WIN64) || defined(Q_OS_UNIX)
+ # define QSQLULEN SQLULEN
+ #else
+ # define QSQLULEN SQLUINTEGER
+ #endif
+
+-
+ static const QSQLLEN COLNAMESIZE = 256;
+ //Map Qt parameter types to ODBC types
+ static const SQLSMALLINT qParamType[ 4 ] = { SQL_PARAM_INPUT, SQL_PARAM_INPUT, SQL_PARAM_OUTPUT, SQL_PARAM_INPUT_OUTPUT };
+diff --git a/src/sql/qt_sql.pri b/src/sql/qt_sql.pri
+index 5533c6f..17a6d40 100644
+--- a/src/sql/qt_sql.pri
++++ b/src/sql/qt_sql.pri
+@@ -110,13 +110,13 @@ sql {
+
+ mac {
+ !contains( LIBS, .*odbc.* ) {
+- LIBS *= -liodbc
++ LIBS *= -lodbc
+ }
+ }
+
+ unix {
+ !contains( LIBS, .*odbc.* ) {
+- LIBS *= -liodbc
++ LIBS *= -lodbc
+ }
+ }
+
diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_01-Make-basic-integer-QDataStream-reads-resistant-to-corruption-from-underlying-IO-device-failure-60621ef.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_01-Make-basic-integer-QDataStream-reads-resistant-to-corruption-from-underlying-IO-device-failure-60621ef.patch
new file mode 100644
index 00000000..d8ca2cfc
--- /dev/null
+++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_01-Make-basic-integer-QDataStream-reads-resistant-to-corruption-from-underlying-IO-device-failure-60621ef.patch
@@ -0,0 +1,133 @@
+diff --git a/src/tools/qdatastream.cpp b/src/tools/qdatastream.cpp
+index dfdc20e..2cdd5f7 100644
+--- a/src/tools/qdatastream.cpp
++++ b/src/tools/qdatastream.cpp
+@@ -544,7 +544,10 @@ QDataStream &QDataStream::operator>>( Q_INT8 &i )
+ i = (buf[2] & 0x07)+((buf[1] & 0x07) << 3)+((buf[0] & 0x07) << 6);
+ }
+ } else { // data or text
+- i = (Q_INT8)dev->getch();
++ int ret = dev->getch();
++ if (ret >= 0) {
++ i = (Q_INT8)ret;
++ }
+ }
+ return *this;
+ }
+@@ -574,9 +577,10 @@ QDataStream &QDataStream::operator>>( Q_INT16 &i )
+ } else { // swap bytes
+ register uchar *p = (uchar *)(&i);
+ char b[2];
+- dev->readBlock( b, 2 );
+- *p++ = b[1];
+- *p = b[0];
++ if (dev->readBlock( b, 2 ) >= 2) {
++ *p++ = b[1];
++ *p = b[0];
++ }
+ }
+ return *this;
+ }
+@@ -606,11 +610,12 @@ QDataStream &QDataStream::operator>>( Q_INT32 &i )
+ } else { // swap bytes
+ uchar *p = (uchar *)(&i);
+ char b[4];
+- dev->readBlock( b, 4 );
+- *p++ = b[3];
+- *p++ = b[2];
+- *p++ = b[1];
+- *p = b[0];
++ if (dev->readBlock( b, 4 ) >= 4) {
++ *p++ = b[3];
++ *p++ = b[2];
++ *p++ = b[1];
++ *p = b[0];
++ }
+ }
+ return *this;
+ }
+@@ -643,15 +648,16 @@ QDataStream &QDataStream::operator>>( Q_INT64 &i )
+ } else { // swap bytes
+ uchar *p = (uchar *)(&i);
+ char b[8];
+- dev->readBlock( b, 8 );
+- *p++ = b[7];
+- *p++ = b[6];
+- *p++ = b[5];
+- *p++ = b[4];
+- *p++ = b[3];
+- *p++ = b[2];
+- *p++ = b[1];
+- *p = b[0];
++ if (dev->readBlock( b, 8 ) >= 8) {
++ *p++ = b[7];
++ *p++ = b[6];
++ *p++ = b[5];
++ *p++ = b[4];
++ *p++ = b[3];
++ *p++ = b[2];
++ *p++ = b[1];
++ *p = b[0];
++ }
+ }
+ return *this;
+ }
+@@ -683,9 +689,11 @@ QDataStream &QDataStream::operator>>( Q_LONG &i )
+ } else { // swap bytes
+ register uchar *p = (uchar *)(&i);
+ char b[sizeof(Q_LONG)];
+- dev->readBlock( b, sizeof(Q_LONG) );
+- for ( int j = sizeof(Q_LONG); j; )
+- *p++ = b[--j];
++ if (dev->readBlock( b, sizeof(Q_LONG) ) >= (int)sizeof(Q_LONG)) {
++ for ( int j = sizeof(Q_LONG); j; ) {
++ *p++ = b[--j];
++ }
++ }
+ }
+ return *this;
+ }
+@@ -724,11 +732,12 @@ QDataStream &QDataStream::operator>>( float &f )
+ } else { // swap bytes
+ uchar *p = (uchar *)(&f);
+ char b[4];
+- dev->readBlock( b, 4 );
+- *p++ = b[3];
+- *p++ = b[2];
+- *p++ = b[1];
+- *p = b[0];
++ if (dev->readBlock( b, 4 ) >= 4) {
++ *p++ = b[3];
++ *p++ = b[2];
++ *p++ = b[1];
++ *p = b[0];
++ }
+ }
+ return *this;
+ }
+@@ -752,15 +761,16 @@ QDataStream &QDataStream::operator>>( double &f )
+ } else { // swap bytes
+ register uchar *p = (uchar *)(&f);
+ char b[8];
+- dev->readBlock( b, 8 );
+- *p++ = b[7];
+- *p++ = b[6];
+- *p++ = b[5];
+- *p++ = b[4];
+- *p++ = b[3];
+- *p++ = b[2];
+- *p++ = b[1];
+- *p = b[0];
++ if (dev->readBlock( b, 8 ) >= 8) {
++ *p++ = b[7];
++ *p++ = b[6];
++ *p++ = b[5];
++ *p++ = b[4];
++ *p++ = b[3];
++ *p++ = b[2];
++ *p++ = b[1];
++ *p = b[0];
++ }
+ }
+ return *this;
+ }
diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-25_03_21_44-Fix-a-number-of-threading-problems-and-crashes-This-partially-resolves-Bug-1467-part-of-the-original-commit-b8e4f24.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-25_03_21_44-Fix-a-number-of-threading-problems-and-crashes-This-partially-resolves-Bug-1467-part-of-the-original-commit-b8e4f24.patch
new file mode 100644
index 00000000..c4720315
--- /dev/null
+++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-25_03_21_44-Fix-a-number-of-threading-problems-and-crashes-This-partially-resolves-Bug-1467-part-of-the-original-commit-b8e4f24.patch
@@ -0,0 +1,1052 @@
+diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp
+index 0ec4904..960db1e 100644
+--- a/src/kernel/qapplication.cpp
++++ b/src/kernel/qapplication.cpp
+@@ -546,8 +546,9 @@ static QPostEventList *globalPostedEvents = 0; // list of posted events
+
+ uint qGlobalPostedEventsCount()
+ {
+- if (!globalPostedEvents)
++ if (!globalPostedEvents) {
+ return 0;
++ }
+ return globalPostedEvents->count();
+ }
+
+@@ -2315,8 +2316,9 @@ void QApplication::aboutQt()
+ bool QApplication::notify( QObject *receiver, QEvent *e )
+ {
+ // no events are delivered after ~QApplication() has started
+- if ( is_app_closing )
++ if ( is_app_closing ) {
+ return FALSE;
++ }
+
+ if ( receiver == 0 ) { // serious error
+ #if defined(QT_CHECK_NULL)
+@@ -2358,8 +2360,9 @@ bool QApplication::notify( QObject *receiver, QEvent *e )
+ }
+
+ bool res = FALSE;
+- if ( !receiver->isWidgetType() )
++ if ( !receiver->isWidgetType() ) {
+ res = internalNotify( receiver, e );
++ }
+ else switch ( e->type() ) {
+ #ifndef QT_NO_ACCEL
+ case QEvent::Accel:
+@@ -2367,13 +2370,15 @@ bool QApplication::notify( QObject *receiver, QEvent *e )
+ QKeyEvent* key = (QKeyEvent*) e;
+ res = internalNotify( receiver, e );
+
+- if ( !res && !key->isAccepted() )
++ if ( !res && !key->isAccepted() ) {
+ res = qt_dispatchAccelEvent( (QWidget*)receiver, key );
++ }
+
+ // next lines are for compatibility with Qt <= 3.0.x: old
+ // QAccel was listening on toplevel widgets
+- if ( !res && !key->isAccepted() && !((QWidget*)receiver)->isTopLevel() )
++ if ( !res && !key->isAccepted() && !((QWidget*)receiver)->isTopLevel() ) {
+ res = internalNotify( ((QWidget*)receiver)->topLevelWidget(), e );
++ }
+ }
+ break;
+ #endif //QT_NO_ACCEL
+@@ -3116,8 +3121,9 @@ void QApplication::postEvent( QObject *receiver, QEvent *event )
+ qapp_cleanup_events.set( &globalPostedEvents );
+ }
+
+- if ( !receiver->postedEvents )
++ if ( !receiver->postedEvents ) {
+ receiver->postedEvents = new QPostEventList;
++ }
+ QPostEventList * l = receiver->postedEvents;
+
+ // if this is one of the compressible events, do compression
+@@ -3232,22 +3238,25 @@ void QApplication::sendPostedEvents( QObject *receiver, int event_type )
+ {
+ // Make sure the object hierarchy is stable before processing events
+ // to avoid endless loops
+- if ( receiver == 0 && event_type == 0 )
++ if ( receiver == 0 && event_type == 0 ) {
+ sendPostedEvents( 0, QEvent::ChildInserted );
+-
+- if ( !globalPostedEvents || ( receiver && !receiver->postedEvents ) )
+- return;
++ }
+
+ #ifdef QT_THREAD_SUPPORT
+ QMutexLocker locker( postevent_mutex );
+ #endif
+
++ if ( !globalPostedEvents || ( receiver && !receiver->postedEvents ) ) {
++ return;
++ }
++
+ bool sent = TRUE;
+ while ( sent ) {
+ sent = FALSE;
+
+- if ( !globalPostedEvents || ( receiver && !receiver->postedEvents ) )
++ if ( !globalPostedEvents || ( receiver && !receiver->postedEvents ) ) {
+ return;
++ }
+
+ // if we have a receiver, use the local list. Otherwise, use the
+ // global list
+@@ -3296,8 +3305,9 @@ void QApplication::sendPostedEvents( QObject *receiver, int event_type )
+ if ( e->type() == QEvent::Paint && r->isWidgetType() ) {
+ QWidget * w = (QWidget*)r;
+ QPaintEvent * p = (QPaintEvent*)e;
+- if ( w->isVisible() )
++ if ( w->isVisible() ) {
+ w->repaint( p->reg, p->erase );
++ }
+ } else {
+ sent = TRUE;
+ QApplication::sendEvent( r, e );
+@@ -3318,10 +3328,12 @@ void QApplication::sendPostedEvents( QObject *receiver, int event_type )
+ if ( l == globalPostedEvents ) {
+ globalPostedEvents->first();
+ while( (pe=globalPostedEvents->current()) != 0 ) {
+- if ( pe->event )
++ if ( pe->event ) {
+ globalPostedEvents->next();
+- else
++ }
++ else {
+ globalPostedEvents->remove();
++ }
+ }
+ }
+ }
+diff --git a/src/kernel/qobject.cpp b/src/kernel/qobject.cpp
+index 7790676..375e83b 100644
+--- a/src/kernel/qobject.cpp
++++ b/src/kernel/qobject.cpp
+@@ -471,11 +471,13 @@ QObject::~QObject()
+ blockSig = 0; // unblock signals to keep QGuardedPtr happy
+ emit destroyed( this );
+ emit destroyed();
+- if ( objname )
++ if ( objname ) {
+ delete [] (char*)objname;
++ }
+ objname = 0;
+- if ( pendTimer ) // might be pending timers
++ if ( pendTimer ) { // might be pending timers
+ qKillTimer( this );
++ }
+ QApplication::removePostedEvents( this );
+ if ( isTree ) {
+ remove_tree( this ); // remove from global root list
+@@ -755,12 +757,17 @@ QObject* QObject::child( const char *objName, const char *inheritsClass,
+ bool QObject::event( QEvent *e )
+ {
+ #if defined(QT_CHECK_NULL)
+- if ( e == 0 )
++ if ( e == 0 ) {
+ qWarning( "QObject::event: Null events are not permitted" );
++ }
+ #endif
++ if ( wasDeleted ) {
++ return TRUE;
++ }
+ if ( eventFilters ) { // try filters
+- if ( activate_filters(e) ) // stopped by a filter
++ if ( activate_filters(e) ) { // stopped by a filter
+ return TRUE;
++ }
+ }
+
+ switch ( e->type() ) {
+diff --git a/src/tools/qglist.cpp b/src/tools/qglist.cpp
+index b04ac75..fb94427 100644
+--- a/src/tools/qglist.cpp
++++ b/src/tools/qglist.cpp
+@@ -43,6 +43,10 @@
+ #include "qdatastream.h"
+ #include "qvaluelist.h"
+
++#if defined(QT_THREAD_SUPPORT)
++ #include "qmutex.h"
++#endif // defined(QT_THREAD_SUPPORT)
++
+ /*!
+ \class QLNode qglist.h
+ \reentrant
+@@ -221,6 +225,9 @@ QDataStream &QGList::write( QDataStream &s, QPtrCollection::Item ) const
+
+ QGList::QGList()
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex = new QMutex(true);
++#endif
+ firstNode = lastNode = curNode = 0; // initialize list
+ numNodes = 0;
+ curIndex = -1;
+@@ -234,6 +241,9 @@ QGList::QGList()
+ QGList::QGList( const QGList & list )
+ : QPtrCollection( list )
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex = new QMutex(true);
++#endif
+ firstNode = lastNode = curNode = 0; // initialize list
+ numNodes = 0;
+ curIndex = -1;
+@@ -258,6 +268,9 @@ QGList::~QGList()
+ // twice on the same address! This is insane but let's try not to crash
+ // here.
+ iterators = 0;
++#if defined(QT_THREAD_SUPPORT)
++ //delete mutex;
++#endif
+ }
+
+
+@@ -290,11 +303,13 @@ QGList& QGList::operator=( const QGList &list )
+
+ bool QGList::operator==( const QGList &list ) const
+ {
+- if ( count() != list.count() )
++ if ( count() != list.count() ) {
+ return FALSE;
++ }
+
+- if ( count() == 0 )
++ if ( count() == 0 ) {
+ return TRUE;
++ }
+
+ QLNode *n1 = firstNode;
+ QLNode *n2 = list.firstNode;
+@@ -322,8 +337,15 @@ bool QGList::operator==( const QGList &list ) const
+
+ QLNode *QGList::locate( uint index )
+ {
+- if ( index == (uint)curIndex ) // current node ?
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
++ if ( index == (uint)curIndex ) { // current node ?
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return curNode;
++ }
+ if ( !curNode && firstNode ) { // set current node
+ curNode = firstNode;
+ curIndex = 0;
+@@ -332,13 +354,18 @@ QLNode *QGList::locate( uint index )
+ int distance = index - curIndex; // node distance to cur node
+ bool forward; // direction to traverse
+
+- if ( index >= numNodes )
++ if ( index >= numNodes ) {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return 0;
++ }
+
+- if ( distance < 0 )
++ if ( distance < 0 ) {
+ distance = -distance;
++ }
+ if ( (uint)distance < index && (uint)distance < numNodes - index ) {
+- node = curNode; // start from current node
++ node = curNode; // start from current node
+ forward = index > (uint)curIndex;
+ } else if ( index < numNodes - index ) { // start from first node
+ node = firstNode;
+@@ -352,13 +379,18 @@ QLNode *QGList::locate( uint index )
+ forward = FALSE;
+ }
+ if ( forward ) { // now run through nodes
+- while ( distance-- )
++ while ( distance-- ) {
+ node = node->next;
++ }
+ } else {
+- while ( distance-- )
++ while ( distance-- ) {
+ node = node->prev;
++ }
+ }
+ curIndex = index; // must update index
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return curNode = node;
+ }
+
+@@ -369,6 +401,9 @@ QLNode *QGList::locate( uint index )
+
+ void QGList::inSort( QPtrCollection::Item d )
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ int index = 0;
+ register QLNode *n = firstNode;
+ while ( n && compareItems(n->data,d) < 0 ){ // find position in list
+@@ -376,6 +411,9 @@ void QGList::inSort( QPtrCollection::Item d )
+ index++;
+ }
+ insertAt( index, d );
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ }
+
+
+@@ -385,6 +423,9 @@ void QGList::inSort( QPtrCollection::Item d )
+
+ void QGList::prepend( QPtrCollection::Item d )
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ register QLNode *n = new QLNode( newItem(d) );
+ Q_CHECK_PTR( n );
+ n->prev = 0;
+@@ -395,6 +436,9 @@ void QGList::prepend( QPtrCollection::Item d )
+ firstNode = curNode = n; // curNode affected
+ numNodes++;
+ curIndex = 0;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ }
+
+
+@@ -404,16 +448,24 @@ void QGList::prepend( QPtrCollection::Item d )
+
+ void QGList::append( QPtrCollection::Item d )
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ register QLNode *n = new QLNode( newItem(d) );
+ Q_CHECK_PTR( n );
+ n->next = 0;
+- if ( (n->prev = lastNode) ) // list is not empty
++ if ( (n->prev = lastNode) ) { // list is not empty
+ lastNode->next = n;
+- else // initialize list
++ }
++ else { // initialize list
+ firstNode = n;
++ }
+ lastNode = curNode = n; // curNode affected
+ curIndex = numNodes;
+ numNodes++;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ }
+
+
+@@ -423,25 +475,43 @@ void QGList::append( QPtrCollection::Item d )
+
+ bool QGList::insertAt( uint index, QPtrCollection::Item d )
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ if ( index == 0 ) {
+ prepend( d );
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return TRUE;
+- } else if ( index == numNodes ) {
++ }
++ else if ( index == numNodes ) {
+ append( d );
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return TRUE;
+ }
+ QLNode *nextNode = locate( index );
+- if ( !nextNode )
++ if ( !nextNode ) {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return FALSE;
++ }
+ QLNode *prevNode = nextNode->prev;
+ register QLNode *n = new QLNode( newItem(d) );
+ Q_CHECK_PTR( n );
+ nextNode->prev = n;
++ Q_ASSERT( (!((curIndex > 0) && (!prevNode))) );
+ prevNode->next = n;
+ n->prev = prevNode; // link new node into list
+ n->next = nextNode;
+ curNode = n; // curIndex set by locate()
+ numNodes++;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return TRUE;
+ }
+
+@@ -452,18 +522,30 @@ bool QGList::insertAt( uint index, QPtrCollection::Item d )
+
+ void QGList::relinkNode( QLNode *n )
+ {
+- if ( n == firstNode ) // already first
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
++ if ( n == firstNode ) { // already first
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return;
++ }
+ curNode = n;
+ unlink();
+ n->prev = 0;
+- if ( (n->next = firstNode) ) // list is not empty
++ if ( (n->next = firstNode) ) { // list is not empty
+ firstNode->prev = n;
+- else // initialize list
++ }
++ else { // initialize list
+ lastNode = n;
++ }
+ firstNode = curNode = n; // curNode affected
+ numNodes++;
+ curIndex = 0;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ }
+
+
+@@ -473,8 +555,15 @@ void QGList::relinkNode( QLNode *n )
+
+ QLNode *QGList::unlink()
+ {
+- if ( curNode == 0 ) // null current node
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
++ if ( curNode == 0 ) { // null current node
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return 0;
++ }
+ register QLNode *n = curNode; // unlink this node
+ if ( n == firstNode ) { // removing first node ?
+ if ( (firstNode = n->next) ) {
+@@ -500,9 +589,13 @@ QLNode *QGList::unlink()
+ curIndex--;
+ }
+
+- if ( iterators )
++ if ( iterators ) {
+ iterators->notifyRemove( n, curNode );
++ }
+ numNodes--;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return n;
+ }
+
+@@ -513,6 +606,9 @@ QLNode *QGList::unlink()
+
+ bool QGList::removeNode( QLNode *n )
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ #if defined(QT_CHECK_NULL)
+ if ( n == 0 || (n->prev && n->prev->next != n) ||
+ (n->next && n->next->prev != n) ) {
+@@ -526,6 +622,9 @@ bool QGList::removeNode( QLNode *n )
+ delete n;
+ curNode = firstNode;
+ curIndex = curNode ? 0 : -1;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return TRUE;
+ }
+
+@@ -537,13 +636,27 @@ bool QGList::removeNode( QLNode *n )
+
+ bool QGList::remove( QPtrCollection::Item d )
+ {
+- if ( d && find(d) == -1 )
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
++ if ( d && find(d) == -1 ) {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return FALSE;
++ }
+ QLNode *n = unlink();
+- if ( !n )
++ if ( !n ) {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return FALSE;
++ }
+ deleteItem( n->data );
+ delete n;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return TRUE;
+ }
+
+@@ -553,13 +666,27 @@ bool QGList::remove( QPtrCollection::Item d )
+
+ bool QGList::removeRef( QPtrCollection::Item d )
+ {
+- if ( findRef(d) == -1 )
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
++ if ( findRef(d) == -1 ) {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return FALSE;
++ }
+ QLNode *n = unlink();
+- if ( !n )
++ if ( !n ) {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return FALSE;
++ }
+ deleteItem( n->data );
+ delete n;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return TRUE;
+ }
+
+@@ -581,13 +708,27 @@ bool QGList::removeRef( QPtrCollection::Item d )
+
+ bool QGList::removeAt( uint index )
+ {
+- if ( !locate(index) )
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
++ if ( !locate(index) ) {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return FALSE;
++ }
+ QLNode *n = unlink();
+- if ( !n )
++ if ( !n ) {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return FALSE;
++ }
+ deleteItem( n->data );
+ delete n;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return TRUE;
+ }
+
+@@ -597,13 +738,23 @@ bool QGList::removeAt( uint index )
+ */
+ bool QGList::replaceAt( uint index, QPtrCollection::Item d )
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ QLNode *n = locate( index );
+- if ( !n )
++ if ( !n ) {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return FALSE;
++ }
+ if ( n->data != d ) {
+ deleteItem( n->data );
+ n->data = newItem( d );
+ }
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return TRUE;
+ }
+
+@@ -615,10 +766,16 @@ bool QGList::replaceAt( uint index, QPtrCollection::Item d )
+
+ QPtrCollection::Item QGList::takeNode( QLNode *n )
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ #if defined(QT_CHECK_NULL)
+ if ( n == 0 || (n->prev && n->prev->next != n) ||
+ (n->next && n->next->prev != n) ) {
+ qWarning( "QGList::takeNode: Corrupted node" );
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return 0;
+ }
+ #endif
+@@ -628,6 +785,9 @@ QPtrCollection::Item QGList::takeNode( QLNode *n )
+ delete n; // delete the node, not data
+ curNode = firstNode;
+ curIndex = curNode ? 0 : -1;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return d;
+ }
+
+@@ -637,9 +797,15 @@ QPtrCollection::Item QGList::takeNode( QLNode *n )
+
+ QPtrCollection::Item QGList::take()
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ QLNode *n = unlink(); // unlink node
+ Item d = n ? n->data : 0;
+ delete n; // delete node, keep contents
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return d;
+ }
+
+@@ -649,11 +815,21 @@ QPtrCollection::Item QGList::take()
+
+ QPtrCollection::Item QGList::takeAt( uint index )
+ {
+- if ( !locate(index) )
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
++ if ( !locate(index) ) {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return 0;
++ }
+ QLNode *n = unlink(); // unlink node
+ Item d = n ? n->data : 0;
+ delete n; // delete node, keep contents
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return d;
+ }
+
+@@ -663,10 +839,16 @@ QPtrCollection::Item QGList::takeAt( uint index )
+
+ QPtrCollection::Item QGList::takeFirst()
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ first();
+ QLNode *n = unlink(); // unlink node
+ Item d = n ? n->data : 0;
+ delete n;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return d;
+ }
+
+@@ -676,10 +858,16 @@ QPtrCollection::Item QGList::takeFirst()
+
+ QPtrCollection::Item QGList::takeLast()
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ last();
+ QLNode *n = unlink(); // unlink node
+ Item d = n ? n->data : 0;
+ delete n;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return d;
+ }
+
+@@ -690,14 +878,18 @@ QPtrCollection::Item QGList::takeLast()
+
+ void QGList::clear()
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ register QLNode *n = firstNode;
+
+ firstNode = lastNode = curNode = 0; // initialize list
+ numNodes = 0;
+ curIndex = -1;
+
+- if ( iterators )
++ if ( iterators ) {
+ iterators->notifyClear( FALSE );
++ }
+
+ QLNode *prevNode;
+ while ( n ) { // for all nodes ...
+@@ -706,6 +898,9 @@ void QGList::clear()
+ n = n->next;
+ delete prevNode; // deallocate node
+ }
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ }
+
+
+@@ -716,6 +911,9 @@ void QGList::clear()
+
+ int QGList::findRef( QPtrCollection::Item d, bool fromStart )
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ register QLNode *n;
+ int index;
+ if ( fromStart ) { // start from first node
+@@ -731,6 +929,9 @@ int QGList::findRef( QPtrCollection::Item d, bool fromStart )
+ }
+ curNode = n;
+ curIndex = n ? index : -1;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return curIndex; // return position of item
+ }
+
+@@ -742,6 +943,9 @@ int QGList::findRef( QPtrCollection::Item d, bool fromStart )
+
+ int QGList::find( QPtrCollection::Item d, bool fromStart )
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ register QLNode *n;
+ int index;
+ if ( fromStart ) { // start from first node
+@@ -757,6 +961,9 @@ int QGList::find( QPtrCollection::Item d, bool fromStart )
+ }
+ curNode = n;
+ curIndex = n ? index : -1;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return curIndex; // return position of item
+ }
+
+@@ -767,6 +974,9 @@ int QGList::find( QPtrCollection::Item d, bool fromStart )
+
+ uint QGList::containsRef( QPtrCollection::Item d ) const
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ register QLNode *n = firstNode;
+ uint count = 0;
+ while ( n ) { // for all nodes...
+@@ -774,6 +984,9 @@ uint QGList::containsRef( QPtrCollection::Item d ) const
+ count++;
+ n = n->next;
+ }
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return count;
+ }
+
+@@ -784,6 +997,9 @@ uint QGList::containsRef( QPtrCollection::Item d ) const
+
+ uint QGList::contains( QPtrCollection::Item d ) const
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ register QLNode *n = firstNode;
+ uint count = 0;
+ QGList *that = (QGList*)this; // mutable for compareItems()
+@@ -792,6 +1008,9 @@ uint QGList::contains( QPtrCollection::Item d ) const
+ count++;
+ n = n->next;
+ }
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return count;
+ }
+
+@@ -839,10 +1058,19 @@ uint QGList::contains( QPtrCollection::Item d ) const
+
+ QPtrCollection::Item QGList::first()
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ if ( firstNode ) {
+ curIndex = 0;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return (curNode=firstNode)->data;
+ }
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return 0;
+ }
+
+@@ -852,10 +1080,19 @@ QPtrCollection::Item QGList::first()
+
+ QPtrCollection::Item QGList::last()
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ if ( lastNode ) {
+ curIndex = numNodes-1;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return (curNode=lastNode)->data;
+ }
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return 0;
+ }
+
+@@ -865,15 +1102,24 @@ QPtrCollection::Item QGList::last()
+
+ QPtrCollection::Item QGList::next()
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ if ( curNode ) {
+ if ( curNode->next ) {
+ curIndex++;
+ curNode = curNode->next;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return curNode->data;
+ }
+ curIndex = -1;
+ curNode = 0;
+ }
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return 0;
+ }
+
+@@ -883,15 +1129,24 @@ QPtrCollection::Item QGList::next()
+
+ QPtrCollection::Item QGList::prev()
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ if ( curNode ) {
+ if ( curNode->prev ) {
+ curIndex--;
+ curNode = curNode->prev;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return curNode->data;
+ }
+ curIndex = -1;
+ curNode = 0;
+ }
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return 0;
+ }
+
+@@ -902,9 +1157,16 @@ QPtrCollection::Item QGList::prev()
+
+ void QGList::toVector( QGVector *vector ) const
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ vector->clear();
+- if ( !vector->resize( count() ) )
++ if ( !vector->resize( count() ) ) {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return;
++ }
+ register QLNode *n = firstNode;
+ uint i = 0;
+ while ( n ) {
+@@ -912,10 +1174,16 @@ void QGList::toVector( QGVector *vector ) const
+ n = n->next;
+ i++;
+ }
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ }
+
+ void QGList::heapSortPushDown( QPtrCollection::Item* heap, int first, int last )
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ int r = first;
+ while( r <= last/2 ) {
+ // Node r has only one child ?
+@@ -950,6 +1218,9 @@ void QGList::heapSortPushDown( QPtrCollection::Item* heap, int first, int last )
+ }
+ }
+ }
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ }
+
+
+@@ -962,9 +1233,16 @@ void QGList::heapSortPushDown( QPtrCollection::Item* heap, int first, int last )
+
+ void QGList::sort()
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ uint n = count();
+- if ( n < 2 )
++ if ( n < 2 ) {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return;
++ }
+
+ // Create the heap
+ QPtrCollection::Item* realheap = new QPtrCollection::Item[ n ];
+@@ -995,6 +1273,9 @@ void QGList::sort()
+ }
+
+ delete [] realheap;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ }
+
+
+@@ -1019,6 +1300,9 @@ QDataStream &operator<<( QDataStream &s, const QGList &list )
+
+ QDataStream &QGList::read( QDataStream &s )
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ uint num;
+ s >> num; // read number of items
+ clear(); // clear list
+@@ -1042,6 +1326,9 @@ QDataStream &QGList::read( QDataStream &s )
+ }
+ curNode = firstNode;
+ curIndex = curNode ? 0 : -1;
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return s;
+ }
+
+@@ -1051,12 +1338,18 @@ QDataStream &QGList::read( QDataStream &s )
+
+ QDataStream &QGList::write( QDataStream &s ) const
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ s << count(); // write number of items
+ QLNode *n = firstNode;
+ while ( n ) { // write all items
+ write( s, n->data );
+ n = n->next;
+ }
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return s;
+ }
+
+@@ -1068,9 +1361,15 @@ QDataStream &QGList::write( QDataStream &s ) const
+ */
+ QLNode* QGList::erase( QLNode* it )
+ {
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->lock();
++#endif
+ QLNode* n = it;
+ it = it->next;
+ removeNode( n );
++#if defined(QT_THREAD_SUPPORT)
++ //mutex->unlock();
++#endif
+ return it;
+ }
+
+diff --git a/src/tools/qglist.h b/src/tools/qglist.h
+index fadc46c..dfacf47 100644
+--- a/src/tools/qglist.h
++++ b/src/tools/qglist.h
+@@ -59,6 +59,8 @@ private:
+ QLNode( QPtrCollection::Item d ) { data = d; }
+ };
+
++class QMutex;
++class QGListPrivate;
+ class QGListIteratorList; // internal helper class
+
+ class Q_EXPORT QGList : public QPtrCollection // doubly linked generic list
+@@ -147,6 +149,12 @@ private:
+
+ QLNode *locate( uint ); // get node at i'th pos
+ QLNode *unlink(); // unlink node
++
++#if defined(QT_THREAD_SUPPORT)
++// QMutex* mutex;
++#endif
++
++// QGListPrivate* d;
+ };
+
+
diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-03_03_47_45-Fix-corrupted-titlebar-icons-in-subwindows-of-ARGB-applications-90f4a55.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-03_03_47_45-Fix-corrupted-titlebar-icons-in-subwindows-of-ARGB-applications-90f4a55.patch
new file mode 100644
index 00000000..437dca94
--- /dev/null
+++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-03_03_47_45-Fix-corrupted-titlebar-icons-in-subwindows-of-ARGB-applications-90f4a55.patch
@@ -0,0 +1,63 @@
+diff --git a/src/kernel/qwidget_x11.cpp b/src/kernel/qwidget_x11.cpp
+index a095025..783034e 100644
+--- a/src/kernel/qwidget_x11.cpp
++++ b/src/kernel/qwidget_x11.cpp
+@@ -44,6 +44,7 @@
+ #include "qpaintdevicemetrics.h"
+ #include "qpainter.h"
+ #include "qbitmap.h"
++#include "qimage.h"
+ #include "qobjectlist.h"
+ #include "qlayout.h"
+ #include "qtextcodec.h"
+@@ -1231,14 +1232,47 @@ void QWidget::setIcon( const QPixmap &pixmap )
+ }
+ Pixmap icon_pixmap = 0;
+ Pixmap mask_pixmap = 0;
++ QPixmap* pm = NULL;
+ if ( !pixmap.isNull() ) {
+- QPixmap* pm = new QPixmap( pixmap );
++ if (pixmap.depth() == 24) {
++ pm = new QPixmap( pixmap );
++ }
++ else {
++ // With most window managers, only 24-bit icon pixmaps are allowed in the WM hints, otherwise corrupt icons will be displayed
++ // Convert provided pixmaps to 24-bit here
++ int w = pixmap.width();
++ int h = pixmap.height();
++ pm = new QPixmap( pixmap.width(), pixmap.height(), 24 );
++ QImage iconImage = pixmap.convertToImage();
++
++ // Load the new 24-bit RGB pixmap with data
++ GC gc;
++ pm->detach();
++ Qt::HANDLE pmHandle = pm->handle();
++ gc = XCreateGC(x11Display(), pmHandle, 0, 0);
++ for (int y = 0; y < h; ++y) {
++ QRgb *ls = (QRgb *)iconImage.scanLine( y );
++ for (int x = 0; x < w; ++x) {
++ QRgb l = ls[x];
++ int r = int( qRed( l ) );
++ int g = int( qGreen( l ) );
++ int b = int( qBlue( l ) );
++ ls[x] = qRgb( r, g, b );
++ XSetForeground(x11Display(), gc, (r << 16) | (g << 8) | b );
++ XDrawPoint(x11Display(), pmHandle, gc, x, y);
++ }
++ }
++ XFreeGC(x11Display(), gc);
++ }
++
+ extra->topextra->icon = pm;
+- if ( !pm->mask() )
++ if ( !pm->mask() ) {
+ pm->setMask( pm->createHeuristicMask() ); // may do detach()
++ }
+ icon_pixmap = pm->handle();
+- if ( pm->mask() )
++ if ( pm->mask() ) {
+ mask_pixmap = pm->mask()->handle();
++ }
+ }
+ XWMHints *h = XGetWMHints( x11Display(), winId() );
+ XWMHints wm_hints;
diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-04_17_28_30-Fix-ARGB-mode-stippled-focus-rectangle-showing-underlying-window-contents-Fix-TQColor-not-processing-alpha-channel-in-ARGB-mode-d2240de.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-04_17_28_30-Fix-ARGB-mode-stippled-focus-rectangle-showing-underlying-window-contents-Fix-TQColor-not-processing-alpha-channel-in-ARGB-mode-d2240de.patch
new file mode 100644
index 00000000..cb9e29c8
--- /dev/null
+++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-04_17_28_30-Fix-ARGB-mode-stippled-focus-rectangle-showing-underlying-window-contents-Fix-TQColor-not-processing-alpha-channel-in-ARGB-mode-d2240de.patch
@@ -0,0 +1,62 @@
+diff --git a/src/kernel/qcolor_x11.cpp b/src/kernel/qcolor_x11.cpp
+index eeaee5e..dbd039e 100644
+--- a/src/kernel/qcolor_x11.cpp
++++ b/src/kernel/qcolor_x11.cpp
+@@ -407,8 +407,14 @@ uint QColor::alloc( int screen )
+ b = sd->blue_shift > 0 ? b << sd->blue_shift : b >> -sd->blue_shift;
+ pix = (b & sd->blue_mask) | (g & sd->green_mask) | (r & sd->red_mask)
+ | ~(sd->blue_mask | sd->green_mask | sd->red_mask);
+- if ( screen == QPaintDevice::x11AppScreen() )
++ if (QPaintDevice::x11AppDepth(screen) == 32) {
++ int a = qAlpha(d.argb);
++ pix = pix & 0x00ffffff;
++ pix = pix | (a << 24);
++ }
++ if ( screen == QPaintDevice::x11AppScreen() ) {
+ d.d32.pix = pix;
++ }
+ return pix;
+ }
+ QColorData *c = sd->colorDict->find( (long)(d.argb) );
+diff --git a/src/kernel/qpainter_x11.cpp b/src/kernel/qpainter_x11.cpp
+index 126c0d6..267887e 100644
+--- a/src/kernel/qpainter_x11.cpp
++++ b/src/kernel/qpainter_x11.cpp
+@@ -1842,16 +1842,24 @@ void QPainter::drawWinFocusRect( int x, int y, int w, int h,
+ RasterOp old_rop = (RasterOp)rop;
+
+ if ( xorPaint ) {
+- if ( QColor::numBitPlanes() <= 8 )
++ if ( QColor::numBitPlanes() <= 8 ) {
+ setPen( QPen(color1, 0, Qt::FineDotLine) );
+- else
++ }
++ else if ( QColor::numBitPlanes() <= 8 ) {
+ setPen( QPen(white, 0, Qt::FineDotLine) );
++ }
++ else {
++ setPen( QPen(QColor(qRgba(255,255,255,0)), 0, Qt::FineDotLine) );
++ }
+ setRasterOp( XorROP );
+- } else {
+- if ( qGray( bgColor.rgb() ) < 128 )
++ }
++ else {
++ if ( qGray( bgColor.rgb() ) < 128 ) {
+ setPen( QPen(white, 0, Qt::FineDotLine) );
+- else
++ }
++ else {
+ setPen( QPen(black, 0, Qt::FineDotLine) );
++ }
+ }
+
+ if ( testf(ExtDev|VxF|WxF) ) {
+@@ -1876,6 +1884,7 @@ void QPainter::drawWinFocusRect( int x, int y, int w, int h,
+ XSetLineAttributes( dpy, gc, 1, LineOnOffDash, CapButt, JoinMiter );
+
+ XDrawRectangle( dpy, hd, gc, x, y, w-1, h-1 );
++
+ XSetLineAttributes( dpy, gc, 0, LineSolid, CapButt, JoinMiter );
+ setRasterOp( old_rop );
+ setPen( old_pen );
diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-08_01_43_38-Fix-spelling-mistakes-169c39a.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-08_01_43_38-Fix-spelling-mistakes-169c39a.patch
new file mode 100644
index 00000000..11f9dfb2
--- /dev/null
+++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-08_01_43_38-Fix-spelling-mistakes-169c39a.patch
@@ -0,0 +1,52 @@
+diff --git a/doc/html/qsqlcursor.html b/doc/html/qsqlcursor.html
+index 3111cc5..1caaaa7 100644
+--- a/doc/html/qsqlcursor.html
++++ b/doc/html/qsqlcursor.html
+@@ -386,7 +386,7 @@ record.
+ <a name="x2446"></a> cur.<a href="#insert">insert</a>();
+ </pre>
+ <p> In the above example, a cursor is created on the 'prices' table
+-and a pointer to the insert buffer is aquired using <a href="#primeInsert">primeInsert</a>().
++and a pointer to the insert buffer is acquired using <a href="#primeInsert">primeInsert</a>().
+ Each field's value is set to the desired value and then <a href="#insert">insert</a>()
+ is called to insert the data into the database. Remember: all edit
+ operations (insert(), <a href="#update">update</a>() and delete()) operate on the
+diff --git a/doc/man/man3/qsqlcursor.3qt b/doc/man/man3/qsqlcursor.3qt
+index c7067de..0a97aec 100644
+--- a/doc/man/man3/qsqlcursor.3qt
++++ b/doc/man/man3/qsqlcursor.3qt
+@@ -376,7 +376,7 @@ If \fIinvalidate\fR is TRUE (the default), the cursor will no longer be position
+ cur.insert();
+ .fi
+ .PP
+-In the above example, a cursor is created on the 'prices' table and a pointer to the insert buffer is aquired using primeInsert(). Each field's value is set to the desired value and then insert() is called to insert the data into the database. Remember: all edit operations (insert(), update() and delete()) operate on the contents of the cursor edit buffer and not on the contents of the cursor itself.
++In the above example, a cursor is created on the 'prices' table and a pointer to the insert buffer is acquired using primeInsert(). Each field's value is set to the desired value and then insert() is called to insert the data into the database. Remember: all edit operations (insert(), update() and delete()) operate on the contents of the cursor edit buffer and not on the contents of the cursor itself.
+ .PP
+ See also setMode() and lastError().
+ .SH "bool QSqlCursor::isCalculated ( const QString & name ) const"
+diff --git a/src/kernel/qinternal.cpp b/src/kernel/qinternal.cpp
+index cf1e037..dfb2abc 100644
+--- a/src/kernel/qinternal.cpp
++++ b/src/kernel/qinternal.cpp
+@@ -497,7 +497,7 @@ void QSharedDoubleBuffer::flush()
+ }
+
+ /* \internal
+- Aquire ownership of the shared double buffer pixmap, subject to the
++ Acquire ownership of the shared double buffer pixmap, subject to the
+ following conditions:
+
+ \list 1
+diff --git a/src/sql/qsqlcursor.cpp b/src/sql/qsqlcursor.cpp
+index a1be1f8..2ed963c 100644
+--- a/src/sql/qsqlcursor.cpp
++++ b/src/sql/qsqlcursor.cpp
+@@ -1007,7 +1007,7 @@ QString QSqlCursor::toString( const QSqlIndex& i, QSqlRecord* rec, const QString
+ \printuntil insert
+
+ In the above example, a cursor is created on the 'prices' table
+- and a pointer to the insert buffer is aquired using primeInsert().
++ and a pointer to the insert buffer is acquired using primeInsert().
+ Each field's value is set to the desired value and then insert()
+ is called to insert the data into the database. Remember: all edit
+ operations (insert(), update() and delete()) operate on the
diff --git a/dev-qt/qt/metadata.xml b/dev-qt/qt/metadata.xml
new file mode 100644
index 00000000..6e9f5e4a
--- /dev/null
+++ b/dev-qt/qt/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>fatzer2@gmail.com</email>
+ <name>Alexander Golubev</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-qt/qt/qt-3.3.8d-r1.ebuild b/dev-qt/qt/qt-3.3.8d-r1.ebuild
new file mode 100644
index 00000000..c2b6a84a
--- /dev/null
+++ b/dev-qt/qt/qt-3.3.8d-r1.ebuild
@@ -0,0 +1,341 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=2
+
+# *** Please remember to update qt3.eclass when revbumping this ***
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="The Qt toolkit is a comprehensive C++ application development framework."
+HOMEPAGE="http://qt.nokia.com/ http://www.trinitydesktop.org/"
+
+# IMMQT_P="qt-x11-immodule-unified-qt3.3.8-20070321-gentoo"
+TDE_VERSION="3.5.13.1"
+TDE_PATCH_VERSION="3.5.13.2"
+
+SRC_URI="http://www.mirrorservice.org/sites/trinitydesktop.org/trinity/releases/${TDE_VERSION}/dependencies/qt3-${TDE_VERSION}.tar.gz"
+# immqt? ( mirror://gentoo/${IMMQT_P}.diff.bz2 )
+# immqt-bc? ( mirror://gentoo/${IMMQT_P}.diff.bz2 )"
+
+LICENSE="|| ( QPL-1.0 GPL-2 GPL-3 )"
+
+SLOT="3"
+KEYWORDS="x86 amd64"
+IUSE="cups debug doc examples firebird ipv6 mysql nas nis opengl postgres sqlite xinerama"
+# no odbc, immqt and immqt-bc support anymore.
+DEPEND="
+ virtual/jpeg
+ >=media-libs/freetype-2
+ >=media-libs/libmng-1.0.9
+ media-libs/libpng
+ sys-libs/zlib
+ x11-libs/libXft
+ x11-libs/libXcursor
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libSM
+ cups? ( net-print/cups )
+ firebird? ( dev-db/firebird )
+ mysql? ( virtual/mysql )
+ nas? ( >=media-libs/nas-1.5 )
+ opengl? ( virtual/opengl virtual/glu )
+ postgres? ( dev-db/postgresql )
+ xinerama? ( x11-libs/libXinerama )
+ !!<=dev-qt/qt-meta-3.3.8c"
+RDEPEND="${RDEPEND}
+ x11-proto/inputproto
+ x11-proto/xextproto
+ xinerama? ( x11-proto/xineramaproto )"
+
+# immqt? ( x11-proto/xineramaproto )
+# immqt-bc? ( x11-proto/xineramaproto )"
+#PDEPEND="odbc? ( ~dev-db/qt-unixODBC-$PV )"
+
+S="${WORKDIR}/qt3-3.5.13.1"
+
+QTBASE="/usr/qt/3"
+
+pkg_setup() {
+# if use immqt && use immqt-bc ; then
+# ewarn
+# ewarn "immqt and immqt-bc are exclusive. You cannot set both."
+# ewarn "Please specify either immqt or immqt-bc."
+# ewarn
+# die
+# elif use immqt ; then
+# ewarn
+# ewarn "You are going to compile binary imcompatible immodule for Qt. This means"
+## ewarn "you have to recompile everything depending on Qt after you install it."
+# ewarn "Be aware."
+# ewarn
+# fi
+
+ export QTDIR="${S}"
+
+ CXX=$(tc-getCXX)
+ if [[ ${CXX/g++/} != ${CXX} ]]; then
+ PLATCXX="g++"
+ elif [[ ${CXX/icpc/} != ${CXX} ]]; then
+ PLATCXX="icc"
+ else
+ die "Unknown compiler ${CXX}."
+ fi
+
+ case ${CHOST} in
+ *-freebsd*|*-dragonfly*)
+ PLATNAME="freebsd" ;;
+ *-openbsd*)
+ PLATNAME="openbsd" ;;
+ *-netbsd*)
+ PLATNAME="netbsd" ;;
+ *-darwin*)
+ PLATNAME="darwin" ;;
+ *-linux-*|*-linux)
+ PLATNAME="linux" ;;
+ *)
+ die "Unknown CHOST, no platform choosed."
+ esac
+
+ # probably this should be '*-64' for 64bit archs
+ # in a fully multilib environment (no compatibility symlinks)
+ export PLATFORM="${PLATNAME}-${PLATCXX}"
+}
+
+src_prepare() {
+ # apply trinity patches for minor releases
+ if [[ "$TDE_VERSION" != "$TDE_PATCH_VERSION" ]]; then
+ epatch "${FILESDIR}/trinity-$TDE_VERSION..$TDE_PATCH_VERSION/"
+ fi
+
+ # It's nice to able user apply his own patches.
+ epatch_user
+
+ sed -i -e 's:read acceptance:acceptance=yes:' configure
+
+ # Do not link with -rpath. See bug #75181.
+ find "${S}"/mkspecs -name qmake.conf | xargs \
+ sed -i -e 's:QMAKE_RPATH.*:QMAKE_RPATH =:'
+
+ # known working flags wrt #77623
+ use sparc && export CFLAGS="-O1" && export CXXFLAGS="${CFLAGS}"
+ # set c/xxflags and ldflags
+ strip-flags
+ append-flags -fno-strict-aliasing
+
+ sed -i -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \
+ -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \
+ -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \
+ -e "s:\<QMAKE_CC\>.*=.*:QMAKE_CC=$(tc-getCC):" \
+ -e "s:\<QMAKE_CXX\>.*=.*:QMAKE_CXX=$(tc-getCXX):" \
+ -e "s:\<QMAKE_LINK\>.*=.*:QMAKE_LINK=$(tc-getCXX):" \
+ -e "s:\<QMAKE_LINK_SHLIB\>.*=.*:QMAKE_LINK_SHLIB=$(tc-getCXX):" \
+ "${S}"/mkspecs/${PLATFORM}/qmake.conf || die
+
+ if [ $(get_libdir) != "lib" ] ; then
+ sed -i -e "s:/lib$:/$(get_libdir):" \
+ "${S}"/mkspecs/${PLATFORM}/qmake.conf || die
+ fi
+
+ sed -i -e "s:CXXFLAGS.*=:CXXFLAGS=${CXXFLAGS} :" \
+ -e "s:LFLAGS.*=:LFLAGS=${LDFLAGS} :" \
+ "${S}"/qmake/Makefile.unix || die
+
+ # remove unnecessary headers
+ rm include/[^q]*.h
+ rm include/*_p.h
+}
+
+src_configure() {
+ export SYSCONF="${D}${QTBASE}"/etc/settings
+
+ # Let's just allow writing to these directories during Qt emerge
+ # as it makes Qt much happier.
+ addwrite "${QTBASE}/etc/settings"
+ addwrite "${HOME}/.qt"
+
+ [ "$(get_libdir)" != "lib" ] && myconf="${myconf} -L/usr/$(get_libdir)"
+
+ # unixODBC support is now a PDEPEND on dev-db/qt-unixODBC; see bug 14178.
+ use nas && myconf+=" -system-nas-sound"
+ use nis && myconf+=" -nis" || myconf+=" -no-nis"
+ use mysql && myconf+=" -plugin-sql-mysql -I/usr/include/mysql -L/usr/$(get_libdir)/mysql" || myconf+=" -no-sql-mysql"
+ use postgres && myconf+=" -plugin-sql-psql -I/usr/include/postgresql/server -I/usr/include/postgresql/pgsql -I/usr/include/postgresql/pgsql/server" || myconf+=" -no-sql-psql"
+ use firebird && myconf+=" -plugin-sql-ibase -I/opt/firebird/include" || myconf+=" -no-sql-ibase"
+ use sqlite && myconf+=" -plugin-sql-sqlite" || myconf+=" -no-sql-sqlite"
+ use cups && myconf+=" -cups" || myconf+=" -no-cups"
+ use opengl && myconf+=" -enable-module=opengl" || myconf+=" -disable-opengl"
+ use debug && myconf+=" -debug" || myconf+=" -release -no-g++-exceptions"
+ use xinerama && myconf+=" -xinerama" || myconf+=" -no-xinerama"
+
+ myconf="${myconf} -system-zlib -qt-gif"
+
+ use ipv6 && myconf+=" -ipv6" || myconf+=" -no-ipv6"
+# use immqt-bc && myconf+=" -inputmethod"
+# use immqt && myconf+=" -inputmethod -inputmethod-ext"
+
+ export YACC='byacc -d'
+ tc-export CC CXX
+ export LINK="$(tc-getCXX)"
+
+ ./configure -sm -thread -stl -system-libjpeg -verbose -largefile \
+ -qt-imgfmt-{jpeg,mng,png} -tablet -system-libmng \
+ -system-libpng -xft -platform ${PLATFORM} -xplatform \
+ ${PLATFORM} -xrender -prefix ${QTBASE} -libdir ${QTBASE}/$(get_libdir) \
+ -fast -no-sql-odbc ${myconf} -dlopen-opengl || die
+
+ emake src-qmake src-moc sub-src || die
+
+ export DYLD_LIBRARY_PATH="${S}/lib:/usr/X11R6/lib:${DYLD_LIBRARY_PATH}"
+ export LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}"
+
+ emake sub-tools || die
+
+ if use examples; then
+ emake sub-tutorial sub-examples || die
+ fi
+
+ # Make the msg2qm utility (not made by default)
+ cd "${S}"/tools/msg2qm
+ ../../bin/qmake
+ emake
+
+ # Make the qembed utility (not made by default)
+ cd "${S}"/tools/qembed
+ ../../bin/qmake
+}
+
+src_install() {
+ local qt_version="$(grep VERSION src/qt.pro | awk '{ print $3 }')"
+ # binaries
+ into ${QTBASE}
+ dobin bin/*
+ dobin tools/msg2qm/msg2qm
+ dobin tools/qembed/qembed
+
+ # libraries
+ dolib.so lib/lib{editor,qassistantclient,designercore}.a
+ dolib.so lib/libqt-mt.la
+ dolib.so lib/libqt-mt.so.${qt_version} lib/libqui.so.1.0.0
+ cd "${D}"/${QTBASE}/$(get_libdir)
+
+ for x in libqui.so ; do
+ ln -s $x.1.0.0 $x.1.0
+ ln -s $x.1.0 $x.1
+ ln -s $x.1 $x
+ done
+
+ # version symlinks - 3.3.5->3.3->3->.so
+ ln -s libqt-mt.so.${qt_version} libqt-mt.so.3.3
+ ln -s libqt-mt.so.3.3 libqt-mt.so.3
+ ln -s libqt-mt.so.3 libqt-mt.so
+
+ # libqt -> libqt-mt symlinks
+ ln -s libqt-mt.so.${qt_version} libqt.so.${qt_version}
+ ln -s libqt-mt.so.3.3 libqt.so.3.3
+ ln -s libqt-mt.so.3 libqt.so.3
+ ln -s libqt-mt.so libqt.so
+
+ # plugins
+ cd "${S}"
+ local plugins=$(find plugins -name "lib*.so" -print)
+ for x in ${plugins}; do
+ exeinto ${QTBASE}/$(dirname ${x})
+ doexe ${x}
+ done
+
+ # Past this point just needs to be done once
+ is_final_abi || return 0
+
+ # includes
+ cd "${S}"
+ dodir ${QTBASE}/include/private
+ cp include/*\.h "${D}"/${QTBASE}/include/
+ cp include/private/*\.h "${D}"/${QTBASE}/include/private/
+
+ # prl files
+ sed -i -e "s:${S}:${QTBASE}:g" "${S}"/lib/*.prl
+ insinto ${QTBASE}/$(get_libdir)
+ doins "${S}"/lib/*.prl
+
+ # pkg-config file
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins "${S}"/lib/*.pc
+
+ # List all the multilib libdirs
+ local libdirs
+ for alibdir in $(get_all_libdirs); do
+ libdirs="${libdirs}:${QTBASE}/${alibdir}"
+ done
+
+ # environment variables
+ cat <<EOF > "${T}"/45qt3
+PATH=${QTBASE}/bin
+ROOTPATH=${QTBASE}/bin
+LDPATH=${libdirs:1}
+QMAKESPEC=${PLATFORM}
+MANPATH=${QTBASE}/doc/man
+EOF
+
+ cat <<EOF > "${T}"/50qtdir3
+QTDIR=${QTBASE}
+EOF
+
+ cat <<EOF > "${T}"/50-qt3-revdep
+SEARCH_DIRS="${QTBASE}"
+EOF
+
+ insinto /etc/revdep-rebuild
+ doins "${T}"/50-qt3-revdep
+
+ doenvd "${T}"/45qt3 "${T}"/50qtdir3
+
+ if [ "${SYMLINK_LIB}" = "yes" ]; then
+ dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) ${QTBASE}/lib
+ fi
+
+ insinto ${QTBASE}/tools/designer
+ doins -r tools/designer/templates
+
+ insinto ${QTBASE}
+ doins -r translations
+
+ keepdir ${QTBASE}/etc/settings
+
+ if use doc; then
+ insinto ${QTBASE}
+ doins -r "${S}"/doc
+ fi
+
+ if use examples; then
+ find "${S}"/examples "${S}"/tutorial -name Makefile | \
+ xargs sed -i -e "s:${S}:${QTBASE}:g"
+
+ cp -r "${S}"/examples "${D}"${QTBASE}/
+ cp -r "${S}"/tutorial "${D}"${QTBASE}/
+ fi
+
+ # misc build reqs
+ insinto ${QTBASE}/mkspecs
+ doins -r "${S}"/mkspecs/${PLATFORM}
+
+ sed -e "s:${S}:${QTBASE}:g" \
+ "${S}"/.qmake.cache > "${D}"${QTBASE}/.qmake.cache
+
+ dodoc FAQ README README-QT.TXT changes*
+# if use immqt || use immqt-bc ; then
+# dodoc "${S}"/README.immodule
+# fi
+}
+
+pkg_postinst() {
+ echo
+ elog "After a rebuild of Qt, it can happen that Qt plugins (such as Qt/KDE styles,"
+ elog "or widgets for the Qt designer) are no longer recognized. If this situation"
+ elog "occurs you should recompile the packages providing these plugins,"
+ elog "and you should also make sure that Qt and its plugins were compiled with the"
+ elog "same version of GCC. Packages that may need to be rebuilt are, for instance,"
+ elog "kde-base/kdelibs, kde-base/kdeartwork and kde-base/kdeartwork-styles."
+ elog "See http://doc.trolltech.com/3.3/plugins-howto.html for more infos."
+ echo
+}
diff --git a/dev-qt/qt/qt-3.3.8d.ebuild b/dev-qt/qt/qt-3.3.8d.ebuild
new file mode 100644
index 00000000..b866f1cd
--- /dev/null
+++ b/dev-qt/qt/qt-3.3.8d.ebuild
@@ -0,0 +1,341 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=2
+
+# *** Please remember to update qt3.eclass when revbumping this ***
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="The Qt toolkit is a comprehensive C++ application development framework."
+HOMEPAGE="http://qt.nokia.com/ http://www.trinitydesktop.org/"
+
+# IMMQT_P="qt-x11-immodule-unified-qt3.3.8-20070321-gentoo"
+TDE_VERSION="3.5.13.1"
+TDE_PATCH_VERSION="3.5.13.1"
+
+SRC_URI="http://www.mirrorservice.org/sites/trinitydesktop.org/trinity/releases/${TDE_VERSION}/dependencies/qt3-${TDE_VERSION}.tar.gz"
+# immqt? ( mirror://gentoo/${IMMQT_P}.diff.bz2 )
+# immqt-bc? ( mirror://gentoo/${IMMQT_P}.diff.bz2 )"
+
+LICENSE="|| ( QPL-1.0 GPL-2 GPL-3 )"
+
+SLOT="3"
+KEYWORDS="x86 amd64"
+IUSE="cups debug doc examples firebird ipv6 mysql nas nis opengl postgres sqlite xinerama"
+# no odbc, immqt and immqt-bc support anymore.
+DEPEND="
+ virtual/jpeg
+ >=media-libs/freetype-2
+ >=media-libs/libmng-1.0.9
+ media-libs/libpng
+ sys-libs/zlib
+ x11-libs/libXft
+ x11-libs/libXcursor
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libSM
+ cups? ( net-print/cups )
+ firebird? ( dev-db/firebird )
+ mysql? ( virtual/mysql )
+ nas? ( >=media-libs/nas-1.5 )
+ opengl? ( virtual/opengl virtual/glu )
+ postgres? ( dev-db/postgresql )
+ xinerama? ( x11-libs/libXinerama )
+ !!<=dev-qt/qt-meta-3.3.8c"
+RDEPEND="${RDEPEND}
+ x11-proto/inputproto
+ x11-proto/xextproto
+ xinerama? ( x11-proto/xineramaproto )"
+
+# immqt? ( x11-proto/xineramaproto )
+# immqt-bc? ( x11-proto/xineramaproto )"
+#PDEPEND="odbc? ( ~dev-db/qt-unixODBC-$PV )"
+
+S="${WORKDIR}/qt3-3.5.13.1"
+
+QTBASE="/usr/qt/3"
+
+pkg_setup() {
+# if use immqt && use immqt-bc ; then
+# ewarn
+# ewarn "immqt and immqt-bc are exclusive. You cannot set both."
+# ewarn "Please specify either immqt or immqt-bc."
+# ewarn
+# die
+# elif use immqt ; then
+# ewarn
+# ewarn "You are going to compile binary imcompatible immodule for Qt. This means"
+## ewarn "you have to recompile everything depending on Qt after you install it."
+# ewarn "Be aware."
+# ewarn
+# fi
+
+ export QTDIR="${S}"
+
+ CXX=$(tc-getCXX)
+ if [[ ${CXX/g++/} != ${CXX} ]]; then
+ PLATCXX="g++"
+ elif [[ ${CXX/icpc/} != ${CXX} ]]; then
+ PLATCXX="icc"
+ else
+ die "Unknown compiler ${CXX}."
+ fi
+
+ case ${CHOST} in
+ *-freebsd*|*-dragonfly*)
+ PLATNAME="freebsd" ;;
+ *-openbsd*)
+ PLATNAME="openbsd" ;;
+ *-netbsd*)
+ PLATNAME="netbsd" ;;
+ *-darwin*)
+ PLATNAME="darwin" ;;
+ *-linux-*|*-linux)
+ PLATNAME="linux" ;;
+ *)
+ die "Unknown CHOST, no platform choosed."
+ esac
+
+ # probably this should be '*-64' for 64bit archs
+ # in a fully multilib environment (no compatibility symlinks)
+ export PLATFORM="${PLATNAME}-${PLATCXX}"
+}
+
+src_prepare() {
+ # apply trinity patches for minor releases
+ if [[ "$TDE_VERSION" != "$TDE_PATCH_VERSION" ]]; then
+ epatch "${FILESDIR}/trinity-$TDE_VERSION..$TDE_PATCH_VERSION/"
+ fi
+
+ # It's nice to able user apply his own patches.
+ epatch_user
+
+ sed -i -e 's:read acceptance:acceptance=yes:' configure
+
+ # Do not link with -rpath. See bug #75181.
+ find "${S}"/mkspecs -name qmake.conf | xargs \
+ sed -i -e 's:QMAKE_RPATH.*:QMAKE_RPATH =:'
+
+ # known working flags wrt #77623
+ use sparc && export CFLAGS="-O1" && export CXXFLAGS="${CFLAGS}"
+ # set c/xxflags and ldflags
+ strip-flags
+ append-flags -fno-strict-aliasing
+
+ sed -i -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \
+ -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \
+ -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \
+ -e "s:\<QMAKE_CC\>.*=.*:QMAKE_CC=$(tc-getCC):" \
+ -e "s:\<QMAKE_CXX\>.*=.*:QMAKE_CXX=$(tc-getCXX):" \
+ -e "s:\<QMAKE_LINK\>.*=.*:QMAKE_LINK=$(tc-getCXX):" \
+ -e "s:\<QMAKE_LINK_SHLIB\>.*=.*:QMAKE_LINK_SHLIB=$(tc-getCXX):" \
+ "${S}"/mkspecs/${PLATFORM}/qmake.conf || die
+
+ if [ $(get_libdir) != "lib" ] ; then
+ sed -i -e "s:/lib$:/$(get_libdir):" \
+ "${S}"/mkspecs/${PLATFORM}/qmake.conf || die
+ fi
+
+ sed -i -e "s:CXXFLAGS.*=:CXXFLAGS=${CXXFLAGS} :" \
+ -e "s:LFLAGS.*=:LFLAGS=${LDFLAGS} :" \
+ "${S}"/qmake/Makefile.unix || die
+
+ # remove unnecessary headers
+ rm include/[^q]*.h
+ rm include/*_p.h
+}
+
+src_configure() {
+ export SYSCONF="${D}${QTBASE}"/etc/settings
+
+ # Let's just allow writing to these directories during Qt emerge
+ # as it makes Qt much happier.
+ addwrite "${QTBASE}/etc/settings"
+ addwrite "${HOME}/.qt"
+
+ [ "$(get_libdir)" != "lib" ] && myconf="${myconf} -L/usr/$(get_libdir)"
+
+ # unixODBC support is now a PDEPEND on dev-db/qt-unixODBC; see bug 14178.
+ use nas && myconf+=" -system-nas-sound"
+ use nis && myconf+=" -nis" || myconf+=" -no-nis"
+ use mysql && myconf+=" -plugin-sql-mysql -I/usr/include/mysql -L/usr/$(get_libdir)/mysql" || myconf+=" -no-sql-mysql"
+ use postgres && myconf+=" -plugin-sql-psql -I/usr/include/postgresql/server -I/usr/include/postgresql/pgsql -I/usr/include/postgresql/pgsql/server" || myconf+=" -no-sql-psql"
+ use firebird && myconf+=" -plugin-sql-ibase -I/opt/firebird/include" || myconf+=" -no-sql-ibase"
+ use sqlite && myconf+=" -plugin-sql-sqlite" || myconf+=" -no-sql-sqlite"
+ use cups && myconf+=" -cups" || myconf+=" -no-cups"
+ use opengl && myconf+=" -enable-module=opengl" || myconf+=" -disable-opengl"
+ use debug && myconf+=" -debug" || myconf+=" -release -no-g++-exceptions"
+ use xinerama && myconf+=" -xinerama" || myconf+=" -no-xinerama"
+
+ myconf="${myconf} -system-zlib -qt-gif"
+
+ use ipv6 && myconf+=" -ipv6" || myconf+=" -no-ipv6"
+# use immqt-bc && myconf+=" -inputmethod"
+# use immqt && myconf+=" -inputmethod -inputmethod-ext"
+
+ export YACC='byacc -d'
+ tc-export CC CXX
+ export LINK="$(tc-getCXX)"
+
+ ./configure -sm -thread -stl -system-libjpeg -verbose -largefile \
+ -qt-imgfmt-{jpeg,mng,png} -tablet -system-libmng \
+ -system-libpng -xft -platform ${PLATFORM} -xplatform \
+ ${PLATFORM} -xrender -prefix ${QTBASE} -libdir ${QTBASE}/$(get_libdir) \
+ -fast -no-sql-odbc ${myconf} -dlopen-opengl || die
+
+ emake src-qmake src-moc sub-src || die
+
+ export DYLD_LIBRARY_PATH="${S}/lib:/usr/X11R6/lib:${DYLD_LIBRARY_PATH}"
+ export LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}"
+
+ emake sub-tools || die
+
+ if use examples; then
+ emake sub-tutorial sub-examples || die
+ fi
+
+ # Make the msg2qm utility (not made by default)
+ cd "${S}"/tools/msg2qm
+ ../../bin/qmake
+ emake
+
+ # Make the qembed utility (not made by default)
+ cd "${S}"/tools/qembed
+ ../../bin/qmake
+}
+
+src_install() {
+ local qt_version="$(grep VERSION src/qt.pro | awk '{ print $3 }')"
+ # binaries
+ into ${QTBASE}
+ dobin bin/*
+ dobin tools/msg2qm/msg2qm
+ dobin tools/qembed/qembed
+
+ # libraries
+ dolib.so lib/lib{editor,qassistantclient,designercore}.a
+ dolib.so lib/libqt-mt.la
+ dolib.so lib/libqt-mt.so.${qt_version} lib/libqui.so.1.0.0
+ cd "${D}"/${QTBASE}/$(get_libdir)
+
+ for x in libqui.so ; do
+ ln -s $x.1.0.0 $x.1.0
+ ln -s $x.1.0 $x.1
+ ln -s $x.1 $x
+ done
+
+ # version symlinks - 3.3.5->3.3->3->.so
+ ln -s libqt-mt.so.${qt_version} libqt-mt.so.3.3
+ ln -s libqt-mt.so.3.3 libqt-mt.so.3
+ ln -s libqt-mt.so.3 libqt-mt.so
+
+ # libqt -> libqt-mt symlinks
+ ln -s libqt-mt.so.${qt_version} libqt.so.${qt_version}
+ ln -s libqt-mt.so.3.3 libqt.so.3.3
+ ln -s libqt-mt.so.3 libqt.so.3
+ ln -s libqt-mt.so libqt.so
+
+ # plugins
+ cd "${S}"
+ local plugins=$(find plugins -name "lib*.so" -print)
+ for x in ${plugins}; do
+ exeinto ${QTBASE}/$(dirname ${x})
+ doexe ${x}
+ done
+
+ # Past this point just needs to be done once
+ is_final_abi || return 0
+
+ # includes
+ cd "${S}"
+ dodir ${QTBASE}/include/private
+ cp include/*\.h "${D}"/${QTBASE}/include/
+ cp include/private/*\.h "${D}"/${QTBASE}/include/private/
+
+ # prl files
+ sed -i -e "s:${S}:${QTBASE}:g" "${S}"/lib/*.prl
+ insinto ${QTBASE}/$(get_libdir)
+ doins "${S}"/lib/*.prl
+
+ # pkg-config file
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins "${S}"/lib/*.pc
+
+ # List all the multilib libdirs
+ local libdirs
+ for alibdir in $(get_all_libdirs); do
+ libdirs="${libdirs}:${QTBASE}/${alibdir}"
+ done
+
+ # environment variables
+ cat <<EOF > "${T}"/45qt3
+PATH=${QTBASE}/bin
+ROOTPATH=${QTBASE}/bin
+LDPATH=${libdirs:1}
+QMAKESPEC=${PLATFORM}
+MANPATH=${QTBASE}/doc/man
+EOF
+
+ cat <<EOF > "${T}"/50qtdir3
+QTDIR=${QTBASE}
+EOF
+
+ cat <<EOF > "${T}"/50-qt3-revdep
+SEARCH_DIRS="${QTBASE}"
+EOF
+
+ insinto /etc/revdep-rebuild
+ doins "${T}"/50-qt3-revdep
+
+ doenvd "${T}"/45qt3 "${T}"/50qtdir3
+
+ if [ "${SYMLINK_LIB}" = "yes" ]; then
+ dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) ${QTBASE}/lib
+ fi
+
+ insinto ${QTBASE}/tools/designer
+ doins -r tools/designer/templates
+
+ insinto ${QTBASE}
+ doins -r translations
+
+ keepdir ${QTBASE}/etc/settings
+
+ if use doc; then
+ insinto ${QTBASE}
+ doins -r "${S}"/doc
+ fi
+
+ if use examples; then
+ find "${S}"/examples "${S}"/tutorial -name Makefile | \
+ xargs sed -i -e "s:${S}:${QTBASE}:g"
+
+ cp -r "${S}"/examples "${D}"${QTBASE}/
+ cp -r "${S}"/tutorial "${D}"${QTBASE}/
+ fi
+
+ # misc build reqs
+ insinto ${QTBASE}/mkspecs
+ doins -r "${S}"/mkspecs/${PLATFORM}
+
+ sed -e "s:${S}:${QTBASE}:g" \
+ "${S}"/.qmake.cache > "${D}"${QTBASE}/.qmake.cache
+
+ dodoc FAQ README README-QT.TXT changes*
+# if use immqt || use immqt-bc ; then
+# dodoc "${S}"/README.immodule
+# fi
+}
+
+pkg_postinst() {
+ echo
+ elog "After a rebuild of Qt, it can happen that Qt plugins (such as Qt/KDE styles,"
+ elog "or widgets for the Qt designer) are no longer recognized. If this situation"
+ elog "occurs you should recompile the packages providing these plugins,"
+ elog "and you should also make sure that Qt and its plugins were compiled with the"
+ elog "same version of GCC. Packages that may need to be rebuilt are, for instance,"
+ elog "kde-base/kdelibs, kde-base/kdeartwork and kde-base/kdeartwork-styles."
+ elog "See http://doc.trolltech.com/3.3/plugins-howto.html for more infos."
+ echo
+}
diff --git a/dev-qt/qt/qt-3.9999.ebuild b/dev-qt/qt/qt-3.9999.ebuild
new file mode 100644
index 00000000..865719df
--- /dev/null
+++ b/dev-qt/qt/qt-3.9999.ebuild
@@ -0,0 +1,396 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# *** Please remember to update qt3.eclass when revbumping this ***
+
+inherit eutils git-2 flag-o-matic toolchain-funcs
+
+SRCTYPE="free"
+DESCRIPTION="The Qt toolkit is a comprehensive C++ application development framework."
+HOMEPAGE="http://qt.nokia.com/"
+
+# IMMQT_P="qt-x11-immodule-unified-qt3.3.8-20070321-gentoo"
+
+#SRC_URI="ftp://ftp.trolltech.com/qt/source/qt-x11-${SRCTYPE}-${PV}.tar.gz
+# immqt? ( mirror://gentoo/${IMMQT_P}.diff.bz2 )
+# immqt-bc? ( mirror://gentoo/${IMMQT_P}.diff.bz2 )"
+EGIT_REPO_URI="http://scm.trinitydesktop.org/scm/git/qt3"
+EGIT_BRANCH="master"
+EGIT_PROJECT="trinity/qt3"
+LICENSE="|| ( QPL-1.0 GPL-2 GPL-3 )"
+
+SLOT="3"
+KEYWORDS=
+IUSE="cups debug doc examples firebird ipv6 mysql nas nis opengl postgres sqlite xinerama"
+# no odbc, immqt and immqt-bc support anymore.
+RDEPEND="
+ virtual/jpeg
+ >=media-libs/freetype-2
+ >=media-libs/libmng-1.0.9
+ media-libs/libpng
+ sys-libs/zlib
+ x11-libs/libXft
+ x11-libs/libXcursor
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libSM
+ cups? ( net-print/cups )
+ firebird? ( dev-db/firebird )
+ mysql? ( virtual/mysql )
+ nas? ( >=media-libs/nas-1.5 )
+ opengl? ( virtual/opengl virtual/glu )
+ postgres? ( dev-db/postgresql )
+ xinerama? ( x11-libs/libXinerama )
+ !<=dev-qt/qt-meta-3.3.8c"
+DEPEND="${RDEPEND}
+ x11-proto/inputproto
+ x11-proto/xextproto
+ xinerama? ( x11-proto/xineramaproto )"
+
+# immqt? ( x11-proto/xineramaproto )
+# immqt-bc? ( x11-proto/xineramaproto )"
+#PDEPEND="odbc? ( ~dev-db/qt-unixODBC-$PV )"
+
+#S="${WORKDIR}/qt-x11-${SRCTYPE}-${PV}"
+
+QTBASE="/usr/qt/3"
+
+pkg_setup() {
+# if use immqt && use immqt-bc ; then
+# ewarn
+# ewarn "immqt and immqt-bc are exclusive. You cannot set both."
+# ewarn "Please specify either immqt or immqt-bc."
+# ewarn
+# die
+# elif use immqt ; then
+# ewarn
+# ewarn "You are going to compile binary imcompatible immodule for Qt. This means"
+## ewarn "you have to recompile everything depending on Qt after you install it."
+# ewarn "Be aware."
+# ewarn
+# fi
+
+ export QTDIR="${S}"
+
+ CXX=$(tc-getCXX)
+ if [[ ${CXX/g++/} != ${CXX} ]]; then
+ PLATCXX="g++"
+ elif [[ ${CXX/icpc/} != ${CXX} ]]; then
+ PLATCXX="icc"
+ else
+ die "Unknown compiler ${CXX}."
+ fi
+
+ case ${CHOST} in
+ *-freebsd*|*-dragonfly*)
+ PLATNAME="freebsd" ;;
+ *-openbsd*)
+ PLATNAME="openbsd" ;;
+ *-netbsd*)
+ PLATNAME="netbsd" ;;
+ *-darwin*)
+ PLATNAME="darwin" ;;
+ *-linux-*|*-linux)
+ PLATNAME="linux" ;;
+ *)
+ die "Unknown CHOST, no platform choosed."
+ esac
+
+ # probably this should be '*-64' for 64bit archs
+ # in a fully multilib environment (no compatibility symlinks)
+ export PLATFORM="${PLATNAME}-${PLATCXX}"
+}
+
+src_unpack() {
+ git-2_src_unpack
+# mv "${S}/main/dependencies/qt3/" "${WORKDIR}/"
+# rm -rf "${S}"
+# mv "${WORKDIR}/qt3" "${S}"
+#
+# cd "${S}"
+
+ sed -i -e 's:read acceptance:acceptance=yes:' configure
+
+ # Do not link with -rpath. See bug #75181.
+ find "${S}"/mkspecs -name qmake.conf | xargs \
+ sed -i -e 's:QMAKE_RPATH.*:QMAKE_RPATH =:'
+#
+# # Patch for uic includehint errors (aseigo patch)
+# epatch "${FILESDIR}"/qt-3.3.8-uic-fix.patch
+#
+# # KDE related patches
+# epatch "${FILESDIR}"/0001-dnd_optimization.patch
+# epatch "${FILESDIR}"/0002-dnd_active_window_fix.patch
+# epatch "${FILESDIR}"/0038-dragobject-dont-prefer-unknown.patch
+# epatch "${FILESDIR}"/0044-qscrollview-windowactivate-fix.diff
+# epatch "${FILESDIR}"/0047-fix-kmenu-widget.diff
+# epatch "${FILESDIR}"/0048-qclipboard_hack_80072.patch
+#
+# # ulibc patch (bug #100246)
+# epatch "${FILESDIR}"/qt-ulibc.patch
+#
+# # xinerama patch: http://ktown.kde.org/~seli/xinerama/
+# epatch "${FILESDIR}"/qt-3.3.8-seli-xinerama.patch
+#
+# # Visibility patch, apply only on GCC 4.1 and later for safety
+# # [[ $(gcc-major-version)$(gcc-minor-version) -ge 41 ]] && \
+# epatch "${FILESDIR}"/qt-3.3.8-visibility.patch
+#
+# # Fix configure to correctly pick up gcc version, bug 244732
+# epatch "${FILESDIR}"/qt-3.3.8-fix-compiler-detection.patch
+#
+# # Fix CJK script rendering, bug 229567
+# epatch "${FILESDIR}"/qt-3.3.8b-cjk-fix.patch
+
+ # now it's applyed to git version
+ # Fix libpng-1.4 issues
+# epatch "${FILESDIR}"/qt-3.3.8-libpng14.patch
+
+# if use immqt || use immqt-bc ; then
+# epatch ../${IMMQT_P}.diff
+# sh make-symlinks.sh || die "make symlinks failed"
+#
+# epatch "${FILESDIR}"/qt-3.3.8-immqt+gcc-4.3.patch
+# fi
+#
+# if use mips; then
+# epatch "${FILESDIR}"/qt-3.3.8-mips.patch
+# fi
+#
+# # Add compatibility functions for the TQt interface
+# if use trinity; then
+# epatch "${FILESDIR}"/qt3_3.3.8c.diff
+# epatch ""
+# fi
+#
+ # known working flags wrt #77623
+ use sparc && export CFLAGS="-O1" && export CXXFLAGS="${CFLAGS}"
+ # set c/xxflags and ldflags
+ strip-flags
+ append-flags -fno-strict-aliasing
+#
+# if [[ $( gcc-fullversion ) == "3.4.6" && gcc-specs-ssp ]] ; then
+# ewarn "Appending -fno-stack-protector to CFLAGS/CXXFLAGS"
+# append-flags -fno-stack-protector
+# fi
+#
+ sed -i -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \
+ -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \
+ -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \
+ -e "s:\<QMAKE_CC\>.*=.*:QMAKE_CC=$(tc-getCC):" \
+ -e "s:\<QMAKE_CXX\>.*=.*:QMAKE_CXX=$(tc-getCXX):" \
+ -e "s:\<QMAKE_LINK\>.*=.*:QMAKE_LINK=$(tc-getCXX):" \
+ -e "s:\<QMAKE_LINK_SHLIB\>.*=.*:QMAKE_LINK_SHLIB=$(tc-getCXX):" \
+ "${S}"/mkspecs/${PLATFORM}/qmake.conf || die
+
+ if [ $(get_libdir) != "lib" ] ; then
+ sed -i -e "s:/lib$:/$(get_libdir):" \
+ "${S}"/mkspecs/${PLATFORM}/qmake.conf || die
+ fi
+
+ sed -i -e "s:CXXFLAGS.*=:CXXFLAGS=${CXXFLAGS} :" \
+ -e "s:LFLAGS.*=:LFLAGS=${LDFLAGS} :" \
+ "${S}"/qmake/Makefile.unix || die
+}
+
+src_compile() {
+ export SYSCONF="${D}${QTBASE}"/etc/settings
+
+ # Let's just allow writing to these directories during Qt emerge
+ # as it makes Qt much happier.
+ addwrite "${QTBASE}/etc/settings"
+ addwrite "${HOME}/.qt"
+
+ [ "$(get_libdir)" != "lib" ] && myconf="${myconf} -L/usr/$(get_libdir)"
+
+ # unixODBC support is now a PDEPEND on dev-db/qt-unixODBC; see bug 14178.
+ use nas && myconf+=" -system-nas-sound"
+ use nis && myconf+=" -nis" || myconf+=" -no-nis"
+ use mysql && myconf+=" -plugin-sql-mysql -I/usr/include/mysql -L/usr/$(get_libdir)/mysql" || myconf+=" -no-sql-mysql"
+ use postgres && myconf+=" -plugin-sql-psql -I/usr/include/postgresql/server -I/usr/include/postgresql/pgsql -I/usr/include/postgresql/pgsql/server" || myconf+=" -no-sql-psql"
+ use firebird && myconf+=" -plugin-sql-ibase -I/opt/firebird/include" || myconf+=" -no-sql-ibase"
+ use sqlite && myconf+=" -plugin-sql-sqlite" || myconf+=" -no-sql-sqlite"
+ use cups && myconf+=" -cups" || myconf+=" -no-cups"
+ use opengl && myconf+=" -enable-module=opengl" || myconf+=" -disable-opengl"
+ use debug && myconf+=" -debug" || myconf+=" -release -no-g++-exceptions"
+ use xinerama && myconf+=" -xinerama" || myconf+=" -no-xinerama"
+
+ myconf="${myconf} -system-zlib -qt-gif"
+
+ use ipv6 && myconf+=" -ipv6" || myconf+=" -no-ipv6"
+# use immqt-bc && myconf+=" -inputmethod"
+# use immqt && myconf+=" -inputmethod -inputmethod-ext"
+
+ export YACC='byacc -d'
+ tc-export CC CXX
+ export LINK="$(tc-getCXX)"
+
+ einfo ./configure -sm -thread -stl -system-libjpeg -verbose -largefile \
+ -qt-imgfmt-{jpeg,mng,png} -tablet -system-libmng \
+ -system-libpng -xft -platform ${PLATFORM} -xplatform \
+ ${PLATFORM} -xrender -prefix ${QTBASE} -libdir ${QTBASE}/$(get_libdir) \
+ -fast -no-sql-odbc ${myconf} -dlopen-opengl || die
+ ./configure -sm -thread -stl -system-libjpeg -verbose -largefile \
+ -qt-imgfmt-{jpeg,mng,png} -tablet -system-libmng \
+ -system-libpng -xft -platform ${PLATFORM} -xplatform \
+ ${PLATFORM} -xrender -prefix ${QTBASE} -libdir ${QTBASE}/$(get_libdir) \
+ -fast -no-sql-odbc ${myconf} -dlopen-opengl || die
+
+ emake src-qmake src-moc sub-src || die
+
+ export DYLD_LIBRARY_PATH="${S}/lib:/usr/X11R6/lib:${DYLD_LIBRARY_PATH}"
+ export LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}"
+
+ emake sub-tools || die
+
+ if use examples; then
+ emake sub-tutorial sub-examples || die
+ fi
+
+ # Make the msg2qm utility (not made by default)
+ cd "${S}"/tools/msg2qm
+ ../../bin/qmake
+ emake
+
+ # Make the qembed utility (not made by default)
+ cd "${S}"/tools/qembed
+ ../../bin/qmake
+ emake
+
+}
+
+src_install() {
+ local qt_version="$(grep VERSION src/qt.pro | awk '{ print $3 }')"
+ # binaries
+ into ${QTBASE}
+ dobin bin/*
+ dobin tools/msg2qm/msg2qm
+ dobin tools/qembed/qembed
+
+ # libraries
+ dolib.so lib/lib{editor,qassistantclient,designercore}.a
+ dolib.so lib/libqt-mt.la
+ dolib.so lib/libqt-mt.so.${qt_version} lib/libqui.so.1.0.0
+ cd "${D}"/${QTBASE}/$(get_libdir)
+
+ for x in libqui.so ; do
+ ln -s $x.1.0.0 $x.1.0
+ ln -s $x.1.0 $x.1
+ ln -s $x.1 $x
+ done
+
+ # version symlinks - 3.3.5->3.3->3->.so
+ ln -s libqt-mt.so.${qt_version} libqt-mt.so.3.3
+ ln -s libqt-mt.so.3.3 libqt-mt.so.3
+ ln -s libqt-mt.so.3 libqt-mt.so
+
+ # libqt -> libqt-mt symlinks
+ ln -s libqt-mt.so.${qt_version} libqt.so.${qt_version}
+ ln -s libqt-mt.so.3.3 libqt.so.3.3
+ ln -s libqt-mt.so.3 libqt.so.3
+ ln -s libqt-mt.so libqt.so
+
+ # plugins
+ cd "${S}"
+ local plugins=$(find plugins -name "lib*.so" -print)
+ for x in ${plugins}; do
+ exeinto ${QTBASE}/$(dirname ${x})
+ doexe ${x}
+ done
+
+ # Past this point just needs to be done once
+ is_final_abi || return 0
+
+ # includes
+ cd "${S}"
+ dodir ${QTBASE}/include/private
+ cp include/*\.h "${D}"/${QTBASE}/include/
+ cp include/private/*\.h "${D}"/${QTBASE}/include/private/
+
+ # prl files
+ sed -i -e "s:${S}:${QTBASE}:g" "${S}"/lib/*.prl
+ insinto ${QTBASE}/$(get_libdir)
+ doins "${S}"/lib/*.prl
+
+ # pkg-config file
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins "${S}"/lib/*.pc
+
+ # List all the multilib libdirs
+ local libdirs
+ for alibdir in $(get_all_libdirs); do
+ libdirs="${libdirs}:${QTBASE}/${alibdir}"
+ done
+
+ # environment variables
+ cat <<EOF > "${T}"/45qt3
+PATH=${QTBASE}/bin
+ROOTPATH=${QTBASE}/bin
+LDPATH=${libdirs:1}
+QMAKESPEC=${PLATFORM}
+MANPATH=${QTBASE}/doc/man
+EOF
+
+ cat <<EOF > "${T}"/50qtdir3
+QTDIR=${QTBASE}
+EOF
+
+ cat <<EOF > "${T}"/50-qt3-revdep
+SEARCH_DIRS="${QTBASE}"
+EOF
+
+ insinto /etc/revdep-rebuild
+ doins "${T}"/50-qt3-revdep
+
+ doenvd "${T}"/45qt3 "${T}"/50qtdir3
+
+ if [ "${SYMLINK_LIB}" = "yes" ]; then
+ dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) ${QTBASE}/lib
+ fi
+
+ insinto ${QTBASE}/tools/designer
+ doins -r tools/designer/templates
+
+ insinto ${QTBASE}
+ doins -r translations
+
+ keepdir ${QTBASE}/etc/settings
+
+ if use doc; then
+ insinto ${QTBASE}
+ doins -r "${S}"/doc
+ fi
+
+ if use examples; then
+ find "${S}"/examples "${S}"/tutorial -name Makefile | \
+ xargs sed -i -e "s:${S}:${QTBASE}:g"
+
+ cp -r "${S}"/examples "${D}"${QTBASE}/
+ cp -r "${S}"/tutorial "${D}"${QTBASE}/
+ fi
+
+ # misc build reqs
+ insinto ${QTBASE}/mkspecs
+ doins -r "${S}"/mkspecs/${PLATFORM}
+
+ sed -e "s:${S}:${QTBASE}:g" \
+ "${S}"/.qmake.cache > "${D}"${QTBASE}/.qmake.cache
+
+ dodoc FAQ README README-QT.TXT changes*
+# if use immqt || use immqt-bc ; then
+# dodoc "${S}"/README.immodule
+# fi
+}
+
+pkg_postinst() {
+ echo
+ elog "After a rebuild of Qt, it can happen that Qt plugins (such as Qt/KDE styles,"
+ elog "or widgets for the Qt designer) are no longer recognized. If this situation"
+ elog "occurs you should recompile the packages providing these plugins,"
+ elog "and you should also make sure that Qt and its plugins were compiled with the"
+ elog "same version of GCC. Packages that may need to be rebuilt are, for instance,"
+ elog "kde-base/kdelibs, kde-base/kdeartwork and kde-base/kdeartwork-styles."
+ elog "See http://doc.trolltech.com/3.3/plugins-howto.html for more infos."
+ echo
+}
diff --git a/dev-qt/qt4-tqt-engine/Manifest b/dev-qt/qt4-tqt-engine/Manifest
new file mode 100644
index 00000000..5059b13c
--- /dev/null
+++ b/dev-qt/qt4-tqt-engine/Manifest
@@ -0,0 +1 @@
+AUX qt4-tqt-theme-engine-suppress-annoying-warning-about-qt-version.pacth 1094 SHA256 985b992afab2ddb18850ec56c60bbff087739f1ee25ae5eb26f79b21904f7a2e SHA512 904833bfe34979953157565ce2d44bdd48b66f2292dac20eefbb8e6f5a4774738cd5b3fd0f157871cf87a7ad328fbbe9707a76f1a162616d17696128e460ad85 WHIRLPOOL df9b8e3d74b23c96f109c267c572e25225c15b28fc0c635f4f1ef1bd922aa747ab14ca61deff0ace91801a2029427dce7d0ff937b6bfdbbfa9d942f74a1ada1b
diff --git a/dev-qt/qt4-tqt-engine/files/qt4-tqt-theme-engine-suppress-annoying-warning-about-qt-version.pacth b/dev-qt/qt4-tqt-engine/files/qt4-tqt-theme-engine-suppress-annoying-warning-about-qt-version.pacth
new file mode 100644
index 00000000..1ae80b95
--- /dev/null
+++ b/dev-qt/qt4-tqt-engine/files/qt4-tqt-theme-engine-suppress-annoying-warning-about-qt-version.pacth
@@ -0,0 +1,17 @@
+diff --git a/plugin/simplestyle.cpp b/plugin/simplestyle.cpp
+index e876c45..1ea75fc 100644
+--- a/plugin/simplestyle.cpp
++++ b/plugin/simplestyle.cpp
+@@ -247,12 +247,6 @@ Qt4TDEStyle::Qt4TDEStyle() : m_aboutData(NULL), m_tqApplication(NULL), m_tdeAppl
+ qt_filedialog_save_filename_hook = &TDEFileDialogSaveName;
+ qt_filedialog_existing_directory_hook = &TDEFileDialogSelectDirectory;
+ #endif // INTEGRATE_WITH_TDE
+-
+-#if QT_VERSION > 0x040800
+- // How a bug of this magnitude could go undetected in a major Qt4 release is beyond me...I guess cell phones don't generally use thin lines in their widgets!?
+- // This is Yet Another Example of why TDE cannot rely on Qt4 for anything of any real importance
+- printf("[WARNING] Qt4 >= Qt 4.8.0 detected; you are likely affected by these Qt4 bugs:\n[WARNING] https://bugreports.qt-project.org/browse/QTBUG-25896\n[WARNING] https://bugreports.qt-project.org/browse/QTBUG-26013\n[WARNING] There is no known workaround for this problem; your Qt4 application will display with numerous graphical glitches.\n");
+-#endif
+ }
+
+ Qt4TDEStyle::~Qt4TDEStyle()
diff --git a/dev-qt/qt4-tqt-engine/metadata.xml b/dev-qt/qt4-tqt-engine/metadata.xml
new file mode 100644
index 00000000..6e9f5e4a
--- /dev/null
+++ b/dev-qt/qt4-tqt-engine/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>fatzer2@gmail.com</email>
+ <name>Alexander Golubev</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-qt/qt4-tqt-engine/qt4-tqt-engine-9999.ebuild b/dev-qt/qt4-tqt-engine/qt4-tqt-engine-9999.ebuild
new file mode 100644
index 00000000..d618669f
--- /dev/null
+++ b/dev-qt/qt4-tqt-engine/qt4-tqt-engine-9999.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI="5"
+TRINITY_MODULE_TYPE="dependencies"
+TRINITY_MODULE_NAME="qt4-tqt-theme-engine"
+
+inherit trinity-base qt4-r2
+
+DESCRIPTION="A trinity Qt4 theme engine using tqt as a backend"
+HOMEPAGE="http://trinitydesktop.org/"
+LICENSE="GPL-2 LGPL-2"
+KEYWORDS=""
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-qt/tqtinterface
+ >=dev-qt/qtcore-4.8.4:4
+ >=dev-qt/qtgui-4.8.4:4"
+RDEPEND="$DEPEND"
+
+need-trinity 9999
+
+src_unpack() {
+ trinity-base_src_unpack
+}
+
+src_prepare() {
+ local pro libdirs d
+
+ trinity-base_src_prepare
+
+ for d in $(get-trinity-libdirs); do
+ libdirs+=" -L$d"
+ done
+
+ for d in $(get_all_libdirs); do
+ libdirs+=" -L/usr/tqt3/$d"
+ done
+
+ for pro in ./plugin/plugin.pro ./lib/lib.pro ./examples/tqt3reference/stylewindow.pro; do
+ sed -i -e 's!\(^INCLUDEPATH += \)/usr/include/tqt3!\1/usr/tqt3/include!;' \
+ -e 's!\(^INCLUDEPATH += \)/opt/trinity/include!\1'"$TDEDIR/include"'!;' \
+ -e '/\(^LIBS += \)/s!!\1 '"$libdirs"'!' $pro || die "sed failed"
+ done
+ epatch "${FILESDIR}/qt4-tqt-theme-engine-suppress-annoying-warning-about-qt-version.pacth"
+}
+
+src_configure() {
+ qt4-r2_src_configure
+}
+
+src_compile() {
+ qt4-r2_src_compile
+}
+
+src_install() {
+ qt4-r2_src_install
+}
+
+pkg_postinst() {
+ ewarn "With Qt >= 4.8.0 you are likely affected by these Qt4 bug:"
+ ewarn " https://bugreports.qt.io/browse/QTBUG-25896"
+ ewarn "To workaround this please make sure to set your Qt graphics system to \"native\""
+ ewarn "rather than \"opengl\". Otherwice Qt4 applications may be displayed with numerous"
+ ewarn "graphical glitches."
+}
diff --git a/dev-qt/tqt/metadata.xml b/dev-qt/tqt/metadata.xml
new file mode 100644
index 00000000..6e9f5e4a
--- /dev/null
+++ b/dev-qt/tqt/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>fatzer2@gmail.com</email>
+ <name>Alexander Golubev</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-qt/tqt/tqt-3.9999.ebuild b/dev-qt/tqt/tqt-3.9999.ebuild
new file mode 100644
index 00000000..4ef34b57
--- /dev/null
+++ b/dev-qt/tqt/tqt-3.9999.ebuild
@@ -0,0 +1,306 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+
+inherit eutils git-2 flag-o-matic toolchain-funcs
+
+SRCTYPE="free"
+DESCRIPTION="The Trinitie's Qt toolkit fork."
+HOMEPAGE="http://trinitydesktop.org/"
+
+# IMMTQT_P="tqt-x11-immodule-unified-tqt3.3.8-20070321-gentoo"
+
+#SRC_URI="ftp://ftp.trolltech.com/tqt/source/tqt-x11-${SRCTYPE}-${PV}.tar.gz
+# immtqt? ( mirror://gentoo/${IMMTQT_P}.diff.bz2 )
+# immtqt-bc? ( mirror://gentoo/${IMMTQT_P}.diff.bz2 )"
+EGIT_REPO_URI="http://scm.trinitydesktop.org/scm/git/tqt3"
+EGIT_PROJECT="trinity/tqt3"
+LICENSE="|| ( QPL-1.0 GPL-2 GPL-3 )"
+
+SLOT="3"
+KEYWORDS=
+IUSE="cups debug doc examples firebird ipv6 mysql nas nis opengl postgres sqlite xinerama"
+# no odbc, immtqt and immtqt-bc support anymore.
+# TODO: optional support for xrender and xrandr
+
+RDEPEND="
+ virtual/jpeg:=
+ >=media-libs/freetype-2
+ >=media-libs/libmng-1.0.9
+ media-libs/libpng:=
+ sys-libs/zlib
+ x11-libs/libXft
+ x11-libs/libXcursor
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libSM
+ cups? ( net-print/cups )
+ firebird? ( dev-db/firebird )
+ mysql? ( virtual/mysql )
+ nas? ( >=media-libs/nas-1.5 )
+ opengl? ( virtual/opengl virtual/glu )
+ postgres? ( dev-db/postgresql:= )
+ xinerama? ( x11-libs/libXinerama )
+ !dev-qt/qt:3
+ !dev-qt/qt-meta:3"
+DEPEND="${RDEPEND}
+ x11-proto/inputproto
+ x11-proto/xextproto
+ xinerama? ( x11-proto/xineramaproto )"
+
+# immtqt? ( x11-proto/xineramaproto )
+# immtqt-bc? ( x11-proto/xineramaproto )"
+#PDEPEND="odbc? ( ~dev-db/tqt-unixODBC-$PV )"
+
+#S="${WORKDIR}/tqt-x11-${SRCTYPE}-${PV}"
+
+TQTBASE="/usr/tqt3"
+
+pkg_setup() {
+# if use immtqt && use immtqt-bc ; then
+# ewarn
+# ewarn "immtqt and immtqt-bc are exclusive. You cannot set both."
+# ewarn "Please specify either immtqt or immtqt-bc."
+# ewarn
+# die
+# elif use immtqt ; then
+# ewarn
+# ewarn "You are going to compile binary imcompatible immodule for Qt. This means"
+## ewarn "you have to recompile everything depending on Qt after you install it."
+# ewarn "Be aware."
+# ewarn
+# fi
+
+ export QTDIR="${S}"
+
+ CXX=$(tc-getCXX)
+ if [[ ${CXX/g++/} != ${CXX} ]]; then
+ PLATCXX="g++"
+ elif [[ ${CXX/icpc/} != ${CXX} ]]; then
+ PLATCXX="icc"
+ else
+ die "Unknown compiler ${CXX}."
+ fi
+
+ case ${CHOST} in
+ *-freebsd*|*-dragonfly*)
+ PLATNAME="freebsd" ;;
+ *-openbsd*)
+ PLATNAME="openbsd" ;;
+ *-netbsd*)
+ PLATNAME="netbsd" ;;
+ *-darwin*)
+ PLATNAME="darwin" ;;
+ *-linux-*|*-linux)
+ PLATNAME="linux" ;;
+ *)
+ die "Unknown CHOST, no platform choosed."
+ esac
+
+ if [[ "$CHOST" == *64* && "$PLATCXX" == "g++" ]]; then
+ export PLATFORM="${PLATNAME}-${PLATCXX}-64"
+ else
+ export PLATFORM="${PLATNAME}-${PLATCXX}"
+ fi
+}
+
+src_prepare() {
+ # Apply user-provided patches
+ epatch_user
+
+ # Do not link with -rpath. See bug #75181.
+ find "${S}"/mkspecs -name qmake.conf | xargs \
+ sed -i -e 's:QMAKE_RPATH.*:QMAKE_RPATH =:'
+# if use immtqt || use immtqt-bc ; then
+# epatch ../${IMMTQT_P}.diff
+# sh make-symlinks.sh || die "make symlinks failed"
+#
+# epatch "${FILESDIR}"/tqt-3.3.8-immtqt+gcc-4.3.patch
+# fi
+
+ # set c/xxflags and ldflags
+ strip-flags
+ append-flags -fno-strict-aliasing
+
+ sed -i -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \
+ -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \
+ -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \
+ -e "s:\<QMAKE_CC\>.*=.*:QMAKE_CC=$(tc-getCC):" \
+ -e "s:\<QMAKE_CXX\>.*=.*:QMAKE_CXX=$(tc-getCXX):" \
+ -e "s:\<QMAKE_LINK\>.*=.*:QMAKE_LINK=$(tc-getCXX):" \
+ -e "s:\<QMAKE_LINK_SHLIB\>.*=.*:QMAKE_LINK_SHLIB=$(tc-getCXX):" \
+ -e "s:\<QMAKE_STRIP\>.*=.*:QMAKE_STRIP=:" \
+ "${S}/mkspecs/${PLATFORM}/qmake.conf" || die
+
+ if [ $(get_libdir) != "lib" ] ; then
+ sed -i -e "s:/lib$:/$(get_libdir):" \
+ "${S}/mkspecs/${PLATFORM}/qmake.conf" || die
+ fi
+
+ sed -i -e "s:CXXFLAGS.*=:CXXFLAGS=${CXXFLAGS} :" \
+ -e "s:LFLAGS.*=:LFLAGS=${LDFLAGS} :" \
+ "${S}/qmake/Makefile.unix" || die
+
+ # remove docs from install if we don't need it
+ use doc || sed -i -e '/INSTALLS.*=.*htmldocs/d' \
+ "${S}/src/qt_install.pri"
+}
+
+src_configure() {
+ export SYSCONF="${D}${TQTBASE}"/etc/settings
+
+ # Let's just allow writing to these directories during Qt emerge
+ # as it makes Qt much happier.
+ addwrite "${TQTBASE}/etc/settings"
+ addwrite "${HOME}/.qt"
+ addwrite "${HOME}/.tqt"
+
+ # common opts
+ myconf=" -sm -thread -stl -no-verbose -no-verbose -verbose -largefile -tablet"
+ myconf+=" $(echo -{qt-imgfmt-,system-lib}{jpeg,mng,png})"
+ myconf+=" -platform ${PLATFORM} -xplatform ${PLATFORM}"
+ myconf+=" -xft -xrender -prefix ${TQTBASE}"
+ myconf+=" -libdir ${TQTBASE}/$(get_libdir) -fast -no-sql-odbc"
+
+ [ "$(get_libdir)" != "lib" ] && myconf+="${myconf} -L/usr/$(get_libdir)"
+
+ # unixODBC support is now a PDEPEND on dev-db/tqt-unixODBC; see bug 14178.
+ use nas && myconf+=" -system-nas-sound"
+ use nis && myconf+=" -nis" || myconf+=" -no-nis"
+ use mysql && myconf+=" -plugin-sql-mysql -I/usr/include/mysql -L/usr/$(get_libdir)/mysql" || myconf+=" -no-sql-mysql"
+ use postgres && myconf+=" -plugin-sql-psql -I/usr/include/postgresql/server -I/usr/include/postgresql/pgsql -I/usr/include/postgresql/pgsql/server" || myconf+=" -no-sql-psql"
+ use firebird && myconf+=" -plugin-sql-ibase -I/opt/firebird/include" || myconf+=" -no-sql-ibase"
+ use sqlite && myconf+=" -plugin-sql-sqlite" || myconf+=" -no-sql-sqlite"
+ use cups && myconf+=" -cups" || myconf+=" -no-cups"
+ use opengl && myconf+=" -enable-module=opengl" || myconf+=" -disable-opengl"
+ use debug && myconf+=" -debug" || myconf+=" -release -no-g++-exceptions"
+ use xinerama && myconf+=" -xinerama" || myconf+=" -no-xinerama"
+
+ myconf+=" -system-zlib -qt-gif"
+
+ use ipv6 && myconf+=" -ipv6" || myconf+=" -no-ipv6"
+# use immtqt-bc && myconf+=" -inputmethod"
+# use immtqt && myconf+=" -inputmethod -inputmethod-ext"
+
+ myconf+=" -dlopen-opengl"
+
+ export YACC='byacc -d'
+ tc-export CC CXX
+ export LINK="$(tc-getCXX)"
+
+ einfo ./configure ${myconf}
+ ./configure ${myconf} || die
+}
+
+src_compile() {
+ emake src-qmake src-moc sub-src
+
+ export DYLD_LIBRARY_PATH="${S}/lib:/usr/X11R6/lib:${DYLD_LIBRARY_PATH}"
+ export LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}"
+
+ emake sub-tools
+
+ if use examples; then
+ emake sub-tutorial sub-examples
+ fi
+
+ # Make the msg2qm utility (not made by default)
+ cd "${S}"/tools/msg2tqm
+ ../../bin/tqmake || die
+ emake
+
+ # Make the qembed utility (not made by default)
+ cd "${S}"/tools/qembed
+ ../../bin/tqmake || die
+ emake
+
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install
+ # Next executables are missing to be installed:
+ # /usr/qt/3/bin/findtr
+ # /usr/qt/3/bin/conv2ui
+ # /usr/qt/3/bin/qt20fix
+ # /usr/qt/3/bin/qtrename140
+ # I'm not sure if they are really needed
+
+ # fix pkgconfig location
+ dodir /usr/$(get_libdir)
+ mv "${D}${TQTBASE}/$(get_libdir)/pkgconfig" "${D}/usr/$(get_libdir)/"
+
+ # cleanup a bad symlink created by crappy install scrypt
+ rm -r "${D}${TQTBASE}/mkspec/${PLATFORM}/${PLATFORM}"
+
+ # List all the multilib libdirs
+ local libdirs
+ for alibdir in $(get_all_libdirs); do
+ libdirs="${libdirs}:${TQTBASE}/${alibdir}"
+ done
+
+ # environment variables
+ cat <<EOF > "${T}"/44tqt3
+PATH=${TQTBASE}/bin
+ROOTPATH=${TQTBASE}/bin
+LDPATH=${libdirs:1}
+MANPATH=${TQTBASE}/doc/man
+EOF
+
+ cat <<EOF > "${T}"/44-tqt3-revdep
+SEARCH_DIRS="${TQTBASE}"
+EOF
+
+ insinto /etc/revdep-rebuild
+ doins "${T}"/44-tqt3-revdep
+ doenvd "${T}"/44tqt3
+
+ if [ "${SYMLINK_LIB}" = "yes" ]; then
+ dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) ${TQTBASE}/lib
+ fi
+
+# insinto ${TQTBASE}/tools/designer
+# doins -r tools/designer/templates
+#
+# insinto ${TQTBASE}
+# doins -r translations
+#
+ keepdir ${TQTBASE}/etc/settings
+
+ if use doc; then
+ insinto ${TQTBASE}
+ doins -r "${S}"/doc
+ fi
+
+ if use examples; then
+ find "${S}"/examples "${S}"/tutorial -name Makefile | \
+ xargs sed -i -e "s:${S}:${TQTBASE}:g"
+
+ cp -r "${S}"/examples "${D}"${TQTBASE}/
+ cp -r "${S}"/tutorial "${D}"${TQTBASE}/
+ fi
+
+# # misc build reqs
+# insinto ${TQTBASE}/mkspecs
+# doins -r "${S}"/mkspecs/${PLATFORM}
+
+ sed -e "s:${S}:${TQTBASE}:g" \
+ "${S}"/.qmake.cache > "${D}"${TQTBASE}/.qmake.cache
+
+ dodoc FAQ README README-QT.TXT changes*
+# if use immtqt || use immtqt-bc ; then
+# dodoc "${S}"/README.immodule
+# fi
+}
+
+pkg_postinst() {
+ echo
+ elog "After a rebuild of Qt, it can happen that Qt plugins (such as Qt/KDE styles,"
+ elog "or widgets for the Qt designer) are no longer recognized. If this situation"
+ elog "occurs you should recompile the packages providing these plugins,"
+ elog "and you should also make sure that Qt and its plugins were compiled with the"
+ elog "same version of GCC. Packages that may need to be rebuilt are, for instance,"
+ elog "kde-base/kdelibs, kde-base/kdeartwork and kde-base/kdeartwork-styles."
+ elog "See http://doc.trolltech.com/3.3/plugins-howto.html for more infos."
+ echo
+}
diff --git a/dev-qt/tqtinterface/Manifest b/dev-qt/tqtinterface/Manifest
new file mode 100644
index 00000000..c93c1b69
--- /dev/null
+++ b/dev-qt/tqtinterface/Manifest
@@ -0,0 +1,2 @@
+DIST tqtinterface-3.5.13.1.tar.gz 1203318 SHA256 72c8477867a4dfc0f65f00a22a3a4303eb1f1de7211c9e086053ed921a3693a1 SHA512 d0257a9e9eef332d60a13b37dbbbdd202837718384e9edc8d5d429531e914e5b42fab9a41bee65bedfcf5698c79419c04e9741c1a3ac6cafce10579bdec3654e WHIRLPOOL dd8827fc5c7025c111267c13dfb92fbd83635eb78e2af0a2175bf74837b5092050bbe0738d16a8f67173cb6e422b38fb8f730f29a7ee81ec0f6f42f6b8375a77
+DIST tqtinterface-trinity-3.5.13.2.tar.xz 795076 SHA256 385f1c7d38a978a9c43c18d9c65896beae9344fe6de87f72c884f7ec9ab7f84d SHA512 58894e9db01cffda9b2132553ac342d1d47d0f8db231e8be21438c5fcf171b09db3d64fcde065e01ab539f7d9ee7662b4907b19b585eb1aae0ca8c838b1144ee WHIRLPOOL 7ed1ff2f48a30b670be59e2b94bb3b37ec5d481c967d210484ebf3b48541957a8e30bfcd3415534b9aa85e64c87e9af2e777f11a93fe847a899d740df5855c1c
diff --git a/dev-qt/tqtinterface/metadata.xml b/dev-qt/tqtinterface/metadata.xml
new file mode 100644
index 00000000..1fb59563
--- /dev/null
+++ b/dev-qt/tqtinterface/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>fatzer2@gmail.com</email>
+ <name>Alexander Golubev</name>
+ </maintainer>
+ <use>
+ <flag name="qt3">Support for qt3 library(<pkg>dev-qt/qt</pkg>:3)</flag>
+ <flag name="tqt">Support for tqt library(<pkg>dev-qt/tqt</pkg>:3) a trinity fork of qt3</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-qt/tqtinterface/tqtinterface-3.5.13.1.ebuild b/dev-qt/tqtinterface/tqtinterface-3.5.13.1.ebuild
new file mode 100644
index 00000000..5f94cfa8
--- /dev/null
+++ b/dev-qt/tqtinterface/tqtinterface-3.5.13.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI="5"
+TRINITY_MODULE_TYPE="dependencies"
+TRINITY_MODULE_NAME="${PN}"
+
+inherit trinity-base
+
+DESCRIPTION="Interface and abstraction library for Qt and Trinity"
+HOMEPAGE="http://trinitydesktop.org/"
+LICENSE="GPL-2"
+KEYWORDS="x86 amd64"
+IUSE="+qt3 -qt4"
+SLOT="0"
+
+DEPEND="qt3? ( >=dev-qt/qt-3.3.8d:3 )
+ qt4? ( dev-qt/qt-meta:4 )
+ !!x11-libs/tqtinterface"
+
+RDEPEND="${RDEPEND}"
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use qt3 USE_QT3)
+ $(cmake-utils_use qt4 USE_QT4)
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/dev-qt/tqtinterface/tqtinterface-3.5.13.2.ebuild b/dev-qt/tqtinterface/tqtinterface-3.5.13.2.ebuild
new file mode 100644
index 00000000..7f7b7134
--- /dev/null
+++ b/dev-qt/tqtinterface/tqtinterface-3.5.13.2.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI="5"
+TRINITY_MODULE_TYPE="dependencies"
+TRINITY_MODULE_NAME="${PN}"
+
+inherit trinity-base
+
+DESCRIPTION="Interface and abstraction library for Qt and Trinity"
+HOMEPAGE="http://trinitydesktop.org/"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="+qt3 -qt4"
+SLOT="0"
+
+DEPEND="qt3? ( >=dev-qt/qt-3.3.8d:3 )
+ qt4? ( dev-qt/qt-meta:4 )
+ !!x11-libs/tqtinterface"
+
+RDEPEND="${RDEPEND}"
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use qt3 USE_QT3)
+ $(cmake-utils_use qt4 USE_QT4)
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/dev-qt/tqtinterface/tqtinterface-9999.ebuild b/dev-qt/tqtinterface/tqtinterface-9999.ebuild
new file mode 100644
index 00000000..f0e13167
--- /dev/null
+++ b/dev-qt/tqtinterface/tqtinterface-9999.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI="5"
+TRINITY_MODULE_TYPE="dependencies"
+TRINITY_MODULE_NAME="${PN}"
+
+inherit trinity-base
+
+DESCRIPTION="Interface and abstraction library for Qt and Trinity"
+HOMEPAGE="http://trinitydesktop.org/"
+
+LICENSE="GPL-2"
+KEYWORDS=
+IUSE="-qt3 +tqt"
+REQUIRED_USE="^^ ( qt3 tqt )"
+SLOT="0"
+
+DEPEND="qt3? ( >=dev-qt/qt-3.9999:3 )
+ tqt? ( >=dev-qt/tqt-3.9999 )
+ !!x11-libs/tqtinterface"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ use qt3 && export QTDIR="/usr/qt/3"
+ use tqt && export QTDIR="/usr/tqt3"
+}
+
+src_configure() {
+ mycmakeargs=(
+ -DUSE_QT3=ON
+ -DQT_PREFIX_DIR="$QTDIR"
+ )
+
+ cmake-utils_src_configure
+}