kumquat-buildroot/package/libvpx/libvpx.mk
Bernd Kuhls 182bd22ece package/libvpx: vp9 encoder needs c++
Encoding rate control interface for v9 is implemented in c++:
745979bc29 (diff-58f26933c120328b31831a743eec5ba3R534)

Disable vp9 encoding when toolchain lacks c++.

Fixes:
http://autobuild.buildroot.net/results/983/9836215fe22f260483f9153fb5447892801a14a9/
http://autobuild.buildroot.net/results/88a/88aa80ee006ba2dcc40c15be3af73c756cb62974/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-09-23 20:46:07 +02:00

58 lines
1.5 KiB
Makefile

################################################################################
#
# libvpx
#
################################################################################
LIBVPX_VERSION = 1.9.0
LIBVPX_SITE = $(call github,webmproject,libvpx,v$(LIBVPX_VERSION))
LIBVPX_LICENSE = BSD-3-Clause
LIBVPX_LICENSE_FILES = LICENSE PATENTS
LIBVPX_INSTALL_STAGING = YES
# ld is being used with cc options. therefore, pretend ld is cc.
LIBVPX_CONF_ENV = \
LD="$(TARGET_CC)" \
CROSS=$(GNU_TARGET_NAME)
LIBVPX_CONF_OPTS = \
--disable-examples \
--disable-docs \
--disable-unit-tests
# vp9/ratectrl_rtc.cc
ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
LIBVPX_CONF_OPTS += --enable-vp9-encoder
else
LIBVPX_CONF_OPTS += --disable-vp9-encoder
endif
# This is not a true autotools package. It is based on the ffmpeg build system
define LIBVPX_CONFIGURE_CMDS
(cd $(LIBVPX_SRCDIR) && rm -rf config.cache && \
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
$(LIBVPX_CONF_ENV) \
./configure \
--target=generic-gnu \
--enable-pic \
--prefix=/usr \
$(SHARED_STATIC_LIBS_OPTS) \
$(LIBVPX_CONF_OPTS) \
)
endef
define LIBVPX_BUILD_CMDS
$(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) -C $(@D) all
endef
define LIBVPX_INSTALL_STAGING_CMDS
$(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D) install
endef
define LIBVPX_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install
endef
$(eval $(generic-package))