distribution/packages/multimedia/x265/package.mk

29 lines
873 B
Makefile
Raw Normal View History

2022-02-05 14:23:32 +00:00
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="x265"
2022-07-05 21:04:55 +00:00
PKG_VERSION="3.5"
2022-02-05 14:23:32 +00:00
PKG_ARCH="x86_64"
PKG_LICENSE="GPL"
PKG_SITE="https://www.videolan.org/developers/x265.html"
2022-07-05 21:04:55 +00:00
PKG_URL="https://bitbucket.org/multicoreware/x265_git/downloads/${PKG_NAME}_${PKG_VERSION}.tar.gz"
2022-02-05 14:23:32 +00:00
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="x265 is a H.265/HEVC video encoder application library"
PKG_TOOLCHAIN="make"
2023-06-05 17:14:21 +00:00
if [ "${TARGET_ARCH}" = "x86_64" ]; then
PKG_DEPENDS_TARGET+=" nasm:host"
fi
2022-02-05 14:23:32 +00:00
pre_configure_target() {
2023-02-24 13:53:43 +00:00
LDFLAGS="${LDFLAGS} -ldl"
2023-06-05 17:14:21 +00:00
# custom cmake build to override the LOCAL_CC/CXX
cp ${CMAKE_CONF} cmake-x265.conf
echo "SET(CMAKE_C_COMPILER ${CC})" >> cmake-x265.conf
echo "SET(CMAKE_CXX_COMPILER ${CXX})" >> cmake-x265.conf
cmake -DCMAKE_TOOLCHAIN_FILE=cmake-x265.conf -G "Unix Makefiles" ./source
}