summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2004-10-17 13:13:24 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2004-10-17 13:13:24 +0000
commita4a9543dc67125037cfc657f6bfa5c3925697dd0 (patch)
treedd131dbf9aaf5bce7fe3c59dbfd3a7d1a160ef72
parent17257424b1708f8e2cadae617216411bd6608eb8 (diff)
downloadnixpkgs-a4a9543dc67125037cfc657f6bfa5c3925697dd0.tar
nixpkgs-a4a9543dc67125037cfc657f6bfa5c3925697dd0.tar.gz
nixpkgs-a4a9543dc67125037cfc657f6bfa5c3925697dd0.tar.bz2
nixpkgs-a4a9543dc67125037cfc657f6bfa5c3925697dd0.tar.lz
nixpkgs-a4a9543dc67125037cfc657f6bfa5c3925697dd0.tar.xz
nixpkgs-a4a9543dc67125037cfc657f6bfa5c3925697dd0.tar.zst
nixpkgs-a4a9543dc67125037cfc657f6bfa5c3925697dd0.zip
* MPlayer Plugin updated to 2.70.
svn path=/nixpkgs/trunk/; revision=1564
-rw-r--r--pkgs/applications/video/mplayerplug-in/builder.sh33
-rw-r--r--pkgs/applications/video/mplayerplug-in/default.nix16
-rw-r--r--pkgs/system/all-packages-generic.nix3
3 files changed, 36 insertions, 16 deletions
diff --git a/pkgs/applications/video/mplayerplug-in/builder.sh b/pkgs/applications/video/mplayerplug-in/builder.sh
index 2fb9ae91a22..d9b895dead2 100644
--- a/pkgs/applications/video/mplayerplug-in/builder.sh
+++ b/pkgs/applications/video/mplayerplug-in/builder.sh
@@ -1,9 +1,24 @@
-buildinputs="$x11"
-. $stdenv/setup || exit 1
-
-tar xvfz $src || exit 1
-cd mplayer* || exit 1
-./configure || exit 1
-make || exit 1
-mkdir -p $out/lib/mozilla/plugins || exit 1
-cp mplayerplug-in.so $out/lib/mozilla/plugins || exit 1
+. $stdenv/setup
+
+# The Firefox pkgconfig files are buggy; they are called firefox-*.pc,
+# but they refer to mozilla-*.pc.  Also, mplayerplug-in requires
+# mozilla-*.pc.
+mkdir pkgconfig
+for i in $firefox/lib/pkgconfig/*.pc; do
+    ln -s $i pkgconfig/$(echo $(basename $i) | sed s/firefox/mozilla/)
+done
+PKG_CONFIG_PATH=$NIX_BUILD_TOP/pkgconfig:$PKG_CONFIG_PATH
+
+firefoxIncl=$(echo $firefox/include/firefox-*)
+export NIX_CFLAGS_COMPILE="-I$firefoxIncl $NIX_CFLAGS_COMPILE"
+
+dontMakeInstall=1
+
+postInstall=postInstall
+postInstall() {
+    mkdir -p $out/lib/mozilla/plugins
+    cp -p mplayerplug-in.so mplayerplug-in.xpt $out/lib/mozilla/plugins
+}
+
+genericBuild
+
diff --git a/pkgs/applications/video/mplayerplug-in/default.nix b/pkgs/applications/video/mplayerplug-in/default.nix
index b999dd1d126..11a47e4d0a4 100644
--- a/pkgs/applications/video/mplayerplug-in/default.nix
+++ b/pkgs/applications/video/mplayerplug-in/default.nix
@@ -1,15 +1,19 @@
-{stdenv, fetchurl, x11}:
+{stdenv, fetchurl, pkgconfig, firefox, libXpm}:
 
-assert x11 != null;
+# Note: we shouldn't be dependent on Firefox.  The only thing we need
+# are the include files so that we can access the plugin API (I
+# think).
 
 stdenv.mkDerivation {
-  name = "mplayerplug-in-1.0pre2";
+  name = "mplayerplug-in-2.70";
 
   builder = ./builder.sh;
   src = fetchurl {
-    url = http://heanet.dl.sourceforge.net/sourceforge/mplayerplug-in/mplayerplug-in-1.0pre2.tar.gz;
-    md5 = "1a6eb243989c143984bb1aac63b5282e";
+    url = http://heanet.dl.sourceforge.net/sourceforge/mplayerplug-in/mplayerplug-in-2.70.tar.gz;
+    md5 = "90784c7ccb40037b446053f0c1d1c2b4";
   };
 
-  x11 = x11;
+  buildInputs = [pkgconfig firefox (firefox.gtk) libXpm];
+  
+  inherit firefox;
 }
diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix
index 9e5947a496d..7b654f50b75 100644
--- a/pkgs/system/all-packages-generic.nix
+++ b/pkgs/system/all-packages-generic.nix
@@ -820,7 +820,8 @@ rec {
   };
 
   MPlayerPlugin = (import ../applications/video/mplayerplug-in) {
-    inherit fetchurl stdenv x11;
+    inherit fetchurl stdenv pkgconfig firefox;
+    inherit (xlibs) libXpm;
   };
 
   vlc = (import ../applications/video/vlc) {