diff options
author | Jeffrey Gardner <je_fro@gentoo.org> | 2011-12-07 16:59:52 +0000 |
---|---|---|
committer | Jeffrey Gardner <je_fro@gentoo.org> | 2011-12-07 16:59:52 +0000 |
commit | ba3108d643618a58b1d08dfc1307e87a41cccaf6 (patch) | |
tree | c684eb9720255f6793c395d728322cb5ae451268 /net-misc/mediatomb | |
parent | Bump to final 1.42 release #392637 by Christian Inci. Add half-assed USE=sta... (diff) | |
download | gentoo-2-ba3108d643618a58b1d08dfc1307e87a41cccaf6.tar.gz gentoo-2-ba3108d643618a58b1d08dfc1307e87a41cccaf6.tar.bz2 gentoo-2-ba3108d643618a58b1d08dfc1307e87a41cccaf6.zip |
Add libav-0.7 support, thanks to Daniel van Vugt (vanvugt)
(Portage version: 2.1.10.39/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/mediatomb')
-rw-r--r-- | net-misc/mediatomb/ChangeLog | 8 | ||||
-rw-r--r-- | net-misc/mediatomb/files/mediatomb-0.12.1-libav7.patch | 64 | ||||
-rw-r--r-- | net-misc/mediatomb/mediatomb-0.12.1-r1.ebuild | 122 |
3 files changed, 193 insertions, 1 deletions
diff --git a/net-misc/mediatomb/ChangeLog b/net-misc/mediatomb/ChangeLog index 90a966260329..626e86fea452 100644 --- a/net-misc/mediatomb/ChangeLog +++ b/net-misc/mediatomb/ChangeLog @@ -1,6 +1,12 @@ # 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.25 2011/11/28 05:51:20 radhermit Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/mediatomb/ChangeLog,v 1.26 2011/12/07 16:59:52 je_fro Exp $ + +*mediatomb-0.12.1-r1 (07 Dec 2011) + + 07 Dec 2011; Jeff Gardner <je_fro@gentoo.org> +mediatomb-0.12.1-r1.ebuild, + +files/mediatomb-0.12.1-libav7.patch: + Add libav-0.7 support, thanks to Daniel van Vugt (vanvugt) 28 Nov 2011; Tim Harder <radhermit@gentoo.org> mediatomb-0.12.1.ebuild: Revert to autotools eclass (fixes bug #392119). diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1-libav7.patch b/net-misc/mediatomb/files/mediatomb-0.12.1-libav7.patch new file mode 100644 index 000000000000..e25697c5021b --- /dev/null +++ b/net-misc/mediatomb/files/mediatomb-0.12.1-libav7.patch @@ -0,0 +1,64 @@ +=== 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++; + diff --git a/net-misc/mediatomb/mediatomb-0.12.1-r1.ebuild b/net-misc/mediatomb/mediatomb-0.12.1-r1.ebuild new file mode 100644 index 000000000000..23bba27cea90 --- /dev/null +++ b/net-misc/mediatomb/mediatomb-0.12.1-r1.ebuild @@ -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-r1.ebuild,v 1.1 2011/12/07 16:59:52 je_fro Exp $ + +EAPI=2 +inherit autotools 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}/${P}-libav7.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/" +} |