Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1e19e8b
buildscripts: update many libraries
Secozzi Sep 5, 2026
e15a30e
buildscripts: disable unused additional harfbuzz libraries
Secozzi Sep 5, 2026
e2e1476
buildscripts: disable RSA-PSS in mbedtls to work around regression
Secozzi Sep 5, 2026
e1355f6
buildscripts: downgrade mbedtls back to 3.6.5
Secozzi Sep 5, 2026
c6e33e6
buildscripts: refactor where/how certain env variables are set
Secozzi Sep 5, 2026
674992a
buildscripts: update libs
Secozzi Sep 5, 2026
4583346
app: move minimum sdk to 23
Secozzi Sep 5, 2026
093d836
jni: clean up local references in command()
Secozzi Sep 5, 2026
3754588
buildscripts: update dep libraries
Secozzi Sep 5, 2026
ff9adc9
assets: update CA bundle
sfan5 Jul 20, 2026
a3cd3e0
build: upgrade AGP and Gradle
Secozzi Sep 5, 2026
bd0a1e7
buildscripts: add curl
Secozzi Sep 5, 2026
70d75f0
app: target api level 36
Secozzi Sep 5, 2026
13114df
jni: minor fixes
Secozzi Sep 5, 2026
b1981ca
buildscripts: update harfbuzz
Secozzi Sep 5, 2026
f3b5de6
buildscripts: use non-blocking entropy pool for mbedtls
obscenelyvague Aug 18, 2026
ac2b034
assets: update CA bundle
sfan5 Aug 31, 2026
7d30c01
buildscripts: enable asm with libass
Secozzi Sep 5, 2026
586716a
fix build
Secozzi Sep 5, 2026
d498c84
add libcurl support
Secozzi Oct 5, 2026
f0510c7
bump ffmpeg
Secozzi Oct 27, 2026
be3ed10
bump libs
Secozzi Oct 27, 2026
1232a8e
assets: update CA bundle
sfan5 Oct 20, 2026
db3bfd0
Add buildscripts and publishing for animiru
Secozzi Oct 27, 2026
e72a732
Revert buildscript change
Secozzi Oct 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install autoconf pkgconf libtool ninja-build python3-pip gperf
sudo apt-get install autoconf pkgconf libtool ninja-build python3-pip gperf nasm
sudo pip3 install meson

- name: Download deps
Expand Down
46 changes: 22 additions & 24 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: CI
name: Release

permissions:
contents: write

on:
push:
tags:
- '*'

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0

- uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
java-version: '17'
java-version: '21'
distribution: temurin

- name: Export env vars
Expand All @@ -27,7 +27,7 @@ jobs:
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install autoconf pkg-config libtool ninja-build python3-pip gperf
sudo apt-get install autoconf pkg-config libtool ninja-build python3-pip gperf nasm
sudo pip3 install meson

- name: Build the release artifacts
Expand All @@ -42,28 +42,26 @@ jobs:
./buildall.sh
env:
GRADLE_OPTS: -Xmx4G
- name: Get tag name
if: startsWith(github.ref, 'refs/tags/')
run: |
set -x
echo "VERSION_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV

- name: Copy build artifacts
if: startsWith(github.ref, 'refs/tags/')
run: |
set -e
mv lib/build/outputs/aar/lib-release.aar mpv-android-lib-${{ env.VERSION_TAG }}.aar
mv lib/build/outputs/aar/lib-release.aar mpv-android-lib-${{ github.ref_name }}.aar

- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
with:
tag_name: ${{ env.VERSION_TAG }}
name: mpv-android-lib ${{ env.VERSION_TAG }}
tag_name: ${{ github.ref_name }}
name: mpv-android-lib ${{ github.ref_name }}
body: |
library version ${{ env.VERSION_TAG }}
library version ${{ github.ref_name }}
files: |
mpv-android-lib-${{ env.VERSION_TAG }}.aar
mpv-android-lib-${{ github.ref_name }}.aar
draft: true
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish Release
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY_BASE64 }}
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.plugin.compose") version "2.3.10"
id("org.jetbrains.kotlin.plugin.compose") version "2.4.0"
}

android {
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
val kotlinVersion by extra("2.3.0")
val kotlinVersion by extra("2.4.0")
repositories {
mavenCentral()
gradlePluginPortal()
google()
}
dependencies {
classpath("com.android.tools.build:gradle:9.0.1")
classpath("com.android.tools.build:gradle:9.2.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
}
}
Expand Down
7 changes: 4 additions & 3 deletions buildscripts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ RUN apt-get update && apt-get install -y \
clang \
cmake \
ninja-build \
meson \
autoconf \
automake \
libtool-bin \
Expand All @@ -39,8 +38,10 @@ RUN apt-get update && apt-get install -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# required by mbedtls
RUN pip3 install --break-system-packages jsonschema jinja2
# required by mbedtls & fontconfig
RUN pip3 install --break-system-packages jsonschema jinja2 meson

RUN meson --version

RUN mkdir -p /home/mpvbuilder/mpv-android
WORKDIR /home/mpvbuilder/mpv-android
Expand Down
38 changes: 26 additions & 12 deletions buildscripts/buildall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,47 @@ getdeps () {
echo ${!varname}
}

loadndk () {
unset ANDROID_NDK_ROOT

local ndk="$PWD/sdk/android-ndk-${v_ndk}"
local toolchain=$(echo "$ndk/toolchains/llvm/prebuilt/"*)
if [ ! -d "$toolchain" ]; then
echo "Can't find toolchain inside NDK" >&2
return 1
fi
export PATH="$toolchain/bin:$ndk:$PWD/sdk/bin:$PATH"
}

loadarch () {
unset CC CXX CPATH LIBRARY_PATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
unset PKG_CONFIG_PATH

local apilvl=21
# ndk_triple: what the toolchain actually is
# cc_triple: what Google pretends the toolchain is
local apilvl=23
# ndk_triple: the target triple
local cc_triple # how the compilers are actually prefixed
if [ "$1" == "armv7l" ]; then
export ndk_suffix=
export ndk_triple=arm-linux-androideabi
cc_triple=armv7a-linux-androideabi$apilvl
prefix_name=armv7l
elif [ "$1" == "arm64" ]; then
export ndk_suffix=-arm64
export ndk_triple=aarch64-linux-android
cc_triple=$ndk_triple$apilvl
prefix_name=arm64
elif [ "$1" == "x86" ]; then
export ndk_suffix=-x86
export ndk_triple=i686-linux-android
cc_triple=$ndk_triple$apilvl
prefix_name=x86
elif [ "$1" == "x86_64" ]; then
export ndk_suffix=-x64
export ndk_triple=x86_64-linux-android
cc_triple=$ndk_triple$apilvl
prefix_name=x86_64
else
echo "Invalid architecture" >&2
exit 1
fi
export ndk_suffix=_$prefix_name
export prefix_dir="$PWD/prefix/$prefix_name"
if [ $clang -eq 1 ]; then
export CC=$cc_triple-clang
Expand All @@ -56,6 +66,14 @@ loadarch () {
export LDFLAGS="-Wl,-O1,--icf=safe -Wl,-z,max-page-size=16384"
export AR=llvm-ar
export RANLIB=llvm-ranlib

# set up correct paths for pkg-config
if ! command -v pkg-config >/dev/null; then
echo "pkg-config is missing!" >&2
return 1
fi
export PKG_CONFIG_SYSROOT_DIR="$prefix_dir"
export PKG_CONFIG_LIBDIR="$PKG_CONFIG_SYSROOT_DIR/lib/pkgconfig"
}

setup_prefix () {
Expand All @@ -69,11 +87,6 @@ setup_prefix () {
local cpu_family=${ndk_triple%%-*}
[ "$cpu_family" == "i686" ] && cpu_family=x86

if ! command -v pkg-config >/dev/null; then
echo "pkg-config not provided!"
return 1
fi

# meson wants to be spoonfed this file, so create it ahead of time
# also define: release build, static libs and no source downloads at runtime(!!!)
cat >"$prefix_dir/crossfile.tmp" <<CROSSFILE
Expand Down Expand Up @@ -170,6 +183,7 @@ while [ $# -gt 0 ]; do
shift
done

loadndk
loadarch $arch
setup_prefix
build $target
Expand Down
3 changes: 2 additions & 1 deletion buildscripts/include/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ fi
msg "Building mpv"
./buildall.sh -n mpv || {
# show logfile if configure failed
[ ! -f deps/mpv/_build/config.h ] && cat deps/mpv/_build/meson-logs/meson-log.txt
[ ! -f deps/mpv/_build_armv7l/config.h ] && \
cat deps/mpv/_build_armv7l/meson-logs/meson-log.txt
exit 1
}

Expand Down
34 changes: 19 additions & 15 deletions buildscripts/include/depinfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@
# Make sure to keep v_ndk and v_ndk_n in sync, both are listed on the NDK download page

v_sdk=11076708_latest
v_ndk=r27c
v_ndk_n=27.2.12479018
v_sdk_platform=35
v_sdk_build_tools=35.0.0
v_ndk=r27d
v_ndk_n=27.3.13750724
v_sdk_platform=36
v_sdk_build_tools=36.0.0

v_lua=5.2.4
v_unibreak=6.1
v_harfbuzz=13.0.1
v_fribidi=1.0.16
v_freetype=2.14.2
v_mbedtls=3.6.5
v_ffmpeg=n7.1
v_libxml2=2.15.2
v_fontconfig=2.17.1
v_unibreak=8.0
v_harfbuzz=14.6.0
v_fribidi=1.0.17
v_freetype=2.15.0
v_nghttp2=1.70.0
v_mbedtls=3.6.7
v_ffmpeg=n9.0.2
v_libxml2=2.15.4
v_fontconfig=2.18.3
v_curl=8.23.0


## Dependency tree
Expand All @@ -35,14 +37,16 @@ dep_unibreak=()
dep_libass=(freetype2 fontconfig fribidi harfbuzz unibreak)
dep_lua=()
dep_libplacebo=()
dep_mpv=(ffmpeg libass lua libplacebo)
dep_nghttp2=()
dep_curl=(mbedtls nghttp2)
dep_mpv=(ffmpeg libass lua libplacebo curl)
dep_mpv_android=(mpv)


## for CI workflow

# pinned ffmpeg revision
v_ci_ffmpeg=n8.0
v_ci_ffmpeg=n9.0.2

# filename used to uniquely identify a build prefix
ci_tarball="prefix-ndk-${v_ndk}-lua-${v_lua}-unibreak-${v_unibreak}-harfbuzz-${v_harfbuzz}-fribidi-${v_fribidi}-freetype-${v_freetype}-libxml2-${v_libxml2}-fontconfig-${v_fontconfig}-mbedtls-${v_mbedtls}-ffmpeg-${v_ci_ffmpeg}.tgz"
ci_tarball="prefix-n${v_ndk}-l${v_lua}-u${v_unibreak}-h${v_harfbuzz}-fr${v_fribidi}-ft${v_freetype}-x${v_libxml2}-fo${v_fontconfig}-m${v_mbedtls}-c${v_curl}-ff${v_ci_ffmpeg}.tgz"
21 changes: 18 additions & 3 deletions buildscripts/include/download-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ fi
# ffmpeg
if [ ! -d ffmpeg ]; then
git clone --branch $v_ffmpeg --depth 1 https://github.com/FFmpeg/FFmpeg ffmpeg
cd ffmpeg
git apply ../../patches/ffmpeg_force_mpegts.patch
cd ..
#cd ffmpeg
#git apply ../../patches/ffmpeg_force_mpegts.patch
#cd ..
fi

# freetype2
Expand Down Expand Up @@ -76,6 +76,21 @@ fi
# libplacebo
[ ! -d libplacebo ] && git clone --depth 1 --recursive https://github.com/haasn/libplacebo


# nghttp2 (HTTP/2 support for curl)
if [ ! -d nghttp2 ]; then
mkdir nghttp2
$WGET https://github.com/nghttp2/nghttp2/releases/download/v$v_nghttp2/nghttp2-$v_nghttp2.tar.xz -O - | \
tar -xJ -C nghttp2 --strip-components=1
fi

# curl
if [ ! -d curl ]; then
mkdir curl
$WGET https://curl.se/download/curl-$v_curl.tar.gz -O - | \
tar -xz -C curl --strip-components=1
fi

# mpv
[ ! -d mpv ] && git clone --depth 1 https://github.com/mpv-player/mpv

Expand Down
6 changes: 3 additions & 3 deletions buildscripts/include/download-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ if [ "$os" == "linux" ]; then
if [ $IN_CI -eq 0 ]; then
if hash yum &>/dev/null; then
sudo yum install autoconf pkgconfig libtool ninja-build \
unzip wget meson nasm gperf
unzip wget nasm gperf
elif apt-get -v &>/dev/null; then
sudo apt-get install autoconf pkg-config libtool ninja-build \
unzip wget meson nasm gperf
unzip wget nasm gperf
else
echo "Note: dependencies were not installed, you have to do that manually."
fi
Expand All @@ -38,7 +38,7 @@ elif [ "$os" == "mac" ]; then
fi
brew install \
automake autoconf libtool pkg-config \
coreutils gnu-sed wget meson ninja gperf
coreutils gnu-sed wget meson ninja gperf nasm
fi
if ! javac -version &>/dev/null; then
echo "Error: missing Java Development Kit. Install it manually."
Expand Down
17 changes: 3 additions & 14 deletions buildscripts/include/path.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"

. "$DIR/include/depinfo.sh"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"

os=linux
[[ "$OSTYPE" == "darwin"* ]] && os=mac
Expand All @@ -18,15 +16,6 @@ else
fi
cores=${cores:-4}

# configure pkg-config paths if inside buildscripts
if [ -n "$ndk_triple" ]; then
export PKG_CONFIG_SYSROOT_DIR="$prefix_dir"
export PKG_CONFIG_LIBDIR="$PKG_CONFIG_SYSROOT_DIR/usr/local/lib/pkgconfig"
unset PKG_CONFIG_PATH
fi

toolchain=$(echo "$DIR/sdk/android-ndk-${v_ndk}/toolchains/llvm/prebuilt/"*)
[ -d "$toolchain" ] && \
export PATH="$toolchain/bin:$DIR/sdk/android-ndk-${v_ndk}:$DIR/sdk/bin:$PATH"
unset ANDROID_SDK_ROOT
export ANDROID_HOME="$DIR/sdk/android-sdk-$os"
unset ANDROID_SDK_ROOT ANDROID_NDK_ROOT
# for all other NDK/compiler-related variables see buildall.sh
Loading
Loading