summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-10-02 07:48:56 +0000
committerMike Frysinger <vapier@gentoo.org>2012-10-02 07:48:56 +0000
commitabaf8451eb11d743ae831a9db038fb367ee461fb (patch)
tree01b6f52a3a0c97ae5733258df845505cac15ba39 /net-misc/mediatomb
parentDrop mediatomb mask as the bugs are fixed. (diff)
downloadgentoo-2-abaf8451eb11d743ae831a9db038fb367ee461fb.tar.gz
gentoo-2-abaf8451eb11d743ae831a9db038fb367ee461fb.tar.bz2
gentoo-2-abaf8451eb11d743ae831a9db038fb367ee461fb.zip
Support spidermonkey-1.8.7 #423991 by Ian Stakenvicius.
(Portage version: 2.2.0_alpha131/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/mediatomb')
-rw-r--r--net-misc/mediatomb/ChangeLog6
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.1-mozjs187.patch260
-rw-r--r--net-misc/mediatomb/mediatomb-0.12.1-r3.ebuild4
3 files changed, 267 insertions, 3 deletions
diff --git a/net-misc/mediatomb/ChangeLog b/net-misc/mediatomb/ChangeLog
index c5f3b0732d80..9b87a641b630 100644
--- a/net-misc/mediatomb/ChangeLog
+++ b/net-misc/mediatomb/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-misc/mediatomb
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/mediatomb/ChangeLog,v 1.36 2012/10/02 06:35:32 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/mediatomb/ChangeLog,v 1.37 2012/10/02 07:48:56 vapier Exp $
+
+ 02 Oct 2012; Mike Frysinger <vapier@gentoo.org>
+ +files/mediatomb-0.12.1-mozjs187.patch, mediatomb-0.12.1-r3.ebuild:
+ Support spidermonkey-1.8.7 #423991 by Ian Stakenvicius.
02 Oct 2012; Mike Frysinger <vapier@gentoo.org>
+files/mediatomb-0.12.1-libextractor.patch, mediatomb-0.12.1-r3.ebuild:
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1-mozjs187.patch b/net-misc/mediatomb/files/mediatomb-0.12.1-mozjs187.patch
new file mode 100644
index 000000000000..c4b080a3656b
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.1-mozjs187.patch
@@ -0,0 +1,260 @@
+maybe this is correct, maybe it's not. spidermonkey's documentation blows, so
+who is to say!
+
+https://bugs.gentoo.org/423991
+
+--- a/src/scripting/dvd_image_import_script.cc
++++ b/src/scripting/dvd_image_import_script.cc
+@@ -232,8 +232,6 @@ DVDImportScript::DVDImportScript(Ref<Runtime> runtime) : Script(runtime)
+
+ String scriptPath = ConfigManager::getInstance()->getOption(CFG_IMPORT_SCRIPTING_DVD_SCRIPT);
+ load(scriptPath);
+- root = JS_NewScriptObject(cx, script);
+- JS_AddNamedRoot(cx, &root, "DVDImportScript");
+ log_info("Loaded %s\n", scriptPath.c_str());
+
+ Ref<Dictionary> mappings =
+@@ -296,21 +294,4 @@ void DVDImportScript::processDVDObject(Ref<CdsObject> obj)
+ #endif
+ }
+
+-DVDImportScript::~DVDImportScript()
+-{
+-#ifdef JS_THREADSAFE
+- JS_SetContextThread(cx);
+- JS_BeginRequest(cx);
+-#endif
+-
+- if (root)
+- JS_RemoveRoot(cx, &root);
+-
+-#ifdef JS_THREADSAFE
+- JS_EndRequest(cx);
+- JS_ClearContextThread(cx);
+-#endif
+-
+-}
+-
+ #endif // HAVE_JS
+--- a/src/scripting/dvd_image_import_script.h
++++ b/src/scripting/dvd_image_import_script.h
+@@ -41,7 +41,6 @@ class DVDImportScript : public Script
+ {
+ public:
+ DVDImportScript(zmm::Ref<Runtime> runtime);
+- ~DVDImportScript();
+ /// \brief Adds a DVD object to the database
+ ///
+ /// \param title DVD title number
+--- a/src/scripting/import_script.cc
++++ b/src/scripting/import_script.cc
+@@ -53,8 +53,6 @@ ImportScript::ImportScript(Ref<Runtime> runtime) : Script(runtime)
+ try
+ {
+ load(scriptPath);
+- root = JS_NewObject(cx, NULL, script, NULL);
+- JS_AddNamedObjectRoot(cx, &root, "ImportScript");
+ }
+ catch (Exception ex)
+ {
+@@ -109,21 +107,4 @@ void ImportScript::processCdsObject(Ref<CdsObject> obj, String rootpath)
+ #endif
+ }
+
+-ImportScript::~ImportScript()
+-{
+-#ifdef JS_THREADSAFE
+- JS_SetContextThread(cx);
+- JS_BeginRequest(cx);
+-#endif
+-
+- if (root)
+- JS_RemoveObjectRoot(cx, &root);
+-
+-#ifdef JS_THREADSAFE
+- JS_EndRequest(cx);
+- JS_ClearContextThread(cx);
+-#endif
+-
+-}
+-
+ #endif // HAVE_JS
+--- a/src/scripting/import_script.h
++++ b/src/scripting/import_script.h
+@@ -41,11 +41,8 @@ class ImportScript : public Script
+ {
+ public:
+ ImportScript(zmm::Ref<Runtime> runtime);
+- ~ImportScript();
+ void processCdsObject(zmm::Ref<CdsObject> obj, zmm::String rootpath);
+ virtual script_class_t whoami() { return S_IMPORT; }
+-private:
+- JSObject *root;
+ };
+
+ #endif // __SCRIPTING_IMPORT_SCRIPT_H__
+--- a/src/scripting/playlist_parser_script.cc
++++ b/src/scripting/playlist_parser_script.cc
+@@ -93,8 +93,6 @@ PlaylistParserScript::PlaylistParserScript(Ref<Runtime> runtime) : Script(runtim
+
+ String scriptPath = ConfigManager::getInstance()->getOption(CFG_IMPORT_SCRIPTING_PLAYLIST_SCRIPT);
+ load(scriptPath);
+- root = JS_NewObject(cx, NULL, script, NULL);
+- JS_AddNamedObjectRoot(cx, &root, "PlaylistScript");
+ }
+ catch (Exception ex)
+ {
+@@ -236,21 +234,4 @@ void PlaylistParserScript::processPlaylistObject(zmm::Ref<CdsObject> obj, Ref<Ge
+
+ }
+
+-
+-PlaylistParserScript::~PlaylistParserScript()
+-{
+-#ifdef JS_THREADSAFE
+- JS_SetContextThread(cx);
+- JS_BeginRequest(cx);
+-#endif
+-
+- if (root)
+- JS_RemoveObjectRoot(cx, &root);
+-
+-#ifdef JS_THREADSAFE
+- JS_EndRequest(cx);
+- JS_ClearContextThread(cx);
+-#endif
+-
+-}
+ #endif // HAVE_JS
+--- a/src/scripting/playlist_parser_script.h
++++ b/src/scripting/playlist_parser_script.h
+@@ -42,7 +42,6 @@ class PlaylistParserScript : public Script
+ {
+ public:
+ PlaylistParserScript(zmm::Ref<Runtime> runtime);
+- ~PlaylistParserScript();
+ zmm::String readln();
+ void processPlaylistObject(zmm::Ref<CdsObject> obj, zmm::Ref<GenericTask> task);
+ virtual script_class_t whoami() { return S_PLAYLIST; }
+@@ -52,7 +51,6 @@ private:
+ int currentObjectID;
+ char *currentLine;
+ zmm::Ref<GenericTask> currentTask;
+- JSObject *root;
+ };
+
+ #endif // __SCRIPTING_PLAYLIST_PARSER_SCRIPT_H__
+--- a/src/scripting/script.cc
++++ b/src/scripting/script.cc
+@@ -427,15 +427,10 @@ static JSFunctionSpec js_global_functions[] = {
+ try
+ {
+ common_script = _load(common_scr_path);
+- common_root = JS_NewObject(cx, NULL, common_script, NULL);
+- JS_AddNamedObjectRoot(cx, &common_root, "common-script");
+ _execute(common_script);
+ }
+ catch (Exception e)
+ {
+- if (common_root)
+- JS_RemoveObjectRoot(cx, &common_root);
+-
+ log_js("Unable to load %s: %s\n", common_scr_path.c_str(),
+ e.getMessage().c_str());
+ }
+@@ -459,8 +454,6 @@ Script::~Script()
+ JS_SetContextThread(cx);
+ JS_BeginRequest(cx);
+ #endif
+- if (common_root)
+- JS_RemoveObjectRoot(cx, &common_root);
+
+ /*
+ * scripts are unrooted and will be cleaned up by GC
+@@ -532,12 +532,12 @@ void Script::defineFunctions(JSFunctionSpec *functions)
+ throw _Exception(_("Scripting: JS_DefineFunctions failed"));
+ }
+
+-JSObject *Script::_load(zmm::String scriptPath)
++JSScript *Script::_load(zmm::String scriptPath)
+ {
+ if (glob == NULL)
+ initGlobalObject();
+
+- JSObject *scr;
++ JSScript *scr;
+
+ String scriptText = read_text_file(scriptPath);
+
+@@ -568,7 +568,7 @@ void Script::load(zmm::String scriptPath)
+ }
+
+
+-void Script::_execute(JSObject *scr)
++void Script::_execute(JSScript *scr)
+ {
+ jsval ret_val;
+
+--- a/src/scripting/script.h
++++ b/src/scripting/script.h
+@@ -66,8 +66,8 @@ public:
+ JSRuntime *rt;
+ JSContext *cx;
+ JSObject *glob;
+- JSObject *script;
+- JSObject *common_script;
++ JSScript *script;
++ JSScript *common_script;
+
+ public:
+ Script(zmm::Ref<Runtime> runtime);
+@@ -112,11 +112,9 @@ protected:
+ zmm::Ref<CdsObject> processed;
+
+ private:
+- JSObject *common_root;
+-
+ void initGlobalObject();
+- JSObject *_load(zmm::String scriptPath);
+- void _execute(JSObject *scr);
++ JSScript *_load(zmm::String scriptPath);
++ void _execute(JSScript *scr);
+ zmm::Ref<StringConverter> _p2i;
+ zmm::Ref<StringConverter> _j2i;
+ zmm::Ref<StringConverter> _f2i;
+--- a/configure.ac
++++ b/configure.ac
+@@ -1036,13 +1036,13 @@
+ ],
+ [
+ unset ac_cv_lib_smjs_JS_NewObject
+- AC_CHECK_LIB(mozjs185, JS_NewObject,
++ AC_CHECK_LIB(mozjs187, JS_NewObject,
+ [
+- MOZLIB=mozjs185
+- JS_LIBS="-lmozjs185"
++ MOZLIB=mozjs187
++ JS_LIBS="-lmozjs187"
+ ],
+ [
+- unset ac_cv_lib_mozjs185_JS_NewObject
++ unset ac_cv_lib_mozjs187_JS_NewObject
+ AC_CHECK_LIB(mozjs, JS_NewObject,
+ [
+ MOZLIB=mozjs
+@@ -1064,11 +1064,11 @@
+ MOZLIB=smjs
+ ],
+ [
+- unset ac_cv_lib_mozjs185_JS_NewObject
+- AC_CHECK_LIB(mozjs185, JS_NewObject,
++ unset ac_cv_lib_mozjs187_JS_NewObject
++ AC_CHECK_LIB(mozjs187, JS_NewObject,
+ [
+- JS_LIBS="-L$SEARCH_DIR_LIBS -lmozjs185"
+- MOZLIB=mozjs185
++ JS_LIBS="-L$SEARCH_DIR_LIBS -lmozjs187"
++ MOZLIB=mozjs187
+ ],
+ [
+ LDFLAGS="-L$SEARCH_DIR_LIBS $LDFLAGS_SAVE -lmozjs"
diff --git a/net-misc/mediatomb/mediatomb-0.12.1-r3.ebuild b/net-misc/mediatomb/mediatomb-0.12.1-r3.ebuild
index fd58c6a81115..167bd3adea36 100644
--- a/net-misc/mediatomb/mediatomb-0.12.1-r3.ebuild
+++ b/net-misc/mediatomb/mediatomb-0.12.1-r3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/mediatomb/mediatomb-0.12.1-r3.ebuild,v 1.2 2012/10/02 06:35:32 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/mediatomb/mediatomb-0.12.1-r3.ebuild,v 1.3 2012/10/02 07:48:56 vapier Exp $
EAPI="4"
inherit autotools eutils linux-info user
@@ -60,7 +60,7 @@ src_prepare() {
epatch "${FILESDIR}"/${P}-libmp4v2.patch
epatch "${FILESDIR}"/${P}-system-uuid.patch #270830
if has_version ">=dev-lang/spidermonkey-1.8.7" ; then
- sed -i 's:mozjs185:mozjs187:g' configure.ac || die #423991
+ epatch "${FILESDIR}"/${P}-mozjs187.patch #435394
fi
epatch "${FILESDIR}"/${P}-libextractor.patch #435394
eautoreconf