DIST libmediainfo_18.03.tar.xz 1627584 BLAKE2B 02ee429fe22af753e8a62a621999b949541e2db4f83705eaf1ce90bda29062fffa76cb1e85e860c7b02d5892044fed5954635b0680965949864cb220868133aa SHA512 d903309fbf9ee78633e833372b13b9676dae2d3d0aa19e584d4972ca2c76cff5524a08201e73b2a6d97a84a0fd469c5bc136d09a27ce0363a7e743e889719c6d
DIST libmediainfo_18.05.tar.xz 1630284 BLAKE2B 8fcf6a2ccbf1f0b9769e22501187d3563b991df0d274d3cc07b1fd02883dab23c0b446a7206e4dd2dd6e2944f99498b04721ed701ed4a60598b08466bd7f45ec SHA512 47d03380197f105bbd2e575558f4b4c1fade8c350af0f69a807c042abbf3aa02413fa88c047988f47cef77240e1106800a1dfd4ef1b41a1ceb019e3d52979901
+DIST libmediainfo_18.08.1.tar.xz 1662000 BLAKE2B ec5175c1d0f223e33c857fbd2eb160b55a32af9a2ec43f76ac9283aae9b262a1447997280053899ae3d91d08102eb198026591107d919acd4c33052d2ac3062b SHA512 0696ee74f6eeaffec97412decb114bdf732b6a44377b4c67925568bb14cac66266f14ec1c5eedd411de8504319add6bb384bad237063cbc3d17a82269080a0f1
--- /dev/null
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools ltprune flag-o-matic
+
+MY_PN="MediaInfo"
+DESCRIPTION="MediaInfo libraries"
+HOMEPAGE="https://mediaarea.net/mediainfo/ https://github.com/MediaArea/MediaInfoLib"
+SRC_URI="https://mediaarea.net/download/source/${PN}/${PV}/${P/-/_}.tar.xz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="curl doc mms static-libs"
+
+RDEPEND="sys-libs/zlib
+ dev-libs/tinyxml2:=
+ >=media-libs/libzen-0.4.37[static-libs=]
+ curl? ( net-misc/curl )
+ mms? ( >=media-libs/libmms-0.6.1[static-libs=] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+# tests try to fetch data from online sources
+RESTRICT="test"
+
+S=${WORKDIR}/${MY_PN}Lib/Project/GNU/Library
+
+src_prepare() {
+ eapply -p4 "${FILESDIR}"/${PN}-0.7.63-pkgconfig.patch
+ eapply_user
+
+ sed -i 's:-O2::' configure.ac || die
+ append-cppflags -DMEDIAINFO_LIBMMS_DESCRIBE_SUPPORT=0
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ --with-libtinyxml2 \
+ $(use_with curl libcurl) \
+ $(use_with mms libmms) \
+ $(use_enable static-libs static) \
+ $(use_enable static-libs staticlibs)
+}
+
+src_compile() {
+ default
+
+ if use doc; then
+ cd "${WORKDIR}"/${MY_PN}Lib/Source/Doc
+ doxygen Doxyfile || die
+ fi
+}
+
+src_install() {
+ if use doc; then
+ local HTML_DOCS=( "${WORKDIR}"/${MY_PN}Lib/Doc/*.html )
+ fi
+
+ default
+
+ edos2unix ${PN}.pc #414545
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${PN}.pc
+
+ for x in ./ Archive Audio Duplicate Export Image Multiple Reader Tag Text Video; do
+ insinto /usr/include/${MY_PN}/${x}
+ doins "${WORKDIR}"/${MY_PN}Lib/Source/${MY_PN}/${x}/*.h
+ done
+
+ insinto /usr/include/${MY_PN}DLL
+ doins "${WORKDIR}"/${MY_PN}Lib/Source/${MY_PN}DLL/*.h
+
+ dodoc "${WORKDIR}"/${MY_PN}Lib/*.txt
+
+ prune_libtool_files
+}