2008-03-10 16:05:32 +01:00
|
|
|
{ stdenv, fetchurl
|
2010-08-23 16:52:48 +02:00
|
|
|
, SDL, SDL_mixer, gstreamer, gstPluginsBase, gstPluginsGood
|
|
|
|
, gstFfmpeg, speex
|
2008-10-14 10:26:00 +02:00
|
|
|
, libogg, libxml2, libjpeg, mesa, libpng, libungif, libtool
|
|
|
|
, boost, freetype, agg, dbus, curl, pkgconfig, gettext
|
2010-08-23 16:52:48 +02:00
|
|
|
, glib, gtk, gtkglext, x11, ming, dejagnu, python
|
2008-11-12 09:37:39 +01:00
|
|
|
, lib, makeWrapper }:
|
2006-09-24 14:23:13 +02:00
|
|
|
|
2009-09-20 16:10:16 +02:00
|
|
|
assert stdenv ? glibc;
|
|
|
|
|
2010-08-23 16:52:48 +02:00
|
|
|
let version = "0.8.8"; in
|
2009-09-20 16:10:16 +02:00
|
|
|
|
2008-03-10 10:48:17 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2008-06-25 10:50:39 +02:00
|
|
|
name = "gnash-${version}";
|
2006-09-24 14:23:13 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2008-06-25 10:50:39 +02:00
|
|
|
url = "mirror://gnu/gnash/${version}/${name}.tar.bz2";
|
2010-08-23 16:52:48 +02:00
|
|
|
sha256 = "0872qrgzpy76lxq5b2xigyzaghn53xrpqba2qp3nrk8yz20lpb6w";
|
2006-09-24 14:23:13 +02:00
|
|
|
};
|
|
|
|
|
2008-03-10 10:48:17 +01:00
|
|
|
patchPhase = ''
|
|
|
|
# Add all libs to `macros/libslist', a list of library search paths.
|
|
|
|
for lib in ${lib.concatStringsSep " "
|
|
|
|
(map (lib: "\"${lib}\"/lib")
|
|
|
|
(buildInputs ++ [stdenv.glibc]))}
|
|
|
|
do
|
|
|
|
echo -n "$lib " >> macros/libslist
|
|
|
|
done
|
2008-06-25 10:50:39 +02:00
|
|
|
|
|
|
|
# Make sure to honor $TMPDIR, for chroot builds.
|
|
|
|
for file in configure gui/Makefile.in Makefile.in
|
|
|
|
do
|
|
|
|
sed -i "$file" -es'|/tmp/|$TMPDIR/|g'
|
|
|
|
done
|
2008-03-10 10:48:17 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
# XXX: KDE is supported as well so we could make it available optionally.
|
2008-10-14 10:26:00 +02:00
|
|
|
buildInputs = [
|
2010-08-23 16:52:48 +02:00
|
|
|
gettext x11 SDL SDL_mixer gstreamer gstPluginsBase gstPluginsGood
|
|
|
|
gstFfmpeg speex libtool
|
2008-10-14 10:26:00 +02:00
|
|
|
libogg libxml2 libjpeg mesa libpng libungif boost freetype agg
|
2010-08-23 16:52:48 +02:00
|
|
|
dbus curl pkgconfig glib gtk gtkglext
|
2008-11-12 09:37:39 +01:00
|
|
|
makeWrapper
|
2008-10-14 10:26:00 +02:00
|
|
|
|
|
|
|
# For the test suite
|
|
|
|
ming dejagnu python
|
|
|
|
];
|
|
|
|
|
2010-08-23 16:52:48 +02:00
|
|
|
preConfigure =
|
|
|
|
'' configureFlags=" \
|
|
|
|
--with-sdl-incl=${SDL}/include/SDL \
|
|
|
|
--with-npapi-plugindir=$out/plugins \
|
|
|
|
--enable-media=gst \
|
|
|
|
--enable-gui=gtk"
|
|
|
|
|
|
|
|
# In `libmedia', Gnash compiles with "-I$gstPluginsBase/include",
|
|
|
|
# whereas it really needs "-I$gstPluginsBase/include/gstreamer-0.10".
|
|
|
|
# Work around this using GCC's $CPATH variable.
|
|
|
|
export CPATH="${gstPluginsBase}/include/gstreamer-0.10:${gstPluginsGood}/include/gstreamer-0.10"
|
|
|
|
echo "\$CPATH set to \`$CPATH'"
|
|
|
|
'';
|
2008-03-10 10:48:17 +01:00
|
|
|
|
2008-03-10 16:05:32 +01:00
|
|
|
# Make sure `gtk-gnash' gets `libXext' in its `RPATH'.
|
|
|
|
NIX_LDFLAGS="-lX11 -lXext";
|
|
|
|
|
2010-08-23 16:52:48 +02:00
|
|
|
doCheck = true;
|
2008-10-15 10:43:50 +02:00
|
|
|
|
2008-03-10 14:24:11 +01:00
|
|
|
preInstall = ''ensureDir $out/plugins'';
|
2008-11-12 09:37:39 +01:00
|
|
|
postInstall = ''
|
|
|
|
make install-plugins
|
|
|
|
|
|
|
|
# Wrap programs so the find the GStreamer plug-ins they need
|
|
|
|
# (e.g., gst-ffmpeg is needed to watch movies such as YouTube's).
|
2009-09-25 17:24:31 +02:00
|
|
|
for prog in "$out/bin/"*
|
2008-11-12 09:37:39 +01:00
|
|
|
do
|
2009-09-25 17:24:31 +02:00
|
|
|
wrapProgram "$prog" --prefix \
|
2008-11-12 09:37:39 +01:00
|
|
|
GST_PLUGIN_PATH ":" \
|
2010-08-23 16:52:48 +02:00
|
|
|
"${gstPluginsBase}/lib/gstreamer-0.10:${gstPluginsGood}/lib/gstreamer-0.10:${gstFfmpeg}/lib/gstreamer-0.10"
|
2008-11-12 09:37:39 +01:00
|
|
|
done
|
|
|
|
'';
|
2008-03-10 14:24:11 +01:00
|
|
|
|
2008-03-10 10:48:17 +01:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.gnu.org/software/gnash/;
|
2009-09-25 17:24:31 +02:00
|
|
|
description = "GNU Gnash, a libre SWF (Flash) movie player";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Gnash is a GNU Flash movie player. Flash is an animation file format
|
|
|
|
pioneered by Macromedia which continues to be supported by their
|
|
|
|
successor company, Adobe. Flash has been extended to include audio and
|
|
|
|
video content, and programs written in ActionScript, an
|
|
|
|
ECMAScript-compatible language. Gnash is based on GameSWF, and
|
|
|
|
supports most SWF v7 features and some SWF v8 and v9.
|
|
|
|
'';
|
|
|
|
|
2008-03-10 10:48:17 +01:00
|
|
|
license = "GPLv3+";
|
2009-09-25 17:24:31 +02:00
|
|
|
|
|
|
|
maintainers = [ stdenv.lib.maintainers.ludo ];
|
|
|
|
platforms = stdenv.lib.platforms.gnu;
|
2008-03-10 10:48:17 +01:00
|
|
|
};
|
2006-09-24 23:56:50 +02:00
|
|
|
} // {mozillaPlugin = "/plugins";}
|