Building on Debian

From Gnash Project Wiki

Jump to: navigation, search

Here's what you need to do to build Gnash on Debian Etch.

If you're going to build from source control (http://Bazaar-vcs.org/), you'll need to upgrade bzr, which is only version 0.11. The easiest way to do that is go to http://backports.org, follow the Installation instructions, and:

apt-get -t etch-backports install bzr

Once you have got the Gnash sources

To build Gnash with custom configuration

You will certainly need to

   apt-get install build-essential

If you have checked out a copy using bzr, you will need to run ./autogen.sh to make the "configure" script. To do this you will need to

   apt-get install automake                # also gets autoconf
   apt-get install libtool
   apt-get install libltdl7-dev
   apt-get install libcurl3-dev            # will build without this, but without being able to load URLs.

Then you can run

   ./autogen.sh

in the gnash source directory.

There's a bug in libsmpeg-dev which causes autogen.sh to whinge. You can fix with this patch:

nelson@debian:~/trunk$ diff -u /tmp/smpeg.m4 /usr/share/aclocal/smpeg.m4
--- /tmp/smpeg.m4       2008-08-21 16:09:50.000000000 -0400
+++ /usr/share/aclocal/smpeg.m4 2008-08-21 16:08:02.000000000 -0400
@@ -10,7 +10,7 @@
 ACTION-IF-NOT-FOUND]]])
 dnl Test for SMPEG, and define SMPEG_CFLAGS and SMPEG_LIBS
 dnl
-AC_DEFUN(AM_PATH_SMPEG,
+AC_DEFUN([AM_PATH_SMPEG],
 [dnl
 dnl Get the cflags and libraries from the smpeg-config script
 dnl

Gnash always needs:

   apt-get install libboost-thread-dev     # also fetches libboost-dev
   apt-get install libboost-date-time-dev
   apt-get install libpng12-dev
   apt-get install libjpeg62-dev           # or libjpeg-dev
   apt-get install libungif4-dev           # in spite of configure's advice to install libungif-dev.
   apt-get install libxml2-dev

Now select a GUI/renderer combination out of (agg/gtk+kde is the default):

 opengl  gtk     apt-get install libgtkglext1-dev
 opengl  kde     apt-get install kdelibs4-dev
 opengl  sdl     apt-get install libsdl1.2-dev libpango1.0-dev
 cairo   gtk     apt-get install libgtk2.0-dev                # libgtk includes cairo
 cairo   sdl     apt-get install libcairo2-dev libsdl1.2-dev
 cairo   fltk    apt-get install libcairo2-dev #and install fltk2 from cvs source code
 agg     gtk     apt-get install libagg-dev libgtk2.0-dev
 agg     kde     apt-get install libagg-dev kdelibs4-dev
 agg     sdl     apt-get install libagg-dev libsdl1.2-dev
 agg     fltk    apt-get install libagg-dev #and install fltk2 from cvs source code
 agg     fb      apt-get install libagg-dev

and depending which --enable-media= option you have chosen (gst is the default):

 ffmpeg  apt-get install libavformat-dev libsdl-mixer1.2-dev    #(*)
 gst     apt-get install libgstreamer0.10-dev
 mad     apt-get install  libmad0-dev libsdl-mixer1.2-dev       #(*)
 none    Nothing!

(*) You can further refine which sound system will be used by installing one of libsdl1.2debian-{all,alsa,esd,arts,oss,nas} (-all contains support for all of the sound systems).

If you want to build the mozilla/firefox plugin, you will need to

   apt-get install mozilla-dev

The configure script also suggests installing a few packages for the gnash test suite, some of which are available in debian:

 apt-get install libming-dev
 apt-get install mtasc
 apt-get install libboost-serialization-dev

and some of which are not:

 swfmill   - http://swfmill.org/
 swfc      - http://www.swftools.org/

These packages are only for the test suite, so can be considered optional.


Now you can go

   ./configure
   make
   make install

to have gnash installed under /usr/local and

   make install-plugins

to install the plugin under your home directory.

To build the Debian package with default settings

To build a Debian package of Gnash you should be able to go:

   ./configure --enable-docbook
   apt-get install fakeroot
   fakeroot make deb

and this will list any packages it thinks you need to install to be able to build it.

However, this seems broken at present, dying when it tries to make the final package:

 dh_install --sourcedir=.../gnash-cvs20070529/debian/tmp
 cp: cannot stat `.../gnash-cvs20070529/debian/tmp//usr/bin/klash': No such file or directory