diff options
Diffstat (limited to 'media-libs/libvpx')
-rw-r--r-- | media-libs/libvpx/libvpx-9999.ebuild | 87 |
1 files changed, 44 insertions, 43 deletions
diff --git a/media-libs/libvpx/libvpx-9999.ebuild b/media-libs/libvpx/libvpx-9999.ebuild index 6462ef4..39e61a8 100644 --- a/media-libs/libvpx/libvpx-9999.ebuild +++ b/media-libs/libvpx/libvpx-9999.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI="7" inherit toolchain-funcs git-r3 multilib-minimal # To create a new testdata tarball: @@ -11,25 +11,23 @@ inherit toolchain-funcs git-r3 multilib-minimal # 4. make testdata # 5. tar -cjf libvpx-testdata-${PV}.tar.bz2 libvpx-testdata -LIBVPX_TESTDATA_VER=1.6.1 +LIBVPX_TESTDATA_VER=1.8.0 DESCRIPTION="WebM VP8 and VP9 Codec SDK" HOMEPAGE="http://www.webmproject.org" EGIT_REPO_URI="https://chromium.googlesource.com/webm/libvpx https://github.com/webmproject/libvpx.git" LICENSE="BSD" -SLOT="0/5" +SLOT="0/6" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" -IUSE="cpu_flags_x86_avx cpu_flags_x86_avx2 doc cpu_flags_x86_mmx postproc cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1 +highbitdepth static-libs +threads" +IUSE="doc +highbitdepth postproc static-libs test +threads" -REQUIRED_USE=" - cpu_flags_x86_sse2? ( cpu_flags_x86_mmx ) - cpu_flags_x86_ssse3? ( cpu_flags_x86_sse2 ) -" +REQUIRED_USE="test? ( threads )" -RESTRICT="mirror test" +# Disable test phase when USE="-test" +RESTRICT="!test? ( test )" -RDEPEND="abi_x86_32? ( !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )" +RDEPEND="" DEPEND="abi_x86_32? ( dev-lang/yasm ) abi_x86_64? ( dev-lang/yasm ) abi_x86_x32? ( dev-lang/yasm ) @@ -40,7 +38,6 @@ DEPEND="abi_x86_32? ( dev-lang/yasm ) dev-lang/php ) " - src_configure() { # https://bugs.gentoo.org/show_bug.cgi?id=384585 # https://bugs.gentoo.org/show_bug.cgi?id=465988 @@ -55,6 +52,33 @@ src_configure() { multilib_src_configure() { unset CODECS #357487 + local myconf + if multilib_is_native_abi; then + myconf+=" $(use_enable doc install-docs) $(use_enable doc docs)" + else + # not needed for multilib and will be overwritten anyway. + myconf+=" --disable-examples --disable-install-docs --disable-docs" + fi + + # #498364: sse doesn't work without sse2 enabled, + local myconfargs=( + --prefix="${EPREFIX}"/usr + --libdir="${EPREFIX}"/usr/$(get_libdir) + --enable-pic + --enable-vp8 + --enable-vp9 + --enable-shared + --extra-cflags="${CFLAGS}" + $(use_enable postproc) + $(use_enable svc experimental) + $(use_enable static-libs static) + $(use_enable test unit-tests) + $(use_enable threads multithread) + $(use_enable highbitdepth vp9-highbitdepth) + $(use_enable doc install-docs) + $(use_enable doc docs) + ) + # let the build system decide which AS to use (it honours $AS but # then feeds it with yasm flags without checking...) #345161 tc-export AS @@ -68,37 +92,8 @@ multilib_src_configure() { # Link with gcc by default, the build system should override this if needed. export LD="${CC}" - local myconf - if multilib_is_native_abi; then - myconf+=" $(use_enable doc install-docs) $(use_enable doc docs)" - else - # not needed for multilib and will be overwritten anyway. - myconf+=" --disable-examples --disable-install-docs --disable-docs" - fi - - # #498364: sse doesn't work without sse2 enabled, - "${S}/configure" \ - --prefix="${EPREFIX}"/usr \ - --libdir="${EPREFIX}"/usr/$(get_libdir) \ - --enable-pic \ - --enable-vp8 \ - --enable-vp9 \ - --enable-shared \ - --extra-cflags="${CFLAGS}" \ - $(use_enable cpu_flags_x86_avx avx) \ - $(use_enable cpu_flags_x86_avx2 avx2) \ - $(use_enable cpu_flags_x86_mmx mmx) \ - $(use_enable postproc) \ - $(use cpu_flags_x86_sse2 && use_enable cpu_flags_x86_sse sse || echo --disable-sse) \ - $(use_enable cpu_flags_x86_sse2 sse2) \ - $(use_enable cpu_flags_x86_sse3 sse3) \ - $(use_enable cpu_flags_x86_sse4_1 sse4_1) \ - $(use_enable cpu_flags_x86_ssse3 ssse3) \ - $(use_enable static-libs static) \ - $(use_enable threads multithread) \ - $(use_enable highbitdepth vp9-highbitdepth) \ - ${myconf} \ - || die + echo "${S}"/configure "${myconfargs[@]}" >&2 + "${S}"/configure "${myconfargs[@]}" } multilib_src_compile() { @@ -106,6 +101,12 @@ multilib_src_compile() { emake verbose=yes GEN_EXAMPLES= } +multilib_src_test() { + local -x LD_LIBRARY_PATH="${BUILD_DIR}" + local -x LIBVPX_TEST_DATA_PATH="${WORKDIR}/${PN}-testdata" + emake verbose=yes GEN_EXAMPLES= test +} + multilib_src_install() { emake verbose=yes GEN_EXAMPLES= DESTDIR="${D}" install multilib_is_native_abi && use doc && dodoc -r docs/html |