summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/libva-utils/libva-utils-9999.ebuild')
-rw-r--r--media-video/libva-utils/libva-utils-9999.ebuild33
1 files changed, 31 insertions, 2 deletions
diff --git a/media-video/libva-utils/libva-utils-9999.ebuild b/media-video/libva-utils/libva-utils-9999.ebuild
index 7803d68b4896..86b1d9f1d1b4 100644
--- a/media-video/libva-utils/libva-utils-9999.ebuild
+++ b/media-video/libva-utils/libva-utils-9999.ebuild
@@ -20,10 +20,14 @@ fi
LICENSE="MIT"
SLOT="0"
-IUSE="+drm test wayland X"
+IUSE="+drm examples putsurface test test_va_api +vainfo wayland X"
RESTRICT="!test? ( test )"
-REQUIRED_USE="|| ( drm wayland X )"
+REQUIRED_USE="
+ || ( drm wayland X )
+ putsurface? ( || ( wayland X ) )
+ || ( examples putsurface test_va_api vainfo )
+"
BDEPEND="virtual/pkgconfig"
@@ -47,6 +51,17 @@ DOCS=( NEWS CONTRIBUTING.md README.md )
src_prepare() {
default
sed -e 's/-Werror//' -i test/Makefile.am || die
+
+ if ! use examples ; then
+ sed -E -e '/^SUBDIRS \+?=/s!( decode\>| encode\>| videoprocess\>| vendor/intel\>| vendor/intel/sfcsample\>)!!g' -i Makefile.am
+ fi
+ if ! use putsurface ; then
+ sed -E -e '/^SUBDIRS \+?=/s! putsurface\>!!g' -i Makefile.am
+ fi
+ if ! use vainfo ; then
+ sed -E -e '/^SUBDIRS \+?=/s! vainfo\>!!g' -i Makefile.am
+ fi
+
eautoreconf
}
@@ -57,5 +72,19 @@ src_configure() {
$(use_enable wayland)
$(use_enable X x11)
)
+ if use test || use test_va_api ; then
+ myeconfargs+=( --enable-tests )
+ else
+ myeconfargs+=( --disable-tests )
+ fi
econf "${myeconfargs[@]}"
}
+
+src_install() {
+ default
+ if ! use test_va_api ; then
+ if [ -e "${ED}"/usr/bin/test_va_api ] ; then
+ rm -f "${ED}"/usr/bin/test_va_api || die
+ fi
+ fi
+}