add/delete
This commit is contained in:
109
net-misc/mediatomb/ChangeLog
Normal file
109
net-misc/mediatomb/ChangeLog
Normal file
@@ -0,0 +1,109 @@
|
||||
# ChangeLog for net-misc/mediatomb
|
||||
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/mediatomb/ChangeLog,v 1.23 2011/11/17 03:40:31 axs Exp $
|
||||
|
||||
17 Nov 2011; Ian Stakenvicius <axs@gentoo.org> mediatomb-0.12.1.ebuild,
|
||||
+files/mediatomb-0.12.1-mozjs185.patch:
|
||||
in-place update to support dev-lang/spidermonkey-1.8.5 for bug 376993
|
||||
|
||||
04 Apr 2011; Tomáš Chvátal <scarabeus@gentoo.org> mediatomb-0.12.1.ebuild:
|
||||
Move to virtual/ffmpeg from media-video/ffmpeg.
|
||||
|
||||
26 Feb 2011; Kacper Kowalik <xarthisius@gentoo.org>
|
||||
mediatomb-0.12.1.ebuild:
|
||||
Marked ~ppc wrt #342065. Thanks to f.mensik <f.mensik@tiscali.cz> for
|
||||
report and testing.
|
||||
|
||||
21 Feb 2011; Jeremy Olexa <darkside@gentoo.org> mediatomb-0.12.1.ebuild,
|
||||
+files/mediatomb-0.12.1-gcc46.patch:
|
||||
Add patch for gcc-4.6, bug 353733 by Ryan Hill
|
||||
|
||||
08 Oct 2010; Jeremy Olexa <darkside@gentoo.org>
|
||||
-files/mediatomb-0.11.0+curl-7.18.patch,
|
||||
-files/mediatomb-0.11.0+glibc-2.10.patch,
|
||||
-files/mediatomb-0.11.0-newffmpeg.patch, -files/mediatomb-0.11.0.config:
|
||||
unused
|
||||
|
||||
19 Aug 2010; Jeremy Olexa <darkside@gentoo.org> -mediatomb-0.11.0.ebuild,
|
||||
-mediatomb-0.12.0-r1.ebuild, files/mediatomb-0.12.0.confd,
|
||||
-files/mediatomb.confd, -files/mediatomb.initd:
|
||||
Add helper comment to confd file for bug 274627, comment #4 by Andrew
|
||||
Frink. Old cruft cleanup
|
||||
|
||||
18 Apr 2010; Markus Meier <maekke@gentoo.org> mediatomb-0.12.1.ebuild:
|
||||
amd64 stable, bug #284886
|
||||
|
||||
16 Apr 2010; Christian Faulhammer <fauli@gentoo.org>
|
||||
mediatomb-0.12.1.ebuild:
|
||||
stable x86, security bug 284886
|
||||
|
||||
15 Apr 2010; Jeremy Olexa <darkside@gentoo.org> metadata.xml:
|
||||
Change maintainer to myself
|
||||
|
||||
*mediatomb-0.12.1 (08 Apr 2010)
|
||||
|
||||
08 Apr 2010; Jeremy Olexa <darkside@gentoo.org> +mediatomb-0.12.1.ebuild:
|
||||
Version bump to fix YouTube issues and other small bug fixes. Re-introduce
|
||||
USE=libextractor for bug 312855
|
||||
|
||||
04 Apr 2010; Jeremy Olexa <darkside@gentoo.org>
|
||||
mediatomb-0.12.0-r1.ebuild:
|
||||
Add ~arm, tested on armv7 platform
|
||||
|
||||
*mediatomb-0.12.0-r1 (30 Mar 2010)
|
||||
|
||||
30 Mar 2010; Jeremy Olexa <darkside@gentoo.org> -mediatomb-0.12.0.ebuild,
|
||||
+mediatomb-0.12.0-r1.ebuild, +files/mediatomb-0.12.0.confd,
|
||||
+files/mediatomb-0.12.0.initd:
|
||||
minor revbump to grab new init/conf files from bug 264235 that I forgot
|
||||
|
||||
29 Mar 2010; Jeremy Olexa <darkside@gentoo.org> +mediatomb-0.12.0.ebuild,
|
||||
+files/mediatomb-0.12.0.config, metadata.xml:
|
||||
The long awaited mediatomb version bump. Closes bugs: 274627, 284886,
|
||||
281432 - including security bug. Many thanks to BT for the help and
|
||||
motivation
|
||||
|
||||
*mediatomb-0.12.0 (29 Mar 2010)
|
||||
|
||||
29 Mar 2010; Jeremy Olexa <darkside@gentoo.org> +mediatomb-0.12.0.ebuild,
|
||||
+files/mediatomb-0.12.0.config:
|
||||
The long awaited mediatomb version bump from upstream, closes bug 264235.
|
||||
Many thanks to BT for the help
|
||||
|
||||
29 Dec 2009; Raúl Porcel <armin76@gentoo.org> mediatomb-0.11.0.ebuild:
|
||||
Add ~arm
|
||||
|
||||
22 Dec 2009; Samuli Suominen <ssuominen@gentoo.org>
|
||||
mediatomb-0.11.0.ebuild:
|
||||
Remove USE expat wrt #297864.
|
||||
|
||||
22 May 2009; Diego E. Pettenò <flameeyes@gentoo.org>
|
||||
mediatomb-0.11.0.ebuild, +files/mediatomb-0.11.0+glibc-2.10.patch:
|
||||
Add patch to build with glibc-2.10, closes bug #270715.
|
||||
|
||||
25 Oct 2008; Pieter Van den Abeele <pvdabeel@gentoo.org> mediatomb-0.11.0.ebuild:
|
||||
keyworded ~ppc. Closes bug #219420
|
||||
|
||||
08 Jun 2008; Kenneth Prugh <ken69267@gentoo.org> mediatomb-0.11.0.ebuild:
|
||||
amd64 stable, bug #224287
|
||||
|
||||
05 Jun 2008; Christian Faulhammer <opfer@gentoo.org>
|
||||
mediatomb-0.11.0.ebuild:
|
||||
stable x86, bug 224287
|
||||
|
||||
26 Apr 2008; Markus Meier <maekke@gentoo.org> mediatomb-0.11.0.ebuild:
|
||||
add ~x86, bug #217747
|
||||
|
||||
21 Apr 2008; Diego Pettenò <flameeyes@gentoo.org>
|
||||
+files/mediatomb-0.11.0+curl-7.18.patch, mediatomb-0.11.0.ebuild:
|
||||
Add patch to fix building with curl 7.18, thanks to Łukasz Dudek.
|
||||
|
||||
*mediatomb-0.11.0 (27 Mar 2008)
|
||||
|
||||
27 Mar 2008; Diego Pettenò <flameeyes@gentoo.org>
|
||||
+files/mediatomb-0.11.0-newffmpeg.patch, +files/mediatomb-0.11.0.config,
|
||||
+files/mediatomb.confd, +files/mediatomb.initd, +metadata.xml,
|
||||
+mediatomb-0.11.0.ebuild:
|
||||
Initial import of mediatomb, an UPnP media server compatible with Sony
|
||||
PlayStation 3. Thanks to BT in bug #172799 for the ebuild.
|
||||
|
||||
10
net-misc/mediatomb/Manifest
Normal file
10
net-misc/mediatomb/Manifest
Normal file
@@ -0,0 +1,10 @@
|
||||
AUX 030-libav-0.7-support.patch 1982 RMD160 9161aa49a2a32f22035358838c10b22b9cd70c56 SHA1 3a23415e482e33b6a31cc90fd90c65663b40b7a2 SHA256 7ead2970330c8ab3056ecf9abda09cb4e13cf7a72f51c2145c49af4b08128a18
|
||||
AUX mediatomb-0.12.0.confd 805 RMD160 80b99ac5eb0a3cfdbe658084b6ba8a48c2b97dea SHA1 c3908aa800c4d6f3078760b5c32fbdf745f28239 SHA256 21b1b9d31a6db76c5c1ccfbf00e5cd553eecfeb0e2bb161ccc024eab2243293c
|
||||
AUX mediatomb-0.12.0.config 6180 RMD160 ee51ad90cd9c4107376b80af19dfe076f06df8e7 SHA1 41376b8a161d8523846c5adb5375af5bc0c1a0d1 SHA256 cb43e92639e5e53908567c050c9a2fc0e5c349fd11a149414590c2c6a402b4d2
|
||||
AUX mediatomb-0.12.0.initd 541 RMD160 cb4ccfebbe98d38a9e4fdedc6f0fa9aa7ab18453 SHA1 e3c8ed51e118cc72a164b908fe4d629a1ebbf14b SHA256 8dfe99d619a3384b2fb9105051daae1fc6c88402364d4203b21344f766a6b696
|
||||
AUX mediatomb-0.12.1-gcc46.patch 297 RMD160 b0de22743402e27bffd8a868026f0003f9960b24 SHA1 db58b48202b3e2d2dee42b13f761994ed4e67796 SHA256 58379e733518bc5ef61fee9156d430ef283278eb3a69f6bdad4cad794df75146
|
||||
AUX mediatomb-0.12.1-mozjs185.patch 22839 RMD160 6e47aff3a3d97d7d8a5359161b549699368a6bb8 SHA1 95d47ffd95b217100387844cbbbd854d0587f8dd SHA256 3960961f1fbe46baff3956ea2fa94b4dc193c0d278b8646cda1f4cee26812f59
|
||||
DIST mediatomb-0.12.1.tar.gz 1240612 RMD160 ecb61ca2483f76421beef1036ac442b8f805fa96 SHA1 86e880584cc9c8aaf3926d56048510d1d06e76b4 SHA256 31163c34a7b9d1c9735181737cb31306f29f1f2a0335fb4f53ecccf8f62f11cd
|
||||
EBUILD mediatomb-0.12.1.ebuild 3796 RMD160 f8cb5715acfad6aae388effcb8e885cf17d8d563 SHA1 2da765acd9a59dcff3011810f40156ea4d821dc5 SHA256 01be7e8c89a7e6761464a9f7da45f52b6d2e5f8c7ba2d9546b621e8d3984bd8c
|
||||
MISC ChangeLog 4241 RMD160 2137dfe3d81fe8edcb81d2d53df4523670fc41fa SHA1 5eac9e9b36ea9d8d06521a7e6efe64032b42c35d SHA256 26e541b45192b2c47cbb338f5e025596d5cdc2ba9d7115220d98df0e44fe48a0
|
||||
MISC metadata.xml 917 RMD160 2c817f4ed63ff24ff4262df5897733098ab753f9 SHA1 1eb716452e1ead4a6fb2cf4931f76d2dc9df6cd9 SHA256 a8f81f44d0efc27bd22ebefe96864f84c94c1cadb1908ff1ed52fd3d91b99e23
|
||||
63
net-misc/mediatomb/files/030-libav-0.7-support.patch
Normal file
63
net-misc/mediatomb/files/030-libav-0.7-support.patch
Normal file
@@ -0,0 +1,63 @@
|
||||
=== modified file 'src/metadata/ffmpeg_handler.cc'
|
||||
--- old/src/metadata/ffmpeg_handler.cc 2010-08-25 17:07:03 +0000
|
||||
+++ new/src/metadata/ffmpeg_handler.cc 2011-05-19 04:33:32 +0000
|
||||
@@ -89,6 +89,33 @@
|
||||
|
||||
Ref<StringConverter> sc = StringConverter::m2i();
|
||||
|
||||
+ /* Tabs are 4 characters here */
|
||||
+ typedef struct {const char *avname; metadata_fields_t field;} mapping_t;
|
||||
+ static const mapping_t mapping[] =
|
||||
+ {
|
||||
+ {"title", M_TITLE},
|
||||
+ {"artist", M_ARTIST},
|
||||
+ {"album", M_ALBUM},
|
||||
+ {"date", M_DATE},
|
||||
+ {"genre", M_GENRE},
|
||||
+ {"comment", M_DESCRIPTION},
|
||||
+ {"track", M_TRACKNUMBER},
|
||||
+ {NULL, M_MAX},
|
||||
+ };
|
||||
+
|
||||
+ if (!pFormatCtx->metadata)
|
||||
+ return;
|
||||
+ for (const mapping_t *m = mapping; m->avname != NULL; m++)
|
||||
+ {
|
||||
+ AVMetadataTag *tag = NULL;
|
||||
+ tag = av_metadata_get(pFormatCtx->metadata, m->avname, NULL, 0);
|
||||
+ if (tag && tag->value && tag->value[0])
|
||||
+ {
|
||||
+ log_debug("Added metadata %s: %s\n", m->avname, tag->value);
|
||||
+ item->setMetadata(MT_KEYS[m->field].upnp, sc->convert(tag->value));
|
||||
+ }
|
||||
+ }
|
||||
+ /* Old algorithm (doesn't work with libav >= 0.7)
|
||||
if (strlen(pFormatCtx->title) > 0)
|
||||
{
|
||||
log_debug("Added metadata title: %s\n", pFormatCtx->title);
|
||||
@@ -131,6 +158,7 @@
|
||||
item->setMetadata(MT_KEYS[M_TRACKNUMBER].upnp,
|
||||
sc->convert(String::from(pFormatCtx->track)));
|
||||
}
|
||||
+ */
|
||||
}
|
||||
|
||||
// ffmpeg library calls
|
||||
@@ -178,7 +206,7 @@
|
||||
for(i=0; i<pFormatCtx->nb_streams; i++)
|
||||
{
|
||||
AVStream *st = pFormatCtx->streams[i];
|
||||
- if((st != NULL) && (videoset == false) && (st->codec->codec_type == CODEC_TYPE_VIDEO))
|
||||
+ if((st != NULL) && (videoset == false) && (st->codec->codec_type == AVMEDIA_TYPE_VIDEO))
|
||||
{
|
||||
if (st->codec->codec_tag > 0)
|
||||
{
|
||||
@@ -209,7 +237,7 @@
|
||||
*y = st->codec->height;
|
||||
}
|
||||
}
|
||||
- if(st->codec->codec_type == CODEC_TYPE_AUDIO)
|
||||
+ if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
|
||||
{
|
||||
// Increase number of audiochannels
|
||||
audioch++;
|
||||
28
net-misc/mediatomb/files/mediatomb-0.12.0.confd
Normal file
28
net-misc/mediatomb/files/mediatomb-0.12.0.confd
Normal file
@@ -0,0 +1,28 @@
|
||||
# /etc/conf.d/mediatomb: config file for /etc/init.d/mediatomb
|
||||
|
||||
# See the mediatomb(1) manpage for more info.
|
||||
|
||||
# MediaTomb Web UI port.
|
||||
# NOTE: The minimum value allowed is 49152
|
||||
MEDIATOMB_PORT=49152
|
||||
|
||||
# Run MediaTomb as this user.
|
||||
# NOTE: For security reasons do not run MediaTomb as root.
|
||||
MEDIATOMB_USER="mediatomb"
|
||||
|
||||
# Run MediaTomb as this group.
|
||||
# NOTE: For security reasons do not run MediaTomb as root.
|
||||
MEDIATOMB_GROUP="mediatomb"
|
||||
|
||||
# Path to MediaTomb config file.
|
||||
MEDIATOMB_CONFIG="/etc/mediatomb/config.xml"
|
||||
|
||||
# Path to MediaTomb log file.
|
||||
MEDIATOMB_LOGFILE="/var/log/mediatomb.log"
|
||||
|
||||
# Path to MediaTomb pid file.
|
||||
MEDIATOMB_PIDFILE="/var/run/mediatomb.pid"
|
||||
|
||||
# Other options you want to pass to MediaTomb.
|
||||
# Add "--interface ${MEDIATOMB_INTERFACE}" to bind to a named interface.
|
||||
MEDIATOMB_OPTIONS=""
|
||||
144
net-misc/mediatomb/files/mediatomb-0.12.0.config
Normal file
144
net-misc/mediatomb/files/mediatomb-0.12.0.config
Normal file
@@ -0,0 +1,144 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<config version="2" xmlns="http://mediatomb.cc/config/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mediatomb.cc/config/2 http://mediatomb.cc/config/2.xsd">
|
||||
<server>
|
||||
<ui enabled="yes" show-tooltips="yes">
|
||||
<accounts enabled="no" session-timeout="30">
|
||||
<account user="mediatomb" password="mediatomb"/>
|
||||
</accounts>
|
||||
</ui>
|
||||
<name>MediaTomb</name>
|
||||
<udn></udn>
|
||||
<home>/var/lib/mediatomb</home>
|
||||
<webroot>/usr/share/mediatomb/web</webroot>
|
||||
<storage>
|
||||
<sqlite3 enabled="yes">
|
||||
<database-file>mediatomb.db</database-file>
|
||||
</sqlite3>
|
||||
<mysql enabled="no">
|
||||
<host>host</host>
|
||||
<database>database</database>
|
||||
<username>username</username>
|
||||
<password>password</password>
|
||||
</mysql>
|
||||
</storage>
|
||||
<protocolInfo extend="yes"/>
|
||||
<pc-directory upnp-hide="no"/>
|
||||
<extended-runtime-options>
|
||||
<ffmpegthumbnailer enabled="no">
|
||||
<thumbnail-size>160</thumbnail-size>
|
||||
<seek-percentage>10</seek-percentage>
|
||||
<filmstrip-overlay>no</filmstrip-overlay>
|
||||
<workaround-bugs>no</workaround-bugs>
|
||||
<image-quality>8</image-quality>
|
||||
</ffmpegthumbnailer>
|
||||
<mark-played-items enabled="no" suppress-cds-updates="yes">
|
||||
<string mode="prepend">*</string>
|
||||
<mark>
|
||||
<content>video</content>
|
||||
</mark>
|
||||
</mark-played-items>
|
||||
<lastfm enabled="no">
|
||||
<username>username</username>
|
||||
<password>password</password>
|
||||
</lastfm>
|
||||
</extended-runtime-options>
|
||||
</server>
|
||||
<import hidden-files="no">
|
||||
<scripting script-charset="UTF-8">
|
||||
<common-script>/usr/share/mediatomb/js/common.js</common-script>
|
||||
<playlist-script>/usr/share/mediatomb/js/playlists.js</playlist-script>
|
||||
<virtual-layout type="builtin">
|
||||
<import-script>/usr/share/mediatomb/js/import.js</import-script>
|
||||
</virtual-layout>
|
||||
</scripting>
|
||||
<mappings>
|
||||
<extension-mimetype ignore-unknown="no">
|
||||
<map from="mp3" to="audio/mpeg"/>
|
||||
<map from="ogx" to="application/ogg"/>
|
||||
<map from="ogv" to="video/ogg"/>
|
||||
<map from="oga" to="audio/ogg"/>
|
||||
<map from="ogg" to="audio/ogg"/>
|
||||
<map from="ogm" to="video/ogg"/>
|
||||
<map from="asf" to="video/x-ms-asf"/>
|
||||
<map from="asx" to="video/x-ms-asf"/>
|
||||
<map from="wma" to="audio/x-ms-wma"/>
|
||||
<map from="wax" to="audio/x-ms-wax"/>
|
||||
<map from="wmv" to="video/x-ms-wmv"/>
|
||||
<map from="wvx" to="video/x-ms-wvx"/>
|
||||
<map from="wm" to="video/x-ms-wm"/>
|
||||
<map from="wmx" to="video/x-ms-wmx"/>
|
||||
<map from="m3u" to="audio/x-mpegurl"/>
|
||||
<map from="pls" to="audio/x-scpls"/>
|
||||
<map from="flv" to="video/x-flv"/>
|
||||
<map from="mkv" to="video/x-matroska"/>
|
||||
<map from="mka" to="audio/x-matroska"/>
|
||||
<map from="avi" to="video/divx"/>
|
||||
<map from="m2ts" to="video/avc"/>
|
||||
<map from="cr2" to="image/raw"/>
|
||||
<map from="nef" to="image/raw"/>
|
||||
</extension-mimetype>
|
||||
<mimetype-upnpclass>
|
||||
<map from="audio/*" to="object.item.audioItem.musicTrack"/>
|
||||
<map from="video/*" to="object.item.videoItem"/>
|
||||
<map from="image/*" to="object.item.imageItem"/>
|
||||
</mimetype-upnpclass>
|
||||
<mimetype-contenttype>
|
||||
<treat mimetype="audio/mpeg" as="mp3"/>
|
||||
<treat mimetype="application/ogg" as="ogg"/>
|
||||
<treat mimetype="video/ogg" as="ogg"/>
|
||||
<treat mimetype="audio/ogg" as="ogg"/>
|
||||
<treat mimetype="audio/x-flac" as="flac"/>
|
||||
<treat mimetype="image/jpeg" as="jpg"/>
|
||||
<treat mimetype="audio/x-mpegurl" as="playlist"/>
|
||||
<treat mimetype="audio/x-scpls" as="playlist"/>
|
||||
<treat mimetype="audio/x-wav" as="pcm"/>
|
||||
<treat mimetype="audio/L16" as="pcm"/>
|
||||
<treat mimetype="video/x-msvideo" as="avi"/>
|
||||
<treat mimetype="video/mp4" as="mp4"/>
|
||||
<treat mimetype="audio/mp4" as="mp4"/>
|
||||
<treat mimetype="video/divx" as="avi"/>
|
||||
</mimetype-contenttype>
|
||||
</mappings>
|
||||
<online-content>
|
||||
<YouTube enabled="no" refresh="28800" update-at-start="yes" purge-after="604800" racy-content="exclude" format="mp4" hd="no">
|
||||
<favorites user="NationalGeographic"/>
|
||||
<playlists user="PlayStation"/>
|
||||
<uploads user="Google"/>
|
||||
<standardfeed feed="most_viewed" time-range="today"/>
|
||||
<standardfeed feed="recently_featured" time-range="today"/>
|
||||
</YouTube>
|
||||
</online-content>
|
||||
</import>
|
||||
<transcoding enabled="no">
|
||||
<mimetype-profile-mappings>
|
||||
<transcode mimetype="audio/ogg" using="audio2pcm"/>
|
||||
<transcode mimetype="audio/x-flac" using="audio2pcm"/>
|
||||
<transcode mimetype="video/ogg" using="video2mpeg"/>
|
||||
<transcode mimetype="video/x-flv" using="video2mpeg"/>
|
||||
</mimetype-profile-mappings>
|
||||
<profiles>
|
||||
<profile name="audio2pcm" enabled="yes" type="external">
|
||||
<mimetype>audio/L16</mimetype>
|
||||
<accept-url>no</accept-url>
|
||||
<first-resource>yes</first-resource>
|
||||
<hide-original-resource>yes</hide-original-resource>
|
||||
<accept-ogg-theora>no</accept-ogg-theora>
|
||||
<sample-frequency>44100</sample-frequency>
|
||||
<audio-channels>2</audio-channels>
|
||||
<agent command="ffmpeg" arguments="-i %in -acodec pcm_s16be -ab 192k -ar 44100 -ac 2 -f s16be -y %out"/>
|
||||
<buffer size="1048576" chunk-size="131072" fill-size="262144"/>
|
||||
</profile>
|
||||
<profile name="video2mpeg" enabled="yes" type="external">
|
||||
<mimetype>video/mpeg</mimetype>
|
||||
<accept-url>no</accept-url>
|
||||
<first-resource>yes</first-resource>
|
||||
<hide-original-resource>yes</hide-original-resource>
|
||||
<accept-ogg-theora>yes</accept-ogg-theora>
|
||||
<sample-frequency>48000</sample-frequency>
|
||||
<audio-channels>2</audio-channels>
|
||||
<agent command="ffmpeg" arguments="-i %in -vcodec mpeg2video -b 4096k -r 25 -acodec mp2 -ab 192k -ar 48000 -ac 2 -async 1 -f dvd -threads 2 -y %out"/>
|
||||
<buffer size="10485760" chunk-size="262144" fill-size="524288"/>
|
||||
</profile>
|
||||
</profiles>
|
||||
</transcoding>
|
||||
</config>
|
||||
22
net-misc/mediatomb/files/mediatomb-0.12.0.initd
Normal file
22
net-misc/mediatomb/files/mediatomb-0.12.0.initd
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/sbin/runscript
|
||||
|
||||
depend() {
|
||||
need net #MYSQL#
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting MediaTomb"
|
||||
start-stop-daemon --start --quiet --exec /usr/bin/mediatomb \
|
||||
--pidfile ${MEDIATOMB_PIDFILE} -- --daemon \
|
||||
--pidfile ${MEDIATOMB_PIDFILE} --user ${MEDIATOMB_USER} \
|
||||
--group ${MEDIATOMB_GROUP} --logfile ${MEDIATOMB_LOGFILE} \
|
||||
--config ${MEDIATOMB_CONFIG} --port ${MEDIATOMB_PORT} \
|
||||
${MEDIATOMB_OPTIONS}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop () {
|
||||
ebegin "Stopping MediaTomb"
|
||||
start-stop-daemon --stop --retry 10 --quiet --pidfile ${MEDIATOMB_PIDFILE}
|
||||
eend $?
|
||||
}
|
||||
13
net-misc/mediatomb/files/mediatomb-0.12.1-gcc46.patch
Normal file
13
net-misc/mediatomb/files/mediatomb-0.12.1-gcc46.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
https://sourceforge.net/tracker/?func=detail&aid=3173314&group_id=129766&atid=715782
|
||||
https://bugs.gentoo.org/353733
|
||||
|
||||
--- a/src/zmm/object.h
|
||||
+++ b/src/zmm/object.h
|
||||
@@ -33,6 +33,7 @@
|
||||
#define __ZMM_OBJECT_H__
|
||||
|
||||
#include <new> // for size_t
|
||||
+#include <cstddef>
|
||||
#include "atomic.h"
|
||||
|
||||
namespace zmm
|
||||
605
net-misc/mediatomb/files/mediatomb-0.12.1-mozjs185.patch
Normal file
605
net-misc/mediatomb/files/mediatomb-0.12.1-mozjs185.patch
Normal file
@@ -0,0 +1,605 @@
|
||||
--- mediatomb-0.12.1/configure.ac 2010-04-07 18:38:51.000000000 -0400
|
||||
+++ mediatomb-0.12.1/configure.ac 2011-11-16 21:56:46.000000000 -0500
|
||||
@@ -1006,14 +1006,23 @@
|
||||
MOZLIB=smjs
|
||||
],
|
||||
[
|
||||
- LDFLAGS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -lmozjs $ADD_PTHREAD_CFLAGS"
|
||||
- AC_CHECK_LIB(mozjs, JS_NewObject,
|
||||
+ LDFLAGS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -lmozjs185 $ADD_PTHREAD_CFLAGS"
|
||||
+ AC_CHECK_LIB(mozjs185, JS_NewObject,
|
||||
[
|
||||
- JS_LIBS="-L$JS_SEARCH_LIBS -lmozjs"
|
||||
- MOZLIB=mozjs
|
||||
+ JS_LIBS="-L$JS_SEARCH_LIBS -lmozjs185"
|
||||
+ MOZLIB=mozjs185
|
||||
],
|
||||
[
|
||||
- AC_MSG_ERROR([Spidermonkey not found in requested location $JS_SEARCH_LIBS])
|
||||
+ LDFLAGS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -lmozjs $ADD_PTHREAD_CFLAGS"
|
||||
+ AC_CHECK_LIB(mozjs, JS_NewObject,
|
||||
+ [
|
||||
+ JS_LIBS="-L$JS_SEARCH_LIBS -lmozjs"
|
||||
+ MOZLIB=mozjs
|
||||
+ ],
|
||||
+ [
|
||||
+ AC_MSG_ERROR([Spidermonkey not found in requested location $JS_SEARCH_LIBS])
|
||||
+ ]
|
||||
+ )
|
||||
]
|
||||
)
|
||||
]
|
||||
@@ -1036,39 +1045,58 @@
|
||||
],
|
||||
[
|
||||
unset ac_cv_lib_smjs_JS_NewObject
|
||||
- AC_CHECK_LIB(mozjs, JS_NewObject,
|
||||
+ AC_CHECK_LIB(mozjs185, JS_NewObject,
|
||||
[
|
||||
- MOZLIB=mozjs
|
||||
- JS_LIBS="-lmozjs"
|
||||
+ MOZLIB=mozjs185
|
||||
+ JS_LIBS="-lmozjs185"
|
||||
],
|
||||
[
|
||||
- LDFLAGS="-L$SEARCH_DIR_LIBS $LDFLAGS_SAVE $ADD_PTHREAD_CFLAGS"
|
||||
- unset ac_cv_lib_js_JS_NewObject
|
||||
- AC_CHECK_LIB(js, JS_NewObject,
|
||||
- [
|
||||
- JS_LIBS="-L$SEARCH_DIR_LIBS -ljs"
|
||||
- MOZLIB=js
|
||||
- ],
|
||||
- [
|
||||
- unset ac_cv_lib_smjs_JS_NewObject
|
||||
- AC_CHECK_LIB(smjs, JS_NewObject,
|
||||
- [
|
||||
- JS_LIBS="-L$SEARCH_DIR_LIBS -lsmjs"
|
||||
- MOZLIB=smjs
|
||||
- ],
|
||||
- [
|
||||
- LDFLAGS="-L$SEARCH_DIR_LIBS $LDFLAGS_SAVE -lmozjs"
|
||||
- unset ac_cv_lib_mozjs_JS_NewObject
|
||||
- AC_CHECK_LIB(mozjs, JS_NewObject,
|
||||
- [
|
||||
- JS_LIBS="-L$SEARCH_DIR_LIBS -lmozjs"
|
||||
- MOZLIB=mozjs
|
||||
- ],
|
||||
- [
|
||||
- JS_OK=missing
|
||||
- AC_MSG_RESULT(libjs/libsmjs link failed, giving up)
|
||||
- ]
|
||||
- )
|
||||
+ unset ac_cv_lib_smjs_JS_NewObject
|
||||
+ AC_CHECK_LIB(mozjs, JS_NewObject,
|
||||
+ [
|
||||
+ MOZLIB=mozjs
|
||||
+ JS_LIBS="-lmozjs"
|
||||
+ ],
|
||||
+ [
|
||||
+ LDFLAGS="-L$SEARCH_DIR_LIBS $LDFLAGS_SAVE $ADD_PTHREAD_CFLAGS"
|
||||
+ unset ac_cv_lib_js_JS_NewObject
|
||||
+ AC_CHECK_LIB(js, JS_NewObject,
|
||||
+ [
|
||||
+ JS_LIBS="-L$SEARCH_DIR_LIBS -ljs"
|
||||
+ MOZLIB=js
|
||||
+ ],
|
||||
+ [
|
||||
+ unset ac_cv_lib_smjs_JS_NewObject
|
||||
+ AC_CHECK_LIB(smjs, JS_NewObject,
|
||||
+ [
|
||||
+ JS_LIBS="-L$SEARCH_DIR_LIBS -lsmjs"
|
||||
+ MOZLIB=smjs
|
||||
+ ],
|
||||
+ [
|
||||
+ LDFLAGS="-L$SEARCH_DIR_LIBS $LDFLAGS_SAVE -lmozjs185"
|
||||
+ unset ac_cv_lib_mozjs_JS_NewObject
|
||||
+ AC_CHECK_LIB(mozjs185, JS_NewObject,
|
||||
+ [
|
||||
+ JS_LIBS="-L$SEARCH_DIR_LIBS -lmozjs185"
|
||||
+ MOZLIB=mozjs185
|
||||
+ ],
|
||||
+ [
|
||||
+ LDFLAGS="-L$SEARCH_DIR_LIBS $LDFLAGS_SAVE -lmozjs"
|
||||
+ unset ac_cv_lib_mozjs_JS_NewObject
|
||||
+ AC_CHECK_LIB(mozjs, JS_NewObject,
|
||||
+ [
|
||||
+ JS_LIBS="-L$SEARCH_DIR_LIBS -lmozjs"
|
||||
+ MOZLIB=mozjs
|
||||
+ ],
|
||||
+ [
|
||||
+ JS_OK=missing
|
||||
+ AC_MSG_RESULT(libjs/libsmjs link failed, giving up)
|
||||
+ ]
|
||||
+ )
|
||||
+ ]
|
||||
+ )
|
||||
+ ]
|
||||
+ )
|
||||
]
|
||||
)
|
||||
]
|
||||
diff -ur mediatomb-0.12.1.orig/build/Makefile.in mediatomb-0.12.1/build/Makefile.in
|
||||
--- mediatomb-0.12.1.orig/build/Makefile.in 2010-04-07 18:40:15.000000000 -0400
|
||||
+++ mediatomb-0.12.1/build/Makefile.in 2011-11-16 22:28:06.000000000 -0500
|
||||
@@ -257,7 +257,7 @@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
-CXXFLAGS = @CXXFLAGS@
|
||||
+CXXFLAGS = -fpermissive @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DB_AUTOCREATE_OPTION_ENABLED = @DB_AUTOCREATE_OPTION_ENABLED@
|
||||
DB_AUTOCREATE_OPTION_REQUESTED = @DB_AUTOCREATE_OPTION_REQUESTED@
|
||||
diff -ur mediatomb-0.12.1.orig/src/scripting/import_script.cc mediatomb-0.12.1/src/scripting/import_script.cc
|
||||
--- mediatomb-0.12.1.orig/src/scripting/import_script.cc 2010-03-25 10:58:05.000000000 -0400
|
||||
+++ mediatomb-0.12.1/src/scripting/import_script.cc 2011-11-16 22:28:06.000000000 -0500
|
||||
@@ -53,8 +53,8 @@
|
||||
try
|
||||
{
|
||||
load(scriptPath);
|
||||
- root = JS_NewScriptObject(cx, script);
|
||||
- JS_AddNamedRoot(cx, &root, "ImportScript");
|
||||
+ root = JS_NewObject(cx, NULL, script, NULL);
|
||||
+ JS_AddNamedObjectRoot(cx, &root, "ImportScript");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -117,7 +117,7 @@
|
||||
#endif
|
||||
|
||||
if (root)
|
||||
- JS_RemoveRoot(cx, &root);
|
||||
+ JS_RemoveObjectRoot(cx, &root);
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
JS_EndRequest(cx);
|
||||
diff -ur mediatomb-0.12.1.orig/src/scripting/js_functions.cc mediatomb-0.12.1/src/scripting/js_functions.cc
|
||||
--- mediatomb-0.12.1.orig/src/scripting/js_functions.cc 2010-03-25 10:58:05.000000000 -0400
|
||||
+++ mediatomb-0.12.1/src/scripting/js_functions.cc 2011-11-16 22:28:21.000000000 -0500
|
||||
@@ -49,30 +49,45 @@
|
||||
extern "C" {
|
||||
|
||||
JSBool
|
||||
-js_print(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||
+js_print(JSContext *cx, uintN argc, jsval *argv)
|
||||
{
|
||||
- uintN i;
|
||||
+ uintN i, j;
|
||||
JSString *str;
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
- str = JS_ValueToString(cx, argv[i]);
|
||||
+ String fmtStr;
|
||||
+ for (j = 0; j < argc; j++)
|
||||
+ {
|
||||
+ if (j == i)
|
||||
+ fmtStr = fmtStr + "S";
|
||||
+ else
|
||||
+ fmtStr = fmtStr + "*";
|
||||
+ }
|
||||
+ if(!JS_ConvertArguments(cx, 1, JS_ARGV(cx, argv), fmtStr.c_str(), &str))
|
||||
+ {
|
||||
+ log_debug("Could not parse input arguments\n");
|
||||
+ return JS_TRUE;
|
||||
+ }
|
||||
+
|
||||
if (!str)
|
||||
return JS_TRUE;
|
||||
- argv[i] = STRING_TO_JSVAL(str);
|
||||
- log_js("%s\n", JS_GetStringBytes(str));
|
||||
+
|
||||
+ char * log_str = JS_EncodeString(cx, str);
|
||||
+ log_js("%s\n", log_str);
|
||||
+ JS_free(cx, log_str);
|
||||
}
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
JSBool
|
||||
-js_copyObject(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||
+js_copyObject(JSContext *cx, uintN argc, jsval *argv)
|
||||
{
|
||||
jsval arg;
|
||||
JSObject *js_cds_obj;
|
||||
JSObject *js_cds_clone_obj;
|
||||
|
||||
- Script *self = (Script *)JS_GetPrivate(cx, obj);
|
||||
+ Script *self = (Script *)JS_GetPrivate(cx, JS_THIS_OBJECT(cx, argv));
|
||||
|
||||
try
|
||||
{
|
||||
@@ -91,7 +106,7 @@
|
||||
|
||||
self->cdsObject2jsObject(cds_obj, js_cds_clone_obj);
|
||||
|
||||
- *rval = OBJECT_TO_JSVAL(js_cds_clone_obj);
|
||||
+ JS_SET_RVAL(cx, argv, OBJECT_TO_JSVAL(js_cds_clone_obj));
|
||||
|
||||
return JS_TRUE;
|
||||
|
||||
@@ -110,28 +125,58 @@
|
||||
}
|
||||
|
||||
JSBool
|
||||
-js_addCdsObject(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||
+js_addCdsObject(JSContext *cx, uintN argc, jsval *argv)
|
||||
{
|
||||
try
|
||||
{
|
||||
- jsval arg;
|
||||
- JSString *str;
|
||||
- String path;
|
||||
- String containerclass;
|
||||
+ // Inputs from native code
|
||||
+ JSObject *js_cds_obj = NULL;
|
||||
+ JSString *str = NULL;
|
||||
+ JSString *cont = NULL;
|
||||
|
||||
- JSObject *js_cds_obj;
|
||||
+ String path = nil;
|
||||
+ String containerclass = nil;
|
||||
+
|
||||
+ JSObject *obj = JS_THIS_OBJECT(cx, argv);
|
||||
JSObject *js_orig_obj = NULL;
|
||||
Ref<CdsObject> orig_object;
|
||||
|
||||
Ref<StringConverter> p2i;
|
||||
Ref<StringConverter> i2i;
|
||||
+ switch (argc)
|
||||
+ {
|
||||
+ case 0:
|
||||
+ log_debug("No input arguments given\n");
|
||||
+ return JS_FALSE;
|
||||
+ case 1:
|
||||
+ if(!JS_ConvertArguments(cx, 1, JS_ARGV(cx, argv), "o", &js_cds_obj))
|
||||
+ {
|
||||
+ log_debug("Could not parse input arguments\n");
|
||||
+ return JS_TRUE;
|
||||
+ }
|
||||
+ break;
|
||||
+ case 2:
|
||||
+ if(!JS_ConvertArguments(cx, 2, JS_ARGV(cx, argv), "oS", &js_cds_obj, &str))
|
||||
+ {
|
||||
+ log_debug("Could not parse input arguments\n");
|
||||
+ return JS_TRUE;
|
||||
+ }
|
||||
+ break;
|
||||
+ default:
|
||||
+ if(!JS_ConvertArguments(cx, 3, JS_ARGV(cx, argv), "oSS", &js_cds_obj, &str, &cont))
|
||||
+ {
|
||||
+ log_debug("Could not parse input arguments\n");
|
||||
+ return JS_TRUE;
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
Script *self = (Script *)JS_GetPrivate(cx, obj);
|
||||
|
||||
if (self == NULL)
|
||||
{
|
||||
log_debug("Could not retrieve class instance from global object\n");
|
||||
- return JS_FALSE;
|
||||
+ return JS_TRUE;
|
||||
}
|
||||
|
||||
if (self->whoami() == S_PLAYLIST)
|
||||
@@ -142,26 +187,17 @@
|
||||
{
|
||||
i2i = StringConverter::i2i();
|
||||
}
|
||||
-
|
||||
- arg = argv[0];
|
||||
- if (!JSVAL_IS_OBJECT(arg))
|
||||
- return JS_TRUE;
|
||||
- if (!JS_ValueToObject(cx, arg, &js_cds_obj))
|
||||
- return JS_TRUE;
|
||||
|
||||
- // root it
|
||||
- argv[0] = OBJECT_TO_JSVAL(js_cds_obj);
|
||||
|
||||
- str = JS_ValueToString(cx, argv[1]);
|
||||
if (!str)
|
||||
path = _("/");
|
||||
else
|
||||
- path = JS_GetStringBytes(str);
|
||||
+ path = JS_EncodeString(cx, str);
|
||||
+
|
||||
|
||||
- JSString *cont = JS_ValueToString(cx, argv[2]);
|
||||
if (cont)
|
||||
{
|
||||
- containerclass = JS_GetStringBytes(cont);
|
||||
+ containerclass = JS_EncodeString(cx, cont);
|
||||
if (!string_ok(containerclass) || containerclass == "undefined")
|
||||
containerclass = nil;
|
||||
}
|
||||
@@ -177,9 +213,6 @@
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
- // root it
|
||||
- argv[1] = OBJECT_TO_JSVAL(js_orig_obj);
|
||||
-
|
||||
orig_object = self->jsObject2cdsObject(js_orig_obj, self->getProcessedObject());
|
||||
if (orig_object == nil)
|
||||
return JS_TRUE;
|
||||
@@ -285,8 +318,7 @@
|
||||
JSString *str2 = JS_NewStringCopyN(cx, tmp.c_str(), tmp.length());
|
||||
if (!str2)
|
||||
return JS_TRUE;
|
||||
- *rval = STRING_TO_JSVAL(str2);
|
||||
-
|
||||
+ JS_SET_RVAL(cx, argv, STRING_TO_JSVAL(str2));
|
||||
return JS_TRUE;
|
||||
}
|
||||
catch (ServerShutdownException se)
|
||||
@@ -302,7 +334,7 @@
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
-static JSBool convert_charset_generic(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval, charset_convert_t chr)
|
||||
+static JSBool convert_charset_generic(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, charset_convert_t chr)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -321,7 +353,7 @@
|
||||
{
|
||||
str = JS_ValueToString(cx, argv[0]);
|
||||
if (str)
|
||||
- result = JS_GetStringBytes(str);
|
||||
+ result = JS_EncodeString(cx, str);
|
||||
}
|
||||
|
||||
if (result != nil)
|
||||
@@ -330,7 +362,7 @@
|
||||
JSString *str2 = JS_NewStringCopyN(cx, result.c_str(), result.length());
|
||||
if (!str2)
|
||||
return JS_TRUE;
|
||||
- *rval = STRING_TO_JSVAL(str2);
|
||||
+ JS_SET_RVAL(cx, argv, STRING_TO_JSVAL(str2));
|
||||
}
|
||||
}
|
||||
catch (ServerShutdownException se)
|
||||
@@ -347,24 +379,23 @@
|
||||
}
|
||||
|
||||
|
||||
-JSBool js_f2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||
+JSBool js_f2i(JSContext *cx, uintN argc, jsval *argv)
|
||||
{
|
||||
- return convert_charset_generic(cx, obj, argc, argv, rval, F2I);
|
||||
+ return convert_charset_generic(cx, JS_THIS_OBJECT(cx, argv), argc, argv, F2I);
|
||||
}
|
||||
|
||||
-JSBool js_m2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||
+JSBool js_m2i(JSContext *cx, uintN argc, jsval *argv)
|
||||
{
|
||||
- return convert_charset_generic(cx, obj, argc, argv, rval, M2I);
|
||||
-}
|
||||
+ return convert_charset_generic(cx, JS_THIS_OBJECT(cx, argv), argc, argv, M2I); }
|
||||
|
||||
-JSBool js_p2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||
+JSBool js_p2i(JSContext *cx, uintN argc, jsval *argv)
|
||||
{
|
||||
- return convert_charset_generic(cx, obj, argc, argv, rval, P2I);
|
||||
+ return convert_charset_generic(cx, JS_THIS_OBJECT(cx, argv), argc, argv, P2I);
|
||||
}
|
||||
|
||||
-JSBool js_j2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||
+JSBool js_j2i(JSContext *cx, uintN argc, jsval *argv)
|
||||
{
|
||||
- return convert_charset_generic(cx, obj, argc, argv, rval, J2I);
|
||||
+ return convert_charset_generic(cx, JS_THIS_OBJECT(cx, argv), argc, argv, J2I);
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
diff -ur mediatomb-0.12.1.orig/src/scripting/js_functions.h mediatomb-0.12.1/src/scripting/js_functions.h
|
||||
--- mediatomb-0.12.1.orig/src/scripting/js_functions.h 2010-03-25 10:58:05.000000000 -0400
|
||||
+++ mediatomb-0.12.1/src/scripting/js_functions.h 2011-11-16 22:28:06.000000000 -0500
|
||||
@@ -40,18 +40,18 @@
|
||||
extern "C" {
|
||||
|
||||
/// \brief Log output.
|
||||
-JSBool js_print(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
|
||||
+JSBool js_print(JSContext *cx, uintN argc, jsval *argv);
|
||||
|
||||
/// \brief Adds an object to the database.
|
||||
-JSBool js_addCdsObject(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
|
||||
+JSBool js_addCdsObject(JSContext *cx, uintN argc, jsval *argv);
|
||||
|
||||
/// \brief Makes a copy of an CDS object.
|
||||
-JSBool js_copyObject(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
|
||||
+JSBool js_copyObject(JSContext *cx, uintN argc, jsval *argv);
|
||||
|
||||
-JSBool js_f2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
|
||||
-JSBool js_m2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
|
||||
-JSBool js_p2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
|
||||
-JSBool js_j2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
|
||||
+JSBool js_f2i(JSContext *cx, uintN argc, jsval *argv);
|
||||
+JSBool js_m2i(JSContext *cx, uintN argc, jsval *argv);
|
||||
+JSBool js_p2i(JSContext *cx, uintN argc, jsval *argv);
|
||||
+JSBool js_j2i(JSContext *cx, uintN argc, jsval *argv);
|
||||
|
||||
} // extern "C"
|
||||
|
||||
diff -ur mediatomb-0.12.1.orig/src/scripting/playlist_parser_script.cc mediatomb-0.12.1/src/scripting/playlist_parser_script.cc
|
||||
--- mediatomb-0.12.1.orig/src/scripting/playlist_parser_script.cc 2010-03-25 10:58:05.000000000 -0400
|
||||
+++ mediatomb-0.12.1/src/scripting/playlist_parser_script.cc 2011-11-16 22:28:06.000000000 -0500
|
||||
@@ -46,9 +46,9 @@
|
||||
extern "C" {
|
||||
|
||||
static JSBool
|
||||
-js_readln(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||
+js_readln(JSContext *cx, uintN argc, jsval *argv)
|
||||
{
|
||||
- PlaylistParserScript *self = (PlaylistParserScript *)JS_GetPrivate(cx, obj);
|
||||
+ PlaylistParserScript *self = (PlaylistParserScript *)JS_GetPrivate(cx, JS_THIS_OBJECT(cx, argv));
|
||||
|
||||
String line;
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
JSString *jsline = JS_NewStringCopyZ(cx, line.c_str());
|
||||
|
||||
- *rval = STRING_TO_JSVAL(jsline);
|
||||
+ JS_SET_RVAL(cx, argv, STRING_TO_JSVAL(jsline));
|
||||
|
||||
return JS_TRUE;
|
||||
}
|
||||
@@ -93,8 +93,8 @@
|
||||
|
||||
String scriptPath = ConfigManager::getInstance()->getOption(CFG_IMPORT_SCRIPTING_PLAYLIST_SCRIPT);
|
||||
load(scriptPath);
|
||||
- root = JS_NewScriptObject(cx, script);
|
||||
- JS_AddNamedRoot(cx, &root, "PlaylistScript");
|
||||
+ root = JS_NewObject(cx, NULL, script, NULL);
|
||||
+ JS_AddNamedObjectRoot(cx, &root, "PlaylistScript");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -245,7 +245,7 @@
|
||||
#endif
|
||||
|
||||
if (root)
|
||||
- JS_RemoveRoot(cx, &root);
|
||||
+ JS_RemoveObjectRoot(cx, &root);
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
JS_EndRequest(cx);
|
||||
diff -ur mediatomb-0.12.1.orig/src/scripting/script.cc mediatomb-0.12.1/src/scripting/script.cc
|
||||
--- mediatomb-0.12.1.orig/src/scripting/script.cc 2010-03-25 10:58:05.000000000 -0400
|
||||
+++ mediatomb-0.12.1/src/scripting/script.cc 2011-11-16 22:28:06.000000000 -0500
|
||||
@@ -87,7 +87,7 @@
|
||||
str = JS_ValueToString(cx, val);
|
||||
if (! str)
|
||||
return nil;
|
||||
- return JS_GetStringBytes(str);
|
||||
+ return JS_EncodeString(cx, str);
|
||||
}
|
||||
|
||||
int Script::getBoolProperty(JSObject *obj, String name)
|
||||
@@ -427,14 +427,14 @@
|
||||
try
|
||||
{
|
||||
common_script = _load(common_scr_path);
|
||||
- common_root = JS_NewScriptObject(cx, common_script);
|
||||
- JS_AddNamedRoot(cx, &common_root, "common-script");
|
||||
+ 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_RemoveRoot(cx, &common_root);
|
||||
+ JS_RemoveObjectRoot(cx, &common_root);
|
||||
|
||||
log_js("Unable to load %s: %s\n", common_scr_path.c_str(),
|
||||
e.getMessage().c_str());
|
||||
@@ -460,7 +460,7 @@
|
||||
JS_BeginRequest(cx);
|
||||
#endif
|
||||
if (common_root)
|
||||
- JS_RemoveRoot(cx, &common_root);
|
||||
+ JS_RemoveObjectRoot(cx, &common_root);
|
||||
|
||||
/*
|
||||
* scripts are unrooted and will be cleaned up by GC
|
||||
@@ -504,11 +504,11 @@
|
||||
static JSClass global_class =
|
||||
{
|
||||
"global", /* name */
|
||||
- JSCLASS_HAS_PRIVATE, /* flags */
|
||||
+ JSCLASS_HAS_PRIVATE | JSCLASS_GLOBAL_FLAGS,/* flags */
|
||||
JS_PropertyStub, /* add property */
|
||||
JS_PropertyStub, /* del property */
|
||||
JS_PropertyStub, /* get property */
|
||||
- JS_PropertyStub, /* set property */
|
||||
+ JS_StrictPropertyStub, /* set property */
|
||||
JS_EnumerateStandardClasses, /* enumerate */
|
||||
JS_ResolveStub, /* resolve */
|
||||
JS_ConvertStub, /* convert */
|
||||
@@ -517,7 +517,7 @@
|
||||
};
|
||||
|
||||
/* create the global object here */
|
||||
- glob = JS_NewObject(cx, &global_class, NULL, NULL);
|
||||
+ glob = JS_NewCompartmentAndGlobalObject(cx, &global_class, NULL);
|
||||
if (! glob)
|
||||
throw _Exception(_("Scripting: could not initialize glboal class"));
|
||||
|
||||
@@ -539,12 +539,12 @@
|
||||
throw _Exception(_("Scripting: JS_DefineFunctions failed"));
|
||||
}
|
||||
|
||||
-JSScript *Script::_load(zmm::String scriptPath)
|
||||
+JSObject *Script::_load(zmm::String scriptPath)
|
||||
{
|
||||
if (glob == NULL)
|
||||
initGlobalObject();
|
||||
|
||||
- JSScript *scr;
|
||||
+ JSObject *scr;
|
||||
|
||||
String scriptText = read_text_file(scriptPath);
|
||||
|
||||
@@ -571,14 +571,11 @@
|
||||
|
||||
void Script::load(zmm::String scriptPath)
|
||||
{
|
||||
- if (script)
|
||||
- JS_DestroyScript(cx, script);
|
||||
-
|
||||
script = _load((scriptPath));
|
||||
}
|
||||
|
||||
|
||||
-void Script::_execute(JSScript *scr)
|
||||
+void Script::_execute(JSObject *scr)
|
||||
{
|
||||
jsval ret_val;
|
||||
|
||||
@@ -662,7 +659,7 @@
|
||||
JSObject *js_meta = getObjectProperty(js, _("meta"));
|
||||
if (js_meta)
|
||||
{
|
||||
- JS_AddNamedRoot(cx, &js_meta, "meta");
|
||||
+ JS_AddNamedObjectRoot(cx, &js_meta, "meta");
|
||||
/// \todo: only metadata enumerated in MT_KEYS is taken
|
||||
for (int i = 0; i < M_MAX; i++)
|
||||
{
|
||||
@@ -687,7 +684,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
- JS_RemoveRoot(cx, &js_meta);
|
||||
+ JS_RemoveObjectRoot(cx, &js_meta);
|
||||
}
|
||||
|
||||
// stuff that has not been exported to js
|
||||
diff -ur mediatomb-0.12.1.orig/src/scripting/script.h mediatomb-0.12.1/src/scripting/script.h
|
||||
--- mediatomb-0.12.1.orig/src/scripting/script.h 2010-03-25 10:58:05.000000000 -0400
|
||||
+++ mediatomb-0.12.1/src/scripting/script.h 2011-11-16 22:28:06.000000000 -0500
|
||||
@@ -66,8 +66,8 @@
|
||||
JSRuntime *rt;
|
||||
JSContext *cx;
|
||||
JSObject *glob;
|
||||
- JSScript *script;
|
||||
- JSScript *common_script;
|
||||
+ JSObject *script;
|
||||
+ JSObject *common_script;
|
||||
|
||||
public:
|
||||
Script(zmm::Ref<Runtime> runtime);
|
||||
@@ -115,8 +115,8 @@
|
||||
JSObject *common_root;
|
||||
|
||||
void initGlobalObject();
|
||||
- JSScript *_load(zmm::String scriptPath);
|
||||
- void _execute(JSScript *scr);
|
||||
+ JSObject *_load(zmm::String scriptPath);
|
||||
+ void _execute(JSObject *scr);
|
||||
zmm::Ref<StringConverter> _p2i;
|
||||
zmm::Ref<StringConverter> _j2i;
|
||||
zmm::Ref<StringConverter> _f2i;
|
||||
122
net-misc/mediatomb/mediatomb-0.12.1.ebuild
Normal file
122
net-misc/mediatomb/mediatomb-0.12.1.ebuild
Normal file
@@ -0,0 +1,122 @@
|
||||
# Copyright 1999-2011 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.ebuild,v 1.7 2011/11/17 03:40:31 axs Exp $
|
||||
|
||||
EAPI=2
|
||||
inherit autotools-utils eutils linux-info
|
||||
|
||||
DESCRIPTION="MediaTomb is an open source UPnP MediaServer"
|
||||
HOMEPAGE="http://www.mediatomb.cc/"
|
||||
SRC_URI="mirror://sourceforge/mediatomb/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm ~ppc x86"
|
||||
IUSE="debug +exif +ffmpeg inotify +javascript lastfm libextractor +mp4 mysql +taglib thumbnail"
|
||||
|
||||
DEPEND="
|
||||
mysql? ( virtual/mysql )
|
||||
!mysql? ( >=dev-db/sqlite-3 )
|
||||
javascript? ( dev-lang/spidermonkey )
|
||||
dev-libs/expat
|
||||
taglib? ( media-libs/taglib )
|
||||
!taglib? ( media-libs/id3lib )
|
||||
lastfm? ( >=media-libs/lastfmlib-0.4 )
|
||||
exif? ( media-libs/libexif )
|
||||
libextractor? ( media-libs/libextractor )
|
||||
mp4? ( media-libs/libmp4v2 )
|
||||
ffmpeg? ( virtual/ffmpeg )
|
||||
thumbnail? ( media-video/ffmpegthumbnailer[jpeg] )
|
||||
net-misc/curl
|
||||
sys-apps/file
|
||||
sys-libs/zlib
|
||||
virtual/libiconv"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
pkg_setup() {
|
||||
if use inotify; then
|
||||
if ! linux_config_exists \
|
||||
|| ! linux_chkconfig_present INOTIFY_USER; then
|
||||
ewarn "Please enable Inotify support in your kernel:"
|
||||
ewarn
|
||||
ewarn " File systems --->"
|
||||
ewarn " [*] Inotify support for userspace"
|
||||
ewarn
|
||||
fi
|
||||
fi
|
||||
enewgroup mediatomb
|
||||
enewuser mediatomb -1 -1 /dev/null mediatomb
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/${P}-gcc46.patch"
|
||||
epatch "${FILESDIR}/030-libav-0.7-support.patch"
|
||||
if use javascript && has_version ">=dev-lang/spidermonkey-1.8.5" ; then
|
||||
epatch "${FILESDIR}"/${P}-mozjs185.patch
|
||||
eautoreconf
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
if use thumbnail; then
|
||||
elog "libextrator does not work with thumbnail, disabling libextrator"
|
||||
myconf="${myconf} --enable-ffmpegthumbnailer --enable-ffmpeg --disable-libextractor"
|
||||
elif ! use thumbnail && use ffmpeg && use libextractor; then
|
||||
elog "libextrator does not work with ffmpeg, disabling libextrator"
|
||||
myconf="${myconf} --disable-ffmpegthumbnailer --enable-ffmpeg --disable-libextractor"
|
||||
else
|
||||
myconf="${myconf} $(use_enable thumbnail ffmpegthumbnailer) $(use_enable ffmpeg) $(use_enable libextractor)"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable debug tombdebug) \
|
||||
$(use_enable exif libexif) \
|
||||
$(use_enable inotify) \
|
||||
$(use_enable javascript libjs) \
|
||||
$(use_enable lastfm lastfmlib) \
|
||||
$(use_enable mp4 libmp4v2) \
|
||||
$(use_enable mysql) $(use_enable !mysql sqlite3) \
|
||||
$(use_enable taglib) $(use_enable !taglib id3lib) \
|
||||
--enable-curl \
|
||||
--enable-external-transcoding \
|
||||
--enable-libmagic \
|
||||
--enable-protocolinfo-extension \
|
||||
--enable-youtube \
|
||||
--enable-zlib \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die "Install failed!"
|
||||
|
||||
dodoc AUTHORS ChangeLog NEWS README TODO
|
||||
|
||||
sed -e "s:#MYSQL#:$(use mysql && has_version dev-db/mysql[-minimal] && echo "mysql"):" \
|
||||
"${FILESDIR}/${PN}-0.12.0.initd" > "${T}/mediatomb.initd" || die
|
||||
newinitd "${T}/mediatomb.initd" mediatomb || die
|
||||
newconfd "${FILESDIR}/${PN}-0.12.0.confd" mediatomb || die
|
||||
|
||||
insinto /etc/mediatomb
|
||||
newins "${FILESDIR}/${PN}-0.12.0.config" config.xml || die
|
||||
fperms 0600 /etc/mediatomb/config.xml
|
||||
fowners mediatomb:mediatomb /etc/mediatomb/config.xml
|
||||
|
||||
keepdir /var/lib/mediatomb
|
||||
fowners mediatomb:mediatomb /var/lib/mediatomb
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use mysql; then
|
||||
elog "MediaTomb has been built with MySQL support and needs"
|
||||
elog "to be configured before being started."
|
||||
elog "For more information, please consult the MediaTomb"
|
||||
elog "documentation: http://mediatomb.cc/pages/documentation"
|
||||
elog
|
||||
fi
|
||||
|
||||
elog "To configure MediaTomb edit:"
|
||||
elog "/etc/mediatomb/config.xml"
|
||||
elog
|
||||
elog "The MediaTomb web interface can be reached at (after the service is started):"
|
||||
elog "http://localhost:49152/"
|
||||
}
|
||||
21
net-misc/mediatomb/metadata.xml
Normal file
21
net-misc/mediatomb/metadata.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>video</herd>
|
||||
<maintainer>
|
||||
<email>darkside@gentoo.org</email>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="inotify">Enable inotify filesystem monitoring support</flag>
|
||||
<flag name="lastfm">Enable last.fm support</flag>
|
||||
<flag name="libextractor">Use libextractor to gather files' metadata.</flag>
|
||||
<flag name="mysql">Use <pkg>dev-db/mysql</pkg> as backend rather than
|
||||
SQLite3. If this USE flag is disabled, <pkg>dev-db/sqlite</pkg> is used
|
||||
instead.</flag>
|
||||
<flag name="taglib">Use <pkg>media-libs/taglib</pkg> for reading files'
|
||||
metadata rather than id3lib. If this USE flag is disabled
|
||||
<pkg>media-libs/id3lib</pkg> is used instead.</flag>
|
||||
<flag name="thumbnail">Enables video thumbnails generation through
|
||||
<pkg>media-video/ffmpegthumbnailer</pkg></flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user