distribution/packages/multimedia/x264/package.mk

43 lines
1 KiB
Makefile
Raw Normal View History

2022-02-05 14:23:32 +00:00
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
2022-04-14 19:25:58 +00:00
# Copyright (C) 2022-present Fewtarius
2022-02-05 14:23:32 +00:00
PKG_NAME="x264"
2022-04-14 19:25:58 +00:00
PKG_VERSION="bfc87b7a330f75f5c9a21e56081e4b20344f139e"
2022-02-05 14:23:32 +00:00
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"
2022-04-14 19:25:58 +00:00
if [ "${TARGET_ARCH}" = "x86_64" ]; then
2022-02-05 14:23:32 +00:00
PKG_DEPENDS_TARGET+=" nasm:host"
fi
pre_configure_target() {
2022-04-14 19:25:58 +00:00
cd ${PKG_BUILD}
rm -rf .${TARGET_NAME}
2022-02-05 14:23:32 +00:00
2022-04-14 19:25:58 +00:00
if [ "${TARGET_ARCH}" = "x86_64" ]; then
export AS="${TOOLCHAIN}/bin/nasm"
2022-02-05 14:23:32 +00:00
else
PKG_X264_ASM="--disable-asm"
fi
}
configure_target() {
./configure \
2022-04-14 19:25:58 +00:00
--cross-prefix="${TARGET_PREFIX}" \
--extra-cflags="${CFLAGS}" \
--extra-ldflags="${LDFLAGS}" \
--host="${TARGET_NAME}" \
2022-02-05 14:23:32 +00:00
--prefix="/usr" \
2022-04-14 19:25:58 +00:00
--sysroot="${SYSROOT_PREFIX}" \
${PKG_X264_ASM} \
2022-02-05 14:23:32 +00:00
--disable-cli \
--enable-lto \
--enable-shared \
--enable-pic \
--enable-strip
}