42 lines
1.1 KiB
Makefile
42 lines
1.1 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
|
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
|
|
|
PKG_NAME="x264"
|
|
PKG_VERSION="a354f11f8f019a2a34ae7ef554ff07b31f0818f3"
|
|
PKG_LICENSE="GPL"
|
|
PKG_SITE="http://www.videolan.org/developers/x264.html"
|
|
PKG_URL="https://code.videolan.org/videolan/x264/-/archive/${PKG_VERSION}.tar.gz"
|
|
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-shared \
|
|
--enable-pic \
|
|
--enable-strip
|
|
}
|