From ee09ff00ff65ab8677560be70db68a81c8cc74fb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 11 Nov 2003 15:57:15 +0000 Subject: [PATCH] * Added the ALSA library. * Optional ALSA support in MPlayer. svn path=/nixpkgs/trunk/; revision=496 --- pkgs-ng/applications/video/MPlayer/builder.sh | 2 +- pkgs-ng/applications/video/MPlayer/default.fix | 7 ++++++- pkgs-ng/os-specific/linux/alsa/library/builder.sh | 9 +++++++++ pkgs-ng/os-specific/linux/alsa/library/default.fix | 10 ++++++++++ pkgs-ng/system/all-packages-generic.fix | 7 +++++++ 5 files changed, 33 insertions(+), 2 deletions(-) create mode 100755 pkgs-ng/os-specific/linux/alsa/library/builder.sh create mode 100644 pkgs-ng/os-specific/linux/alsa/library/default.fix diff --git a/pkgs-ng/applications/video/MPlayer/builder.sh b/pkgs-ng/applications/video/MPlayer/builder.sh index c791d72f741..aa018e73c2f 100755 --- a/pkgs-ng/applications/video/MPlayer/builder.sh +++ b/pkgs-ng/applications/video/MPlayer/builder.sh @@ -1,6 +1,6 @@ #! /bin/sh -buildinputs="$freetype $x11" +buildinputs="$freetype $x11 $alsa" . $stdenv/setup || exit 1 tar xvfj $src || exit 1 diff --git a/pkgs-ng/applications/video/MPlayer/default.fix b/pkgs-ng/applications/video/MPlayer/default.fix index 64871cd69f0..065676bc2ad 100644 --- a/pkgs-ng/applications/video/MPlayer/default.fix +++ b/pkgs-ng/applications/video/MPlayer/default.fix @@ -1,6 +1,8 @@ -{stdenv, fetchurl, x11, freetype}: +{ alsaSupport ? false +, stdenv, fetchurl, x11, freetype, alsa ? null}: assert !isNull x11 && !isNull freetype; +assert alsaSupport -> !isNull alsa; derivation { name = "MPlayer-1.0pre2"; @@ -16,9 +18,12 @@ derivation { md5 = "1ecd31d17b51f16332b1fcc7da36b312"; }; + alsaSupport = alsaSupport; + stdenv = stdenv; x11 = x11; freetype = freetype; + alsa = if alsaSupport then alsa else null; win32codecs = (import ./win32codecs) { stdenv = stdenv; fetchurl = fetchurl; diff --git a/pkgs-ng/os-specific/linux/alsa/library/builder.sh b/pkgs-ng/os-specific/linux/alsa/library/builder.sh new file mode 100755 index 00000000000..4cb8210f186 --- /dev/null +++ b/pkgs-ng/os-specific/linux/alsa/library/builder.sh @@ -0,0 +1,9 @@ +#! /bin/sh + +. $stdenv/setup || exit 1 + +tar xvfj $src || exit 1 +cd alsa-* || exit 1 +./configure --prefix=$out || exit 1 +make || exit 1 +make install || exit 1 diff --git a/pkgs-ng/os-specific/linux/alsa/library/default.fix b/pkgs-ng/os-specific/linux/alsa/library/default.fix new file mode 100644 index 00000000000..f13ca6ec54e --- /dev/null +++ b/pkgs-ng/os-specific/linux/alsa/library/default.fix @@ -0,0 +1,10 @@ +{stdenv, fetchurl}: derivation { + name = "alsa-lib-0.9.8"; + system = stdenv.system; + builder = ./builder.sh; + src = fetchurl { + url = ftp://ftp.alsa-project.org/pub/lib/alsa-lib-0.9.8.tar.bz2; + md5 = "c9f163fb0623de1b92bf287712641f6e"; + }; + stdenv = stdenv; +} diff --git a/pkgs-ng/system/all-packages-generic.fix b/pkgs-ng/system/all-packages-generic.fix index fcaca8b4739..d7262dfa56a 100644 --- a/pkgs-ng/system/all-packages-generic.fix +++ b/pkgs-ng/system/all-packages-generic.fix @@ -323,6 +323,11 @@ stdenv = stdenv; }; + alsaLib = (import ../os-specific/linux/alsa/library) { + fetchurl = fetchurl; + stdenv = stdenv; + }; + ### APPLICATIONS @@ -371,10 +376,12 @@ }; MPlayer = (import ../applications/video/MPlayer) { + alsaSupport = true; fetchurl = fetchurl; stdenv = stdenv; x11 = xfree86; freetype = freetype; + alsa = alsaLib; }; }