termux-packages/packages/libx264/build.sh

36 lines
1.6 KiB
Bash
Raw Normal View History

TERMUX_PKG_HOMEPAGE=https://www.videolan.org/developers/x264.html
2015-06-13 01:03:31 +02:00
TERMUX_PKG_DESCRIPTION="Library for encoding video streams into the H.264/MPEG-4 AVC format"
2019-01-21 13:53:58 +01:00
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
2021-04-13 20:18:44 +02:00
_COMMIT=55d517bc4569272a2c9a367a4106c234aba2ffbc
TERMUX_PKG_VERSION=1:0.161.3049 # X264_BUILD from x264.h; commit count
2022-05-07 12:49:37 +02:00
TERMUX_PKG_REVISION=2
2021-04-13 20:18:44 +02:00
TERMUX_PKG_SRCURL=https://code.videolan.org/videolan/x264/-/archive/$_COMMIT/x264-$_COMMIT.tar.bz2
TERMUX_PKG_SHA256=f4b781e1e33f77e7bf283648537f38a3dd107589de7a87973df6d26480faf5d2
TERMUX_PKG_BREAKS="libx264-dev"
TERMUX_PKG_REPLACES="libx264-dev"
# Avoid linking against ffmpeg libraries to avoid circular dependency:
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--disable-swscale
--disable-lavf"
2016-09-01 13:26:46 +02:00
termux_step_pre_configure() {
#if [ $TERMUX_ARCH = "i686" -o $TERMUX_ARCH = "x86_64" ]; then
if [ $TERMUX_ARCH = "i686" ]; then
# Avoid text relocations on i686, see:
2016-09-01 13:26:46 +02:00
# https://mailman.videolan.org/pipermail/x264-devel/2016-March/011589.html
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --disable-asm"
2017-11-15 22:33:36 +01:00
# Avoid errors such as "relocation R_386_GOTOFF against preemptible symbol
# x264_significant_coeff_flag_offset cannot be used when making a shared object":
LDFLAGS+=" -fuse-ld=bfd"
elif [ $TERMUX_ARCH = "x86_64" ]; then
# Avoid requiring nasm for now:
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --disable-asm"
2016-09-01 13:26:46 +02:00
fi
}
2022-05-07 12:49:37 +02:00
termux_step_post_make_install() {
mkdir -p ${TERMUX_PREFIX}/share/bash-completion/completions
install -m 644 ${TERMUX_PKG_SRCDIR}/tools/bash-autocomplete.sh ${TERMUX_PREFIX}/share/bash-completion/completions/x264
}