diff options
author | Patrick Lauer <patrick@gentoo.org> | 2010-02-08 23:50:54 +0000 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2010-02-08 23:50:54 +0000 |
commit | 208f10577edbce14fcd44b7d62b4f333da9d0722 (patch) | |
tree | 64db908883840a544431405d02df824a0b133908 /media-gfx/freewrl | |
parent | Version bump #304063 by Jeroen Roovers. (diff) | |
download | gentoo-2-208f10577edbce14fcd44b7d62b4f333da9d0722.tar.gz gentoo-2-208f10577edbce14fcd44b7d62b4f333da9d0722.tar.bz2 gentoo-2-208f10577edbce14fcd44b7d62b4f333da9d0722.zip |
Fix for xulrunner-1.9.2 by Ian Stakenvicius, fixes #303183
(Portage version: 2.2_rc62/cvs/Linux x86_64)
Diffstat (limited to 'media-gfx/freewrl')
-rw-r--r-- | media-gfx/freewrl/ChangeLog | 8 | ||||
-rw-r--r-- | media-gfx/freewrl/files/freewrl-1.22.6-xulrunner192-fixes.patch | 214 | ||||
-rw-r--r-- | media-gfx/freewrl/freewrl-1.22.6-r1.ebuild | 132 |
3 files changed, 353 insertions, 1 deletions
diff --git a/media-gfx/freewrl/ChangeLog b/media-gfx/freewrl/ChangeLog index 741c0a75ea0f..c764eaf42a20 100644 --- a/media-gfx/freewrl/ChangeLog +++ b/media-gfx/freewrl/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-gfx/freewrl # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/freewrl/ChangeLog,v 1.22 2010/02/01 20:14:09 maekke Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/freewrl/ChangeLog,v 1.23 2010/02/08 23:50:53 patrick Exp $ + +*freewrl-1.22.6-r1 (08 Feb 2010) + + 08 Feb 2010; Patrick Lauer <patrick@gentoo.org> +freewrl-1.22.6-r1.ebuild, + +files/freewrl-1.22.6-xulrunner192-fixes.patch: + Fix for xulrunner-1.9.2 by Ian Stakenvicius, fixes #303183 01 Feb 2010; Markus Meier <maekke@gentoo.org> freewrl-1.22.5.ebuild: x86 stable, bug #300602 diff --git a/media-gfx/freewrl/files/freewrl-1.22.6-xulrunner192-fixes.patch b/media-gfx/freewrl/files/freewrl-1.22.6-xulrunner192-fixes.patch new file mode 100644 index 000000000000..ccffad885e19 --- /dev/null +++ b/media-gfx/freewrl/files/freewrl-1.22.6-xulrunner192-fixes.patch @@ -0,0 +1,214 @@ +--- configure.ac 2009-10-28 20:01:05.000000000 -0400 ++++ configure.ac 2010-02-04 14:05:19.000000000 -0500 +@@ -126,7 +126,7 @@ + ZLIB_LIBS="-L$withval/lib $ZLIB_LIBS"]) + + # save global cflags/libs +- oCFLAGS=$CFLAGS;oLDFLAGS=$LDFLAGS ++ oCFLAGS=$CFLAGS;oLDFLAGS=$LDFLAGS;oCPPFLAGS=$CPPFLAGS + # set cflags/libs for this case + CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS" + LDFLAGS="$LDFLAGS $ZLIB_LIBS" +@@ -137,7 +137,7 @@ + [AC_MSG_ERROR([Can't find zlib library. Please install zlib.])]) + + # restore global cflags/libs +- CPPFLAGS=$oCPPFLAGS;LDFLAGS=$oLDFLAGS ++ CPPFLAGS=$oCPPFLAGS;LDFLAGS=$oLDFLAGS;CFLAGS=$oCFLAGS + + AC_SUBST(ZLIB_CFLAGS) + AC_SUBST(ZLIB_LIBS) +@@ -218,7 +218,7 @@ + EXPAT_LIBS="-L$withval/lib $EXPAT_LIBS"]) + + # save global cflags/libs +- oCFLAGS=$CFLAGS;oLDFLAGS=$LDFLAGS ++ oCFLAGS=$CFLAGS;oLDFLAGS=$LDFLAGS;oCPPFLAGS=$CPPFLAGS + # set cflags/libs for this case + CPPFLAGS="$CPPFLAGS $EXPAT_CFLAGS" + LDFLAGS="$LDFLAGS $EXPAT_LIBS" +@@ -229,8 +229,7 @@ + [AC_MSG_ERROR([Can't find expat library. Please install expat.])]) + + # restore global cflags/libs +- CPPFLAGS=$oCPPFLAGS +- LDFLAGS=$oLDFLAGS ++ CPPFLAGS=$oCPPFLAGS;LDFLAGS=$oLDFLAGS;CFLAGS=$oCFLAGS + + AC_SUBST(EXPAT_CFLAGS) + AC_SUBST(EXPAT_LIBS) +@@ -363,7 +362,7 @@ + *) # Search for GLEW + + # save global cflags/libs +- oCFLAGS=$CFLAGS;oLDFLAGS=$LDFLAGS ++ oCFLAGS=$CFLAGS;oLDFLAGS=$LDFLAGS;oCPPFLAGS=$CPPFLAGS + # set cflags/libs for this case + CPPFLAGS="$CPPFLAGS $GLEW_CFLAGS $GL_CFLAGS" + LDFLAGS="$LDFLAGS $GLEW_LIBS $GL_LIBS" +@@ -378,7 +377,7 @@ + esac + + # restore global cflags/libs +- CPPFLAGS=$oCPPFLAGS;LDFLAGS=$oLDFLAGS ++ CPPFLAGS=$oCPPFLAGS;LDFLAGS=$oLDFLAGS;CFLAGS=$oCFLAGS + + AC_SUBST(GLEW_CFLAGS) + AC_SUBST(GLEW_LIBS) +@@ -393,7 +392,7 @@ + JPEG_LIBS="-L$withval/lib -ljpeg"]) + + # save global cflags/libs +- oCFLAGS=$CFLAGS;oLDFLAGS=$LDFLAGS ++ oCFLAGS=$CFLAGS;oLDFLAGS=$LDFLAGS;oCPPFLAGS=$CPPFLAGS + # set cflags/libs for this case + CPPFLAGS="$CPPFLAGS $JPEG_CFLAGS" + LDFLAGS="$LDFLAGS $JPEG_LIBS" +@@ -421,7 +420,7 @@ + ) + + # restore global cflags/libs +- CPPFLAGS=$oCPPFLAGS;LDFLAGS=$oLDFLAGS ++ CPPFLAGS=$oCPPFLAGS;LDFLAGS=$oLDFLAGS;CFLAGS=$oCFLAGS + + AC_SUBST(JPEG_CFLAGS) + AC_SUBST(JPEG_LIBS) +@@ -523,6 +522,17 @@ + AC_SUBST(PLUGIN_CFLAGS) + AC_SUBST(PLUGIN_LIBS) + ++# ++# Check if 'int32' type is defined (would be included in plugin's includes) ++ ++ # save global cflags/libs ++ oCPPFLAGS=$CPPFLAGS;oLDFLAGS=$LDFLAGS;oCFLAGS=$CFLAGS ++ CFLAGS="$CFLAGS $PLUGIN_CFLAGS" ++AC_CHECK_TYPES([int32, uint32, int16, uint16], [], [], [[#include <npapi.h>]]) ++ # restore global cflags/libs ++ CPPFLAGS=$oCPPFLAGS;LDFLAGS=$oLDFLAGS;CFLAGS=$oCFLAGS ++ ++ + # ====================================== + # FreeWRL helpers programs + # ====================================== +--- src/plugin/system.h 2009-10-12 08:58:19.000000000 -0400 ++++ src/plugin/system.h 2010-02-04 14:19:35.000000000 -0500 +@@ -108,5 +108,17 @@ + # include <sys/socket.h> + #endif + ++#ifndef HAVE_INT32 ++# define int32 int32_t ++#endif ++#ifndef HAVE_UINT32 ++# define uint32 uint32_t ++#endif ++#ifndef HAVE_INT16 ++# define int16 int16_t ++#endif ++#ifndef HAVE_UINT16 ++# define uint16 uint16_t ++#endif + + #endif /* __FREEWRL_PLUGIN_SYSTEM_H__ */ +--- src/plugin/npunix.c 2009-10-05 11:07:24.000000000 -0400 ++++ src/plugin/npunix.c 2010-02-04 15:52:52.000000000 -0500 +@@ -65,6 +65,9 @@ + # define PLUGINDEBUGSTR(msg) + #endif + ++/* fix for int32,uint32,int16,uint16 undefined errors with newer xulrunners */ ++#include <config.h> ++#include <system.h> + + /*********************************************************************** + * +@@ -256,7 +259,7 @@ + #endif + } + +- + #ifdef MY_JAVA ++/* + JRIEnv* NPN_GetJavaEnv() + { +@@ -266,6 +269,7 @@ + return (*gNetscapeFuncs.getJavaEnv); + # endif + } ++*/ + + jref NPN_GetJavaPeer(NPP instance) + { +@@ -377,10 +381,10 @@ + NPP_URLNotify(instance, url, reason, notifyData); + } + ++/*JAS + JRIGlobalRef + Private_GetJavaClass(void) + { +-/*JAS + #ifdef MY_JAVA + jref clazz = NPP_GetJavaClass(); + #else +@@ -390,9 +394,9 @@ + JRIEnv* env = NPN_GetJavaEnv(); + return JRI_NewGlobalRef(env, clazz); + } +-*/ + return NULL; + } ++*/ + + /*********************************************************************** + * +@@ -533,7 +537,8 @@ + pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(Private_URLNotify); + #endif + pluginFuncs->event = NULL; +- pluginFuncs->javaClass = Private_GetJavaClass(); ++/* pluginFuncs->javaClass = Private_GetJavaClass(); */ ++ pluginFuncs->javaClass = NULL; + + err = NPP_Initialize(); + } +--- src/lib/world_script/jsVRMLBrowser.c 2010-02-03 17:28:38.000000000 -0500 ++++ src/lib/world_script/jsVRMLBrowser.c 2010-02-03 17:28:02.000000000 -0500 +@@ -107,7 +107,7 @@ + + /* for setting field values to the output of a CreateVrml style of call */ + /* it is kept at zero, unless it has been used. Then it is reset to zero */ +-jsval JSCreate_global_return_val = INT_TO_JSVAL(0); ++jsval JSCreate_global_return_val; + + /* we add/remove routes with this call */ + void jsRegisterRoute( +@@ -211,6 +211,8 @@ + { + JSObject *obj; + ++JSCreate_global_return_val = INT_TO_JSVAL(0); ++ + #ifdef JSVERBOSE + printf("VrmlBrowserInit\n"); + #endif +--- src/lib/Makefile.am 2009-10-28 20:16:50.000000000 -0400 ++++ src/lib/Makefile.am 2010-02-04 11:06:58.000000000 -0500 +@@ -17,14 +17,14 @@ + $(ZLIB_CFLAGS) \ + $(PTHREAD_CFLAGS) \ + $(FREETYPE_CFLAGS) \ +- $(JAVASCRIPT_ENGINE_CFLAGS) \ + $(EXPAT_CFLAGS) \ + $(XML_CFLAGS) \ + $(GL_CFLAGS) \ + $(JPEG_CFLAGS) \ + $(PNG_CFLAGS) \ + $(LIBCURL_CFLAGS) \ +- $(IMLIB2_CFLAGS) ++ $(IMLIB2_CFLAGS) \ ++ $(JAVASCRIPT_ENGINE_CFLAGS) + + EXTERNAL_LIBS = \ + $(ZLIB_LIBS) \ diff --git a/media-gfx/freewrl/freewrl-1.22.6-r1.ebuild b/media-gfx/freewrl/freewrl-1.22.6-r1.ebuild new file mode 100644 index 000000000000..f15369ec1a6c --- /dev/null +++ b/media-gfx/freewrl/freewrl-1.22.6-r1.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/freewrl/freewrl-1.22.6-r1.ebuild,v 1.1 2010/02/08 23:50:53 patrick Exp $ + +EAPI="2" + +inherit nsplugins eutils flag-o-matic autotools + +DESCRIPTION="VRML2 and X3D compliant browser" +SRC_URI="mirror://sourceforge/freewrl/${P}.tar.bz2" +HOMEPAGE="http://freewrl.sourceforge.net/" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="curl debug libeai +motif nsplugin +sox spidermonkey static +xulrunner" + +COMMONDEPEND="x11-libs/libXau + x11-libs/libXdmcp + x11-libs/libXext + x11-libs/libX11 + motif? ( x11-libs/openmotif ) + media-libs/mesa + media-libs/glew + virtual/opengl + media-libs/libpng + media-libs/jpeg + media-libs/imlib2 + >=media-libs/freetype-2 + curl? ( net-misc/curl ) + xulrunner? ( net-libs/xulrunner ) + !xulrunner? ( + spidermonkey? ( dev-lang/spidermonkey ) + !spidermonkey? ( || ( + =www-client/mozilla-firefox-3*[-xulrunner] + =www-client/mozilla-firefox-2* + ) ) + ) + nsplugin? ( || ( xulrunner? ( net-libs/xulrunner ) + >=www-client/mozilla-firefox-2.0 ) )" +DEPEND="${COMMONDEPEND} + >=dev-util/pkgconfig-0.22" +RDEPEND="${COMMONDEPEND} + media-fonts/ttf-bitstream-vera + media-gfx/imagemagick + app-arch/unzip + sox? ( media-sound/sox )" + +pkg_setup() { + if use xulrunner && use spidermonkey; then + eerror "Please choose only one of xulrunner or spidermonkey." + die "Cannot USE both spidermonkey and xulrunner" + fi +} + +src_prepare() { + # A hack to get around expat being grabbed from xulrunner + if use xulrunner && has_version ">=net-libs/xulrunner-1.9.2"; then + mkdir "${S}/src/lib/include"; + cp /usr/include/expat.h "${S}/src/lib/include/"; + cp /usr/include/expat_external.h "${S}/src/lib/include/"; + epatch "${FILESDIR}/${P}-xulrunner192-fixes.patch"; + eautoreconf + fi +} + +src_configure() { + local myconf="--with-fontsdir=/usr/share/fonts/ttf-bitstream-vera + --with-imageconvert=/usr/bin/convert + --with-unzip=/usr/bin/unzip" + if use motif; then + myconf="${myconf} --with-x --with-target=motif" + else + myconf="${myconf} --with-x --with-target=x11" + fi + if use nsplugin; then + myconf="${myconf} --with-plugindir=/usr/$(get_libdir)/${PLUGINS_DIR}" + fi + if use sox; then + myconf="${myconf} --with-soundconv=/usr/bin/sox" + fi + if use xulrunner; then + if has_version net-libs/xulrunner:1.9 ; then + if has_version ">=net-libs/xulrunner-1.9.2"; then + # more hack to get around expat being grabbed from xulrunner + myconf="${myconf} --with-expat=${S}/src/lib" + else + # fix missing library path to xulrunner-1.9 libraries + append-ldflags "-R/usr/$(get_libdir)/xulrunner-1.9/lib" + fi + fi + elif use spidermonkey; then + # disable the checks for other js libs, in case they are installed + myconf="${myconf} --disable-mozilla-js --disable-xulrunner-js --disable-firefox-js --disable-seamonkey-js" + # spidermonkey has no pkg-config, so override ./configure + JAVASCRIPT_ENGINE_CFLAGS="-I/usr/include/js -DXP_UNIX" + JAVASCRIPT_ENGINE_LIBS="-ljs" + if has_version dev-lang/spidermonkey[threadsafe] ; then + JAVASCRIPT_ENGINE_CFLAGS="${JAVASCRIPT_ENGINE_CFLAGS} -DJS_THREADSAFE $(pkg-config --cflags nspr)" + JAVASCRIPT_ENGINE_LIBS="$(pkg-config --libs nspr) ${JAVASCRIPT_ENGINE_LIBS}" + fi + export JAVASCRIPT_ENGINE_CFLAGS + export JAVASCRIPT_ENGINE_LIBS + else + # disable checks for xulrunner libs, in case they are installed + myconf="${myconf} --disable-mozilla-js --disable-xulrunner-js" + # not using xulrunner, so ./configure grabs js directly from firefox/mozilla/thunderbird/wherever + if has_version =www-client/mozilla-firefox-3* ; then + # override ./configure for firefox-3 as pkg-config doesn't detect the right settings + export MOZILLA_PLUGIN_CFLAGS="-I/usr/include/mozilla-firefox/stable $(pkg-config --cflags nspr)" + export MOZILLA_PLUGIN_LIBS=" " + export JAVASCRIPT_ENGINE_CFLAGS="-DXP_UNIX -DJS_THREADSAFE -DMOZILLA_JS_UNSTABLE_INCLUDES ${MOZILLA_PLUGIN_CFLAGS}" + export JAVASCRIPT_ENGINE_LIBS="$(pkg-config --libs nspr) -L/usr/$(get_libdir)/mozilla-firefox -lmozjs" + append-ldflags "-R/usr/$(get_libdir)/mozilla-firefox" + fi + fi + econf ${myconf} \ + $(use_enable curl libcurl) \ + $(use_enable debug) \ + $(use_enable libeai) \ + $(use_enable nsplugin plugin) \ + $(use_enable static) \ + $(use_enable sox sound) +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + # remove unneeded .la files (as per Flameeyes' rant) + cd "${D}" + rm "usr/$(get_libdir)"/*.la "usr/$(get_libdir)/${PLUGINS_DIR}"/*.la +} |