media-video/mkvtoolnix: Update live ebuild
authorDavid Seifert <soap@gentoo.org>
Sun, 15 Sep 2019 11:36:03 +0000 (13:36 +0200)
committerDavid Seifert <soap@gentoo.org>
Sun, 15 Sep 2019 11:36:03 +0000 (13:36 +0200)
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: David Seifert <soap@gentoo.org>
media-video/mkvtoolnix/mkvtoolnix-9999.ebuild

index c91b87e7c61737fbea429a7654d8476b08f0a9b1..5fa94680172921cf4db29599db4c4822138a9763 100644 (file)
@@ -1,15 +1,17 @@
 # Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
-inherit toolchain-funcs versionator multiprocessing qmake-utils xdg
+EAPI=7
 
-if [[ ${PV} == "9999" ]] ; then
+inherit flag-o-matic toolchain-funcs multiprocessing qmake-utils xdg
+
+if [[ ${PV} == *9999 ]] ; then
        EGIT_REPO_URI="https://gitlab.com/mbunkus/mkvtoolnix.git"
-       inherit git-r3
+       EGIT_SUBMODULES=()
+       inherit autotools git-r3
 else
        SRC_URI="https://mkvtoolnix.download/sources/${P}.tar.xz"
-       KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+       KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
 fi
 
 DESCRIPTION="Tools to create, alter, and inspect Matroska files"
@@ -22,14 +24,14 @@ IUSE="debug nls pch test qt5"
 # check NEWS.md for build system changes entries for boost/libebml/libmatroska
 # version requirement updates and other packaging info
 RDEPEND="
-       >=dev-libs/libfmt-5.3.0:=
-       >=dev-libs/boost-1.49.0:=
+       dev-libs/boost:=
        >=dev-libs/libebml-1.3.7:=
-       dev-libs/pugixml
-       media-libs/flac
+       >=dev-libs/libfmt-5.3.0:=
+       dev-libs/pugixml:=
+       media-libs/flac:=
        >=media-libs/libmatroska-1.5.0:=
-       media-libs/libogg
-       media-libs/libvorbis
+       media-libs/libogg:=
+       media-libs/libvorbis:=
        sys-apps/file
        sys-libs/zlib
        qt5? (
@@ -46,35 +48,33 @@ RDEPEND="
 DEPEND="${RDEPEND}
        dev-cpp/nlohmann_json
        dev-libs/utfcpp
+       test? ( dev-cpp/gtest )
+"
+BDEPEND="
+       app-text/docbook-xsl-stylesheets
+       dev-libs/libxslt
        dev-ruby/rake
        virtual/pkgconfig
-       dev-libs/libxslt
-       app-text/docbook-xsl-stylesheets
        nls? (
                sys-devel/gettext
                app-text/po4a
        )
-       test? ( dev-cpp/gtest )
 "
 
-DOCS="AUTHORS NEWS.md README.md"
-
-pkg_pretend() {
-       # https://bugs.gentoo.org/419257
-       local ver=4.6
-       local msg="You need at least GCC ${ver}.x for C++11 range-based 'for' and nullptr support."
-       if ! version_is_at_least ${ver} $(gcc-version); then
-               eerror ${msg}
-               die ${msg}
-       fi
-}
-
 src_prepare() {
        xdg_src_prepare
-       [[ ${PV} == "9999" ]] && { ./autogen.sh || die; }
+       if [[ ${PV} == *9999 ]]; then
+               ./autogen.sh || die
+       fi
+
+       # remove bundled libs
+       rm -r lib/{fmt,libebml,libmatroska,nlohmann-json,pugixml,utf8-cpp} || die
 }
 
 src_configure() {
+       # bug 692322, use system dev-libs/utfcpp
+       append-cppflags -I"${ESYSROOT}"/usr/include/utf8cpp
+
        local myeconfargs=(
                $(use_enable debug)
                $(usex pch "" --disable-precompiled-headers)
@@ -83,9 +83,8 @@ src_configure() {
                $(usex nls "" --with-po4a-translate=false)
                --disable-update-check
                --disable-optimization
-               --docdir="${EPREFIX}"/usr/share/doc/${PF}
-               --with-boost="${EPREFIX}"/usr
-               --with-boost-libdir="${EPREFIX}"/usr/$(get_libdir)
+               --with-boost="${ESYSROOT}"/usr
+               --with-boost-libdir="${ESYSROOT}"/usr/$(get_libdir)
        )
 
        if use qt5 ; then
@@ -114,5 +113,6 @@ src_install() {
        DESTDIR="${D}" rake -j$(makeopts_jobs) install || die
 
        einstalldocs
+       dodoc NEWS.md
        doman doc/man/*.1
 }