qt4: fix qmake on darwin and delete custom install phase

Since keeping `installPhase = ""` to signify "use the default installPhase" will
be surprising, this deletes the installPhase and rebuilds qt4 on all platforms.

Fixes #30238

+28 -43
+17 -43
pkgs/development/libraries/qt-4.x/4.8/default.nix
··· 68 [ ./glib-2.32.patch 69 ./libressl.patch 70 ./parallel-configure.patch 71 (substituteAll { 72 src = ./dlopen-absolute-paths.diff; 73 cups = if cups != null then stdenv.lib.getLib cups else null; ··· 76 glibc = stdenv.cc.libc.out; 77 openglDriver = if mesaSupported then mesa.driverLink else "/no-such-path"; 78 }) 79 - ] ++ stdenv.lib.optional gtkStyle (substituteAll ({ 80 src = ./dlopen-gtkstyle.diff; 81 # substituteAll ignores env vars starting with capital letter 82 gtk = gtk2.out; ··· 93 ++ stdenv.lib.optional stdenv.isAarch64 (fetchpatch { 94 url = "https://src.fedoraproject.org/rpms/qt/raw/ecf530486e0fb7fe31bad26805cde61115562b2b/f/qt-aarch64.patch"; 95 sha256 = "1fbjh78nmafqmj7yk67qwjbhl3f6ylkp6x33b1dqxfw9gld8b3gl"; 96 - }) 97 - ++ [ 98 - (fetchpatch { 99 - name = "fix-medium-font.patch"; 100 - url = "http://anonscm.debian.org/cgit/pkg-kde/qt/qt4-x11.git/plain/debian/patches/" 101 - + "kubuntu_39_fix_medium_font.diff?id=21b342d71c19e6d68b649947f913410fe6129ea4"; 102 - sha256 = "0bli44chn03c2y70w1n8l7ss4ya0b40jqqav8yxrykayi01yf95j"; 103 - }) 104 - (fetchpatch { 105 - name = "qt4-gcc6.patch"; 106 - url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/qt4-gcc6.patch?h=packages/qt4&id=ca773a144f5abb244ac4f2749eeee9333cac001f"; 107 - sha256 = "07lrva7bjh6i40p7b3ml26a2jlznri8bh7y7iyx5zmvb1gfxmj34"; 108 - }) 109 - ]; 110 111 preConfigure = '' 112 export LD_LIBRARY_PATH="`pwd`/lib:$LD_LIBRARY_PATH" ··· 185 sed -i 's/^\(LIBS[[:space:]]*=.*$\)/\1 -lobjc/' ./src/corelib/Makefile.Release 186 ''; 187 188 - installPhase = optionalString stdenv.isDarwin '' 189 - runHook preInstall 190 - 191 - mkdir -p $out 192 - cp -r lib $out 193 - 194 - mkdir -p $out/Applications 195 - mv bin/*.app $out/Applications 196 - cp -r bin $out 197 - 198 - mkdir -p $out/share/doc/${name} 199 - cp -r doc/* $out/share/doc/${name} 200 - 201 - mkdir -p $out/lib/qt4 202 - cp -r plugins $out/lib/qt4 203 - cp -r imports $out/lib/qt4 204 - 205 - mkdir -p $out/share/${name} 206 - cp -r mkspecs $out/share/${name} 207 - cp -r translations $out/share/${name} 208 - cp -r tools/linguist/phrasebooks $out/share/${name} 209 - cp tools/porting/src/q3porting.xml $out/share/${name} 210 - 211 - runHook postInstall 212 - ''; 213 - 214 - postInstall = optionalString (!stdenv.isDarwin) '' 215 - rm -rf $out/tests 216 ''; 217 218 crossAttrs = {
··· 68 [ ./glib-2.32.patch 69 ./libressl.patch 70 ./parallel-configure.patch 71 + ./qt-4.8.7-unixmake-darwin.patch 72 (substituteAll { 73 src = ./dlopen-absolute-paths.diff; 74 cups = if cups != null then stdenv.lib.getLib cups else null; ··· 77 glibc = stdenv.cc.libc.out; 78 openglDriver = if mesaSupported then mesa.driverLink else "/no-such-path"; 79 }) 80 + (fetchpatch { 81 + name = "fix-medium-font.patch"; 82 + url = "http://anonscm.debian.org/cgit/pkg-kde/qt/qt4-x11.git/plain/debian/patches/" 83 + + "kubuntu_39_fix_medium_font.diff?id=21b342d71c19e6d68b649947f913410fe6129ea4"; 84 + sha256 = "0bli44chn03c2y70w1n8l7ss4ya0b40jqqav8yxrykayi01yf95j"; 85 + }) 86 + (fetchpatch { 87 + name = "qt4-gcc6.patch"; 88 + url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/qt4-gcc6.patch?h=packages/qt4&id=ca773a144f5abb244ac4f2749eeee9333cac001f"; 89 + sha256 = "07lrva7bjh6i40p7b3ml26a2jlznri8bh7y7iyx5zmvb1gfxmj34"; 90 + }) 91 + ] 92 + ++ stdenv.lib.optional gtkStyle (substituteAll ({ 93 src = ./dlopen-gtkstyle.diff; 94 # substituteAll ignores env vars starting with capital letter 95 gtk = gtk2.out; ··· 106 ++ stdenv.lib.optional stdenv.isAarch64 (fetchpatch { 107 url = "https://src.fedoraproject.org/rpms/qt/raw/ecf530486e0fb7fe31bad26805cde61115562b2b/f/qt-aarch64.patch"; 108 sha256 = "1fbjh78nmafqmj7yk67qwjbhl3f6ylkp6x33b1dqxfw9gld8b3gl"; 109 + }); 110 111 preConfigure = '' 112 export LD_LIBRARY_PATH="`pwd`/lib:$LD_LIBRARY_PATH" ··· 185 sed -i 's/^\(LIBS[[:space:]]*=.*$\)/\1 -lobjc/' ./src/corelib/Makefile.Release 186 ''; 187 188 + postInstall = '' 189 + rm -rf $out/tests 190 ''; 191 192 crossAttrs = {
+11
pkgs/development/libraries/qt-4.x/4.8/qt-4.8.7-unixmake-darwin.patch
···
··· 1 + --- a/qmake/generators/unix/unixmake.cpp 2 + +++ b/qmake/generators/unix/unixmake.cpp 3 + @@ -831,7 +831,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t) 4 + else if(project->first("TEMPLATE") == "app" && !project->isEmpty("QMAKE_STRIPFLAGS_APP")) 5 + ret += " " + var("QMAKE_STRIPFLAGS_APP"); 6 + if(bundle) 7 + - ret = " \"" + dst_targ + "/Contents/MacOS/$(QMAKE_TARGET)\""; 8 + + ret += " \"" + dst_targ + "/Contents/MacOS/$(QMAKE_TARGET)\""; 9 + else 10 + ret += " \"" + dst_targ + "\""; 11 + }