From 2e3034709991fa20f1833137cddbb4c8b6511b8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 29 Sep 2008 21:56:17 +0000 Subject: [PATCH] MPlayerPlugin: Allow compilation with GNU IceCat 3. Similar changes would allow it to be compiled for Mozilla Firefox 3. svn path=/nixpkgs/trunk/; revision=12929 --- .../mplayerplug-in/default.nix | 20 +++++++++++++++++-- pkgs/top-level/all-packages.nix | 6 +++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/mplayerplug-in/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/mplayerplug-in/default.nix index f9acabc0c22..e3ac37ba8cc 100644 --- a/pkgs/applications/networking/browsers/mozilla-plugins/mplayerplug-in/default.nix +++ b/pkgs/applications/networking/browsers/mozilla-plugins/mplayerplug-in/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, pkgconfig, firefox, libXpm, gettext}: +{stdenv, fetchurl, pkgconfig, browser, browserName, libXpm, gettext}: stdenv.mkDerivation rec { name = "mplayerplug-in-3.55"; @@ -8,7 +8,22 @@ stdenv.mkDerivation rec { sha256 = "0zkvqrzibrbljiccvz3rhbmgifxadlrfjylqpz48jnjx9kggynms"; }; - buildInputs = [pkgconfig firefox (firefox.gtk) libXpm gettext]; + patches = + (if browserName == "icecat" # FIXME: Should match Firefox 3 as well. + then [ ./icecat3-idldir.patch ] + else []); + + postConfigure = + (if browserName == "icecat" # FIXME: Should match Firefox 3 as well. + then '' + # Cause a rebuild of these file from the IDL file, needed for GNU IceCat 3 + # and Mozilla Firefox 3. + # See, e.g., http://article.gmane.org/gmane.comp.mozilla.mplayerplug-in/2104 . + rm -f Source/nsIScriptableMplayerPlugin.h + '' + else ""); + + buildInputs = [ pkgconfig browser (browser.gtk) libXpm gettext ]; installPhase = '' ensureDir $out/lib/mozilla/plugins @@ -22,5 +37,6 @@ stdenv.mkDerivation rec { meta = { description = "A browser plugin that uses mplayer to play digital media from websites"; homepage = http://mplayerplug-in.sourceforge.net/; + licenses = [ "GPLv2+" "LGPLv2+" "MPLv1+" ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b223ee057d9..95dc6ea6080 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6537,9 +6537,9 @@ let }; */ - MPlayerPlugin = browser: + MPlayerPlugin = browser: browserName: import ../applications/networking/browsers/mozilla-plugins/mplayerplug-in { - firefox = browser; + inherit browser browserName; inherit fetchurl stdenv pkgconfig gettext; inherit (xlibs) libXpm; # !!! should depend on MPlayer @@ -6960,7 +6960,7 @@ let ++ lib.optional (enableAdobeFlash) flashplayer # RealPlayer is disabled by default for legal reasons. ++ lib.optional (system != "i686-linux" && getConfig [browserName "enableRealPlayer"] false) RealPlayer - ++ lib.optional (getConfig [browserName "enableMPlayer"] true) (MPlayerPlugin browser) + ++ lib.optional (getConfig [browserName "enableMPlayer"] true) (MPlayerPlugin browser browserName) ++ lib.optional (supportsJDK && getConfig [browserName "jre"] false && jrePlugin ? mozillaPlugin) jrePlugin ); };