mirror of
https://github.com/levogevo/ffmpeg-builder.git
synced 2026-01-15 19:06:17 +00:00
initial fixups for android
This commit is contained in:
@@ -52,6 +52,11 @@ set_compile_opts() {
|
|||||||
LIBDIR="${PREFIX}/lib"
|
LIBDIR="${PREFIX}/lib"
|
||||||
LDFLAGS=("-L${LIBDIR}")
|
LDFLAGS=("-L${LIBDIR}")
|
||||||
|
|
||||||
|
# HACK rope in libm
|
||||||
|
if is_android; then
|
||||||
|
test -f "${LIBDIR}/libm.so" || ln -s /system/lib64/libm.so "${LIBDIR}/libm.so"
|
||||||
|
fi
|
||||||
|
|
||||||
# set prefix flags and basic flags
|
# set prefix flags and basic flags
|
||||||
CONFIGURE_FLAGS+=(
|
CONFIGURE_FLAGS+=(
|
||||||
"--prefix=${PREFIX}"
|
"--prefix=${PREFIX}"
|
||||||
@@ -812,6 +817,7 @@ build_libmp3lame() {
|
|||||||
build_libnuma() {
|
build_libnuma() {
|
||||||
# darwin does not have numa
|
# darwin does not have numa
|
||||||
if is_darwin; then return 0; fi
|
if is_darwin; then return 0; fi
|
||||||
|
if is_android; then return 0; fi
|
||||||
|
|
||||||
./autogen.sh || return 1
|
./autogen.sh || return 1
|
||||||
./configure \
|
./configure \
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ determine_pkg_mgr() {
|
|||||||
# pkg-mgr update-cmd upgrade-cmd install-cmd check-cmd
|
# pkg-mgr update-cmd upgrade-cmd install-cmd check-cmd
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
local PKG_MGR_MAP='
|
local PKG_MGR_MAP='
|
||||||
|
pkg:pkg update:pkg upgrade:pkg install -y:dpkg -l ${pkg}
|
||||||
brew:brew update:brew upgrade:brew install:brew list --formula ${pkg}
|
brew:brew update:brew upgrade:brew install:brew list --formula ${pkg}
|
||||||
apt-get:${SUDO}apt-get update:${SUDO}apt-get upgrade -y:${SUDO}apt-get install -y:dpkg -l ${pkg}
|
apt-get:${SUDO}apt-get update:${SUDO}apt-get upgrade -y:${SUDO}apt-get install -y:dpkg -l ${pkg}
|
||||||
pacman:${SUDO}pacman -Syy:${SUDO}pacman -Syu --noconfirm:${SUDO}pacman -S --noconfirm --needed:pacman -Qi ${pkg}
|
pacman:${SUDO}pacman -Syy:${SUDO}pacman -Syu --noconfirm:${SUDO}pacman -S --noconfirm --needed:pacman -Qi ${pkg}
|
||||||
@@ -82,16 +83,14 @@ print_req_pkgs() {
|
|||||||
numactl-devel
|
numactl-devel
|
||||||
)
|
)
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
local android_pkgs=(
|
local pkg_pkgs=(
|
||||||
autoconf automake cmake libtool
|
autoconf automake cmake libtool
|
||||||
texinfo nasm yasm python3 wget
|
texinfo nasm yasm python3 wget
|
||||||
doxygen jq ccache gawk rust
|
doxygen jq ccache gawk rust
|
||||||
git gnuplot bison rsync ragel
|
git gnuplot bison rsync ragel
|
||||||
zip unzip gperf build-essential
|
zip unzip gperf build-essential
|
||||||
binutils
|
binutils ninja
|
||||||
)
|
)
|
||||||
# pip install pipx
|
|
||||||
# pipx install virtualenv
|
|
||||||
|
|
||||||
local req_pkgs_env_name="${pkg_mgr/-/_}_pkgs"
|
local req_pkgs_env_name="${pkg_mgr/-/_}_pkgs"
|
||||||
declare -n req_pkgs="${req_pkgs_env_name}"
|
declare -n req_pkgs="${req_pkgs_env_name}"
|
||||||
@@ -131,8 +130,10 @@ check_for_req_pkgs() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo_pass "packages from ${pkg_mgr} installed"
|
echo_pass "packages from ${pkg_mgr} installed"
|
||||||
|
has_cmd pipx || echo_if_fail python3 -m pip install --user pipx || return 1
|
||||||
echo_if_fail pipx install virtualenv || return 1
|
echo_if_fail pipx install virtualenv || return 1
|
||||||
echo_if_fail pipx ensurepath || return 1
|
echo_if_fail pipx ensurepath || return 1
|
||||||
|
has_cmd meson || echo_if_fail pipx install meson || return 1
|
||||||
echo_pass "pipx is installed"
|
echo_pass "pipx is installed"
|
||||||
|
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
@@ -141,7 +142,7 @@ check_for_req_pkgs() {
|
|||||||
if missing_cmd cargo; then
|
if missing_cmd cargo; then
|
||||||
if missing_cmd rustup; then
|
if missing_cmd rustup; then
|
||||||
echo_warn "installing rustup"
|
echo_warn "installing rustup"
|
||||||
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
grep -q 'source "${HOME}/.cargo/env"' "${HOME}/.bashrc" ||
|
grep -q 'source "${HOME}/.cargo/env"' "${HOME}/.bashrc" ||
|
||||||
echo 'source "${HOME}/.cargo/env"' >>"${HOME}/.bashrc"
|
echo 'source "${HOME}/.cargo/env"' >>"${HOME}/.bashrc"
|
||||||
@@ -150,9 +151,6 @@ check_for_req_pkgs() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo_if_fail rustup default stable || return 1
|
|
||||||
echo_if_fail rustup update stable || return 1
|
|
||||||
echo_pass "rustup is installed"
|
|
||||||
echo_if_fail cargo install cargo-c || return 1
|
echo_if_fail cargo install cargo-c || return 1
|
||||||
echo_pass "cargo-c is installed"
|
echo_pass "cargo-c is installed"
|
||||||
echo_pass "all required packages installed"
|
echo_pass "all required packages installed"
|
||||||
|
|||||||
@@ -222,6 +222,10 @@ is_windows() {
|
|||||||
line_contains "$(print_os)" windows
|
line_contains "$(print_os)" windows
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is_android() {
|
||||||
|
line_contains "$(print_os)" android
|
||||||
|
}
|
||||||
|
|
||||||
print_os() {
|
print_os() {
|
||||||
# cached response
|
# cached response
|
||||||
if [[ -n ${FB_OS} ]]; then
|
if [[ -n ${FB_OS} ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user