summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-misc/mediatomb/ChangeLog9
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.1-gcc47.patch120
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.1-libmp4v2.patch187
-rw-r--r--net-misc/mediatomb/mediatomb-0.12.1-r2.ebuild124
4 files changed, 439 insertions, 1 deletions
diff --git a/net-misc/mediatomb/ChangeLog b/net-misc/mediatomb/ChangeLog
index e0405bd2a7f5..05506449089b 100644
--- a/net-misc/mediatomb/ChangeLog
+++ b/net-misc/mediatomb/ChangeLog
@@ -1,6 +1,13 @@
# 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.27 2012/03/11 04:36:12 darkside Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/mediatomb/ChangeLog,v 1.28 2012/04/11 04:54:08 dirtyepic Exp $
+
+*mediatomb-0.12.1-r2 (11 Apr 2012)
+
+ 11 Apr 2012; Ryan Hill <dirtyepic@gentoo.org> +mediatomb-0.12.1-r2.ebuild,
+ +files/mediatomb-0.12.1-gcc47.patch, +files/mediatomb-0.12.1-libmp4v2.patch:
+ Fix bug #407753 (GCC 4.7 build failure) and bug #410235 (libmp4v2 API
+ breakage, patch by Peter Asplund).
11 Mar 2012; Jeremy Olexa <darkside@gentoo.org> mediatomb-0.12.1-r1.ebuild:
stabilize for amd64/x86 (compilation failure that didn't need to be a
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1-gcc47.patch b/net-misc/mediatomb/files/mediatomb-0.12.1-gcc47.patch
new file mode 100644
index 000000000000..5c4687d15a51
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.1-gcc47.patch
@@ -0,0 +1,120 @@
+diff --git a/src/hash/dbo_hash.h b/src/hash/dbo_hash.h
+index 2e58627..16c15b3 100644
+--- a/src/hash/dbo_hash.h
++++ b/src/hash/dbo_hash.h
+@@ -106,7 +106,7 @@ public:
+ inline bool remove(KT key)
+ {
+ struct dbo_hash_slot<KT, VT> *slot;
+- if (! search(key, &slot))
++ if (! this->search(key, &slot))
+ return false;
+ slot->key = deletedKey;
+ slot->value->release();
+@@ -136,7 +136,7 @@ public:
+ inline void put(KT key, zmm::Ref<VT> value)
+ {
+ struct dbo_hash_slot<KT, VT> *slot;
+- search(key, &slot);
++ this->search(key, &slot);
+ put(key, (hash_slot_t)slot, value);
+ }
+ void put(KT key, hash_slot_t destSlot, zmm::Ref<VT> value)
+@@ -162,7 +162,7 @@ public:
+ inline zmm::Ref<VT> get(KT key)
+ {
+ struct dbo_hash_slot<KT, VT> *slot;
+- bool found = search(key, &slot);
++ bool found = this->search(key, &slot);
+ if (found)
+ return zmm::Ref<VT>(slot->value);
+ else
+@@ -174,7 +174,7 @@ public:
+ inline zmm::Ref<VT> get(KT key, hash_slot_t *destSlot)
+ {
+ struct dbo_hash_slot<KT, VT> **slot = (struct dbo_hash_slot<KT, VT> **)destSlot;
+- bool found = search(key, slot);
++ bool found = this->search(key, slot);
+ if (found)
+ return zmm::Ref<VT>((*slot)->value);
+ else
+diff --git a/src/hash/dbr_hash.h b/src/hash/dbr_hash.h
+index 6e65d7f..7028890 100644
+--- a/src/hash/dbr_hash.h
++++ b/src/hash/dbr_hash.h
+@@ -124,7 +124,7 @@ public:
+ inline bool remove(KT key)
+ {
+ struct dbr_hash_slot<KT> *slot;
+- if (! search(key, &slot))
++ if (! this->search(key, &slot))
+ return false;
+ slot->key = deletedKey;
+ int array_slot = slot->array_slot;
+@@ -134,7 +134,7 @@ public:
+ return true;
+ }
+ data_array[array_slot] = data_array[--this->count];
+- if (! search(data_array[array_slot], &slot))
++ if (! this->search(data_array[array_slot], &slot))
+ {
+ log_debug("DBR-Hash-Error: (%d; array_slot=%d; count=%d)\n", data_array[array_slot], array_slot, this->count);
+ throw zmm::Exception(_("DBR-Hash-Error: key in data_array not found in hashtable"));
+@@ -146,7 +146,7 @@ public:
+ inline void put(KT key)
+ {
+ struct dbr_hash_slot<KT> *slot;
+- if (! search(key, &slot))
++ if (! this->search(key, &slot))
+ {
+ #ifdef TOMBDEBUG
+ if (this->count >= realCapacity)
+@@ -194,7 +194,7 @@ public:
+ inline bool exists(KT key)
+ {
+ struct dbr_hash_slot<KT> *slot;
+- return search(key, &slot);
++ return this->search(key, &slot);
+ }
+
+ /*
+diff --git a/src/hash/dso_hash.h b/src/hash/dso_hash.h
+index adfb97f..03ec852 100644
+--- a/src/hash/dso_hash.h
++++ b/src/hash/dso_hash.h
+@@ -100,7 +100,7 @@ public:
+ inline bool remove(zmm::String key)
+ {
+ struct dso_hash_slot<VT> *slot;
+- if (! search(key, &slot))
++ if (! this->search(key, &slot))
+ return false;
+ slot->key->release();
+ slot->value->release();
+@@ -112,7 +112,7 @@ public:
+ inline void put(zmm::String key, zmm::Ref<VT> value)
+ {
+ struct dso_hash_slot<VT> *slot;
+- search(key, &slot);
++ this->search(key, &slot);
+ put(key, (hash_slot_t)slot, value);
+ }
+ void put(zmm::String key, hash_slot_t destSlot, zmm::Ref<VT> value)
+@@ -141,7 +141,7 @@ public:
+ inline zmm::Ref<VT> get(zmm::String key)
+ {
+ struct dso_hash_slot<VT> *slot;
+- bool found = search(key, &slot);
++ bool found = this->search(key, &slot);
+ if (found)
+ return zmm::Ref<VT>(slot->value);
+ else
+@@ -153,7 +153,7 @@ public:
+ inline zmm::Ref<VT> get(zmm::String key, hash_slot_t *destSlot)
+ {
+ struct dso_hash_slot<VT> **slot = (struct dso_hash_slot<VT> **)destSlot;
+- bool found = search(key, slot);
++ bool found = this->search(key, slot);
+ if (found)
+ return zmm::Ref<VT>((*slot)->value);
+ else
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1-libmp4v2.patch b/net-misc/mediatomb/files/mediatomb-0.12.1-libmp4v2.patch
new file mode 100644
index 000000000000..6a6b51e1e05a
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.1-libmp4v2.patch
@@ -0,0 +1,187 @@
+diff -urN old/src/metadata/libmp4v2_handler.cc new/src/metadata/libmp4v2_handler.cc
+--- old/src/metadata/libmp4v2_handler.cc 2012-04-05 01:46:26.000000000 +0200
++++ new/src/metadata/libmp4v2_handler.cc 2012-04-05 02:01:24.000000000 +0200
+@@ -65,29 +65,28 @@
+ static void addMetaField(metadata_fields_t field, MP4FileHandle mp4, Ref<CdsItem> item)
+ {
+ String value;
+- char* mp4_retval = NULL;
+- u_int16_t track;
+- u_int16_t total_tracks;
+-
+ Ref<StringConverter> sc = StringConverter::i2i();
+
++ const MP4Tags* new_tags = MP4TagsAlloc();
++
++ if (!MP4TagsFetch(new_tags, mp4))
++ return;
++
+ switch (field)
+ {
+ case M_TITLE:
+- MP4GetMetadataName(mp4, &mp4_retval);
++ value = new_tags->name;
+ break;
+ case M_ARTIST:
+- MP4GetMetadataArtist(mp4, &mp4_retval);
++ value = new_tags->artist;
+ break;
+ case M_ALBUM:
+- MP4GetMetadataAlbum(mp4, &mp4_retval);
++ value = new_tags->album;
+ break;
+ case M_DATE:
+- MP4GetMetadataYear(mp4, &mp4_retval);
+- if (mp4_retval)
++ value = new_tags->releaseDate;
++ if (value.length() > 0)
+ {
+- value = mp4_retval;
+- free(mp4_retval);
+ if (string_ok(value))
+ value = value + "-01-01";
+ else
+@@ -95,34 +94,31 @@
+ }
+ break;
+ case M_GENRE:
+- MP4GetMetadataGenre(mp4, &mp4_retval);
++ value = new_tags->genre;
+ break;
+ case M_DESCRIPTION:
+- MP4GetMetadataComment(mp4, &mp4_retval);
++ value = new_tags->comments;
+ break;
+ case M_TRACKNUMBER:
+- MP4GetMetadataTrack(mp4, &track, &total_tracks);
+- if (track > 0)
++ if (new_tags->track)
+ {
+- value = String::from(track);
+- item->setTrackNumber((int)track);
++ value = String::from(new_tags->track->index);
++ item->setTrackNumber((int)new_tags->track->index);
+ }
+ else
++ {
++ MP4TagsFree( new_tags );
+ return;
++ }
+ break;
+ default:
++ MP4TagsFree( new_tags );
+ return;
+ }
+
+- if ((field != M_DATE) && (field != M_TRACKNUMBER) &&
+- (mp4_retval))
+- {
+- value = mp4_retval;
+- free(mp4_retval);
+- }
+-
++ MP4TagsFree( new_tags );
+ value = trim_string(value);
+-
++
+ if (string_ok(value))
+ {
+ item->setMetadata(MT_KEYS[field].upnp, sc->convert(value));
+@@ -190,14 +186,19 @@
+ }
+
+ #if defined(HAVE_MAGIC)
+- u_int8_t *art_data;
+- u_int32_t art_data_len;
++ void *art_data = 0;
++ u_int32_t art_data_len = 0;
+ String art_mimetype;
++
++ const MP4Tags* new_tags = MP4TagsAlloc();
++ MP4TagsFetch(new_tags, mp4);
++ if (new_tags->artworkCount)
++ {
++ art_data = new_tags->artwork->data;
++ art_data_len = new_tags->artwork->size;
++ }
+ #ifdef HAVE_MP4_GET_METADATA_COVER_ART_COUNT
+- if (MP4GetMetadataCoverArtCount(mp4) &&
+- MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len))
+-#else
+- MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len);
++ if (new_tags->artworkCount && art_data_len > 0)
+ #endif
+ {
+ if (art_data)
+@@ -211,11 +212,10 @@
+ }
+ catch (Exception ex)
+ {
+- free(art_data);
++ MP4TagsFree(new_tags);
+ throw ex;
+ }
+
+- free(art_data);
+ if (art_mimetype != _(MIMETYPE_DEFAULT))
+ {
+ Ref<CdsResource> resource(new CdsResource(CH_MP4));
+@@ -225,6 +225,7 @@
+ }
+ }
+ }
++ MP4TagsFree(new_tags);
+ #endif
+ MP4Close(mp4);
+ }
+@@ -249,26 +250,35 @@
+
+ if (ctype != ID3_ALBUM_ART)
+ throw _Exception(_("LibMP4V2Handler: got unknown content type: ") + ctype);
++
++ const MP4Tags* new_tags = MP4TagsAlloc();
++ if (MP4TagsFetch(new_tags, mp4))
++ {
+ #ifdef HAVE_MP4_GET_METADATA_COVER_ART_COUNT
+- if (!MP4GetMetadataCoverArtCount(mp4))
+- throw _Exception(_("LibMP4V2Handler: resource has no album art information"));
++ if (!new_tags->artworkCount)
++ throw _Exception(_("LibMP4V2Handler: resource has no album art information"));
+ #endif
+- u_int8_t *art_data;
+- u_int32_t art_data_len;
+- if (MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len))
+- {
+- if (art_data)
++ void *art_data = 0;
++ u_int32_t art_data_len;
++
++ const MP4TagArtwork* art = new_tags->artwork;
++ art_data = art->data;
++ art_data_len = art->size;
++ if (art)
+ {
+- *data_size = (off_t)art_data_len;
+- Ref<IOHandler> h(new MemIOHandler((void *)art_data, art_data_len));
+- free(art_data);
+- return h;
++ if (art_data)
++ {
++ *data_size = (off_t)art_data_len;
++ Ref<IOHandler> h(new MemIOHandler(art_data, art_data_len));
++ MP4TagsFree(new_tags);
++ return h;
++ }
+ }
++ MP4TagsFree(new_tags);
+ }
+-
+ throw _Exception(_("LibMP4V2Handler: could not serve album art "
+- "for file") + item->getLocation() +
+- " - embedded image not found");
++ "for file") + item->getLocation() +
++ " - embedded image not found");
+ }
+
+ #endif // HAVE_LIBMP4V2
+De binära filerna old/src/metadata/.libmp4v2_handler.cc.swp och new/src/metadata/.libmp4v2_handler.cc.swp skiljer
diff --git a/net-misc/mediatomb/mediatomb-0.12.1-r2.ebuild b/net-misc/mediatomb/mediatomb-0.12.1-r2.ebuild
new file mode 100644
index 000000000000..ffe39bba4fe5
--- /dev/null
+++ b/net-misc/mediatomb/mediatomb-0.12.1-r2.ebuild
@@ -0,0 +1,124 @@
+# 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-r2.ebuild,v 1.1 2012/04/11 04:54:08 dirtyepic 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-1.9.1_p479 )
+ 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}-gcc47.patch"
+ epatch "${FILESDIR}/${P}-libav7.patch"
+ epatch "${FILESDIR}/${P}-libmp4v2.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/"
+}