3
0
Fork 0
forked from mirrors/nixpkgs

treewide: transition libGL/libGLU for qt

Also rename mesaSupported to libGLSupported
This commit is contained in:
Alexander V. Nikolaev 2018-02-24 15:38:25 +02:00
parent 0acec7e984
commit e94cd63bf5
6 changed files with 25 additions and 25 deletions

View file

@ -2,7 +2,7 @@
, hostPlatform
, libXrender, libXinerama, libXcursor, libXmu, libXv, libXext
, 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
, buildMultimedia ? stdenv.isLinux, alsaLib, gstreamer, gst-plugins-base
, buildWebkit ? (stdenv.isLinux || stdenv.isDarwin)
@ -76,7 +76,7 @@ stdenv.mkDerivation rec {
icu = icu.out;
libXfixes = libXfixes.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 {
name = "fix-medium-font.patch";
@ -159,7 +159,7 @@ stdenv.mkDerivation rec {
[ libXrender libXrandr libXinerama libXcursor libXext libXfixes libXv libXi
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
++ optional mesaSupported mesa_glu
++ optional libGLSupported libGLU
++ optional ((buildWebkit || buildMultimedia) && stdenv.isLinux ) alsaLib
++ optionals (buildWebkit || buildMultimedia) [ gstreamer gst-plugins-base ];

View file

@ -18,7 +18,7 @@ top-level attribute to `top-level/all-packages.nix`.
{
newScope,
stdenv, fetchurl, makeSetupHook, makeWrapper,
bison, cups ? null, harfbuzz, mesa, perl,
bison, cups ? null, harfbuzz, libGL, perl,
gstreamer, gst-plugins-base, gtk3, dconf,
# options
@ -66,7 +66,7 @@ let
qtbase = callPackage ../modules/qtbase.nix {
inherit (srcs.qtbase) src version;
patches = patches.qtbase;
inherit bison cups harfbuzz mesa;
inherit bison cups harfbuzz libGL;
withGtk3 = true; inherit dconf gtk3;
inherit developerBuild decryptSslTraffic;
};

View file

@ -27,7 +27,7 @@ existing packages here and modify it as necessary.
{
newScope,
stdenv, fetchurl, makeSetupHook, makeWrapper,
bison, cups ? null, harfbuzz, mesa, perl,
bison, cups ? null, harfbuzz, libGL, perl,
gstreamer, gst-plugins-base,
# options
@ -74,7 +74,7 @@ let
inherit mkDerivation;
qtbase = callPackage ../modules/qtbase.nix {
inherit bison cups harfbuzz mesa;
inherit bison cups harfbuzz libGL;
inherit (srcs.qtbase) src version;
patches = patches.qtbase;
inherit developerBuild decryptSslTraffic;

View file

@ -18,7 +18,7 @@ top-level attribute to `top-level/all-packages.nix`.
{
newScope,
stdenv, fetchurl, makeSetupHook, makeWrapper,
bison, cups ? null, harfbuzz, mesa, perl,
bison, cups ? null, harfbuzz, libGL, perl,
gstreamer, gst-plugins-base, gtk3, dconf,
# options
@ -66,7 +66,7 @@ let
qtbase = callPackage ../modules/qtbase.nix {
inherit (srcs.qtbase) src version;
patches = patches.qtbase;
inherit bison cups harfbuzz mesa;
inherit bison cups harfbuzz libGL;
withGtk3 = true; inherit dconf gtk3;
inherit developerBuild decryptSslTraffic;
};

View file

@ -18,8 +18,8 @@
withGtk3 ? false, dconf ? null, gtk3 ? null,
# options
mesaSupported ? (!stdenv.isDarwin),
mesa,
libGLSupported ? (!stdenv.isDarwin),
libGL,
buildExamples ? false,
buildTests ? false,
developerBuild ? false,
@ -69,7 +69,7 @@ stdenv.mkDerivation {
libX11 libXcomposite libXext libXi libXrender libxcb libxkbcommon xcbutil
xcbutilimage xcbutilkeysyms xcbutilrenderutil xcbutilwm
]
++ lib.optional mesaSupported mesa
++ lib.optional libGLSupported libGL
);
buildInputs =
@ -142,11 +142,11 @@ stdenv.mkDerivation {
# Note on the above: \x27 is a way if including a single-quote
# character in the sed string arguments.
else
lib.optionalString mesaSupported
lib.optionalString libGLSupported
''
sed -i mkspecs/common/linux.conf \
-e "/^QMAKE_INCDIR_OPENGL/ s|$|${mesa.dev or mesa}/include|" \
-e "/^QMAKE_LIBDIR_OPENGL/ s|$|${mesa.out}/lib|"
-e "/^QMAKE_INCDIR_OPENGL/ s|$|${libGL.dev or libGL}/include|" \
-e "/^QMAKE_LIBDIR_OPENGL/ s|$|${libGL.out}/lib|"
''
);
@ -208,7 +208,7 @@ stdenv.mkDerivation {
# 10.10
]
else
lib.optional mesaSupported ''-DNIXPKGS_MESA_GL="${mesa.out}/lib/libGL"''
lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"''
++ lib.optionals withGtk3
[
''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"''

View file

@ -10390,7 +10390,7 @@ with pkgs;
# Default derivation with libGL.so.1 to link into /run/opengl-drivers (if need)
libGL_driver = mesa_drivers;
mesaSupported = lib.elem system lib.platforms.mesaPlatforms;
libGLSupported = lib.elem system lib.platforms.mesaPlatforms;
libGLDarwinOr = alternative: if stdenv.isDarwin
then callPackage ../development/libraries/mesa-darwin {
@ -10853,7 +10853,7 @@ with pkgs;
qoauth = callPackage ../development/libraries/qoauth { };
qt3 = callPackage ../development/libraries/qt-3 {
openglSupport = mesaSupported;
openglSupport = libGLSupported;
libpng = libpng12;
};
@ -10861,13 +10861,13 @@ with pkgs;
qt48 = callPackage ../development/libraries/qt-4.x/4.8 {
# GNOME dependencies are not used unless gtkStyle == true
mesa = mesa_noglu;
inherit (pkgs.gnome2) libgnomeui GConf gnome_vfs;
cups = if stdenv.isLinux then cups else null;
# XXX: mariadb doesn't built on fbsd as of nov 2015
mysql = if (!stdenv.isFreeBSD) then mysql else null;
inherit libGL;
inherit (pkgs.darwin) cf-private libobjc;
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(...
inherit cups;
harfbuzz = harfbuzz-icu;
mesa = mesa_noglu;
inherit libGL;
inherit perl;
inherit (gst_all_1) gstreamer gst-plugins-base;
});
@ -10906,7 +10906,7 @@ with pkgs;
bison = bison2; # error: too few arguments to function 'int yylex(...
inherit cups;
harfbuzz = harfbuzz-icu;
mesa = mesa_noglu;
inherit libGL;
inherit perl;
inherit (gst_all_1) gstreamer gst-plugins-base;
inherit (gnome3) gtk3 dconf;
@ -10921,7 +10921,7 @@ with pkgs;
bison = bison2; # error: too few arguments to function 'int yylex(...
inherit cups;
harfbuzz = harfbuzz-icu;
mesa = mesa_noglu;
inherit libGL;
inherit perl;
inherit (gst_all_1) gstreamer gst-plugins-base;
inherit (gnome3) gtk3 dconf;
@ -11172,7 +11172,7 @@ with pkgs;
schroedinger = callPackage ../development/libraries/schroedinger { };
SDL = callPackage ../development/libraries/SDL {
openglSupport = mesaSupported;
openglSupport = libGLSupported;
alsaSupport = stdenv.isLinux;
x11Support = !stdenv.isCygwin;
pulseaudioSupport = config.pulseaudio or stdenv.isLinux;
@ -11196,7 +11196,7 @@ with pkgs;
SDL_ttf = callPackage ../development/libraries/SDL_ttf { };
SDL2 = callPackage ../development/libraries/SDL2 {
openglSupport = mesaSupported;
openglSupport = libGLSupported;
alsaSupport = stdenv.isLinux;
x11Support = !stdenv.isCygwin;
waylandSupport = stdenv.isLinux;
@ -18887,7 +18887,7 @@ with pkgs;
racer = callPackage ../games/racer { };
residualvm = callPackage ../games/residualvm {
openglSupport = mesaSupported;
openglSupport = libGLSupported;
};
rftg = callPackage ../games/rftg { };