diff options
author | vbgl <vbgl@users.noreply.github.com> | 2016-04-20 11:25:55 +0200 |
---|---|---|
committer | vbgl <vbgl@users.noreply.github.com> | 2016-04-20 11:25:55 +0200 |
commit | df681cda9a96ed21f4ec0362d6807f489b6d9deb (patch) | |
tree | 3973f72c923f0f4882a2c277060c5dfdf59e5120 /pkgs/development | |
parent | b8a817ec570f69dd8a7c9bdb90bacff3431d27ee (diff) | |
parent | eccfe71baeee07d851e7136c16f5b85ed0da1a3a (diff) | |
download | nixlib-df681cda9a96ed21f4ec0362d6807f489b6d9deb.tar nixlib-df681cda9a96ed21f4ec0362d6807f489b6d9deb.tar.gz nixlib-df681cda9a96ed21f4ec0362d6807f489b6d9deb.tar.bz2 nixlib-df681cda9a96ed21f4ec0362d6807f489b6d9deb.tar.lz nixlib-df681cda9a96ed21f4ec0362d6807f489b6d9deb.tar.xz nixlib-df681cda9a96ed21f4ec0362d6807f489b6d9deb.tar.zst nixlib-df681cda9a96ed21f4ec0362d6807f489b6d9deb.zip |
Merge pull request #14705 from acowley/qt4-darwin
qt4.8: darwin compatibility
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/libraries/qt-4.x/4.8/default.nix | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index 788fb8741402..65d45923e5a5 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -11,6 +11,8 @@ , docs ? false , examples ? false , demos ? false +# darwin support +, cf-private, libobjc, ApplicationServices, OpenGL, Cocoa, AGL, libcxx }: with stdenv.lib; @@ -114,7 +116,7 @@ stdenv.mkDerivation rec { -no-phonon ${if buildWebkit then "" else "-no"}-webkit ${if buildMultimedia then "" else "-no"}-multimedia -audio-backend ${if developerBuild then "-developer-build" else ""} - ''; + '' + optionalString stdenv.isDarwin "-platform unsupported/macx-clang-libc++"; propagatedBuildInputs = [ libXrender libXrandr libXinerama libXcursor libXext libXfixes libXv libXi @@ -129,14 +131,16 @@ stdenv.mkDerivation rec { [ cups # Qt dlopen's libcups instead of linking to it postgresql sqlite libjpeg libmng libtiff icu ] ++ optionals (mysql != null) [ mysql.lib ] - ++ optionals gtkStyle [ gtk gdk_pixbuf ]; + ++ optionals gtkStyle [ gtk gdk_pixbuf ] + ++ optionals stdenv.isDarwin [ cf-private ApplicationServices OpenGL Cocoa AGL libcxx libobjc ]; nativeBuildInputs = [ perl pkgconfig which ]; enableParallelBuilding = false; NIX_CFLAGS_COMPILE = optionalString (stdenv.isFreeBSD || stdenv.isDarwin) - "-I${glib.dev}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include"; + "-I${glib.dev}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include" + + optionalString stdenv.isDarwin " -I${libcxx}/include/c++/v1"; NIX_LDFLAGS = optionalString (stdenv.isFreeBSD || stdenv.isDarwin) "-lglib-2.0"; @@ -145,6 +149,8 @@ stdenv.mkDerivation rec { # resolve "extra qualification on member" error sed -i 's/struct ::TabletProximityRec;/struct TabletProximityRec;/' \ src/gui/kernel/qt_cocoa_helpers_mac_p.h + find . -name "Makefile*" | xargs sed -i 's/^\(LINK[[:space:]]* = clang++\)/\1 ${NIX_LDFLAGS}/' + sed -i 's/^\(LIBS[[:space:]]*=.*$\)/\1 -lobjc/' ./src/corelib/Makefile.Release ''; crossAttrs = let |