summary refs log tree commit diff
path: root/pkgs/applications/video/MPlayer/builder.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/video/MPlayer/builder.sh')
-rw-r--r--pkgs/applications/video/MPlayer/builder.sh29
1 files changed, 17 insertions, 12 deletions
diff --git a/pkgs/applications/video/MPlayer/builder.sh b/pkgs/applications/video/MPlayer/builder.sh
index ca3b4fa1a710..333219ef2c15 100644
--- a/pkgs/applications/video/MPlayer/builder.sh
+++ b/pkgs/applications/video/MPlayer/builder.sh
@@ -1,17 +1,22 @@
-buildinputs="$freetype $x11 $alsa"
-. $stdenv/setup || exit 1
+buildInputs="$x11 $freetype $zlib $alsa"
+. $stdenv/setup
 
-tar xvfj $src || exit 1
-tar xvfj $fonts || exit 1
-cd MPlayer-* || exit 1
-./configure --prefix=$out --with-win32libdir=$win32codecs \
- --with-x11incdir=$x11/include --with-x11libdir=$x11/lib \
+postUnpack() {
+    unpackFile $fonts
+}
+postUnpack=postUnpack
+
+configureFlags="\
+ --with-win32libdir=$win32codecs \
  --with-reallibdir=$win32codecs \
  --disable-sdl --disable-esd --disable-xanim --disable-cdparanoia --disable-directfb \
  --disable-lirc --disable-svga --disable-libdv \
  --disable-vorbis --disable-png --disable-jpeg --disable-gif \
- --enable-runtime-cpudetection \
- || exit 1
-make || exit 1
-make install || exit 1
-cp -p ../font-arial-iso-8859-1/font-arial-18-iso-8859-1/* $out/share/mplayer/font || exit 1
+ --enable-runtime-cpudetection"
+
+postInstall() {
+    cp -p ../font-arial-iso-8859-1/font-arial-18-iso-8859-1/* $out/share/mplayer/font
+}
+postInstall=postInstall
+
+genericBuild