2015-03-20 13:35:19 +01:00
|
|
|
################################################################################
|
2014-10-05 18:29:56 +02:00
|
|
|
#
|
|
|
|
# x264
|
|
|
|
#
|
2015-03-20 13:35:19 +01:00
|
|
|
################################################################################
|
2014-10-05 18:29:56 +02:00
|
|
|
|
2017-10-22 17:23:43 +02:00
|
|
|
X264_VERSION = ba24899b0bf23345921da022f7a51e0c57dbe73d
|
2015-06-11 11:01:44 +02:00
|
|
|
X264_SITE = git://git.videolan.org/x264.git
|
2017-03-30 15:43:32 +02:00
|
|
|
X264_LICENSE = GPL-2.0+
|
2014-10-05 18:29:56 +02:00
|
|
|
X264_DEPENDENCIES = host-pkgconf
|
|
|
|
X264_LICENSE_FILES = COPYING
|
|
|
|
X264_INSTALL_STAGING = YES
|
2017-06-05 18:22:37 +02:00
|
|
|
X264_CONF_OPTS = --disable-avs --disable-lavf --disable-swscale
|
2014-10-05 18:29:56 +02:00
|
|
|
|
|
|
|
ifeq ($(BR2_i386)$(BR2_x86_64),y)
|
2017-06-24 09:35:14 +02:00
|
|
|
# nasm needed for assembly files
|
|
|
|
X264_DEPENDENCIES += host-nasm
|
2017-07-05 13:14:19 +02:00
|
|
|
X264_CONF_ENV += AS="$(HOST_DIR)/bin/nasm"
|
2015-08-30 13:53:21 +02:00
|
|
|
else ifeq ($(BR2_ARM_CPU_ARMV7A)$(BR2_aarch64),y)
|
2014-10-09 10:41:24 +02:00
|
|
|
# We need to pass gcc as AS, because the ARM assembly files have to be
|
|
|
|
# preprocessed
|
|
|
|
X264_CONF_ENV += AS="$(TARGET_CC)"
|
2014-10-05 18:29:56 +02:00
|
|
|
else
|
2014-10-08 21:37:06 +02:00
|
|
|
X264_CONF_OPTS += --disable-asm
|
2014-10-05 18:29:56 +02:00
|
|
|
endif
|
|
|
|
|
2014-12-03 22:41:29 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),)
|
2014-10-08 21:37:06 +02:00
|
|
|
X264_CONF_OPTS += --enable-pic --enable-shared
|
2014-10-05 18:29:56 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_X264_CLI),)
|
2014-10-08 21:37:06 +02:00
|
|
|
X264_CONF_OPTS += --disable-cli
|
2014-10-05 18:29:56 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
|
2014-10-08 21:37:06 +02:00
|
|
|
X264_CONF_OPTS += --disable-thread
|
2014-10-05 18:29:56 +02:00
|
|
|
endif
|
|
|
|
|
2017-03-04 14:45:50 +01:00
|
|
|
# Even though the configure script is not generated by autoconf, x264
|
|
|
|
# uses config.sub/config.guess, so we want up-to-date versions of
|
|
|
|
# them.
|
|
|
|
X264_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK
|
|
|
|
|
2014-10-05 18:29:56 +02:00
|
|
|
# the configure script is not generated by autoconf
|
|
|
|
define X264_CONFIGURE_CMDS
|
2014-10-09 10:41:24 +02:00
|
|
|
(cd $(@D); $(TARGET_CONFIGURE_OPTS) $(X264_CONF_ENV) ./configure \
|
2014-10-05 18:29:56 +02:00
|
|
|
--prefix=/usr \
|
|
|
|
--host="$(GNU_TARGET_NAME)" \
|
|
|
|
--cross-prefix="$(TARGET_CROSS)" \
|
|
|
|
--disable-ffms \
|
|
|
|
--enable-static \
|
2014-11-19 20:53:56 +01:00
|
|
|
--disable-opencl \
|
2014-10-05 18:29:56 +02:00
|
|
|
$(X264_CONF_OPTS) \
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define X264_BUILD_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define X264_INSTALL_STAGING_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D) install
|
|
|
|
endef
|
|
|
|
|
|
|
|
define X264_INSTALL_TARGET_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|