From 4866f16fbadd2fcc702102944b990ff578379b0a Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Thu, 2 Nov 2017 14:28:39 -0500 Subject: Revert "Merge pull request #30255 from bkchr/qt_5_9_2" This reverts commit 4cf0b6ba5d5ab5eb20a88449e0612f4dad8e4c29, reversing changes made to 756b9c7d6caae3b02151642b85d84e9b4e4e9b17. Qt 5.9.2 is reverted to Qt 5.9.1, as recommended by KDE upstream due to https://bugreports.qt.io/browse/QTBUG-64017 --- pkgs/development/libraries/qt-5/5.9/fetch.sh | 2 +- .../libraries/qt-5/5.9/qtbase/default.nix | 4 +- pkgs/development/libraries/qt-5/5.9/srcs.nix | 320 ++++++++++----------- 3 files changed, 163 insertions(+), 163 deletions(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/qt-5/5.9/fetch.sh b/pkgs/development/libraries/qt-5/5.9/fetch.sh index d026d2a922a..2ae85bba391 100644 --- a/pkgs/development/libraries/qt-5/5.9/fetch.sh +++ b/pkgs/development/libraries/qt-5/5.9/fetch.sh @@ -1,2 +1,2 @@ -WGET_ARGS=( https://download.qt.io/archive/qt/5.9/5.9.2/submodules/ \ +WGET_ARGS=( http://download.qt.io/official_releases/qt/5.9/5.9.1/submodules/ \ -A '*.tar.xz' ) diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.9/qtbase/default.nix index d63936c561c..eee55dbded3 100644 --- a/pkgs/development/libraries/qt-5/5.9/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.9/qtbase/default.nix @@ -3,7 +3,7 @@ src, version, qtCompatVersion, coreutils, bison, flex, gdb, gperf, lndir, patchelf, perl, pkgconfig, python2, - ruby, which, + ruby, # darwin support darwin, libiconv, libcxx, @@ -73,7 +73,7 @@ stdenv.mkDerivation { ++ lib.optional (postgresql != null) postgresql; nativeBuildInputs = - [ bison flex gperf lndir perl pkgconfig python2 which ] + [ bison flex gperf lndir perl pkgconfig python2 ] ++ lib.optional (!stdenv.isDarwin) patchelf; outputs = [ "bin" "dev" "out" ]; diff --git a/pkgs/development/libraries/qt-5/5.9/srcs.nix b/pkgs/development/libraries/qt-5/5.9/srcs.nix index f30802472fb..247800b7578 100644 --- a/pkgs/development/libraries/qt-5/5.9/srcs.nix +++ b/pkgs/development/libraries/qt-5/5.9/srcs.nix @@ -3,283 +3,275 @@ { qt3d = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qt3d-opensource-src-5.9.2.tar.xz"; - sha256 = "10q7npsl087sja0g2n3v0cg4n75y7sbrs3mfjcsg1wpkw8psjmf9"; - name = "qt3d-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qt3d-opensource-src-5.9.1.tar.xz"; + sha256 = "15j9znfnxch1n6fwz9ngi30msdzh0wlpykl53cs8g2fp2awfa7sg"; + name = "qt3d-opensource-src-5.9.1.tar.xz"; }; }; qtactiveqt = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtactiveqt-opensource-src-5.9.2.tar.xz"; - sha256 = "1kz59ns6afnd8s73ys7hqffg9ki9g7px009b2ab72nq7f8cqsib0"; - name = "qtactiveqt-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtactiveqt-opensource-src-5.9.1.tar.xz"; + sha256 = "07zq60xg7nnlny7qgj6dk1ibg3fzhbdh78gpd0s6x1n822iyislg"; + name = "qtactiveqt-opensource-src-5.9.1.tar.xz"; }; }; qtandroidextras = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtandroidextras-opensource-src-5.9.2.tar.xz"; - sha256 = "1hsx16v17iqjhs20xn7an2ad7g8djwrmxachscjhji1dvk4682nl"; - name = "qtandroidextras-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtandroidextras-opensource-src-5.9.1.tar.xz"; + sha256 = "0nq879jsa2z1l5q3n0hhiv15mzfm5c6s7zfblcc10sgim90p5mjj"; + name = "qtandroidextras-opensource-src-5.9.1.tar.xz"; }; }; qtbase = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtbase-opensource-src-5.9.2.tar.xz"; - sha256 = "16v0dny4rcyd5p8qsnsfg89w98k8kqk3rp9x3g3k7xjmi53bpqkz"; - name = "qtbase-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtbase-opensource-src-5.9.1.tar.xz"; + sha256 = "1ikm896jzyfyjv2qv8n3fd81sxb4y24zkygx36865ygzyvlj36mw"; + name = "qtbase-opensource-src-5.9.1.tar.xz"; }; }; qtcanvas3d = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtcanvas3d-opensource-src-5.9.2.tar.xz"; - sha256 = "1siyzgm1mjx90rwyzzq9vw2s2xzyf6n7q0vn8gw7mdim5indda44"; - name = "qtcanvas3d-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtcanvas3d-opensource-src-5.9.1.tar.xz"; + sha256 = "10fy8wqfw2yhha6lyky5g1a72137aj8pji7mk0wjnggh629z12sb"; + name = "qtcanvas3d-opensource-src-5.9.1.tar.xz"; }; }; qtcharts = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtcharts-opensource-src-5.9.2.tar.xz"; - sha256 = "193a3imkgryw42s0gbwaj9gpqd673h3jrg86jvmy33l2fc5gfyjf"; - name = "qtcharts-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtcharts-opensource-src-5.9.1.tar.xz"; + sha256 = "180df5v7i1ki8hc3lgi6jcfdyz7f19pb73dvfkw402wa2gfcna3k"; + name = "qtcharts-opensource-src-5.9.1.tar.xz"; }; }; qtconnectivity = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtconnectivity-opensource-src-5.9.2.tar.xz"; - sha256 = "1k7kjmlny0ykm40qx796wbsg3310v6b8hqizkbr597cmxjbrax9c"; - name = "qtconnectivity-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtconnectivity-opensource-src-5.9.1.tar.xz"; + sha256 = "1mbzmqix0388iq20a1ljd1pgdq259rm1xzp9kx8gigqpamqqnqs0"; + name = "qtconnectivity-opensource-src-5.9.1.tar.xz"; }; }; qtdatavis3d = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtdatavis3d-opensource-src-5.9.2.tar.xz"; - sha256 = "1cmjjbbmdqdix1f8b7qyc2vwhj9pvchc8r4lp65qw11dhycmdbh6"; - name = "qtdatavis3d-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtdatavis3d-opensource-src-5.9.1.tar.xz"; + sha256 = "14d1q07winh6n1bkc616dapwfnsfkcjyg5zngdqjdj9mza8ang13"; + name = "qtdatavis3d-opensource-src-5.9.1.tar.xz"; }; }; qtdeclarative = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtdeclarative-opensource-src-5.9.2.tar.xz"; - sha256 = "020bha6q8byxc8cj5zw7gms5rgsjg71hv31hv1rr2fy7x56zsh0d"; - name = "qtdeclarative-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtdeclarative-opensource-src-5.9.1.tar.xz"; + sha256 = "1zwlxrgraxhlsdkwsai3pjbz7f3a6rsnsg2mjrpay6cz3af6rznj"; + name = "qtdeclarative-opensource-src-5.9.1.tar.xz"; }; }; qtdoc = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtdoc-opensource-src-5.9.2.tar.xz"; - sha256 = "0dfva8h8f9wpszih285qcxlfcijy52qcbfy1zy20gxh72nfi86c9"; - name = "qtdoc-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtdoc-opensource-src-5.9.1.tar.xz"; + sha256 = "1d2kk9wzm2261ap87nyf743a4662gll03gz5yh5qi7k620lk372x"; + name = "qtdoc-opensource-src-5.9.1.tar.xz"; }; }; qtgamepad = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtgamepad-opensource-src-5.9.2.tar.xz"; - sha256 = "0lm5v43psf7r8zc79dcjdmmdnz4jm30ylgkvsyv8k88mj06yklbn"; - name = "qtgamepad-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtgamepad-opensource-src-5.9.1.tar.xz"; + sha256 = "055w4649zi93q1sl32ngqwgnl2vxw1idnm040s9gjgjb67gi81zi"; + name = "qtgamepad-opensource-src-5.9.1.tar.xz"; }; }; qtgraphicaleffects = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtgraphicaleffects-opensource-src-5.9.2.tar.xz"; - sha256 = "0xpvigfiqfqvf05ywj8x69y57rp8dwq2hs1kpxlxs15pniz4wn8l"; - name = "qtgraphicaleffects-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtgraphicaleffects-opensource-src-5.9.1.tar.xz"; + sha256 = "1zsr3a5dsmpvrb5h4m4h42wqmkvkks3d8mmyrx4k0mfr6s7c71jz"; + name = "qtgraphicaleffects-opensource-src-5.9.1.tar.xz"; }; }; qtimageformats = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtimageformats-opensource-src-5.9.2.tar.xz"; - sha256 = "1wwxxcl24mk1p4w6knyfai09axmwqsm6cgsbkjsmdz3zmjh6qqis"; - name = "qtimageformats-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtimageformats-opensource-src-5.9.1.tar.xz"; + sha256 = "0iwa3dys5rv706cpxwhmgircv783pmlyl1yrsc5i0rha643y7zkr"; + name = "qtimageformats-opensource-src-5.9.1.tar.xz"; }; }; qtlocation = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtlocation-opensource-src-5.9.2.tar.xz"; - sha256 = "033b6l6jbvmc0k5qvbgh5vkzvfga7npqcphrywrrqkmx9vj446n8"; - name = "qtlocation-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtlocation-opensource-src-5.9.1.tar.xz"; + sha256 = "058mgvlaml9rkfhkpr1n3avhi12zlva131sqhbwj4lwwyqfkri2b"; + name = "qtlocation-opensource-src-5.9.1.tar.xz"; }; }; qtmacextras = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtmacextras-opensource-src-5.9.2.tar.xz"; - sha256 = "0f14xkardmidvwljccrv6adcs4nyn8rzry9k74mwqn0ikvycs3my"; - name = "qtmacextras-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtmacextras-opensource-src-5.9.1.tar.xz"; + sha256 = "0096g9l2hwsiwlzfjkw7rhkdnyvb5gzjzyjjg9kqfnsagbwscv11"; + name = "qtmacextras-opensource-src-5.9.1.tar.xz"; }; }; qtmultimedia = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtmultimedia-opensource-src-5.9.2.tar.xz"; - sha256 = "0815hi3cxy5zy6yc5fkdpx2xd6rk7968j1ziwl2g4wa80802g9n9"; - name = "qtmultimedia-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtmultimedia-opensource-src-5.9.1.tar.xz"; + sha256 = "1r76zvbv6wwb7lgw9jwlx382iyw34i1amxaypb5bg3j1niqvx3z4"; + name = "qtmultimedia-opensource-src-5.9.1.tar.xz"; }; }; qtnetworkauth = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtnetworkauth-opensource-src-5.9.2.tar.xz"; - sha256 = "16i33m8x5yii22ciq97bpfmnw0lwhvgv84i2az30a1ikm9dg00x0"; - name = "qtnetworkauth-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtnetworkauth-opensource-src-5.9.1.tar.xz"; + sha256 = "1fgax3p7lqcz29z2n1qxnfpkj3wxq1x9bfx61q6nss1fs74pxzra"; + name = "qtnetworkauth-opensource-src-5.9.1.tar.xz"; }; }; qtpurchasing = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtpurchasing-opensource-src-5.9.2.tar.xz"; - sha256 = "04f28y7qcr4kd0pw26mm515qj7haxr0i8lijn1q47wkikxyhawca"; - name = "qtpurchasing-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtpurchasing-opensource-src-5.9.1.tar.xz"; + sha256 = "0b1hlaq6rb7d6b6h8kqd26klcpzf9vcdjrv610kdj0drb00jg3ss"; + name = "qtpurchasing-opensource-src-5.9.1.tar.xz"; }; }; qtquickcontrols = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtquickcontrols-opensource-src-5.9.2.tar.xz"; - sha256 = "07xxhkfsljwdwlp9jfp88pwkrig02y2pnwhdsaz8mkcackwfq2az"; - name = "qtquickcontrols-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtquickcontrols-opensource-src-5.9.1.tar.xz"; + sha256 = "0bpc465q822phw3dcbddn70wj1fjlc2hxskkp1z9gl7r23hx03jj"; + name = "qtquickcontrols-opensource-src-5.9.1.tar.xz"; }; }; qtquickcontrols2 = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtquickcontrols2-opensource-src-5.9.2.tar.xz"; - sha256 = "1ln83afxyp5dmvdnq6n7as82xrd5k3xvfx7b1jxnljivslyxsm9b"; - name = "qtquickcontrols2-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtquickcontrols2-opensource-src-5.9.1.tar.xz"; + sha256 = "1zq86kqz85wm3n84jcxkxw5x1mrhkqzldkigf8xm3l8j24rf0fr0"; + name = "qtquickcontrols2-opensource-src-5.9.1.tar.xz"; }; }; qtremoteobjects = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtremoteobjects-opensource-src-5.9.2.tar.xz"; - sha256 = "1ylphdwis34y4pm9xiwh2xqfd0hh2gp8kkawlps2q5mh2bm11376"; - name = "qtremoteobjects-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtremoteobjects-opensource-src-5.9.1.tar.xz"; + sha256 = "10kwq0fgmi6zsqhb6s1nkcydpyl8d8flzdpgmyj50c4h2xhg2km0"; + name = "qtremoteobjects-opensource-src-5.9.1.tar.xz"; }; }; qtscript = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtscript-opensource-src-5.9.2.tar.xz"; - sha256 = "1wa0rnbphkhgydnwkf5bjwn0llskl6hgs0964nh0jik8qaspv027"; - name = "qtscript-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtscript-opensource-src-5.9.1.tar.xz"; + sha256 = "13qq2mjfhqdcvkmzrgxg1gr5kww1ygbwb7r71xxl6rjzbn30hshp"; + name = "qtscript-opensource-src-5.9.1.tar.xz"; }; }; qtscxml = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtscxml-opensource-src-5.9.2.tar.xz"; - sha256 = "0pdimqwdrj8hckm81lwy1z58ji4bdv0bzgv336m0a8v3pj914awx"; - name = "qtscxml-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtscxml-opensource-src-5.9.1.tar.xz"; + sha256 = "1m3b6wg5hqasdfc5igpj9bq3czql5kkvvn3rx1ig508kdlh5i5s0"; + name = "qtscxml-opensource-src-5.9.1.tar.xz"; }; }; qtsensors = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtsensors-opensource-src-5.9.2.tar.xz"; - sha256 = "1lxmhi19dbb8vjhpjph0l0ss6zh72hb4908lp4s1pgf8r641ai3r"; - name = "qtsensors-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtsensors-opensource-src-5.9.1.tar.xz"; + sha256 = "1772x7r6y9xv2sv0w2dfz2yhagsq5bpa9kdpzg0qikccmabr7was"; + name = "qtsensors-opensource-src-5.9.1.tar.xz"; }; }; qtserialbus = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtserialbus-opensource-src-5.9.2.tar.xz"; - sha256 = "025yv7zajz5scrmkjkmgkyvxpgkliqvrzc88is0gr481zpd4phmv"; - name = "qtserialbus-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtserialbus-opensource-src-5.9.1.tar.xz"; + sha256 = "1hzk377c3zl4dm5hxwvpxg2w096m160448y9df6v6l8xpzpzxafa"; + name = "qtserialbus-opensource-src-5.9.1.tar.xz"; }; }; qtserialport = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtserialport-opensource-src-5.9.2.tar.xz"; - sha256 = "0hndc9z7qzxazzjvc6k5yd58afw13444plk70b05nqdi5p19rvah"; - name = "qtserialport-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtserialport-opensource-src-5.9.1.tar.xz"; + sha256 = "0sbsc7n701kxl16r247a907zg2afmbx1xlml5jkc6a9956zqbzp1"; + name = "qtserialport-opensource-src-5.9.1.tar.xz"; }; }; qtspeech = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtspeech-opensource-src-5.9.2.tar.xz"; - sha256 = "0cq33dffi7q7dnvzhdivky5prakb8xnwap0b76fwgirhbbn88ypg"; - name = "qtspeech-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtspeech-opensource-src-5.9.1.tar.xz"; + sha256 = "00daxkf8iwf6n9rhkkv3isv5qa8wijwzb0zy1f6zlm3vcc8fz75c"; + name = "qtspeech-opensource-src-5.9.1.tar.xz"; }; }; qtsvg = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtsvg-opensource-src-5.9.2.tar.xz"; - sha256 = "020icrl9vi8jh8ygsssqrx2bl8bx28m15dwmf9a969qdnvxyp5ms"; - name = "qtsvg-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtsvg-opensource-src-5.9.1.tar.xz"; + sha256 = "1rg2q4snh2g4n93zmk995swwkl0ab1jr9ka9xpj56ddifkw99wlr"; + name = "qtsvg-opensource-src-5.9.1.tar.xz"; }; }; qttools = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qttools-opensource-src-5.9.2.tar.xz"; - sha256 = "06nqsa5mj0mc9w9xbm7mgdkb66x4wlvkhnas32f97sb8ic8rdf9b"; - name = "qttools-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qttools-opensource-src-5.9.1.tar.xz"; + sha256 = "1s50kh3sg5wc5gqhwwznnibh7jcnfginnmkv66w62mm74k7mdsy4"; + name = "qttools-opensource-src-5.9.1.tar.xz"; }; }; qttranslations = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qttranslations-opensource-src-5.9.2.tar.xz"; - sha256 = "0byi4s07lfnzzlr2c4sc5qg3hrysswmakwmf80q2mx50kpgnvwax"; - name = "qttranslations-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qttranslations-opensource-src-5.9.1.tar.xz"; + sha256 = "0sdjiqli15fmkbqvhhgjfavff906sg56jx5xf8bg6xzd2j5544ja"; + name = "qttranslations-opensource-src-5.9.1.tar.xz"; }; }; qtvirtualkeyboard = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtvirtualkeyboard-opensource-src-5.9.2.tar.xz"; - sha256 = "1z66chp5746cb0rwy2isnpbvwjj44qvp2hg56n3g47dj901wldp8"; - name = "qtvirtualkeyboard-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtvirtualkeyboard-opensource-src-5.9.1.tar.xz"; + sha256 = "0k79sqa8bg6gkbsk16320gnila1iiwpnl3vx03rysm5bqdnnlx3b"; + name = "qtvirtualkeyboard-opensource-src-5.9.1.tar.xz"; }; }; qtwayland = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtwayland-opensource-src-5.9.2.tar.xz"; - sha256 = "1ipn4xh0dj1kjg5i4vfl4gpx3hg2377w5gls47xpv1ikz41lshzn"; - name = "qtwayland-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtwayland-opensource-src-5.9.1.tar.xz"; + sha256 = "1yizvbmh26mx1ffq0qaci02g2wihy68ld0y7r3z8nx3v5acb236g"; + name = "qtwayland-opensource-src-5.9.1.tar.xz"; }; }; qtwebchannel = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtwebchannel-opensource-src-5.9.2.tar.xz"; - sha256 = "09iss70c1iqgf8qpik35qlgrdw5y9935v0fm2ppgkmxdxkpls6ww"; - name = "qtwebchannel-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtwebchannel-opensource-src-5.9.1.tar.xz"; + sha256 = "003h09mla82f2znb8jjigx13ivc68ikgv7w04594yy7qdmd5yhl0"; + name = "qtwebchannel-opensource-src-5.9.1.tar.xz"; }; }; qtwebengine = { - version = "5.9.2"; - src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtwebengine-opensource-src-5.9.2.tar.xz"; - sha256 = "0251qk04yif4lsn8qvkc2kmzzmaw1v3pfh5ypr06d04zb3j6kc6a"; - name = "qtwebengine-opensource-src-5.9.2.tar.xz"; - }; - }; - qtwebsockets = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtwebsockets-opensource-src-5.9.2.tar.xz"; - sha256 = "0x0nx1ampqsgj9qlc3l32z3ham1a5vq7m2lnxk5pr92yj6yw3pdg"; - name = "qtwebsockets-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtwebengine-opensource-src-5.9.1.tar.xz"; + sha256 = "00b4d18m54pbxa1hm6ijh2mrd4wmrs7lkplys8b4liw8j7mpx8zn"; + name = "qtwebengine-opensource-src-5.9.1.tar.xz"; }; }; qtwebkit = { @@ -298,36 +290,44 @@ name = "qtwebkit-examples-opensource-src-5.9.1.tar.xz"; }; }; + qtwebsockets = { + version = "5.9.1"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtwebsockets-opensource-src-5.9.1.tar.xz"; + sha256 = "0r1lya2jj3wfci82zfn0vk6vr8sk9k7xiphnkb0panhb8di769q1"; + name = "qtwebsockets-opensource-src-5.9.1.tar.xz"; + }; + }; qtwebview = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtwebview-opensource-src-5.9.2.tar.xz"; - sha256 = "1cdqw6pjfqagnwxrha0s18zadjnm65dsildxj07h2qiwqxwyrjpw"; - name = "qtwebview-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtwebview-opensource-src-5.9.1.tar.xz"; + sha256 = "0qmxrh4y3i9n8x6yhrlnahcn75cc2xwlc8mi4g8n2d83c3x7pxyn"; + name = "qtwebview-opensource-src-5.9.1.tar.xz"; }; }; qtwinextras = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtwinextras-opensource-src-5.9.2.tar.xz"; - sha256 = "07qq9rxl6hhl300w7qxsjjbdd5fwpszfk3rbinxklg20f6c6ixml"; - name = "qtwinextras-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtwinextras-opensource-src-5.9.1.tar.xz"; + sha256 = "1x7f944f3g2ml3mm594qv6jlvl5dzzsxq86yinp7av0lhnyrxk0s"; + name = "qtwinextras-opensource-src-5.9.1.tar.xz"; }; }; qtx11extras = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtx11extras-opensource-src-5.9.2.tar.xz"; - sha256 = "1ias745j5lfnrfkgyk0pr8n8zlkqs08gq7yyzaj1c645sh54b1fv"; - name = "qtx11extras-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtx11extras-opensource-src-5.9.1.tar.xz"; + sha256 = "00fn3bps48gjyw0pdqvvl9scknxdpmacby6hvdrdccc3jll0wgd6"; + name = "qtx11extras-opensource-src-5.9.1.tar.xz"; }; }; qtxmlpatterns = { - version = "5.9.2"; + version = "5.9.1"; src = fetchurl { - url = "${mirror}/archive/qt/5.9/5.9.2/submodules/qtxmlpatterns-opensource-src-5.9.2.tar.xz"; - sha256 = "0knk4bplqhvsxar1wv16bzfw57q0aja12gdaxz7m8mvx121sm9ha"; - name = "qtxmlpatterns-opensource-src-5.9.2.tar.xz"; + url = "${mirror}/official_releases/qt/5.9/5.9.1/submodules/qtxmlpatterns-opensource-src-5.9.1.tar.xz"; + sha256 = "094wwap2fsl23cys6rxh2ciw0gxbbiqbshnn4qs1n6xdjrj6i15m"; + name = "qtxmlpatterns-opensource-src-5.9.1.tar.xz"; }; }; } -- cgit 1.4.1 From fe0ab944db2176e6757ae89aeebea16ab8dc69d0 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Tue, 24 Oct 2017 06:39:54 -0500 Subject: qt5: factor out common definitions and remove symlink farm The module definitions are factored out and shared between qt56 and qt59. The symlink farm which was created during builds is no longer needed. --- pkgs/development/libraries/qt-5/5.6/default.nix | 128 +-- pkgs/development/libraries/qt-5/5.6/qtbase.patch | 773 ++++++++++++++ .../libraries/qt-5/5.6/qtdeclarative.patch | 20 + pkgs/development/libraries/qt-5/5.6/qtscript.patch | 13 + .../libraries/qt-5/5.6/qtserialport.patch | 22 + pkgs/development/libraries/qt-5/5.6/qttools.patch | 64 ++ .../qt-5/5.6/qtwebengine-paxmark-mksnapshot.patch | 46 + .../libraries/qt-5/5.6/qtwebengine.patch | 874 ++++++++++++++++ .../5.6/qtwebengine/chromium-clang-update-py.patch | 874 ---------------- .../qtwebengine-paxmark-mksnapshot.patch | 46 - pkgs/development/libraries/qt-5/5.6/qtwebkit.patch | 77 ++ pkgs/development/libraries/qt-5/5.9/default.nix | 130 +-- pkgs/development/libraries/qt-5/5.9/qtbase.patch | 1106 ++++++++++++++++++++ .../libraries/qt-5/5.9/qtbase/cmake-paths.patch | 359 ------- .../qt-5/5.9/qtbase/compose-search-path.patch | 18 - .../libraries/qt-5/5.9/qtbase/darwin-cf.patch | 36 - .../libraries/qt-5/5.9/qtbase/darwin-series | 3 - .../libraries/qt-5/5.9/qtbase/default.nix | 366 ------- .../libraries/qt-5/5.9/qtbase/dlopen-gl.patch | 19 - .../qt-5/5.9/qtbase/dlopen-gtkstyle.patch | 50 - .../qt-5/5.9/qtbase/dlopen-libXcursor.patch | 17 - .../libraries/qt-5/5.9/qtbase/dlopen-resolv.patch | 26 - .../libraries/qt-5/5.9/qtbase/library-paths.patch | 20 - .../libraries/qt-5/5.9/qtbase/libressl.patch | 33 - .../qt-5/5.9/qtbase/mkspecs-common-mac.patch | 11 - .../qt-5/5.9/qtbase/mkspecs-features-mac.patch | 292 ------ .../libraries/qt-5/5.9/qtbase/qgtk-env.patch | 36 - .../5.9/qtbase/qnativesocketengine-type-pun.patch | 14 - pkgs/development/libraries/qt-5/5.9/qtbase/series | 9 - .../libraries/qt-5/5.9/qtbase/tzdir.patch | 39 - pkgs/development/libraries/qt-5/5.9/qtcharts.nix | 10 - .../libraries/qt-5/5.9/qtconnectivity.nix | 10 - .../libraries/qt-5/5.9/qtdeclarative.patch | 33 + .../libraries/qt-5/5.9/qtdeclarative/default.nix | 20 - .../qt-5/5.9/qtdeclarative/import-paths.patch | 20 - .../libraries/qt-5/5.9/qtdeclarative/series | 1 - pkgs/development/libraries/qt-5/5.9/qtdoc.nix | 7 - .../libraries/qt-5/5.9/qtgraphicaleffects.nix | 6 - .../libraries/qt-5/5.9/qtimageformats.nix | 6 - pkgs/development/libraries/qt-5/5.9/qtlocation.nix | 13 - .../development/libraries/qt-5/5.9/qtmacextras.nix | 10 - .../libraries/qt-5/5.9/qtmultimedia.nix | 21 - .../libraries/qt-5/5.9/qtquickcontrols.nix | 6 - .../libraries/qt-5/5.9/qtquickcontrols2.nix | 10 - pkgs/development/libraries/qt-5/5.9/qtscript.patch | 13 + .../qt-5/5.9/qtscript/0001-glib-2.32.patch | 25 - .../libraries/qt-5/5.9/qtscript/default.nix | 7 - pkgs/development/libraries/qt-5/5.9/qtsensors.nix | 13 - .../libraries/qt-5/5.9/qtserialport.patch | 22 + .../libraries/qt-5/5.9/qtserialport/default.nix | 12 - .../qtserialport/qtserialport-dlopen-udev.patch | 22 - .../libraries/qt-5/5.9/qtserialport/series | 1 - pkgs/development/libraries/qt-5/5.9/qtsvg.nix | 10 - pkgs/development/libraries/qt-5/5.9/qttools.patch | 71 ++ .../libraries/qt-5/5.9/qttools/cmake-paths.patch | 88 -- .../libraries/qt-5/5.9/qttools/default.nix | 16 - pkgs/development/libraries/qt-5/5.9/qttools/series | 1 - .../libraries/qt-5/5.9/qttranslations.nix | 6 - pkgs/development/libraries/qt-5/5.9/qtwayland.nix | 13 - .../libraries/qt-5/5.9/qtwebchannel.nix | 11 - .../qt-5/5.9/qtwebengine-paxmark-mksnapshot.patch | 48 + .../libraries/qt-5/5.9/qtwebengine/default.nix | 117 --- .../qtwebengine-paxmark-mksnapshot.patch | 48 - pkgs/development/libraries/qt-5/5.9/qtwebkit.patch | 77 ++ .../libraries/qt-5/5.9/qtwebkit/default.nix | 40 - .../qt-5/5.9/qtwebkit/qtwebkit-dlopen-gtk.patch | 64 -- .../qt-5/5.9/qtwebkit/qtwebkit-dlopen-udev.patch | 0 .../5.9/qtwebkit/qtwebkit-icucore-darwin.patch | 13 - .../development/libraries/qt-5/5.9/qtwebkit/series | 3 - .../libraries/qt-5/5.9/qtwebsockets.nix | 10 - .../development/libraries/qt-5/5.9/qtx11extras.nix | 6 - .../libraries/qt-5/5.9/qtxmlpatterns.nix | 6 - .../libraries/qt-5/hooks/fix-qt-builtin-paths.sh | 64 ++ .../libraries/qt-5/hooks/fix-qt-module-paths.sh | 43 + .../libraries/qt-5/hooks/fix-qt-static-libs.sh | 32 + .../libraries/qt-5/hooks/move-qt-dev-tools.sh | 34 + .../development/libraries/qt-5/hooks/qmake-hook.sh | 18 + .../libraries/qt-5/hooks/qtbase-setup-hook.sh | 87 ++ .../libraries/qt-5/hooks/qttools-setup-hook.sh | 1 + pkgs/development/libraries/qt-5/mkDerivation.nix | 29 + pkgs/development/libraries/qt-5/modules/qtbase.nix | 395 +++++++ .../libraries/qt-5/modules/qtcharts.nix | 7 + .../libraries/qt-5/modules/qtconnectivity.nix | 8 + .../libraries/qt-5/modules/qtdeclarative.nix | 25 + pkgs/development/libraries/qt-5/modules/qtdoc.nix | 7 + .../libraries/qt-5/modules/qtgraphicaleffects.nix | 7 + .../libraries/qt-5/modules/qtimageformats.nix | 6 + .../libraries/qt-5/modules/qtlocation.nix | 9 + .../libraries/qt-5/modules/qtmacextras.nix | 10 + .../libraries/qt-5/modules/qtmultimedia.nix | 17 + .../libraries/qt-5/modules/qtquickcontrols.nix | 6 + .../libraries/qt-5/modules/qtquickcontrols2.nix | 7 + .../libraries/qt-5/modules/qtscript.nix | 6 + .../libraries/qt-5/modules/qtsensors.nix | 7 + .../libraries/qt-5/modules/qtserialport.nix | 11 + pkgs/development/libraries/qt-5/modules/qtsvg.nix | 7 + .../development/libraries/qt-5/modules/qttools.nix | 34 + .../libraries/qt-5/modules/qttranslations.nix | 6 + .../libraries/qt-5/modules/qtwayland.nix | 9 + .../libraries/qt-5/modules/qtwebchannel.nix | 8 + .../libraries/qt-5/modules/qtwebengine.nix | 121 +++ .../libraries/qt-5/modules/qtwebkit.nix | 45 + .../libraries/qt-5/modules/qtwebsockets.nix | 7 + .../libraries/qt-5/modules/qtx11extras.nix | 6 + .../libraries/qt-5/modules/qtxmlpatterns.nix | 7 + pkgs/development/libraries/qt-5/qmake-hook.sh | 47 - pkgs/development/libraries/qt-5/qtModule.nix | 59 ++ .../libraries/qt-5/qtbase-setup-hook-darwin.sh | 192 ---- .../libraries/qt-5/qtbase-setup-hook.sh | 155 --- .../libraries/qt-5/qtsubmodule-setup-hook.sh | 2 - 110 files changed, 4508 insertions(+), 3490 deletions(-) create mode 100644 pkgs/development/libraries/qt-5/5.6/qtbase.patch create mode 100644 pkgs/development/libraries/qt-5/5.6/qtdeclarative.patch create mode 100644 pkgs/development/libraries/qt-5/5.6/qtscript.patch create mode 100644 pkgs/development/libraries/qt-5/5.6/qtserialport.patch create mode 100644 pkgs/development/libraries/qt-5/5.6/qttools.patch create mode 100644 pkgs/development/libraries/qt-5/5.6/qtwebengine-paxmark-mksnapshot.patch create mode 100644 pkgs/development/libraries/qt-5/5.6/qtwebengine.patch delete mode 100644 pkgs/development/libraries/qt-5/5.6/qtwebengine/chromium-clang-update-py.patch delete mode 100644 pkgs/development/libraries/qt-5/5.6/qtwebengine/qtwebengine-paxmark-mksnapshot.patch create mode 100644 pkgs/development/libraries/qt-5/5.6/qtwebkit.patch create mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase/cmake-paths.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase/compose-search-path.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase/darwin-cf.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase/darwin-series delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase/default.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-gl.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-gtkstyle.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-libXcursor.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-resolv.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase/library-paths.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase/libressl.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase/mkspecs-common-mac.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase/mkspecs-features-mac.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase/qgtk-env.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase/qnativesocketengine-type-pun.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase/series delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase/tzdir.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtcharts.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtconnectivity.nix create mode 100644 pkgs/development/libraries/qt-5/5.9/qtdeclarative.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtdeclarative/default.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtdeclarative/import-paths.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtdeclarative/series delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtdoc.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtgraphicaleffects.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtimageformats.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtlocation.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtmacextras.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtmultimedia.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtquickcontrols.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtquickcontrols2.nix create mode 100644 pkgs/development/libraries/qt-5/5.9/qtscript.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtscript/0001-glib-2.32.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtscript/default.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtsensors.nix create mode 100644 pkgs/development/libraries/qt-5/5.9/qtserialport.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtserialport/default.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtserialport/qtserialport-dlopen-udev.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtserialport/series delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtsvg.nix create mode 100644 pkgs/development/libraries/qt-5/5.9/qttools.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qttools/cmake-paths.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qttools/default.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qttools/series delete mode 100644 pkgs/development/libraries/qt-5/5.9/qttranslations.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtwayland.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtwebchannel.nix create mode 100644 pkgs/development/libraries/qt-5/5.9/qtwebengine-paxmark-mksnapshot.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtwebengine/default.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtwebengine/qtwebengine-paxmark-mksnapshot.patch create mode 100644 pkgs/development/libraries/qt-5/5.9/qtwebkit.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtwebkit/default.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtwebkit/qtwebkit-dlopen-gtk.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtwebkit/qtwebkit-dlopen-udev.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtwebkit/qtwebkit-icucore-darwin.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtwebkit/series delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtwebsockets.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtx11extras.nix delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtxmlpatterns.nix create mode 100644 pkgs/development/libraries/qt-5/hooks/fix-qt-builtin-paths.sh create mode 100644 pkgs/development/libraries/qt-5/hooks/fix-qt-module-paths.sh create mode 100644 pkgs/development/libraries/qt-5/hooks/fix-qt-static-libs.sh create mode 100644 pkgs/development/libraries/qt-5/hooks/move-qt-dev-tools.sh create mode 100644 pkgs/development/libraries/qt-5/hooks/qmake-hook.sh create mode 100644 pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh create mode 100644 pkgs/development/libraries/qt-5/hooks/qttools-setup-hook.sh create mode 100644 pkgs/development/libraries/qt-5/mkDerivation.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtbase.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtcharts.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtconnectivity.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtdeclarative.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtdoc.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtgraphicaleffects.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtimageformats.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtlocation.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtmacextras.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtmultimedia.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtquickcontrols.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtquickcontrols2.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtscript.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtsensors.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtserialport.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtsvg.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qttools.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qttranslations.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtwayland.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtwebchannel.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtwebengine.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtwebkit.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtwebsockets.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtx11extras.nix create mode 100644 pkgs/development/libraries/qt-5/modules/qtxmlpatterns.nix delete mode 100644 pkgs/development/libraries/qt-5/qmake-hook.sh create mode 100644 pkgs/development/libraries/qt-5/qtModule.nix delete mode 100644 pkgs/development/libraries/qt-5/qtbase-setup-hook-darwin.sh delete mode 100644 pkgs/development/libraries/qt-5/qtbase-setup-hook.sh delete mode 100644 pkgs/development/libraries/qt-5/qtsubmodule-setup-hook.sh (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/qt-5/5.6/default.nix b/pkgs/development/libraries/qt-5/5.6/default.nix index b250ae8b952..8b01ce2749c 100644 --- a/pkgs/development/libraries/qt-5/5.6/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/default.nix @@ -45,64 +45,39 @@ let mirror = "http://download.qt.io"; srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; }; - mkDerivation = args: - stdenv.mkDerivation (args // { - - qmakeFlags = - (args.qmakeFlags or []) - ++ optional (debug != null) - (if debug then "CONFIG+=debug" else "CONFIG+=release"); - - cmakeFlags = - (args.cmakeFlags or []) - ++ [ "-DBUILD_TESTING=OFF" ] - ++ optional (debug != null) - (if debug then "-DCMAKE_BUILD_TYPE=Debug" - else "-DCMAKE_BUILD_TYPE=Release"); - - enableParallelBuilding = args.enableParallelBuilding or true; - - }); - - qtSubmodule = args: - let - inherit (args) name; - version = args.version or srcs."${name}".version; - src = args.src or srcs."${name}".src; - in mkDerivation (args // { - name = "${name}-${version}"; - inherit src; - - propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []); - nativeBuildInputs = - (args.nativeBuildInputs or []) - ++ [ perl self.qmake ]; - - NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true; - - outputs = args.outputs or [ "out" "dev" ]; - setOutputFlags = args.setOutputFlags or false; - - setupHook = ../qtsubmodule-setup-hook.sh; - - meta = { - homepage = http://www.qt.io; - description = "A cross-platform application framework for C++"; - license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ]; - maintainers = with maintainers; [ qknight ttuegel periklis ]; - platforms = platforms.unix; - } // (args.meta or {}); - }); + patches = { + qtbase = [ ./qtbase.patch ]; + qtdeclarative = [ ./qtdeclarative.patch ]; + qtscript = [ ./qtscript.patch ]; + qtserialport = [ ./qtserialport.patch ]; + qttools = [ ./qttools.patch ]; + qtwebengine = + [ ./qtwebengine.patch ] + ++ optional stdenv.needsPax ./qtwebengine-paxmark-mksnapshot.patch; + qtwebkit = [ ./qtwebkit.patch ]; + }; + + mkDerivation = + import ../mkDerivation.nix + { inherit stdenv; inherit (stdenv) lib; } + { inherit debug; }; + + qtModule = + import ../qtModule.nix + { inherit mkDerivation perl; inherit (stdenv) lib; } + { inherit self srcs patches; }; addPackages = self: with self; let - callPackage = self.newScope { inherit qtCompatVersion qtSubmodule srcs; }; + callPackage = self.newScope { inherit qtCompatVersion qtModule srcs; }; in { inherit mkDerivation; - qtbase = callPackage ./qtbase { + qtbase = callPackage ../modules/qtbase.nix { inherit bison cups harfbuzz mesa; + inherit (srcs.qtbase) src version; + patches = patches.qtbase; inherit developerBuild decryptSslTraffic; }; @@ -110,47 +85,46 @@ let /* qtactiveqt = not packaged */ /* qtandroidextras = not packaged */ /* qtcanvas3d = not packaged */ - qtconnectivity = callPackage ./qtconnectivity.nix {}; - qtdeclarative = callPackage ./qtdeclarative {}; - qtdoc = callPackage ./qtdoc.nix {}; - qtenginio = callPackage ./qtenginio.nix {}; - qtgraphicaleffects = callPackage ./qtgraphicaleffects.nix {}; - qtimageformats = callPackage ./qtimageformats.nix {}; - qtlocation = callPackage ./qtlocation.nix {}; + qtconnectivity = callPackage ../modules/qtconnectivity.nix {}; + qtdeclarative = callPackage ../modules/qtdeclarative.nix {}; + qtdoc = callPackage ../modules/qtdoc.nix {}; + qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {}; + qtimageformats = callPackage ../modules/qtimageformats.nix {}; + qtlocation = callPackage ../modules/qtlocation.nix {}; /* qtmacextras = not packaged */ - qtmultimedia = callPackage ./qtmultimedia.nix { + qtmultimedia = callPackage ../modules/qtmultimedia.nix { inherit gstreamer gst-plugins-base; }; qtquick1 = null; - qtquickcontrols = callPackage ./qtquickcontrols.nix {}; - qtquickcontrols2 = callPackage ./qtquickcontrols2.nix {}; - qtscript = callPackage ./qtscript {}; - qtsensors = callPackage ./qtsensors.nix {}; - qtserialport = callPackage ./qtserialport {}; - qtsvg = callPackage ./qtsvg.nix {}; - qttools = callPackage ./qttools {}; - qttranslations = callPackage ./qttranslations.nix {}; - qtwayland = callPackage ./qtwayland.nix {}; - qtwebchannel = callPackage ./qtwebchannel.nix {}; - qtwebengine = callPackage ./qtwebengine {}; - qtwebkit = callPackage ./qtwebkit {}; - qtwebsockets = callPackage ./qtwebsockets.nix {}; + qtquickcontrols = callPackage ../modules/qtquickcontrols.nix {}; + qtquickcontrols2 = callPackage ../modules/qtquickcontrols2.nix {}; + qtscript = callPackage ../modules/qtscript.nix {}; + qtsensors = callPackage ../modules/qtsensors.nix {}; + qtserialport = callPackage ../modules/qtserialport.nix {}; + qtsvg = callPackage ../modules/qtsvg.nix {}; + qttools = callPackage ../modules/qttools.nix {}; + qttranslations = callPackage ../modules/qttranslations.nix {}; + qtwayland = callPackage ../modules/qtwayland.nix {}; + qtwebchannel = callPackage ../modules/qtwebchannel.nix {}; + qtwebengine = callPackage ../modules/qtwebengine.nix {}; + qtwebkit = callPackage ../modules/qtwebkit.nix {}; + qtwebsockets = callPackage ../modules/qtwebsockets.nix {}; /* qtwinextras = not packaged */ - qtx11extras = callPackage ./qtx11extras.nix {}; - qtxmlpatterns = callPackage ./qtxmlpatterns.nix {}; + qtx11extras = callPackage ../modules/qtx11extras.nix {}; + qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {}; env = callPackage ../qt-env.nix {}; full = env "qt-${qtbase.version}" [ - qtconnectivity qtdeclarative qtdoc qtenginio qtgraphicaleffects - qtimageformats qtlocation qtmultimedia qtquickcontrols qtquickcontrols2 - qtscript qtsensors qtserialport qtsvg qttools qttranslations qtwayland + qtconnectivity qtdeclarative qtdoc qtgraphicaleffects qtimageformats + qtlocation qtmultimedia qtquickcontrols qtquickcontrols2 qtscript + qtsensors qtserialport qtsvg qttools qttranslations qtwayland qtwebchannel qtwebengine qtwebkit qtwebsockets qtx11extras qtxmlpatterns ]; qmake = makeSetupHook { deps = [ self.qtbase.dev ]; substitutions = { inherit (stdenv) isDarwin; }; - } ../qmake-hook.sh; + } ../hooks/qmake-hook.sh; }; self = makeScope newScope addPackages; diff --git a/pkgs/development/libraries/qt-5/5.6/qtbase.patch b/pkgs/development/libraries/qt-5/5.6/qtbase.patch new file mode 100644 index 00000000000..0e21a17665b --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.6/qtbase.patch @@ -0,0 +1,773 @@ +diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf +index 11fb52a0b1..a4cca1fdcb 100644 +--- a/mkspecs/features/create_cmake.prf ++++ b/mkspecs/features/create_cmake.prf +@@ -21,7 +21,7 @@ load(cmake_functions) + # at cmake time whether package has been found via a symlink, and correct + # that to an absolute path. This is only done for installations to + # the /usr or / prefix. +-CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$[QT_INSTALL_LIBS]) ++CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$NIX_OUTPUT_OUT/lib/) + contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_USR_MOVE_WORKAROUND = $$CMAKE_INSTALL_LIBS_DIR + + CMAKE_OUT_DIR = $$MODULE_BASE_OUTDIR/lib/cmake +@@ -47,47 +47,22 @@ split_incpath { + $$cmake_extra_source_includes.output + } + +-CMAKE_INCLUDE_DIR = $$cmakeRelativePath($$[QT_INSTALL_HEADERS], $$[QT_INSTALL_PREFIX]) +-contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") { +- CMAKE_INCLUDE_DIR = $$[QT_INSTALL_HEADERS]/ +- CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True +-} ++CMAKE_INCLUDE_DIR = $$NIX_OUTPUT_DEV/include/ ++CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True + + !exists($$first(QT.$${MODULE}_private.includes)): CMAKE_NO_PRIVATE_INCLUDES = true + +-CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX]) +-contains(CMAKE_LIB_DIR,"^\\.\\./.*") { +- CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]/ +- CMAKE_LIB_DIR_IS_ABSOLUTE = True +-} else { +- CMAKE_RELATIVE_INSTALL_LIBS_DIR = $$cmakeRelativePath($$[QT_INSTALL_PREFIX], $$[QT_INSTALL_LIBS]) +- # We need to go up another two levels because the CMake files are +- # installed in $${CMAKE_LIB_DIR}/cmake/Qt5$${CMAKE_MODULE_NAME} +- CMAKE_RELATIVE_INSTALL_DIR = "$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}../../" +-} ++CMAKE_LIB_DIR = $$NIX_OUTPUT_DEV/lib/ ++CMAKE_LIB_DIR_IS_ABSOLUTE = True + +-CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX]) +-contains(CMAKE_BIN_DIR, "^\\.\\./.*") { +- CMAKE_BIN_DIR = $$[QT_HOST_BINS]/ +- CMAKE_BIN_DIR_IS_ABSOLUTE = True +-} ++CMAKE_BIN_DIR = $$NIX_OUTPUT_BIN/bin/ ++CMAKE_BIN_DIR_IS_ABSOLUTE = True + +-CMAKE_PLUGIN_DIR = $$cmakeRelativePath($$[QT_INSTALL_PLUGINS], $$[QT_INSTALL_PREFIX]) +-contains(CMAKE_PLUGIN_DIR, "^\\.\\./.*") { +- CMAKE_PLUGIN_DIR = $$[QT_INSTALL_PLUGINS]/ +- CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True +-} ++CMAKE_PLUGIN_DIR = $$NIX_OUTPUT_PLUGIN/ ++CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True + +-win32:!wince:!static:!staticlib { +- CMAKE_DLL_DIR = $$cmakeRelativePath($$[QT_INSTALL_BINS], $$[QT_INSTALL_PREFIX]) +- contains(CMAKE_DLL_DIR, "^\\.\\./.*") { +- CMAKE_DLL_DIR = $$[QT_INSTALL_BINS]/ +- CMAKE_DLL_DIR_IS_ABSOLUTE = True +- } +-} else { +- CMAKE_DLL_DIR = $$CMAKE_LIB_DIR +- CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE +-} ++CMAKE_DLL_DIR = $$NIX_OUTPUT_DEV/lib/ ++CMAKE_DLL_DIR_IS_ABSOLUTE = True + + static|staticlib:CMAKE_STATIC_TYPE = true + +@@ -167,7 +142,7 @@ contains(CONFIG, plugin) { + cmake_target_file + + cmake_qt5_plugin_file.files = $$cmake_target_file.output +- cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME} ++ cmake_qt5_plugin_file.path = $$NIX_OUTPUT_OUT/lib/cmake/Qt5$${CMAKE_MODULE_NAME} + INSTALLS += cmake_qt5_plugin_file + + return() +@@ -314,7 +289,7 @@ exists($$cmake_macros_file.input) { + cmake_qt5_module_files.files += $$cmake_macros_file.output + } + +-cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME} ++cmake_qt5_module_files.path = $$NIX_OUTPUT_OUT/lib/cmake/Qt5$${CMAKE_MODULE_NAME} + + # We are generating cmake files. Most developers of Qt are not aware of cmake, + # so we require automatic tests to be available. The only module which should +diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +index d2358cae4b..61d8cc0471 100644 +--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in ++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +@@ -9,30 +9,6 @@ if (CMAKE_VERSION VERSION_LESS 3.0.0) + endif() + !!ENDIF + +-!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND) +-!!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\") +-!!ELSE +-get_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH) +-# Use original install prefix when loaded through a +-# cross-prefix symbolic link such as /lib -> /usr/lib. +-get_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH) +-get_filename_component(_realOrig \"$$CMAKE_INSTALL_LIBS_DIR/cmake/Qt5$${CMAKE_MODULE_NAME}\" REALPATH) +-if(_realCurr STREQUAL _realOrig) +- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$CMAKE_INSTALL_LIBS_DIR/$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}\" ABSOLUTE) +-else() +- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE) +-endif() +-unset(_realOrig) +-unset(_realCurr) +-unset(_IMPORT_PREFIX) +-!!ENDIF +-!!ELIF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +-get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE) +-!!ELSE +-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\") +-!!ENDIF +- + !!IF !equals(TEMPLATE, aux) + # For backwards compatibility only. Use Qt5$${CMAKE_MODULE_NAME}_VERSION instead. + set(Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.MAJOR_VERSION).$$eval(QT.$${MODULE}.MINOR_VERSION).$$eval(QT.$${MODULE}.PATCH_VERSION)") +@@ -58,11 +34,7 @@ endmacro() + macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION) + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) + +-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") +-!!ELSE + set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\") +-!!ENDIF + _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) + set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES + \"INTERFACE_LINK_LIBRARIES\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\" +@@ -75,11 +47,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI + ) + + !!IF !isEmpty(CMAKE_WINDOWS_BUILD) +-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") +-!!ELSE + set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") +-!!ENDIF + _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_implib}) + if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\") + set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES +@@ -95,24 +63,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + !!IF !no_module_headers + !!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK) + set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework\" +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Headers\" ++ \"$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework\" ++ \"$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Headers\" + ) + !!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES) + set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\" +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\" +- ) +-!!ELSE +- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\") +-!!ENDIF +-!!ELSE +-!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE) +- set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\") +-!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES) +- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\" +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\" ++ \"$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\" ++ \"$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\" + ) + !!ELSE + set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\") +@@ -128,7 +85,6 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\") + !!ENDIF + !!ENDIF +-!!ENDIF + !!IF !isEmpty(CMAKE_ADD_SOURCE_INCLUDE_DIRS) + include(\"${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake\" OPTIONAL) + !!ENDIF +@@ -254,25 +210,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD) + !!IF isEmpty(CMAKE_DEBUG_TYPE) + !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) +-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) +-!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE + if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) +-!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE + _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" ) + !!ELSE // CMAKE_STATIC_WINDOWS_BUILD + if (EXISTS +-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" +-!!ELSE + \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" +-!!ENDIF + AND EXISTS +-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) +-!!ELSE + \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) +-!!ENDIF + _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) + !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD + endif() +@@ -291,25 +235,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD) + !!IF isEmpty(CMAKE_RELEASE_TYPE) + !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) +-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) +-!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE + if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) +-!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE + _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" ) + !!ELSE // CMAKE_STATIC_WINDOWS_BUILD + if (EXISTS +-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" +-!!ELSE + \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" +-!!ENDIF + AND EXISTS +-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) +-!!ELSE + \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) +-!!ENDIF + _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) + !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD + endif() +@@ -328,11 +260,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION) + set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) + +-!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") +-!!ELSE + set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") +-!!ENDIF + _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) + set_target_properties(Qt5::${Plugin} PROPERTIES + \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} +diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf +index b09d42a0a4..f076265bdd 100644 +--- a/mkspecs/features/qml_module.prf ++++ b/mkspecs/features/qml_module.prf +@@ -17,10 +17,7 @@ fq_qml_files = $$_PRO_FILE_PWD_/qmldir + + for(qmlf, QML_FILES): fq_qml_files += $$absolute_path($$qmlf, $$_PRO_FILE_PWD_) + +-qml1_target: \ +- instbase = $$[QT_INSTALL_IMPORTS] +-else: \ +- instbase = $$[QT_INSTALL_QML] ++instbase = $$NIX_OUTPUT_QML + + # Install rules + qmldir.base = $$_PRO_FILE_PWD_ +diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf +index ebec1db8da..62ace84a6c 100644 +--- a/mkspecs/features/qml_plugin.prf ++++ b/mkspecs/features/qml_plugin.prf +@@ -46,13 +46,8 @@ exists($$QMLTYPEFILE): QML_FILES += $$QMLTYPEFILE + + load(qt_build_paths) + +-qml1_target { +- DESTDIR = $$MODULE_BASE_OUTDIR/imports/$$TARGETPATH +- instbase = $$[QT_INSTALL_IMPORTS] +-} else { +- DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH +- instbase = $$[QT_INSTALL_QML] +-} ++DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH ++instbase = $$NIX_OUTPUT_QML + + target.path = $$instbase/$$TARGETPATH + INSTALLS += target +diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf +index 46aca50cc2..4f4e634724 100644 +--- a/mkspecs/features/qt_app.prf ++++ b/mkspecs/features/qt_app.prf +@@ -29,7 +29,7 @@ host_build:force_bootstrap { + target.path = $$[QT_HOST_BINS] + } else { + !build_pass:contains(QT_CONFIG, debug_and_release): CONFIG += release +- target.path = $$[QT_INSTALL_BINS] ++ target.path = $$NIX_OUTPUT_BIN/bin + CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable + } + INSTALLS += target +diff --git a/mkspecs/features/qt_build_paths.prf b/mkspecs/features/qt_build_paths.prf +index 1848f00e90..2af93675c5 100644 +--- a/mkspecs/features/qt_build_paths.prf ++++ b/mkspecs/features/qt_build_paths.prf +@@ -23,6 +23,6 @@ exists($$MODULE_BASE_INDIR/.git): \ + !force_independent { + # If the module is not built independently, everything ends up in qtbase. + # This is the case in non-prefix builds, except for selected modules. +- MODULE_BASE_OUTDIR = $$[QT_HOST_PREFIX] +- MODULE_QMAKE_OUTDIR = $$[QT_HOST_PREFIX] ++ MODULE_BASE_OUTDIR = $$NIX_OUTPUT_OUT ++ MODULE_QMAKE_OUTDIR = $$NIX_OUTPUT_OUT + } +diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf +index c1809468af..0a12ec24db 100644 +--- a/mkspecs/features/qt_common.prf ++++ b/mkspecs/features/qt_common.prf +@@ -30,8 +30,8 @@ contains(TEMPLATE, .*lib) { + qqt_libdir = \$\$\$\$[QT_HOST_LIBS] + qt_libdir = $$[QT_HOST_LIBS] + } else { +- qqt_libdir = \$\$\$\$[QT_INSTALL_LIBS] +- qt_libdir = $$[QT_INSTALL_LIBS] ++ qqt_libdir = \$\$\$\$NIX_OUTPUT_OUT/lib ++ qt_libdir = $$NIX_OUTPUT_OUT/lib + } + contains(QMAKE_DEFAULT_LIBDIRS, $$qt_libdir) { + lib_replace.match = "[^ ']*$$rplbase/lib" +diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf +index 183d0c9502..17982b04ec 100644 +--- a/mkspecs/features/qt_docs.prf ++++ b/mkspecs/features/qt_docs.prf +@@ -41,7 +41,7 @@ QMAKE_DOCS_OUTPUTDIR = $$QMAKE_DOCS_BASE_OUTDIR/$$QMAKE_DOCS_TARGETDIR + + QDOC += -outputdir $$shell_quote($$QMAKE_DOCS_OUTPUTDIR) + !build_online_docs: \ +- QDOC += -installdir $$shell_quote($$[QT_INSTALL_DOCS]) ++ QDOC += -installdir $$shell_quote($$NIX_OUTPUT_DOC) + PREP_DOC_INDEXES = + DOC_INDEXES = + !isEmpty(QTREPOS) { +@@ -60,8 +60,8 @@ DOC_INDEXES = + DOC_INDEXES += -indexdir $$shell_quote($$qrep/doc) + } else { + prepare_docs: \ +- PREP_DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get]) +- DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get]) ++ PREP_DOC_INDEXES += -indexdir $$shell_quote($$NIX_OUTPUT_DOC) ++ DOC_INDEXES += -indexdir $$shell_quote($$NIX_OUTPUT_DOC) + } + doc_command = $$QDOC $$QMAKE_DOCS + prepare_docs { +@@ -75,12 +75,12 @@ prepare_docs { + qch_docs.commands = $$QHELPGENERATOR $$shell_quote($$QMAKE_DOCS_OUTPUTDIR/$${QMAKE_DOCS_TARGET}.qhp) -o $$shell_quote($$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch) + + inst_html_docs.files = $$QMAKE_DOCS_OUTPUTDIR +- inst_html_docs.path = $$[QT_INSTALL_DOCS] ++ inst_html_docs.path = $$NIX_OUTPUT_DOC + inst_html_docs.CONFIG += no_check_exist directory no_default_install no_build + INSTALLS += inst_html_docs + + inst_qch_docs.files = $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch +- inst_qch_docs.path = $$[QT_INSTALL_DOCS] ++ inst_qch_docs.path = $$NIX_OUTPUT_DOC + inst_qch_docs.CONFIG += no_check_exist no_default_install no_build + INSTALLS += inst_qch_docs + +diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf +index 4c68cfd72f..f422f18266 100644 +--- a/mkspecs/features/qt_example_installs.prf ++++ b/mkspecs/features/qt_example_installs.prf +@@ -70,7 +70,7 @@ probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) + $$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \ + $$DBUS_ADAPTORS $$DBUS_INTERFACES + addInstallFiles(sources.files, $$sourcefiles) +- sources.path = $$[QT_INSTALL_EXAMPLES]/$$probase ++ sources.path = $$NIX_OUTPUT_DEV/share/examples/$$probase + INSTALLS += sources + + check_examples { +diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf +index 4a1d265a8b..abe0da95f6 100644 +--- a/mkspecs/features/qt_functions.prf ++++ b/mkspecs/features/qt_functions.prf +@@ -70,7 +70,7 @@ defineTest(qtHaveModule) { + defineTest(qtPrepareTool) { + cmd = $$eval(QT_TOOL.$${2}.binary) + isEmpty(cmd) { +- cmd = $$[QT_HOST_BINS]/$$2 ++ cmd = $$system("type -p $$2") + exists($${cmd}.pl) { + cmd = perl -w $$system_path($${cmd}.pl) + } else: contains(QMAKE_HOST.os, Windows) { +diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf +index 3a5dbb6274..24f321bd82 100644 +--- a/mkspecs/features/qt_installs.prf ++++ b/mkspecs/features/qt_installs.prf +@@ -12,16 +12,10 @@ + #library + !qt_no_install_library { + win32 { +- host_build: \ +- dlltarget.path = $$[QT_HOST_BINS] +- else: \ +- dlltarget.path = $$[QT_INSTALL_BINS] ++ dlltarget.path = $$NIX_OUTPUT_BIN/bin + INSTALLS += dlltarget + } +- host_build: \ +- target.path = $$[QT_HOST_LIBS] +- else: \ +- target.path = $$[QT_INSTALL_LIBS] ++ target.path = $$NIX_OUTPUT_OUT/lib + !static: target.CONFIG = no_dll + INSTALLS += target + } +@@ -29,33 +23,33 @@ + #headers + qt_install_headers { + class_headers.files = $$SYNCQT.HEADER_CLASSES +- class_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME ++ class_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME + INSTALLS += class_headers + + targ_headers.files = $$SYNCQT.HEADER_FILES +- targ_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME ++ targ_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME + INSTALLS += targ_headers + + private_headers.files = $$SYNCQT.PRIVATE_HEADER_FILES +- private_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private ++ private_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private + INSTALLS += private_headers + + qpa_headers.files = $$SYNCQT.QPA_HEADER_FILES +- qpa_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa ++ qpa_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa + INSTALLS += qpa_headers + } + + #module + qt_install_module { + !isEmpty(MODULE_PRI) { +- pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules ++ pritarget.path = $$NIX_OUTPUT_DEV/mkspecs/modules + pritarget.files = $$MODULE_PRI + INSTALLS += pritarget + } else: isEmpty(MODULE_PRIVATE_PRI) { + warning("Project $$basename(_PRO_FILE_) is a module, but has not defined MODULE_PRI, which is required for Qt to expose the module to other projects.") + } + !isEmpty(MODULE_PRIVATE_PRI) { +- privpritarget.path = $$[QT_HOST_DATA]/mkspecs/modules ++ privpritarget.path = $$NIX_OUTPUT_DEV/mkspecs/modules + privpritarget.files = $$MODULE_PRIVATE_PRI + INSTALLS += privpritarget + } +diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf +index 3cf6c7349c..83e68025a5 100644 +--- a/mkspecs/features/qt_plugin.prf ++++ b/mkspecs/features/qt_plugin.prf +@@ -82,7 +82,7 @@ CONFIG(static, static|shared)|prefix_build { + } + } + +-target.path = $$[QT_INSTALL_PLUGINS]/$$PLUGIN_TYPE ++target.path = $$NIX_OUTPUT_PLUGIN/$$PLUGIN_TYPE + INSTALLS += target + + TARGET = $$qt5LibraryTarget($$TARGET) +diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in +index 91a4eb619a..08b533e69c 100644 +--- a/src/corelib/Qt5CoreConfigExtras.cmake.in ++++ b/src/corelib/Qt5CoreConfigExtras.cmake.in +@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::qmake) + add_executable(Qt5::qmake IMPORTED) + + !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") ++ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") + !!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") + !!ENDIF +@@ -18,7 +18,7 @@ if (NOT TARGET Qt5::moc) + add_executable(Qt5::moc IMPORTED) + + !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") ++ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") + !!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") + !!ENDIF +@@ -35,7 +35,7 @@ if (NOT TARGET Qt5::rcc) + add_executable(Qt5::rcc IMPORTED) + + !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") ++ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") + !!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") + !!ENDIF +@@ -131,7 +131,7 @@ if (NOT TARGET Qt5::WinMain) + !!IF !isEmpty(CMAKE_RELEASE_TYPE) + set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\") ++ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\") + !!ELSE + set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\") + !!ENDIF +@@ -145,7 +145,7 @@ if (NOT TARGET Qt5::WinMain) + set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) + + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\") ++ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\") + !!ELSE + set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\") + !!ENDIF +diff --git a/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in b/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in +index c357237d0e..6f0c75de3c 100644 +--- a/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in ++++ b/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in +@@ -1,6 +1,6 @@ + + !!IF isEmpty(CMAKE_HOST_DATA_DIR_IS_ABSOLUTE) +-set(_qt5_corelib_extra_includes \"${_qt5Core_install_prefix}/$${CMAKE_HOST_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\") ++set(_qt5_corelib_extra_includes \"$$NIX_OUTPUT_DEV/$${CMAKE_HOST_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\") + !!ELSE + set(_qt5_corelib_extra_includes \"$${CMAKE_HOST_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\") + !!ENDIF +diff --git a/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in b/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in +index 706304cf34..546420f6ad 100644 +--- a/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in ++++ b/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in +@@ -1,6 +1,6 @@ + + !!IF isEmpty(CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE) +-set(_qt5_corelib_extra_includes \"${_qt5Core_install_prefix}/$${CMAKE_INSTALL_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\") ++set(_qt5_corelib_extra_includes \"$$NIX_OUTPUT_DEV/$${CMAKE_INSTALL_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\") + !!ELSE + set(_qt5_corelib_extra_includes \"$${CMAKE_INSTALL_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\") + !!ENDIF +diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp +index f5b15207cc..f85e0524bb 100644 +--- a/src/corelib/kernel/qcoreapplication.cpp ++++ b/src/corelib/kernel/qcoreapplication.cpp +@@ -2533,6 +2533,15 @@ QStringList QCoreApplication::libraryPaths() + QStringList *app_libpaths = new QStringList; + coreappdata()->app_libpaths.reset(app_libpaths); + ++ // Add library paths derived from PATH ++ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':'); ++ const QString plugindir = QStringLiteral("../" NIXPKGS_QT_PLUGIN_PREFIX); ++ for (const QString &path: paths) { ++ if (!path.isEmpty()) { ++ app_libpaths->append(QDir::cleanPath(path + QDir::separator() + plugindir)); ++ } ++ } ++ + const QByteArray libPathEnv = qgetenv("QT_PLUGIN_PATH"); + if (!libPathEnv.isEmpty()) { + QStringList paths = QFile::decodeName(libPathEnv).split(QDir::listSeparator(), QString::SkipEmptyParts); +diff --git a/src/corelib/tools/qtimezoneprivate_tz.cpp b/src/corelib/tools/qtimezoneprivate_tz.cpp +index c13c9a5223..6936851511 100644 +--- a/src/corelib/tools/qtimezoneprivate_tz.cpp ++++ b/src/corelib/tools/qtimezoneprivate_tz.cpp +@@ -64,7 +64,11 @@ typedef QHash QTzTimeZoneHash; + // Parse zone.tab table, assume lists all installed zones, if not will need to read directories + static QTzTimeZoneHash loadTzTimeZones() + { +- QString path = QStringLiteral("/usr/share/zoneinfo/zone.tab"); ++ // Try TZDIR first, in case we're running on NixOS. ++ QString path = QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/zone.tab"); ++ // Fallback to traditional paths in case we are not on NixOS. ++ if (!QFile::exists(path)) ++ path = QStringLiteral("/usr/share/zoneinfo/zone.tab"); + if (!QFile::exists(path)) + path = QStringLiteral("/usr/lib/zoneinfo/zone.tab"); + +@@ -636,12 +640,16 @@ void QTzTimeZonePrivate::init(const QByteArray &ianaId) + if (!tzif.open(QIODevice::ReadOnly)) + return; + } else { +- // Open named tz, try modern path first, if fails try legacy path +- tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId)); ++ // Try TZDIR first, in case we're running on NixOS ++ tzif.setFileName(QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/") + QString::fromLocal8Bit(ianaId)); + if (!tzif.open(QIODevice::ReadOnly)) { +- tzif.setFileName(QLatin1String("/usr/lib/zoneinfo/") + QString::fromLocal8Bit(ianaId)); +- if (!tzif.open(QIODevice::ReadOnly)) +- return; ++ // Open named tz, try modern path first, if fails try legacy path ++ tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId)); ++ if (!tzif.open(QIODevice::ReadOnly)) { ++ tzif.setFileName(QLatin1String("/usr/lib/zoneinfo/") + QString::fromLocal8Bit(ianaId)); ++ if (!tzif.open(QIODevice::ReadOnly)) ++ return; ++ } + } + } + +diff --git a/src/dbus/Qt5DBusConfigExtras.cmake.in b/src/dbus/Qt5DBusConfigExtras.cmake.in +index 1d947159e2..b36865fc48 100644 +--- a/src/dbus/Qt5DBusConfigExtras.cmake.in ++++ b/src/dbus/Qt5DBusConfigExtras.cmake.in +@@ -2,11 +2,7 @@ + if (NOT TARGET Qt5::qdbuscpp2xml) + add_executable(Qt5::qdbuscpp2xml IMPORTED) + +-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") +-!!ELSE +- set(imported_location \"$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") +-!!ENDIF ++ set(imported_location \"$$NIX_OUTPUT_DEV/bin/qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") + _qt5_DBus_check_file_exists(${imported_location}) + + set_target_properties(Qt5::qdbuscpp2xml PROPERTIES +@@ -17,11 +13,7 @@ endif() + if (NOT TARGET Qt5::qdbusxml2cpp) + add_executable(Qt5::qdbusxml2cpp IMPORTED) + +-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") +-!!ELSE +- set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") +-!!ENDIF ++ set(imported_location \"$$NIX_OUTPUT_DEV/bin/qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") + _qt5_DBus_check_file_exists(${imported_location}) + + set_target_properties(Qt5::qdbusxml2cpp PROPERTIES +diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in +index 07869efd7d..37b95d1b6b 100644 +--- a/src/gui/Qt5GuiConfigExtras.cmake.in ++++ b/src/gui/Qt5GuiConfigExtras.cmake.in +@@ -2,7 +2,7 @@ + !!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE) + + !!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE) +-set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR/QtANGLE\") ++set(Qt5Gui_EGL_INCLUDE_DIRS \"$$NIX_OUTPUT_DEV/$$CMAKE_INCLUDE_DIR/QtANGLE\") + !!ELSE + set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR/QtANGLE\") + !!ENDIF +@@ -17,13 +17,13 @@ macro(_populate_qt5gui_gl_target_properties TargetName Configuration LIB_LOCATIO + set_property(TARGET Qt5::${TargetName} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) + + !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Gui_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") ++ set(imported_location \"$$NIX_OUTPUT_OUT/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") + !!ELSE + set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\") + !!ENDIF + + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- set(imported_implib \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") ++ set(imported_implib \"$$NIX_OUTPUT_DEV/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") + !!ELSE + set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") + !!ENDIF +diff --git a/src/network/kernel/qdnslookup_unix.cpp b/src/network/kernel/qdnslookup_unix.cpp +index 584f0b0f0e..24d80063f2 100644 +--- a/src/network/kernel/qdnslookup_unix.cpp ++++ b/src/network/kernel/qdnslookup_unix.cpp +@@ -83,7 +83,7 @@ static bool resolveLibraryInternal() + if (!lib.load()) + #endif + { +- lib.setFileName(QLatin1String("resolv")); ++ lib.setFileName(QLatin1String(NIXPKGS_LIBRESOLV)); + if (!lib.load()) + return false; + } +diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp +index dabf1913cc..53bb867e07 100644 +--- a/src/network/kernel/qhostinfo_unix.cpp ++++ b/src/network/kernel/qhostinfo_unix.cpp +@@ -94,7 +94,7 @@ static bool resolveLibraryInternal() + if (!lib.load()) + #endif + { +- lib.setFileName(QLatin1String("resolv")); ++ lib.setFileName(QLatin1String(NIXPKGS_LIBRESOLV)); + if (!lib.load()) + return false; + } +diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp +index 68caaeb6dc..fef4a81474 100644 +--- a/src/network/ssl/qsslcontext_openssl.cpp ++++ b/src/network/ssl/qsslcontext_openssl.cpp +@@ -340,7 +340,7 @@ init_context: + + const QVector qcurves = sslContext->sslConfiguration.ellipticCurves(); + if (!qcurves.isEmpty()) { +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC) ++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC) + // Set the curves to be used + if (q_SSLeay() >= 0x10002000L) { + // SSL_CTX_ctrl wants a non-const pointer as last argument, +@@ -354,7 +354,7 @@ init_context: + return sslContext; + } + } else +-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC) ++#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC) + { + // specific curves requested, but not possible to set -> error + sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("OpenSSL version too old, need at least v1.0.2")); +diff --git a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp +index 44f1d7e6ba..e24fe54326 100644 +--- a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp ++++ b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp +@@ -251,12 +251,9 @@ void TableGenerator::initPossibleLocations() + // the QTCOMPOSE environment variable + if (qEnvironmentVariableIsSet("QTCOMPOSE")) + m_possibleLocations.append(QString::fromLocal8Bit(qgetenv("QTCOMPOSE"))); +- m_possibleLocations.append(QStringLiteral("/usr/share/X11/locale")); +- m_possibleLocations.append(QStringLiteral("/usr/local/share/X11/locale")); +- m_possibleLocations.append(QStringLiteral("/usr/lib/X11/locale")); +- m_possibleLocations.append(QStringLiteral("/usr/local/lib/X11/locale")); + m_possibleLocations.append(QStringLiteral(X11_PREFIX "/share/X11/locale")); + m_possibleLocations.append(QStringLiteral(X11_PREFIX "/lib/X11/locale")); ++ m_possibleLocations.append(QLatin1String(NIXPKGS_QTCOMPOSE)); + } + + QString TableGenerator::findComposeFile() +diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp +index 9bdedcc830..2559b2066b 100644 +--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp ++++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp +@@ -570,7 +570,14 @@ void (*QGLXContext::getProcAddress(const QByteArray &procName)) () + #ifndef QT_NO_LIBRARY + extern const QString qt_gl_library_name(); + // QLibrary lib(qt_gl_library_name()); ++ // Check system library paths first + QLibrary lib(QLatin1String("GL")); ++#ifdef NIXPKGS_MESA_GL ++ if (!lib.load()) { ++ // Fallback to Mesa driver ++ lib.setFileName(QLatin1String(NIXPKGS_MESA_GL)); ++ } ++#endif // NIXPKGS_MESA_GL + glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB"); + #endif + } +diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp +index b321ed95dc..9e7a72521c 100644 +--- a/src/plugins/platforms/xcb/qxcbcursor.cpp ++++ b/src/plugins/platforms/xcb/qxcbcursor.cpp +@@ -303,10 +303,10 @@ QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen) + #if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY) + static bool function_ptrs_not_initialized = true; + if (function_ptrs_not_initialized) { +- QLibrary xcursorLib(QLatin1String("Xcursor"), 1); ++ QLibrary xcursorLib(QLatin1String(NIXPKGS_LIBXCURSOR), 1); + bool xcursorFound = xcursorLib.load(); + if (!xcursorFound) { // try without the version number +- xcursorLib.setFileName(QLatin1String("Xcursor")); ++ xcursorLib.setFileName(QLatin1String(NIXPKGS_LIBXCURSOR)); + xcursorFound = xcursorLib.load(); + } + if (xcursorFound) { +diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in +index 99d87e2e46..a4eab2aa72 100644 +--- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in ++++ b/src/widgets/Qt5WidgetsConfigExtras.cmake.in +@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::uic) + add_executable(Qt5::uic IMPORTED) + + !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") ++ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") + !!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") + !!ENDIF diff --git a/pkgs/development/libraries/qt-5/5.6/qtdeclarative.patch b/pkgs/development/libraries/qt-5/5.6/qtdeclarative.patch new file mode 100644 index 00000000000..dbddaa2a1d6 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.6/qtdeclarative.patch @@ -0,0 +1,20 @@ +diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp +index dfdf2edbe..7ee96049d 100644 +--- a/src/qml/qml/qqmlimport.cpp ++++ b/src/qml/qml/qqmlimport.cpp +@@ -1568,6 +1568,15 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e) + QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); + addImportPath(installImportsPath); + ++ // Add import paths derived from PATH ++ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':'); ++ const QString qmldir = QStringLiteral("../" NIXPKGS_QML2_IMPORT_PREFIX); ++ for (const QString &path: paths) { ++ if (!path.isEmpty()) { ++ addImportPath(QDir::cleanPath(path + QDir::separator() + qmldir)); ++ } ++ } ++ + // env import paths + if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty("QML2_IMPORT_PATH"))) { + const QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH"); diff --git a/pkgs/development/libraries/qt-5/5.6/qtscript.patch b/pkgs/development/libraries/qt-5/5.6/qtscript.patch new file mode 100644 index 00000000000..5508dec1280 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.6/qtscript.patch @@ -0,0 +1,13 @@ +diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h +index 1f6d25e..087c3fb 100644 +--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h ++++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h +@@ -81,7 +81,7 @@ + #include + #elif PLATFORM(GTK) + #include +-typedef struct _GMutex GMutex; ++typedef union _GMutex GMutex; + typedef struct _GCond GCond; + #endif + diff --git a/pkgs/development/libraries/qt-5/5.6/qtserialport.patch b/pkgs/development/libraries/qt-5/5.6/qtserialport.patch new file mode 100644 index 00000000000..b2cffbe4f39 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.6/qtserialport.patch @@ -0,0 +1,22 @@ +diff --git a/src/serialport/qtudev_p.h b/src/serialport/qtudev_p.h +index 6f2cabd..cd3c0ed 100644 +--- a/src/serialport/qtudev_p.h ++++ b/src/serialport/qtudev_p.h +@@ -105,9 +105,17 @@ inline QFunctionPointer resolveSymbol(QLibrary *udevLibrary, const char *symbolN + inline bool resolveSymbols(QLibrary *udevLibrary) + { + if (!udevLibrary->isLoaded()) { ++#ifdef NIXPKGS_LIBUDEV ++ udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 1); ++#else + udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1); ++#endif + if (!udevLibrary->load()) { ++#ifdef NIXPKGS_LIBUDEV ++ udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 0); ++#else + udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0); ++#endif + if (!udevLibrary->load()) { + qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0); + return false; diff --git a/pkgs/development/libraries/qt-5/5.6/qttools.patch b/pkgs/development/libraries/qt-5/5.6/qttools.patch new file mode 100644 index 00000000000..dcb15e0e55a --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.6/qttools.patch @@ -0,0 +1,64 @@ +diff --git a/src/assistant/help/Qt5HelpConfigExtras.cmake.in b/src/assistant/help/Qt5HelpConfigExtras.cmake.in +index 5a5bd5ce..1c6727d4 100644 +--- a/src/assistant/help/Qt5HelpConfigExtras.cmake.in ++++ b/src/assistant/help/Qt5HelpConfigExtras.cmake.in +@@ -2,14 +2,13 @@ + if (NOT TARGET Qt5::qcollectiongenerator) + add_executable(Qt5::qcollectiongenerator IMPORTED) + +-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Help_install_prefix}/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\") +-!!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\") +-!!ENDIF ++ if(NOT EXISTS \"${imported_location}\") ++ set(imported_location \"$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\") ++ endif() + _qt5_Help_check_file_exists(${imported_location}) + + set_target_properties(Qt5::qcollectiongenerator PROPERTIES + IMPORTED_LOCATION ${imported_location} + ) +-endif() ++endif() +\ No newline at end of file +diff --git a/src/linguist/Qt5LinguistToolsConfig.cmake.in b/src/linguist/Qt5LinguistToolsConfig.cmake.in +index 4318b16f..d60db4ff 100644 +--- a/src/linguist/Qt5LinguistToolsConfig.cmake.in ++++ b/src/linguist/Qt5LinguistToolsConfig.cmake.in +@@ -44,11 +44,7 @@ endmacro() + if (NOT TARGET Qt5::lrelease) + add_executable(Qt5::lrelease IMPORTED) + +-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\") +-!!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\") +-!!ENDIF + _qt5_LinguistTools_check_file_exists(${imported_location}) + + set_target_properties(Qt5::lrelease PROPERTIES +@@ -59,11 +55,7 @@ endif() + if (NOT TARGET Qt5::lupdate) + add_executable(Qt5::lupdate IMPORTED) + +-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\") +-!!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\") +-!!ENDIF + _qt5_LinguistTools_check_file_exists(${imported_location}) + + set_target_properties(Qt5::lupdate PROPERTIES +@@ -74,11 +66,7 @@ endif() + if (NOT TARGET Qt5::lconvert) + add_executable(Qt5::lconvert IMPORTED) + +-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\") +-!!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\") +-!!ENDIF + _qt5_LinguistTools_check_file_exists(${imported_location}) + + set_target_properties(Qt5::lconvert PROPERTIES diff --git a/pkgs/development/libraries/qt-5/5.6/qtwebengine-paxmark-mksnapshot.patch b/pkgs/development/libraries/qt-5/5.6/qtwebengine-paxmark-mksnapshot.patch new file mode 100644 index 00000000000..b3316188f7d --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.6/qtwebengine-paxmark-mksnapshot.patch @@ -0,0 +1,46 @@ +--- qtwebengine-opensource-src-5.6.0-orig/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-03-04 01:48:36.000000000 +1100 ++++ qtwebengine-opensource-src-5.6.0/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-05-01 19:15:44.052770543 +1000 +@@ -33,6 +33,7 @@ + 'embed_script%': "", + 'v8_extra_library_files%': [], + 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)', ++ 'mksnapshot_u_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot_u<(EXECUTABLE_SUFFIX)', + 'remove_v8base_debug_symbols%': 0, + }, + 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'], +@@ -1913,7 +1914,7 @@ + ] + }, + { +- 'target_name': 'mksnapshot', ++ 'target_name': 'mksnapshot_u', + 'type': 'executable', + 'dependencies': ['v8_base', 'v8_nosnapshot', 'v8_libplatform'], + 'include_dirs+': [ +@@ -1936,5 +1937,26 @@ + }], + ], + }, ++ { ++ 'target_name': 'mksnapshot', ++ 'type': 'executable', ++ 'dependencies': ['mksnapshot_u'], ++ 'actions': [ ++ { ++ 'action_name': 'paxmark_m_mksnapshot', ++ 'inputs': [ ++ '<(mksnapshot_u_exec)', ++ ], ++ 'outputs': [ ++ '<(mksnapshot_exec)', ++ ], ++ 'action': [ ++ 'sh', ++ '-c', ++ 'cp <(mksnapshot_u_exec) <(mksnapshot_exec) && paxctl -czexm <(mksnapshot_exec)', ++ ], ++ }, ++ ], ++ }, + ], + } diff --git a/pkgs/development/libraries/qt-5/5.6/qtwebengine.patch b/pkgs/development/libraries/qt-5/5.6/qtwebengine.patch new file mode 100644 index 00000000000..65a604d2534 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.6/qtwebengine.patch @@ -0,0 +1,874 @@ +--- a/src/3rdparty/chromium/tools/clang/scripts/update.py 2016-05-26 04:58:54.000000000 -0800 ++++ b/src/3rdparty/chromium/tools/clang/scripts/update.py 2016-11-04 08:35:34.956154012 -0800 +@@ -3,12 +3,12 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-"""Windows can't run .sh files, so this is a Python implementation of +-update.sh. This script should replace update.sh on all platforms eventually.""" ++"""This script is used to download prebuilt clang binaries. ++ ++It is also used by package.py to build the prebuilt clang binaries.""" + + import argparse +-import contextlib +-import cStringIO ++import distutils.spawn + import glob + import os + import pipes +@@ -18,6 +18,7 @@ + import stat + import sys + import tarfile ++import tempfile + import time + import urllib2 + import zipfile +@@ -25,19 +26,16 @@ + # Do NOT CHANGE this if you don't know what you're doing -- see + # https://code.google.com/p/chromium/wiki/UpdatingClang + # Reverting problematic clang rolls is safe, though. +-# Note: this revision is only used for Windows. Other platforms use update.sh. +-# TODO(thakis): Use the same revision on Windows and non-Windows. +-# TODO(thakis): Remove update.sh, use update.py everywhere. +-LLVM_WIN_REVISION = '239674' ++CLANG_REVISION = '239674' + + use_head_revision = 'LLVM_FORCE_HEAD_REVISION' in os.environ + if use_head_revision: +- LLVM_WIN_REVISION = 'HEAD' ++ CLANG_REVISION = 'HEAD' + + # This is incremented when pushing a new build of Clang at the same revision. + CLANG_SUB_REVISION=1 + +-PACKAGE_VERSION = "%s-%s" % (LLVM_WIN_REVISION, CLANG_SUB_REVISION) ++PACKAGE_VERSION = "%s-%s" % (CLANG_REVISION, CLANG_SUB_REVISION) + + # Path constants. (All of these should be absolute paths.) + THIS_DIR = os.path.abspath(os.path.dirname(__file__)) +@@ -50,17 +48,26 @@ + CHROME_TOOLS_SHIM_DIR = os.path.join(LLVM_DIR, 'tools', 'chrometools') + LLVM_BUILD_DIR = os.path.join(CHROMIUM_DIR, 'third_party', 'llvm-build', + 'Release+Asserts') +-COMPILER_RT_BUILD_DIR = os.path.join(LLVM_BUILD_DIR, '32bit-compiler-rt') ++COMPILER_RT_BUILD_DIR = os.path.join(LLVM_BUILD_DIR, 'compiler-rt') + CLANG_DIR = os.path.join(LLVM_DIR, 'tools', 'clang') + LLD_DIR = os.path.join(LLVM_DIR, 'tools', 'lld') +-COMPILER_RT_DIR = os.path.join(LLVM_DIR, 'projects', 'compiler-rt') ++# compiler-rt is built as part of the regular LLVM build on Windows to get ++# the 64-bit runtime, and out-of-tree elsewhere. ++# TODO(thakis): Try to unify this. ++if sys.platform == 'win32': ++ COMPILER_RT_DIR = os.path.join(LLVM_DIR, 'projects', 'compiler-rt') ++else: ++ COMPILER_RT_DIR = os.path.join(LLVM_DIR, 'compiler-rt') + LIBCXX_DIR = os.path.join(LLVM_DIR, 'projects', 'libcxx') + LIBCXXABI_DIR = os.path.join(LLVM_DIR, 'projects', 'libcxxabi') + LLVM_BUILD_TOOLS_DIR = os.path.abspath( + os.path.join(LLVM_DIR, '..', 'llvm-build-tools')) +-STAMP_FILE = os.path.join(LLVM_DIR, '..', 'llvm-build', 'cr_build_revision') ++STAMP_FILE = os.path.normpath( ++ os.path.join(LLVM_DIR, '..', 'llvm-build', 'cr_build_revision')) + BINUTILS_DIR = os.path.join(THIRD_PARTY_DIR, 'binutils') +-VERSION = '3.7.0' ++VERSION = '3.8.0' ++ANDROID_NDK_DIR = os.path.join( ++ CHROMIUM_DIR, 'third_party', 'android_tools', 'ndk') + + # URL for pre-built binaries. + CDS_URL = 'https://commondatastorage.googleapis.com/chromium-browser-clang' +@@ -74,40 +81,75 @@ + """Download url into output_file.""" + CHUNK_SIZE = 4096 + TOTAL_DOTS = 10 +- sys.stdout.write('Downloading %s ' % url) +- sys.stdout.flush() +- response = urllib2.urlopen(url) +- total_size = int(response.info().getheader('Content-Length').strip()) +- bytes_done = 0 +- dots_printed = 0 ++ num_retries = 3 ++ retry_wait_s = 5 # Doubled at each retry. ++ + while True: +- chunk = response.read(CHUNK_SIZE) +- if not chunk: +- break +- output_file.write(chunk) +- bytes_done += len(chunk) +- num_dots = TOTAL_DOTS * bytes_done / total_size +- sys.stdout.write('.' * (num_dots - dots_printed)) +- sys.stdout.flush() +- dots_printed = num_dots +- print ' Done.' ++ try: ++ sys.stdout.write('Downloading %s ' % url) ++ sys.stdout.flush() ++ response = urllib2.urlopen(url) ++ total_size = int(response.info().getheader('Content-Length').strip()) ++ bytes_done = 0 ++ dots_printed = 0 ++ while True: ++ chunk = response.read(CHUNK_SIZE) ++ if not chunk: ++ break ++ output_file.write(chunk) ++ bytes_done += len(chunk) ++ num_dots = TOTAL_DOTS * bytes_done / total_size ++ sys.stdout.write('.' * (num_dots - dots_printed)) ++ sys.stdout.flush() ++ dots_printed = num_dots ++ if bytes_done != total_size: ++ raise urllib2.URLError("only got %d of %d bytes" % ++ (bytes_done, total_size)) ++ print ' Done.' ++ return ++ except urllib2.URLError as e: ++ sys.stdout.write('\n') ++ print e ++ if num_retries == 0 or isinstance(e, urllib2.HTTPError) and e.code == 404: ++ raise e ++ num_retries -= 1 ++ print 'Retrying in %d s ...' % retry_wait_s ++ time.sleep(retry_wait_s) ++ retry_wait_s *= 2 ++ ++ ++def EnsureDirExists(path): ++ if not os.path.exists(path): ++ print "Creating directory %s" % path ++ os.makedirs(path) ++ ++ ++def DownloadAndUnpack(url, output_dir): ++ with tempfile.TemporaryFile() as f: ++ DownloadUrl(url, f) ++ f.seek(0) ++ EnsureDirExists(output_dir) ++ if url.endswith('.zip'): ++ zipfile.ZipFile(f).extractall(path=output_dir) ++ else: ++ tarfile.open(mode='r:gz', fileobj=f).extractall(path=output_dir) + + + def ReadStampFile(): + """Return the contents of the stamp file, or '' if it doesn't exist.""" + try: + with open(STAMP_FILE, 'r') as f: +- return f.read() ++ return f.read().rstrip() + except IOError: + return '' + + + def WriteStampFile(s): + """Write s to the stamp file.""" +- if not os.path.exists(os.path.dirname(STAMP_FILE)): +- os.makedirs(os.path.dirname(STAMP_FILE)) ++ EnsureDirExists(os.path.dirname(STAMP_FILE)) + with open(STAMP_FILE, 'w') as f: + f.write(s) ++ f.write('\n') + + + def GetSvnRevision(svn_repo): +@@ -129,6 +171,13 @@ + shutil.rmtree(dir, onerror=ChmodAndRetry) + + ++def RmCmakeCache(dir): ++ """Delete CMakeCache.txt files under dir recursively.""" ++ for dirpath, _, files in os.walk(dir): ++ if 'CMakeCache.txt' in files: ++ os.remove(os.path.join(dirpath, 'CMakeCache.txt')) ++ ++ + def RunCommand(command, msvc_arch=None, env=None, fail_hard=True): + """Run command and return success (True) or failure; or if fail_hard is + True, exit on failure. If msvc_arch is set, runs the command in a +@@ -170,8 +219,8 @@ + def CopyDirectoryContents(src, dst, filename_filter=None): + """Copy the files from directory src to dst + with an optional filename filter.""" +- if not os.path.exists(dst): +- os.makedirs(dst) ++ dst = os.path.realpath(dst) # realpath() in case dst ends in /.. ++ EnsureDirExists(dst) + for root, _, files in os.walk(src): + for f in files: + if filename_filter and not re.match(filename_filter, f): +@@ -181,9 +230,9 @@ + + def Checkout(name, url, dir): + """Checkout the SVN module at url into dir. Use name for the log message.""" +- print "Checking out %s r%s into '%s'" % (name, LLVM_WIN_REVISION, dir) ++ print "Checking out %s r%s into '%s'" % (name, CLANG_REVISION, dir) + +- command = ['svn', 'checkout', '--force', url + '@' + LLVM_WIN_REVISION, dir] ++ command = ['svn', 'checkout', '--force', url + '@' + CLANG_REVISION, dir] + if RunCommand(command, fail_hard=False): + return + +@@ -195,120 +244,9 @@ + RunCommand(command) + + +-def RevertPreviouslyPatchedFiles(): +- print 'Reverting previously patched files' +- files = [ +- '%(clang)s/test/Index/crash-recovery-modules.m', +- '%(clang)s/unittests/libclang/LibclangTest.cpp', +- '%(compiler_rt)s/lib/asan/asan_rtl.cc', +- '%(compiler_rt)s/test/asan/TestCases/Linux/new_array_cookie_test.cc', +- '%(llvm)s/test/DebugInfo/gmlt.ll', +- '%(llvm)s/lib/CodeGen/SpillPlacement.cpp', +- '%(llvm)s/lib/CodeGen/SpillPlacement.h', +- '%(llvm)s/lib/Transforms/Instrumentation/MemorySanitizer.cpp', +- '%(clang)s/test/Driver/env.c', +- '%(clang)s/lib/Frontend/InitPreprocessor.cpp', +- '%(clang)s/test/Frontend/exceptions.c', +- '%(clang)s/test/Preprocessor/predefined-exceptions.m', +- '%(llvm)s/test/Bindings/Go/go.test', +- '%(clang)s/lib/Parse/ParseExpr.cpp', +- '%(clang)s/lib/Parse/ParseTemplate.cpp', +- '%(clang)s/lib/Sema/SemaDeclCXX.cpp', +- '%(clang)s/lib/Sema/SemaExprCXX.cpp', +- '%(clang)s/test/SemaCXX/default2.cpp', +- '%(clang)s/test/SemaCXX/typo-correction-delayed.cpp', +- '%(compiler_rt)s/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc', +- '%(compiler_rt)s/test/tsan/signal_segv_handler.cc', +- '%(compiler_rt)s/lib/sanitizer_common/sanitizer_coverage_libcdep.cc', +- '%(compiler_rt)s/cmake/config-ix.cmake', +- '%(compiler_rt)s/CMakeLists.txt', +- '%(compiler_rt)s/lib/ubsan/ubsan_platform.h', +- ] +- for f in files: +- f = f % { +- 'clang': CLANG_DIR, +- 'compiler_rt': COMPILER_RT_DIR, +- 'llvm': LLVM_DIR, +- } +- if os.path.exists(f): +- os.remove(f) # For unversioned files. +- RunCommand(['svn', 'revert', f]) +- +- +-def ApplyLocalPatches(): +- # There's no patch program on Windows by default. We don't need patches on +- # Windows yet, and maybe this not working on Windows will motivate us to +- # remove patches over time. +- assert sys.platform != 'win32' +- +- # Apply patch for tests failing with --disable-pthreads (llvm.org/PR11974) +- clang_patches = [ r"""\ +---- test/Index/crash-recovery-modules.m (revision 202554) +-+++ test/Index/crash-recovery-modules.m (working copy) +-@@ -12,6 +12,8 @@ +- +- // REQUIRES: crash-recovery +- // REQUIRES: shell +-+// XFAIL: * +-+// (PR11974) +- +- @import Crash; +-""", r"""\ +---- unittests/libclang/LibclangTest.cpp (revision 215949) +-+++ unittests/libclang/LibclangTest.cpp (working copy) +-@@ -431,7 +431,7 @@ +- EXPECT_EQ(0U, clang_getNumDiagnostics(ClangTU)); +- } +- +--TEST_F(LibclangReparseTest, ReparseWithModule) { +-+TEST_F(LibclangReparseTest, DISABLED_ReparseWithModule) { +- const char *HeaderTop = "#ifndef H\n#define H\nstruct Foo { int bar;"; +- const char *HeaderBottom = "\n};\n#endif\n"; +- const char *MFile = "#include \"HeaderFile.h\"\nint main() {" +-""" +- ] +- +- # This Go bindings test doesn't work after bootstrap on Linux, PR21552. +- llvm_patches = [ r"""\ +---- test/Bindings/Go/go.test (revision 223109) +-+++ test/Bindings/Go/go.test (working copy) +-@@ -1,3 +1,3 @@ +--; RUN: llvm-go test llvm.org/llvm/bindings/go/llvm +-+; RUN: true +- +- ; REQUIRES: shell +-""" +- ] +- +- # The UBSan run-time, which is now bundled with the ASan run-time, doesn't +- # work on Mac OS X 10.8 (PR23539). +- compiler_rt_patches = [ r"""\ +---- CMakeLists.txt (revision 241602) +-+++ CMakeLists.txt (working copy) +-@@ -305,6 +305,7 @@ +- list(APPEND SANITIZER_COMMON_SUPPORTED_OS iossim) +- endif() +- endif() +-+ set(SANITIZER_MIN_OSX_VERSION "10.7") +- if(SANITIZER_MIN_OSX_VERSION VERSION_LESS "10.7") +- message(FATAL_ERROR "Too old OS X version: ${SANITIZER_MIN_OSX_VERSION}") +- endif() +-""" +- ] +- +- for path, patches in [(LLVM_DIR, llvm_patches), +- (CLANG_DIR, clang_patches), +- (COMPILER_RT_DIR, compiler_rt_patches)]: +- print 'Applying patches in', path +- for patch in patches: +- print patch +- p = subprocess.Popen( ['patch', '-p0', '-d', path], stdin=subprocess.PIPE) +- (stdout, stderr) = p.communicate(input=patch) +- if p.returncode != 0: +- raise RuntimeError('stdout %s, stderr %s' % (stdout, stderr)) +- +- + def DeleteChromeToolsShim(): ++ OLD_SHIM_DIR = os.path.join(LLVM_DIR, 'tools', 'zzz-chrometools') ++ shutil.rmtree(OLD_SHIM_DIR, ignore_errors=True) + shutil.rmtree(CHROME_TOOLS_SHIM_DIR, ignore_errors=True) + + +@@ -337,6 +275,25 @@ + f.write('endif (CHROMIUM_TOOLS_SRC)\n') + + ++def MaybeDownloadHostGcc(args): ++ """Downloads gcc 4.8.2 if needed and makes sure args.gcc_toolchain is set.""" ++ if not sys.platform.startswith('linux') or args.gcc_toolchain: ++ return ++ ++ if subprocess.check_output(['gcc', '-dumpversion']).rstrip() < '4.7.0': ++ # We need a newer gcc version. ++ gcc_dir = os.path.join(LLVM_BUILD_TOOLS_DIR, 'gcc482precise') ++ if not os.path.exists(gcc_dir): ++ print 'Downloading pre-built GCC 4.8.2...' ++ DownloadAndUnpack( ++ CDS_URL + '/tools/gcc482precise.tgz', LLVM_BUILD_TOOLS_DIR) ++ args.gcc_toolchain = gcc_dir ++ else: ++ # Always set gcc_toolchain; llvm-symbolizer needs the bundled libstdc++. ++ args.gcc_toolchain = \ ++ os.path.dirname(os.path.dirname(distutils.spawn.find_executable('gcc'))) ++ ++ + def AddCMakeToPath(): + """Download CMake and add it to PATH.""" + if sys.platform == 'win32': +@@ -345,20 +302,10 @@ + 'cmake-3.2.2-win32-x86', 'bin') + else: + suffix = 'Darwin' if sys.platform == 'darwin' else 'Linux' +- zip_name = 'cmake310_%s.tgz' % suffix +- cmake_dir = os.path.join(LLVM_BUILD_TOOLS_DIR, 'cmake310', 'bin') ++ zip_name = 'cmake322_%s.tgz' % suffix ++ cmake_dir = os.path.join(LLVM_BUILD_TOOLS_DIR, 'cmake322', 'bin') + if not os.path.exists(cmake_dir): +- if not os.path.exists(LLVM_BUILD_TOOLS_DIR): +- os.makedirs(LLVM_BUILD_TOOLS_DIR) +- # The cmake archive is smaller than 20 MB, small enough to keep in memory: +- with contextlib.closing(cStringIO.StringIO()) as f: +- DownloadUrl(CDS_URL + '/tools/' + zip_name, f) +- f.seek(0) +- if zip_name.endswith('.zip'): +- zipfile.ZipFile(f).extractall(path=LLVM_BUILD_TOOLS_DIR) +- else: +- tarfile.open(mode='r:gz', fileobj=f).extractall(path= +- LLVM_BUILD_TOOLS_DIR) ++ DownloadAndUnpack(CDS_URL + '/tools/' + zip_name, LLVM_BUILD_TOOLS_DIR) + os.environ['PATH'] = cmake_dir + os.pathsep + os.environ.get('PATH', '') + + vs_version = None +@@ -383,37 +330,61 @@ + + def UpdateClang(args): + print 'Updating Clang to %s...' % PACKAGE_VERSION +- if ReadStampFile() == PACKAGE_VERSION: +- print 'Already up to date.' +- return 0 ++ ++ need_gold_plugin = 'LLVM_DOWNLOAD_GOLD_PLUGIN' in os.environ or ( ++ sys.platform.startswith('linux') and ++ 'buildtype=Official' in os.environ.get('GYP_DEFINES', '') and ++ 'branding=Chrome' in os.environ.get('GYP_DEFINES', '')) ++ ++ if ReadStampFile() == PACKAGE_VERSION and not args.force_local_build: ++ print 'Clang is already up to date.' ++ if not need_gold_plugin or os.path.exists( ++ os.path.join(LLVM_BUILD_DIR, "lib/LLVMgold.so")): ++ return 0 + + # Reset the stamp file in case the build is unsuccessful. + WriteStampFile('') + + if not args.force_local_build: + cds_file = "clang-%s.tgz" % PACKAGE_VERSION +- cds_full_url = CDS_URL + '/Win/' + cds_file ++ if sys.platform == 'win32': ++ cds_full_url = CDS_URL + '/Win/' + cds_file ++ elif sys.platform == 'darwin': ++ cds_full_url = CDS_URL + '/Mac/' + cds_file ++ else: ++ assert sys.platform.startswith('linux') ++ cds_full_url = CDS_URL + '/Linux_x64/' + cds_file + +- # Check if there's a prebuilt binary and if so just fetch that. That's +- # faster, and goma relies on having matching binary hashes on client and +- # server too. +- print 'Trying to download prebuilt clang' +- +- # clang packages are smaller than 50 MB, small enough to keep in memory. +- with contextlib.closing(cStringIO.StringIO()) as f: +- try: +- DownloadUrl(cds_full_url, f) +- f.seek(0) +- tarfile.open(mode='r:gz', fileobj=f).extractall(path=LLVM_BUILD_DIR) +- print 'clang %s unpacked' % PACKAGE_VERSION +- WriteStampFile(PACKAGE_VERSION) +- return 0 +- except urllib2.HTTPError: +- print 'Did not find prebuilt clang %s, building locally' % cds_file ++ print 'Downloading prebuilt clang' ++ if os.path.exists(LLVM_BUILD_DIR): ++ RmTree(LLVM_BUILD_DIR) ++ try: ++ DownloadAndUnpack(cds_full_url, LLVM_BUILD_DIR) ++ print 'clang %s unpacked' % PACKAGE_VERSION ++ # Download the gold plugin if requested to by an environment variable. ++ # This is used by the CFI ClusterFuzz bot, and it's required for official ++ # builds on linux. ++ if need_gold_plugin: ++ RunCommand(['python', CHROMIUM_DIR+'/build/download_gold_plugin.py']) ++ WriteStampFile(PACKAGE_VERSION) ++ return 0 ++ except urllib2.URLError: ++ print 'Failed to download prebuilt clang %s' % cds_file ++ print 'Use --force-local-build if you want to build locally.' ++ print 'Exiting.' ++ return 1 ++ ++ if args.with_android and not os.path.exists(ANDROID_NDK_DIR): ++ print 'Android NDK not found at ' + ANDROID_NDK_DIR ++ print 'The Android NDK is needed to build a Clang whose -fsanitize=address' ++ print 'works on Android. See ' ++ print 'http://code.google.com/p/chromium/wiki/AndroidBuildInstructions' ++ print 'for how to install the NDK, or pass --without-android.' ++ return 1 + ++ MaybeDownloadHostGcc(args) + AddCMakeToPath() + +- RevertPreviouslyPatchedFiles() + DeleteChromeToolsShim() + + Checkout('LLVM', LLVM_REPO_URL + '/llvm/trunk', LLVM_DIR) +@@ -429,10 +400,24 @@ + # into it too (since OS X 10.6 doesn't have libc++abi.dylib either). + Checkout('libcxxabi', LLVM_REPO_URL + '/libcxxabi/trunk', LIBCXXABI_DIR) + +- if args.with_patches and sys.platform != 'win32': +- ApplyLocalPatches() +- + cc, cxx = None, None ++ libstdcpp = None ++ if args.gcc_toolchain: # This option is only used on Linux. ++ # Use the specified gcc installation for building. ++ cc = os.path.join(args.gcc_toolchain, 'bin', 'gcc') ++ cxx = os.path.join(args.gcc_toolchain, 'bin', 'g++') ++ ++ if not os.access(cc, os.X_OK): ++ print 'Invalid --gcc-toolchain: "%s"' % args.gcc_toolchain ++ print '"%s" does not appear to be valid.' % cc ++ return 1 ++ ++ # Set LD_LIBRARY_PATH to make auxiliary targets (tablegen, bootstrap ++ # compiler, etc.) find the .so. ++ libstdcpp = subprocess.check_output( ++ [cxx, '-print-file-name=libstdc++.so.6']).rstrip() ++ os.environ['LD_LIBRARY_PATH'] = os.path.dirname(libstdcpp) ++ + cflags = cxxflags = ldflags = [] + + # LLVM uses C++11 starting in llvm 3.5. On Linux, this means libstdc++4.7+ is +@@ -462,8 +447,7 @@ + + if args.bootstrap: + print 'Building bootstrap compiler' +- if not os.path.exists(LLVM_BOOTSTRAP_DIR): +- os.makedirs(LLVM_BOOTSTRAP_DIR) ++ EnsureDirExists(LLVM_BOOTSTRAP_DIR) + os.chdir(LLVM_BOOTSTRAP_DIR) + bootstrap_args = base_cmake_args + [ + '-DLLVM_TARGETS_TO_BUILD=host', +@@ -473,11 +457,16 @@ + ] + if cc is not None: bootstrap_args.append('-DCMAKE_C_COMPILER=' + cc) + if cxx is not None: bootstrap_args.append('-DCMAKE_CXX_COMPILER=' + cxx) ++ RmCmakeCache('.') + RunCommand(['cmake'] + bootstrap_args + [LLVM_DIR], msvc_arch='x64') + RunCommand(['ninja'], msvc_arch='x64') + if args.run_tests: + RunCommand(['ninja', 'check-all'], msvc_arch='x64') + RunCommand(['ninja', 'install'], msvc_arch='x64') ++ if args.gcc_toolchain: ++ # Copy that gcc's stdlibc++.so.6 to the build dir, so the bootstrap ++ # compiler can start. ++ CopyFile(libstdcpp, os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'lib')) + + if sys.platform == 'win32': + cc = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang-cl.exe') +@@ -489,6 +478,12 @@ + else: + cc = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang') + cxx = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang++') ++ ++ if args.gcc_toolchain: ++ # Tell the bootstrap compiler to use a specific gcc prefix to search ++ # for standard library headers and shared object files. ++ cflags = ['--gcc-toolchain=' + args.gcc_toolchain] ++ cxxflags = ['--gcc-toolchain=' + args.gcc_toolchain] + print 'Building final compiler' + + if sys.platform == 'darwin': +@@ -543,7 +538,7 @@ + binutils_incdir = os.path.join(BINUTILS_DIR, 'Linux_x64/Release/include') + + # If building at head, define a macro that plugins can use for #ifdefing +- # out code that builds at head, but not at LLVM_WIN_REVISION or vice versa. ++ # out code that builds at head, but not at CLANG_REVISION or vice versa. + if use_head_revision: + cflags += ['-DLLVM_FORCE_HEAD_REVISION'] + cxxflags += ['-DLLVM_FORCE_HEAD_REVISION'] +@@ -555,8 +550,15 @@ + deployment_env = os.environ.copy() + deployment_env['MACOSX_DEPLOYMENT_TARGET'] = deployment_target + +- cmake_args = base_cmake_args + [ ++ cmake_args = [] ++ # TODO(thakis): Unconditionally append this to base_cmake_args instead once ++ # compiler-rt can build with clang-cl on Windows (http://llvm.org/PR23698) ++ cc_args = base_cmake_args if sys.platform != 'win32' else cmake_args ++ if cc is not None: cc_args.append('-DCMAKE_C_COMPILER=' + cc) ++ if cxx is not None: cc_args.append('-DCMAKE_CXX_COMPILER=' + cxx) ++ cmake_args += base_cmake_args + [ + '-DLLVM_BINUTILS_INCDIR=' + binutils_incdir, ++ '-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly', + '-DCMAKE_C_FLAGS=' + ' '.join(cflags), + '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags), + '-DCMAKE_EXE_LINKER_FLAGS=' + ' '.join(ldflags), +@@ -565,35 +567,44 @@ + '-DCMAKE_INSTALL_PREFIX=' + LLVM_BUILD_DIR, + '-DCHROMIUM_TOOLS_SRC=%s' % os.path.join(CHROMIUM_DIR, 'tools', 'clang'), + '-DCHROMIUM_TOOLS=%s' % ';'.join(args.tools)] +- # TODO(thakis): Unconditionally append this to base_cmake_args instead once +- # compiler-rt can build with clang-cl on Windows (http://llvm.org/PR23698) +- cc_args = base_cmake_args if sys.platform != 'win32' else cmake_args +- if cc is not None: cc_args.append('-DCMAKE_C_COMPILER=' + cc) +- if cxx is not None: cc_args.append('-DCMAKE_CXX_COMPILER=' + cxx) + +- if not os.path.exists(LLVM_BUILD_DIR): +- os.makedirs(LLVM_BUILD_DIR) ++ EnsureDirExists(LLVM_BUILD_DIR) + os.chdir(LLVM_BUILD_DIR) ++ RmCmakeCache('.') + RunCommand(['cmake'] + cmake_args + [LLVM_DIR], + msvc_arch='x64', env=deployment_env) +- RunCommand(['ninja'], msvc_arch='x64') ++ ++ if args.gcc_toolchain: ++ # Copy in the right stdlibc++.so.6 so clang can start. ++ if not os.path.exists(os.path.join(LLVM_BUILD_DIR, 'lib')): ++ os.mkdir(os.path.join(LLVM_BUILD_DIR, 'lib')) ++ libstdcpp = subprocess.check_output( ++ [cxx] + cxxflags + ['-print-file-name=libstdc++.so.6']).rstrip() ++ CopyFile(libstdcpp, os.path.join(LLVM_BUILD_DIR, 'lib')) ++ ++ # TODO(thakis): Remove "-d explain" once http://crbug.com/569337 is fixed. ++ RunCommand(['ninja', '-d', 'explain'], msvc_arch='x64') + + if args.tools: + # If any Chromium tools were built, install those now. + RunCommand(['ninja', 'cr-install'], msvc_arch='x64') + + if sys.platform == 'darwin': +- CopyFile(os.path.join(LLVM_BUILD_DIR, 'libc++.1.dylib'), ++ CopyFile(os.path.join(libcxxbuild, 'libc++.1.dylib'), + os.path.join(LLVM_BUILD_DIR, 'bin')) + # See http://crbug.com/256342 + RunCommand(['strip', '-x', os.path.join(LLVM_BUILD_DIR, 'bin', 'clang')]) + elif sys.platform.startswith('linux'): + RunCommand(['strip', os.path.join(LLVM_BUILD_DIR, 'bin', 'clang')]) + +- # Do an x86 build of compiler-rt to get the 32-bit ASan run-time. ++ # Do an out-of-tree build of compiler-rt. ++ # On Windows, this is used to get the 32-bit ASan run-time. + # TODO(hans): Remove once the regular build above produces this. +- if not os.path.exists(COMPILER_RT_BUILD_DIR): +- os.makedirs(COMPILER_RT_BUILD_DIR) ++ # On Mac and Linux, this is used to get the regular 64-bit run-time. ++ # Do a clobbered build due to cmake changes. ++ if os.path.isdir(COMPILER_RT_BUILD_DIR): ++ RmTree(COMPILER_RT_BUILD_DIR) ++ os.makedirs(COMPILER_RT_BUILD_DIR) + os.chdir(COMPILER_RT_BUILD_DIR) + # TODO(thakis): Add this once compiler-rt can build with clang-cl (see + # above). +@@ -606,11 +617,17 @@ + '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags)] + if sys.platform != 'win32': + compiler_rt_args += ['-DLLVM_CONFIG_PATH=' + +- os.path.join(LLVM_BUILD_DIR, 'bin', 'llvm-config')] +- RunCommand(['cmake'] + compiler_rt_args + [LLVM_DIR], +- msvc_arch='x86', env=deployment_env) ++ os.path.join(LLVM_BUILD_DIR, 'bin', 'llvm-config'), ++ '-DSANITIZER_MIN_OSX_VERSION="10.7"'] ++ # compiler-rt is part of the llvm checkout on Windows but a stand-alone ++ # directory elsewhere, see the TODO above COMPILER_RT_DIR. ++ RmCmakeCache('.') ++ RunCommand(['cmake'] + compiler_rt_args + ++ [LLVM_DIR if sys.platform == 'win32' else COMPILER_RT_DIR], ++ msvc_arch='x86', env=deployment_env) + RunCommand(['ninja', 'compiler-rt'], msvc_arch='x86') + ++ # Copy select output to the main tree. + # TODO(hans): Make this (and the .gypi and .isolate files) version number + # independent. + if sys.platform == 'win32': +@@ -620,17 +637,35 @@ + else: + assert sys.platform.startswith('linux') + platform = 'linux' +- asan_rt_lib_src_dir = os.path.join(COMPILER_RT_BUILD_DIR, 'lib', 'clang', +- VERSION, 'lib', platform) ++ asan_rt_lib_src_dir = os.path.join(COMPILER_RT_BUILD_DIR, 'lib', platform) ++ if sys.platform == 'win32': ++ # TODO(thakis): This too is due to compiler-rt being part of the checkout ++ # on Windows, see TODO above COMPILER_RT_DIR. ++ asan_rt_lib_src_dir = os.path.join(COMPILER_RT_BUILD_DIR, 'lib', 'clang', ++ VERSION, 'lib', platform) + asan_rt_lib_dst_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang', + VERSION, 'lib', platform) +- CopyDirectoryContents(asan_rt_lib_src_dir, asan_rt_lib_dst_dir, +- r'^.*-i386\.lib$') +- CopyDirectoryContents(asan_rt_lib_src_dir, asan_rt_lib_dst_dir, +- r'^.*-i386\.dll$') ++ # Blacklists: ++ CopyDirectoryContents(os.path.join(asan_rt_lib_src_dir, '..', '..'), ++ os.path.join(asan_rt_lib_dst_dir, '..', '..'), ++ r'^.*blacklist\.txt$') ++ # Headers: ++ if sys.platform != 'win32': ++ CopyDirectoryContents( ++ os.path.join(COMPILER_RT_BUILD_DIR, 'include/sanitizer'), ++ os.path.join(LLVM_BUILD_DIR, 'lib/clang', VERSION, 'include/sanitizer')) ++ # Static and dynamic libraries: ++ CopyDirectoryContents(asan_rt_lib_src_dir, asan_rt_lib_dst_dir) ++ if sys.platform == 'darwin': ++ for dylib in glob.glob(os.path.join(asan_rt_lib_dst_dir, '*.dylib')): ++ # Fix LC_ID_DYLIB for the ASan dynamic libraries to be relative to ++ # @executable_path. ++ # TODO(glider): this is transitional. We'll need to fix the dylib ++ # name either in our build system, or in Clang. See also ++ # http://crbug.com/344836. ++ subprocess.call(['install_name_tool', '-id', ++ '@executable_path/' + os.path.basename(dylib), dylib]) + +- CopyFile(os.path.join(asan_rt_lib_src_dir, '..', '..', 'asan_blacklist.txt'), +- os.path.join(asan_rt_lib_dst_dir, '..', '..')) + + if sys.platform == 'win32': + # Make an extra copy of the sanitizer headers, to be put on the include path +@@ -640,22 +675,67 @@ + aux_sanitizer_include_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang', + VERSION, 'include_sanitizer', + 'sanitizer') +- if not os.path.exists(aux_sanitizer_include_dir): +- os.makedirs(aux_sanitizer_include_dir) ++ EnsureDirExists(aux_sanitizer_include_dir) + for _, _, files in os.walk(sanitizer_include_dir): + for f in files: + CopyFile(os.path.join(sanitizer_include_dir, f), + aux_sanitizer_include_dir) + ++ if args.with_android: ++ make_toolchain = os.path.join( ++ ANDROID_NDK_DIR, 'build', 'tools', 'make-standalone-toolchain.sh') ++ for target_arch in ['aarch64', 'arm', 'i686']: ++ # Make standalone Android toolchain for target_arch. ++ toolchain_dir = os.path.join( ++ LLVM_BUILD_DIR, 'android-toolchain-' + target_arch) ++ RunCommand([ ++ make_toolchain, ++ '--platform=android-' + ('21' if target_arch == 'aarch64' else '19'), ++ '--install-dir="%s"' % toolchain_dir, ++ '--system=linux-x86_64', ++ '--stl=stlport', ++ '--toolchain=' + { ++ 'aarch64': 'aarch64-linux-android-4.9', ++ 'arm': 'arm-linux-androideabi-4.9', ++ 'i686': 'x86-4.9', ++ }[target_arch]]) ++ # Android NDK r9d copies a broken unwind.h into the toolchain, see ++ # http://crbug.com/357890 ++ for f in glob.glob(os.path.join(toolchain_dir, 'include/c++/*/unwind.h')): ++ os.remove(f) ++ ++ # Build ASan runtime for Android in a separate build tree. ++ build_dir = os.path.join(LLVM_BUILD_DIR, 'android-' + target_arch) ++ if not os.path.exists(build_dir): ++ os.mkdir(os.path.join(build_dir)) ++ os.chdir(build_dir) ++ cflags = ['--target=%s-linux-androideabi' % target_arch, ++ '--sysroot=%s/sysroot' % toolchain_dir, ++ '-B%s' % toolchain_dir] ++ android_args = base_cmake_args + [ ++ '-DCMAKE_C_COMPILER=' + os.path.join(LLVM_BUILD_DIR, 'bin/clang'), ++ '-DCMAKE_CXX_COMPILER=' + os.path.join(LLVM_BUILD_DIR, 'bin/clang++'), ++ '-DLLVM_CONFIG_PATH=' + os.path.join(LLVM_BUILD_DIR, 'bin/llvm-config'), ++ '-DCMAKE_C_FLAGS=' + ' '.join(cflags), ++ '-DCMAKE_CXX_FLAGS=' + ' '.join(cflags), ++ '-DANDROID=1'] ++ RmCmakeCache('.') ++ RunCommand(['cmake'] + android_args + [COMPILER_RT_DIR]) ++ RunCommand(['ninja', 'libclang_rt.asan-%s-android.so' % target_arch]) ++ ++ # And copy it into the main build tree. ++ runtime = 'libclang_rt.asan-%s-android.so' % target_arch ++ for root, _, files in os.walk(build_dir): ++ if runtime in files: ++ shutil.copy(os.path.join(root, runtime), asan_rt_lib_dst_dir) ++ + # Run tests. + if args.run_tests or use_head_revision: + os.chdir(LLVM_BUILD_DIR) +- RunCommand(GetVSVersion().SetupScript('x64') + +- ['&&', 'ninja', 'cr-check-all']) ++ RunCommand(['ninja', 'cr-check-all'], msvc_arch='x64') + if args.run_tests: + os.chdir(LLVM_BUILD_DIR) +- RunCommand(GetVSVersion().SetupScript('x64') + +- ['&&', 'ninja', 'check-all']) ++ RunCommand(['ninja', 'check-all'], msvc_arch='x64') + + WriteStampFile(PACKAGE_VERSION) + print 'Clang update was successful.' +@@ -663,31 +743,6 @@ + + + def main(): +- if not sys.platform in ['win32', 'cygwin']: +- # For non-Windows, fall back to update.sh. +- # TODO(hans): Make update.py replace update.sh completely. +- +- # This script is called by gclient. gclient opens its hooks subprocesses +- # with (stdout=subprocess.PIPE, stderr=subprocess.STDOUT) and then does +- # custom output processing that breaks printing '\r' characters for +- # single-line updating status messages as printed by curl and wget. +- # Work around this by setting stderr of the update.sh process to stdin (!): +- # gclient doesn't redirect stdin, and while stdin itself is read-only, a +- # dup()ed sys.stdin is writable, try +- # fd2 = os.dup(sys.stdin.fileno()); os.write(fd2, 'hi') +- # TODO: Fix gclient instead, http://crbug.com/95350 +- if '--no-stdin-hack' in sys.argv: +- sys.argv.remove('--no-stdin-hack') +- stderr = None +- else: +- try: +- stderr = os.fdopen(os.dup(sys.stdin.fileno())) +- except: +- stderr = sys.stderr +- return subprocess.call( +- [os.path.join(os.path.dirname(__file__), 'update.sh')] + sys.argv[1:], +- stderr=stderr) +- + parser = argparse.ArgumentParser(description='Build Clang.') + parser.add_argument('--bootstrap', action='store_true', + help='first build clang with CC, then with itself.') +@@ -695,26 +750,24 @@ + help="run only if the script thinks clang is needed") + parser.add_argument('--force-local-build', action='store_true', + help="don't try to download prebuild binaries") ++ parser.add_argument('--gcc-toolchain', help='set the version for which gcc ' ++ 'version be used for building; --gcc-toolchain=/opt/foo ' ++ 'picks /opt/foo/bin/gcc') + parser.add_argument('--print-revision', action='store_true', + help='print current clang revision and exit.') ++ parser.add_argument('--print-clang-version', action='store_true', ++ help='print current clang version (e.g. x.y.z) and exit.') + parser.add_argument('--run-tests', action='store_true', + help='run tests after building; only for local builds') + parser.add_argument('--tools', nargs='*', + help='select which chrome tools to build', + default=['plugins', 'blink_gc_plugin']) +- parser.add_argument('--without-patches', action='store_false', +- help="don't apply patches (default)", dest='with_patches', +- default=True) +- +- # For now, these flags are only used for the non-Windows flow, but argparser +- # gets mad if it sees a flag it doesn't recognize. +- parser.add_argument('--no-stdin-hack', action='store_true') +- ++ parser.add_argument('--without-android', action='store_false', ++ help='don\'t build Android ASan runtime (linux only)', ++ dest='with_android', ++ default=sys.platform.startswith('linux')) + args = parser.parse_args() + +- if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): +- print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' +- return 0 + if args.if_needed: + is_clang_required = False + # clang is always used on Mac and Linux. +@@ -730,8 +783,16 @@ + is_clang_required = True + if not is_clang_required: + return 0 ++ if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): ++ print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' ++ return 0 ++ ++ if use_head_revision: ++ # TODO(hans): Remove after the next roll. ++ global VERSION ++ VERSION = '3.9.0' + +- global LLVM_WIN_REVISION, PACKAGE_VERSION ++ global CLANG_REVISION, PACKAGE_VERSION + if args.print_revision: + if use_head_revision: + print GetSvnRevision(LLVM_DIR) +@@ -739,6 +800,10 @@ + print PACKAGE_VERSION + return 0 + ++ if args.print_clang_version: ++ sys.stdout.write(VERSION) ++ return 0 ++ + # Don't buffer stdout, so that print statements are immediately flushed. + # Do this only after --print-revision has been handled, else we'll get + # an error message when this script is run from gn for some reason. +@@ -747,12 +812,13 @@ + if use_head_revision: + # Use a real revision number rather than HEAD to make sure that the stamp + # file logic works. +- LLVM_WIN_REVISION = GetSvnRevision(LLVM_REPO_URL) +- PACKAGE_VERSION = LLVM_WIN_REVISION + '-0' ++ CLANG_REVISION = GetSvnRevision(LLVM_REPO_URL) ++ PACKAGE_VERSION = CLANG_REVISION + '-0' + + args.force_local_build = True +- # Skip local patches when using HEAD: they probably don't apply anymore. +- args.with_patches = False ++ if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): ++ # Only build the Android ASan rt on ToT bots when targetting Android. ++ args.with_android = False + + return UpdateClang(args) + diff --git a/pkgs/development/libraries/qt-5/5.6/qtwebengine/chromium-clang-update-py.patch b/pkgs/development/libraries/qt-5/5.6/qtwebengine/chromium-clang-update-py.patch deleted file mode 100644 index 65a604d2534..00000000000 --- a/pkgs/development/libraries/qt-5/5.6/qtwebengine/chromium-clang-update-py.patch +++ /dev/null @@ -1,874 +0,0 @@ ---- a/src/3rdparty/chromium/tools/clang/scripts/update.py 2016-05-26 04:58:54.000000000 -0800 -+++ b/src/3rdparty/chromium/tools/clang/scripts/update.py 2016-11-04 08:35:34.956154012 -0800 -@@ -3,12 +3,12 @@ - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. - --"""Windows can't run .sh files, so this is a Python implementation of --update.sh. This script should replace update.sh on all platforms eventually.""" -+"""This script is used to download prebuilt clang binaries. -+ -+It is also used by package.py to build the prebuilt clang binaries.""" - - import argparse --import contextlib --import cStringIO -+import distutils.spawn - import glob - import os - import pipes -@@ -18,6 +18,7 @@ - import stat - import sys - import tarfile -+import tempfile - import time - import urllib2 - import zipfile -@@ -25,19 +26,16 @@ - # Do NOT CHANGE this if you don't know what you're doing -- see - # https://code.google.com/p/chromium/wiki/UpdatingClang - # Reverting problematic clang rolls is safe, though. --# Note: this revision is only used for Windows. Other platforms use update.sh. --# TODO(thakis): Use the same revision on Windows and non-Windows. --# TODO(thakis): Remove update.sh, use update.py everywhere. --LLVM_WIN_REVISION = '239674' -+CLANG_REVISION = '239674' - - use_head_revision = 'LLVM_FORCE_HEAD_REVISION' in os.environ - if use_head_revision: -- LLVM_WIN_REVISION = 'HEAD' -+ CLANG_REVISION = 'HEAD' - - # This is incremented when pushing a new build of Clang at the same revision. - CLANG_SUB_REVISION=1 - --PACKAGE_VERSION = "%s-%s" % (LLVM_WIN_REVISION, CLANG_SUB_REVISION) -+PACKAGE_VERSION = "%s-%s" % (CLANG_REVISION, CLANG_SUB_REVISION) - - # Path constants. (All of these should be absolute paths.) - THIS_DIR = os.path.abspath(os.path.dirname(__file__)) -@@ -50,17 +48,26 @@ - CHROME_TOOLS_SHIM_DIR = os.path.join(LLVM_DIR, 'tools', 'chrometools') - LLVM_BUILD_DIR = os.path.join(CHROMIUM_DIR, 'third_party', 'llvm-build', - 'Release+Asserts') --COMPILER_RT_BUILD_DIR = os.path.join(LLVM_BUILD_DIR, '32bit-compiler-rt') -+COMPILER_RT_BUILD_DIR = os.path.join(LLVM_BUILD_DIR, 'compiler-rt') - CLANG_DIR = os.path.join(LLVM_DIR, 'tools', 'clang') - LLD_DIR = os.path.join(LLVM_DIR, 'tools', 'lld') --COMPILER_RT_DIR = os.path.join(LLVM_DIR, 'projects', 'compiler-rt') -+# compiler-rt is built as part of the regular LLVM build on Windows to get -+# the 64-bit runtime, and out-of-tree elsewhere. -+# TODO(thakis): Try to unify this. -+if sys.platform == 'win32': -+ COMPILER_RT_DIR = os.path.join(LLVM_DIR, 'projects', 'compiler-rt') -+else: -+ COMPILER_RT_DIR = os.path.join(LLVM_DIR, 'compiler-rt') - LIBCXX_DIR = os.path.join(LLVM_DIR, 'projects', 'libcxx') - LIBCXXABI_DIR = os.path.join(LLVM_DIR, 'projects', 'libcxxabi') - LLVM_BUILD_TOOLS_DIR = os.path.abspath( - os.path.join(LLVM_DIR, '..', 'llvm-build-tools')) --STAMP_FILE = os.path.join(LLVM_DIR, '..', 'llvm-build', 'cr_build_revision') -+STAMP_FILE = os.path.normpath( -+ os.path.join(LLVM_DIR, '..', 'llvm-build', 'cr_build_revision')) - BINUTILS_DIR = os.path.join(THIRD_PARTY_DIR, 'binutils') --VERSION = '3.7.0' -+VERSION = '3.8.0' -+ANDROID_NDK_DIR = os.path.join( -+ CHROMIUM_DIR, 'third_party', 'android_tools', 'ndk') - - # URL for pre-built binaries. - CDS_URL = 'https://commondatastorage.googleapis.com/chromium-browser-clang' -@@ -74,40 +81,75 @@ - """Download url into output_file.""" - CHUNK_SIZE = 4096 - TOTAL_DOTS = 10 -- sys.stdout.write('Downloading %s ' % url) -- sys.stdout.flush() -- response = urllib2.urlopen(url) -- total_size = int(response.info().getheader('Content-Length').strip()) -- bytes_done = 0 -- dots_printed = 0 -+ num_retries = 3 -+ retry_wait_s = 5 # Doubled at each retry. -+ - while True: -- chunk = response.read(CHUNK_SIZE) -- if not chunk: -- break -- output_file.write(chunk) -- bytes_done += len(chunk) -- num_dots = TOTAL_DOTS * bytes_done / total_size -- sys.stdout.write('.' * (num_dots - dots_printed)) -- sys.stdout.flush() -- dots_printed = num_dots -- print ' Done.' -+ try: -+ sys.stdout.write('Downloading %s ' % url) -+ sys.stdout.flush() -+ response = urllib2.urlopen(url) -+ total_size = int(response.info().getheader('Content-Length').strip()) -+ bytes_done = 0 -+ dots_printed = 0 -+ while True: -+ chunk = response.read(CHUNK_SIZE) -+ if not chunk: -+ break -+ output_file.write(chunk) -+ bytes_done += len(chunk) -+ num_dots = TOTAL_DOTS * bytes_done / total_size -+ sys.stdout.write('.' * (num_dots - dots_printed)) -+ sys.stdout.flush() -+ dots_printed = num_dots -+ if bytes_done != total_size: -+ raise urllib2.URLError("only got %d of %d bytes" % -+ (bytes_done, total_size)) -+ print ' Done.' -+ return -+ except urllib2.URLError as e: -+ sys.stdout.write('\n') -+ print e -+ if num_retries == 0 or isinstance(e, urllib2.HTTPError) and e.code == 404: -+ raise e -+ num_retries -= 1 -+ print 'Retrying in %d s ...' % retry_wait_s -+ time.sleep(retry_wait_s) -+ retry_wait_s *= 2 -+ -+ -+def EnsureDirExists(path): -+ if not os.path.exists(path): -+ print "Creating directory %s" % path -+ os.makedirs(path) -+ -+ -+def DownloadAndUnpack(url, output_dir): -+ with tempfile.TemporaryFile() as f: -+ DownloadUrl(url, f) -+ f.seek(0) -+ EnsureDirExists(output_dir) -+ if url.endswith('.zip'): -+ zipfile.ZipFile(f).extractall(path=output_dir) -+ else: -+ tarfile.open(mode='r:gz', fileobj=f).extractall(path=output_dir) - - - def ReadStampFile(): - """Return the contents of the stamp file, or '' if it doesn't exist.""" - try: - with open(STAMP_FILE, 'r') as f: -- return f.read() -+ return f.read().rstrip() - except IOError: - return '' - - - def WriteStampFile(s): - """Write s to the stamp file.""" -- if not os.path.exists(os.path.dirname(STAMP_FILE)): -- os.makedirs(os.path.dirname(STAMP_FILE)) -+ EnsureDirExists(os.path.dirname(STAMP_FILE)) - with open(STAMP_FILE, 'w') as f: - f.write(s) -+ f.write('\n') - - - def GetSvnRevision(svn_repo): -@@ -129,6 +171,13 @@ - shutil.rmtree(dir, onerror=ChmodAndRetry) - - -+def RmCmakeCache(dir): -+ """Delete CMakeCache.txt files under dir recursively.""" -+ for dirpath, _, files in os.walk(dir): -+ if 'CMakeCache.txt' in files: -+ os.remove(os.path.join(dirpath, 'CMakeCache.txt')) -+ -+ - def RunCommand(command, msvc_arch=None, env=None, fail_hard=True): - """Run command and return success (True) or failure; or if fail_hard is - True, exit on failure. If msvc_arch is set, runs the command in a -@@ -170,8 +219,8 @@ - def CopyDirectoryContents(src, dst, filename_filter=None): - """Copy the files from directory src to dst - with an optional filename filter.""" -- if not os.path.exists(dst): -- os.makedirs(dst) -+ dst = os.path.realpath(dst) # realpath() in case dst ends in /.. -+ EnsureDirExists(dst) - for root, _, files in os.walk(src): - for f in files: - if filename_filter and not re.match(filename_filter, f): -@@ -181,9 +230,9 @@ - - def Checkout(name, url, dir): - """Checkout the SVN module at url into dir. Use name for the log message.""" -- print "Checking out %s r%s into '%s'" % (name, LLVM_WIN_REVISION, dir) -+ print "Checking out %s r%s into '%s'" % (name, CLANG_REVISION, dir) - -- command = ['svn', 'checkout', '--force', url + '@' + LLVM_WIN_REVISION, dir] -+ command = ['svn', 'checkout', '--force', url + '@' + CLANG_REVISION, dir] - if RunCommand(command, fail_hard=False): - return - -@@ -195,120 +244,9 @@ - RunCommand(command) - - --def RevertPreviouslyPatchedFiles(): -- print 'Reverting previously patched files' -- files = [ -- '%(clang)s/test/Index/crash-recovery-modules.m', -- '%(clang)s/unittests/libclang/LibclangTest.cpp', -- '%(compiler_rt)s/lib/asan/asan_rtl.cc', -- '%(compiler_rt)s/test/asan/TestCases/Linux/new_array_cookie_test.cc', -- '%(llvm)s/test/DebugInfo/gmlt.ll', -- '%(llvm)s/lib/CodeGen/SpillPlacement.cpp', -- '%(llvm)s/lib/CodeGen/SpillPlacement.h', -- '%(llvm)s/lib/Transforms/Instrumentation/MemorySanitizer.cpp', -- '%(clang)s/test/Driver/env.c', -- '%(clang)s/lib/Frontend/InitPreprocessor.cpp', -- '%(clang)s/test/Frontend/exceptions.c', -- '%(clang)s/test/Preprocessor/predefined-exceptions.m', -- '%(llvm)s/test/Bindings/Go/go.test', -- '%(clang)s/lib/Parse/ParseExpr.cpp', -- '%(clang)s/lib/Parse/ParseTemplate.cpp', -- '%(clang)s/lib/Sema/SemaDeclCXX.cpp', -- '%(clang)s/lib/Sema/SemaExprCXX.cpp', -- '%(clang)s/test/SemaCXX/default2.cpp', -- '%(clang)s/test/SemaCXX/typo-correction-delayed.cpp', -- '%(compiler_rt)s/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc', -- '%(compiler_rt)s/test/tsan/signal_segv_handler.cc', -- '%(compiler_rt)s/lib/sanitizer_common/sanitizer_coverage_libcdep.cc', -- '%(compiler_rt)s/cmake/config-ix.cmake', -- '%(compiler_rt)s/CMakeLists.txt', -- '%(compiler_rt)s/lib/ubsan/ubsan_platform.h', -- ] -- for f in files: -- f = f % { -- 'clang': CLANG_DIR, -- 'compiler_rt': COMPILER_RT_DIR, -- 'llvm': LLVM_DIR, -- } -- if os.path.exists(f): -- os.remove(f) # For unversioned files. -- RunCommand(['svn', 'revert', f]) -- -- --def ApplyLocalPatches(): -- # There's no patch program on Windows by default. We don't need patches on -- # Windows yet, and maybe this not working on Windows will motivate us to -- # remove patches over time. -- assert sys.platform != 'win32' -- -- # Apply patch for tests failing with --disable-pthreads (llvm.org/PR11974) -- clang_patches = [ r"""\ ----- test/Index/crash-recovery-modules.m (revision 202554) --+++ test/Index/crash-recovery-modules.m (working copy) --@@ -12,6 +12,8 @@ -- -- // REQUIRES: crash-recovery -- // REQUIRES: shell --+// XFAIL: * --+// (PR11974) -- -- @import Crash; --""", r"""\ ----- unittests/libclang/LibclangTest.cpp (revision 215949) --+++ unittests/libclang/LibclangTest.cpp (working copy) --@@ -431,7 +431,7 @@ -- EXPECT_EQ(0U, clang_getNumDiagnostics(ClangTU)); -- } -- ---TEST_F(LibclangReparseTest, ReparseWithModule) { --+TEST_F(LibclangReparseTest, DISABLED_ReparseWithModule) { -- const char *HeaderTop = "#ifndef H\n#define H\nstruct Foo { int bar;"; -- const char *HeaderBottom = "\n};\n#endif\n"; -- const char *MFile = "#include \"HeaderFile.h\"\nint main() {" --""" -- ] -- -- # This Go bindings test doesn't work after bootstrap on Linux, PR21552. -- llvm_patches = [ r"""\ ----- test/Bindings/Go/go.test (revision 223109) --+++ test/Bindings/Go/go.test (working copy) --@@ -1,3 +1,3 @@ ---; RUN: llvm-go test llvm.org/llvm/bindings/go/llvm --+; RUN: true -- -- ; REQUIRES: shell --""" -- ] -- -- # The UBSan run-time, which is now bundled with the ASan run-time, doesn't -- # work on Mac OS X 10.8 (PR23539). -- compiler_rt_patches = [ r"""\ ----- CMakeLists.txt (revision 241602) --+++ CMakeLists.txt (working copy) --@@ -305,6 +305,7 @@ -- list(APPEND SANITIZER_COMMON_SUPPORTED_OS iossim) -- endif() -- endif() --+ set(SANITIZER_MIN_OSX_VERSION "10.7") -- if(SANITIZER_MIN_OSX_VERSION VERSION_LESS "10.7") -- message(FATAL_ERROR "Too old OS X version: ${SANITIZER_MIN_OSX_VERSION}") -- endif() --""" -- ] -- -- for path, patches in [(LLVM_DIR, llvm_patches), -- (CLANG_DIR, clang_patches), -- (COMPILER_RT_DIR, compiler_rt_patches)]: -- print 'Applying patches in', path -- for patch in patches: -- print patch -- p = subprocess.Popen( ['patch', '-p0', '-d', path], stdin=subprocess.PIPE) -- (stdout, stderr) = p.communicate(input=patch) -- if p.returncode != 0: -- raise RuntimeError('stdout %s, stderr %s' % (stdout, stderr)) -- -- - def DeleteChromeToolsShim(): -+ OLD_SHIM_DIR = os.path.join(LLVM_DIR, 'tools', 'zzz-chrometools') -+ shutil.rmtree(OLD_SHIM_DIR, ignore_errors=True) - shutil.rmtree(CHROME_TOOLS_SHIM_DIR, ignore_errors=True) - - -@@ -337,6 +275,25 @@ - f.write('endif (CHROMIUM_TOOLS_SRC)\n') - - -+def MaybeDownloadHostGcc(args): -+ """Downloads gcc 4.8.2 if needed and makes sure args.gcc_toolchain is set.""" -+ if not sys.platform.startswith('linux') or args.gcc_toolchain: -+ return -+ -+ if subprocess.check_output(['gcc', '-dumpversion']).rstrip() < '4.7.0': -+ # We need a newer gcc version. -+ gcc_dir = os.path.join(LLVM_BUILD_TOOLS_DIR, 'gcc482precise') -+ if not os.path.exists(gcc_dir): -+ print 'Downloading pre-built GCC 4.8.2...' -+ DownloadAndUnpack( -+ CDS_URL + '/tools/gcc482precise.tgz', LLVM_BUILD_TOOLS_DIR) -+ args.gcc_toolchain = gcc_dir -+ else: -+ # Always set gcc_toolchain; llvm-symbolizer needs the bundled libstdc++. -+ args.gcc_toolchain = \ -+ os.path.dirname(os.path.dirname(distutils.spawn.find_executable('gcc'))) -+ -+ - def AddCMakeToPath(): - """Download CMake and add it to PATH.""" - if sys.platform == 'win32': -@@ -345,20 +302,10 @@ - 'cmake-3.2.2-win32-x86', 'bin') - else: - suffix = 'Darwin' if sys.platform == 'darwin' else 'Linux' -- zip_name = 'cmake310_%s.tgz' % suffix -- cmake_dir = os.path.join(LLVM_BUILD_TOOLS_DIR, 'cmake310', 'bin') -+ zip_name = 'cmake322_%s.tgz' % suffix -+ cmake_dir = os.path.join(LLVM_BUILD_TOOLS_DIR, 'cmake322', 'bin') - if not os.path.exists(cmake_dir): -- if not os.path.exists(LLVM_BUILD_TOOLS_DIR): -- os.makedirs(LLVM_BUILD_TOOLS_DIR) -- # The cmake archive is smaller than 20 MB, small enough to keep in memory: -- with contextlib.closing(cStringIO.StringIO()) as f: -- DownloadUrl(CDS_URL + '/tools/' + zip_name, f) -- f.seek(0) -- if zip_name.endswith('.zip'): -- zipfile.ZipFile(f).extractall(path=LLVM_BUILD_TOOLS_DIR) -- else: -- tarfile.open(mode='r:gz', fileobj=f).extractall(path= -- LLVM_BUILD_TOOLS_DIR) -+ DownloadAndUnpack(CDS_URL + '/tools/' + zip_name, LLVM_BUILD_TOOLS_DIR) - os.environ['PATH'] = cmake_dir + os.pathsep + os.environ.get('PATH', '') - - vs_version = None -@@ -383,37 +330,61 @@ - - def UpdateClang(args): - print 'Updating Clang to %s...' % PACKAGE_VERSION -- if ReadStampFile() == PACKAGE_VERSION: -- print 'Already up to date.' -- return 0 -+ -+ need_gold_plugin = 'LLVM_DOWNLOAD_GOLD_PLUGIN' in os.environ or ( -+ sys.platform.startswith('linux') and -+ 'buildtype=Official' in os.environ.get('GYP_DEFINES', '') and -+ 'branding=Chrome' in os.environ.get('GYP_DEFINES', '')) -+ -+ if ReadStampFile() == PACKAGE_VERSION and not args.force_local_build: -+ print 'Clang is already up to date.' -+ if not need_gold_plugin or os.path.exists( -+ os.path.join(LLVM_BUILD_DIR, "lib/LLVMgold.so")): -+ return 0 - - # Reset the stamp file in case the build is unsuccessful. - WriteStampFile('') - - if not args.force_local_build: - cds_file = "clang-%s.tgz" % PACKAGE_VERSION -- cds_full_url = CDS_URL + '/Win/' + cds_file -+ if sys.platform == 'win32': -+ cds_full_url = CDS_URL + '/Win/' + cds_file -+ elif sys.platform == 'darwin': -+ cds_full_url = CDS_URL + '/Mac/' + cds_file -+ else: -+ assert sys.platform.startswith('linux') -+ cds_full_url = CDS_URL + '/Linux_x64/' + cds_file - -- # Check if there's a prebuilt binary and if so just fetch that. That's -- # faster, and goma relies on having matching binary hashes on client and -- # server too. -- print 'Trying to download prebuilt clang' -- -- # clang packages are smaller than 50 MB, small enough to keep in memory. -- with contextlib.closing(cStringIO.StringIO()) as f: -- try: -- DownloadUrl(cds_full_url, f) -- f.seek(0) -- tarfile.open(mode='r:gz', fileobj=f).extractall(path=LLVM_BUILD_DIR) -- print 'clang %s unpacked' % PACKAGE_VERSION -- WriteStampFile(PACKAGE_VERSION) -- return 0 -- except urllib2.HTTPError: -- print 'Did not find prebuilt clang %s, building locally' % cds_file -+ print 'Downloading prebuilt clang' -+ if os.path.exists(LLVM_BUILD_DIR): -+ RmTree(LLVM_BUILD_DIR) -+ try: -+ DownloadAndUnpack(cds_full_url, LLVM_BUILD_DIR) -+ print 'clang %s unpacked' % PACKAGE_VERSION -+ # Download the gold plugin if requested to by an environment variable. -+ # This is used by the CFI ClusterFuzz bot, and it's required for official -+ # builds on linux. -+ if need_gold_plugin: -+ RunCommand(['python', CHROMIUM_DIR+'/build/download_gold_plugin.py']) -+ WriteStampFile(PACKAGE_VERSION) -+ return 0 -+ except urllib2.URLError: -+ print 'Failed to download prebuilt clang %s' % cds_file -+ print 'Use --force-local-build if you want to build locally.' -+ print 'Exiting.' -+ return 1 -+ -+ if args.with_android and not os.path.exists(ANDROID_NDK_DIR): -+ print 'Android NDK not found at ' + ANDROID_NDK_DIR -+ print 'The Android NDK is needed to build a Clang whose -fsanitize=address' -+ print 'works on Android. See ' -+ print 'http://code.google.com/p/chromium/wiki/AndroidBuildInstructions' -+ print 'for how to install the NDK, or pass --without-android.' -+ return 1 - -+ MaybeDownloadHostGcc(args) - AddCMakeToPath() - -- RevertPreviouslyPatchedFiles() - DeleteChromeToolsShim() - - Checkout('LLVM', LLVM_REPO_URL + '/llvm/trunk', LLVM_DIR) -@@ -429,10 +400,24 @@ - # into it too (since OS X 10.6 doesn't have libc++abi.dylib either). - Checkout('libcxxabi', LLVM_REPO_URL + '/libcxxabi/trunk', LIBCXXABI_DIR) - -- if args.with_patches and sys.platform != 'win32': -- ApplyLocalPatches() -- - cc, cxx = None, None -+ libstdcpp = None -+ if args.gcc_toolchain: # This option is only used on Linux. -+ # Use the specified gcc installation for building. -+ cc = os.path.join(args.gcc_toolchain, 'bin', 'gcc') -+ cxx = os.path.join(args.gcc_toolchain, 'bin', 'g++') -+ -+ if not os.access(cc, os.X_OK): -+ print 'Invalid --gcc-toolchain: "%s"' % args.gcc_toolchain -+ print '"%s" does not appear to be valid.' % cc -+ return 1 -+ -+ # Set LD_LIBRARY_PATH to make auxiliary targets (tablegen, bootstrap -+ # compiler, etc.) find the .so. -+ libstdcpp = subprocess.check_output( -+ [cxx, '-print-file-name=libstdc++.so.6']).rstrip() -+ os.environ['LD_LIBRARY_PATH'] = os.path.dirname(libstdcpp) -+ - cflags = cxxflags = ldflags = [] - - # LLVM uses C++11 starting in llvm 3.5. On Linux, this means libstdc++4.7+ is -@@ -462,8 +447,7 @@ - - if args.bootstrap: - print 'Building bootstrap compiler' -- if not os.path.exists(LLVM_BOOTSTRAP_DIR): -- os.makedirs(LLVM_BOOTSTRAP_DIR) -+ EnsureDirExists(LLVM_BOOTSTRAP_DIR) - os.chdir(LLVM_BOOTSTRAP_DIR) - bootstrap_args = base_cmake_args + [ - '-DLLVM_TARGETS_TO_BUILD=host', -@@ -473,11 +457,16 @@ - ] - if cc is not None: bootstrap_args.append('-DCMAKE_C_COMPILER=' + cc) - if cxx is not None: bootstrap_args.append('-DCMAKE_CXX_COMPILER=' + cxx) -+ RmCmakeCache('.') - RunCommand(['cmake'] + bootstrap_args + [LLVM_DIR], msvc_arch='x64') - RunCommand(['ninja'], msvc_arch='x64') - if args.run_tests: - RunCommand(['ninja', 'check-all'], msvc_arch='x64') - RunCommand(['ninja', 'install'], msvc_arch='x64') -+ if args.gcc_toolchain: -+ # Copy that gcc's stdlibc++.so.6 to the build dir, so the bootstrap -+ # compiler can start. -+ CopyFile(libstdcpp, os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'lib')) - - if sys.platform == 'win32': - cc = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang-cl.exe') -@@ -489,6 +478,12 @@ - else: - cc = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang') - cxx = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang++') -+ -+ if args.gcc_toolchain: -+ # Tell the bootstrap compiler to use a specific gcc prefix to search -+ # for standard library headers and shared object files. -+ cflags = ['--gcc-toolchain=' + args.gcc_toolchain] -+ cxxflags = ['--gcc-toolchain=' + args.gcc_toolchain] - print 'Building final compiler' - - if sys.platform == 'darwin': -@@ -543,7 +538,7 @@ - binutils_incdir = os.path.join(BINUTILS_DIR, 'Linux_x64/Release/include') - - # If building at head, define a macro that plugins can use for #ifdefing -- # out code that builds at head, but not at LLVM_WIN_REVISION or vice versa. -+ # out code that builds at head, but not at CLANG_REVISION or vice versa. - if use_head_revision: - cflags += ['-DLLVM_FORCE_HEAD_REVISION'] - cxxflags += ['-DLLVM_FORCE_HEAD_REVISION'] -@@ -555,8 +550,15 @@ - deployment_env = os.environ.copy() - deployment_env['MACOSX_DEPLOYMENT_TARGET'] = deployment_target - -- cmake_args = base_cmake_args + [ -+ cmake_args = [] -+ # TODO(thakis): Unconditionally append this to base_cmake_args instead once -+ # compiler-rt can build with clang-cl on Windows (http://llvm.org/PR23698) -+ cc_args = base_cmake_args if sys.platform != 'win32' else cmake_args -+ if cc is not None: cc_args.append('-DCMAKE_C_COMPILER=' + cc) -+ if cxx is not None: cc_args.append('-DCMAKE_CXX_COMPILER=' + cxx) -+ cmake_args += base_cmake_args + [ - '-DLLVM_BINUTILS_INCDIR=' + binutils_incdir, -+ '-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly', - '-DCMAKE_C_FLAGS=' + ' '.join(cflags), - '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags), - '-DCMAKE_EXE_LINKER_FLAGS=' + ' '.join(ldflags), -@@ -565,35 +567,44 @@ - '-DCMAKE_INSTALL_PREFIX=' + LLVM_BUILD_DIR, - '-DCHROMIUM_TOOLS_SRC=%s' % os.path.join(CHROMIUM_DIR, 'tools', 'clang'), - '-DCHROMIUM_TOOLS=%s' % ';'.join(args.tools)] -- # TODO(thakis): Unconditionally append this to base_cmake_args instead once -- # compiler-rt can build with clang-cl on Windows (http://llvm.org/PR23698) -- cc_args = base_cmake_args if sys.platform != 'win32' else cmake_args -- if cc is not None: cc_args.append('-DCMAKE_C_COMPILER=' + cc) -- if cxx is not None: cc_args.append('-DCMAKE_CXX_COMPILER=' + cxx) - -- if not os.path.exists(LLVM_BUILD_DIR): -- os.makedirs(LLVM_BUILD_DIR) -+ EnsureDirExists(LLVM_BUILD_DIR) - os.chdir(LLVM_BUILD_DIR) -+ RmCmakeCache('.') - RunCommand(['cmake'] + cmake_args + [LLVM_DIR], - msvc_arch='x64', env=deployment_env) -- RunCommand(['ninja'], msvc_arch='x64') -+ -+ if args.gcc_toolchain: -+ # Copy in the right stdlibc++.so.6 so clang can start. -+ if not os.path.exists(os.path.join(LLVM_BUILD_DIR, 'lib')): -+ os.mkdir(os.path.join(LLVM_BUILD_DIR, 'lib')) -+ libstdcpp = subprocess.check_output( -+ [cxx] + cxxflags + ['-print-file-name=libstdc++.so.6']).rstrip() -+ CopyFile(libstdcpp, os.path.join(LLVM_BUILD_DIR, 'lib')) -+ -+ # TODO(thakis): Remove "-d explain" once http://crbug.com/569337 is fixed. -+ RunCommand(['ninja', '-d', 'explain'], msvc_arch='x64') - - if args.tools: - # If any Chromium tools were built, install those now. - RunCommand(['ninja', 'cr-install'], msvc_arch='x64') - - if sys.platform == 'darwin': -- CopyFile(os.path.join(LLVM_BUILD_DIR, 'libc++.1.dylib'), -+ CopyFile(os.path.join(libcxxbuild, 'libc++.1.dylib'), - os.path.join(LLVM_BUILD_DIR, 'bin')) - # See http://crbug.com/256342 - RunCommand(['strip', '-x', os.path.join(LLVM_BUILD_DIR, 'bin', 'clang')]) - elif sys.platform.startswith('linux'): - RunCommand(['strip', os.path.join(LLVM_BUILD_DIR, 'bin', 'clang')]) - -- # Do an x86 build of compiler-rt to get the 32-bit ASan run-time. -+ # Do an out-of-tree build of compiler-rt. -+ # On Windows, this is used to get the 32-bit ASan run-time. - # TODO(hans): Remove once the regular build above produces this. -- if not os.path.exists(COMPILER_RT_BUILD_DIR): -- os.makedirs(COMPILER_RT_BUILD_DIR) -+ # On Mac and Linux, this is used to get the regular 64-bit run-time. -+ # Do a clobbered build due to cmake changes. -+ if os.path.isdir(COMPILER_RT_BUILD_DIR): -+ RmTree(COMPILER_RT_BUILD_DIR) -+ os.makedirs(COMPILER_RT_BUILD_DIR) - os.chdir(COMPILER_RT_BUILD_DIR) - # TODO(thakis): Add this once compiler-rt can build with clang-cl (see - # above). -@@ -606,11 +617,17 @@ - '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags)] - if sys.platform != 'win32': - compiler_rt_args += ['-DLLVM_CONFIG_PATH=' + -- os.path.join(LLVM_BUILD_DIR, 'bin', 'llvm-config')] -- RunCommand(['cmake'] + compiler_rt_args + [LLVM_DIR], -- msvc_arch='x86', env=deployment_env) -+ os.path.join(LLVM_BUILD_DIR, 'bin', 'llvm-config'), -+ '-DSANITIZER_MIN_OSX_VERSION="10.7"'] -+ # compiler-rt is part of the llvm checkout on Windows but a stand-alone -+ # directory elsewhere, see the TODO above COMPILER_RT_DIR. -+ RmCmakeCache('.') -+ RunCommand(['cmake'] + compiler_rt_args + -+ [LLVM_DIR if sys.platform == 'win32' else COMPILER_RT_DIR], -+ msvc_arch='x86', env=deployment_env) - RunCommand(['ninja', 'compiler-rt'], msvc_arch='x86') - -+ # Copy select output to the main tree. - # TODO(hans): Make this (and the .gypi and .isolate files) version number - # independent. - if sys.platform == 'win32': -@@ -620,17 +637,35 @@ - else: - assert sys.platform.startswith('linux') - platform = 'linux' -- asan_rt_lib_src_dir = os.path.join(COMPILER_RT_BUILD_DIR, 'lib', 'clang', -- VERSION, 'lib', platform) -+ asan_rt_lib_src_dir = os.path.join(COMPILER_RT_BUILD_DIR, 'lib', platform) -+ if sys.platform == 'win32': -+ # TODO(thakis): This too is due to compiler-rt being part of the checkout -+ # on Windows, see TODO above COMPILER_RT_DIR. -+ asan_rt_lib_src_dir = os.path.join(COMPILER_RT_BUILD_DIR, 'lib', 'clang', -+ VERSION, 'lib', platform) - asan_rt_lib_dst_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang', - VERSION, 'lib', platform) -- CopyDirectoryContents(asan_rt_lib_src_dir, asan_rt_lib_dst_dir, -- r'^.*-i386\.lib$') -- CopyDirectoryContents(asan_rt_lib_src_dir, asan_rt_lib_dst_dir, -- r'^.*-i386\.dll$') -+ # Blacklists: -+ CopyDirectoryContents(os.path.join(asan_rt_lib_src_dir, '..', '..'), -+ os.path.join(asan_rt_lib_dst_dir, '..', '..'), -+ r'^.*blacklist\.txt$') -+ # Headers: -+ if sys.platform != 'win32': -+ CopyDirectoryContents( -+ os.path.join(COMPILER_RT_BUILD_DIR, 'include/sanitizer'), -+ os.path.join(LLVM_BUILD_DIR, 'lib/clang', VERSION, 'include/sanitizer')) -+ # Static and dynamic libraries: -+ CopyDirectoryContents(asan_rt_lib_src_dir, asan_rt_lib_dst_dir) -+ if sys.platform == 'darwin': -+ for dylib in glob.glob(os.path.join(asan_rt_lib_dst_dir, '*.dylib')): -+ # Fix LC_ID_DYLIB for the ASan dynamic libraries to be relative to -+ # @executable_path. -+ # TODO(glider): this is transitional. We'll need to fix the dylib -+ # name either in our build system, or in Clang. See also -+ # http://crbug.com/344836. -+ subprocess.call(['install_name_tool', '-id', -+ '@executable_path/' + os.path.basename(dylib), dylib]) - -- CopyFile(os.path.join(asan_rt_lib_src_dir, '..', '..', 'asan_blacklist.txt'), -- os.path.join(asan_rt_lib_dst_dir, '..', '..')) - - if sys.platform == 'win32': - # Make an extra copy of the sanitizer headers, to be put on the include path -@@ -640,22 +675,67 @@ - aux_sanitizer_include_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang', - VERSION, 'include_sanitizer', - 'sanitizer') -- if not os.path.exists(aux_sanitizer_include_dir): -- os.makedirs(aux_sanitizer_include_dir) -+ EnsureDirExists(aux_sanitizer_include_dir) - for _, _, files in os.walk(sanitizer_include_dir): - for f in files: - CopyFile(os.path.join(sanitizer_include_dir, f), - aux_sanitizer_include_dir) - -+ if args.with_android: -+ make_toolchain = os.path.join( -+ ANDROID_NDK_DIR, 'build', 'tools', 'make-standalone-toolchain.sh') -+ for target_arch in ['aarch64', 'arm', 'i686']: -+ # Make standalone Android toolchain for target_arch. -+ toolchain_dir = os.path.join( -+ LLVM_BUILD_DIR, 'android-toolchain-' + target_arch) -+ RunCommand([ -+ make_toolchain, -+ '--platform=android-' + ('21' if target_arch == 'aarch64' else '19'), -+ '--install-dir="%s"' % toolchain_dir, -+ '--system=linux-x86_64', -+ '--stl=stlport', -+ '--toolchain=' + { -+ 'aarch64': 'aarch64-linux-android-4.9', -+ 'arm': 'arm-linux-androideabi-4.9', -+ 'i686': 'x86-4.9', -+ }[target_arch]]) -+ # Android NDK r9d copies a broken unwind.h into the toolchain, see -+ # http://crbug.com/357890 -+ for f in glob.glob(os.path.join(toolchain_dir, 'include/c++/*/unwind.h')): -+ os.remove(f) -+ -+ # Build ASan runtime for Android in a separate build tree. -+ build_dir = os.path.join(LLVM_BUILD_DIR, 'android-' + target_arch) -+ if not os.path.exists(build_dir): -+ os.mkdir(os.path.join(build_dir)) -+ os.chdir(build_dir) -+ cflags = ['--target=%s-linux-androideabi' % target_arch, -+ '--sysroot=%s/sysroot' % toolchain_dir, -+ '-B%s' % toolchain_dir] -+ android_args = base_cmake_args + [ -+ '-DCMAKE_C_COMPILER=' + os.path.join(LLVM_BUILD_DIR, 'bin/clang'), -+ '-DCMAKE_CXX_COMPILER=' + os.path.join(LLVM_BUILD_DIR, 'bin/clang++'), -+ '-DLLVM_CONFIG_PATH=' + os.path.join(LLVM_BUILD_DIR, 'bin/llvm-config'), -+ '-DCMAKE_C_FLAGS=' + ' '.join(cflags), -+ '-DCMAKE_CXX_FLAGS=' + ' '.join(cflags), -+ '-DANDROID=1'] -+ RmCmakeCache('.') -+ RunCommand(['cmake'] + android_args + [COMPILER_RT_DIR]) -+ RunCommand(['ninja', 'libclang_rt.asan-%s-android.so' % target_arch]) -+ -+ # And copy it into the main build tree. -+ runtime = 'libclang_rt.asan-%s-android.so' % target_arch -+ for root, _, files in os.walk(build_dir): -+ if runtime in files: -+ shutil.copy(os.path.join(root, runtime), asan_rt_lib_dst_dir) -+ - # Run tests. - if args.run_tests or use_head_revision: - os.chdir(LLVM_BUILD_DIR) -- RunCommand(GetVSVersion().SetupScript('x64') + -- ['&&', 'ninja', 'cr-check-all']) -+ RunCommand(['ninja', 'cr-check-all'], msvc_arch='x64') - if args.run_tests: - os.chdir(LLVM_BUILD_DIR) -- RunCommand(GetVSVersion().SetupScript('x64') + -- ['&&', 'ninja', 'check-all']) -+ RunCommand(['ninja', 'check-all'], msvc_arch='x64') - - WriteStampFile(PACKAGE_VERSION) - print 'Clang update was successful.' -@@ -663,31 +743,6 @@ - - - def main(): -- if not sys.platform in ['win32', 'cygwin']: -- # For non-Windows, fall back to update.sh. -- # TODO(hans): Make update.py replace update.sh completely. -- -- # This script is called by gclient. gclient opens its hooks subprocesses -- # with (stdout=subprocess.PIPE, stderr=subprocess.STDOUT) and then does -- # custom output processing that breaks printing '\r' characters for -- # single-line updating status messages as printed by curl and wget. -- # Work around this by setting stderr of the update.sh process to stdin (!): -- # gclient doesn't redirect stdin, and while stdin itself is read-only, a -- # dup()ed sys.stdin is writable, try -- # fd2 = os.dup(sys.stdin.fileno()); os.write(fd2, 'hi') -- # TODO: Fix gclient instead, http://crbug.com/95350 -- if '--no-stdin-hack' in sys.argv: -- sys.argv.remove('--no-stdin-hack') -- stderr = None -- else: -- try: -- stderr = os.fdopen(os.dup(sys.stdin.fileno())) -- except: -- stderr = sys.stderr -- return subprocess.call( -- [os.path.join(os.path.dirname(__file__), 'update.sh')] + sys.argv[1:], -- stderr=stderr) -- - parser = argparse.ArgumentParser(description='Build Clang.') - parser.add_argument('--bootstrap', action='store_true', - help='first build clang with CC, then with itself.') -@@ -695,26 +750,24 @@ - help="run only if the script thinks clang is needed") - parser.add_argument('--force-local-build', action='store_true', - help="don't try to download prebuild binaries") -+ parser.add_argument('--gcc-toolchain', help='set the version for which gcc ' -+ 'version be used for building; --gcc-toolchain=/opt/foo ' -+ 'picks /opt/foo/bin/gcc') - parser.add_argument('--print-revision', action='store_true', - help='print current clang revision and exit.') -+ parser.add_argument('--print-clang-version', action='store_true', -+ help='print current clang version (e.g. x.y.z) and exit.') - parser.add_argument('--run-tests', action='store_true', - help='run tests after building; only for local builds') - parser.add_argument('--tools', nargs='*', - help='select which chrome tools to build', - default=['plugins', 'blink_gc_plugin']) -- parser.add_argument('--without-patches', action='store_false', -- help="don't apply patches (default)", dest='with_patches', -- default=True) -- -- # For now, these flags are only used for the non-Windows flow, but argparser -- # gets mad if it sees a flag it doesn't recognize. -- parser.add_argument('--no-stdin-hack', action='store_true') -- -+ parser.add_argument('--without-android', action='store_false', -+ help='don\'t build Android ASan runtime (linux only)', -+ dest='with_android', -+ default=sys.platform.startswith('linux')) - args = parser.parse_args() - -- if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): -- print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' -- return 0 - if args.if_needed: - is_clang_required = False - # clang is always used on Mac and Linux. -@@ -730,8 +783,16 @@ - is_clang_required = True - if not is_clang_required: - return 0 -+ if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): -+ print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' -+ return 0 -+ -+ if use_head_revision: -+ # TODO(hans): Remove after the next roll. -+ global VERSION -+ VERSION = '3.9.0' - -- global LLVM_WIN_REVISION, PACKAGE_VERSION -+ global CLANG_REVISION, PACKAGE_VERSION - if args.print_revision: - if use_head_revision: - print GetSvnRevision(LLVM_DIR) -@@ -739,6 +800,10 @@ - print PACKAGE_VERSION - return 0 - -+ if args.print_clang_version: -+ sys.stdout.write(VERSION) -+ return 0 -+ - # Don't buffer stdout, so that print statements are immediately flushed. - # Do this only after --print-revision has been handled, else we'll get - # an error message when this script is run from gn for some reason. -@@ -747,12 +812,13 @@ - if use_head_revision: - # Use a real revision number rather than HEAD to make sure that the stamp - # file logic works. -- LLVM_WIN_REVISION = GetSvnRevision(LLVM_REPO_URL) -- PACKAGE_VERSION = LLVM_WIN_REVISION + '-0' -+ CLANG_REVISION = GetSvnRevision(LLVM_REPO_URL) -+ PACKAGE_VERSION = CLANG_REVISION + '-0' - - args.force_local_build = True -- # Skip local patches when using HEAD: they probably don't apply anymore. -- args.with_patches = False -+ if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): -+ # Only build the Android ASan rt on ToT bots when targetting Android. -+ args.with_android = False - - return UpdateClang(args) - diff --git a/pkgs/development/libraries/qt-5/5.6/qtwebengine/qtwebengine-paxmark-mksnapshot.patch b/pkgs/development/libraries/qt-5/5.6/qtwebengine/qtwebengine-paxmark-mksnapshot.patch deleted file mode 100644 index b3316188f7d..00000000000 --- a/pkgs/development/libraries/qt-5/5.6/qtwebengine/qtwebengine-paxmark-mksnapshot.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- qtwebengine-opensource-src-5.6.0-orig/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-03-04 01:48:36.000000000 +1100 -+++ qtwebengine-opensource-src-5.6.0/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-05-01 19:15:44.052770543 +1000 -@@ -33,6 +33,7 @@ - 'embed_script%': "", - 'v8_extra_library_files%': [], - 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)', -+ 'mksnapshot_u_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot_u<(EXECUTABLE_SUFFIX)', - 'remove_v8base_debug_symbols%': 0, - }, - 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'], -@@ -1913,7 +1914,7 @@ - ] - }, - { -- 'target_name': 'mksnapshot', -+ 'target_name': 'mksnapshot_u', - 'type': 'executable', - 'dependencies': ['v8_base', 'v8_nosnapshot', 'v8_libplatform'], - 'include_dirs+': [ -@@ -1936,5 +1937,26 @@ - }], - ], - }, -+ { -+ 'target_name': 'mksnapshot', -+ 'type': 'executable', -+ 'dependencies': ['mksnapshot_u'], -+ 'actions': [ -+ { -+ 'action_name': 'paxmark_m_mksnapshot', -+ 'inputs': [ -+ '<(mksnapshot_u_exec)', -+ ], -+ 'outputs': [ -+ '<(mksnapshot_exec)', -+ ], -+ 'action': [ -+ 'sh', -+ '-c', -+ 'cp <(mksnapshot_u_exec) <(mksnapshot_exec) && paxctl -czexm <(mksnapshot_exec)', -+ ], -+ }, -+ ], -+ }, - ], - } diff --git a/pkgs/development/libraries/qt-5/5.6/qtwebkit.patch b/pkgs/development/libraries/qt-5/5.6/qtwebkit.patch new file mode 100644 index 00000000000..310d2745825 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.6/qtwebkit.patch @@ -0,0 +1,77 @@ +diff --git a/Source/WTF/WTF.pri b/Source/WTF/WTF.pri +index 1f4866d66..bb61e4ba3 100644 +--- a/Source/WTF/WTF.pri ++++ b/Source/WTF/WTF.pri +@@ -12,7 +12,7 @@ mac { + # Mac OS does ship libicu but not the associated header files. + # Therefore WebKit provides adequate header files. + INCLUDEPATH = $${ROOT_WEBKIT_DIR}/Source/WTF/icu $$INCLUDEPATH +- LIBS += -licucore ++ LIBS += /usr/lib/libicucore.dylib + } else:!use?(wchar_unicode): { + win32 { + CONFIG(static, static|shared) { +diff --git a/Source/WebCore/plugins/qt/PluginPackageQt.cpp b/Source/WebCore/plugins/qt/PluginPackageQt.cpp +index a923d49aa..46772a4bb 100644 +--- a/Source/WebCore/plugins/qt/PluginPackageQt.cpp ++++ b/Source/WebCore/plugins/qt/PluginPackageQt.cpp +@@ -136,7 +136,11 @@ static void initializeGtk(QLibrary* module = 0) + } + } + ++#ifdef NIXPKGS_LIBGTK2 ++ QLibrary library(QLatin1String(NIXPKGS_LIBGTK2), 0); ++#else + QLibrary library(QLatin1String("libgtk-x11-2.0"), 0); ++#endif + if (library.load()) { + typedef void *(*gtk_init_check_ptr)(int*, char***); + gtk_init_check_ptr gtkInitCheck = (gtk_init_check_ptr)library.resolve("gtk_init_check"); +diff --git a/Source/WebCore/plugins/qt/PluginViewQt.cpp b/Source/WebCore/plugins/qt/PluginViewQt.cpp +index de06a2fea..86fe39ef1 100644 +--- a/Source/WebCore/plugins/qt/PluginViewQt.cpp ++++ b/Source/WebCore/plugins/qt/PluginViewQt.cpp +@@ -697,7 +697,11 @@ static Display *getPluginDisplay() + // support gdk based plugins (like flash) that use a different X connection. + // The code below has the same effect as this one: + // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default()); ++#ifdef NIXPKGS_LIBGDK2 ++ QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0); ++#else + QLibrary library(QLatin1String("libgdk-x11-2.0"), 0); ++#endif + if (!library.load()) + return 0; + +diff --git a/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp b/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp +index 8de65216b..38f5c05e5 100644 +--- a/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp ++++ b/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp +@@ -53,7 +53,11 @@ static void messageHandler(QtMsgType type, const QMessageLogContext&, const QStr + + static bool initializeGtk() + { ++#ifdef NIXPKGS_LIBGTK2 ++ QLibrary gtkLibrary(QLatin1String(NIXPKGS_LIBGTK2), 0); ++#else + QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"), 0); ++#endif + if (!gtkLibrary.load()) + return false; + typedef void* (*gtk_init_ptr)(void*, void*); +diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp +index d734ff684..0f6ff63d1 100644 +--- a/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp ++++ b/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp +@@ -64,7 +64,11 @@ static Display* getPluginDisplay() + // The code below has the same effect as this one: + // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default()); + ++#ifdef NIXPKGS_LIBGDK2 ++ QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0); ++#else + QLibrary library(QLatin1String("libgdk-x11-2.0"), 0); ++#endif + if (!library.load()) + return 0; + diff --git a/pkgs/development/libraries/qt-5/5.9/default.nix b/pkgs/development/libraries/qt-5/5.9/default.nix index 8f9be38fc88..879f7f198c9 100644 --- a/pkgs/development/libraries/qt-5/5.9/default.nix +++ b/pkgs/development/libraries/qt-5/5.9/default.nix @@ -36,96 +36,68 @@ let mirror = "http://download.qt.io"; srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; }; - mkDerivation = args: - stdenv.mkDerivation (args // { - - qmakeFlags = - (args.qmakeFlags or []) - ++ optional (debug != null) - (if debug then "CONFIG+=debug" else "CONFIG+=release"); - - cmakeFlags = - (args.cmakeFlags or []) - ++ [ "-DBUILD_TESTING=OFF" ] - ++ optional (debug != null) - (if debug then "-DCMAKE_BUILD_TYPE=Debug" - else "-DCMAKE_BUILD_TYPE=Release"); - - enableParallelBuilding = args.enableParallelBuilding or true; - - }); - - qtSubmodule = args: - let - inherit (args) name; - version = args.version or srcs."${name}".version; - src = args.src or srcs."${name}".src; - in mkDerivation (args // { - name = "${name}-${version}"; - inherit src; - - propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []); - nativeBuildInputs = - (args.nativeBuildInputs or []) - ++ [ perl self.qmake ]; - - NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true; - - outputs = args.outputs or [ "out" "dev" ]; - setOutputFlags = args.setOutputFlags or false; - - setupHook = ../qtsubmodule-setup-hook.sh; - - meta = { - homepage = http://www.qt.io; - description = "A cross-platform application framework for C++"; - license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ]; - maintainers = with maintainers; [ qknight ttuegel periklis ]; - platforms = platforms.unix; - } // (args.meta or {}); - }); + patches = { + qtbase = [ ./qtbase.patch ]; + qtdeclarative = [ ./qtdeclarative.patch ]; + qtscript = [ ./qtscript.patch ]; + qtserialport = [ ./qtserialport.patch ]; + qttools = [ ./qttools.patch ]; + qtwebengine = optional stdenv.needsPax ./qtwebengine-paxmark-mksnapshot.patch; + qtwebkit = [ ./qtwebkit.patch ]; + }; + + mkDerivation = + import ../mkDerivation.nix + { inherit stdenv; inherit (stdenv) lib; } + { inherit debug; }; + + qtModule = + import ../qtModule.nix + { inherit mkDerivation perl; inherit (stdenv) lib; } + { inherit self srcs patches; }; addPackages = self: with self; let - callPackage = self.newScope { inherit qtCompatVersion qtSubmodule srcs; }; + callPackage = self.newScope { inherit qtCompatVersion qtModule srcs; }; in { inherit mkDerivation; - qtbase = callPackage ./qtbase { + qtbase = callPackage ../modules/qtbase.nix { inherit (srcs.qtbase) src version; + patches = patches.qtbase; inherit bison cups harfbuzz mesa; - inherit dconf gtk3; + withGtk3 = true; inherit dconf gtk3; inherit developerBuild decryptSslTraffic; }; - qtcharts = callPackage ./qtcharts.nix {}; - qtconnectivity = callPackage ./qtconnectivity.nix {}; - qtdeclarative = callPackage ./qtdeclarative {}; - qtdoc = callPackage ./qtdoc.nix {}; - qtgraphicaleffects = callPackage ./qtgraphicaleffects.nix {}; - qtimageformats = callPackage ./qtimageformats.nix {}; - qtlocation = callPackage ./qtlocation.nix {}; - qtmacextras = callPackage ./qtmacextras.nix {}; - qtmultimedia = callPackage ./qtmultimedia.nix { + qtcharts = callPackage ../modules/qtcharts.nix {}; + qtconnectivity = callPackage ../modules/qtconnectivity.nix {}; + qtdeclarative = callPackage ../modules/qtdeclarative.nix {}; + qtdoc = callPackage ../modules/qtdoc.nix {}; + qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {}; + qtimageformats = callPackage ../modules/qtimageformats.nix {}; + qtlocation = callPackage ../modules/qtlocation.nix {}; + qtmacextras = callPackage ../modules/qtmacextras.nix {}; + qtmultimedia = callPackage ../modules/qtmultimedia.nix { inherit gstreamer gst-plugins-base; }; qtquick1 = null; - qtquickcontrols = callPackage ./qtquickcontrols.nix {}; - qtquickcontrols2 = callPackage ./qtquickcontrols2.nix {}; - qtscript = callPackage ./qtscript {}; - qtsensors = callPackage ./qtsensors.nix {}; - qtserialport = callPackage ./qtserialport {}; - qtsvg = callPackage ./qtsvg.nix {}; - qttools = callPackage ./qttools {}; - qttranslations = callPackage ./qttranslations.nix {}; - qtwayland = callPackage ./qtwayland.nix {}; - qtwebchannel = callPackage ./qtwebchannel.nix {}; - qtwebengine = callPackage ./qtwebengine {}; - qtwebkit = callPackage ./qtwebkit {}; - qtwebsockets = callPackage ./qtwebsockets.nix {}; - qtx11extras = callPackage ./qtx11extras.nix {}; - qtxmlpatterns = callPackage ./qtxmlpatterns.nix {}; + qtquickcontrols = callPackage ../modules/qtquickcontrols.nix {}; + qtquickcontrols2 = callPackage ../modules/qtquickcontrols2.nix {}; + qtscript = callPackage ../modules/qtscript.nix {}; + qtsensors = callPackage ../modules/qtsensors.nix {}; + qtserialport = callPackage ../modules/qtserialport.nix {}; + qtsvg = callPackage ../modules/qtsvg.nix {}; + qttools = callPackage ../modules/qttools.nix {}; + qttranslations = callPackage ../modules/qttranslations.nix {}; + qtwayland = callPackage ../modules/qtwayland.nix {}; + qtwebchannel = callPackage ../modules/qtwebchannel.nix {}; + qtwebengine = callPackage ../modules/qtwebengine.nix {}; + qtwebkit = callPackage ../modules/qtwebkit.nix {}; + qtwebsockets = callPackage ../modules/qtwebsockets.nix {}; + qtx11extras = callPackage ../modules/qtx11extras.nix {}; + qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {}; env = callPackage ../qt-env.nix {}; full = env "qt-${qtbase.version}" ([ @@ -138,8 +110,12 @@ let qmake = makeSetupHook { deps = [ self.qtbase.dev ]; - substitutions = { inherit (stdenv) isDarwin; }; - } ../qmake-hook.sh; + substitutions = { + inherit (stdenv) isDarwin; + qtbase_dev = self.qtbase.dev; + fix_qt_builtin_paths = ../hooks/fix-qt-builtin-paths.sh; + }; + } ../hooks/qmake-hook.sh; }; self = makeScope newScope addPackages; diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase.patch b/pkgs/development/libraries/qt-5/5.9/qtbase.patch new file mode 100644 index 00000000000..4f6ed98ba29 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.9/qtbase.patch @@ -0,0 +1,1106 @@ +diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf +index 5208379f9a..92fe29a0ac 100644 +--- a/mkspecs/common/mac.conf ++++ b/mkspecs/common/mac.conf +@@ -23,7 +23,7 @@ QMAKE_INCDIR_OPENGL = \ + + QMAKE_FIX_RPATH = install_name_tool -id + +-QMAKE_LFLAGS_RPATH = -Wl,-rpath, ++QMAKE_LFLAGS_RPATH = + QMAKE_LFLAGS_GCSECTIONS = -Wl,-dead_strip + + QMAKE_LFLAGS_REL_RPATH = +diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf +index bb5083c925..da8e2cb386 100644 +--- a/mkspecs/features/create_cmake.prf ++++ b/mkspecs/features/create_cmake.prf +@@ -21,7 +21,7 @@ load(cmake_functions) + # at cmake time whether package has been found via a symlink, and correct + # that to an absolute path. This is only done for installations to + # the /usr or / prefix. +-CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$[QT_INSTALL_LIBS]) ++CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$NIX_OUTPUT_OUT/lib/) + contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_USR_MOVE_WORKAROUND = $$CMAKE_INSTALL_LIBS_DIR + + CMAKE_OUT_DIR = $$MODULE_BASE_OUTDIR/lib/cmake +@@ -47,47 +47,22 @@ split_incpath { + $$cmake_extra_source_includes.output + } + +-CMAKE_INCLUDE_DIR = $$cmakeRelativePath($$[QT_INSTALL_HEADERS], $$[QT_INSTALL_PREFIX]) +-contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") { +- CMAKE_INCLUDE_DIR = $$[QT_INSTALL_HEADERS]/ +- CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True +-} ++CMAKE_INCLUDE_DIR = $$NIX_OUTPUT_DEV/include/ ++CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True + + !exists($$first(QT.$${MODULE}_private.includes)): CMAKE_NO_PRIVATE_INCLUDES = true + +-CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX]) +-contains(CMAKE_LIB_DIR,"^\\.\\./.*") { +- CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]/ +- CMAKE_LIB_DIR_IS_ABSOLUTE = True +-} else { +- CMAKE_RELATIVE_INSTALL_LIBS_DIR = $$cmakeRelativePath($$[QT_INSTALL_PREFIX], $$[QT_INSTALL_LIBS]) +- # We need to go up another two levels because the CMake files are +- # installed in $${CMAKE_LIB_DIR}/cmake/Qt5$${CMAKE_MODULE_NAME} +- CMAKE_RELATIVE_INSTALL_DIR = "$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}../../" +-} ++CMAKE_LIB_DIR = $$NIX_OUTPUT_DEV/lib/ ++CMAKE_LIB_DIR_IS_ABSOLUTE = True + +-CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX]) +-contains(CMAKE_BIN_DIR, "^\\.\\./.*") { +- CMAKE_BIN_DIR = $$[QT_HOST_BINS]/ +- CMAKE_BIN_DIR_IS_ABSOLUTE = True +-} ++CMAKE_BIN_DIR = $$NIX_OUTPUT_BIN/bin/ ++CMAKE_BIN_DIR_IS_ABSOLUTE = True + +-CMAKE_PLUGIN_DIR = $$cmakeRelativePath($$[QT_INSTALL_PLUGINS], $$[QT_INSTALL_PREFIX]) +-contains(CMAKE_PLUGIN_DIR, "^\\.\\./.*") { +- CMAKE_PLUGIN_DIR = $$[QT_INSTALL_PLUGINS]/ +- CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True +-} ++CMAKE_PLUGIN_DIR = $$NIX_OUTPUT_PLUGIN/ ++CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True + +-win32:!static:!staticlib { +- CMAKE_DLL_DIR = $$cmakeRelativePath($$[QT_INSTALL_BINS], $$[QT_INSTALL_PREFIX]) +- contains(CMAKE_DLL_DIR, "^\\.\\./.*") { +- CMAKE_DLL_DIR = $$[QT_INSTALL_BINS]/ +- CMAKE_DLL_DIR_IS_ABSOLUTE = True +- } +-} else { +- CMAKE_DLL_DIR = $$CMAKE_LIB_DIR +- CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE +-} ++CMAKE_DLL_DIR = $$NIX_OUTPUT_DEV/lib/ ++CMAKE_DLL_DIR_IS_ABSOLUTE = True + + static|staticlib:CMAKE_STATIC_TYPE = true + +@@ -167,7 +142,7 @@ contains(CONFIG, plugin) { + cmake_target_file + + cmake_qt5_plugin_file.files = $$cmake_target_file.output +- cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME} ++ cmake_qt5_plugin_file.path = $$NIX_OUTPUT_OUT/lib/cmake/Qt5$${CMAKE_MODULE_NAME} + INSTALLS += cmake_qt5_plugin_file + + return() +@@ -314,7 +289,7 @@ exists($$cmake_macros_file.input) { + cmake_qt5_module_files.files += $$cmake_macros_file.output + } + +-cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME} ++cmake_qt5_module_files.path = $$NIX_OUTPUT_OUT/lib/cmake/Qt5$${CMAKE_MODULE_NAME} + + # We are generating cmake files. Most developers of Qt are not aware of cmake, + # so we require automatic tests to be available. The only module which should +diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +index 17da8b979e..d648ab4058 100644 +--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in ++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +@@ -9,30 +9,6 @@ if (CMAKE_VERSION VERSION_LESS 3.0.0) + endif() + !!ENDIF + +-!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND) +-!!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\") +-!!ELSE +-get_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH) +-# Use original install prefix when loaded through a +-# cross-prefix symbolic link such as /lib -> /usr/lib. +-get_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH) +-get_filename_component(_realOrig \"$$CMAKE_INSTALL_LIBS_DIR/cmake/Qt5$${CMAKE_MODULE_NAME}\" REALPATH) +-if(_realCurr STREQUAL _realOrig) +- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$CMAKE_INSTALL_LIBS_DIR/$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}\" ABSOLUTE) +-else() +- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE) +-endif() +-unset(_realOrig) +-unset(_realCurr) +-unset(_IMPORT_PREFIX) +-!!ENDIF +-!!ELIF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +-get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE) +-!!ELSE +-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\") +-!!ENDIF +- + !!IF !equals(TEMPLATE, aux) + # For backwards compatibility only. Use Qt5$${CMAKE_MODULE_NAME}_VERSION instead. + set(Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.VERSION)") +@@ -58,11 +34,7 @@ endmacro() + macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION) + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) + +-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") +-!!ELSE + set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\") +-!!ENDIF + _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) + set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES + \"INTERFACE_LINK_LIBRARIES\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\" +@@ -75,11 +47,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI + ) + + !!IF !isEmpty(CMAKE_WINDOWS_BUILD) +-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") +-!!ELSE + set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") +-!!ENDIF + _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_implib}) + if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\") + set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES +@@ -95,24 +63,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + !!IF !no_module_headers + !!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK) + set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework\" +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Headers\" ++ \"$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework\" ++ \"$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Headers\" + ) + !!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES) + set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\" +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\" +- ) +-!!ELSE +- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\") +-!!ENDIF +-!!ELSE +-!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE) +- set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\") +-!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES) +- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\" +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\" ++ \"$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\" ++ \"$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\" + ) + !!ELSE + set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\") +@@ -128,7 +85,6 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\") + !!ENDIF + !!ENDIF +-!!ENDIF + !!IF !isEmpty(CMAKE_ADD_SOURCE_INCLUDE_DIRS) + include(\"${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake\" OPTIONAL) + !!ENDIF +@@ -280,25 +236,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD) + !!IF isEmpty(CMAKE_DEBUG_TYPE) + !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) +-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) +-!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE + if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) +-!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE + _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" ) + !!ELSE // CMAKE_STATIC_WINDOWS_BUILD + if (EXISTS +-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" +-!!ELSE + \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" +-!!ENDIF + AND EXISTS +-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) +-!!ELSE + \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) +-!!ENDIF + _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) + !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD + endif() +@@ -317,25 +261,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD) + !!IF isEmpty(CMAKE_RELEASE_TYPE) + !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) +-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) +-!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE + if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) +-!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE + _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" ) + !!ELSE // CMAKE_STATIC_WINDOWS_BUILD + if (EXISTS +-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" +-!!ELSE + \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" +-!!ENDIF + AND EXISTS +-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) +-!!ELSE + \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) +-!!ENDIF + _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) + !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD + endif() +@@ -354,11 +286,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION) + set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) + +-!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") +-!!ELSE + set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") +-!!ENDIF + _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) + set_target_properties(Qt5::${Plugin} PROPERTIES + \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} +diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf +index 395ac34001..a0e5c68b7e 100644 +--- a/mkspecs/features/mac/default_post.prf ++++ b/mkspecs/features/mac/default_post.prf +@@ -24,165 +24,3 @@ qt { + } + } + } +- +-# Add the same default rpaths as Xcode does for new projects. +-# This is especially important for iOS/tvOS/watchOS where no other option is possible. +-!no_default_rpath { +- QMAKE_RPATHDIR += @executable_path/Frameworks +- equals(TEMPLATE, lib):!plugin:lib_bundle: QMAKE_RPATHDIR += @loader_path/Frameworks +-} +- +-# Don't pass -headerpad_max_install_names when using Bitcode. +-# In that case the linker emits a warning stating that the flag is ignored when +-# used with bitcode, for reasons that cannot be determined (rdar://problem/20748962). +-# Using this flag is also unnecessary in practice on UIKit platforms since they +-# are sandboxed, and only UIKit platforms support bitcode to begin with. +-!bitcode: QMAKE_LFLAGS += $$QMAKE_LFLAGS_HEADERPAD +- +-app_extension_api_only { +- QMAKE_CFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION +- QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION +- QMAKE_CXXFLAGS_PRECOMPILE += $$QMAKE_CFLAGS_APPLICATION_EXTENSION +- QMAKE_LFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION +-} +- +-macx-xcode { +- !isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) { +- debug_information_format.name = DEBUG_INFORMATION_FORMAT +- debug_information_format.value = $$QMAKE_XCODE_DEBUG_INFORMATION_FORMAT +- debug_information_format.build = debug +- QMAKE_MAC_XCODE_SETTINGS += debug_information_format +- } +- +- QMAKE_XCODE_ARCHS = +- +- arch_device.name = "ARCHS[sdk=$${device.sdk}*]" +- arch_device.value = $$QMAKE_APPLE_DEVICE_ARCHS +- QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS +- QMAKE_MAC_XCODE_SETTINGS += arch_device +- +- simulator { +- arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]" +- arch_simulator.value = $$QMAKE_APPLE_SIMULATOR_ARCHS +- QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS +- QMAKE_MAC_XCODE_SETTINGS += arch_simulator +- } +- +- only_active_arch.name = ONLY_ACTIVE_ARCH +- only_active_arch.value = YES +- only_active_arch.build = debug +- QMAKE_MAC_XCODE_SETTINGS += only_active_arch +-} else { +- device|!simulator: VALID_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS +- simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS +- VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS +- +- isEmpty(VALID_ARCHS): \ +- error("QMAKE_APPLE_DEVICE_ARCHS or QMAKE_APPLE_SIMULATOR_ARCHS must contain at least one architecture") +- +- single_arch: VALID_ARCHS = $$first(VALID_ARCHS) +- +- ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS)) +- ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ACTIVE_ARCHS), $(EXPORT_ACTIVE_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch)) +- +- QMAKE_EXTRA_VARIABLES += VALID_ARCHS ACTIVE_ARCHS ARCH_ARGS +- +- arch_flags = $(EXPORT_ARCH_ARGS) +- +- QMAKE_CFLAGS += $$arch_flags +- QMAKE_CXXFLAGS += $$arch_flags +- QMAKE_LFLAGS += $$arch_flags +- +- QMAKE_PCH_ARCHS = $$VALID_ARCHS +- +- macos: deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET +- ios: deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET +- tvos: deployment_target = $$QMAKE_TVOS_DEPLOYMENT_TARGET +- watchos: deployment_target = $$QMAKE_WATCHOS_DEPLOYMENT_TARGET +- +- # If we're doing a simulator and device build, device and simulator +- # architectures use different paths and flags for the sysroot and +- # deployment target switch, so we must multiplex them across multiple +- # architectures using -Xarch. Otherwise we fall back to the simple path. +- # This is not strictly necessary, but results in cleaner command lines +- # and makes it easier for people to override EXPORT_VALID_ARCHS to limit +- # individual rules to a different set of architecture(s) from the overall +- # build (such as machtest in QtCore). +- simulator:device { +- QMAKE_XARCH_CFLAGS = +- QMAKE_XARCH_LFLAGS = +- QMAKE_EXTRA_VARIABLES += QMAKE_XARCH_CFLAGS QMAKE_XARCH_LFLAGS +- +- for (arch, VALID_ARCHS) { +- contains(VALID_SIMULATOR_ARCHS, $$arch) { +- sdk = $$simulator.sdk +- version_identifier = $$simulator.deployment_identifier +- } else { +- sdk = $$device.sdk +- version_identifier = $$device.deployment_identifier +- } +- +- version_min_flags = \ +- -Xarch_$${arch} \ +- -m$${version_identifier}-version-min=$$deployment_target +- QMAKE_XARCH_CFLAGS_$${arch} = $$version_min_flags \ +- -Xarch_$${arch} \ +- -isysroot$$xcodeSDKInfo(Path, $$sdk) +- QMAKE_XARCH_LFLAGS_$${arch} = $$version_min_flags \ +- -Xarch_$${arch} \ +- -Wl,-syslibroot,$$xcodeSDKInfo(Path, $$sdk) +- +- QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch}) +- QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS_$${arch}) +- +- QMAKE_EXTRA_VARIABLES += \ +- QMAKE_XARCH_CFLAGS_$${arch} \ +- QMAKE_XARCH_LFLAGS_$${arch} +- } +- +- QMAKE_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) +- QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) +- QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS) +- } else { +- simulator: \ +- version_identifier = $$simulator.deployment_identifier +- else: \ +- version_identifier = $$device.deployment_identifier +- version_min_flag = -m$${version_identifier}-version-min=$$deployment_target +- QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag +- QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag +- QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK_PATH $$version_min_flag +- } +- +- # Enable precompiled headers for multiple architectures +- QMAKE_CFLAGS_USE_PRECOMPILE = +- for (arch, VALID_ARCHS) { +- icc_pch_style: \ +- use_flag = "-pch-use " +- else: \ +- use_flag = -include +- +- # Only use Xarch with multi-arch, as the option confuses ccache +- count(VALID_ARCHS, 1, greaterThan): \ +- QMAKE_CFLAGS_USE_PRECOMPILE += \ +- -Xarch_$${arch} +- +- QMAKE_CFLAGS_USE_PRECOMPILE += \ +- $${use_flag}${QMAKE_PCH_OUTPUT_$${arch}} +- } +- icc_pch_style { +- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -include ${QMAKE_PCH_INPUT} +- QMAKE_CFLAGS_USE_PRECOMPILE = +- } else { +- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE +- QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE +- QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE +- } +- +- QMAKE_PCH_OUTPUT_EXT = _${QMAKE_PCH_ARCH}$${QMAKE_PCH_OUTPUT_EXT} +-} +- +-cache(QMAKE_XCODE_DEVELOPER_PATH, stash) +-cache(QMAKE_XCODE_VERSION, stash) +- +-QMAKE_XCODE_LIBRARY_SUFFIX = $$qtPlatformTargetSuffix() +diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf +index e21e749ee9..3b01424e67 100644 +--- a/mkspecs/features/mac/default_pre.prf ++++ b/mkspecs/features/mac/default_pre.prf +@@ -1,51 +1,2 @@ + CONFIG = asset_catalogs rez $$CONFIG + load(default_pre) +- +-isEmpty(QMAKE_XCODE_DEVELOPER_PATH) { +- # Get path of Xcode's Developer directory +- QMAKE_XCODE_DEVELOPER_PATH = $$system("/usr/bin/xcode-select --print-path 2>/dev/null") +- isEmpty(QMAKE_XCODE_DEVELOPER_PATH): \ +- error("Xcode path is not set. Please use xcode-select to choose Xcode installation path.") +- +- # Make sure Xcode path is valid +- !exists($$QMAKE_XCODE_DEVELOPER_PATH): \ +- error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.") +- +- # Make sure Xcode is set up properly +- isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))): \ +- error("Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.") +-} +- +-isEmpty(QMAKE_XCODE_VERSION) { +- # Extract Xcode version using xcodebuild +- xcode_version = $$system("/usr/bin/xcodebuild -version") +- QMAKE_XCODE_VERSION = $$member(xcode_version, 1) +- isEmpty(QMAKE_XCODE_VERSION): error("Could not resolve Xcode version.") +- unset(xcode_version) +-} +- +-isEmpty(QMAKE_TARGET_BUNDLE_PREFIX) { +- QMAKE_XCODE_PREFERENCES_FILE = $$(HOME)/Library/Preferences/com.apple.dt.Xcode.plist +- exists($$QMAKE_XCODE_PREFERENCES_FILE): \ +- QMAKE_TARGET_BUNDLE_PREFIX = $$system("/usr/libexec/PlistBuddy -c 'print IDETemplateOptions:bundleIdentifierPrefix' $$QMAKE_XCODE_PREFERENCES_FILE 2>/dev/null") +- +- !isEmpty(_QMAKE_CACHE_):!isEmpty(QMAKE_TARGET_BUNDLE_PREFIX): \ +- cache(QMAKE_TARGET_BUNDLE_PREFIX) +-} +- +-QMAKE_ASSET_CATALOGS_APP_ICON = AppIcon +- +-# Make the default debug info format for static debug builds +-# DWARF instead of DWARF with dSYM. This cuts down build times +-# for application debug builds significantly, as Xcode doesn't +-# have to pull out all the DWARF info from the Qt static libs +-# and put it into a dSYM file. We don't need that dSYM file in +-# the first place, since the information is available in the +-# object files inside the archives (static libraries). +-macx-xcode:qtConfig(static): \ +- QMAKE_XCODE_DEBUG_INFORMATION_FORMAT = dwarf +- +-# This variable is used by the xcode_dynamic_library_suffix +-# feature, which allows Xcode to choose the Qt libraries to link to +-# at build time, depending on the current Xcode SDK and configuration. +-QMAKE_XCODE_LIBRARY_SUFFIX_SETTING = QT_LIBRARY_SUFFIX +diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf +index 68ab7e4053..e69de29bb2 100644 +--- a/mkspecs/features/mac/sdk.prf ++++ b/mkspecs/features/mac/sdk.prf +@@ -1,49 +0,0 @@ +- +-isEmpty(QMAKE_MAC_SDK): \ +- error("QMAKE_MAC_SDK must be set when using CONFIG += sdk.") +- +-contains(QMAKE_MAC_SDK, .*/.*): \ +- error("QMAKE_MAC_SDK can only contain short-form SDK names (eg. macosx, iphoneos)") +- +-defineReplace(xcodeSDKInfo) { +- info = $$1 +- sdk = $$2 +- isEmpty(sdk): \ +- sdk = $$QMAKE_MAC_SDK +- +- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}) { +- QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcodebuild -sdk $$sdk -version $$info 2>/dev/null") +- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}): error("Could not resolve SDK $$info for \'$$sdk\'") +- cache(QMAKE_MAC_SDK.$${sdk}.$${info}, set stash, QMAKE_MAC_SDK.$${sdk}.$${info}) +- } +- +- return($$eval(QMAKE_MAC_SDK.$${sdk}.$${info})) +-} +- +-QMAKE_MAC_SDK_PATH = $$xcodeSDKInfo(Path) +-QMAKE_MAC_SDK_PLATFORM_PATH = $$xcodeSDKInfo(PlatformPath) +-QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion) +- +-sysrootified = +-for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val +-QMAKE_INCDIR_OPENGL = $$sysrootified +- +-QMAKESPEC_NAME = $$basename(QMAKESPEC) +- +-# Resolve SDK version of various tools +-for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_ACTOOL)) { +- tool_variable = QMAKE_MAC_SDK.$${QMAKESPEC_NAME}.$${QMAKE_MAC_SDK}.$${tool} +- !isEmpty($$tool_variable) { +- $$tool = $$eval($$tool_variable) +- next() +- } +- +- value = $$eval($$tool) +- isEmpty(value): next() +- +- sysrooted = $$system("/usr/bin/xcrun -sdk $$QMAKE_MAC_SDK -find $$first(value) 2>/dev/null") +- isEmpty(sysrooted): next() +- +- $$tool = $$sysrooted $$member(value, 1, -1) +- cache($$tool_variable, set stash, $$tool) +-} +diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf +index 4db0040dc5..65d6da1f4d 100644 +--- a/mkspecs/features/qml_module.prf ++++ b/mkspecs/features/qml_module.prf +@@ -23,13 +23,8 @@ for(qmlf, AUX_QML_FILES): fq_aux_qml_files += $$absolute_path($$qmlf, $$_PRO_FIL + + load(qt_build_paths) + +-qml1_target { +- DESTDIR = $$MODULE_BASE_OUTDIR/imports/$$TARGETPATH +- instbase = $$[QT_INSTALL_IMPORTS] +-} else { +- DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH +- instbase = $$[QT_INSTALL_QML] +-} ++DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH ++instbase = $$NIX_OUTPUT_QML + + !qml1_target:static: CONFIG += builtin_resources + +diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf +index d49f4c49c1..097dcd7d39 100644 +--- a/mkspecs/features/qml_plugin.prf ++++ b/mkspecs/features/qml_plugin.prf +@@ -48,13 +48,8 @@ exists($$QMLTYPEFILE): AUX_QML_FILES += $$QMLTYPEFILE + + load(qt_build_paths) + +-qml1_target { +- DESTDIR = $$MODULE_BASE_OUTDIR/imports/$$TARGETPATH +- instbase = $$[QT_INSTALL_IMPORTS] +-} else { +- DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH +- instbase = $$[QT_INSTALL_QML] +-} ++DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH ++instbase = $$NIX_OUTPUT_QML + + target.path = $$instbase/$$TARGETPATH + INSTALLS += target +diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf +index cb84ae0da8..45e16f4302 100644 +--- a/mkspecs/features/qt_app.prf ++++ b/mkspecs/features/qt_app.prf +@@ -29,7 +29,7 @@ host_build:force_bootstrap { + target.path = $$[QT_HOST_BINS] + } else { + !build_pass:qtConfig(debug_and_release): CONFIG += release +- target.path = $$[QT_INSTALL_BINS] ++ target.path = $$NIX_OUTPUT_BIN/bin + CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable + } + INSTALLS += target +diff --git a/mkspecs/features/qt_build_paths.prf b/mkspecs/features/qt_build_paths.prf +index 1848f00e90..2af93675c5 100644 +--- a/mkspecs/features/qt_build_paths.prf ++++ b/mkspecs/features/qt_build_paths.prf +@@ -23,6 +23,6 @@ exists($$MODULE_BASE_INDIR/.git): \ + !force_independent { + # If the module is not built independently, everything ends up in qtbase. + # This is the case in non-prefix builds, except for selected modules. +- MODULE_BASE_OUTDIR = $$[QT_HOST_PREFIX] +- MODULE_QMAKE_OUTDIR = $$[QT_HOST_PREFIX] ++ MODULE_BASE_OUTDIR = $$NIX_OUTPUT_OUT ++ MODULE_QMAKE_OUTDIR = $$NIX_OUTPUT_OUT + } +diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf +index 1e138730b3..b7ba74dc3f 100644 +--- a/mkspecs/features/qt_common.prf ++++ b/mkspecs/features/qt_common.prf +@@ -32,8 +32,8 @@ contains(TEMPLATE, .*lib) { + qqt_libdir = \$\$\$\$[QT_HOST_LIBS] + qt_libdir = $$[QT_HOST_LIBS] + } else { +- qqt_libdir = \$\$\$\$[QT_INSTALL_LIBS] +- qt_libdir = $$[QT_INSTALL_LIBS] ++ qqt_libdir = \$\$\$\$NIX_OUTPUT_OUT/lib ++ qt_libdir = $$NIX_OUTPUT_OUT/lib + } + contains(QMAKE_DEFAULT_LIBDIRS, $$qt_libdir) { + lib_replace.match = "[^ ']*$$rplbase/lib" +diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf +index 72dde61a40..f891a2baed 100644 +--- a/mkspecs/features/qt_docs.prf ++++ b/mkspecs/features/qt_docs.prf +@@ -45,7 +45,7 @@ QMAKE_DOCS_OUTPUTDIR = $$QMAKE_DOCS_BASE_OUTDIR/$$QMAKE_DOCS_TARGETDIR + + QDOC += -outputdir $$shell_quote($$QMAKE_DOCS_OUTPUTDIR) + !build_online_docs: \ +- QDOC += -installdir $$shell_quote($$[QT_INSTALL_DOCS]) ++ QDOC += -installdir $$shell_quote($$NIX_OUTPUT_DOC) + PREP_DOC_INDEXES = + DOC_INDEXES = + !isEmpty(QTREPOS) { +@@ -64,8 +64,8 @@ DOC_INDEXES = + DOC_INDEXES += -indexdir $$shell_quote($$qrep/doc) + } else { + prepare_docs: \ +- PREP_DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get]) +- DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get]) ++ PREP_DOC_INDEXES += -indexdir $$shell_quote($$NIX_OUTPUT_DOC) ++ DOC_INDEXES += -indexdir $$shell_quote($$NIX_OUTPUT_DOC) + } + + qtattributionsscanner.target = qtattributionsscanner +@@ -88,12 +88,12 @@ prepare_docs { + qch_docs.commands = $$QHELPGENERATOR $$shell_quote($$QMAKE_DOCS_OUTPUTDIR/$${QMAKE_DOCS_TARGET}.qhp) -o $$shell_quote($$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch) + + inst_html_docs.files = $$QMAKE_DOCS_OUTPUTDIR +- inst_html_docs.path = $$[QT_INSTALL_DOCS] ++ inst_html_docs.path = $$NIX_OUTPUT_DOC + inst_html_docs.CONFIG += no_check_exist directory no_default_install no_build + INSTALLS += inst_html_docs + + inst_qch_docs.files = $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch +- inst_qch_docs.path = $$[QT_INSTALL_DOCS] ++ inst_qch_docs.path = $$NIX_OUTPUT_DOC + inst_qch_docs.CONFIG += no_check_exist no_default_install no_build + INSTALLS += inst_qch_docs + +diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf +index 0a008374e5..5e7cd92f6f 100644 +--- a/mkspecs/features/qt_example_installs.prf ++++ b/mkspecs/features/qt_example_installs.prf +@@ -73,7 +73,7 @@ probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) + $$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \ + $$DBUS_ADAPTORS $$DBUS_INTERFACES + addInstallFiles(sources.files, $$sourcefiles) +- sources.path = $$[QT_INSTALL_EXAMPLES]/$$probase ++ sources.path = $$NIX_OUTPUT_DEV/share/examples/$$probase + INSTALLS += sources + + check_examples { +diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf +index c00fdb73f8..6d8ba132cb 100644 +--- a/mkspecs/features/qt_functions.prf ++++ b/mkspecs/features/qt_functions.prf +@@ -69,7 +69,7 @@ defineTest(qtHaveModule) { + defineTest(qtPrepareTool) { + cmd = $$eval(QT_TOOL.$${2}.binary) + isEmpty(cmd) { +- cmd = $$[QT_HOST_BINS]/$$2 ++ cmd = $$system("type -p $$2") + exists($${cmd}.pl) { + $${1}_EXE = $${cmd}.pl + cmd = perl -w $$system_path($${cmd}.pl) +diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf +index 0d3dfb6b93..5f935b4424 100644 +--- a/mkspecs/features/qt_installs.prf ++++ b/mkspecs/features/qt_installs.prf +@@ -12,16 +12,10 @@ + #library + !qt_no_install_library { + win32 { +- host_build: \ +- dlltarget.path = $$[QT_HOST_BINS] +- else: \ +- dlltarget.path = $$[QT_INSTALL_BINS] ++ dlltarget.path = $$NIX_OUTPUT_BIN/bin + INSTALLS += dlltarget + } +- host_build: \ +- target.path = $$[QT_HOST_LIBS] +- else: \ +- target.path = $$[QT_INSTALL_LIBS] ++ target.path = $$NIX_OUTPUT_OUT/lib + !static: target.CONFIG = no_dll + INSTALLS += target + } +@@ -29,33 +23,33 @@ + #headers + qt_install_headers { + class_headers.files = $$SYNCQT.HEADER_CLASSES +- class_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME ++ class_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME + INSTALLS += class_headers + + targ_headers.files = $$SYNCQT.HEADER_FILES +- targ_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME ++ targ_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME + INSTALLS += targ_headers + + private_headers.files = $$SYNCQT.PRIVATE_HEADER_FILES $$SYNCQT.INJECTED_PRIVATE_HEADER_FILES +- private_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private ++ private_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private + INSTALLS += private_headers + + qpa_headers.files = $$SYNCQT.QPA_HEADER_FILES +- qpa_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa ++ qpa_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa + INSTALLS += qpa_headers + } + + #module + qt_install_module { + !isEmpty(MODULE_PRI) { +- pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules ++ pritarget.path = $$NIX_OUTPUT_DEV/mkspecs/modules + pritarget.files = $$MODULE_PRI + INSTALLS += pritarget + } else: isEmpty(MODULE_PRIVATE_PRI) { + warning("Project $$basename(_PRO_FILE_) is a module, but has not defined MODULE_PRI, which is required for Qt to expose the module to other projects.") + } + !isEmpty(MODULE_PRIVATE_PRI) { +- privpritarget.path = $$[QT_HOST_DATA]/mkspecs/modules ++ privpritarget.path = $$NIX_OUTPUT_DEV/mkspecs/modules + privpritarget.files = $$MODULE_PRIVATE_PRI + INSTALLS += privpritarget + } +diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf +index 62e1b69fde..abd63123f9 100644 +--- a/mkspecs/features/qt_plugin.prf ++++ b/mkspecs/features/qt_plugin.prf +@@ -88,7 +88,7 @@ CONFIG(static, static|shared)|prefix_build { + } + } + +-target.path = $$[QT_INSTALL_PLUGINS]/$$PLUGIN_TYPE ++target.path = $$NIX_OUTPUT_PLUGIN/$$PLUGIN_TYPE + INSTALLS += target + + TARGET = $$qt5LibraryTarget($$TARGET) +diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in +index 545b9a3d1e..6ac0cdefe4 100644 +--- a/src/corelib/Qt5CoreConfigExtras.cmake.in ++++ b/src/corelib/Qt5CoreConfigExtras.cmake.in +@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::qmake) + add_executable(Qt5::qmake IMPORTED) + + !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") ++ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") + !!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") + !!ENDIF +@@ -18,7 +18,7 @@ if (NOT TARGET Qt5::moc) + add_executable(Qt5::moc IMPORTED) + + !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") ++ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") + !!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") + !!ENDIF +@@ -35,7 +35,7 @@ if (NOT TARGET Qt5::rcc) + add_executable(Qt5::rcc IMPORTED) + + !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") ++ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") + !!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") + !!ENDIF +@@ -133,7 +133,7 @@ if (NOT TARGET Qt5::WinMain) + !!IF !isEmpty(CMAKE_RELEASE_TYPE) + set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\") ++ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\") + !!ELSE + set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\") + !!ENDIF +@@ -147,7 +147,7 @@ if (NOT TARGET Qt5::WinMain) + set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) + + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\") ++ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\") + !!ELSE + set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\") + !!ENDIF +diff --git a/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in b/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in +index c357237d0e..6f0c75de3c 100644 +--- a/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in ++++ b/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in +@@ -1,6 +1,6 @@ + + !!IF isEmpty(CMAKE_HOST_DATA_DIR_IS_ABSOLUTE) +-set(_qt5_corelib_extra_includes \"${_qt5Core_install_prefix}/$${CMAKE_HOST_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\") ++set(_qt5_corelib_extra_includes \"$$NIX_OUTPUT_DEV/$${CMAKE_HOST_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\") + !!ELSE + set(_qt5_corelib_extra_includes \"$${CMAKE_HOST_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\") + !!ENDIF +diff --git a/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in b/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in +index 706304cf34..546420f6ad 100644 +--- a/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in ++++ b/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in +@@ -1,6 +1,6 @@ + + !!IF isEmpty(CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE) +-set(_qt5_corelib_extra_includes \"${_qt5Core_install_prefix}/$${CMAKE_INSTALL_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\") ++set(_qt5_corelib_extra_includes \"$$NIX_OUTPUT_DEV/$${CMAKE_INSTALL_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\") + !!ELSE + set(_qt5_corelib_extra_includes \"$${CMAKE_INSTALL_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\") + !!ENDIF +diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp +index 39e7c71a9c..dced1f2811 100644 +--- a/src/corelib/kernel/qcoreapplication.cpp ++++ b/src/corelib/kernel/qcoreapplication.cpp +@@ -2533,6 +2533,15 @@ QStringList QCoreApplication::libraryPaths() + QStringList *app_libpaths = new QStringList; + coreappdata()->app_libpaths.reset(app_libpaths); + ++ // Add library paths derived from PATH ++ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':'); ++ const QString plugindir = QStringLiteral("../" NIXPKGS_QT_PLUGIN_PREFIX); ++ for (const QString &path: paths) { ++ if (!path.isEmpty()) { ++ app_libpaths->append(QDir::cleanPath(path + QDir::separator() + plugindir)); ++ } ++ } ++ + const QByteArray libPathEnv = qgetenv("QT_PLUGIN_PATH"); + if (!libPathEnv.isEmpty()) { + QStringList paths = QFile::decodeName(libPathEnv).split(QDir::listSeparator(), QString::SkipEmptyParts); +diff --git a/src/corelib/tools/qtimezoneprivate_tz.cpp b/src/corelib/tools/qtimezoneprivate_tz.cpp +index 1714c9802f..fd2ebb1336 100644 +--- a/src/corelib/tools/qtimezoneprivate_tz.cpp ++++ b/src/corelib/tools/qtimezoneprivate_tz.cpp +@@ -70,7 +70,11 @@ typedef QHash QTzTimeZoneHash; + // Parse zone.tab table, assume lists all installed zones, if not will need to read directories + static QTzTimeZoneHash loadTzTimeZones() + { +- QString path = QStringLiteral("/usr/share/zoneinfo/zone.tab"); ++ // Try TZDIR first, in case we're running on NixOS. ++ QString path = QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/zone.tab"); ++ // Fallback to traditional paths in case we are not on NixOS. ++ if (!QFile::exists(path)) ++ path = QStringLiteral("/usr/share/zoneinfo/zone.tab"); + if (!QFile::exists(path)) + path = QStringLiteral("/usr/lib/zoneinfo/zone.tab"); + +@@ -643,12 +647,16 @@ void QTzTimeZonePrivate::init(const QByteArray &ianaId) + if (!tzif.open(QIODevice::ReadOnly)) + return; + } else { +- // Open named tz, try modern path first, if fails try legacy path +- tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId)); ++ // Try TZDIR first, in case we're running on NixOS ++ tzif.setFileName(QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/") + QString::fromLocal8Bit(ianaId)); + if (!tzif.open(QIODevice::ReadOnly)) { +- tzif.setFileName(QLatin1String("/usr/lib/zoneinfo/") + QString::fromLocal8Bit(ianaId)); +- if (!tzif.open(QIODevice::ReadOnly)) +- return; ++ // Open named tz, try modern path first, if fails try legacy path ++ tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId)); ++ if (!tzif.open(QIODevice::ReadOnly)) { ++ tzif.setFileName(QLatin1String("/usr/lib/zoneinfo/") + QString::fromLocal8Bit(ianaId)); ++ if (!tzif.open(QIODevice::ReadOnly)) ++ return; ++ } + } + } + +diff --git a/src/dbus/Qt5DBusConfigExtras.cmake.in b/src/dbus/Qt5DBusConfigExtras.cmake.in +index 1d947159e2..b36865fc48 100644 +--- a/src/dbus/Qt5DBusConfigExtras.cmake.in ++++ b/src/dbus/Qt5DBusConfigExtras.cmake.in +@@ -2,11 +2,7 @@ + if (NOT TARGET Qt5::qdbuscpp2xml) + add_executable(Qt5::qdbuscpp2xml IMPORTED) + +-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") +-!!ELSE +- set(imported_location \"$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") +-!!ENDIF ++ set(imported_location \"$$NIX_OUTPUT_DEV/bin/qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") + _qt5_DBus_check_file_exists(${imported_location}) + + set_target_properties(Qt5::qdbuscpp2xml PROPERTIES +@@ -17,11 +13,7 @@ endif() + if (NOT TARGET Qt5::qdbusxml2cpp) + add_executable(Qt5::qdbusxml2cpp IMPORTED) + +-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") +-!!ELSE +- set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") +-!!ENDIF ++ set(imported_location \"$$NIX_OUTPUT_DEV/bin/qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") + _qt5_DBus_check_file_exists(${imported_location}) + + set_target_properties(Qt5::qdbusxml2cpp PROPERTIES +diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in +index 07869efd7d..37b95d1b6b 100644 +--- a/src/gui/Qt5GuiConfigExtras.cmake.in ++++ b/src/gui/Qt5GuiConfigExtras.cmake.in +@@ -2,7 +2,7 @@ + !!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE) + + !!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE) +-set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR/QtANGLE\") ++set(Qt5Gui_EGL_INCLUDE_DIRS \"$$NIX_OUTPUT_DEV/$$CMAKE_INCLUDE_DIR/QtANGLE\") + !!ELSE + set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR/QtANGLE\") + !!ENDIF +@@ -17,13 +17,13 @@ macro(_populate_qt5gui_gl_target_properties TargetName Configuration LIB_LOCATIO + set_property(TARGET Qt5::${TargetName} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) + + !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Gui_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") ++ set(imported_location \"$$NIX_OUTPUT_OUT/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") + !!ELSE + set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\") + !!ENDIF + + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- set(imported_implib \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") ++ set(imported_implib \"$$NIX_OUTPUT_DEV/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") + !!ELSE + set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") + !!ENDIF +diff --git a/src/network/kernel/qdnslookup_unix.cpp b/src/network/kernel/qdnslookup_unix.cpp +index 1da00813ce..0bf877afcb 100644 +--- a/src/network/kernel/qdnslookup_unix.cpp ++++ b/src/network/kernel/qdnslookup_unix.cpp +@@ -92,7 +92,7 @@ static bool resolveLibraryInternal() + if (!lib.load()) + #endif + { +- lib.setFileName(QLatin1String("resolv")); ++ lib.setFileName(QLatin1String(NIXPKGS_LIBRESOLV)); + if (!lib.load()) + return false; + } +diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp +index cf08a15f96..2310488298 100644 +--- a/src/network/kernel/qhostinfo_unix.cpp ++++ b/src/network/kernel/qhostinfo_unix.cpp +@@ -102,7 +102,7 @@ static bool resolveLibraryInternal() + if (!lib.load()) + #endif + { +- lib.setFileName(QLatin1String("resolv")); ++ lib.setFileName(QLatin1String(NIXPKGS_LIBRESOLV)); + if (!lib.load()) + return false; + } +diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp +index c92d8fc3f8..6008063bcf 100644 +--- a/src/network/ssl/qsslcontext_openssl.cpp ++++ b/src/network/ssl/qsslcontext_openssl.cpp +@@ -351,7 +351,7 @@ init_context: + + const QVector qcurves = sslContext->sslConfiguration.ellipticCurves(); + if (!qcurves.isEmpty()) { +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC) ++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC) + // Set the curves to be used + if (q_SSLeay() >= 0x10002000L) { + // SSL_CTX_ctrl wants a non-const pointer as last argument, +@@ -364,7 +364,7 @@ init_context: + sslContext->errorCode = QSslError::UnspecifiedError; + } + } else +-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC) ++#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC) + { + // specific curves requested, but not possible to set -> error + sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("OpenSSL version too old, need at least v1.0.2")); +diff --git a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp +index ca9f7af127..a337ad73bf 100644 +--- a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp ++++ b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp +@@ -265,12 +265,9 @@ void TableGenerator::initPossibleLocations() + m_possibleLocations.reserve(7); + if (qEnvironmentVariableIsSet("QTCOMPOSE")) + m_possibleLocations.append(QString::fromLocal8Bit(qgetenv("QTCOMPOSE"))); +- m_possibleLocations.append(QStringLiteral("/usr/share/X11/locale")); +- m_possibleLocations.append(QStringLiteral("/usr/local/share/X11/locale")); +- m_possibleLocations.append(QStringLiteral("/usr/lib/X11/locale")); +- m_possibleLocations.append(QStringLiteral("/usr/local/lib/X11/locale")); + m_possibleLocations.append(QStringLiteral(X11_PREFIX "/share/X11/locale")); + m_possibleLocations.append(QStringLiteral(X11_PREFIX "/lib/X11/locale")); ++ m_possibleLocations.append(QLatin1String(NIXPKGS_QTCOMPOSE)); + } + + QString TableGenerator::findComposeFile() +diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp +index 7640a711a9..ef9a14d38b 100644 +--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp ++++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp +@@ -580,7 +580,14 @@ QFunctionPointer QGLXContext::getProcAddress(const char *procName) + #if QT_CONFIG(library) + extern const QString qt_gl_library_name(); + // QLibrary lib(qt_gl_library_name()); ++ // Check system library paths first + QLibrary lib(QLatin1String("GL")); ++#ifdef NIXPKGS_MESA_GL ++ if (!lib.load()) { ++ // Fallback to Mesa driver ++ lib.setFileName(QLatin1String(NIXPKGS_MESA_GL)); ++ } ++#endif // NIXPKGS_MESA_GL + glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB"); + #endif + } +diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp +index d257ab1242..75853af4e4 100644 +--- a/src/plugins/platforms/xcb/qxcbcursor.cpp ++++ b/src/plugins/platforms/xcb/qxcbcursor.cpp +@@ -311,10 +311,10 @@ QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen) + #if defined(XCB_USE_XLIB) && QT_CONFIG(library) + static bool function_ptrs_not_initialized = true; + if (function_ptrs_not_initialized) { +- QLibrary xcursorLib(QLatin1String("Xcursor"), 1); ++ QLibrary xcursorLib(QLatin1String(NIXPKGS_LIBXCURSOR), 1); + bool xcursorFound = xcursorLib.load(); + if (!xcursorFound) { // try without the version number +- xcursorLib.setFileName(QLatin1String("Xcursor")); ++ xcursorLib.setFileName(QLatin1String(NIXPKGS_LIBXCURSOR)); + xcursorFound = xcursorLib.load(); + } + if (xcursorFound) { +diff --git a/src/plugins/platformthemes/gtk3/main.cpp b/src/plugins/platformthemes/gtk3/main.cpp +index c4cd66c33b..b6f2691587 100644 +--- a/src/plugins/platformthemes/gtk3/main.cpp ++++ b/src/plugins/platformthemes/gtk3/main.cpp +@@ -39,6 +39,7 @@ + + #include + #include "qgtk3theme.h" ++#include + + QT_BEGIN_NAMESPACE + +@@ -54,8 +55,22 @@ public: + QPlatformTheme *QGtk3ThemePlugin::create(const QString &key, const QStringList ¶ms) + { + Q_UNUSED(params); +- if (!key.compare(QLatin1String(QGtk3Theme::name), Qt::CaseInsensitive)) ++ if (!key.compare(QLatin1String(QGtk3Theme::name), Qt::CaseInsensitive)) { ++ ++#ifdef NIXPKGS_QGTK3_XDG_DATA_DIRS ++ QStringList XDG_DATA_DIRS = QFile::decodeName(qgetenv("XDG_DATA_DIRS")).split(':'); ++ XDG_DATA_DIRS << QLatin1String(NIXPKGS_QGTK3_XDG_DATA_DIRS); ++ qputenv("XDG_DATA_DIRS", QFile::encodeName(XDG_DATA_DIRS.join(':'))); ++#endif ++ ++#ifdef NIXPKGS_QGTK3_GIO_EXTRA_MODULES ++ QStringList GIO_EXTRA_MODULES = QFile::decodeName(qgetenv("GIO_EXTRA_MODULES")).split(':'); ++ GIO_EXTRA_MODULES << QLatin1String(NIXPKGS_QGTK3_GIO_EXTRA_MODULES); ++ qputenv("GIO_EXTRA_MODULES", QFile::encodeName(GIO_EXTRA_MODULES.join(':'))); ++#endif ++ + return new QGtk3Theme; ++ } + + return 0; + } +diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in +index 99d87e2e46..a4eab2aa72 100644 +--- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in ++++ b/src/widgets/Qt5WidgetsConfigExtras.cmake.in +@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::uic) + add_executable(Qt5::uic IMPORTED) + + !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") ++ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") + !!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") + !!ENDIF diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase/cmake-paths.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/cmake-paths.patch deleted file mode 100644 index 9616f5812cf..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtbase/cmake-paths.patch +++ /dev/null @@ -1,359 +0,0 @@ -Index: qtbase-opensource-src-5.9.0/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in -=================================================================== ---- qtbase-opensource-src-5.9.0.orig/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in -+++ qtbase-opensource-src-5.9.0/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in -@@ -9,30 +9,6 @@ if (CMAKE_VERSION VERSION_LESS 3.0.0) - endif() - !!ENDIF - --!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND) --!!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) --set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\") --!!ELSE --get_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH) --# Use original install prefix when loaded through a --# cross-prefix symbolic link such as /lib -> /usr/lib. --get_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH) --get_filename_component(_realOrig \"$$CMAKE_INSTALL_LIBS_DIR/cmake/Qt5$${CMAKE_MODULE_NAME}\" REALPATH) --if(_realCurr STREQUAL _realOrig) -- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$CMAKE_INSTALL_LIBS_DIR/$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}\" ABSOLUTE) --else() -- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE) --endif() --unset(_realOrig) --unset(_realCurr) --unset(_IMPORT_PREFIX) --!!ENDIF --!!ELIF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) --get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE) --!!ELSE --set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\") --!!ENDIF -- - !!IF !equals(TEMPLATE, aux) - # For backwards compatibility only. Use Qt5$${CMAKE_MODULE_NAME}_VERSION instead. - set(Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.MAJOR_VERSION).$$eval(QT.$${MODULE}.MINOR_VERSION).$$eval(QT.$${MODULE}.PATCH_VERSION)") -@@ -59,7 +35,10 @@ macro(_populate_$${CMAKE_MODULE_NAME}_ta - set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) - - !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) -- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") -+ set(imported_location \"@NIX_OUT@/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") -+ if(NOT EXISTS \"${imported_location}\") -+ set(imported_location \"@NIX_DEV@/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") -+ endif() - !!ELSE - set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\") - !!ENDIF -@@ -74,19 +53,6 @@ macro(_populate_$${CMAKE_MODULE_NAME}_ta - \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\" - ) - --!!IF !isEmpty(CMAKE_WINDOWS_BUILD) --!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) -- set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") --!!ELSE -- set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") --!!ENDIF -- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_implib}) -- if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\") -- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES -- \"IMPORTED_IMPLIB_${Configuration}\" ${imported_implib} -- ) -- endif() --!!ENDIF - endmacro() - !!ENDIF - -@@ -95,24 +61,24 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME - !!IF !no_module_headers - !!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK) - set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS -- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework\" -- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Headers\" -+ \"@NIX_OUT@/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework\" -+ \"@NIX_OUT@/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Headers\" - ) - !!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES) - set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS -- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\" -- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\" -+ \"@NIX_OUT@/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\" -+ \"@NIX_OUT@/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\" - ) - !!ELSE - set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\") - !!ENDIF - !!ELSE - !!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE) -- set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\") -+ set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"@NIX_DEV@/$$CMAKE_INCLUDE_DIR\" \"@NIX_DEV@/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\") - !!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES) - set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS -- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\" -- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\" -+ \"@NIX_DEV@/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\" -+ \"@NIX_DEV@/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\" - ) - !!ELSE - set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\") -@@ -281,7 +247,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME - !!IF isEmpty(CMAKE_DEBUG_TYPE) - !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) - !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) -- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) -+ if (EXISTS \"@NIX_OUT@/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) - !!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE - if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) - !!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE -@@ -289,13 +255,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME - !!ELSE // CMAKE_STATIC_WINDOWS_BUILD - if (EXISTS - !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) -- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" -+ \"@NIX_OUT@/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" - !!ELSE - \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" - !!ENDIF - AND EXISTS - !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) -- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) -+ \"@NIX_DEV@/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) - !!ELSE - \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) - !!ENDIF -@@ -318,7 +284,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME - !!IF isEmpty(CMAKE_RELEASE_TYPE) - !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) - !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) -- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) -+ if (EXISTS \"@NIX_DEV@/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) - !!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE - if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) - !!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE -@@ -326,13 +292,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME - !!ELSE // CMAKE_STATIC_WINDOWS_BUILD - if (EXISTS - !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) -- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" -+ \"@NIX_OUT@/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" - !!ELSE - \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" - !!ENDIF - AND EXISTS - !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) -- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) -+ \"@NIX_DEV@/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) - !!ELSE - \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) - !!ENDIF -@@ -354,11 +320,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME - macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION) - set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) - --!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) -- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") --!!ELSE -- set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") --!!ENDIF -+ set(imported_location \"${PLUGIN_LOCATION}\") - _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) - set_target_properties(Qt5::${Plugin} PROPERTIES - \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} -Index: qtbase-opensource-src-5.9.0/src/gui/Qt5GuiConfigExtras.cmake.in -=================================================================== ---- qtbase-opensource-src-5.9.0.orig/src/gui/Qt5GuiConfigExtras.cmake.in -+++ qtbase-opensource-src-5.9.0/src/gui/Qt5GuiConfigExtras.cmake.in -@@ -2,7 +2,7 @@ - !!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE) - - !!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE) --set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR/QtANGLE\") -+set(Qt5Gui_EGL_INCLUDE_DIRS \"@NIX_DEV@/$$CMAKE_INCLUDE_DIR/QtANGLE\") - !!ELSE - set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR/QtANGLE\") - !!ENDIF -@@ -17,13 +17,13 @@ macro(_populate_qt5gui_gl_target_propert - set_property(TARGET Qt5::${TargetName} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) - - !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) -- set(imported_location \"${_qt5Gui_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") -+ set(imported_location \"@NIX_OUT@/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") - !!ELSE - set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\") - !!ENDIF - - !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) -- set(imported_implib \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") -+ set(imported_implib \"@NIX_DEV@/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") - !!ELSE - set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") - !!ENDIF -Index: qtbase-opensource-src-5.9.0/src/widgets/Qt5WidgetsConfigExtras.cmake.in -=================================================================== ---- qtbase-opensource-src-5.9.0.orig/src/widgets/Qt5WidgetsConfigExtras.cmake.in -+++ qtbase-opensource-src-5.9.0/src/widgets/Qt5WidgetsConfigExtras.cmake.in -@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::uic) - add_executable(Qt5::uic IMPORTED) - - !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) -- set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") -+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") - !!ELSE - set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") - !!ENDIF -Index: qtbase-opensource-src-5.9.0/src/corelib/Qt5CoreConfigExtras.cmake.in -=================================================================== ---- qtbase-opensource-src-5.9.0.orig/src/corelib/Qt5CoreConfigExtras.cmake.in -+++ qtbase-opensource-src-5.9.0/src/corelib/Qt5CoreConfigExtras.cmake.in -@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::qmake) - add_executable(Qt5::qmake IMPORTED) - - !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) -- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") -+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") - !!ELSE - set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") - !!ENDIF -@@ -18,7 +18,7 @@ if (NOT TARGET Qt5::moc) - add_executable(Qt5::moc IMPORTED) - - !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) -- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") -+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") - !!ELSE - set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") - !!ENDIF -@@ -35,7 +35,7 @@ if (NOT TARGET Qt5::rcc) - add_executable(Qt5::rcc IMPORTED) - - !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) -- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") -+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") - !!ELSE - set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") - !!ENDIF -@@ -133,7 +133,7 @@ if (NOT TARGET Qt5::WinMain) - !!IF !isEmpty(CMAKE_RELEASE_TYPE) - set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) - !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) -- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\") -+ set(imported_location \"@NIX_DEV@/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\") - !!ELSE - set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\") - !!ENDIF -@@ -147,7 +147,7 @@ if (NOT TARGET Qt5::WinMain) - set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) - - !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) -- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\") -+ set(imported_location \"@NIX_DEV@/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\") - !!ELSE - set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\") - !!ENDIF -Index: qtbase-opensource-src-5.9.0/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in -=================================================================== ---- qtbase-opensource-src-5.9.0.orig/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in -+++ qtbase-opensource-src-5.9.0/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in -@@ -1,6 +1,6 @@ - - !!IF isEmpty(CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE) --set(_qt5_corelib_extra_includes \"${_qt5Core_install_prefix}/$${CMAKE_INSTALL_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\") -+set(_qt5_corelib_extra_includes \"@NIX_DEV@/$${CMAKE_INSTALL_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\") - !!ELSE - set(_qt5_corelib_extra_includes \"$${CMAKE_INSTALL_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\") - !!ENDIF -Index: qtbase-opensource-src-5.9.0/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in -=================================================================== ---- qtbase-opensource-src-5.9.0.orig/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in -+++ qtbase-opensource-src-5.9.0/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in -@@ -1,6 +1,6 @@ - - !!IF isEmpty(CMAKE_HOST_DATA_DIR_IS_ABSOLUTE) --set(_qt5_corelib_extra_includes \"${_qt5Core_install_prefix}/$${CMAKE_HOST_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\") -+set(_qt5_corelib_extra_includes \"@NIX_DEV@/$${CMAKE_HOST_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\") - !!ELSE - set(_qt5_corelib_extra_includes \"$${CMAKE_HOST_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\") - !!ENDIF -Index: qtbase-opensource-src-5.9.0/src/dbus/Qt5DBusConfigExtras.cmake.in -=================================================================== ---- qtbase-opensource-src-5.9.0.orig/src/dbus/Qt5DBusConfigExtras.cmake.in -+++ qtbase-opensource-src-5.9.0/src/dbus/Qt5DBusConfigExtras.cmake.in -@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::qdbuscpp2xml) - add_executable(Qt5::qdbuscpp2xml IMPORTED) - - !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) -- set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") -+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") - !!ELSE - set(imported_location \"$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") - !!ENDIF -@@ -18,7 +18,7 @@ if (NOT TARGET Qt5::qdbusxml2cpp) - add_executable(Qt5::qdbusxml2cpp IMPORTED) - - !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) -- set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") -+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") - !!ELSE - set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") - !!ENDIF -Index: qtbase-opensource-src-5.9.0/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in -=================================================================== ---- qtbase-opensource-src-5.9.0.orig/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in -+++ qtbase-opensource-src-5.9.0/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in -@@ -2,10 +2,10 @@ - add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED) - - !!IF !isEmpty(CMAKE_RELEASE_TYPE) --_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\") -+_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"@NIX_BIN@/$${CMAKE_PLUGIN_LOCATION_RELEASE}\") - !!ENDIF - !!IF !isEmpty(CMAKE_DEBUG_TYPE) --_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\") -+_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"@NIX_BIN@/$${CMAKE_PLUGIN_LOCATION_DEBUG}\") - !!ENDIF - - list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME) -Index: qtbase-opensource-src-5.9.0/mkspecs/features/create_cmake.prf -=================================================================== ---- qtbase-opensource-src-5.9.0.orig/mkspecs/features/create_cmake.prf -+++ qtbase-opensource-src-5.9.0/mkspecs/features/create_cmake.prf -@@ -136,28 +136,28 @@ contains(CONFIG, plugin) { - - win32 { - isEmpty(CMAKE_STATIC_TYPE) { -- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.dll -- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.dll -+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}.dll -+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}d.dll - } else:mingw { -- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}.a -- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}d.a -+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}.a -+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}d.a - } else { # MSVC static -- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.lib -- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.lib -+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}.lib -+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}d.lib - } - } else { - mac { - isEmpty(CMAKE_STATIC_TYPE): CMAKE_PlUGIN_EXT = .dylib - else: CMAKE_PlUGIN_EXT = .a - -- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT} -- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT} -+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT} -+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT} - } else { - isEmpty(CMAKE_STATIC_TYPE): CMAKE_PlUGIN_EXT = .so - else: CMAKE_PlUGIN_EXT = .a - -- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT} -- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT} -+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT} -+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT} - } - } - cmake_target_file.input = $$PWD/data/cmake/Qt5PluginTarget.cmake.in diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase/compose-search-path.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/compose-search-path.patch deleted file mode 100644 index 720e7d81fa2..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtbase/compose-search-path.patch +++ /dev/null @@ -1,18 +0,0 @@ -Index: qtbase-opensource-src-5.9.0/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp -=================================================================== ---- qtbase-opensource-src-5.9.0.orig/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp -+++ qtbase-opensource-src-5.9.0/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp -@@ -265,12 +265,9 @@ void TableGenerator::initPossibleLocatio - m_possibleLocations.reserve(7); - if (qEnvironmentVariableIsSet("QTCOMPOSE")) - m_possibleLocations.append(QString::fromLocal8Bit(qgetenv("QTCOMPOSE"))); -- m_possibleLocations.append(QStringLiteral("/usr/share/X11/locale")); -- m_possibleLocations.append(QStringLiteral("/usr/local/share/X11/locale")); -- m_possibleLocations.append(QStringLiteral("/usr/lib/X11/locale")); -- m_possibleLocations.append(QStringLiteral("/usr/local/lib/X11/locale")); - m_possibleLocations.append(QStringLiteral(X11_PREFIX "/share/X11/locale")); - m_possibleLocations.append(QStringLiteral(X11_PREFIX "/lib/X11/locale")); -+ m_possibleLocations.append(QLatin1String(NIXPKGS_QTCOMPOSE)); - } - - QString TableGenerator::findComposeFile() diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase/darwin-cf.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/darwin-cf.patch deleted file mode 100644 index 3e6e0e5101a..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtbase/darwin-cf.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm -index 341d3bc..3368234 100644 ---- a/src/plugins/bearer/corewlan/qcorewlanengine.mm -+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm -@@ -287,7 +287,7 @@ void QScanThread::getUserConfigurations() - QMacAutoReleasePool pool; - userProfiles.clear(); - -- NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; -+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; - for (NSString *ifName in wifiInterfaces) { - - CWInterface *wifiInterface = [[CWWiFiClient sharedWiFiClient] interfaceWithName:ifName]; -@@ -602,7 +602,7 @@ void QCoreWlanEngine::doRequestUpdate() - - QMacAutoReleasePool pool; - -- NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; -+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; - for (NSString *ifName in wifiInterfaces) { - scanThread->interfaceName = QString::fromNSString(ifName); - scanThread->start(); - QString TableGenerator::findComposeFile() -diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm -index 59b7637..b91139d 100644 ---- a/src/plugins/platforms/cocoa/qcocoawindow.mm -+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm -@@ -320,7 +320,7 @@ static void qt_closePopups() - + (void)applicationActivationChanged:(NSNotification*)notification - { - const id sender = self; -- NSEnumerator *windowEnumerator = nullptr; -+ NSEnumerator *windowEnumerator = nullptr; - NSApplication *application = [NSApplication sharedApplication]; - - #if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12) diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase/darwin-series b/pkgs/development/libraries/qt-5/5.9/qtbase/darwin-series deleted file mode 100644 index 1111ff65f44..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtbase/darwin-series +++ /dev/null @@ -1,3 +0,0 @@ -mkspecs-common-mac.patch -mkspecs-features-mac.patch -darwin-cf.patch diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.9/qtbase/default.nix deleted file mode 100644 index eee55dbded3..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtbase/default.nix +++ /dev/null @@ -1,366 +0,0 @@ -{ - stdenv, lib, copyPathsToStore, - src, version, qtCompatVersion, - - coreutils, bison, flex, gdb, gperf, lndir, patchelf, perl, pkgconfig, python2, - ruby, - # darwin support - darwin, libiconv, libcxx, - - dbus, dconf, fontconfig, freetype, glib, gtk3, harfbuzz, icu, libX11, libXcomposite, - libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng, libtiff, - libxcb, libxkbcommon, libxml2, libxslt, openssl, pcre2, sqlite, udev, - xcbutil, xcbutilimage, xcbutilkeysyms, xcbutilrenderutil, xcbutilwm, xlibs, - zlib, - - # optional dependencies - cups ? null, mysql ? null, postgresql ? null, - - # options - mesaSupported ? (!stdenv.isDarwin), - mesa, - buildExamples ? false, - buildTests ? false, - developerBuild ? false, - decryptSslTraffic ? false -}: - -let - system-x86_64 = lib.elem stdenv.system lib.platforms.x86_64; -in - -stdenv.mkDerivation { - - name = "qtbase-${version}"; - inherit qtCompatVersion src version; - - propagatedBuildInputs = - [ - libxml2 libxslt openssl pcre2 sqlite zlib - - # Text rendering - harfbuzz icu - - # Image formats - libjpeg libpng libtiff - ] - - ++ lib.optional (mesaSupported && !stdenv.isDarwin) mesa - - ++ lib.optionals (!stdenv.isDarwin) [ - dbus glib udev - - # Text rendering - fontconfig freetype - - # X11 libs - libX11 libXcomposite libXext libXi libXrender libxcb libxkbcommon xcbutil - xcbutilimage xcbutilkeysyms xcbutilrenderutil xcbutilwm - ] - - ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ - AGL AppKit ApplicationServices Carbon Cocoa - CoreAudio CoreBluetooth CoreLocation CoreServices - DiskArbitration Foundation OpenGL - darwin.libobjc libiconv - ]); - - buildInputs = [ ] - ++ lib.optionals (!stdenv.isDarwin) [ gtk3 libinput ] - ++ lib.optional developerBuild gdb - ++ lib.optional (cups != null) cups - ++ lib.optional (mysql != null) mysql.lib - ++ lib.optional (postgresql != null) postgresql; - - nativeBuildInputs = - [ bison flex gperf lndir perl pkgconfig python2 ] - ++ lib.optional (!stdenv.isDarwin) patchelf; - - outputs = [ "bin" "dev" "out" ]; - - patches = - copyPathsToStore (lib.readPathsFromFile ./. ./series) - ++ stdenv.lib.optional stdenv.isDarwin (copyPathsToStore (lib.readPathsFromFile ./. ./darwin-series)); - - postPatch = - '' - substituteInPlace configure --replace /bin/pwd pwd - substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls - sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i mkspecs/*/*.conf - - sed -i '/PATHS.*NO_DEFAULT_PATH/ d' src/corelib/Qt5Config.cmake.in - sed -i '/PATHS.*NO_DEFAULT_PATH/ d' src/corelib/Qt5CoreMacros.cmake - sed -i 's/NO_DEFAULT_PATH//' src/gui/Qt5GuiConfigExtras.cmake.in - sed -i '/PATHS.*NO_DEFAULT_PATH/ d' mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in - '' - - + lib.optionalString (mesaSupported && !stdenv.isDarwin) '' - sed -i mkspecs/common/linux.conf \ - -e "/^QMAKE_INCDIR_OPENGL/ s|$|${mesa.dev or mesa}/include|" \ - -e "/^QMAKE_LIBDIR_OPENGL/ s|$|${mesa.out}/lib|" - '' - - + lib.optionalString stdenv.isDarwin '' - sed -i \ - -e 's|! /usr/bin/xcode-select --print-path >/dev/null 2>&1;|false;|' \ - -e 's|! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1;|false;|' \ - -e 's|sysroot=$(/usr/bin/xcodebuild -sdk $sdk -version Path 2>/dev/null)|sysroot=/nonsense|' \ - -e 's|sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null)|sysroot=/nonsense|' \ - -e 's|QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`|QMAKE_CXX="clang++"\nQMAKE_CONF_COMPILER="clang++"|' \ - -e 's|XCRUN=`/usr/bin/xcrun -sdk macosx clang -v 2>&1`|XCRUN="clang -v 2>&1"|' \ - -e 's#sdk_val=$(/usr/bin/xcrun -sdk $sdk -find $(echo $val | cut -d \x27 \x27 -f 1))##' \ - -e 's#val=$(echo $sdk_val $(echo $val | cut -s -d \x27 \x27 -f 2-))##' \ - ./configure - substituteInPlace ./mkspecs/common/mac.conf \ - --replace "/System/Library/Frameworks/OpenGL.framework/" "${darwin.apple_sdk.frameworks.OpenGL}/Library/Frameworks/OpenGL.framework/" - substituteInPlace ./mkspecs/common/mac.conf \ - --replace "/System/Library/Frameworks/AGL.framework/" "${darwin.apple_sdk.frameworks.AGL}/Library/Frameworks/AGL.framework/" - ''; - # Note on the above: \x27 is a way if including a single-quote - # character in the sed string arguments. - - qtPluginPrefix = "lib/qt-${qtCompatVersion}/plugins"; - qtQmlPrefix = "lib/qt-${qtCompatVersion}/qml"; - qtDocPrefix = "share/doc/qt-${qtCompatVersion}"; - - setOutputFlags = false; - preConfigure = '' - export LD_LIBRARY_PATH="$PWD/lib:$PWD/plugins/platforms:$LD_LIBRARY_PATH" - export MAKEFLAGS=-j$NIX_BUILD_CORES - - configureFlags+="\ - -plugindir $out/$qtPluginPrefix \ - -qmldir $out/$qtQmlPrefix \ - -docdir $out/$qtDocPrefix" - - NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PREFIX=\"$qtPluginPrefix\"" - ''; - - - NIX_CFLAGS_COMPILE = - [ - "-Wno-error=sign-compare" # freetype-2.5.4 changed signedness of some struct fields - ''-DNIXPKGS_QTCOMPOSE="${libX11.out}/share/X11/locale"'' - ''-DNIXPKGS_LIBRESOLV="${stdenv.cc.libc.out}/lib/libresolv"'' - ''-DNIXPKGS_LIBXCURSOR="${libXcursor.out}/lib/libXcursor"'' - ] - - ++ lib.optional (mesaSupported && !stdenv.isDarwin) - ''-DNIXPKGS_MESA_GL="${mesa.out}/lib/libGL"'' - - ++ lib.optionals (!stdenv.isDarwin) - [ - ''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"'' - ''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"'' - ] - - ++ lib.optionals stdenv.isDarwin - [ - "-Wno-missing-sysroot" - "-D__MAC_OS_X_VERSION_MAX_ALLOWED=1090" - "-D__AVAILABILITY_INTERNAL__MAC_10_10=__attribute__((availability(macosx,introduced=10.10)))" - # Note that nixpkgs's objc4 is from macOS 10.11 while the SDK is - # 10.9 which necessitates the above macro definition that mentions - # 10.10 - ] - - ++ lib.optional decryptSslTraffic "-DQT_DECRYPT_SSL_TRAFFIC"; - - prefixKey = "-prefix "; - - # PostgreSQL autodetection fails sporadically because Qt omits the "-lpq" flag - # if dependency paths contain the string "pq", which can occur in the hash. - # To prevent these failures, we need to override PostgreSQL detection. - PSQL_LIBS = lib.optionalString (postgresql != null) "-L${postgresql.lib}/lib -lpq"; - - # -no-eglfs, -no-directfb, -no-linuxfb and -no-kms because of the current minimalist mesa - # TODO Remove obsolete and useless flags once the build will be totally mastered - configureFlags = - [ - "-verbose" - "-confirm-license" - "-opensource" - - "-release" - "-shared" - "-accessibility" - "-optimized-qmake" - "-strip" - "-system-proxies" - "-pkg-config" - ] - ++ lib.optionals developerBuild [ - "-developer-build" - "-no-warnings-are-errors" - ] - ++ [ - "-gui" - "-widgets" - "-opengl desktop" - "-qml-debug" - "-icu" - "-pch" - ] - - ++ [ - ''${lib.optionalString (!system-x86_64) "-no"}-sse2'' - "-no-sse3" - "-no-ssse3" - "-no-sse4.1" - "-no-sse4.2" - "-no-avx" - "-no-avx2" - "-no-mips_dsp" - "-no-mips_dspr2" - ] - - ++ [ - "-system-zlib" - "-system-libjpeg" - "-system-harfbuzz" - "-system-pcre" - "-openssl-linked" - "-system-sqlite" - ''-${if mysql != null then "plugin" else "no"}-sql-mysql'' - ''-${if postgresql != null then "plugin" else "no"}-sql-psql'' - - "-make libs" - "-make tools" - ''-${lib.optionalString (buildExamples == false) "no"}make examples'' - ''-${lib.optionalString (buildTests == false) "no"}make tests'' - "-v" - ] - - ++ lib.optionals (!stdenv.isDarwin) [ - "-rpath" - - "-system-xcb" - "-xcb" - "-qpa xcb" - - "-system-xkbcommon" - "-libinput" - "-xkbcommon-evdev" - - "-no-eglfs" - "-no-gbm" - "-no-kms" - "-no-linuxfb" - - ''-${lib.optionalString (cups == null) "no-"}cups'' - "-dbus-linked" - "-glib" - "-gtk" - "-inotify" - "-system-libjpeg" - "-system-libpng" - # gold linker of binutils 2.28 generates duplicate symbols - # TODO: remove for newer version of binutils - "-no-use-gold-linker" - ] - - ++ lib.optionals stdenv.isDarwin [ - "-platform macx-clang" - "-no-use-gold-linker" - "-no-fontconfig" - "-qt-freetype" - "-qt-libpng" - ]; - - enableParallelBuilding = true; - - postInstall = - # Hardcode some CMake module paths. - '' - find "$out" -name "*.cmake" | while read file; do - substituteInPlace "$file" \ - --subst-var-by NIX_OUT "''${!outputLib}" \ - --subst-var-by NIX_DEV "''${!outputDev}" \ - --subst-var-by NIX_BIN "''${!outputBin}" - done - ''; - - preFixup = - # Move selected outputs. - '' - moveToOutput "bin" "$dev" - moveToOutput "include" "$dev" - moveToOutput "mkspecs" "$dev" - - mkdir -p "$dev/share" - moveToOutput "share/doc" "$dev" - - moveToOutput "$qtPluginPrefix" "$bin" - ''; - - postFixup = - # Don't retain build-time dependencies like gdb. - '' - sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri - '' - - # Move libtool archives into $dev - + '' - if [ "z''${!outputLib}" != "z''${!outputDev}" ]; then - pushd "''${!outputLib}" - find lib -name '*.a' -o -name '*.la' | while read -r file; do - mkdir -p "''${!outputDev}/$(dirname "$file")" - mv "''${!outputLib}/$file" "''${!outputDev}/$file" - done - popd - fi - '' - - # Move qmake project files into $dev. - # Don't move .prl files on darwin because they end up in - # "dev/lib/Foo.framework/Foo.prl" which interferes with subsequent - # use of lndir in the qtbase setup-hook. On Linux, the .prl files - # are in lib, and so do not cause a subsequent recreation of deep - # framework directory trees. - + lib.optionalString (!stdenv.isDarwin) '' - if [ "z''${!outputLib}" != "z''${!outputDev}" ]; then - pushd "''${!outputLib}" - find lib -name '*.prl' | while read -r file; do - mkdir -p "''${!outputDev}/$(dirname "$file")" - mv "''${!outputLib}/$file" "''${!outputDev}/$file" - done - popd - fi - '' - - # fixup .pc file (where to find 'moc' etc.) - + lib.optionalString (!stdenv.isDarwin) '' - sed -i "$dev/lib/pkgconfig/Qt5Core.pc" \ - -e "/^host_bins=/ c host_bins=$dev/bin" - '' - - + lib.optionalString stdenv.isDarwin '' - fixDarwinDylibNames_rpath() { - local flags=() - - for fn in "$@"; do - flags+=(-change "@rpath/$fn.framework/Versions/5/$fn" "$out/lib/$fn.framework/Versions/5/$fn") - done - - for fn in "$@"; do - echo "$fn: fixing dylib" - install_name_tool -id "$out/lib/$fn.framework/Versions/5/$fn" "''${flags[@]}" "$out/lib/$fn.framework/Versions/5/$fn" - done - } - fixDarwinDylibNames_rpath "QtConcurrent" "QtPrintSupport" "QtCore" "QtSql" "QtDBus" "QtTest" "QtGui" "QtWidgets" "QtNetwork" "QtXml" "QtOpenGL" - ''; - - inherit lndir; - setupHook = if stdenv.isDarwin - then ../../qtbase-setup-hook-darwin.sh - else ../../qtbase-setup-hook.sh; - - meta = with lib; { - homepage = http://www.qt.io; - description = "A cross-platform application framework for C++"; - license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ]; - maintainers = with maintainers; [ qknight ttuegel periklis ]; - platforms = platforms.unix; - }; - -} diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-gl.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-gl.patch deleted file mode 100644 index 9385c7f6678..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-gl.patch +++ /dev/null @@ -1,19 +0,0 @@ -Index: qtbase-opensource-src-5.9.0/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp -=================================================================== ---- qtbase-opensource-src-5.9.0.orig/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp -+++ qtbase-opensource-src-5.9.0/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp -@@ -580,7 +580,14 @@ QFunctionPointer QGLXContext::getProcAdd - #if QT_CONFIG(library) - extern const QString qt_gl_library_name(); - // QLibrary lib(qt_gl_library_name()); -+ // Check system library paths first - QLibrary lib(QLatin1String("GL")); -+#ifdef NIXPKGS_MESA_GL -+ if (!lib.load()) { -+ // Fallback to Mesa driver -+ lib.setFileName(QLatin1String(NIXPKGS_MESA_GL)); -+ } -+#endif // NIXPKGS_MESA_GL - glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB"); - #endif - } diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-gtkstyle.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-gtkstyle.patch deleted file mode 100644 index 755b0965cf5..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-gtkstyle.patch +++ /dev/null @@ -1,50 +0,0 @@ -Index: qtbase-opensource-src-5.5.1/src/widgets/styles/qgtk2painter.cpp -=================================================================== ---- qtbase-opensource-src-5.5.1.orig/src/widgets/styles/qgtk2painter.cpp -+++ qtbase-opensource-src-5.5.1/src/widgets/styles/qgtk2painter.cpp -@@ -96,7 +96,7 @@ static void initGtk() - static bool initialized = false; - if (!initialized) { - // enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0 -- QLibrary libgtk(QLS("gtk-x11-2.0"), 0, 0); -+ QLibrary libgtk(QLS("@gtk@/lib/libgtk-x11-2.0"), 0, 0); - - QGtk2PainterPrivate::gdk_pixmap_new = (Ptr_gdk_pixmap_new)libgtk.resolve("gdk_pixmap_new"); - QGtk2PainterPrivate::gdk_pixbuf_get_from_drawable = (Ptr_gdk_pixbuf_get_from_drawable)libgtk.resolve("gdk_pixbuf_get_from_drawable"); -Index: qtbase-opensource-src-5.5.1/src/widgets/styles/qgtkstyle_p.cpp -=================================================================== ---- qtbase-opensource-src-5.5.1.orig/src/widgets/styles/qgtkstyle_p.cpp -+++ qtbase-opensource-src-5.5.1/src/widgets/styles/qgtkstyle_p.cpp -@@ -327,7 +327,7 @@ void QGtkStylePrivate::gtkWidgetSetFocus - void QGtkStylePrivate::resolveGtk() const - { - // enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0 -- QLibrary libgtk(QLS("gtk-x11-2.0"), 0, 0); -+ QLibrary libgtk(QLS("@gtk@/lib/libgtk-x11-2.0"), 0, 0); - - gtk_init = (Ptr_gtk_init)libgtk.resolve("gtk_init"); - gtk_window_new = (Ptr_gtk_window_new)libgtk.resolve("gtk_window_new"); -@@ -425,8 +425,8 @@ void QGtkStylePrivate::resolveGtk() cons - pango_font_description_get_family = (Ptr_pango_font_description_get_family)libgtk.resolve("pango_font_description_get_family"); - pango_font_description_get_style = (Ptr_pango_font_description_get_style)libgtk.resolve("pango_font_description_get_style"); - -- gnome_icon_lookup_sync = (Ptr_gnome_icon_lookup_sync)QLibrary::resolve(QLS("gnomeui-2"), 0, "gnome_icon_lookup_sync"); -- gnome_vfs_init= (Ptr_gnome_vfs_init)QLibrary::resolve(QLS("gnomevfs-2"), 0, "gnome_vfs_init"); -+ gnome_icon_lookup_sync = (Ptr_gnome_icon_lookup_sync)QLibrary::resolve(QLS("@libgnomeui@/lib/libgnomeui-2"), 0, "gnome_icon_lookup_sync"); -+ gnome_vfs_init= (Ptr_gnome_vfs_init)QLibrary::resolve(QLS("@gnome_vfs@/lib/libgnomevfs-2"), 0, "gnome_vfs_init"); - } - - /* \internal -@@ -594,9 +594,9 @@ void QGtkStylePrivate::cleanupGtkWidgets - static bool resolveGConf() - { - if (!QGtkStylePrivate::gconf_client_get_default) { -- QGtkStylePrivate::gconf_client_get_default = (Ptr_gconf_client_get_default)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_default"); -- QGtkStylePrivate::gconf_client_get_string = (Ptr_gconf_client_get_string)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_string"); -- QGtkStylePrivate::gconf_client_get_bool = (Ptr_gconf_client_get_bool)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_bool"); -+ QGtkStylePrivate::gconf_client_get_default = (Ptr_gconf_client_get_default)QLibrary::resolve(QLS("@gconf@/lib/libgconf-2"), 4, "gconf_client_get_default"); -+ QGtkStylePrivate::gconf_client_get_string = (Ptr_gconf_client_get_string)QLibrary::resolve(QLS("@gconf@/lib/libgconf-2"), 4, "gconf_client_get_string"); -+ QGtkStylePrivate::gconf_client_get_bool = (Ptr_gconf_client_get_bool)QLibrary::resolve(QLS("@gconf@/lib/libgconf-2"), 4, "gconf_client_get_bool"); - } - return (QGtkStylePrivate::gconf_client_get_default !=0); - } diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-libXcursor.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-libXcursor.patch deleted file mode 100644 index 31339abc785..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-libXcursor.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: qtbase-opensource-src-5.9.0/src/plugins/platforms/xcb/qxcbcursor.cpp -=================================================================== ---- qtbase-opensource-src-5.9.0.orig/src/plugins/platforms/xcb/qxcbcursor.cpp -+++ qtbase-opensource-src-5.9.0/src/plugins/platforms/xcb/qxcbcursor.cpp -@@ -311,10 +311,10 @@ QXcbCursor::QXcbCursor(QXcbConnection *c - #if defined(XCB_USE_XLIB) && QT_CONFIG(library) - static bool function_ptrs_not_initialized = true; - if (function_ptrs_not_initialized) { -- QLibrary xcursorLib(QLatin1String("Xcursor"), 1); -+ QLibrary xcursorLib(QLatin1String(NIXPKGS_LIBXCURSOR), 1); - bool xcursorFound = xcursorLib.load(); - if (!xcursorFound) { // try without the version number -- xcursorLib.setFileName(QLatin1String("Xcursor")); -+ xcursorLib.setFileName(QLatin1String(NIXPKGS_LIBXCURSOR)); - xcursorFound = xcursorLib.load(); - } - if (xcursorFound) { diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-resolv.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-resolv.patch deleted file mode 100644 index 598456a49ff..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-resolv.patch +++ /dev/null @@ -1,26 +0,0 @@ -Index: qtbase-opensource-src-5.9.0/src/network/kernel/qdnslookup_unix.cpp -=================================================================== ---- qtbase-opensource-src-5.9.0.orig/src/network/kernel/qdnslookup_unix.cpp -+++ qtbase-opensource-src-5.9.0/src/network/kernel/qdnslookup_unix.cpp -@@ -92,7 +92,7 @@ static bool resolveLibraryInternal() - if (!lib.load()) - #endif - { -- lib.setFileName(QLatin1String("resolv")); -+ lib.setFileName(QLatin1String(NIXPKGS_LIBRESOLV)); - if (!lib.load()) - return false; - } -Index: qtbase-opensource-src-5.9.0/src/network/kernel/qhostinfo_unix.cpp -=================================================================== ---- qtbase-opensource-src-5.9.0.orig/src/network/kernel/qhostinfo_unix.cpp -+++ qtbase-opensource-src-5.9.0/src/network/kernel/qhostinfo_unix.cpp -@@ -102,7 +102,7 @@ static bool resolveLibraryInternal() - if (!lib.load()) - #endif - { -- lib.setFileName(QLatin1String("resolv")); -+ lib.setFileName(QLatin1String(NIXPKGS_LIBRESOLV)); - if (!lib.load()) - return false; - } diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase/library-paths.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/library-paths.patch deleted file mode 100644 index 4c24d73ed36..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtbase/library-paths.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: qtbase-opensource-src-5.9.0/src/corelib/kernel/qcoreapplication.cpp -=================================================================== ---- qtbase-opensource-src-5.9.0.orig/src/corelib/kernel/qcoreapplication.cpp -+++ qtbase-opensource-src-5.9.0/src/corelib/kernel/qcoreapplication.cpp -@@ -2533,6 +2533,15 @@ QStringList QCoreApplication::libraryPat - QStringList *app_libpaths = new QStringList; - coreappdata()->app_libpaths.reset(app_libpaths); - -+ // Add library paths derived from PATH -+ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':'); -+ const QString plugindir = QStringLiteral("../" NIXPKGS_QT_PLUGIN_PREFIX); -+ for (const QString &path: paths) { -+ if (!path.isEmpty()) { -+ app_libpaths->append(QDir::cleanPath(path + QDir::separator() + plugindir)); -+ } -+ } -+ - const QByteArray libPathEnv = qgetenv("QT_PLUGIN_PATH"); - if (!libPathEnv.isEmpty()) { - QStringList paths = QFile::decodeName(libPathEnv).split(QDir::listSeparator(), QString::SkipEmptyParts); diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase/libressl.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/libressl.patch deleted file mode 100644 index e9c60e7ab07..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtbase/libressl.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 81494e67eccba04fc3fe554d76a9ca6fe7f2250e Mon Sep 17 00:00:00 2001 -From: hasufell -Date: Sat, 10 Oct 2015 01:15:01 +0200 -Subject: [PATCH] Fix compilation with libressl - -By additionally checking for defined(SSL_CTRL_SET_CURVES), which -is defined in openssl, but not in libressl. ---- - src/network/ssl/qsslcontext_openssl.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: qtbase-opensource-src-5.8.0/src/network/ssl/qsslcontext_openssl.cpp -=================================================================== ---- qtbase-opensource-src-5.8.0.orig/src/network/ssl/qsslcontext_openssl.cpp -+++ qtbase-opensource-src-5.8.0/src/network/ssl/qsslcontext_openssl.cpp -@@ -351,7 +351,7 @@ init_context: - - const QVector qcurves = sslContext->sslConfiguration.ellipticCurves(); - if (!qcurves.isEmpty()) { --#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC) -+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC) - // Set the curves to be used - if (q_SSLeay() >= 0x10002000L) { - // SSL_CTX_ctrl wants a non-const pointer as last argument, -@@ -364,7 +364,7 @@ init_context: - sslContext->errorCode = QSslError::UnspecifiedError; - } - } else --#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC) -+#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC) - { - // specific curves requested, but not possible to set -> error - sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("OpenSSL version too old, need at least v1.0.2")); diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase/mkspecs-common-mac.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/mkspecs-common-mac.patch deleted file mode 100644 index b77f8778122..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtbase/mkspecs-common-mac.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- qtbase-opensource-src-5.9.1.orig/mkspecs/common/mac.conf 2017-09-16 16:40:30.000000000 +0800 -+++ qtbase-opensource-src-5.9.1/mkspecs/common/mac.conf 2017-09-16 16:41:27.000000000 +0800 -@@ -23,7 +23,7 @@ - - QMAKE_FIX_RPATH = install_name_tool -id - --QMAKE_LFLAGS_RPATH = -Wl,-rpath, -+QMAKE_LFLAGS_RPATH = - QMAKE_LFLAGS_GCSECTIONS = -Wl,-dead_strip - - QMAKE_LFLAGS_REL_RPATH = diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase/mkspecs-features-mac.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/mkspecs-features-mac.patch deleted file mode 100644 index 46d950a767b..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtbase/mkspecs-features-mac.patch +++ /dev/null @@ -1,292 +0,0 @@ -diff -u -r qtbase-opensource-src-5.9.2.orig/mkspecs/features/mac/default_post.prf qtbase-opensource-src-5.9.2/mkspecs/features/mac/default_post.prf ---- qtbase-opensource-src-5.9.2.orig/mkspecs/features/mac/default_post.prf 2017-10-14 12:31:04.000000000 +0800 -+++ qtbase-opensource-src-5.9.2/mkspecs/features/mac/default_post.prf 2017-10-14 12:42:02.000000000 +0800 -@@ -24,166 +24,3 @@ - } - } - } -- --# Add the same default rpaths as Xcode does for new projects. --# This is especially important for iOS/tvOS/watchOS where no other option is possible. --!no_default_rpath { -- QMAKE_RPATHDIR += @executable_path/Frameworks -- equals(TEMPLATE, lib):!plugin:lib_bundle: QMAKE_RPATHDIR += @loader_path/Frameworks --} -- --# Don't pass -headerpad_max_install_names when using Bitcode. --# In that case the linker emits a warning stating that the flag is ignored when --# used with bitcode, for reasons that cannot be determined (rdar://problem/20748962). --# Using this flag is also unnecessary in practice on UIKit platforms since they --# are sandboxed, and only UIKit platforms support bitcode to begin with. --!bitcode: QMAKE_LFLAGS += $$QMAKE_LFLAGS_HEADERPAD -- --app_extension_api_only { -- QMAKE_CFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION -- QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION -- QMAKE_CXXFLAGS_PRECOMPILE += $$QMAKE_CFLAGS_APPLICATION_EXTENSION -- QMAKE_LFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION --} -- --macx-xcode { -- !isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) { -- debug_information_format.name = DEBUG_INFORMATION_FORMAT -- debug_information_format.value = $$QMAKE_XCODE_DEBUG_INFORMATION_FORMAT -- debug_information_format.build = debug -- QMAKE_MAC_XCODE_SETTINGS += debug_information_format -- } -- -- QMAKE_XCODE_ARCHS = -- -- arch_device.name = "ARCHS[sdk=$${device.sdk}*]" -- arch_device.value = $$QMAKE_APPLE_DEVICE_ARCHS -- QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS -- QMAKE_MAC_XCODE_SETTINGS += arch_device -- -- simulator { -- arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]" -- arch_simulator.value = $$QMAKE_APPLE_SIMULATOR_ARCHS -- QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS -- QMAKE_MAC_XCODE_SETTINGS += arch_simulator -- } -- -- only_active_arch.name = ONLY_ACTIVE_ARCH -- only_active_arch.value = YES -- only_active_arch.build = debug -- QMAKE_MAC_XCODE_SETTINGS += only_active_arch --} else { -- device|!simulator: VALID_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS -- simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS -- VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS -- -- isEmpty(VALID_ARCHS): \ -- error("QMAKE_APPLE_DEVICE_ARCHS or QMAKE_APPLE_SIMULATOR_ARCHS must contain at least one architecture") -- -- single_arch: VALID_ARCHS = $$first(VALID_ARCHS) -- -- ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS)) -- ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ACTIVE_ARCHS), $(EXPORT_ACTIVE_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch)) -- -- QMAKE_EXTRA_VARIABLES += VALID_ARCHS ACTIVE_ARCHS ARCH_ARGS -- -- arch_flags = $(EXPORT_ARCH_ARGS) -- -- QMAKE_CFLAGS += $$arch_flags -- QMAKE_CXXFLAGS += $$arch_flags -- QMAKE_LFLAGS += $$arch_flags -- -- QMAKE_PCH_ARCHS = $$VALID_ARCHS -- -- macos: deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET -- ios: deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET -- tvos: deployment_target = $$QMAKE_TVOS_DEPLOYMENT_TARGET -- watchos: deployment_target = $$QMAKE_WATCHOS_DEPLOYMENT_TARGET -- -- # If we're doing a simulator and device build, device and simulator -- # architectures use different paths and flags for the sysroot and -- # deployment target switch, so we must multiplex them across multiple -- # architectures using -Xarch. Otherwise we fall back to the simple path. -- # This is not strictly necessary, but results in cleaner command lines -- # and makes it easier for people to override EXPORT_VALID_ARCHS to limit -- # individual rules to a different set of architecture(s) from the overall -- # build (such as machtest in QtCore). -- simulator:device { -- QMAKE_XARCH_CFLAGS = -- QMAKE_XARCH_LFLAGS = -- QMAKE_EXTRA_VARIABLES += QMAKE_XARCH_CFLAGS QMAKE_XARCH_LFLAGS -- -- for (arch, VALID_ARCHS) { -- contains(VALID_SIMULATOR_ARCHS, $$arch) { -- sdk = $$simulator.sdk -- version_identifier = $$simulator.deployment_identifier -- } else { -- sdk = $$device.sdk -- version_identifier = $$device.deployment_identifier -- } -- -- version_min_flags = \ -- -Xarch_$${arch} \ -- -m$${version_identifier}-version-min=$$deployment_target -- QMAKE_XARCH_CFLAGS_$${arch} = $$version_min_flags \ -- -Xarch_$${arch} \ -- -isysroot$$xcodeSDKInfo(Path, $$sdk) -- QMAKE_XARCH_LFLAGS_$${arch} = $$version_min_flags \ -- -Xarch_$${arch} \ -- -Wl,-syslibroot,$$xcodeSDKInfo(Path, $$sdk) -- -- QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch}) -- QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS_$${arch}) -- -- QMAKE_EXTRA_VARIABLES += \ -- QMAKE_XARCH_CFLAGS_$${arch} \ -- QMAKE_XARCH_LFLAGS_$${arch} -- } -- -- QMAKE_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) -- QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) -- QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS) -- } else { -- simulator: \ -- version_identifier = $$simulator.deployment_identifier -- else: \ -- version_identifier = $$device.deployment_identifier -- version_min_flag = -m$${version_identifier}-version-min=$$deployment_target -- QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag -- QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag -- QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK_PATH $$version_min_flag -- } -- -- # Enable precompiled headers for multiple architectures -- QMAKE_CFLAGS_USE_PRECOMPILE = -- for (arch, VALID_ARCHS) { -- icc_pch_style: \ -- use_flag = "-pch-use " -- else: \ -- use_flag = -include -- -- # Only use Xarch with multi-arch, as the option confuses ccache -- count(VALID_ARCHS, 1, greaterThan): \ -- QMAKE_CFLAGS_USE_PRECOMPILE += \ -- -Xarch_$${arch} -- -- QMAKE_CFLAGS_USE_PRECOMPILE += \ -- $${use_flag}${QMAKE_PCH_OUTPUT_$${arch}} -- } -- icc_pch_style { -- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -include ${QMAKE_PCH_INPUT} -- QMAKE_CFLAGS_USE_PRECOMPILE = -- } else { -- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -- QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -- QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -- } -- -- QMAKE_PCH_OUTPUT_EXT = _${QMAKE_PCH_ARCH}$${QMAKE_PCH_OUTPUT_EXT} --} -- --cache(QMAKE_XCODE_DEVELOPER_PATH, stash) --!isEmpty(QMAKE_XCODE_VERSION): \ -- cache(QMAKE_XCODE_VERSION, stash) -- --QMAKE_XCODE_LIBRARY_SUFFIX = $$qtPlatformTargetSuffix() -diff -u -r qtbase-opensource-src-5.9.2.orig/mkspecs/features/mac/default_pre.prf qtbase-opensource-src-5.9.2/mkspecs/features/mac/default_pre.prf ---- qtbase-opensource-src-5.9.2.orig/mkspecs/features/mac/default_pre.prf 2017-10-14 12:31:04.000000000 +0800 -+++ qtbase-opensource-src-5.9.2/mkspecs/features/mac/default_pre.prf 2017-10-14 12:42:02.000000000 +0800 -@@ -1,56 +1,2 @@ - CONFIG = asset_catalogs rez $$CONFIG - load(default_pre) -- --isEmpty(QMAKE_XCODE_DEVELOPER_PATH) { -- # Get path of Xcode's Developer directory -- QMAKE_XCODE_DEVELOPER_PATH = $$system("/usr/bin/xcode-select --print-path 2>/dev/null") -- isEmpty(QMAKE_XCODE_DEVELOPER_PATH): \ -- error("Xcode path is not set. Please use xcode-select to choose Xcode installation path.") -- -- # Make sure Xcode path is valid -- !exists($$QMAKE_XCODE_DEVELOPER_PATH): \ -- error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.") --} -- --isEmpty(QMAKE_XCODEBUILD_PATH): \ -- QMAKE_XCODEBUILD_PATH = $$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null") -- --!isEmpty(QMAKE_XCODEBUILD_PATH) { -- # Make sure Xcode is set up properly -- !system("/usr/bin/xcrun xcodebuild -license check 2>/dev/null"): \ -- error("Xcode not set up properly. You need to confirm the license agreement by running 'sudo xcrun xcodebuild -license accept'.") -- -- isEmpty(QMAKE_XCODE_VERSION) { -- # Extract Xcode version using xcodebuild -- xcode_version = $$system("/usr/bin/xcrun xcodebuild -version") -- QMAKE_XCODE_VERSION = $$member(xcode_version, 1) -- isEmpty(QMAKE_XCODE_VERSION): error("Could not resolve Xcode version.") -- unset(xcode_version) -- } --} -- --isEmpty(QMAKE_TARGET_BUNDLE_PREFIX) { -- QMAKE_XCODE_PREFERENCES_FILE = $$(HOME)/Library/Preferences/com.apple.dt.Xcode.plist -- exists($$QMAKE_XCODE_PREFERENCES_FILE): \ -- QMAKE_TARGET_BUNDLE_PREFIX = $$system("/usr/libexec/PlistBuddy -c 'print IDETemplateOptions:bundleIdentifierPrefix' $$QMAKE_XCODE_PREFERENCES_FILE 2>/dev/null") -- -- !isEmpty(_QMAKE_CACHE_):!isEmpty(QMAKE_TARGET_BUNDLE_PREFIX): \ -- cache(QMAKE_TARGET_BUNDLE_PREFIX) --} -- --QMAKE_ASSET_CATALOGS_APP_ICON = AppIcon -- --# Make the default debug info format for static debug builds --# DWARF instead of DWARF with dSYM. This cuts down build times --# for application debug builds significantly, as Xcode doesn't --# have to pull out all the DWARF info from the Qt static libs --# and put it into a dSYM file. We don't need that dSYM file in --# the first place, since the information is available in the --# object files inside the archives (static libraries). --macx-xcode:qtConfig(static): \ -- QMAKE_XCODE_DEBUG_INFORMATION_FORMAT = dwarf -- --# This variable is used by the xcode_dynamic_library_suffix --# feature, which allows Xcode to choose the Qt libraries to link to --# at build time, depending on the current Xcode SDK and configuration. --QMAKE_XCODE_LIBRARY_SUFFIX_SETTING = QT_LIBRARY_SUFFIX -diff -u -r qtbase-opensource-src-5.9.2.orig/mkspecs/features/mac/sdk.prf qtbase-opensource-src-5.9.2/mkspecs/features/mac/sdk.prf ---- qtbase-opensource-src-5.9.2.orig/mkspecs/features/mac/sdk.prf 2017-10-14 12:31:04.000000000 +0800 -+++ qtbase-opensource-src-5.9.2/mkspecs/features/mac/sdk.prf 2017-10-14 12:42:10.000000000 +0800 -@@ -1,58 +0,0 @@ -- --isEmpty(QMAKE_MAC_SDK): \ -- error("QMAKE_MAC_SDK must be set when using CONFIG += sdk.") -- --contains(QMAKE_MAC_SDK, .*/.*): \ -- error("QMAKE_MAC_SDK can only contain short-form SDK names (eg. macosx, iphoneos)") -- --defineReplace(xcodeSDKInfo) { -- info = $$1 -- equals(info, "Path"): \ -- info = --show-sdk-path -- equals(info, "PlatformPath"): \ -- info = --show-sdk-platform-path -- equals(info, "SDKVersion"): \ -- info = --show-sdk-version -- sdk = $$2 -- isEmpty(sdk): \ -- sdk = $$QMAKE_MAC_SDK -- -- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}) { -- QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$info 2>/dev/null") -- # --show-sdk-platform-path won't work for Command Line Tools; this is fine -- # only used by the XCTest backend to testlib -- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(info, "--show-sdk-platform-path")): \ -- error("Could not resolve SDK $$info for \'$$sdk\'") -- cache(QMAKE_MAC_SDK.$${sdk}.$${info}, set stash, QMAKE_MAC_SDK.$${sdk}.$${info}) -- } -- -- return($$eval(QMAKE_MAC_SDK.$${sdk}.$${info})) --} -- --QMAKE_MAC_SDK_PATH = $$xcodeSDKInfo(Path) --QMAKE_MAC_SDK_PLATFORM_PATH = $$xcodeSDKInfo(PlatformPath) --QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion) -- --sysrootified = --for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val --QMAKE_INCDIR_OPENGL = $$sysrootified -- --QMAKESPEC_NAME = $$basename(QMAKESPEC) -- --# Resolve SDK version of various tools --for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_ACTOOL)) { -- tool_variable = QMAKE_MAC_SDK.$${QMAKESPEC_NAME}.$${QMAKE_MAC_SDK}.$${tool} -- !isEmpty($$tool_variable) { -- $$tool = $$eval($$tool_variable) -- next() -- } -- -- value = $$eval($$tool) -- isEmpty(value): next() -- -- sysrooted = $$system("/usr/bin/xcrun -sdk $$QMAKE_MAC_SDK -find $$first(value) 2>/dev/null") -- isEmpty(sysrooted): next() -- -- $$tool = $$sysrooted $$member(value, 1, -1) -- cache($$tool_variable, set stash, $$tool) --} diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase/qgtk-env.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/qgtk-env.patch deleted file mode 100644 index 8e5e2c71828..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtbase/qgtk-env.patch +++ /dev/null @@ -1,36 +0,0 @@ -Index: qtbase-opensource-src-5.8.0/src/plugins/platformthemes/gtk3/main.cpp -=================================================================== ---- qtbase-opensource-src-5.8.0.orig/src/plugins/platformthemes/gtk3/main.cpp -+++ qtbase-opensource-src-5.8.0/src/plugins/platformthemes/gtk3/main.cpp -@@ -39,6 +39,7 @@ - - #include - #include "qgtk3theme.h" -+#include - - QT_BEGIN_NAMESPACE - -@@ -54,8 +55,22 @@ public: - QPlatformTheme *QGtk3ThemePlugin::create(const QString &key, const QStringList ¶ms) - { - Q_UNUSED(params); -- if (!key.compare(QLatin1String(QGtk3Theme::name), Qt::CaseInsensitive)) -+ if (!key.compare(QLatin1String(QGtk3Theme::name), Qt::CaseInsensitive)) { -+ -+#ifdef NIXPKGS_QGTK3_XDG_DATA_DIRS -+ QStringList XDG_DATA_DIRS = QFile::decodeName(qgetenv("XDG_DATA_DIRS")).split(':'); -+ XDG_DATA_DIRS << QLatin1String(NIXPKGS_QGTK3_XDG_DATA_DIRS); -+ qputenv("XDG_DATA_DIRS", QFile::encodeName(XDG_DATA_DIRS.join(':'))); -+#endif -+ -+#ifdef NIXPKGS_QGTK3_GIO_EXTRA_MODULES -+ QStringList GIO_EXTRA_MODULES = QFile::decodeName(qgetenv("GIO_EXTRA_MODULES")).split(':'); -+ GIO_EXTRA_MODULES << QLatin1String(NIXPKGS_QGTK3_GIO_EXTRA_MODULES); -+ qputenv("GIO_EXTRA_MODULES", QFile::encodeName(GIO_EXTRA_MODULES.join(':'))); -+#endif -+ - return new QGtk3Theme; -+ } - - return 0; - } diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase/qnativesocketengine-type-pun.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/qnativesocketengine-type-pun.patch deleted file mode 100644 index ad40dfab2f7..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtbase/qnativesocketengine-type-pun.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: qtbase-opensource-src-5.8.0/src/network/socket/qnativesocketengine_unix.cpp -=================================================================== ---- qtbase-opensource-src-5.8.0.orig/src/network/socket/qnativesocketengine_unix.cpp -+++ qtbase-opensource-src-5.8.0/src/network/socket/qnativesocketengine_unix.cpp -@@ -979,7 +979,8 @@ qint64 QNativeSocketEnginePrivate::nativ - if (cmsgptr->cmsg_len == CMSG_LEN(sizeof(int)) - && ((cmsgptr->cmsg_level == IPPROTO_IPV6 && cmsgptr->cmsg_type == IPV6_HOPLIMIT) - || (cmsgptr->cmsg_level == IPPROTO_IP && cmsgptr->cmsg_type == IP_TTL))) { -- header->hopLimit = *reinterpret_cast(CMSG_DATA(cmsgptr)); -+ int *ttl = reinterpret_cast(CMSG_DATA(cmsgptr)); -+ header->hopLimit = *ttl; - } - - #ifndef QT_NO_SCTP diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase/series b/pkgs/development/libraries/qt-5/5.9/qtbase/series deleted file mode 100644 index 4f354e87c84..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtbase/series +++ /dev/null @@ -1,9 +0,0 @@ -dlopen-resolv.patch -tzdir.patch -dlopen-libXcursor.patch -library-paths.patch -libressl.patch -dlopen-gl.patch -compose-search-path.patch -cmake-paths.patch -qgtk-env.patch diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase/tzdir.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/tzdir.patch deleted file mode 100644 index d57f24c3ed0..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtbase/tzdir.patch +++ /dev/null @@ -1,39 +0,0 @@ -Index: qtbase-opensource-src-5.9.0/src/corelib/tools/qtimezoneprivate_tz.cpp -=================================================================== ---- qtbase-opensource-src-5.9.0.orig/src/corelib/tools/qtimezoneprivate_tz.cpp -+++ qtbase-opensource-src-5.9.0/src/corelib/tools/qtimezoneprivate_tz.cpp -@@ -70,7 +70,11 @@ typedef QHash Q - // Parse zone.tab table, assume lists all installed zones, if not will need to read directories - static QTzTimeZoneHash loadTzTimeZones() - { -- QString path = QStringLiteral("/usr/share/zoneinfo/zone.tab"); -+ // Try TZDIR first, in case we're running on NixOS. -+ QString path = QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/zone.tab"); -+ // Fallback to traditional paths in case we are not on NixOS. -+ if (!QFile::exists(path)) -+ path = QStringLiteral("/usr/share/zoneinfo/zone.tab"); - if (!QFile::exists(path)) - path = QStringLiteral("/usr/lib/zoneinfo/zone.tab"); - -@@ -643,12 +647,16 @@ void QTzTimeZonePrivate::init(const QByt - if (!tzif.open(QIODevice::ReadOnly)) - return; - } else { -- // Open named tz, try modern path first, if fails try legacy path -- tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId)); -+ // Try TZDIR first, in case we're running on NixOS -+ tzif.setFileName(QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/") + QString::fromLocal8Bit(ianaId)); - if (!tzif.open(QIODevice::ReadOnly)) { -- tzif.setFileName(QLatin1String("/usr/lib/zoneinfo/") + QString::fromLocal8Bit(ianaId)); -- if (!tzif.open(QIODevice::ReadOnly)) -- return; -+ // Open named tz, try modern path first, if fails try legacy path -+ tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId)); -+ if (!tzif.open(QIODevice::ReadOnly)) { -+ tzif.setFileName(QLatin1String("/usr/lib/zoneinfo/") + QString::fromLocal8Bit(ianaId)); -+ if (!tzif.open(QIODevice::ReadOnly)) -+ return; -+ } - } - } - diff --git a/pkgs/development/libraries/qt-5/5.9/qtcharts.nix b/pkgs/development/libraries/qt-5/5.9/qtcharts.nix deleted file mode 100644 index afc09e3eeb5..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtcharts.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ qtSubmodule, qtbase, qtdeclarative }: - -qtSubmodule { - name = "qtcharts"; - qtInputs = [ qtbase qtdeclarative ]; - outputs = [ "bin" "dev" "out" ]; - postInstall = '' - moveToOutput "$qtQmlPrefix" "$bin" - ''; -} diff --git a/pkgs/development/libraries/qt-5/5.9/qtconnectivity.nix b/pkgs/development/libraries/qt-5/5.9/qtconnectivity.nix deleted file mode 100644 index 8153f0d4078..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtconnectivity.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ qtSubmodule, qtbase, qtdeclarative }: - -qtSubmodule { - name = "qtconnectivity"; - qtInputs = [ qtbase qtdeclarative ]; - outputs = [ "bin" "dev" "out" ]; - postInstall = '' - moveToOutput "$qtQmlPrefix" "$bin" - ''; -} diff --git a/pkgs/development/libraries/qt-5/5.9/qtdeclarative.patch b/pkgs/development/libraries/qt-5/5.9/qtdeclarative.patch new file mode 100644 index 00000000000..bb1bbbeb05e --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.9/qtdeclarative.patch @@ -0,0 +1,33 @@ +diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp +index ee5b38717..bbccef8c4 100644 +--- a/src/qml/qml/qqmlimport.cpp ++++ b/src/qml/qml/qqmlimport.cpp +@@ -1678,6 +1678,15 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e) + QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); + addImportPath(installImportsPath); + ++ // Add import paths derived from PATH ++ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':'); ++ const QString qmldir = QStringLiteral("../" NIXPKGS_QML2_IMPORT_PREFIX); ++ for (const QString &path: paths) { ++ if (!path.isEmpty()) { ++ addImportPath(QDir::cleanPath(path + QDir::separator() + qmldir)); ++ } ++ } ++ + // env import paths + if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty("QML2_IMPORT_PATH"))) { + const QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH"); +diff --git a/tools/qmlcachegen/qmlcache.prf b/tools/qmlcachegen/qmlcache.prf +index 330da358b..cdf570205 100644 +--- a/tools/qmlcachegen/qmlcache.prf ++++ b/tools/qmlcachegen/qmlcache.prf +@@ -44,7 +44,7 @@ defineReplace(qmlCacheOutputFileName) { + } + + qmlcacheinst.base = $$QMLCACHE_DESTDIR +-qmlcacheinst.path = $$[QT_INSTALL_QML]/$$TARGETPATH ++qmlcacheinst.path = $$NIX_OUTPUT_QML/$$TARGETPATH + qmlcacheinst.CONFIG = no_check_exist + + qmlcachegen.input = CACHEGEN_FILES diff --git a/pkgs/development/libraries/qt-5/5.9/qtdeclarative/default.nix b/pkgs/development/libraries/qt-5/5.9/qtdeclarative/default.nix deleted file mode 100644 index 39b4d35ef36..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtdeclarative/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ stdenv, qtSubmodule, copyPathsToStore, python2, qtbase, qtsvg, qtxmlpatterns }: - -with stdenv.lib; - -qtSubmodule { - name = "qtdeclarative"; - patches = copyPathsToStore (readPathsFromFile ./. ./series); - qtInputs = [ qtbase qtsvg qtxmlpatterns ]; - nativeBuildInputs = [ python2 ]; - outputs = [ "bin" "dev" "out" ]; - - preConfigure = '' - NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QML2_IMPORT_PREFIX=\"$qtQmlPrefix\"" - ''; - - postInstall = '' - moveToOutput "$qtPluginPrefix" "$bin" - moveToOutput "$qtQmlPrefix" "$bin" - ''; -} diff --git a/pkgs/development/libraries/qt-5/5.9/qtdeclarative/import-paths.patch b/pkgs/development/libraries/qt-5/5.9/qtdeclarative/import-paths.patch deleted file mode 100644 index d50ee823a78..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtdeclarative/import-paths.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: qtdeclarative-opensource-src-5.8.0/src/qml/qml/qqmlimport.cpp -=================================================================== ---- qtdeclarative-opensource-src-5.8.0.orig/src/qml/qml/qqmlimport.cpp -+++ qtdeclarative-opensource-src-5.8.0/src/qml/qml/qqmlimport.cpp -@@ -1630,6 +1630,15 @@ QQmlImportDatabase::QQmlImportDatabase(Q - QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); - addImportPath(installImportsPath); - -+ // Add import paths derived from PATH -+ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':'); -+ const QString qmldir = QStringLiteral("../" NIXPKGS_QML2_IMPORT_PREFIX); -+ for (const QString &path: paths) { -+ if (!path.isEmpty()) { -+ addImportPath(QDir::cleanPath(path + QDir::separator() + qmldir)); -+ } -+ } -+ - // env import paths - if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty("QML2_IMPORT_PATH"))) { - const QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH"); diff --git a/pkgs/development/libraries/qt-5/5.9/qtdeclarative/series b/pkgs/development/libraries/qt-5/5.9/qtdeclarative/series deleted file mode 100644 index 38abb916a50..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtdeclarative/series +++ /dev/null @@ -1 +0,0 @@ -import-paths.patch diff --git a/pkgs/development/libraries/qt-5/5.9/qtdoc.nix b/pkgs/development/libraries/qt-5/5.9/qtdoc.nix deleted file mode 100644 index 7f979ee94c0..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtdoc.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ qtSubmodule, qtdeclarative }: - -qtSubmodule { - name = "qtdoc"; - qtInputs = [ qtdeclarative ]; - outputs = [ "out" ]; -} diff --git a/pkgs/development/libraries/qt-5/5.9/qtgraphicaleffects.nix b/pkgs/development/libraries/qt-5/5.9/qtgraphicaleffects.nix deleted file mode 100644 index 3273f12eb83..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtgraphicaleffects.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ qtSubmodule, qtdeclarative }: - -qtSubmodule { - name = "qtgraphicaleffects"; - qtInputs = [ qtdeclarative ]; -} diff --git a/pkgs/development/libraries/qt-5/5.9/qtimageformats.nix b/pkgs/development/libraries/qt-5/5.9/qtimageformats.nix deleted file mode 100644 index 03d0fffbe80..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtimageformats.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ qtSubmodule, qtbase }: - -qtSubmodule { - name = "qtimageformats"; - qtInputs = [ qtbase ]; -} diff --git a/pkgs/development/libraries/qt-5/5.9/qtlocation.nix b/pkgs/development/libraries/qt-5/5.9/qtlocation.nix deleted file mode 100644 index f883fd4ff40..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtlocation.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ qtSubmodule, qtbase, qtmultimedia }: - -qtSubmodule { - name = "qtlocation"; - qtInputs = [ qtbase qtmultimedia ]; - outputs = [ "bin" "dev" "out" ]; - postInstall = '' - moveToOutput "$qtPluginPrefix" "$bin" - moveToOutput "$qtQmlPrefix" "$bin" - ''; - # Linking with -lclipper fails with parallel build enabled - enableParallelBuilding = false; -} diff --git a/pkgs/development/libraries/qt-5/5.9/qtmacextras.nix b/pkgs/development/libraries/qt-5/5.9/qtmacextras.nix deleted file mode 100644 index 582294cc7f7..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtmacextras.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ qtSubmodule, qtbase, lib }: - -qtSubmodule { - name = "qtmacextras"; - qtInputs = [ qtbase ]; - meta = with lib; { - maintainers = with maintainers; [ periklis ]; - platforms = platforms.darwin; - }; -} diff --git a/pkgs/development/libraries/qt-5/5.9/qtmultimedia.nix b/pkgs/development/libraries/qt-5/5.9/qtmultimedia.nix deleted file mode 100644 index 1c728b036ad..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtmultimedia.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ stdenv, qtSubmodule, qtbase, qtdeclarative, pkgconfig -, alsaLib, gstreamer, gst-plugins-base, libpulseaudio -, darwin -}: - -with stdenv.lib; - -qtSubmodule { - name = "qtmultimedia"; - qtInputs = [ qtbase qtdeclarative ]; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ gstreamer gst-plugins-base libpulseaudio] - ++ optional (stdenv.isLinux) alsaLib; - outputs = [ "bin" "dev" "out" ]; - qmakeFlags = [ "GST_VERSION=1.0" ]; - NIX_LDFLAGS = optionalString (stdenv.isDarwin) "-lobjc"; - postInstall = '' - moveToOutput "$qtPluginPrefix" "$bin" - moveToOutput "$qtQmlPrefix" "$bin" - ''; -} diff --git a/pkgs/development/libraries/qt-5/5.9/qtquickcontrols.nix b/pkgs/development/libraries/qt-5/5.9/qtquickcontrols.nix deleted file mode 100644 index 93a864621b8..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtquickcontrols.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ qtSubmodule, qtdeclarative }: - -qtSubmodule { - name = "qtquickcontrols"; - qtInputs = [ qtdeclarative ]; -} diff --git a/pkgs/development/libraries/qt-5/5.9/qtquickcontrols2.nix b/pkgs/development/libraries/qt-5/5.9/qtquickcontrols2.nix deleted file mode 100644 index 37d7d59f815..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtquickcontrols2.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ qtSubmodule, qtdeclarative }: - -qtSubmodule { - name = "qtquickcontrols2"; - qtInputs = [ qtdeclarative ]; - outputs = [ "bin" "dev" "out" ]; - postInstall = '' - moveToOutput "$qtQmlPrefix" "$bin" - ''; -} diff --git a/pkgs/development/libraries/qt-5/5.9/qtscript.patch b/pkgs/development/libraries/qt-5/5.9/qtscript.patch new file mode 100644 index 00000000000..5508dec1280 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.9/qtscript.patch @@ -0,0 +1,13 @@ +diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h +index 1f6d25e..087c3fb 100644 +--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h ++++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h +@@ -81,7 +81,7 @@ + #include + #elif PLATFORM(GTK) + #include +-typedef struct _GMutex GMutex; ++typedef union _GMutex GMutex; + typedef struct _GCond GCond; + #endif + diff --git a/pkgs/development/libraries/qt-5/5.9/qtscript/0001-glib-2.32.patch b/pkgs/development/libraries/qt-5/5.9/qtscript/0001-glib-2.32.patch deleted file mode 100644 index 887e107b6c1..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtscript/0001-glib-2.32.patch +++ /dev/null @@ -1,25 +0,0 @@ -From abd80356449bb36c8adcc5c9ca1df6b47715d265 Mon Sep 17 00:00:00 2001 -From: Thomas Tuegel -Date: Sun, 23 Aug 2015 09:13:34 -0500 -Subject: [PATCH] glib-2.32 - ---- - src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h -index 1f6d25e..087c3fb 100644 ---- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h -+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h -@@ -81,7 +81,7 @@ - #include - #elif PLATFORM(GTK) - #include --typedef struct _GMutex GMutex; -+typedef union _GMutex GMutex; - typedef struct _GCond GCond; - #endif - --- -2.5.0 - diff --git a/pkgs/development/libraries/qt-5/5.9/qtscript/default.nix b/pkgs/development/libraries/qt-5/5.9/qtscript/default.nix deleted file mode 100644 index 127766e2ebd..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtscript/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ qtSubmodule, qtbase, qttools }: - -qtSubmodule { - name = "qtscript"; - qtInputs = [ qtbase qttools ]; - patches = [ ./0001-glib-2.32.patch ]; -} diff --git a/pkgs/development/libraries/qt-5/5.9/qtsensors.nix b/pkgs/development/libraries/qt-5/5.9/qtsensors.nix deleted file mode 100644 index 4127d00b769..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtsensors.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ stdenv, qtSubmodule, qtbase, qtdeclarative }: - -with stdenv.lib; - -qtSubmodule { - name = "qtsensors"; - qtInputs = [ qtbase qtdeclarative ]; - outputs = [ "bin" "dev" "out" ]; - postInstall = '' - moveToOutput "$qtPluginPrefix" "$bin" - moveToOutput "$qtQmlPrefix" "$bin" - ''; -} diff --git a/pkgs/development/libraries/qt-5/5.9/qtserialport.patch b/pkgs/development/libraries/qt-5/5.9/qtserialport.patch new file mode 100644 index 00000000000..f25524e80bc --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.9/qtserialport.patch @@ -0,0 +1,22 @@ +diff --git a/src/serialport/qtudev_p.h b/src/serialport/qtudev_p.h +index af2dab2..8e17f64 100644 +--- a/src/serialport/qtudev_p.h ++++ b/src/serialport/qtudev_p.h +@@ -111,9 +111,17 @@ inline QFunctionPointer resolveSymbol(QLibrary *udevLibrary, const char *symbolN + inline bool resolveSymbols(QLibrary *udevLibrary) + { + if (!udevLibrary->isLoaded()) { ++#ifdef NIXPKGS_LIBUDEV ++ udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 1); ++#else + udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1); ++#endif + if (!udevLibrary->load()) { ++#ifdef NIXPKGS_LIBUDEV ++ udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 0); ++#else + udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0); ++#endif + if (!udevLibrary->load()) { + qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0); + return false; diff --git a/pkgs/development/libraries/qt-5/5.9/qtserialport/default.nix b/pkgs/development/libraries/qt-5/5.9/qtserialport/default.nix deleted file mode 100644 index 925e8a808f2..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtserialport/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ stdenv, qtSubmodule, lib, copyPathsToStore, qtbase, substituteAll, systemd }: - -let inherit (lib) getLib optional; in - -qtSubmodule { - name = "qtserialport"; - qtInputs = [ qtbase ]; - patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); - NIX_CFLAGS_COMPILE = - optional stdenv.isLinux - ''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"''; -} diff --git a/pkgs/development/libraries/qt-5/5.9/qtserialport/qtserialport-dlopen-udev.patch b/pkgs/development/libraries/qt-5/5.9/qtserialport/qtserialport-dlopen-udev.patch deleted file mode 100644 index 65bb64710eb..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtserialport/qtserialport-dlopen-udev.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: qtserialport-opensource-src-5.8.0/src/serialport/qtudev_p.h -=================================================================== ---- qtserialport-opensource-src-5.8.0.orig/src/serialport/qtudev_p.h -+++ qtserialport-opensource-src-5.8.0/src/serialport/qtudev_p.h -@@ -111,9 +111,17 @@ inline QFunctionPointer resolveSymbol(QL - inline bool resolveSymbols(QLibrary *udevLibrary) - { - if (!udevLibrary->isLoaded()) { -+#ifdef NIXPKGS_LIBUDEV -+ udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 1); -+#else - udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1); -+#endif - if (!udevLibrary->load()) { -+#ifdef NIXPKGS_LIBUDEV -+ udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 0); -+#else - udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0); -+#endif - if (!udevLibrary->load()) { - qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0); - return false; diff --git a/pkgs/development/libraries/qt-5/5.9/qtserialport/series b/pkgs/development/libraries/qt-5/5.9/qtserialport/series deleted file mode 100644 index 83f4abf094e..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtserialport/series +++ /dev/null @@ -1 +0,0 @@ -qtserialport-dlopen-udev.patch diff --git a/pkgs/development/libraries/qt-5/5.9/qtsvg.nix b/pkgs/development/libraries/qt-5/5.9/qtsvg.nix deleted file mode 100644 index ce419731dfa..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtsvg.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ qtSubmodule, qtbase }: - -qtSubmodule { - name = "qtsvg"; - qtInputs = [ qtbase ]; - outputs = [ "bin" "dev" "out" ]; - postInstall = '' - moveToOutput "$qtPluginPrefix" "$bin" - ''; -} diff --git a/pkgs/development/libraries/qt-5/5.9/qttools.patch b/pkgs/development/libraries/qt-5/5.9/qttools.patch new file mode 100644 index 00000000000..fbba439ef7a --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.9/qttools.patch @@ -0,0 +1,71 @@ +diff --git a/src/assistant/help/Qt5HelpConfigExtras.cmake.in b/src/assistant/help/Qt5HelpConfigExtras.cmake.in +index 3b97923a..63336bd5 100644 +--- a/src/assistant/help/Qt5HelpConfigExtras.cmake.in ++++ b/src/assistant/help/Qt5HelpConfigExtras.cmake.in +@@ -2,11 +2,10 @@ + if (NOT TARGET Qt5::qcollectiongenerator) + add_executable(Qt5::qcollectiongenerator IMPORTED) + +-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Help_install_prefix}/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\") +-!!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\") +-!!ENDIF ++ if(NOT EXISTS \"${imported_location}\") ++ set(imported_location \"$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\") ++ endif() + _qt5_Help_check_file_exists(${imported_location}) + + set_target_properties(Qt5::qcollectiongenerator PROPERTIES +@@ -17,11 +16,7 @@ endif() + if (NOT TARGET Qt5::qhelpgenerator) + add_executable(Qt5::qhelpgenerator IMPORTED) + +-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Help_install_prefix}/$${CMAKE_BIN_DIR}qhelpgenerator$$CMAKE_BIN_SUFFIX\") +-!!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}qhelpgenerator$$CMAKE_BIN_SUFFIX\") +-!!ENDIF + _qt5_Help_check_file_exists(${imported_location}) + + set_target_properties(Qt5::qhelpgenerator PROPERTIES +diff --git a/src/linguist/Qt5LinguistToolsConfig.cmake.in b/src/linguist/Qt5LinguistToolsConfig.cmake.in +index 4318b16f..d60db4ff 100644 +--- a/src/linguist/Qt5LinguistToolsConfig.cmake.in ++++ b/src/linguist/Qt5LinguistToolsConfig.cmake.in +@@ -44,11 +44,7 @@ endmacro() + if (NOT TARGET Qt5::lrelease) + add_executable(Qt5::lrelease IMPORTED) + +-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\") +-!!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\") +-!!ENDIF + _qt5_LinguistTools_check_file_exists(${imported_location}) + + set_target_properties(Qt5::lrelease PROPERTIES +@@ -59,11 +55,7 @@ endif() + if (NOT TARGET Qt5::lupdate) + add_executable(Qt5::lupdate IMPORTED) + +-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\") +-!!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\") +-!!ENDIF + _qt5_LinguistTools_check_file_exists(${imported_location}) + + set_target_properties(Qt5::lupdate PROPERTIES +@@ -74,11 +66,7 @@ endif() + if (NOT TARGET Qt5::lconvert) + add_executable(Qt5::lconvert IMPORTED) + +-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\") +-!!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\") +-!!ENDIF + _qt5_LinguistTools_check_file_exists(${imported_location}) + + set_target_properties(Qt5::lconvert PROPERTIES diff --git a/pkgs/development/libraries/qt-5/5.9/qttools/cmake-paths.patch b/pkgs/development/libraries/qt-5/5.9/qttools/cmake-paths.patch deleted file mode 100644 index dfcba9045a7..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qttools/cmake-paths.patch +++ /dev/null @@ -1,88 +0,0 @@ -Index: qttools-opensource-src-5.8.0/src/assistant/help/Qt5HelpConfigExtras.cmake.in -=================================================================== ---- qttools-opensource-src-5.8.0.orig/src/assistant/help/Qt5HelpConfigExtras.cmake.in -+++ qttools-opensource-src-5.8.0/src/assistant/help/Qt5HelpConfigExtras.cmake.in -@@ -2,11 +2,10 @@ - if (NOT TARGET Qt5::qcollectiongenerator) - add_executable(Qt5::qcollectiongenerator IMPORTED) - --!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) -- set(imported_location \"${_qt5Help_install_prefix}/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\") --!!ELSE -- set(imported_location \"$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\") --!!ENDIF -+ set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\") -+ if(NOT EXISTS \"${imported_location}\") -+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\") -+ endif() - _qt5_Help_check_file_exists(${imported_location}) - - set_target_properties(Qt5::qcollectiongenerator PROPERTIES -@@ -17,11 +16,10 @@ endif() - if (NOT TARGET Qt5::qhelpgenerator) - add_executable(Qt5::qhelpgenerator IMPORTED) - --!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) -- set(imported_location \"${_qt5Help_install_prefix}/$${CMAKE_BIN_DIR}qhelpgenerator$$CMAKE_BIN_SUFFIX\") --!!ELSE -- set(imported_location \"$${CMAKE_BIN_DIR}qhelpgenerator$$CMAKE_BIN_SUFFIX\") --!!ENDIF -+ set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}qhelpgenerator$$CMAKE_BIN_SUFFIX\") -+ if(NOT EXISTS \"${imported_location}\") -+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}qhelpgenerator$$CMAKE_BIN_SUFFIX\") -+ endif() - _qt5_Help_check_file_exists(${imported_location}) - - set_target_properties(Qt5::qhelpgenerator PROPERTIES -Index: qttools-opensource-src-5.8.0/src/linguist/Qt5LinguistToolsConfig.cmake.in -=================================================================== ---- qttools-opensource-src-5.8.0.orig/src/linguist/Qt5LinguistToolsConfig.cmake.in -+++ qttools-opensource-src-5.8.0/src/linguist/Qt5LinguistToolsConfig.cmake.in -@@ -44,11 +44,10 @@ endmacro() - if (NOT TARGET Qt5::lrelease) - add_executable(Qt5::lrelease IMPORTED) - --!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) -- set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\") --!!ELSE -- set(imported_location \"$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\") --!!ENDIF -+ set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\") -+ if(NOT EXISTS \"${imported_location}\") -+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\") -+ endif() - _qt5_LinguistTools_check_file_exists(${imported_location}) - - set_target_properties(Qt5::lrelease PROPERTIES -@@ -59,11 +58,10 @@ endif() - if (NOT TARGET Qt5::lupdate) - add_executable(Qt5::lupdate IMPORTED) - --!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) -- set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\") --!!ELSE -- set(imported_location \"$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\") --!!ENDIF -+ set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\") -+ if(NOT EXISTS \"${imported_location}\") -+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\") -+ endif() - _qt5_LinguistTools_check_file_exists(${imported_location}) - - set_target_properties(Qt5::lupdate PROPERTIES -@@ -74,11 +72,10 @@ endif() - if (NOT TARGET Qt5::lconvert) - add_executable(Qt5::lconvert IMPORTED) - --!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) -- set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\") --!!ELSE -- set(imported_location \"$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\") --!!ENDIF -+ set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\") -+ if(NOT EXISTS \"${imported_location}\") -+ set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\") -+ endif() - _qt5_LinguistTools_check_file_exists(${imported_location}) - - set_target_properties(Qt5::lconvert PROPERTIES diff --git a/pkgs/development/libraries/qt-5/5.9/qttools/default.nix b/pkgs/development/libraries/qt-5/5.9/qttools/default.nix deleted file mode 100644 index 38d8f1ebe64..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qttools/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ stdenv, qtSubmodule, copyPathsToStore, qtbase }: - -with stdenv.lib; - -qtSubmodule { - name = "qttools"; - qtInputs = [ qtbase ]; - outputs = [ "bin" "dev" "out" ]; - patches = copyPathsToStore (readPathsFromFile ./. ./series); - # qmake moves all binaries to $dev in preFixup - postFixup = '' - moveToOutput "bin/qdbus" "$bin" - moveToOutput "bin/qdbusviewer" "$bin" - moveToOutput "bin/qtpaths" "$bin" - ''; -} diff --git a/pkgs/development/libraries/qt-5/5.9/qttools/series b/pkgs/development/libraries/qt-5/5.9/qttools/series deleted file mode 100644 index 6cc1d3b87bc..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qttools/series +++ /dev/null @@ -1 +0,0 @@ -cmake-paths.patch diff --git a/pkgs/development/libraries/qt-5/5.9/qttranslations.nix b/pkgs/development/libraries/qt-5/5.9/qttranslations.nix deleted file mode 100644 index 50fc8cf6826..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qttranslations.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ qtSubmodule, qttools }: - -qtSubmodule { - name = "qttranslations"; - qtInputs = [ qttools ]; -} diff --git a/pkgs/development/libraries/qt-5/5.9/qtwayland.nix b/pkgs/development/libraries/qt-5/5.9/qtwayland.nix deleted file mode 100644 index 8b3072c5534..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtwayland.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ qtSubmodule, qtbase, qtquickcontrols, wayland, pkgconfig }: - -qtSubmodule { - name = "qtwayland"; - qtInputs = [ qtbase qtquickcontrols ]; - buildInputs = [ wayland ]; - nativeBuildInputs = [ pkgconfig ]; - outputs = [ "bin" "dev" "out" ]; - postInstall = '' - moveToOutput "$qtPluginPrefix" "$bin" - moveToOutput "$qtQmlPrefix" "$bin" - ''; -} diff --git a/pkgs/development/libraries/qt-5/5.9/qtwebchannel.nix b/pkgs/development/libraries/qt-5/5.9/qtwebchannel.nix deleted file mode 100644 index e6a2d74e714..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtwebchannel.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ qtSubmodule, qtbase, qtdeclarative }: - -qtSubmodule { - name = "qtwebchannel"; - qtInputs = [ qtbase qtdeclarative ]; - outputs = [ "bin" "dev" "out" ]; - postInstall = '' - moveToOutput "$qtQmlPrefix" "$bin" - ''; -} - diff --git a/pkgs/development/libraries/qt-5/5.9/qtwebengine-paxmark-mksnapshot.patch b/pkgs/development/libraries/qt-5/5.9/qtwebengine-paxmark-mksnapshot.patch new file mode 100644 index 00000000000..5e170567ce5 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.9/qtwebengine-paxmark-mksnapshot.patch @@ -0,0 +1,48 @@ +Index: qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/src/v8.gyp +=================================================================== +--- qtwebengine-opensource-src-5.9.0.orig/src/3rdparty/chromium/v8/src/v8.gyp ++++ qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/src/v8.gyp +@@ -36,6 +36,7 @@ + 'v8_experimental_extra_library_files%': [], + 'v8_enable_inspector%': 0, + 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)', ++ 'mksnapshot_u_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot_u<(EXECUTABLE_SUFFIX)', + 'mkpeephole_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mkpeephole<(EXECUTABLE_SUFFIX)', + 'v8_os_page_size%': 0, + }, +@@ -2432,7 +2433,7 @@ + ] + }, + { +- 'target_name': 'mksnapshot', ++ 'target_name': 'mksnapshot_u', + 'type': 'executable', + 'dependencies': [ + 'v8_base', +@@ -2485,5 +2486,26 @@ + }], + ], + }, ++ { ++ 'target_name': 'mksnapshot', ++ 'type': 'executable', ++ 'dependencies': ['mksnapshot_u'], ++ 'actions': [ ++ { ++ 'action_name': 'paxmark_m_mksnapshot', ++ 'inputs': [ ++ '<(mksnapshot_u_exec)', ++ ], ++ 'outputs': [ ++ '<(mksnapshot_exec)', ++ ], ++ 'action': [ ++ 'sh', ++ '-c', ++ 'cp <(mksnapshot_u_exec) <(mksnapshot_exec) && paxctl -czexm <(mksnapshot_exec)', ++ ], ++ }, ++ ], ++ }, + ], + } diff --git a/pkgs/development/libraries/qt-5/5.9/qtwebengine/default.nix b/pkgs/development/libraries/qt-5/5.9/qtwebengine/default.nix deleted file mode 100644 index 58716f65738..00000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtwebengine/default.nix +++ /dev/null @@ -1,117 +0,0 @@ -{ qtSubmodule, qtquickcontrols, qtlocation, qtwebchannel - -, bison, coreutils, flex, git, gperf, ninja, pkgconfig, python2, which - -, xlibs, libXcursor, libXScrnSaver, libXrandr, libXtst -, fontconfig, freetype, harfbuzz, icu, dbus -, zlib, minizip, libjpeg, libpng, libtiff, libwebp, libopus -, jsoncpp, protobuf, libvpx, srtp, snappy, nss, libevent -, alsaLib -, libcap -, pciutils -, systemd - -, enableProprietaryCodecs ? true - -, lib, stdenv # lib.optional, needsPax -}: - -with stdenv.lib; - -qtSubmodule { - name = "qtwebengine"; - qtInputs = [ qtquickcontrols qtlocation qtwebchannel ]; - nativeBuildInputs = [ - bison coreutils flex git gperf ninja pkgconfig python2 which - ]; - doCheck = true; - outputs = [ "bin" "dev" "out" ]; - - enableParallelBuilding = true; - - postPatch = - # Patch Chromium build tools - '' - ( cd src/3rdparty/chromium; patchShebangs . ) - '' - # Patch Chromium build files - + '' - substituteInPlace ./src/3rdparty/chromium/build/common.gypi \ - --replace /bin/echo ${coreutils}/bin/echo - substituteInPlace ./src/3rdparty/chromium/v8/gypfiles/toolchain.gypi \ - --replace /bin/echo ${coreutils}/bin/echo - substituteInPlace ./src/3rdparty/chromium/v8/gypfiles/standalone.gypi \ - --replace /bin/echo ${coreutils}/bin/echo - '' - # Patch library paths in Qt sources - + '' - sed -i \ - -e "s,QLibraryInfo::location(QLibraryInfo::DataPath),QLatin1String(\"$out\"),g" \ - -e "s,QLibraryInfo::location(QLibraryInfo::TranslationsPath),QLatin1String(\"$out/translations\"),g" \ - -e "s,QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath),QLatin1String(\"$out/libexec\"),g" \ - src/core/web_engine_library_info.cpp - '' - # Patch library paths in Chromium sources - + optionalString (!stdenv.isDarwin) '' - sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${systemd.lib}/lib/\1!' \ - src/3rdparty/chromium/device/udev_linux/udev?_loader.cc - - sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \ - src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc - ''; - - preConfigure = '' - export MAKEFLAGS=-j$NIX_BUILD_CORES - ''; - - qmakeFlags = - [ - # Use system Ninja because bootstrapping it is fragile - "WEBENGINE_CONFIG+=use_system_ninja" - ] ++ optional enableProprietaryCodecs "WEBENGINE_CONFIG+=use_proprietary_codecs"; - - propagatedBuildInputs = [ - # Image formats - libjpeg libpng libtiff libwebp - - # Video formats - srtp libvpx - - # Audio formats - libopus - - # Text rendering - harfbuzz icu - ] - ++ optionals (!stdenv.isDarwin) [ - dbus zlib minizip snappy nss protobuf jsoncpp libevent - - # Audio formats - alsaLib - - # Text rendering - fontconfig freetype - - libcap - pciutils - - # X11 libs - xlibs.xrandr libXScrnSaver libXcursor libXrandr xlibs.libpciaccess libXtst - xlibs.libXcomposite - ]; - patches = optional stdenv.needsPax ./qtwebengine-paxmark-mksnapshot.patch; - - dontUseNinjaBuild = true; - dontUseNinjaInstall = true; - - postInstall = '' - cat > $out/libexec/qt.conf < dconf != null; +assert withGtk3 -> gtk3 != null; + +let + system-x86_64 = lib.elem stdenv.system lib.platforms.x86_64; +in + +stdenv.mkDerivation { + + name = "qtbase-${version}"; + inherit qtCompatVersion src version; + + propagatedBuildInputs = + [ + libxml2 libxslt openssl sqlite zlib + + # Text rendering + harfbuzz icu + + # Image formats + libjpeg libpng libtiff + ] + ++ (if builtins.compareVersions version "5.9.0" >= 0 + then [ pcre2 ] else [ pcre16 ]) + + ++ lib.optional (mesaSupported && !stdenv.isDarwin) mesa + + ++ lib.optionals (!stdenv.isDarwin) [ + dbus glib udev + + # Text rendering + fontconfig freetype + + # X11 libs + libX11 libXcomposite libXext libXi libXrender libxcb libxkbcommon xcbutil + xcbutilimage xcbutilkeysyms xcbutilrenderutil xcbutilwm + ] + + ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + AGL AppKit ApplicationServices Carbon Cocoa + CoreAudio CoreBluetooth CoreLocation CoreServices + DiskArbitration Foundation OpenGL + darwin.libobjc libiconv + ]); + + buildInputs = [ ] + ++ lib.optional (!stdenv.isDarwin && withGtk3) gtk3 + ++ lib.optional (!stdenv.isDarwin) libinput + ++ lib.optional developerBuild gdb + ++ lib.optional (cups != null) cups + ++ lib.optional (mysql != null) mysql.lib + ++ lib.optional (postgresql != null) postgresql; + + nativeBuildInputs = + [ bison flex gperf lndir perl pkgconfig python2 ] + ++ lib.optional (!stdenv.isDarwin) patchelf; + + propagatedNativeBuildInputs = [ lndir ]; + + outputs = [ "bin" "dev" "out" ]; + + inherit patches; + + fix_qt_static_libs = ../hooks/fix-qt-static-libs.sh; + fix_qt_builtin_paths = ../hooks/fix-qt-builtin-paths.sh; + fix_qt_module_paths = ../hooks/fix-qt-module-paths.sh; + preHook = '' + . "$fix_qt_static_libs" + . "$fix_qt_builtin_paths" + . "$fix_qt_module_paths" + . ${../hooks/move-qt-dev-tools.sh} + ''; + + postPatch = + '' + for prf in qml_plugin.prf qt_plugin.prf qt_docs.prf qml_module.prf create_cmake.prf; do + substituteInPlace "mkspecs/features/$prf" \ + --subst-var qtPluginPrefix \ + --subst-var qtQmlPrefix \ + --subst-var qtDocPrefix + done + + substituteInPlace configure --replace /bin/pwd pwd + substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls + sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i mkspecs/*/*.conf + + sed -i '/PATHS.*NO_DEFAULT_PATH/ d' src/corelib/Qt5Config.cmake.in + sed -i '/PATHS.*NO_DEFAULT_PATH/ d' src/corelib/Qt5CoreMacros.cmake + sed -i 's/NO_DEFAULT_PATH//' src/gui/Qt5GuiConfigExtras.cmake.in + sed -i '/PATHS.*NO_DEFAULT_PATH/ d' mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in + '' + + + lib.optionalString (mesaSupported && !stdenv.isDarwin) '' + sed -i mkspecs/common/linux.conf \ + -e "/^QMAKE_INCDIR_OPENGL/ s|$|${mesa.dev or mesa}/include|" \ + -e "/^QMAKE_LIBDIR_OPENGL/ s|$|${mesa.out}/lib|" + '' + + + lib.optionalString stdenv.isDarwin '' + sed -i \ + -e 's|! /usr/bin/xcode-select --print-path >/dev/null 2>&1;|false;|' \ + -e 's|! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1;|false;|' \ + -e 's|sysroot=$(/usr/bin/xcodebuild -sdk $sdk -version Path 2>/dev/null)|sysroot=/nonsense|' \ + -e 's|sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null)|sysroot=/nonsense|' \ + -e 's|QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`|QMAKE_CXX="clang++"\nQMAKE_CONF_COMPILER="clang++"|' \ + -e 's|XCRUN=`/usr/bin/xcrun -sdk macosx clang -v 2>&1`|XCRUN="clang -v 2>&1"|' \ + -e 's#sdk_val=$(/usr/bin/xcrun -sdk $sdk -find $(echo $val | cut -d \x27 \x27 -f 1))##' \ + -e 's#val=$(echo $sdk_val $(echo $val | cut -s -d \x27 \x27 -f 2-))##' \ + ./configure + substituteInPlace ./mkspecs/common/mac.conf \ + --replace "/System/Library/Frameworks/OpenGL.framework/" "${darwin.apple_sdk.frameworks.OpenGL}/Library/Frameworks/OpenGL.framework/" + substituteInPlace ./mkspecs/common/mac.conf \ + --replace "/System/Library/Frameworks/AGL.framework/" "${darwin.apple_sdk.frameworks.AGL}/Library/Frameworks/AGL.framework/" + ''; + # Note on the above: \x27 is a way if including a single-quote + # character in the sed string arguments. + + qtPluginPrefix = "lib/qt-${qtCompatVersion}/plugins"; + qtQmlPrefix = "lib/qt-${qtCompatVersion}/qml"; + qtDocPrefix = "share/doc/qt-${qtCompatVersion}"; + + setOutputFlags = false; + preConfigure = '' + export LD_LIBRARY_PATH="$PWD/lib:$PWD/plugins/platforms:$LD_LIBRARY_PATH" + ${lib.optionalString (builtins.compareVersions version "5.9.0" < 0) '' + # We need to set LD to CXX or otherwise we get nasty compile errors + export LD=$CXX + ''} + + configureFlags+="\ + -plugindir $out/$qtPluginPrefix \ + -qmldir $out/$qtQmlPrefix \ + -docdir $out/$qtDocPrefix" + + createQmakeCache() { + cat >>"$1" <= 0 + then [ (if system-x86_64 then "-sse2" else "-no-sse2") ] + else lib.optional (!system-x86_64) "-no-sse2") + ++ [ + "-no-sse3" + "-no-ssse3" + "-no-sse4.1" + "-no-sse4.2" + "-no-avx" + "-no-avx2" + "-no-mips_dsp" + "-no-mips_dspr2" + ] + + ++ [ + "-system-zlib" + "-system-libjpeg" + "-system-harfbuzz" + "-system-pcre" + "-openssl-linked" + "-system-sqlite" + ''-${if mysql != null then "plugin" else "no"}-sql-mysql'' + ''-${if postgresql != null then "plugin" else "no"}-sql-psql'' + + "-make libs" + "-make tools" + ''-${lib.optionalString (buildExamples == false) "no"}make examples'' + ''-${lib.optionalString (buildTests == false) "no"}make tests'' + "-v" + ] + + ++ lib.optionals (!stdenv.isDarwin) [ + "-${lib.optionalString (builtins.compareVersions version "5.9.0" < 0) "no-"}rpath" + + "-system-xcb" + "-xcb" + "-qpa xcb" + + "-system-xkbcommon" + "-libinput" + "-xkbcommon-evdev" + + "-no-eglfs" + "-no-gbm" + "-no-kms" + "-no-linuxfb" + + ''-${lib.optionalString (cups == null) "no-"}cups'' + "-dbus-linked" + "-glib" + "-system-libjpeg" + "-system-libpng" + # gold linker of binutils 2.28 generates duplicate symbols + # TODO: remove for newer version of binutils + "-no-use-gold-linker" + ] + ++ lib.optional withGtk3 "-gtk" + ++ lib.optional (builtins.compareVersions version "5.9.0" >= 0) "-inotify" + + ++ lib.optionals stdenv.isDarwin [ + "-platform macx-clang" + "-no-use-gold-linker" + "-no-fontconfig" + "-qt-freetype" + "-qt-libpng" + ]; + + enableParallelBuilding = true; + + postInstall = + # Move selected outputs. + '' + moveToOutput "mkspecs" "$dev" + ''; + + devTools = [ + "bin/fixqt4headers.pl" + "bin/moc" + "bin/qdbuscpp2xml" + "bin/qdbusxml2cpp" + "bin/qlalr" + "bin/qmake" + "bin/rcc" + "bin/syncqt.pl" + "bin/uic" + ]; + + postFixup = + # Don't retain build-time dependencies like gdb. + '' + sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri + '' + + + '' + fixQtModulePaths "''${!outputDev}/mkspecs/modules" + fixQtBuiltinPaths "''${!outputDev}" '*.pr?' + '' + + # Move static libraries and QMake library definitions into $dev. + + '' + fixQtStaticLibs "''${!outputLib}" "''${!outputDev}" + '' + + # Move development tools to $dev + + '' + moveQtDevTools + moveToOutput bin "$dev" + '' + + # fixup .pc file (where to find 'moc' etc.) + + lib.optionalString (!stdenv.isDarwin) '' + sed -i "$dev/lib/pkgconfig/Qt5Core.pc" \ + -e "/^host_bins=/ c host_bins=$dev/bin" + '' + + + lib.optionalString stdenv.isDarwin '' + fixDarwinDylibNames_rpath() { + local flags=() + + for fn in "$@"; do + flags+=(-change "@rpath/$fn.framework/Versions/5/$fn" "$out/lib/$fn.framework/Versions/5/$fn") + done + + for fn in "$@"; do + echo "$fn: fixing dylib" + install_name_tool -id "$out/lib/$fn.framework/Versions/5/$fn" "''${flags[@]}" "$out/lib/$fn.framework/Versions/5/$fn" + done + } + fixDarwinDylibNames_rpath "QtConcurrent" "QtPrintSupport" "QtCore" "QtSql" "QtDBus" "QtTest" "QtGui" "QtWidgets" "QtNetwork" "QtXml" "QtOpenGL" + ''; + + setupHook = ../hooks/qtbase-setup-hook.sh; + + meta = with lib; { + homepage = http://www.qt.io; + description = "A cross-platform application framework for C++"; + license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ]; + maintainers = with maintainers; [ qknight ttuegel periklis ]; + platforms = platforms.unix; + }; + +} diff --git a/pkgs/development/libraries/qt-5/modules/qtcharts.nix b/pkgs/development/libraries/qt-5/modules/qtcharts.nix new file mode 100644 index 00000000000..84d3a17ea8c --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtcharts.nix @@ -0,0 +1,7 @@ +{ qtModule, qtbase, qtdeclarative }: + +qtModule { + name = "qtcharts"; + qtInputs = [ qtbase qtdeclarative ]; + outputs = [ "out" "dev" "bin" ]; +} diff --git a/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix b/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix new file mode 100644 index 00000000000..d866edb052b --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix @@ -0,0 +1,8 @@ +{ qtModule, qtbase, qtdeclarative, bluez }: + +qtModule { + name = "qtconnectivity"; + qtInputs = [ qtbase qtdeclarative ]; + buildInputs = [ bluez ]; + outputs = [ "out" "dev" "bin" ]; +} diff --git a/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix b/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix new file mode 100644 index 00000000000..fc0a751f48a --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix @@ -0,0 +1,25 @@ +{ qtModule, lib, python2, qtbase, qtsvg, qtxmlpatterns }: + +with lib; + +qtModule { + name = "qtdeclarative"; + qtInputs = [ qtbase qtsvg qtxmlpatterns ]; + nativeBuildInputs = [ python2 ]; + outputs = [ "out" "dev" "bin" ]; + preConfigure = '' + NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QML2_IMPORT_PREFIX=\"$qtQmlPrefix\"" + ''; + devTools = [ + "bin/qml" + "bin/qmlcachegen" + "bin/qmleasing" + "bin/qmlimportscanner" + "bin/qmllint" + "bin/qmlmin" + "bin/qmlplugindump" + "bin/qmlprofiler" + "bin/qmlscene" + "bin/qmltestrunner" + ]; +} diff --git a/pkgs/development/libraries/qt-5/modules/qtdoc.nix b/pkgs/development/libraries/qt-5/modules/qtdoc.nix new file mode 100644 index 00000000000..10623962c43 --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtdoc.nix @@ -0,0 +1,7 @@ +{ qtModule, qtdeclarative }: + +qtModule { + name = "qtdoc"; + qtInputs = [ qtdeclarative ]; + outputs = [ "out" ]; +} diff --git a/pkgs/development/libraries/qt-5/modules/qtgraphicaleffects.nix b/pkgs/development/libraries/qt-5/modules/qtgraphicaleffects.nix new file mode 100644 index 00000000000..888f627baab --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtgraphicaleffects.nix @@ -0,0 +1,7 @@ +{ qtModule, qtdeclarative }: + +qtModule { + name = "qtgraphicaleffects"; + qtInputs = [ qtdeclarative ]; + outputs = [ "out" ]; +} diff --git a/pkgs/development/libraries/qt-5/modules/qtimageformats.nix b/pkgs/development/libraries/qt-5/modules/qtimageformats.nix new file mode 100644 index 00000000000..1a7726070be --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtimageformats.nix @@ -0,0 +1,6 @@ +{ qtModule, qtbase }: + +qtModule { + name = "qtimageformats"; + qtInputs = [ qtbase ]; +} diff --git a/pkgs/development/libraries/qt-5/modules/qtlocation.nix b/pkgs/development/libraries/qt-5/modules/qtlocation.nix new file mode 100644 index 00000000000..008583ebaf9 --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtlocation.nix @@ -0,0 +1,9 @@ +{ qtModule, qtbase, qtmultimedia }: + +qtModule { + name = "qtlocation"; + qtInputs = [ qtbase qtmultimedia ]; + outputs = [ "bin" "out" "dev" ]; + # Linking with -lclipper fails with parallel build enabled + enableParallelBuilding = false; +} diff --git a/pkgs/development/libraries/qt-5/modules/qtmacextras.nix b/pkgs/development/libraries/qt-5/modules/qtmacextras.nix new file mode 100644 index 00000000000..5a3b1fe35cd --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtmacextras.nix @@ -0,0 +1,10 @@ +{ qtModule, qtbase, lib }: + +qtModule { + name = "qtmacextras"; + qtInputs = [ qtbase ]; + meta = with lib; { + maintainers = with maintainers; [ periklis ]; + platforms = platforms.darwin; + }; +} diff --git a/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix b/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix new file mode 100644 index 00000000000..1b7a7c1fcea --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix @@ -0,0 +1,17 @@ +{ qtModule, stdenv, qtbase, qtdeclarative, pkgconfig +, alsaLib, gstreamer, gst-plugins-base, libpulseaudio +, darwin +}: + +with stdenv.lib; + +qtModule { + name = "qtmultimedia"; + qtInputs = [ qtbase qtdeclarative ]; + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ gstreamer gst-plugins-base libpulseaudio] + ++ optional (stdenv.isLinux) alsaLib; + outputs = [ "bin" "dev" "out" ]; + qmakeFlags = [ "GST_VERSION=1.0" ]; + NIX_LDFLAGS = optionalString (stdenv.isDarwin) "-lobjc"; +} diff --git a/pkgs/development/libraries/qt-5/modules/qtquickcontrols.nix b/pkgs/development/libraries/qt-5/modules/qtquickcontrols.nix new file mode 100644 index 00000000000..ba0f20bc0d8 --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtquickcontrols.nix @@ -0,0 +1,6 @@ +{ qtModule, qtdeclarative }: + +qtModule { + name = "qtquickcontrols"; + qtInputs = [ qtdeclarative ]; +} diff --git a/pkgs/development/libraries/qt-5/modules/qtquickcontrols2.nix b/pkgs/development/libraries/qt-5/modules/qtquickcontrols2.nix new file mode 100644 index 00000000000..a9522f4b1f0 --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtquickcontrols2.nix @@ -0,0 +1,7 @@ +{ qtModule, qtdeclarative }: + +qtModule { + name = "qtquickcontrols2"; + qtInputs = [ qtdeclarative ]; + outputs = [ "out" "dev" "bin" ]; +} diff --git a/pkgs/development/libraries/qt-5/modules/qtscript.nix b/pkgs/development/libraries/qt-5/modules/qtscript.nix new file mode 100644 index 00000000000..5a1a462a964 --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtscript.nix @@ -0,0 +1,6 @@ +{ qtModule, qtbase, qttools }: + +qtModule { + name = "qtscript"; + qtInputs = [ qtbase qttools ]; +} diff --git a/pkgs/development/libraries/qt-5/modules/qtsensors.nix b/pkgs/development/libraries/qt-5/modules/qtsensors.nix new file mode 100644 index 00000000000..3b8732b6885 --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtsensors.nix @@ -0,0 +1,7 @@ +{ qtModule, qtbase, qtdeclarative }: + +qtModule { + name = "qtsensors"; + qtInputs = [ qtbase qtdeclarative ]; + outputs = [ "out" "dev" "bin" ]; +} diff --git a/pkgs/development/libraries/qt-5/modules/qtserialport.nix b/pkgs/development/libraries/qt-5/modules/qtserialport.nix new file mode 100644 index 00000000000..2f8c142323d --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtserialport.nix @@ -0,0 +1,11 @@ +{ qtModule, stdenv, lib, qtbase, substituteAll, systemd }: + +let inherit (lib) getLib optional; in + +qtModule { + name = "qtserialport"; + qtInputs = [ qtbase ]; + NIX_CFLAGS_COMPILE = + optional stdenv.isLinux + ''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"''; +} diff --git a/pkgs/development/libraries/qt-5/modules/qtsvg.nix b/pkgs/development/libraries/qt-5/modules/qtsvg.nix new file mode 100644 index 00000000000..3ce68e56e41 --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtsvg.nix @@ -0,0 +1,7 @@ +{ qtModule, qtbase }: + +qtModule { + name = "qtsvg"; + qtInputs = [ qtbase ]; + outputs = [ "out" "dev" "bin" ]; +} diff --git a/pkgs/development/libraries/qt-5/modules/qttools.nix b/pkgs/development/libraries/qt-5/modules/qttools.nix new file mode 100644 index 00000000000..ae6bd18cb14 --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qttools.nix @@ -0,0 +1,34 @@ +{ qtModule, lib, qtbase }: + +with lib; + +qtModule { + name = "qttools"; + qtInputs = [ qtbase ]; + outputs = [ "out" "dev" "bin" ]; + + # fixQtBuiltinPaths overwrites a builtin path we should keep + postPatch = '' + sed -i "src/linguist/linguist.pro" \ + -e '/^cmake_linguist_config_version_file.input =/ s|$$\[QT_HOST_DATA.*\]|${getDev qtbase}|' + ''; + + devTools = [ + "bin/qcollectiongenerator" + "bin/linguist" + "bin/assistant" + "bin/qdoc" + "bin/lconvert" + "bin/designer" + "bin/qtattributesscanner" + "bin/lrelease" + "bin/pixeltool" + "bin/lupdate" + "bin/qtdiag" + "bin/qhelpgenerator" + "bin/qtplugininfo" + "bin/qthelpconverter" + ]; + + setupHook = ../hooks/qttools-setup-hook.sh; +} diff --git a/pkgs/development/libraries/qt-5/modules/qttranslations.nix b/pkgs/development/libraries/qt-5/modules/qttranslations.nix new file mode 100644 index 00000000000..11a6e3fedcb --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qttranslations.nix @@ -0,0 +1,6 @@ +{ qtModule, qttools }: + +qtModule { + name = "qttranslations"; + qtInputs = [ qttools ]; +} diff --git a/pkgs/development/libraries/qt-5/modules/qtwayland.nix b/pkgs/development/libraries/qt-5/modules/qtwayland.nix new file mode 100644 index 00000000000..c7a7704f283 --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtwayland.nix @@ -0,0 +1,9 @@ +{ qtModule, qtbase, qtquickcontrols, wayland, pkgconfig }: + +qtModule { + name = "qtwayland"; + qtInputs = [ qtbase qtquickcontrols ]; + buildInputs = [ wayland ]; + nativeBuildInputs = [ pkgconfig ]; + outputs = [ "out" "dev" "bin" ]; +} diff --git a/pkgs/development/libraries/qt-5/modules/qtwebchannel.nix b/pkgs/development/libraries/qt-5/modules/qtwebchannel.nix new file mode 100644 index 00000000000..84fb88385a3 --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtwebchannel.nix @@ -0,0 +1,8 @@ +{ qtModule, qtbase, qtdeclarative }: + +qtModule { + name = "qtwebchannel"; + qtInputs = [ qtbase qtdeclarative ]; + outputs = [ "out" "dev" "bin" ]; +} + diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix new file mode 100644 index 00000000000..4be72b08784 --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -0,0 +1,121 @@ +{ qtModule, qtCompatVersion, + qtdeclarative, qtquickcontrols, qtlocation, qtwebchannel + +, bison, coreutils, flex, git, gperf, ninja, pkgconfig, python2, which + +, xlibs, libXcursor, libXScrnSaver, libXrandr, libXtst +, fontconfig, freetype, harfbuzz, icu, dbus +, zlib, minizip, libjpeg, libpng, libtiff, libwebp, libopus +, jsoncpp, protobuf, libvpx, srtp, snappy, nss, libevent +, alsaLib +, libcap +, pciutils +, systemd + +, enableProprietaryCodecs ? true + +, lib, stdenv # lib.optional, needsPax +}: + +with stdenv.lib; + +let qt56 = qtCompatVersion == "5.6"; in + +qtModule { + name = "qtwebengine"; + qtInputs = [ qtdeclarative qtquickcontrols qtlocation qtwebchannel ]; + nativeBuildInputs = [ + bison coreutils flex git gperf ninja pkgconfig python2 which + ]; + doCheck = true; + outputs = [ "bin" "dev" "out" ]; + + enableParallelBuilding = true; + + postPatch = + # Patch Chromium build tools + '' + ( cd src/3rdparty/chromium; patchShebangs . ) + '' + # Patch Chromium build files + + '' + substituteInPlace ./src/3rdparty/chromium/build/common.gypi \ + --replace /bin/echo ${coreutils}/bin/echo + substituteInPlace ./src/3rdparty/chromium/v8/${if qt56 then "build" else "gypfiles"}/toolchain.gypi \ + --replace /bin/echo ${coreutils}/bin/echo + substituteInPlace ./src/3rdparty/chromium/v8/${if qt56 then "build" else "gypfiles"}/standalone.gypi \ + --replace /bin/echo ${coreutils}/bin/echo + '' + # Patch library paths in Qt sources + + '' + sed -i \ + -e "s,QLibraryInfo::location(QLibraryInfo::DataPath),QLatin1String(\"$out\"),g" \ + -e "s,QLibraryInfo::location(QLibraryInfo::TranslationsPath),QLatin1String(\"$out/translations\"),g" \ + -e "s,QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath),QLatin1String(\"$out/libexec\"),g" \ + src/core/web_engine_library_info.cpp + '' + # Patch library paths in Chromium sources + + optionalString (!stdenv.isDarwin) '' + sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${systemd.lib}/lib/\1!' \ + src/3rdparty/chromium/device/udev_linux/udev?_loader.cc + + sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \ + src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc + ''; + + preConfigure = '' + export MAKEFLAGS=-j$NIX_BUILD_CORES + + if [ -d "$PWD/tools/qmake" ]; then + QMAKEPATH="$PWD/tools/qmake''${QMAKEPATH:+:}$QMAKEPATH" + fi + ''; + + qmakeFlags = + [ + # Use system Ninja because bootstrapping it is fragile + "WEBENGINE_CONFIG+=use_system_ninja" + ] ++ optional enableProprietaryCodecs "WEBENGINE_CONFIG+=use_proprietary_codecs"; + + propagatedBuildInputs = [ + # Image formats + libjpeg libpng libtiff libwebp + + # Video formats + srtp libvpx + + # Audio formats + libopus + + # Text rendering + harfbuzz icu + ] + ++ optionals (!stdenv.isDarwin) [ + dbus zlib minizip snappy nss protobuf jsoncpp libevent + + # Audio formats + alsaLib + + # Text rendering + fontconfig freetype + + libcap + pciutils + + # X11 libs + xlibs.xrandr libXScrnSaver libXcursor libXrandr xlibs.libpciaccess libXtst + xlibs.libXcomposite + ]; + + dontUseNinjaBuild = true; + dontUseNinjaInstall = true; + + postInstall = '' + cat > $out/libexec/qt.conf <> "$NIX_QT5_TMP/nix-support/qt-inputs" - done - mkdir -p "$NIX_QT5_TMP/lib" - - postHooks+=(_qtSetCMakePrefix) - - ln -sf "@dev@/bin/qmake" "$NIX_QT5_TMP/bin" - echo "bin/qmake" >> "$NIX_QT5_TMP/nix-support/qt-inputs" - - cat >"$NIX_QT5_TMP/bin/qt.conf" <> "$NIX_QT5_TMP/nix-support/qt-inputs" - - export QMAKE="$NIX_QT5_TMP/bin/qmake" - - # Set PATH to find qmake first in a preConfigure hook - # It must run after all the envHooks! - preConfigureHooks+=(_qtSetQmakePath) -fi - -qt5LinkModuleDir() { - if [ -d "$1/$2" ]; then - @lndir@/bin/lndir -silent "$1/$2" "$NIX_QT5_TMP/$2" - find "$1/$2" -printf "$2/%P\n" >> "$NIX_QT5_TMP/nix-support/qt-inputs" - fi -} - -qt5LinkDarwinModuleLibDir() { - for fw in $(find "$1"/lib -maxdepth 1 -name '*.framework'); do - if [ ! -L "$fw" ]; then - ln -s "$fw" "$NIX_QT5_TMP"/lib - fi - done - for file in $(find "$1"/lib -maxdepth 1 -type f); do - if [ ! -L "$file" ]; then - ln -s "$file" "$NIX_QT5_TMP"/lib - fi - done - for dir in $(find "$1"/lib -maxdepth 1 -mindepth 1 -type d ! -name '*.framework'); do - mkdir -p "$NIX_QT5_TMP"/lib/$(basename "$dir") - @lndir@/bin/lndir -silent "$dir" "$NIX_QT5_TMP"/lib/$(basename "$dir") - done -} - -NIX_QT5_MODULES="${NIX_QT5_MODULES}${NIX_QT5_MODULES:+:}@out@" -NIX_QT5_MODULES_DEV="${NIX_QT5_MODULES_DEV}${NIX_QT5_MODULES_DEV:+:}@dev@" - -_qtLinkAllModules() { - IFS=: read -a modules <<< $NIX_QT5_MODULES - for module in ${modules[@]}; do - qt5LinkDarwinModuleLibDir "$module" - done - - IFS=: read -a modules <<< $NIX_QT5_MODULES_DEV - for module in ${modules[@]}; do - qt5LinkModuleDir "$module" "bin" - qt5LinkModuleDir "$module" "include" - qt5LinkDarwinModuleLibDir "$module" - qt5LinkModuleDir "$module" "mkspecs" - qt5LinkModuleDir "$module" "share" - done -} - -preConfigureHooks+=(_qtLinkAllModules) - -_qtFixCMakePaths() { - find "${!outputLib}" -name "*.cmake" | while read file; do - substituteInPlace "$file" \ - --subst-var-by NIX_OUT "${!outputLib}" \ - --subst-var-by NIX_DEV "${!outputDev}" \ - --subst-var-by NIX_BIN "${!outputBin}" - done -} - -if [ -n "$NIX_QT_SUBMODULE" ]; then - postInstallHooks+=(_qtFixCMakePaths) -fi diff --git a/pkgs/development/libraries/qt-5/qtbase-setup-hook.sh b/pkgs/development/libraries/qt-5/qtbase-setup-hook.sh deleted file mode 100644 index e4ef456bf97..00000000000 --- a/pkgs/development/libraries/qt-5/qtbase-setup-hook.sh +++ /dev/null @@ -1,155 +0,0 @@ -qtPluginPrefix=@qtPluginPrefix@ -qtQmlPrefix=@qtQmlPrefix@ -qtDocPrefix=@qtDocPrefix@ - -NIX_QT5_MODULES="${NIX_QT5_MODULES}${NIX_QT5_MODULES:+:}@out@" -NIX_QT5_MODULES_DEV="${NIX_QT5_MODULES_DEV}${NIX_QT5_MODULES_DEV:+:}@dev@" - -providesQtRuntime() { - [ -d "$1/$qtPluginPrefix" ] || [ -d "$1/$qtQmlPrefix" ] -} - -# Propagate any runtime dependency of the building package. -# Each dependency is propagated to the user environment and as a build -# input so that it will be re-propagated to the user environment by any -# package depending on the building package. (This is necessary in case -# the building package does not provide runtime dependencies itself and so -# would not be propagated to the user environment.) -_qtCrossEnvHook() { - if providesQtRuntime "$1"; then - propagatedBuildInputs+=" $1" - propagatedUserEnvPkgs+=" $1" - fi -} -if [ -z "$NIX_QT5_TMP" ]; then - crossEnvHooks+=(_qtCrossEnvHook) -fi - -_qtEnvHook() { - if providesQtRuntime "$1"; then - propagatedNativeBuildInputs+=" $1" - if [ -z "$crossConfig" ]; then - propagatedUserEnvPkgs+=" $1" - fi - fi -} -if [ -z "$NIX_QT5_TMP" ]; then - envHooks+=(_qtEnvHook) -fi - -_qtPreFixupHook() { - moveToOutput "mkspecs" "${!outputDev}" -} -if [ -z "$NIX_QT5_TMP" ]; then - preFixupHooks+=(_qtPreFixupHook) -fi - -_qtPostInstallHook() { - # Clean up temporary installation files created by this setup hook. - # For building Qt modules, this is necessary to prevent including - # dependencies in the output. For all other packages, this is necessary - # to induce patchelf to remove the temporary paths from the RPATH of - # dynamically-linked objects. - if [ -z "$NIX_QT_SUBMODULE" ]; then - rm -fr "$NIX_QT5_TMP" - else - cat "$NIX_QT5_TMP/nix-support/qt-inputs" | while read file; do - if [ ! -d "$NIX_QT5_TMP/$file" ]; then - rm -f "$NIX_QT5_TMP/$file" - fi - done - - cat "$NIX_QT5_TMP/nix-support/qt-inputs" | while read dir; do - if [ -d "$NIX_QT5_TMP/$dir" ]; then - rmdir --ignore-fail-on-non-empty -p "$NIX_QT5_TMP/$dir" - fi - done - - rm "$NIX_QT5_TMP/nix-support/qt-inputs" - fi - - # Patch CMake modules - if [ -n "$NIX_QT_SUBMODULE" ]; then - find "${!outputLib}" -name "*.cmake" | while read file; do - substituteInPlace "$file" \ - --subst-var-by NIX_OUT "${!outputLib}" \ - --subst-var-by NIX_DEV "${!outputDev}" \ - --subst-var-by NIX_BIN "${!outputBin}" - done - fi -} -if [ -z "$NIX_QT5_TMP" ]; then - preConfigureHooks+=(_qtPreConfigureHook) -fi - -_qtLinkModuleDir() { - if [ -d "$1/$2" ]; then - @lndir@/bin/lndir -silent "$1/$2" "$NIX_QT5_TMP/$2" - find "$1/$2" -printf "$2/%P\n" >> "$NIX_QT5_TMP/nix-support/qt-inputs" - fi -} - -_qtPreConfigureHook() { - # Find the temporary qmake executable first. - # This must run after all the environment hooks! - export PATH="$NIX_QT5_TMP/bin${PATH:+:}$PATH" - - # Link all runtime module dependencies into the temporary directory. - IFS=: read -a modules <<< $NIX_QT5_MODULES - for module in ${modules[@]}; do - _qtLinkModuleDir "$module" "lib" - done - - # Link all the build-time module dependencies into the temporary directory. - IFS=: read -a modules <<< $NIX_QT5_MODULES_DEV - for module in ${modules[@]}; do - _qtLinkModuleDir "$module" "bin" - _qtLinkModuleDir "$module" "include" - _qtLinkModuleDir "$module" "lib" - _qtLinkModuleDir "$module" "mkspecs" - _qtLinkModuleDir "$module" "share" - done -} -if [ -z "$NIX_QT5_TMP" ]; then - postInstallHooks+=(_qtPostInstallHook) -fi - -if [ -z "$NIX_QT5_TMP" ]; then - if [ -z "$NIX_QT_SUBMODULE" ]; then - if [ -z "$IN_NIX_SHELL" ]; then - NIX_QT5_TMP=$(pwd)/__nix_qt5__ - else - NIX_QT5_TMP=$(mktemp -d) - fi - else - NIX_QT5_TMP=$out - fi - - mkdir -p "$NIX_QT5_TMP/nix-support" - for subdir in bin include lib mkspecs share; do - mkdir -p "$NIX_QT5_TMP/$subdir" - echo "$subdir/" >> "$NIX_QT5_TMP/nix-support/qt-inputs" - done - - cp "@dev@/bin/qmake" "$NIX_QT5_TMP/bin" - echo "bin/qmake" >> "$NIX_QT5_TMP/nix-support/qt-inputs" - - cat >"$NIX_QT5_TMP/bin/qt.conf" <> "$NIX_QT5_TMP/nix-support/qt-inputs" - - export QMAKE="$NIX_QT5_TMP/bin/qmake" -fi - -_qtShellCleanupHook () { - rm -fr $NIX_QT5_TMP -} - -if [ -n "$IN_NIX_SHELL" ]; then - trap _qtShellCleanupHook EXIT -fi diff --git a/pkgs/development/libraries/qt-5/qtsubmodule-setup-hook.sh b/pkgs/development/libraries/qt-5/qtsubmodule-setup-hook.sh deleted file mode 100644 index e41433c1138..00000000000 --- a/pkgs/development/libraries/qt-5/qtsubmodule-setup-hook.sh +++ /dev/null @@ -1,2 +0,0 @@ -NIX_QT5_MODULES="${NIX_QT5_MODULES}${NIX_QT5_MODULES:+:}@out@" -NIX_QT5_MODULES_DEV="${NIX_QT5_MODULES_DEV}${NIX_QT5_MODULES_DEV:+:}@dev@" -- cgit 1.4.1 From afac78334337fde00a26626a4907cd9b13a38b7a Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Tue, 24 Oct 2017 06:44:07 -0500 Subject: mlt: extra CFLAGS for QtSvg --- pkgs/development/libraries/mlt/qt-5.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/mlt/qt-5.nix b/pkgs/development/libraries/mlt/qt-5.nix index 1d56d58c68d..60ed5ef8ac8 100644 --- a/pkgs/development/libraries/mlt/qt-5.nix +++ b/pkgs/development/libraries/mlt/qt-5.nix @@ -3,6 +3,8 @@ , fftw, vid-stab, opencv3, ladspa-sdk }: +let inherit (stdenv.lib) getDev; in + stdenv.mkDerivation rec { name = "mlt-${version}"; version = "6.4.1"; @@ -27,6 +29,10 @@ stdenv.mkDerivation rec { "--enable-opengl" ]; + # mlt is unable to cope with our multi-prefix Qt build + # because it does not use CMake or qmake. + NIX_CFLAGS_COMPILE = [ "-I${getDev qtsvg}/include/QtSvg" ]; + CXXFLAGS = "-std=c++11"; enableParallelBuilding = true; -- cgit 1.4.1 From d817095208c1fb66c269345f575caf24e8135adf Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Tue, 24 Oct 2017 06:45:08 -0500 Subject: qoauth: fix Qt mkspecs install path --- pkgs/development/libraries/qoauth/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/qoauth/default.nix b/pkgs/development/libraries/qoauth/default.nix index fa998b9e198..d09c0d9a6ce 100644 --- a/pkgs/development/libraries/qoauth/default.nix +++ b/pkgs/development/libraries/qoauth/default.nix @@ -9,7 +9,11 @@ stdenv.mkDerivation { sha256 = "a28005986410d333e03d077679cdf6c504ec5a33342867dc0f9fb0b74285e333"; }; - patchPhase = "sed -e 's/lib64/lib/g' -i src/src.pro"; + postPatch = '' + sed -i src/src.pro \ + -e 's/lib64/lib/g' \ + -e '/features.path =/ s|$$\[QMAKE_MKSPECS\]|$$NIX_OUTPUT_DEV/mkspecs|' + ''; buildInputs = [ qt5.qtbase qca2-qt5 ]; nativeBuildInputs = [ qt5.qmake ]; -- cgit 1.4.1 From abb3479fcb70e768e6eaf13ba73ab0a5eeb3d5fc Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Tue, 24 Oct 2017 06:45:23 -0500 Subject: qscintilla: fix qmake install paths --- pkgs/development/libraries/qscintilla/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/qscintilla/default.nix b/pkgs/development/libraries/qscintilla/default.nix index c2e6c3cb3b5..f5c5a667418 100644 --- a/pkgs/development/libraries/qscintilla/default.nix +++ b/pkgs/development/libraries/qscintilla/default.nix @@ -21,11 +21,23 @@ stdenv.mkDerivation rec { preConfigure = '' cd Qt4Qt5 + ${if withQt5 + then '' + sed -i -e "s,\$\$\\[QT_INSTALL_LIBS\\],$out/lib," \ + -e "s,\$\$\\[QT_INSTALL_HEADERS\\],$out/include/," \ + -e "s,\$\$\\[QT_INSTALL_TRANSLATIONS\\],$out/translations," \ + -e "s,\$\$\\[QT_HOST_DATA\\]/mkspecs,$out/mkspecs," \ + -e "s,\$\$\\[QT_INSTALL_DATA\\]/mkspecs,$out/mkspecs," \ + -e "s,\$\$\\[QT_INSTALL_DATA\\],$out/share," \ + qscintilla.pro + '' + else '' sed -i -e "s,\$\$\\[QT_INSTALL_LIBS\\],$out/lib," \ -e "s,\$\$\\[QT_INSTALL_HEADERS\\],$out/include/," \ -e "s,\$\$\\[QT_INSTALL_TRANSLATIONS\\],$out/share/qt/translations," \ -e "s,\$\$\\[QT_INSTALL_DATA\\],$out/share/qt," \ qscintilla.pro + ''} ''; meta = with stdenv.lib; { -- cgit 1.4.1 From bf117e3205f9f38914f22651573792bf28e1afd0 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Tue, 24 Oct 2017 06:45:39 -0500 Subject: qtstyleplugins: remove obsolete install prefix hack --- pkgs/development/libraries/qtstyleplugins/default.nix | 5 ----- 1 file changed, 5 deletions(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/qtstyleplugins/default.nix b/pkgs/development/libraries/qtstyleplugins/default.nix index 1be83731f20..a8611b31240 100644 --- a/pkgs/development/libraries/qtstyleplugins/default.nix +++ b/pkgs/development/libraries/qtstyleplugins/default.nix @@ -13,11 +13,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig qmake ]; buildInputs = [ gtk2 ]; - installPhase = '' - make INSTALL_ROOT=$NIX_QT5_TMP install - mv $NIX_QT5_TMP/$NIX_QT5_TMP $out - ''; - meta = with stdenv.lib; { description = "Additional style plugins for Qt5, including BB10, GTK+, Cleanlooks, Motif, Plastique"; homepage = http://blog.qt.io/blog/2012/10/30/cleaning-up-styles-in-qt5-and-adding-fusion/; -- cgit 1.4.1 From ae6ac0ed3e197ebffa2c2194e0cacf602e499882 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sun, 5 Nov 2017 10:45:35 -0600 Subject: qt5: Add instructions for updating and patching --- pkgs/development/libraries/qt-5/README.md | 81 +++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 pkgs/development/libraries/qt-5/README.md (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/qt-5/README.md b/pkgs/development/libraries/qt-5/README.md new file mode 100644 index 00000000000..c13b172e82a --- /dev/null +++ b/pkgs/development/libraries/qt-5/README.md @@ -0,0 +1,81 @@ +# Qt 5 Maintainer's Notes + +## Minor Updates + +Let `$major` be the major version number, e.g. `5.9`. + +1. Change the version number in the `$major/fetch.sh`. +2. Run `./maintainers/scripts/fetch-kde-qt.sh pkgs/development/qt-5/$major` + from the top of the Nixpkgs tree. + +See below if it is necessary to update any patches. + +## Major Updates + +Let `$major` be the new major version number, e.g. `5.10`. + +1. Copy the subdirectory from the previous major version to `$major`. +2. Change the version number in `$major/fetch.sh`. +3. Run `./maintainers/scripts/fetch-kde-qt.sh pkgs/development/qt-5/$major` + from the top of the Nixpkgs tree. +4. Add a top-level attribute in `pkgs/top-level/all-packages.nix` for the new + major version. +5. Change the `qt5` top-level attribute to point to the new major version. +6. If the previous major version is _not_ a long-term support release, + remove it from Nixpkgs. + +See below if it is necessary to update any patches. + +## Patches + +Nixpkgs maintains several patches for Qt which cannot be submitted upstream. To +facilitate maintenance, a fork of the upstream repository is created for each patched module: + +- [qtbase](https://github.com/ttuegel/qtbase) +- [qtwebkit](https://github.com/ttuegel/qtwebkit) +- [qttools](https://github.com/ttuegel/qttools) +- [qtscript](https://github.com/ttuegel/qtscript) +- [qtserialport](https://github.com/ttuegel/qtserialport) +- [qtdeclarative](https://github.com/ttuegel/qtdeclarative) +- [qtwebengine](https://github.com/ttuegel/qtwebengine) + +In each repository, the patches are contained in a branch named `nixpkgs/$major` +for each major version. Please make a pull request to add or update any patch +which will be maintained in Nixpkgs. + +The forked repository for each module is used to create a single patch in +Nixpkgs. To recreate the patch for module `$module` (e.g. `qtbase`) at version +`$version` (e.g. `5.9.1`) in the branch `$major` (e.g. `5.9`), + +1. Clone the fork for `$module` from the list above. +2. Checkout the active branch, `git checkout nixpkgs/$major`. +3. Compare the patched branch to the release tag, + `git diff v$version > $module.patch`. +4. Copy `$module.patch` into the Nixpkgs tree. + +### Minor Version Updates + +To update module `$module` to version `$version` from an older version in the +same branch `$major`, + +1. Clone the fork for `$module` from the list above. +2. Checkout the active branch, `git checkout nixpkgs/$major`. +3. Merge the new version into the active branch, + `git merge --no-ff v$version`. +4. Fix any conflicts. +5. Open a pull request for the changes. +6. Follow the instructions above to recreate the module patch in Nixpkgs. + +### Major Version Updates + +To update module `$module` from `$oldversion` in branch `$oldmajor` to version +`$version` in branch `$major`, + +1. Clone the fork for `$module` from the list above. +2. Checkout a new branch for the new major version, + `git checkout -b nixpkgs/$major nixpkgs/$oldmajor`. +3. Rebase the patches from `$oldversion` onto the new branch, + `git rebase v$oldversion --onto v$version`. +4. Fix any conflicts. +5. Open a pull request for the changes. +6. Follow the instructions above to recreate the module patch in Nixpkgs. -- cgit 1.4.1