git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #18577 from matthewbauer/mplayer-darwin

mplayer: fix on darwin

commitfa507771acfabda317b614bb851278de16e094d7 authorDaiderd Jordan <daiderd@gmail.com> dateThu 15 Sep 2016, 09:32 (10 years ago) parent36aad7185f2c3e
2 files changed+16−7
pkgs/applications/audio/cdparanoia/default.nix+1−1 pkgs/applications/video/mplayer/default.nix+15−6
pkgs/applications/audio/cdparanoia/default.nix+1−1
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
2323 })
2424 ];
2525
26− buildInputs = stdenv.lib.optional stdenv.isDarwin [
26+ propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [
2727 Carbon
2828 IOKit
2929 ];
pkgs/applications/video/mplayer/default.nix+15−6
@@ -1,15 +1,15 @@
1−{ stdenv, fetchurl, pkgconfig, freetype, yasm
1+{ stdenv, fetchurl, fetchpatch, pkgconfig, freetype, yasm
22, aalibSupport ? true, aalib ? null
33, fontconfigSupport ? true, fontconfig ? null, freefont_ttf ? null
44, fribidiSupport ? true, fribidi ? null
55, x11Support ? true, libX11 ? null, libXext ? null, mesa ? null
66, xineramaSupport ? true, libXinerama ? null
77, xvSupport ? true, libXv ? null
8−, alsaSupport ? true, alsaLib ? null
8+, alsaSupport ? stdenv.isLinux, alsaLib ? null
99, screenSaverSupport ? true, libXScrnSaver ? null
1010, vdpauSupport ? false, libvdpau ? null
11−, cddaSupport ? true, cdparanoia ? null
12−, dvdnavSupport ? true, libdvdnav ? null
11+, cddaSupport ? !stdenv.isDarwin, cdparanoia ? null
12+, dvdnavSupport ? !stdenv.isDarwin, libdvdnav ? null
1313, bluraySupport ? true, libbluray ? null
1414, amrSupport ? false, amrnb ? null, amrwb ? null
1515, cacaSupport ? true, libcaca ? null
@@ -24,6 +24,7 @@
2424, libpngSupport ? true, libpng ? null
2525, libjpegSupport ? true, libjpeg ? null
2626, useUnfreeCodecs ? false
27+, darwin ? null
2728}:
2829
2930assert fontconfigSupport -> (fontconfig != null);
@@ -102,6 +103,13 @@ stdenv.mkDerivation rec {
102103 sed -i /^_install_strip/d configure
103104 '';
104105
106+ patches = [
107+ (fetchpatch {
108+ url = "https://github.com/pigoz/mplayer-svn/commit/6c6a7c2afe11c15716cdf4371fb4bf211644b7e1.patch";
109+ sha256 = "0abg5122kisgcc8ay3barlibrgn259igsfq3ak6na9g8j5cgviw9";
110+ })
111+ ];
112+
105113 buildInputs = with stdenv.lib;
106114 [ pkgconfig freetype ]
107115 ++ optional aalibSupport aalib
@@ -127,6 +135,7 @@ stdenv.mkDerivation rec {
127135 ++ optional libpngSupport libpng
128136 ++ optional libjpegSupport libjpeg
129137 ++ optional bs2bSupport libbs2b
138+ ++ (with darwin.apple_sdk.frameworks; optionals stdenv.isDarwin [ Cocoa OpenGL ])
130139 ;
131140
132141 nativeBuildInputs = [ yasm ];
@@ -162,8 +171,8 @@ stdenv.mkDerivation rec {
162171 --disable-xanim
163172 --disable-ivtv
164173 --disable-xvid --disable-xvid-lavc
165− --enable-vidix
166− --enable-fbdev
174+ ${optionalString stdenv.isLinux "--enable-vidix"}
175+ ${optionalString stdenv.isLinux "--enable-fbdev"}
167176 --disable-ossaudio
168177 '';
169178