Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: build

on:
- push
- pull_request

jobs:
Expand Down Expand Up @@ -34,7 +33,7 @@ jobs:
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install autoconf pkgconf libtool ninja-build python3-pip
sudo apt-get install autoconf pkgconf libtool ninja-build python3-pip gperf
sudo pip3 install meson

- name: Download deps
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
sudo apt-get install autoconf pkg-config libtool ninja-build python3-pip gperf
sudo pip3 install meson

- name: Build the release artifacts
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:24.04
FROM ubuntu:26.04

# Set up environment variables
ENV DEBIAN_FRONTEND=noninteractive
Expand Down
10 changes: 6 additions & 4 deletions buildscripts/include/depinfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,24 @@ v_harfbuzz=13.0.1
v_fribidi=1.0.16
v_freetype=2.14.2
v_mbedtls=3.6.5
v_libxml2=2.13.5
v_ffmpeg=n7.1
v_libxml2=2.15.2
v_fontconfig=2.17.1


## Dependency tree
# I would've used a dict but putting arrays in a dict is not a thing

dep_mbedtls=()
dep_libxml2=()
dep_dav1d=()
dep_libxml2=()
dep_ffmpeg=(mbedtls dav1d libxml2)
dep_freetype2=()
dep_fontconfig=(libxml2 freetype2)
dep_fribidi=()
dep_harfbuzz=()
dep_unibreak=()
dep_libass=(freetype2 fribidi harfbuzz unibreak)
dep_libass=(freetype2 fontconfig fribidi harfbuzz unibreak)
dep_lua=()
dep_libplacebo=()
dep_mpv=(ffmpeg libass lua libplacebo)
Expand All @@ -43,4 +45,4 @@ dep_mpv_android=(mpv)
v_ci_ffmpeg=n8.0

# 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}-mbedtls-${v_mbedtls}-ffmpeg-${v_ci_ffmpeg}.tgz"
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"
21 changes: 14 additions & 7 deletions buildscripts/include/download-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ if [ ! -d mbedtls ]; then
tar -xj -C mbedtls --strip-components=1
fi

# libxml2
if [ ! -d libxml2 ]; then
mkdir libxml2
$WGET https://gitlab.gnome.org/GNOME/libxml2/-/archive/v$v_libxml2/libxml2-v$v_libxml2.tar.gz -O - | \
tar -xz -C libxml2 --strip-components=1
fi

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

Expand Down Expand Up @@ -56,6 +49,20 @@ if [ ! -d unibreak ]; then
tar -xz -C unibreak --strip-components=1
fi

# libxml2
if [ ! -d libxml2 ]; then
mkdir libxml2
$WGET https://gitlab.gnome.org/GNOME/libxml2/-/archive/v${v_libxml2}/libxml2-v${v_libxml2}.tar.gz -O - | \
tar -xz -C libxml2 --strip-components=1
fi

# fontconfig
if [ ! -d fontconfig ]; then
mkdir fontconfig
$WGET https://gitlab.freedesktop.org/fontconfig/fontconfig/-/archive/${v_fontconfig}/fontconfig-${v_fontconfig}.tar.gz -O - | \
tar -xz -C fontconfig --strip-components=1
fi

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

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
unzip wget meson nasm gperf
elif apt-get -v &>/dev/null; then
sudo apt-get install autoconf pkg-config libtool ninja-build \
unzip wget meson nasm
unzip wget meson 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
coreutils gnu-sed wget meson ninja gperf
fi
if ! javac -version &>/dev/null; then
echo "Error: missing Java Development Kit. Install it manually."
Expand Down
23 changes: 23 additions & 0 deletions buildscripts/scripts/fontconfig.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash -e

. ../../include/path.sh

build=_build$ndk_suffix

if [ "$1" == "build" ]; then
true
elif [ "$1" == "clean" ]; then
rm -rf $build
exit 0
else
exit 255
fi

unset CC CXX # meson wants these unset

meson setup $build --cross-file "$prefix_dir"/crossfile.txt \
-D{tests,doc,tools,nls}=disabled \
-Dxml-backend=libxml2

ninja -C $build -j$cores
DESTDIR="$prefix_dir" ninja -C $build install
2 changes: 1 addition & 1 deletion buildscripts/scripts/libass.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cd _build$ndk_suffix
../configure \
--host=$ndk_triple --with-pic \
--enable-static --disable-shared \
--enable-libunibreak --disable-require-system-font-provider
--enable-libunibreak --enable-fontconfig

make -j$cores
make DESTDIR="$prefix_dir" install
18 changes: 9 additions & 9 deletions buildscripts/scripts/libxml2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

. ../../include/path.sh

[ -f configure ] || ./autogen.sh --host=$ndk_triple --without-python
build=_build$ndk_suffix

if [ "$1" == "build" ]; then
true
elif [ "$1" == "clean" ]; then
make clean
rm -rf $build
exit 0
else
exit 255
fi

$0 clean # separate building not supported, always clean
unset CC CXX # meson wants these unset

./configure \
--host=$ndk_triple \
--without-python \
--without-iconv
make -j$cores
make DESTDIR="$prefix_dir" install
meson setup $build --cross-file "$prefix_dir"/crossfile.txt \
-Dminimum=true -D{push,reader,sax1,iso8859x,pattern}=enabled \
--default-library=shared

ninja -C $build -j$cores
DESTDIR="$prefix_dir" ninja -C $build install
2 changes: 1 addition & 1 deletion lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
val abiCodes = mapOf("armeabi-v7a" to 1, "arm64-v8a" to 2, "x86" to 3, "x86_64" to 4)
val universalBase = 8000

version = "0.1.13"
version = "0.1.14"
group = "io.github.secozzi"

android {
Expand Down
Binary file removed lib/src/main/assets/subfont.ttf
Binary file not shown.
5 changes: 4 additions & 1 deletion lib/src/main/java/is/xyz/mpv/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,15 @@ object Utils {

fun copyAssets(context: Context) {
val assetManager = context.assets
val files = arrayOf("subfont.ttf", "cacert.pem")
val files = arrayOf("cacert.pem")
val configDir = context.filesDir.path

for (name in files) {
copyAssetFile(assetManager, name, File("$configDir/$name"))
}

// we used to ship this, but it's no longer needed
File("$configDir/subfont.ttf").delete()
}

fun findRealPath(fd: Int): String? {
Expand Down
Loading