mirror of
https://github.com/jellyfin/jellyfin-ffmpeg.git
synced 2026-09-02 21:03:08 +03:00
Build libunibreak for libass so that SRT subs wrap correctly
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
ffbuild_macbase() {
|
||||
wget https://github.com/adah1972/libunibreak/releases/download/libunibreak_5_1/libunibreak-5.1.tar.gz -O libunibreadk.tar.gz
|
||||
tar xvf libunibreadk.tar.gz
|
||||
cd libunibreak-5.1
|
||||
./configure --prefix="$FFBUILD_PREFIX" \
|
||||
--disable-shared \
|
||||
--enable-static \
|
||||
--disable-silent-rules
|
||||
make -j$(nproc)
|
||||
make install
|
||||
}
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPT_REPO="https://github.com/adah1972/libunibreak.git"
|
||||
SCRIPT_COMMIT="32dc4fabf20176aeaa63c4880cc53cc123e53261"
|
||||
|
||||
ffbuild_enabled() {
|
||||
return 0
|
||||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libunibreak
|
||||
cd libunibreak
|
||||
|
||||
./bootstrap
|
||||
|
||||
local myconf=(
|
||||
--prefix="$FFBUILD_PREFIX"
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
)
|
||||
|
||||
if [[ $TARGET == win* || $TARGET == linux* ]]; then
|
||||
myconf+=(
|
||||
--host="$FFBUILD_TOOLCHAIN"
|
||||
)
|
||||
elif [[ $TARGET == mac* ]]; then
|
||||
:
|
||||
else
|
||||
echo "Unknown target"
|
||||
return -1
|
||||
fi
|
||||
|
||||
./configure "${myconf[@]}"
|
||||
make -j$(nproc)
|
||||
make install
|
||||
}
|
||||
@@ -17,6 +17,7 @@ ffbuild_dockerbuild() {
|
||||
--prefix="$FFBUILD_PREFIX"
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--enable-libunibreak
|
||||
--with-pic
|
||||
)
|
||||
|
||||
|
||||
+15
-1
@@ -216,6 +216,20 @@ make -j$(nproc)
|
||||
make install
|
||||
popd
|
||||
|
||||
# UNIBREAK
|
||||
git clone --depth=1 https://github.com/adah1972/libunibreak.git
|
||||
pushd libunibreak
|
||||
./bootstrap
|
||||
./configure \
|
||||
--prefix=${FF_DEPS_PREFIX} \
|
||||
--host=${FF_TOOLCHAIN} \
|
||||
--disable-shared \
|
||||
--enable-static \
|
||||
--with-pic
|
||||
make -j$(nproc)
|
||||
make install
|
||||
popd
|
||||
|
||||
# LIBASS
|
||||
git clone -b 0.17.3 --depth=1 https://github.com/libass/libass.git
|
||||
pushd libass
|
||||
@@ -224,7 +238,7 @@ pushd libass
|
||||
--prefix=${FF_DEPS_PREFIX} \
|
||||
--host=${FF_TOOLCHAIN} \
|
||||
--disable-shared \
|
||||
--enable-static \
|
||||
--enable-{static,libunibreak} \
|
||||
--with-pic
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
+17
-1
@@ -150,6 +150,22 @@ prepare_extra_common() {
|
||||
echo "harfbuzz/libharfbuzz.so* usr/lib/jellyfin-ffmpeg/lib" >> ${DPKG_INSTALL_LIST}
|
||||
popd
|
||||
|
||||
# UNIBREAK
|
||||
pushd ${SOURCE_DIR}
|
||||
git clone --depth=1 https://github.com/adah1972/libunibreak.git
|
||||
pushd libunibreak
|
||||
./bootstrap
|
||||
./configure \
|
||||
${CROSS_OPT} \
|
||||
--prefix=${TARGET_DIR} \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
--with-pic
|
||||
make -j$(nproc) && make install && make install DESTDIR=${SOURCE_DIR}/libunibreak
|
||||
echo "libunibreak${TARGET_DIR}/lib/libunibreak.so* usr/lib/jellyfin-ffmpeg/lib" >> ${DPKG_INSTALL_LIST}
|
||||
popd
|
||||
popd
|
||||
|
||||
# LIBASS
|
||||
pushd ${SOURCE_DIR}
|
||||
git clone -b 0.17.3 --depth=1 https://github.com/libass/libass.git
|
||||
@@ -158,8 +174,8 @@ prepare_extra_common() {
|
||||
./configure \
|
||||
${CROSS_OPT} \
|
||||
--prefix=${TARGET_DIR} \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
--enable-{shared,libunibreak} \
|
||||
--with-pic
|
||||
make -j$(nproc) && make install && make install DESTDIR=${SOURCE_DIR}/libass
|
||||
echo "libass${TARGET_DIR}/lib/libass.so* usr/lib/jellyfin-ffmpeg/lib" >> ${DPKG_INSTALL_LIST}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
# Maintainer: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
|
||||
_realname=libunibreak
|
||||
pkgbase=mingw-w64-jellyfin-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}")
|
||||
pkgver=6.1
|
||||
pkgrel=1
|
||||
pkgdesc="An implementation of the line breaking algorithm as described in Unicode 5.2.0 Standard Annex 14, Revision 24 (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
url='https://github.com/adah1972/libunibreak/'
|
||||
license=('spdx:Zlib')
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-autotools"
|
||||
"${MINGW_PACKAGE_PREFIX}-cc")
|
||||
source=("https://github.com/adah1972/libunibreak/archive/libunibreak_${pkgver//./_}/$_realname-$pkgver.tar.gz")
|
||||
sha256sums=('890674996168ef5ba143d80d49ab8b61594a4eb70198dcac76caf6e1bd264a41')
|
||||
|
||||
prepare() {
|
||||
mv "${srcdir}/${_realname}-${_realname}_${pkgver//./_}" "${srcdir}/${_realname}-${pkgver}"
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
./bootstrap
|
||||
}
|
||||
|
||||
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
|
||||
export FF_MINGW_PREFIX="${MINGW_TOOLCHAIN_PREFIX}/ffbuild"
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
|
||||
|
||||
../"${_realname}-${pkgver}"/configure \
|
||||
--prefix="${FF_MINGW_PREFIX}" \
|
||||
--build="${MINGW_CHOST}" \
|
||||
--host="${MINGW_CHOST}" \
|
||||
--target="${MINGW_CHOST}" \
|
||||
--enable-static \
|
||||
--disable-shared
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "${srcdir}/build-${MSYSTEM}"
|
||||
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/build-${MSYSTEM}"
|
||||
|
||||
make install DESTDIR="${pkgdir}"
|
||||
|
||||
install -Dm644 "${srcdir}"/${_realname}-${pkgver}/LICENCE \
|
||||
"${pkgdir}"${MINGW_PREFIX}/share/licenses/${_realname}/LICENCE
|
||||
}
|
||||
@@ -21,6 +21,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-autotools"
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-jellyfin-fribidi"
|
||||
"${MINGW_PACKAGE_PREFIX}-jellyfin-fontconfig"
|
||||
"${MINGW_PACKAGE_PREFIX}-jellyfin-freetype"
|
||||
"${MINGW_PACKAGE_PREFIX}-jellyfin-libunibreak"
|
||||
"${MINGW_PACKAGE_PREFIX}-jellyfin-harfbuzz")
|
||||
source=(https://github.com/libass/${_realname}/releases/download/${pkgver}/${_realname}-${pkgver}.tar.xz)
|
||||
sha256sums=('SKIP')
|
||||
@@ -48,7 +49,7 @@ build() {
|
||||
--disable-shared \
|
||||
--enable-static \
|
||||
--enable-directwrite \
|
||||
--disable-libunibreak \
|
||||
--enable-libunibreak \
|
||||
--with-pic \
|
||||
$( [[ "${CARCH}" != "i686" \
|
||||
&& "${CARCH}" != "x86_64" ]] \
|
||||
|
||||
Reference in New Issue
Block a user