Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 May 2008 20:43:08 +0400 (MSD)
From:      Dmitry Marakasov <amdmi3@amdmi3.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/123708: [MAINTAINER] graphics/gnash: update to 0.8.2
Message-ID:  <20080515164308.7D5CF1702D@hades.panopticon>
Resent-Message-ID: <200805151650.m4FGo3Ma090863@freefall.freebsd.org>

Next in thread | Raw E-Mail | Index | Archive | Help

>Number:         123708
>Category:       ports
>Synopsis:       [MAINTAINER] graphics/gnash: update to 0.8.2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 15 16:50:03 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Dmitry Marakasov
>Release:        FreeBSD 7.0-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD hades.panopticon 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #0: Fri Apr 25 11:18:45 MSD 2008 root@hades.panopticon:/usr/obj/usr/src/sys/HADES i386


>Description:
Sorry for a long delay, here is it finally: update Gnash to 0.8.2.

ports/123349 and ports/123379 may be closed.

Also please note that OpenGL support in this release is broken (Gnash nearly hangs the whole system with (seems like) tons of mallocs).

I'm also considering adding gnash-devel port based on latest CVS snapshot depending on whether it behaves better.

Additional thanks to Carlos Santos and Craig Rodrigues for their PRs from which I've used some bits.

Some notes on Carlos' changes:

> 2. Add the dependency on libltdl15.
Not needed, see USE_AUTOTOOLS

> 4. Add one configuration option, "NLS"
Will be added when it actually works

> 7. Add a trick to get the "render_handler_ogl.h"
Just added it as a patch. no need for cvs magic

> MAN1+=         cygnal.1
This man is installed regardless on whether cygnal is built
>How-To-Repeat:
>Fix:

--- gnash-0.8.2.patch begins here ---
diff -ruN gnash.orig/Makefile gnash/Makefile
--- gnash.orig/Makefile	2008-05-15 03:29:04.503631304 +0400
+++ gnash/Makefile	2008-05-15 20:32:06.254327269 +0400
@@ -2,12 +2,11 @@
 # Date created:				12 Jan 2006
 # Whom:					Dmitry Marakasov <amdmi3@amdmi3.ru>
 #
-# $FreeBSD: ports/graphics/gnash/Makefile,v 1.23 2008/04/19 17:50:10 miwi Exp $
+# $FreeBSD: ports/graphics/gnash/Makefile,v 1.21 2008/03/13 14:28:22 miwi Exp $
 #
 
 PORTNAME=	gnash
-PORTVERSION=	0.8.1
-PORTREVISION=	3
+PORTVERSION=	0.8.2
 CATEGORIES=	graphics
 MASTER_SITES=	${MASTER_SITE_GNU}
 MASTER_SITE_SUBDIR=	${PORTNAME}/${PORTVERSION}
@@ -26,10 +25,9 @@
 WANT_GNOME=	yes
 WANT_GSTREAMER=	yes
 USE_GNOME=	pkgconfig libxml2
+USE_XORG=	x11 xau xdmcp xext xi xinerama ice sm
 USE_AUTOTOOLS=	libltdl:15
 
-PLUGIN_DIR=	${PREFIX}/lib/browser_plugins
-
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
 		LDFLAGS="-L${LOCALBASE}/lib" \
@@ -37,23 +35,22 @@
 		PTHREAD_CFLAGS="${PTHREAD_CFLAGS} ${PTHREAD_LIBS}"
 CONFIGURE_ARGS=	--with-boost-incl="${LOCALBASE}/include" \
 		--with-boost-lib="${LOCALBASE}/lib" \
-		--with-plugindir="${PLUGIN_DIR}"
+		--with-npapi-plugindir="${PREFIX}/lib/browser_plugins" \
+		--with-kde-pluginprefix="${PREFIX}"
 
-USE_LDCONFIG=	${PREFIX}/lib/gnash
+USE_LDCONFIG=	${PREFIX}/lib/gnash ${PREFIX}/lib/kde3
 
-MAN1=		gnash.1
+MAN1=		cygnal.1 gnash.1 gprocessor.1 soldumper.1 dumpshm.1
 
 OPTIONS=	PLUGIN		"Enable browser plugin" on \
 		CYGNAL		"Enable Cygnal media server" off \
-		GTK		"GUI: GTK (required for FF plugin)" on \
+		GTK		"GUI: GTK (required for Mozilla/Firefox plugin)" on \
 		KDE		"GUI: KDE (required for Konqueror plugin)" off \
 		AGG		"Renderer: AGG" on \
-		OPENGL		"Renderer: OpenGL" off \
+		OPENGL		"Renderer: OpenGL (broken)" off \
 		CAIRO		"Renderer: Cairo (experimental)" off \
 		FFMPEG		"Media handler: ffmpeg (+SDL sound output)" on \
-		GSTREAMER	"Media handler: GStreamer" off \
-		MAD		"Media handler: MAD (+SDL sound output)" off  \
-		DEBUGLOG	"Leave logfile in current directory on every run" off
+		GSTREAMER	"Media handler: GStreamer" off
 
 .include <bsd.port.pre.mk>
 
@@ -111,12 +108,14 @@
 # 5.5/6.2 EOL. We could also include bsd.kde.mk here, but that's much more
 # likely to bring more trouble
 LIB_DEPENDS+=	kimproxy:${PORTSDIR}/x11/kdelibs3
-CONFIGURE_ARGS+=--with-qt-incl="${LOCALBASE}/include" \
-		--with-qt-lib="${LOCALBASE}/lib"
 .else
 PLIST_SUB+=	KDE="@comment "
 .endif
 
+.if ${GNASH_GUIS} == ""
+IGNORE=		needs at least one GUI enabled. Please rerun 'make config' and enable GTK, KDE or both GUIs
+.endif
+
 CONFIGURE_ARGS+=	--enable-gui=`${ECHO} ${GNASH_GUIS} | ${TR} ' ' ,`
 
 #
@@ -144,32 +143,43 @@
 #
 # Media handler options processing
 #
-.if defined(WITH_FFMPEG) && !defined(WITH_GSTREAMER) && !defined(WITH_MAD)
+.if defined(WITH_FFMPEG) && !defined(WITH_GSTREAMER)
 LIB_DEPENDS+=		avcodec.1:${PORTSDIR}/multimedia/ffmpeg
 CONFIGURE_ARGS+=	--enable-media=ffmpeg
 USE_SDL+=		sdl
-.elif !defined(WITH_FFMPEG) && defined(WITH_GSTREAMER) && !defined(WITH_MAD)
+.elif !defined(WITH_FFMPEG) && defined(WITH_GSTREAMER)
 USE_GSTREAMER=		yes
 CONFIGURE_ARGS+=	--enable-media=gst
-.elif !defined(WITH_FFMPEG) && !defined(WITH_GSTREAMER) && defined(WITH_MAD)
-LIB_DEPENDS+=		mad.2:${PORTSDIR}/audio/libmad
-CONFIGURE_ARGS+=	--enable-media=mad
-USE_SDL+=		sdl
-.elif !defined(WITH_FFMPEG) && !defined(WITH_GSTREAMER) && !defined(WITH_MAD)
+.elif !defined(WITH_FFMPEG) && !defined(WITH_GSTREAMER)
 CONFIGURE_ARGS+=	--enable-media=none
 .else
-IGNORE=			can't be built with multiple media handlers enabled. Please rerun 'make config' and leave one or none of them (ffmpeg|gstreamer|mad)
+IGNORE=			can't be built with multiple media handlers enabled. Please rerun 'make config' and leave one or none of them (ffmpeg|gstreamer)
+.endif
+
+pre-everything::
+.if defined(WITH_OPENGL)
+	@${ECHO_CMD} "OpenGL support is currently broken (Gnash hangs using 100% CPU). Use at your own risk"
+	@sleep 3
 .endif
 
 post-patch:
+	@${REINPLACE_CMD} -e 's|^GNASH_LIBS = |&$${INTLLIBS} |' \
+		${WRKSRC}/utilities/Makefile.in
 	@${REINPLACE_CMD} -e '/^PTHREAD_[A-Z]*=/ d' ${WRKSRC}/configure
-	@${REINPLACE_CMD} -e '/test/ s|==|=|; s|== x|= x|' ${WRKSRC}/configure
 	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g; \
 		s|/usr/X11R6|${LOCALBASE}|g' ${WRKSRC}/configure \
 		${WRKSRC}/macros/libslist ${WRKSRC}/macros/incllist
-.if !defined(WITH_DEBUGLOG)
-	@${REINPLACE_CMD} -e 's|gnash-dbg.log|/dev/null|' \
-		${WRKSRC}/libbase/rc.cpp ${WRKSRC}/libbase/log.h
+
+.if !defined(WITHOUT_PLUGIN)
+post-install:
+.if defined(WITH_GTK)
+	@cd ${INSTALL_WRKSRC}/plugin && \
+		${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS} install-plugin
+.endif
+.if defined(WITH_KDE)
+	@cd ${INSTALL_WRKSRC}/plugin/klash && \
+		${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS} install-plugin
+.endif
 .endif
 
 .include <bsd.port.post.mk>
diff -ruN gnash.orig/distinfo gnash/distinfo
--- gnash.orig/distinfo	2008-05-15 03:29:04.506733095 +0400
+++ gnash/distinfo	2008-05-15 03:27:13.243043436 +0400
@@ -1,3 +1,3 @@
-MD5 (gnash-0.8.1.tar.bz2) = 5f80a25cb7a37fb351d28fd2097d8f3e
-SHA256 (gnash-0.8.1.tar.bz2) = 30fb283e707bc209109ca313c83b069b1c482497b62f8c4cc37e9a23e0ba8993
-SIZE (gnash-0.8.1.tar.bz2) = 1983596
+MD5 (gnash-0.8.2.tar.bz2) = 05cac831181be3fb40cbf3c00ab25c0f
+SHA256 (gnash-0.8.2.tar.bz2) = 4c81e71e6619b79da9641a90ed2c73c362603103bcdcc7b9cc5cc53739d06baa
+SIZE (gnash-0.8.2.tar.bz2) = 2637636
diff -ruN gnash.orig/files/patch-backend-render_handler_ogl.h gnash/files/patch-backend-render_handler_ogl.h
--- gnash.orig/files/patch-backend-render_handler_ogl.h	1970-01-01 03:00:00.000000000 +0300
+++ gnash/files/patch-backend-render_handler_ogl.h	2008-05-15 06:19:57.307793285 +0400
@@ -0,0 +1,178 @@
+diff -ruN backend/render_handler_ogl.h.orig backend/render_handler_ogl.h
+--- backend/render_handler_ogl.h.orig	1970-01-01 03:00:00.000000000 +0300
++++ backend/render_handler_ogl.h	2008-05-15 06:18:41.725653935 +0400
+@@ -0,0 +1,174 @@
++// 
++//   Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
++// 
++// This program is free software; you can redistribute it and/or modify
++// it under the terms of the GNU General Public License as published by
++// the Free Software Foundation; either version 3 of the License, or
++// (at your option) any later version.
++// 
++// This program is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++// 
++// You should have received a copy of the GNU General Public License
++// along with this program; if not, write to the Free Software
++// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
++
++#ifndef __RENDER_HANDLER_OGL_H__
++#define __RENDER_HANDLER_OGL_H__
++
++
++#if defined(NOT_SGI_GL) || defined(__APPLE_CC__)
++#include <AGL/agl.h>
++#include <OpenGL/gl.h>
++#include <OpenGL/glu.h>
++#include <OpenGL/glext.h>
++#define GLUCALLBACKTYPE GLvoid (*)(...)
++#else
++# define GLUCALLBACKTYPE void (*)()
++# include <GL/gl.h>
++# ifdef WIN32
++#  define GL_CLAMP_TO_EDGE 0x812F
++# else
++# include <GL/glx.h>
++# ifdef OSMESA_TESTING
++#  include <GL/osmesa.h>
++# endif // OSMESA_TESTING
++# endif
++# include <GL/glu.h>
++# ifndef APIENTRY
++#  define APIENTRY
++# endif
++#endif
++
++
++
++
++namespace gnash {
++
++
++
++
++typedef std::vector<const path*> PathRefs;
++
++
++
++struct oglVertex {
++  oglVertex(double x, double y, double z = 0.0)
++    : _x(x), _y(y), _z(z)
++  {
++  }
++  
++  oglVertex(const point& p)
++    : _x(p.x), _y(p.y), _z(0.0)
++  {
++  }
++
++  GLdouble _x;
++  GLdouble _y;
++  GLdouble _z;
++};
++
++typedef std::map< const path*, std::vector<oglVertex> > PathPointMap;
++
++class Tesselator
++{
++public:
++  Tesselator();  
++  ~Tesselator();
++  
++  void beginPolygon();
++  
++  void feed(std::vector<oglVertex>& vertices);
++  
++  void tesselate();
++  
++  void beginContour();
++  void endContour();
++  
++  void rememberVertex(GLdouble* v);
++  
++  static void
++  error(GLenum error);
++
++  static void combine(GLdouble coords [3], void *vertex_data[4],
++                      GLfloat weight[4], void **outData, void* userdata);
++  
++
++  
++private:
++  std::vector<GLdouble*> _vertices;
++  GLUtesselator* _tessobj;
++};
++
++class WholeShape
++{
++public:
++  void newPath(const path& new_path)
++  {
++    PathRefs refs;
++    refs.push_back(&new_path);
++    
++    shape.push_back(refs);
++  }
++  
++  void addPath(const path& add_path)
++  {
++    PathRefs& refs = shape.back();
++    refs.push_back(&add_path);
++  }
++  
++  void addPathRefs(const PathRefs& pathrefs)
++  {
++  
++    PathRefs new_refs(pathrefs.begin(), pathrefs.end());
++    
++    shape.push_back(new_refs);
++  }
++  
++  
++  const std::vector<PathRefs>& get() const
++  {
++    return shape;
++  }
++  
++private:
++  std::vector<PathRefs> shape;
++
++};
++
++
++class bitmap_info_ogl : public bitmap_info
++{
++  public:
++    bitmap_info_ogl(image::image_base* image, GLenum pixelformat,
++                    bool ogl_accessible);
++    ~bitmap_info_ogl();
++
++    void apply(const gnash::matrix& bitmap_matrix,
++               render_handler::bitmap_wrap_mode wrap_mode);
++  private:
++    inline bool ogl_accessible() const;
++    void setup();    
++    void upload(boost::uint8_t* data, size_t width, size_t height);
++    
++    std::auto_ptr<image::image_base> _img;
++    GLenum _pixel_format;
++    GLenum _ogl_img_type;
++    bool _ogl_accessible;  
++    GLuint _texture_id;
++    size_t _orig_width;
++    size_t _orig_height;
++};
++
++
++
++
++
++
++} // namespace gnash
++
++
++#endif // __RENDER_HANDLER_OGL_H__
++
diff -ruN gnash.orig/files/patch-utilities-Makefile.in gnash/files/patch-utilities-Makefile.in
--- gnash.orig/files/patch-utilities-Makefile.in	2008-05-15 03:29:04.445383677 +0400
+++ gnash/files/patch-utilities-Makefile.in	1970-01-01 03:00:00.000000000 +0300
@@ -1,11 +0,0 @@
---- utilities/Makefile.in.orig	2007-08-29 15:03:59.000000000 +0000
-+++ utilities/Makefile.in	2007-11-07 20:37:02.000000000 +0000
-@@ -365,7 +365,7 @@
- 	$(top_builddir)/libbase/libgnashbase.la \
- 	$(top_builddir)/backend/libgnashbackend.la \
- 	$(top_builddir)/libamf/libgnashamf.la $(am__append_2) \
--	$(am__append_4) $(GLIB_LIBS) $(GSTREAMER_LIBS)
-+	$(am__append_4) $(GLIB_LIBS) $(GSTREAMER_LIBS) $(INTLLIBS)
- AM_LDFLAGS = \
- 	$(LIBADD_DL) \
- 	$(LIBLTDL) \
diff -ruN gnash.orig/pkg-plist gnash/pkg-plist
--- gnash.orig/pkg-plist	2008-05-15 03:29:04.469304874 +0400
+++ gnash/pkg-plist	2008-05-15 20:04:13.260790661 +0400
@@ -1,43 +1,49 @@
+bin/dumpshm
 bin/gnash
-bin/gparser
 bin/gprocessor
+bin/soldumper
 %%GTK%%bin/gtk-gnash
 %%KDE%%bin/kde-gnash
 %%CYGNAL%%bin/cygnal
 %%FFPLUGIN%%lib/browser_plugins/libgnashplugin.so
-%%KONQPLUGIN%%lib/kde3/libklashpart.so
+%%KONQPLUGIN%%share/apps/klash/pluginsinfo
+%%KONQPLUGIN%%share/apps/klash/klashpartui.rc
+%%KONQPLUGIN%%share/services/klash_part.desktop
 %%KONQPLUGIN%%lib/kde3/libklashpart.a
+%%KONQPLUGIN%%lib/kde3/libklashpart.so
 %%KONQPLUGIN%%lib/kde3/libklashpart.la
-lib/gnash/libgnashamf-0.8.1.so
+lib/gnash/libgnashamf-0.8.2.so
 lib/gnash/libgnashamf.a
 lib/gnash/libgnashamf.la
 lib/gnash/libgnashamf.so
-lib/gnash/libgnashbackend-0.8.1.so
-lib/gnash/libgnashbackend.a
-lib/gnash/libgnashbackend.la
-lib/gnash/libgnashbackend.so
-lib/gnash/libgnashbase-0.8.1.so
+lib/gnash/libgnashbase-0.8.2.so
 lib/gnash/libgnashbase.a
 lib/gnash/libgnashbase.la
 lib/gnash/libgnashbase.so
-lib/gnash/libgnashgeo-0.8.1.so
-lib/gnash/libgnashgeo.a
-lib/gnash/libgnashgeo.la
-lib/gnash/libgnashgeo.so
-lib/gnash/libgnashserver-0.8.1.so
+lib/gnash/libgnashmedia-0.8.2.so
+lib/gnash/libgnashmedia.a
+lib/gnash/libgnashmedia.la
+lib/gnash/libgnashmedia.so
+lib/gnash/libgnashserver-0.8.2.so
 lib/gnash/libgnashserver.a
 lib/gnash/libgnashserver.la
 lib/gnash/libgnashserver.so
+%%DOCSDIR%%/gnashuser.html
+%%DOCSDIR%%/images/car_crash.png
+%%DOCSDIR%%/images/rtmp.png
+%%DOCSDIR%%/gnashref.html
 %%DATADIR%%/GnashG.png
 %%DATADIR%%/gnash_128_96.ico
-%%KONQPLUGIN%%share/apps/klash/pluginsinfo
-%%KONQPLUGIN%%share/apps/klash/klashpartui.rc
-%%KONQPLUGIN%%share/services/klash_part.desktop
-share/locale/cs/gnash.mo
-share/locale/de/gnash.mo
-share/locale/es/gnash.mo
-share/locale/fr/gnash.mo
-share/locale/it/gnash.mo
+share/locale/cs/LC_MESSAGES/gnash.mo
+share/locale/de/LC_MESSAGES/gnash.mo
+share/locale/es/LC_MESSAGES/gnash.mo
+share/locale/fi/LC_MESSAGES/gnash.mo
+share/locale/fr/LC_MESSAGES/gnash.mo
+share/locale/it/LC_MESSAGES/gnash.mo
+share/locale/sv/LC_MESSAGES/gnash.mo
 @dirrm %%DATADIR%%
+@dirrm %%DOCSDIR%%/images
+@dirrm %%DOCSDIR%%
 @dirrm lib/gnash
-@dirrmtry lib/browser_plugins
+%%KONQPLUGIN%%@dirrm share/apps/klash
+%%FFPLUGIN%%@dirrmtry lib/browser_plugins
--- gnash-0.8.2.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20080515164308.7D5CF1702D>