Merge pull request #15367 from bendlas/update-wine

wine-unstable: 1.9.7 -> 1.9.11; add optional dependencies; opencl-icd: init; refactor flags
This commit is contained in:
Nikolay Amiantov 2016-06-10 16:47:31 +04:00 committed by GitHub
commit 21f5510a54
7 changed files with 147 additions and 24 deletions

View File

@ -0,0 +1,15 @@
{ stdenv, fetchurl, ruby, opencl-headers }: let
version = "2.2.9";
in stdenv.mkDerivation {
name = "opencl-icd-${version}";
buildInputs = [ ruby opencl-headers ];
configureFlags = [ "--enable-official-khronos-headers" ];
src = fetchurl {
url = "https://forge.imag.fr/frs/download.php/716/ocl-icd-${version}.tar.gz";
sha256 = "1rgaixwnxmrq2aq4kcdvs0yx7i6krakarya9vqs7qwsv5hzc32hc";
};
}

View File

@ -1,7 +1,7 @@
{ stdenv, lib, pkgArches,
name, version, src, monos, geckos, platforms,
pkgconfig, fontforge, makeWrapper, flex, bison,
pulseaudioSupport,
supportFlags,
buildScript ? null, configureFlags ? ""
}:
@ -19,14 +19,41 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
pkgconfig fontforge makeWrapper flex bison
];
buildInputs = toBuildInputs pkgArches (pkgs: (with pkgs; [
freetype fontconfig mesa mesa_noglu.osmesa libdrm libpng libjpeg openssl gnutls cups ncurses
alsaLib libxml2 libxslt lcms2 gettext dbus mpg123 openal
])
++ lib.optional pulseaudioSupport pkgs.libpulseaudio
buildInputs = toBuildInputs pkgArches (with supportFlags; (pkgs:
[ pkgs.freetype ]
++ lib.optional pngSupport pkgs.libpng
++ lib.optional jpegSupport pkgs.libjpeg
++ lib.optional cupsSupport pkgs.cups
++ lib.optional colorManagementSupport pkgs.lcms2
++ lib.optional gettextSupport pkgs.gettext
++ lib.optional dbusSupport pkgs.dbus
++ lib.optional mpg123Support pkgs.mpg123
++ lib.optional openalSupport pkgs.openal
++ lib.optional cairoSupport pkgs.cairo
++ lib.optional tiffSupport pkgs.libtiff
++ lib.optional odbcSupport pkgs.unixODBC
++ lib.optional netapiSupport pkgs.samba3_light
++ lib.optional cursesSupport pkgs.ncurses
++ lib.optional vaSupport pkgs.libva
++ lib.optional pcapSupport pkgs.libpcap
++ lib.optional v4lSupport pkgs.libv4l
++ lib.optional saneSupport pkgs.saneBackends
++ lib.optional gsmSupport pkgs.gsm
++ lib.optional gphoto2Support pkgs.libgphoto2
++ lib.optional ldapSupport pkgs.openldap
++ lib.optional fontconfigSupport pkgs.fontconfig
++ lib.optional alsaSupport pkgs.alsaLib
++ lib.optional pulseaudioSupport pkgs.libpulseaudio
++ lib.optional xineramaSupport pkgs.xorg.libXinerama
++ lib.optional gstreamerSupport pkgs.gst_plugins_base
++ lib.optionals gtkSupport [ pkgs.gtk3 pkgs.gnome.glib ]
++ lib.optionals openclSupport [ pkgs.opencl-headers pkgs.opencl-icd ]
++ lib.optionals xmlSupport [ pkgs.libxml2 pkgs.libxslt ]
++ lib.optionals tlsSupport [ pkgs.openssl pkgs.gnutls ]
++ lib.optionals openglSupport [ pkgs.mesa pkgs.mesa_noglu.osmesa pkgs.libdrm ]
++ (with pkgs.xorg; [
libXi libXcursor libXinerama libXrandr libXrender libXxf86vm libXcomposite libXext
]));
libX11 libXi libXcursor libXrandr libXrender libXxf86vm libXcomposite libXext
])));
# Wine locates a lot of libraries dynamically through dlopen(). Add
# them to the RPATH so that the user doesn't have to set them in
@ -34,7 +61,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
NIX_LDFLAGS = map (path: "-rpath " + path) (
map (x: "${lib.getLib x}/lib") ([ stdenv.cc.cc ] ++ buildInputs)
# libpulsecommon.so is linked but not found otherwise
++ lib.optionals pulseaudioSupport (map (x: "${lib.getLib x}/lib/pulseaudio")
++ lib.optionals supportFlags.pulseaudioSupport (map (x: "${lib.getLib x}/lib/pulseaudio")
(toBuildInputs pkgArches (pkgs: [ pkgs.libpulseaudio ])))
);

View File

@ -9,13 +9,49 @@
{ lib, pkgs, system, callPackage,
wineRelease ? "stable",
wineBuild ? (if system == "x86_64-linux" then "wineWow" else "wine32"),
libtxc_dxtn_Name ? "libtxc_dxtn_s2tc",
pngSupport ? false,
jpegSupport ? false,
tiffSupport ? false,
gettextSupport ? false,
fontconfigSupport ? false,
alsaSupport ? false,
gtkSupport ? false,
openglSupport ? false,
tlsSupport ? false,
gstreamerSupport ? false,
cupsSupport ? false,
colorManagementSupport ? false,
dbusSupport ? false,
mpg123Support ? false,
openalSupport ? false,
openclSupport ? false,
cairoSupport ? false,
odbcSupport ? false,
netapiSupport ? false,
cursesSupport ? false,
vaSupport ? false,
pcapSupport ? false,
v4lSupport ? false,
saneSupport ? false,
gsmSupport ? false,
gphoto2Support ? false,
ldapSupport ? false,
pulseaudioSupport ? false,
libtxc_dxtn_Name ? "libtxc_dxtn_s2tc" }:
xineramaSupport ? false,
xmlSupport ? false }:
let wine-build = build: release:
lib.getAttr build (callPackage ./packages.nix {
wineRelease = release;
inherit pulseaudioSupport;
supportFlags = {
inherit pngSupport jpegSupport cupsSupport colorManagementSupport gettextSupport
dbusSupport mpg123Support openalSupport cairoSupport tiffSupport odbcSupport
netapiSupport cursesSupport vaSupport pcapSupport v4lSupport saneSupport
gsmSupport gphoto2Support ldapSupport fontconfigSupport alsaSupport
pulseaudioSupport xineramaSupport gtkSupport openclSupport xmlSupport tlsSupport
openglSupport gstreamerSupport;
};
});
in if wineRelease == "staging" then

View File

@ -1,14 +1,14 @@
{ system, stdenv, stdenv_32bit, lib, pkgs, pkgsi686Linux, callPackage, callPackage_i686,
overrideCC, wrapCCMulti, gcc49,
pulseaudioSupport,
wineRelease ? "stable"
wineRelease ? "stable",
supportFlags
}:
let src = lib.getAttr wineRelease (callPackage ./sources.nix {});
in with src; {
wine32 = callPackage_i686 ./base.nix {
name = "wine-${version}";
inherit src version pulseaudioSupport;
inherit src version supportFlags;
pkgArches = [ pkgsi686Linux ];
geckos = [ gecko32 ];
monos = [ mono ];
@ -16,7 +16,7 @@ in with src; {
};
wine64 = callPackage ./base.nix {
name = "wine64-${version}";
inherit src version pulseaudioSupport;
inherit src version supportFlags;
# FIXME: drop this when GCC is updated to >5.3.
# Corresponding bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69140
stdenv = overrideCC stdenv gcc49;
@ -28,7 +28,7 @@ in with src; {
};
wineWow = callPackage ./base.nix {
name = "wine-wow-${version}";
inherit src version pulseaudioSupport;
inherit src version supportFlags;
# FIXME: see above.
stdenv = overrideCC stdenv_32bit (wrapCCMulti gcc49);
pkgArches = [ pkgs pkgsi686Linux ];

View File

@ -6,9 +6,9 @@ let fetchurl = args@{url, sha256, ...}:
in rec {
stable = fetchurl rec {
version = "1.8.1";
version = "1.8.2";
url = "mirror://sourceforge/wine/wine-${version}.tar.bz2";
sha256 = "15ya496qq24ipqii7ij8x8h5x8n21vgqa4h6binb74w5mzdd76hl";
sha256 = "0vsswlnaa9ndg1pais63c39xks519r9fhz0yq3q8fphly2nlyqji";
## see http://wiki.winehq.org/Gecko
gecko32 = fetchurl rec {
@ -30,9 +30,9 @@ in rec {
};
unstable = fetchurl rec {
version = "1.9.7";
version = "1.9.11";
url = "mirror://sourceforge/wine/wine-${version}.tar.bz2";
sha256 = "1v47i0pxqcixnh06x23kzp2dbz1cf3d2sric0bw6xqh54ph5yw29";
sha256 = "15mbrnx4zqsdsxz7rwkb1pp58bcyfqnm8f2fh7cbbdgwh117k3vj";
inherit (stable) mono;
gecko32 = fetchurl rec {
version = "2.44";
@ -48,7 +48,7 @@ in rec {
staging = fetchFromGitHub rec {
inherit (unstable) version;
sha256 = "1h5hwd07qyx0qw5whf6lcp7v57kqd6mrrcvwwg1bydir68b0zp16";
sha256 = "0q990d26wsik16w1yya2z8nwxnhnaiiy85igdnan1ib2b00z861m";
owner = "wine-compholio";
repo = "wine-staging";
rev = "v${version}";

View File

@ -8,8 +8,7 @@ let patch = (callPackage ./sources.nix {}).staging;
in assert (builtins.parseDrvName wineUnstable.name).version == patch.version;
stdenv.lib.overrideDerivation wineUnstable (self: {
nativeBuildInputs = build-inputs [ libtxc_dxtn_Name ] self.nativeBuildInputs;
buildInputs = build-inputs [ "perl" "utillinux" "autoconf" ] self.buildInputs;
buildInputs = build-inputs [ "perl" "utillinux" "autoconf" libtxc_dxtn_Name ] self.buildInputs;
name = "${self.name}-staging";

View File

@ -8622,6 +8622,8 @@ in
opencl-headers = callPackage ../development/libraries/opencl-headers { };
opencl-icd = callPackage ../development/libraries/opencl-icd { };
opencollada = callPackage ../development/libraries/opencollada { };
opencsg = callPackage ../development/libraries/opencsg { };
@ -16885,8 +16887,52 @@ in
wineRelease = config.wine.release or "stable";
wineBuild = config.wine.build or "wine32";
pulseaudioSupport = config.pulseaudio or stdenv.isLinux;
pngSupport = true;
jpegSupport = true;
tiffSupport = true;
gettextSupport = true;
fontconfigSupport = true;
alsaSupport = true;
openglSupport = true;
tlsSupport = true;
cursesSupport = true;
};
wineStable = wine.override { wineRelease = "stable"; };
wineMinimal = lowPrio (self.wine.override {
pulseaudioSupport = false;
pngSupport = false;
jpegSupport = false;
tiffSupport = false;
gettextSupport = false;
fontconfigSupport = false;
alsaSupport = false;
openglSupport = false;
tlsSupport = false;
cursesSupport = false;
});
wineFull = lowPrio (self.wine.override {
gtkSupport = true;
gstreamerSupport = true;
cupsSupport = true;
colorManagementSupport = true;
dbusSupport = true;
mpg123Support = true;
openalSupport = true;
openclSupport = true;
cairoSupport = true;
odbcSupport = true;
netapiSupport = true;
vaSupport = true;
pcapSupport = true;
v4lSupport = true;
saneSupport = true;
gsmSupport = true;
gphoto2Support = true;
ldapSupport = true;
pulseaudioSupport = true;
xineramaSupport = true;
xmlSupport = true;
});
wineStable = self.wine.override { wineRelease = "stable"; };
wineUnstable = lowPrio (self.wine.override { wineRelease = "unstable"; });
wineStaging = lowPrio (self.wine.override { wineRelease = "staging"; });