0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2025-01-07 10:18:21 +00:00
2024-04-14 12:35:33 +00:00

43 lines
1.1 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="x264"
PKG_VERSION="7ed753b10a61d0be95f683289dfb925b800b0676"
PKG_SHA256="1bdf238ef065e711c4cf436046917de4a7a3e920a0b0ae1fa0f528ab23f17b12"
PKG_LICENSE="GPL"
PKG_SITE="http://www.videolan.org/developers/x264.html"
PKG_URL="https://code.videolan.org/videolan/x264/-/archive/${PKG_VERSION}/x264-${PKG_VERSION}.tar.bz2"
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="x264 codec"
if [ "${TARGET_ARCH}" = "x86_64" ]; then
PKG_DEPENDS_TARGET+=" nasm:host"
fi
pre_configure_target() {
cd ${PKG_BUILD}
rm -rf .${TARGET_NAME}
if [ "${TARGET_ARCH}" = "x86_64" ]; then
export AS="${TOOLCHAIN}/bin/nasm"
else
PKG_X264_ASM="--disable-asm"
fi
}
configure_target() {
./configure \
--cross-prefix="${TARGET_PREFIX}" \
--extra-cflags="${CFLAGS}" \
--extra-ldflags="${LDFLAGS}" \
--host="${TARGET_NAME}" \
--prefix="/usr" \
--sysroot="${SYSROOT_PREFIX}" \
${PKG_X264_ASM} \
--disable-cli \
--enable-lto \
--enable-pic \
--enable-static \
--enable-strip
}