www-plugins/gnash-0.8.7 version bump
authorChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
Mon, 15 Mar 2010 20:55:57 +0000 (20:55 +0000)
committerChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
Mon, 15 Mar 2010 20:55:57 +0000 (20:55 +0000)
Package-Manager: portage-2.2_rc65/cvs/Linux x86_64

www-plugins/gnash/ChangeLog
www-plugins/gnash/Manifest
www-plugins/gnash/files/gnash-0.8.7-klash.patch [new file with mode: 0644]
www-plugins/gnash/files/gnash-0.8.7-moc-qt4.patch [new file with mode: 0644]
www-plugins/gnash/files/gnash-0.8.7-xpcom-idldir.patch [new file with mode: 0644]
www-plugins/gnash/gnash-0.8.7.ebuild [new file with mode: 0644]

index d860875185bad34e9261dbb7843db1b721c3d85b..0fb8c87db88a97372bc30eca8d98e547a7097e6e 100644 (file)
@@ -1,6 +1,14 @@
 # ChangeLog for www-plugins/gnash
 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-plugins/gnash/ChangeLog,v 1.21 2010/03/15 15:46:33 chithanh Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-plugins/gnash/ChangeLog,v 1.22 2010/03/15 20:55:57 chithanh Exp $
+
+*gnash-0.8.7 (15 Mar 2010)
+
+  15 Mar 2010; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
+  +gnash-0.8.7.ebuild, +files/gnash-0.8.7-klash.patch,
+  +files/gnash-0.8.7-moc-qt4.patch, +files/gnash-0.8.7-xpcom-idldir.patch:
+  Version bump. Fixes bug #285157, bug #286444, bug #298848, bug #302793,
+  bug #304335 and bug #305311
 
   15 Mar 2010; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
   gnash-0.8.6.ebuild:
index be12f429f02be018f10dd4d7138dab515e20113c..7b18a10ff85a8eb596bf74935961f3be634a9f6e 100644 (file)
@@ -5,9 +5,14 @@ AUX gnash-0.8.5-xpcom-idldir.patch 740 RMD160 2e01374e5ae5a69218160fb3abbbceff67
 AUX gnash-0.8.5-xpidl-sdkdir.patch 1014 RMD160 21b49bccc13af7159d3b81a72b3c82f0daf98eb8 SHA1 c9092cde8baff0c184c961d3b2434740c1dc0a7d SHA256 d7682af2cc466e571fc9d59d0fbd305f087d8e4676f489977ca17c2ad306d6b3
 AUX gnash-0.8.6-libcore-as3-headers.patch 612 RMD160 31ae6528c526f575c2bee58f108a7bc168910aba SHA1 0ca78a130ee6c822e18ffe2b3acc89f28204f6b5 SHA256 83029564cbb2313e99ba7e2947b774c146d732caa2ceb5ce312248692a1505a5
 AUX gnash-0.8.6-libssh-0.4.patch 9679 RMD160 42430640559c0441d906fb731723ba9ac0acc1df SHA1 2a3755c2eac2a3e9ca42ecb14007c7be18ad72e8 SHA256 1f22f7373df925cc9b5c1c7cc1e40f5e8f2d46d3a6d12298a2b27cf89f75fef1
+AUX gnash-0.8.7-klash.patch 4224 RMD160 9d988887af247a1810f3afd22ac56ff20b510276 SHA1 5f4991870587351282fabbe853c89fdb03853c54 SHA256 2676ae1d6d3d41937a06ca59c6252b64ece1ec8f5232cf21dbfc0126396101c0
+AUX gnash-0.8.7-moc-qt4.patch 677 RMD160 b24a4421202a75d11ec6d868e3048a78b883abf8 SHA1 7b3af0e10afc9b1600d264b2435a0324effa88f1 SHA256 b510bfb59ad1cfc54e06227f922cafb44816abe0df55765a6884323892016240
+AUX gnash-0.8.7-xpcom-idldir.patch 731 RMD160 5c79c44dd90ce3555e7a32694c2adbf01d8e5493 SHA1 a6230e75ee301831fc24311d41a4691e509f2bc3 SHA256 1b9bcd8c731e8ae49e2f22fa8e1d5da05b50822d77c3758900bb251cfbd3d32c
 DIST gnash-0.8.5.tar.bz2 3335797 RMD160 8ef599237c3162f9f28459855e4729d400bd4304 SHA1 26304322728d10dda1a0da2951946d981a507ca6 SHA256 16f272214eed2ab50bcd9507d6299b82ed7d20e7e8eb253ab160e594eeb210b3
 DIST gnash-0.8.6.tar.bz2 3571055 RMD160 987342b6cc46e94d5684d917bebbe6f6da6033bf SHA1 11c115f45b3803b157f65f30f1f65d26fea34328 SHA256 05f4b75eb2a5bc543fcd743641825147ce5e1b0bf675896e01401556a85332ea
+DIST gnash-0.8.7.tar.bz2 3617298 RMD160 809e5dcf6f11567f7463d1e772053aa54f7170ed SHA1 bba6245ce251730fd58a59b37609ca4b8898ae01 SHA256 73b8a7c788511e453add26fd68cebd5818b39f9da21cc7c78e9cef8bc837e896
 EBUILD gnash-0.8.5.ebuild 6821 RMD160 1c98adc66e062632ce9ebd7786e5d5521619ba40 SHA1 205146eac55069bfda754e3b35c97a2cc85b3c22 SHA256 b416952e5ea784f649978f337e0b156fe4e05b356725be03640889ed6c231d44
 EBUILD gnash-0.8.6.ebuild 7706 RMD160 d6f012bca625b0ddf07a7825d46148fa918bf6e5 SHA1 d7925fa6186ef2c5e5cb6664fcfa9f727f17d1b2 SHA256 77951ff4e95c61b91a703cbed907751528dfa0ac1186b73677833eb01c828266
-MISC ChangeLog 16206 RMD160 643f32e47018f98d99c2757fde8c25e4e949c871 SHA1 1396568c644f5e0215f2294bf35ec46c7e960422 SHA256 ea9351ed40e7a183fbebfbcfc003cc2512fd52fc2a54ced49631bcd0c9cf558d
+EBUILD gnash-0.8.7.ebuild 7687 RMD160 e4c37c38f97eead19868138315f15b51755e799f SHA1 ad7155883fb3c33352fa33549b648b602cc65047 SHA256 76a6dcf2d536dad4738302af1d2a1539f6a351c30857903d6115e2ec71931451
+MISC ChangeLog 16538 RMD160 a8f60a2e1752e97e74867d59b4aeb2f0469a5565 SHA1 21a0aa935c421a6a9db7102f53b62e1cf50d034c SHA256 c204ce07ca4854c5b316413659ab062e55d90a7d47a84e6874ff49377f81277e
 MISC metadata.xml 629 RMD160 c09d2f9e4f61ffff0d0a86807f5ae79fc3986474 SHA1 3a7a29e2e3c9d91a0cd1fd61a35eb6e069f3a0e7 SHA256 145ff961a7e0d2e841559d29dd8ab3fc8e448acce4eacb4e8b960209d2a1f41f
diff --git a/www-plugins/gnash/files/gnash-0.8.7-klash.patch b/www-plugins/gnash/files/gnash-0.8.7-klash.patch
new file mode 100644 (file)
index 0000000..1d31fb8
--- /dev/null
@@ -0,0 +1,97 @@
+--- gnash-0.8.5/macros/kde4.m4.alt-kde4        2009-02-28 15:27:53 +0300
++++ gnash-0.8.5/macros/kde4.m4 2009-07-15 16:02:13 +0400
+@@ -24,7 +24,7 @@ AC_DEFUN([GNASH_PATH_KDE4],
+              with_kde4_incl=${withval})
+   dnl make sure the path is a useable one
+   if test x"${with_kde4_incl}" != x ; then
+-    if test ! -f ${with_kde4_incl}/kapp.h ; then
++    if test ! -f ${with_kde4_incl}/kapplication.h ; then
+       AC_MSG_ERROR([${with_kde4_incl} directory doesn't contain any KDE 4.x headers])
+     fi
+   fi
+@@ -38,7 +38,7 @@ AC_DEFUN([GNASH_PATH_KDE4],
+              with_kde4_lib=${withval})
+   dnl make sure the path is a useable one
+   if test x"${with_kde4_lib}" != x ; then 
+-    if test ! -f ${with_kde4_lib}/libkdeui.la; then
++    if test ! -f ${with_kde4_lib}/libkdeui.so; then
+       AC_MSG_ERROR([${with_kde4_lib} directory doesn't contain any KDE 4.x libraries!])
+     fi
+   fi
+@@ -136,7 +136,7 @@ AC_DEFUN([GNASH_PATH_KDE4],
+     dnl Look for the libraries
+     AC_CACHE_VAL(ac_cv_path_kde4_lib, [
+       if test x"${with_kde4_lib}" != x ; then
+-        if test -f ${with_kde4_lib}/libkdeui.la; then
++        if test -f ${with_kde4_lib}/libkdeui.so; then
+               ac_cv_path_kde4_lib="-L`(cd ${with_kde4_lib}; pwd)`"
+         else
+               AC_MSG_ERROR([${with_kde4_lib} directory doesn't contain KDE 4.x libraries.])
+@@ -146,7 +146,7 @@ AC_DEFUN([GNASH_PATH_KDE4],
+         AC_MSG_CHECKING([for kdeui library])
+         kde4_topdir=
+         for i in ${kde4_prefix}/lib64 ${kde4_prefix}/lib $libslist ; do
+-          if test -f $i/libkdeui.${shlibext} -o -f $i/libkdeui.la; then
++          if test -f $i/libkdeui.${shlibext} -o -f $i/libkdeui.so; then
+             kde4_topdir=$i
+             AC_MSG_RESULT(${kde4_topdir}/libkdeui)
+                 if test ! x"$i" = x"/usr/lib" -a ! x"$i" = x"/usr/lib64"; then
+@@ -169,19 +169,6 @@ AC_DEFUN([GNASH_PATH_KDE4],
+          AC_MSG_RESULT(no)
+         fi
+       fi
+-      dnl Look for the kdeprint library, which is required
+-      AC_MSG_CHECKING([for kdeprint library])
+-      if test x"${libkdeprint}" = x; then
+-        if test -f ${kde4_topdir}/libkdeprint.la -o -f ${kde4_topdir}/libkdeprint.${shlibext}; then
+-          ac_cv_path_kde4_lib="${ac_cv_path_kde4_lib} -lkdeprint"
+-          AC_MSG_RESULT(${kde4_topdir}/libkdeprint)
+-        else
+-          AC_MSG_RESULT(no)
+-        fi
+-      else
+-        AC_MSG_RESULT(${libkdeprint})
+-        ac_cv_path_kde4_lib="${ac_cv_path_kde4_lib} ${libkdeprint}"
+-      fi      
+     ])                  dnl end of cache ac_cv_path_kde4_lib
+   fi                    dnl end of build_kde4
+ 
+@@ -201,7 +201,7 @@
+     KDE4_PLUGINDIR="${KDE4_PREFIX}/lib/kde4"
+     KDE4_SERVICESDIR="${KDE4_PREFIX}/share/kde4/services"
+     KDE4_CONFIGDIR="${KDE4_PREFIX}/share/kde4/config"
+-    KDE4_APPSDATADIR="${KDE4_PREFIX}/share/kde4/apps/klash"
++    KDE4_APPSDATADIR="${KDE4_PREFIX}/share/apps/klash"
+   fi                            dnl end of build_kparts4
+ 
+   if test x"${ac_cv_path_kde4_incl}" != x ; then
+@@ -218,7 +205,7 @@ AC_DEFUN([GNASH_PATH_KDE4],
+   fi                            dnl end of build_kparts4
+ 
+   if test x"${ac_cv_path_kde4_incl}" != x ; then
+-    if test x"${ac_cv_path_kde3_incl}" != x"-I/usr/include"; then
++    if test x"${ac_cv_path_kde4_incl}" != x"-I/usr/include"; then
+       KDE4_CFLAGS="${ac_cv_path_kde4_incl}"
+     else
+       KDE4_CFLAGS=""
+--- gnash-0.8.5/plugin/klash4/Makefile.am.alt-kde4     2009-06-15 11:53:31 +0400
++++ gnash-0.8.5/plugin/klash4/Makefile.am      2009-07-15 16:02:58 +0400
+@@ -42,6 +39,7 @@ libklashpart_la_LDFLAGS = -avoid-version
+ else
+ libklashpart_la_LDFLAGS = -module -avoid-version -L$(plugindir) $(KDE4_LIBS) $(QT4_LIBS)
+ endif
++libklashpart_la_LIBADD = $(KDE4_LIBS) $(QT4_LIBS) $(X11_LIBS) -lkparts
+ 
+ dist_kde_services_DATA = klash_part.desktop
+ dist_kde_rc_DATA = klashpartui.rc
+--- gnash-0.8.5/plugin/klash4/pluginsinfo.alt-kde4     2008-12-28 13:13:38 +0300
++++ gnash-0.8.5/plugin/klash4/pluginsinfo      2009-07-15 16:02:13 +0400
+@@ -1,7 +1,7 @@
+ number=1
+ 
+ [0]
+-description=Shockwave Flash 7.0
++description=Shockwave Flash 10.1 r999
+ file=libklashpart.so
+ mime=application/x-shockwave-flash:swf:Shockwave Flash;application/futuresplash:spl:FutureSplash Player
+ name=Shockwave Flash
diff --git a/www-plugins/gnash/files/gnash-0.8.7-moc-qt4.patch b/www-plugins/gnash/files/gnash-0.8.7-moc-qt4.patch
new file mode 100644 (file)
index 0000000..219685e
--- /dev/null
@@ -0,0 +1,14 @@
+diff -ur a/macros/qt4.m4 b/macros/qt4.m4
+--- a/macros/qt4.m4    2010-02-11 00:20:17.000000000 +0100
++++ b/macros/qt4.m4    2010-03-15 18:26:34.000000000 +0100
+@@ -167,8 +167,8 @@
+       has_qt4="no"
+     fi
+ 
+-    AC_PATH_PROGS(MOC4, [moc-qt4 moc], ,[${QTDIR}/bin /usr/lib/qt4/bin /usr/share/qt4/bin/ ${pathlist}])
+-    AC_PATH_PROGS(UIC4, [uic-qt4 uic], ,[${QTDIR}/bin /usr/lib/qt4/bin /usr/share/qt4/bin/ ${pathlist}])
++    AC_PATH_PROGS(MOC4, [moc-qt4 moc], ,[/usr/bin ${QTDIR}/bin /usr/lib/qt4/bin /usr/share/qt4/bin/ ${pathlist}])
++    AC_PATH_PROGS(UIC4, [uic-qt4 uic], ,[/usr/bin ${QTDIR}/bin /usr/lib/qt4/bin /usr/share/qt4/bin/ ${pathlist}])
+ 
+ 
+     AC_SUBST([QT4_CFLAGS])
diff --git a/www-plugins/gnash/files/gnash-0.8.7-xpcom-idldir.patch b/www-plugins/gnash/files/gnash-0.8.7-xpcom-idldir.patch
new file mode 100644 (file)
index 0000000..02f9908
--- /dev/null
@@ -0,0 +1,18 @@
+Author: Chi-Thanh Christopher Nguyen <chithanh@cs.tu-berlin.de>
+Subject: Use pkg-config to determine XPCOM_IDL_DIR instead of non-portable construct.
+Bug: #284073
+
+---
+
+diff -ur a/macros/xpcom.m4 b/macros/xpcom.m4
+--- a/macros/xpcom.m4  2009-03-02 16:29:48.000000000 +0100
++++ b/macros/xpcom.m4  2009-09-08 22:02:21.548228034 +0200
+@@ -102,7 +102,7 @@
+ 
+   if test x"${ac_cv_path_xpcom_incl}" != x; then
+     XPCOM_CFLAGS="${ac_cv_path_xpcom_incl}"
+-    XPCOM_IDL_CFLAGS=`echo $XPCOM_CFLAGS | sed -e 's:include:share/idl:'`
++    XPCOM_IDL_CFLAGS="-I`$PKG_CONFIG --variable=idldir libxul`"
+     XPIDL=$(pkg-config libxul --variable=sdkdir)
+     XPIDL="${XPIDL}xpidl"
+     AC_DEFINE([HAVE_XPCOM], [1], [Use XPCOM in the NPAPI plugin])
diff --git a/www-plugins/gnash/gnash-0.8.7.ebuild b/www-plugins/gnash/gnash-0.8.7.ebuild
new file mode 100644 (file)
index 0000000..b4fdedd
--- /dev/null
@@ -0,0 +1,263 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-plugins/gnash/gnash-0.8.7.ebuild,v 1.1 2010/03/15 20:55:57 chithanh Exp $
+
+EAPI="2"
+CMAKE_REQUIRED="false"
+KDE_REQUIRED="optional"
+KDE_MINIMAL="4.2"
+AT_M4DIR="cygnal"
+
+inherit autotools eutils kde4-base multilib nsplugins
+
+DESCRIPTION="GNU Flash movie player that supports many SWF v7,8,9 features"
+HOMEPAGE="http://www.gnu.org/software/gnash/"
+SRC_URI="mirror://gnu/${PN}/${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86"
+IUSE="agg cairo cygnal dbus doc +ffmpeg gnome gstreamer gtk kde lirc mysql +nls nsplugin +opengl python +sdl ssh ssl test video_cards_intel"
+
+RDEPEND=">=dev-libs/boost-1.35.0
+       dev-libs/expat
+       dev-libs/libxml2
+       media-libs/jpeg
+       media-libs/libpng
+       net-misc/curl
+       x11-libs/libX11
+       x11-libs/libXi
+       x11-libs/libXmu
+       x11-libs/libXt
+       x11-libs/libXv
+       media-libs/giflib
+       x11-proto/xproto
+       agg? ( x11-libs/agg )
+       cairo? ( x11-libs/cairo )
+       doc? (
+       >=app-text/docbook2X-0.8.8
+       app-text/docbook-sgml-utils
+       )
+       ffmpeg? (
+       media-libs/libsdl[X]
+       >=media-video/ffmpeg-0.5
+       )
+       gstreamer? (
+       media-plugins/gst-plugins-ffmpeg
+       media-plugins/gst-plugins-mad
+       media-plugins/gst-plugins-meta
+       )
+       gtk? (
+       x11-libs/gtk+:2
+       net-libs/xulrunner:1.9
+       python? ( dev-python/pygtk:2 )
+       )
+       kde? ( >=kde-base/kdebase-startkde-${KDE_MINIMAL} )
+       opengl? (
+       virtual/opengl
+       gtk? ( x11-libs/gtkglext )
+       )
+       sdl? ( media-libs/libsdl[X] )
+       nsplugin? ( net-libs/xulrunner:1.9 )
+       media-libs/speex[ogg]
+       sys-libs/zlib
+       >=sys-devel/libtool-2.2
+       mysql? ( dev-db/mysql )
+       lirc? ( app-misc/lirc )
+       dbus? ( sys-apps/dbus )
+       ssh?  ( >=net-libs/libssh-0.4[server] )
+       ssl?  ( dev-libs/openssl )"
+DEPEND="${RDEPEND}
+       dev-util/pkgconfig
+       nls? ( sys-devel/gettext )
+       gnome? ( app-text/rarian )"
+
+pkg_setup() {
+       if ! ( use agg || use cairo || use opengl ); then
+               ewarn "You are trying to build Gnash without choosing a renderer [agg|cairo|opengl]."
+               has_version x11-libs/cairo && ewarn "cairo enabled as default" \
+                       || die "Please enable a renderer"
+       elif use agg && use cairo && use opengl; then
+               ewarn "You enabled 3 renderers, agg was chosen as default."
+       fi
+
+       if ! ( use kde || use gtk || use sdl ); then
+               ewarn "You are trying to build Gnash without choosing a gui frontend [gtk,kde,sdl]."
+               has_version media-libs/libsdl[X] && ewarn "sdl enabled as default" \
+                       || die "Please enable at least one of these USE flags."
+       fi
+
+       if use nsplugin && use !gtk; then
+               eerror "Building gnash with nsplugin requires the gtk gui."
+               die "Nsplugin requires the gtk gui."
+       fi
+
+       if use sdl; then
+               ewarn "Enable SDL as gui frontend and sound handler"
+       fi
+
+       if use lirc; then
+               ewarn "Enable LIRC daemon support and lirc extension"
+       fi
+
+       kde4-base_pkg_setup
+}
+
+src_prepare() {
+       local mozsdk_incdir=${S}/plugin/mozilla-sdk/include
+
+       # Defines $(XPIDL) correctly using sdkdir variable from libxul.pc
+       epatch "${FILESDIR}"/${PN}-0.8.5-xpidl-sdkdir.patch
+
+       # Use pkgconfig to determine XPCOM_IDL_DIR instead of non-portable construct.
+       # Fixes building against xulrunner-1.9.0, bug #284073.
+       if has_version ">=net-libs/xulrunner-1.9.2"; then
+               epatch "${FILESDIR}"/${PN}-0.8.7-xpcom-idldir.patch
+       else
+               epatch "${FILESDIR}"/${PN}-0.8.5-xpcom-idldir.patch
+       fi
+
+       # Resurect patch from bug #230287
+       epatch "${FILESDIR}"/${PN}-0.8.3-boost-dynamic-link.patch
+
+       # Adapted from Alt Linux to fix klash support properly
+       epatch "${FILESDIR}"/${PN}-0.8.7-klash.patch
+
+       # Make gnash find moc and uic properly, upstream bug #25758,
+       # gentoo bug #283905
+       epatch "${FILESDIR}"/${PN}-0.8.7-moc-qt4.patch
+
+       # Conflict headers with npapi.h from mozilla-sdk embedded stuffs and libxul-unstable header
+       # in case where xpcom (implicitly added with gtk) is enabled, we use the system header
+       if use gtk; then
+               rm -f ${mozsdk_incdir}/npapi.h
+               if has_version ">=net-libs/xulrunner-1.9.2"; then
+                       ln -s $(pkg-config libxul --variable=includedir)/npapi.h \
+                               ${mozsdk_incdir}/npapi.h || die "symlink failed"
+               else
+                       ln -s $(pkg-config libxul-unstable --variable=includedir)/unstable/npapi.h \
+                               ${mozsdk_incdir}/npapi.h || die "symlink failed"
+               fi
+       fi
+       eautoreconf
+}
+src_configure() {
+       local myconf myext gui
+
+       # Set nsplugin install directory.
+       use nsplugin && myconf="${myconf} --with-npapi-plugindir=/opt/netscape/plugins"
+       # Set rendering engine.
+       if use agg; then
+               myconf="${myconf} --enable-renderer=agg"
+       elif use cairo; then
+               myconf="${myconf} --enable-renderer=cairo"
+       else
+               myconf="${myconf} --enable-renderer=ogl"
+       fi
+       # Set kde and konqueror plugin directories.
+       if use kde; then
+               myconf="${myconf}
+                       --with-plugins-install=system
+                       --with-kde4-incl=${KDEDIR}/include
+                       --with-kde4-configdir=${KDEDIR}/share/config
+                       --with-kde4-prefix=${KDEDIR}
+                       --with-kde4-lib=${KDEDIR}/$(get_libdir)
+                       --with-kde-appsdatadir=${KDEDIR}/share/apps/klash
+                       --with-kde4-servicesdir=${KDEDIR}/share/kde4/services
+                       --with-kde4-plugindir=${KDEDIR}/$(get_libdir)/kde4/plugins"
+       fi
+
+       # Set media handler.
+       if use ffmpeg; then
+               myconf="${myconf} --enable-media=ffmpeg"
+       elif use gstreamer; then
+               myconf="${myconf} --enable-media=gst"
+       else
+               myconf="${myconf} --enable-media=none"
+       fi
+       # Set gui.
+       use gtk && gui=",gtk"
+       use kde && gui="${gui},kde4"
+
+       if use sdl; then
+               gui="${gui},sdl"
+               myconf="${myconf} --enable-sound=sdl"
+       fi
+
+       # Set extensions
+       use mysql && myext=",mysql"
+       use gtk && myext="${myext},gtk"
+       use lirc && myext="${myext},lirc"
+       use dbus && myext="${myext},dbus"
+
+       if [ -z "$gui" ]; then
+               gui="sdl"
+       fi
+
+       # Strip extra comma from gui and myext.
+       gui=$( echo $gui | sed -e 's/,//' )
+       myext=$( echo $myext | sed -e 's/,//' )
+
+       econf \
+               --docdir=/usr/share/doc/${PF} \
+               --disable-dependency-tracking \
+               --disable-kparts3 \
+               --enable-avm2 \
+               $(use_enable cygnal) \
+               $(use_enable cygnal cgibins) \
+               $(use_enable doc docbook) \
+               $(use_enable gnome ghelp) \
+               $(use_enable gtk npapi) \
+               $(use_enable kde kparts4) \
+               $(use_enable lirc) \
+               $(use_enable nls) \
+               $(use_enable nsplugin npapi) \
+               $(use_enable python) \
+               $(use_enable ssh) \
+               $(use_enable ssl) \
+               $(use_enable test testsuite) \
+               $(use_enable video_cards_intel i810-lod-bias) \
+               --enable-gui=${gui} \
+               --enable-extensions=${myext} \
+               ${myconf}
+}
+src_test() {
+       local log=testsuite-results.txt
+       cd testsuite
+       emake check || die "make check failed"
+       ./anaylse-results.sh > $log || die "results analyze failed"
+       cat $log
+}
+src_install() {
+       emake DESTDIR="${D}" install || die "emake install failed"
+
+       # Install nsplugin in directory set by --with-npapi-plugindir.
+       if use nsplugin; then
+               emake DESTDIR="${D}" install-plugin || die "install plugins failed"
+       fi
+
+       # Install kde konqueror plugin.
+       if use kde; then
+               pushd "${S}/plugin/klash4" >& /dev/null
+               emake DESTDIR="${D}" install-plugin || die "install kde plugins failed"
+               popd >& /dev/null
+       fi
+       # Create a symlink in /usr/$(get_libdir)/nsbrowser/plugins to the nsplugin install directory.
+       use nsplugin && inst_plugin /opt/netscape/plugins/libgnashplugin.so \
+               || rm -rf "${D}/opt"
+       dodoc AUTHORS ChangeLog NEWS README || die "dodoc failed"
+}
+pkg_postinst() {
+       if use !ffmpeg && use !gstreamer || use gstreamer && ( ! use gnome ); then
+               ewarn ""
+               ewarn "Gnash was built without a media handler and or http handler !"
+               ewarn ""
+               ewarn "If you want Gnash to support video then you will need to"
+               ewarn "rebuild Gnash with either the ffmpeg or gstreamer use flags set."
+               ewarn ""
+       fi
+       ewarn "${PN} is still in heavy development"
+       ewarn "Please first report bugs on upstream gnashdevs and deal with them"
+       ewarn "And then report a Gentoo bug to the maintainer"
+       use kde && kde4-base_pkg_postinst
+}