serenity/Ports/ffmpeg/package.sh
Andre Herbst 6391480b80 Ports/ffmpeg: Build shared libraries by using configure option
This fixes build error: relocation R_X86_64_PC32 against symbol
`ff_pw_5' can not be used when making a shared object; recompile
with -fPIC
2023-06-30 23:34:20 +02:00

29 lines
858 B
Bash
Executable file

#!/usr/bin/env -S bash ../.port_include.sh
port=ffmpeg
version=5.0
useconfigure=true
depends=("libiconv" "libtiff" "xz" "bzip2" "SDL2" "x264" "x265")
files="https://ffmpeg.org/releases/ffmpeg-${version}.tar.gz ffmpeg-${version}.tar.gz 7bf52bc242b5db8df67c62cb826df134d917dedcf6abf1289e15e4057bcc1750"
auth_type="sha256"
installopts=("INSTALL_TOP=${SERENITY_INSTALL_ROOT}/usr/local")
configopts=("SRC_PATH=.")
configure() {
run ./configure \
--target-os=none \
--arch="${SERENITY_ARCH}" \
--cc="${CC} -std=gnu99" \
--cxx="${CXX} -std=gnu99" \
--enable-cross-compile \
--enable-gpl \
--enable-libx264 \
--enable-libx265 \
--enable-shared \
--disable-stripping \
--disable-avx
}
install() {
run make DESTDIR=${SERENITY_INSTALL_ROOT} "${installopts[@]}" install
}