2008-03-10 15:05:32 +00:00
|
|
|
{ stdenv, fetchurl
|
2008-11-12 08:37:39 +00:00
|
|
|
, SDL, SDL_mixer, gstreamer, gstPluginsBase, gstFfmpeg
|
2008-10-14 09:26:00 +01:00
|
|
|
, libogg, libxml2, libjpeg, mesa, libpng, libungif, libtool
|
|
|
|
, boost, freetype, agg, dbus, curl, pkgconfig, gettext
|
|
|
|
, glib, gtk, x11, ming, dejagnu, python
|
2008-11-12 08:37:39 +00:00
|
|
|
, lib, makeWrapper }:
|
2006-09-24 13:23:13 +01:00
|
|
|
|
2009-09-20 15:10:16 +01:00
|
|
|
assert stdenv ? glibc;
|
|
|
|
|
2009-03-06 14:24:27 +00:00
|
|
|
let version = "0.8.5"; in
|
2009-09-20 15:10:16 +01:00
|
|
|
|
2008-03-10 09:48:17 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2008-06-25 09:50:39 +01:00
|
|
|
name = "gnash-${version}";
|
2006-09-24 13:23:13 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2008-06-25 09:50:39 +01:00
|
|
|
url = "mirror://gnu/gnash/${version}/${name}.tar.bz2";
|
2009-03-06 14:24:27 +00:00
|
|
|
sha256 = "1cqhnbp99rb0n4x2bsz8wwh7vvc2kclxc1wmrl5vaapd9qhp5whn";
|
2006-09-24 13:23:13 +01:00
|
|
|
};
|
|
|
|
|
2008-03-10 13:24:11 +00:00
|
|
|
builder = ./builder.sh;
|
|
|
|
|
2008-03-10 09:48:17 +00: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 09:50:39 +01: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 09:48:17 +00:00
|
|
|
'';
|
|
|
|
|
2008-03-11 12:37:22 +00:00
|
|
|
|
2008-03-10 09:48:17 +00:00
|
|
|
# XXX: KDE is supported as well so we could make it available optionally.
|
2008-10-14 09:26:00 +01:00
|
|
|
buildInputs = [
|
2008-11-12 08:37:39 +00:00
|
|
|
gettext x11 SDL SDL_mixer gstreamer gstPluginsBase gstFfmpeg libtool
|
2008-10-14 09:26:00 +01:00
|
|
|
libogg libxml2 libjpeg mesa libpng libungif boost freetype agg
|
|
|
|
dbus curl pkgconfig glib gtk
|
2008-11-12 08:37:39 +00:00
|
|
|
makeWrapper
|
2008-10-14 09:26:00 +01:00
|
|
|
|
|
|
|
# For the test suite
|
|
|
|
ming dejagnu python
|
|
|
|
];
|
|
|
|
|
2006-09-24 13:23:13 +01:00
|
|
|
inherit SDL_mixer SDL;
|
2008-03-10 09:48:17 +00:00
|
|
|
|
2008-03-10 15:05:32 +00:00
|
|
|
# Make sure `gtk-gnash' gets `libXext' in its `RPATH'.
|
|
|
|
NIX_LDFLAGS="-lX11 -lXext";
|
|
|
|
|
2008-10-22 00:00:31 +01:00
|
|
|
#doCheck = true;
|
2008-10-15 09:43:50 +01:00
|
|
|
|
2008-03-10 13:24:11 +00:00
|
|
|
preInstall = ''ensureDir $out/plugins'';
|
2008-11-12 08:37:39 +00: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 13:24:11 +00:00
|
|
|
|
2008-03-10 09:48:17 +00:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.gnu.org/software/gnash/;
|
2008-10-14 09:26:00 +01:00
|
|
|
description = "GNU Gnash, an SWF movie player";
|
2008-03-10 09:48:17 +00:00
|
|
|
license = "GPLv3+";
|
|
|
|
};
|
2006-09-24 22:56:50 +01:00
|
|
|
} // {mozillaPlugin = "/plugins";}
|