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
6 changes: 6 additions & 0 deletions app/src/main/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ LOCAL_SRC_FILES := $(PREFIX)/lib/$(LOCAL_MODULE).so
LOCAL_EXPORT_C_INCLUDES := $(PREFIX)/include
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := libxml2
LOCAL_SRC_FILES := $(PREFIX)/lib/$(LOCAL_MODULE).so
LOCAL_EXPORT_C_INCLUDES := $(PREFIX)/include
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := libmpv
LOCAL_SRC_FILES := $(PREFIX)/lib/libmpv.so
Expand Down
4 changes: 3 additions & 1 deletion buildscripts/include/depinfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ v_harfbuzz=12.2.0
v_fribidi=1.0.16
v_freetype=2.14.1
v_mbedtls=3.6.5
v_libxml2=2.13.5


## 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_ffmpeg=(mbedtls dav1d)
dep_ffmpeg=(mbedtls dav1d libxml2)
dep_freetype2=()
dep_fribidi=()
dep_harfbuzz=()
Expand Down
7 changes: 7 additions & 0 deletions buildscripts/include/download-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ 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 https://github.com/videolan/dav1d

Expand Down
7 changes: 2 additions & 5 deletions buildscripts/scripts/ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,16 @@ args=(
--arch=${ndk_triple%%-*} --cpu=$cpu
--extra-cflags="-I$prefix_dir/include $cpuflags" --extra-ldflags="-L$prefix_dir/lib"

--enable-{jni,mediacodec,mbedtls,libdav1d} --disable-vulkan
--enable-{jni,mediacodec,mbedtls,libdav1d,libxml2} --disable-vulkan
--disable-static --enable-shared --enable-{gpl,version3}

# disable unneeded parts
--disable-{stripping,doc,programs}
# to keep the build lean we disable some feature quite aggressively:
# - muxers, encoders: mpv-android does not have any way to use these
# - devices: no practical use on Android
--disable-{muxers,encoders,devices}
--disable-{encoders,devices}
# useful to taking screenshots
--enable-encoder=mjpeg,png
# useful for the `dump-cache` command
--enable-muxer=mov,matroska,mpegts
)
../configure "${args[@]}"

Expand Down
23 changes: 23 additions & 0 deletions buildscripts/scripts/libxml2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash -e

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

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

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

$0 clean # separate building not supported, always clean

./configure \
--host=$ndk_triple \
--without-python \
--without-iconv
make -j$cores
make DESTDIR="$prefix_dir" install