From 768f8ecdf455d088f9a5af8833137b757e373bb8 Mon Sep 17 00:00:00 2001 From: Jeffrey Gardner Date: Wed, 7 Dec 2011 16:59:52 +0000 Subject: [PATCH] Add libav-0.7 support, thanks to Daniel van Vugt (vanvugt) Package-Manager: portage-2.1.10.39/cvs/Linux x86_64 --- net-misc/mediatomb/ChangeLog | 8 +- net-misc/mediatomb/Manifest | 18 +-- .../files/mediatomb-0.12.1-libav7.patch | 64 +++++++++ net-misc/mediatomb/mediatomb-0.12.1-r1.ebuild | 122 ++++++++++++++++++ 4 files changed, 196 insertions(+), 16 deletions(-) create mode 100644 net-misc/mediatomb/files/mediatomb-0.12.1-libav7.patch create mode 100644 net-misc/mediatomb/mediatomb-0.12.1-r1.ebuild 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 +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 mediatomb-0.12.1.ebuild: Revert to autotools eclass (fixes bug #392119). diff --git a/net-misc/mediatomb/Manifest b/net-misc/mediatomb/Manifest index 1ec96d006322..d900d1390a6a 100644 --- a/net-misc/mediatomb/Manifest +++ b/net-misc/mediatomb/Manifest @@ -1,23 +1,11 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA512 - 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-libav7.patch 1983 RMD160 1ff1421bef0ec2cc4a56b5f649a4888a6a48e663 SHA1 8f8811d3879f4b8d2e1132fe2016a54b4fdf5b87 SHA256 c6523e8bf5e2da89b7475d6777ef9bffe7d089752ef2f7b27b5e39a4130fb0ff 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-r1.ebuild 3788 RMD160 13dbd0a953a8f265b0f2e796308396e3ba140920 SHA1 89368188ef298dabae0e787b9877b82827788c60 SHA256 0f79351257f86abbae6a7f6afca28ddee614c446003da77aefb87a9c58f26162 EBUILD mediatomb-0.12.1.ebuild 3746 RMD160 854a6252a159b95de57fc52d87d54150551f346c SHA1 31795cec192794df63e87432b07a5a1730d7cff2 SHA256 a6aecaa023659562fa01edf629297a12ba5d2a048439e0536f77161fa575f98d -MISC ChangeLog 4475 RMD160 91a94b4f109db89f4a610963f1ec3e587f004ef1 SHA1 8a3d799408a2c3ad9a3ac118aadd3a3f23d98a47 SHA256 956c2603227771de23b25a5f97aa9e1ff653543243ed9a18a161431c08e4d40c +MISC ChangeLog 4687 RMD160 1eaaff3e80d5be83a96b16b678d5e4c7fdbb98d5 SHA1 97337de1f64677d755eef1658b91fb7f61f1b8f0 SHA256 534bbe46fc6b0e4256c0d96166e6f02633407ea7e3a04d07a14919e0ef86f768 MISC metadata.xml 917 RMD160 2c817f4ed63ff24ff4262df5897733098ab753f9 SHA1 1eb716452e1ead4a6fb2cf4931f76d2dc9df6cd9 SHA256 a8f81f44d0efc27bd22ebefe96864f84c94c1cadb1908ff1ed52fd3d91b99e23 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.18 (GNU/Linux) - -iQEcBAEBCgAGBQJO0yFeAAoJEEqz6FtPBkyj7ukH/ji0tVsqxkmvKb/QKfFUId2L -sUiakFMNDLbPzmg7afoCXIGgeWAO+uHe3gUm0TvWgyjeRhCJqlR3VM4e1vDJkWVa -BTBr8DgvvhCK0sLFCOhYX4Hmq27pxVCOJpb2Ucnm8Xpvd4puWn/M5L/IHpy6+6cs -bZjWHJpocbttFtcf/8kt8kQj43SfWAgH36cjDNdqYBjr2fIaUyZd1kdn6w2grC3c -+BrXVzagfdfRhz+5sz4aYtE4mPXKLGKcHggaz5sn7shPPHr05ZLvPruu4WC+/UoD -60dyGlJ/+JUkxCfMFfpio1sl2HPHjuaBvNprWjaHoiTrlM3cJ1Gtu2jwsF+Txmk= -=nd0C ------END PGP SIGNATURE----- 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 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; inb_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/" +} -- 2.26.2