1################################################################################ 2# 3# x264 4# 5################################################################################ 6 7X264_VERSION = 35417dcd65a57321fbadf98c9a4cff1cb741db4b 8X264_SITE = https://code.videolan.org/videolan/x264.git 9X264_SITE_METHOD = git 10X264_LICENSE = GPL-2.0+ 11X264_DEPENDENCIES = host-pkgconf 12X264_LICENSE_FILES = COPYING 13X264_INSTALL_STAGING = YES 14X264_CONF_OPTS = --disable-avs --disable-lavf --disable-swscale 15 16ifeq ($(BR2_i386)$(BR2_x86_64),y) 17# nasm needed for assembly files 18X264_DEPENDENCIES += host-nasm 19X264_CONF_ENV += AS="$(HOST_DIR)/bin/nasm" 20else ifeq ($(BR2_ARM_CPU_ARMV7A)$(BR2_aarch64),y) 21# We need to pass gcc as AS, because the ARM assembly files have to be 22# preprocessed 23X264_CONF_ENV += AS="$(TARGET_CC)" 24else 25X264_CONF_OPTS += --disable-asm 26endif 27 28ifeq ($(BR2_STATIC_LIBS),) 29X264_CONF_OPTS += --enable-pic --enable-shared 30endif 31 32ifeq ($(BR2_PACKAGE_X264_CLI),) 33X264_CONF_OPTS += --disable-cli 34endif 35 36ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) 37X264_CONF_OPTS += --disable-thread 38endif 39 40# Even though the configure script is not generated by autoconf, x264 41# uses config.sub/config.guess, so we want up-to-date versions of 42# them. 43X264_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK 44 45# the configure script is not generated by autoconf 46define X264_CONFIGURE_CMDS 47 (cd $(@D); $(TARGET_CONFIGURE_OPTS) $(X264_CONF_ENV) ./configure \ 48 --prefix=/usr \ 49 --host="$(GNU_TARGET_NAME)" \ 50 --cross-prefix="$(TARGET_CROSS)" \ 51 --disable-ffms \ 52 --enable-static \ 53 --disable-opencl \ 54 $(X264_CONF_OPTS) \ 55 ) 56endef 57 58define X264_BUILD_CMDS 59 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) 60endef 61 62define X264_INSTALL_STAGING_CMDS 63 $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D) install 64endef 65 66define X264_INSTALL_TARGET_CMDS 67 $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install 68endef 69 70$(eval $(generic-package)) 71