source "package/libsvg-cairo/Config.in"
source "package/libsvgtiny/Config.in"
source "package/libungif/Config.in"
+ source "package/libva/Config.in"
source "package/opencv/Config.in"
source "package/opengl/Config.in"
source "package/pango/Config.in"
--- /dev/null
+config BR2_PACKAGE_LIBVA
+ bool "libva"
+ select BR2_PACKAGE_LIBDRM
+ select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
+ select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7
+ select BR2_PACKAGE_XLIB_LIBXFIXES if BR2_PACKAGE_XORG7
+ depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm/libpthread-stubs
+ depends on BR2_LARGEFILE # libdrm
+ help
+ The main motivation for VA-API (Video Acceleration API) is to enable
+ hardware accelerated video decode/encode at various entry-points (VLD,
+ IDCT, Motion Compensation etc.) for the prevailing coding standards
+ today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).
+
+ http://www.freedesktop.org/wiki/Software/vaapi/
+
+comment "libva needs a toolchain w/ largefile, threads"
+ depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
--- /dev/null
+mpeg2vldemo is the only file requiring cxx support. It is not needed for
+buildroot, so disable its compilation to avoid depending on cxx.
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+diff -uNr libva-1.3.0.org/test/Makefile.am libva-1.3.0/test/Makefile.am
+--- libva-1.3.0.org/test/Makefile.am 2014-03-24 05:49:46.000000000 +0100
++++ libva-1.3.0/test/Makefile.am 2014-04-26 18:12:25.644390292 +0200
+@@ -20,7 +20,7 @@
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-SUBDIRS = common decode encode vainfo
++SUBDIRS = common encode vainfo
+
+ if USE_X11
+ SUBDIRS += basic putsurface
--- /dev/null
+################################################################################
+#
+# libva
+#
+################################################################################
+
+LIBVA_VERSION = 1.3.1
+LIBVA_SOURCE = libva-$(LIBVA_VERSION).tar.bz2
+LIBVA_SITE = http://www.freedesktop.org/software/vaapi/releases/libva
+LIBVA_LICENSE = MIT
+LIBVA_LICENSE_FILES = COPYING
+LIBVA_AUTORECONF = YES
+LIBVA_INSTALL_STAGING = YES
+LIBVA_DEPENDENCIES = host-pkgconf libdrm
+
+# libdrm is a hard-dependency
+LIBVA_CONF_OPT = \
+ --enable-drm \
+ --disable-dummy-driver \
+ --with-drivers-path="/usr/lib/va"
+
+ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y)
+LIBVA_DEPENDENCIES += mesa3d
+LIBVA_CONF_OPT += --enable-glx
+else
+LIBVA_CONF_OPT += --disable-glx
+endif
+
+ifeq ($(BR2_PACKAGE_XORG7),y)
+LIBVA_DEPENDENCIES += xlib_libX11 xlib_libXext xlib_libXfixes
+LIBVA_CONF_OPT += --enable-x11
+else
+LIBVA_CONF_OPT += --disable-x11
+endif
+
+ifeq ($(BR2_PACKAGE_WAYLAND),y)
+LIBVA_DEPENDENCIES += wayland
+LIBVA_CONF_OPT += --enable-wayland
+else
+LIBVA_CONF_OPT += --disable-wayland
+endif
+
+ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y)
+LIBVA_DEPENDENCIES += libegl
+LIBVA_CONF_OPT += --enable-egl
+else
+LIBVA_CONF_OPT += --disable-egl
+endif
+
+# Autoreconf requires an m4 directory to exist
+define LIBVA_PATCH_M4
+ mkdir -p $(@D)/m4
+endef
+LIBVA_POST_PATCH_HOOKS += LIBVA_PATCH_M4
+
+$(eval $(autotools-package))