2008-03-10 16:05:32 +01:00
|
|
|
{ stdenv, fetchurl
|
2008-11-12 09:37:39 +01:00
|
|
|
, SDL, SDL_mixer, gstreamer, gstPluginsBase, gstFfmpeg
|
2008-10-14 10:26:00 +02:00
|
|
|
, libogg, libxml2, libjpeg, mesa, libpng, libungif, libtool
|
|
|
|
, boost, freetype, agg, dbus, curl, pkgconfig, gettext
|
|
|
|
, glib, gtk, 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;
|
|
|
|
|
2009-03-06 15:24:27 +01:00
|
|
|
let version = "0.8.5"; 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";
|
2009-03-06 15:24:27 +01:00
|
|
|
sha256 = "1cqhnbp99rb0n4x2bsz8wwh7vvc2kclxc1wmrl5vaapd9qhp5whn";
|
2006-09-24 14:23:13 +02:00
|
|
|
};
|
|
|
|
|
2008-03-10 14:24:11 +01:00
|
|
|
builder = ./builder.sh;
|
|
|
|
|
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
|
|
|
'';
|
|
|
|
|
2008-03-11 13:37:22 +01:00
|
|
|
|
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 = [
|
2008-11-12 09:37:39 +01:00
|
|
|
gettext x11 SDL SDL_mixer gstreamer gstPluginsBase gstFfmpeg libtool
|
2008-10-14 10:26:00 +02:00
|
|
|
libogg libxml2 libjpeg mesa libpng libungif boost freetype agg
|
|
|
|
dbus curl pkgconfig glib gtk
|
2008-11-12 09:37:39 +01:00
|
|
|
makeWrapper
|
2008-10-14 10:26:00 +02:00
|
|
|
|
|
|
|
# For the test suite
|
|
|
|
ming dejagnu python
|
|
|
|
];
|
|
|
|
|
2006-09-24 14:23:13 +02:00
|
|
|
inherit SDL_mixer SDL;
|
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";
|
|
|
|
|
2008-10-22 01:00:31 +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).
|
|
|
|
for prog in $out/bin/*
|
|
|
|
do
|
|
|
|
wrapProgram "$prog" --prefix \
|
|
|
|
GST_PLUGIN_PATH ":" \
|
|
|
|
"${gstPluginsBase}/lib/gstreamer-0.10:${gstFfmpeg}/lib/gstreamer-0.10"
|
|
|
|
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/;
|
2008-10-14 10:26:00 +02:00
|
|
|
description = "GNU Gnash, an SWF movie player";
|
2008-03-10 10:48:17 +01:00
|
|
|
license = "GPLv3+";
|
|
|
|
};
|
2006-09-24 23:56:50 +02:00
|
|
|
} // {mozillaPlugin = "/plugins";}
|