treewide: transition libGL/libGLU for qt
Also rename mesaSupported to libGLSupported
This commit is contained in:
parent
0acec7e984
commit
e94cd63bf5
|
@ -2,7 +2,7 @@
|
||||||
, hostPlatform
|
, hostPlatform
|
||||||
, libXrender, libXinerama, libXcursor, libXmu, libXv, libXext
|
, libXrender, libXinerama, libXcursor, libXmu, libXv, libXext
|
||||||
, libXfixes, libXrandr, libSM, freetype, fontconfig, zlib, libjpeg, libpng
|
, libXfixes, libXrandr, libSM, freetype, fontconfig, zlib, libjpeg, libpng
|
||||||
, libmng, which, mesaSupported, mesa, mesa_glu, openssl, dbus, cups, pkgconfig
|
, libmng, which, libGLSupported, libGL, libGLU, openssl, dbus, cups, pkgconfig
|
||||||
, libtiff, glib, icu, mysql, postgresql, sqlite, perl, coreutils, libXi
|
, libtiff, glib, icu, mysql, postgresql, sqlite, perl, coreutils, libXi
|
||||||
, buildMultimedia ? stdenv.isLinux, alsaLib, gstreamer, gst-plugins-base
|
, buildMultimedia ? stdenv.isLinux, alsaLib, gstreamer, gst-plugins-base
|
||||||
, buildWebkit ? (stdenv.isLinux || stdenv.isDarwin)
|
, buildWebkit ? (stdenv.isLinux || stdenv.isDarwin)
|
||||||
|
@ -76,7 +76,7 @@ stdenv.mkDerivation rec {
|
||||||
icu = icu.out;
|
icu = icu.out;
|
||||||
libXfixes = libXfixes.out;
|
libXfixes = libXfixes.out;
|
||||||
glibc = stdenv.cc.libc.out;
|
glibc = stdenv.cc.libc.out;
|
||||||
openglDriver = if mesaSupported then mesa.driverLink else "/no-such-path";
|
openglDriver = if libGLSupported then libGL.driverLink else "/no-such-path";
|
||||||
})
|
})
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
name = "fix-medium-font.patch";
|
name = "fix-medium-font.patch";
|
||||||
|
@ -159,7 +159,7 @@ stdenv.mkDerivation rec {
|
||||||
[ libXrender libXrandr libXinerama libXcursor libXext libXfixes libXv libXi
|
[ libXrender libXrandr libXinerama libXcursor libXext libXfixes libXv libXi
|
||||||
libSM zlib libpng openssl dbus freetype fontconfig glib ]
|
libSM zlib libpng openssl dbus freetype fontconfig glib ]
|
||||||
# Qt doesn't directly need GLU (just GL), but many apps use, it's small and doesn't remain a runtime-dep if not used
|
# Qt doesn't directly need GLU (just GL), but many apps use, it's small and doesn't remain a runtime-dep if not used
|
||||||
++ optional mesaSupported mesa_glu
|
++ optional libGLSupported libGLU
|
||||||
++ optional ((buildWebkit || buildMultimedia) && stdenv.isLinux ) alsaLib
|
++ optional ((buildWebkit || buildMultimedia) && stdenv.isLinux ) alsaLib
|
||||||
++ optionals (buildWebkit || buildMultimedia) [ gstreamer gst-plugins-base ];
|
++ optionals (buildWebkit || buildMultimedia) [ gstreamer gst-plugins-base ];
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ top-level attribute to `top-level/all-packages.nix`.
|
||||||
{
|
{
|
||||||
newScope,
|
newScope,
|
||||||
stdenv, fetchurl, makeSetupHook, makeWrapper,
|
stdenv, fetchurl, makeSetupHook, makeWrapper,
|
||||||
bison, cups ? null, harfbuzz, mesa, perl,
|
bison, cups ? null, harfbuzz, libGL, perl,
|
||||||
gstreamer, gst-plugins-base, gtk3, dconf,
|
gstreamer, gst-plugins-base, gtk3, dconf,
|
||||||
|
|
||||||
# options
|
# options
|
||||||
|
@ -66,7 +66,7 @@ let
|
||||||
qtbase = callPackage ../modules/qtbase.nix {
|
qtbase = callPackage ../modules/qtbase.nix {
|
||||||
inherit (srcs.qtbase) src version;
|
inherit (srcs.qtbase) src version;
|
||||||
patches = patches.qtbase;
|
patches = patches.qtbase;
|
||||||
inherit bison cups harfbuzz mesa;
|
inherit bison cups harfbuzz libGL;
|
||||||
withGtk3 = true; inherit dconf gtk3;
|
withGtk3 = true; inherit dconf gtk3;
|
||||||
inherit developerBuild decryptSslTraffic;
|
inherit developerBuild decryptSslTraffic;
|
||||||
};
|
};
|
||||||
|
|
|
@ -27,7 +27,7 @@ existing packages here and modify it as necessary.
|
||||||
{
|
{
|
||||||
newScope,
|
newScope,
|
||||||
stdenv, fetchurl, makeSetupHook, makeWrapper,
|
stdenv, fetchurl, makeSetupHook, makeWrapper,
|
||||||
bison, cups ? null, harfbuzz, mesa, perl,
|
bison, cups ? null, harfbuzz, libGL, perl,
|
||||||
gstreamer, gst-plugins-base,
|
gstreamer, gst-plugins-base,
|
||||||
|
|
||||||
# options
|
# options
|
||||||
|
@ -74,7 +74,7 @@ let
|
||||||
inherit mkDerivation;
|
inherit mkDerivation;
|
||||||
|
|
||||||
qtbase = callPackage ../modules/qtbase.nix {
|
qtbase = callPackage ../modules/qtbase.nix {
|
||||||
inherit bison cups harfbuzz mesa;
|
inherit bison cups harfbuzz libGL;
|
||||||
inherit (srcs.qtbase) src version;
|
inherit (srcs.qtbase) src version;
|
||||||
patches = patches.qtbase;
|
patches = patches.qtbase;
|
||||||
inherit developerBuild decryptSslTraffic;
|
inherit developerBuild decryptSslTraffic;
|
||||||
|
|
|
@ -18,7 +18,7 @@ top-level attribute to `top-level/all-packages.nix`.
|
||||||
{
|
{
|
||||||
newScope,
|
newScope,
|
||||||
stdenv, fetchurl, makeSetupHook, makeWrapper,
|
stdenv, fetchurl, makeSetupHook, makeWrapper,
|
||||||
bison, cups ? null, harfbuzz, mesa, perl,
|
bison, cups ? null, harfbuzz, libGL, perl,
|
||||||
gstreamer, gst-plugins-base, gtk3, dconf,
|
gstreamer, gst-plugins-base, gtk3, dconf,
|
||||||
|
|
||||||
# options
|
# options
|
||||||
|
@ -66,7 +66,7 @@ let
|
||||||
qtbase = callPackage ../modules/qtbase.nix {
|
qtbase = callPackage ../modules/qtbase.nix {
|
||||||
inherit (srcs.qtbase) src version;
|
inherit (srcs.qtbase) src version;
|
||||||
patches = patches.qtbase;
|
patches = patches.qtbase;
|
||||||
inherit bison cups harfbuzz mesa;
|
inherit bison cups harfbuzz libGL;
|
||||||
withGtk3 = true; inherit dconf gtk3;
|
withGtk3 = true; inherit dconf gtk3;
|
||||||
inherit developerBuild decryptSslTraffic;
|
inherit developerBuild decryptSslTraffic;
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
withGtk3 ? false, dconf ? null, gtk3 ? null,
|
withGtk3 ? false, dconf ? null, gtk3 ? null,
|
||||||
|
|
||||||
# options
|
# options
|
||||||
mesaSupported ? (!stdenv.isDarwin),
|
libGLSupported ? (!stdenv.isDarwin),
|
||||||
mesa,
|
libGL,
|
||||||
buildExamples ? false,
|
buildExamples ? false,
|
||||||
buildTests ? false,
|
buildTests ? false,
|
||||||
developerBuild ? false,
|
developerBuild ? false,
|
||||||
|
@ -69,7 +69,7 @@ stdenv.mkDerivation {
|
||||||
libX11 libXcomposite libXext libXi libXrender libxcb libxkbcommon xcbutil
|
libX11 libXcomposite libXext libXi libXrender libxcb libxkbcommon xcbutil
|
||||||
xcbutilimage xcbutilkeysyms xcbutilrenderutil xcbutilwm
|
xcbutilimage xcbutilkeysyms xcbutilrenderutil xcbutilwm
|
||||||
]
|
]
|
||||||
++ lib.optional mesaSupported mesa
|
++ lib.optional libGLSupported libGL
|
||||||
);
|
);
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
|
@ -142,11 +142,11 @@ stdenv.mkDerivation {
|
||||||
# Note on the above: \x27 is a way if including a single-quote
|
# Note on the above: \x27 is a way if including a single-quote
|
||||||
# character in the sed string arguments.
|
# character in the sed string arguments.
|
||||||
else
|
else
|
||||||
lib.optionalString mesaSupported
|
lib.optionalString libGLSupported
|
||||||
''
|
''
|
||||||
sed -i mkspecs/common/linux.conf \
|
sed -i mkspecs/common/linux.conf \
|
||||||
-e "/^QMAKE_INCDIR_OPENGL/ s|$|${mesa.dev or mesa}/include|" \
|
-e "/^QMAKE_INCDIR_OPENGL/ s|$|${libGL.dev or libGL}/include|" \
|
||||||
-e "/^QMAKE_LIBDIR_OPENGL/ s|$|${mesa.out}/lib|"
|
-e "/^QMAKE_LIBDIR_OPENGL/ s|$|${libGL.out}/lib|"
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ stdenv.mkDerivation {
|
||||||
# 10.10
|
# 10.10
|
||||||
]
|
]
|
||||||
else
|
else
|
||||||
lib.optional mesaSupported ''-DNIXPKGS_MESA_GL="${mesa.out}/lib/libGL"''
|
lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"''
|
||||||
++ lib.optionals withGtk3
|
++ lib.optionals withGtk3
|
||||||
[
|
[
|
||||||
''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"''
|
''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"''
|
||||||
|
|
|
@ -10390,7 +10390,7 @@ with pkgs;
|
||||||
# Default derivation with libGL.so.1 to link into /run/opengl-drivers (if need)
|
# Default derivation with libGL.so.1 to link into /run/opengl-drivers (if need)
|
||||||
libGL_driver = mesa_drivers;
|
libGL_driver = mesa_drivers;
|
||||||
|
|
||||||
mesaSupported = lib.elem system lib.platforms.mesaPlatforms;
|
libGLSupported = lib.elem system lib.platforms.mesaPlatforms;
|
||||||
|
|
||||||
libGLDarwinOr = alternative: if stdenv.isDarwin
|
libGLDarwinOr = alternative: if stdenv.isDarwin
|
||||||
then callPackage ../development/libraries/mesa-darwin {
|
then callPackage ../development/libraries/mesa-darwin {
|
||||||
|
@ -10853,7 +10853,7 @@ with pkgs;
|
||||||
qoauth = callPackage ../development/libraries/qoauth { };
|
qoauth = callPackage ../development/libraries/qoauth { };
|
||||||
|
|
||||||
qt3 = callPackage ../development/libraries/qt-3 {
|
qt3 = callPackage ../development/libraries/qt-3 {
|
||||||
openglSupport = mesaSupported;
|
openglSupport = libGLSupported;
|
||||||
libpng = libpng12;
|
libpng = libpng12;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -10861,13 +10861,13 @@ with pkgs;
|
||||||
|
|
||||||
qt48 = callPackage ../development/libraries/qt-4.x/4.8 {
|
qt48 = callPackage ../development/libraries/qt-4.x/4.8 {
|
||||||
# GNOME dependencies are not used unless gtkStyle == true
|
# GNOME dependencies are not used unless gtkStyle == true
|
||||||
mesa = mesa_noglu;
|
|
||||||
inherit (pkgs.gnome2) libgnomeui GConf gnome_vfs;
|
inherit (pkgs.gnome2) libgnomeui GConf gnome_vfs;
|
||||||
cups = if stdenv.isLinux then cups else null;
|
cups = if stdenv.isLinux then cups else null;
|
||||||
|
|
||||||
# XXX: mariadb doesn't built on fbsd as of nov 2015
|
# XXX: mariadb doesn't built on fbsd as of nov 2015
|
||||||
mysql = if (!stdenv.isFreeBSD) then mysql else null;
|
mysql = if (!stdenv.isFreeBSD) then mysql else null;
|
||||||
|
|
||||||
|
inherit libGL;
|
||||||
inherit (pkgs.darwin) cf-private libobjc;
|
inherit (pkgs.darwin) cf-private libobjc;
|
||||||
inherit (pkgs.darwin.apple_sdk.frameworks) ApplicationServices OpenGL Cocoa AGL;
|
inherit (pkgs.darwin.apple_sdk.frameworks) ApplicationServices OpenGL Cocoa AGL;
|
||||||
};
|
};
|
||||||
|
@ -10892,7 +10892,7 @@ with pkgs;
|
||||||
bison = bison2; # error: too few arguments to function 'int yylex(...
|
bison = bison2; # error: too few arguments to function 'int yylex(...
|
||||||
inherit cups;
|
inherit cups;
|
||||||
harfbuzz = harfbuzz-icu;
|
harfbuzz = harfbuzz-icu;
|
||||||
mesa = mesa_noglu;
|
inherit libGL;
|
||||||
inherit perl;
|
inherit perl;
|
||||||
inherit (gst_all_1) gstreamer gst-plugins-base;
|
inherit (gst_all_1) gstreamer gst-plugins-base;
|
||||||
});
|
});
|
||||||
|
@ -10906,7 +10906,7 @@ with pkgs;
|
||||||
bison = bison2; # error: too few arguments to function 'int yylex(...
|
bison = bison2; # error: too few arguments to function 'int yylex(...
|
||||||
inherit cups;
|
inherit cups;
|
||||||
harfbuzz = harfbuzz-icu;
|
harfbuzz = harfbuzz-icu;
|
||||||
mesa = mesa_noglu;
|
inherit libGL;
|
||||||
inherit perl;
|
inherit perl;
|
||||||
inherit (gst_all_1) gstreamer gst-plugins-base;
|
inherit (gst_all_1) gstreamer gst-plugins-base;
|
||||||
inherit (gnome3) gtk3 dconf;
|
inherit (gnome3) gtk3 dconf;
|
||||||
|
@ -10921,7 +10921,7 @@ with pkgs;
|
||||||
bison = bison2; # error: too few arguments to function 'int yylex(...
|
bison = bison2; # error: too few arguments to function 'int yylex(...
|
||||||
inherit cups;
|
inherit cups;
|
||||||
harfbuzz = harfbuzz-icu;
|
harfbuzz = harfbuzz-icu;
|
||||||
mesa = mesa_noglu;
|
inherit libGL;
|
||||||
inherit perl;
|
inherit perl;
|
||||||
inherit (gst_all_1) gstreamer gst-plugins-base;
|
inherit (gst_all_1) gstreamer gst-plugins-base;
|
||||||
inherit (gnome3) gtk3 dconf;
|
inherit (gnome3) gtk3 dconf;
|
||||||
|
@ -11172,7 +11172,7 @@ with pkgs;
|
||||||
schroedinger = callPackage ../development/libraries/schroedinger { };
|
schroedinger = callPackage ../development/libraries/schroedinger { };
|
||||||
|
|
||||||
SDL = callPackage ../development/libraries/SDL {
|
SDL = callPackage ../development/libraries/SDL {
|
||||||
openglSupport = mesaSupported;
|
openglSupport = libGLSupported;
|
||||||
alsaSupport = stdenv.isLinux;
|
alsaSupport = stdenv.isLinux;
|
||||||
x11Support = !stdenv.isCygwin;
|
x11Support = !stdenv.isCygwin;
|
||||||
pulseaudioSupport = config.pulseaudio or stdenv.isLinux;
|
pulseaudioSupport = config.pulseaudio or stdenv.isLinux;
|
||||||
|
@ -11196,7 +11196,7 @@ with pkgs;
|
||||||
SDL_ttf = callPackage ../development/libraries/SDL_ttf { };
|
SDL_ttf = callPackage ../development/libraries/SDL_ttf { };
|
||||||
|
|
||||||
SDL2 = callPackage ../development/libraries/SDL2 {
|
SDL2 = callPackage ../development/libraries/SDL2 {
|
||||||
openglSupport = mesaSupported;
|
openglSupport = libGLSupported;
|
||||||
alsaSupport = stdenv.isLinux;
|
alsaSupport = stdenv.isLinux;
|
||||||
x11Support = !stdenv.isCygwin;
|
x11Support = !stdenv.isCygwin;
|
||||||
waylandSupport = stdenv.isLinux;
|
waylandSupport = stdenv.isLinux;
|
||||||
|
@ -18887,7 +18887,7 @@ with pkgs;
|
||||||
racer = callPackage ../games/racer { };
|
racer = callPackage ../games/racer { };
|
||||||
|
|
||||||
residualvm = callPackage ../games/residualvm {
|
residualvm = callPackage ../games/residualvm {
|
||||||
openglSupport = mesaSupported;
|
openglSupport = libGLSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
rftg = callPackage ../games/rftg { };
|
rftg = callPackage ../games/rftg { };
|
||||||
|
|
Loading…
Reference in New Issue