termux-packages/packages/libx265/build.sh

40 lines
1.3 KiB
Bash
Raw Normal View History

2017-01-04 00:58:44 +01:00
TERMUX_PKG_HOMEPAGE=http://x265.org/
TERMUX_PKG_DESCRIPTION="H.265/HEVC video stream encoder library"
2019-01-21 13:53:58 +01:00
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
2021-09-20 01:46:07 +02:00
TERMUX_PKG_VERSION=3.5
TERMUX_PKG_REVISION=1
2020-08-31 10:49:11 +02:00
TERMUX_PKG_SRCURL=https://bitbucket.org/multicoreware/x265_git/downloads/x265_$TERMUX_PKG_VERSION.tar.gz
2021-09-20 01:46:07 +02:00
TERMUX_PKG_SHA256=e70a3335cacacbba0b3a20ec6fecd6783932288ebc8163ad74bcc9606477cae8
2019-06-19 23:27:01 +02:00
TERMUX_PKG_DEPENDS="libc++"
TERMUX_PKG_BREAKS="libx265-dev"
TERMUX_PKG_REPLACES="libx265-dev"
2017-01-04 00:58:44 +01:00
termux_step_pre_configure() {
2021-09-20 01:46:07 +02:00
local ARM_ARGS
# Not sure if this is necessary for on-device build
ARM_ARGS="-fno-integrated-as"
# Not sure if this is necessary for on-device build
# Follow termux_step_configure_cmake.sh for now
if [ "$TERMUX_ON_DEVICE_BUILD" = false ]; then
ARM_ARGS+=" --target=${CCTERMUX_HOST_PLATFORM}"
fi
if [ "$TERMUX_ARCH" = i686 ]; then
# Avoid text relocations.
2017-01-15 13:48:05 +01:00
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-DENABLE_ASSEMBLY=OFF"
2021-09-20 01:46:07 +02:00
elif [ "$TERMUX_ARCH" = arm ]; then
# Follow termux_step_setup_toolchain.sh
ARM_ARGS+=" -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb"
# Avoid text relocations.
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-DENABLE_ASSEMBLY=OFF"
fi
2021-09-20 01:46:07 +02:00
2017-01-15 13:48:05 +01:00
TERMUX_PKG_SRCDIR="$TERMUX_PKG_SRCDIR/source"
2021-09-20 01:46:07 +02:00
sed -i "s/@ARM_ARGS@/${ARM_ARGS}/" \
${TERMUX_PKG_SRCDIR}/CMakeLists.txt
2017-01-04 00:58:44 +01:00
}