Update build scripts and dependencies

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
nyanmisaka 2024-08-03 19:19:58 +08:00
parent 69a9c336cf
commit 608fc13cee
14 changed files with 61 additions and 36 deletions

View File

@ -13,7 +13,7 @@ ENV LLVM_VER=LLVM_RELEASE_VERSION
ENV SOURCE_DIR=/ffmpeg
ENV ARTIFACT_DIR=/dist
ENV TARGET_DIR=/usr/lib/jellyfin-ffmpeg
ENV DPKG_INSTALL_LIST=${SOURCE_DIR}/debian/jellyfin-ffmpeg6.install
ENV DPKG_INSTALL_LIST=${SOURCE_DIR}/debian/jellyfin-ffmpeg7.install
ENV PATH=${TARGET_DIR}/bin:${PATH}
ENV PKG_CONFIG_PATH=${TARGET_DIR}/lib/pkgconfig:${PKG_CONFIG_PATH}
ENV LD_LIBRARY_PATH=${TARGET_DIR}/lib:${TARGET_DIR}/lib/mfx:${TARGET_DIR}/lib/xorg:${LD_LIBRARY_PATH}

View File

@ -3,6 +3,7 @@ FROM $GH_REPO/base:latest
RUN --mount=src=ct-ng-config,dst=/.config \
git clone --filter=blob:none https://github.com/crosstool-ng/crosstool-ng.git /ct-ng && cd /ct-ng && \
curl "https://github.com/gcc-mirror/gcc/commit/747c4b58573ea00419f64293a61537eb69f43307.patch" > packages/gcc/14.1.0/9999-fix-inline.patch && \
./bootstrap && \
./configure --enable-local && \
make -j$(nproc) && \

View File

@ -41,9 +41,15 @@ ffbuild_dockerbuild() {
return -1
fi
export LIBS="-lpthread"
meson "${myconf[@]}" ..
ninja -j$(nproc)
ninja install
}
ffbuild_configure() {
echo --enable-libharfbuzz
}
ffbuild_unconfigure() {
echo --disable-libharfbuzz
}

View File

@ -15,9 +15,9 @@ ffbuild_dockerbuild() {
}
ffbuild_configure() {
[[ $TARGET == win* ]] && echo --enable-dxva2 --enable-d3d11va
[[ $TARGET == win* ]] && echo --enable-dxva2 --enable-d3d11va --enable-d3d12va
}
ffbuild_unconfigure() {
[[ $TARGET == win* ]] && echo --disable-dxva2 --disable-d3d11va
[[ $TARGET == win* ]] && echo --disable-dxva2 --disable-d3d11va --disable-d3d12va
}

View File

@ -11,6 +11,12 @@ ffbuild_dockerbuild() {
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libbluray
cd libbluray
if [[ $TARGET == mac* ]]; then
gsed -i 's/dec_init/libbluray_dec_init/g' src/libbluray/disc/*.c src/libbluray/disc/*.h
else
sed -i 's/dec_init/libbluray_dec_init/g' src/libbluray/disc/*.c src/libbluray/disc/*.h
fi
./bootstrap
local myconf=(

View File

@ -1,8 +1,10 @@
FF_CONFIGURE="--enable-gpl --enable-version3 --enable-lto --disable-ffplay --disable-debug --disable-doc --disable-ptx-compression --disable-sdl2"
FF_CONFIGURE="--enable-gpl --enable-version3 --disable-ffplay --disable-debug --disable-doc --disable-ptx-compression --disable-sdl2"
FF_CFLAGS=""
FF_CXXFLAGS=""
FF_LDFLAGS=""
GIT_BRANCH="jellyfin"
LICENSE_FILE="COPYING.GPLv3"
[[ $TARGET == linux* ]] && FF_CONFIGURE+=" --disable-libxcb --disable-xlib" || true
[[ $TARGET == linux* ]] && FF_CONFIGURE+=" --disable-libxcb --disable-xlib --enable-lto=auto" || true
[[ $TARGET == win* ]] && FF_CONFIGURE+=" --enable-lto=auto" || true
[[ $TARGET == mac* ]] && FF_CONFIGURE+=" --enable-lto=thin" || true

0
builder/variants/defaults-mac.sh Normal file → Executable file
View File

13
debian/rules vendored
View File

@ -4,7 +4,11 @@ export V=1
ORIG_VERSION := $(shell dpkg-parsechangelog -S version)
VERSION_SUFFIX := $(shell lsb_release -c -s)
PACKAGEVERSION := "$(ORIG_VERSION)-$(VERSION_SUFFIX)"
PACKAGE_VERSION := "$(ORIG_VERSION)-$(VERSION_SUFFIX)"
FLTO_OPTIONS := auto
ifeq ($(VERSION_SUFFIX),focal)
FLTO_OPTIONS := $(shell nproc)
endif
CONFIG := --prefix=${TARGET_DIR} \
--target-os=linux \
@ -16,7 +20,7 @@ CONFIG := --prefix=${TARGET_DIR} \
--disable-libxcb \
--disable-sdl2 \
--disable-xlib \
--enable-lto \
--enable-lto=${FLTO_OPTIONS} \
--enable-gpl \
--enable-version3 \
--enable-shared \
@ -30,6 +34,7 @@ CONFIG := --prefix=${TARGET_DIR} \
--enable-libfreetype \
--enable-libfribidi \
--enable-libfontconfig \
--enable-libharfbuzz \
--enable-libbluray \
--enable-libmp3lame \
--enable-libopus \
@ -47,8 +52,6 @@ CONFIG := --prefix=${TARGET_DIR} \
--enable-libfdk-aac \
CONFIG_x86 := --arch=amd64 \
--enable-libshaderc \
--enable-libplacebo \
--enable-vulkan \
--enable-vaapi \
--enable-amf \
@ -92,7 +95,7 @@ endif
dh $@
override_dh_gencontrol:
dh_gencontrol -- -v$(PACKAGEVERSION)
dh_gencontrol -- -v$(PACKAGE_VERSION)
override_dh_auto_configure:
./configure $(CONFIG)

View File

@ -230,8 +230,9 @@ make install
popd
# LIBBLURAY
git clone --depth=1 https://code.videolan.org/videolan/libbluray.git
git clone -b 1.3.4 --depth=1 https://code.videolan.org/videolan/libbluray.git
pushd libbluray
sed -i 's/dec_init/libbluray_dec_init/g' src/libbluray/disc/*.{c,h}
./bootstrap
./configure \
--prefix=${FF_DEPS_PREFIX} \
@ -592,7 +593,7 @@ fi
--disable-w32threads \
--enable-pthreads \
--enable-shared \
--enable-lto \
--enable-lto=auto \
--enable-gpl \
--enable-version3 \
--enable-schannel \
@ -605,6 +606,7 @@ fi
--enable-libfreetype \
--enable-libfribidi \
--enable-libfontconfig \
--enable-libharfbuzz \
--enable-libass \
--enable-libbluray \
--enable-libmp3lame \
@ -623,6 +625,7 @@ fi
--enable-opencl \
--enable-dxva2 \
--enable-d3d11va \
--enable-d3d12va \
--enable-amf \
--enable-libvpl \
--enable-ffnvcodec \

View File

@ -599,25 +599,25 @@ prepare_extra_amd64() {
fi
# LIBPLACEBO
pushd ${SOURCE_DIR}
git clone -b v6.338.2 --recursive --depth=1 https://github.com/haasn/libplacebo.git
sed -i 's|env: python_env,||g' libplacebo/src/vulkan/meson.build
meson setup libplacebo placebo_build \
--prefix=${TARGET_DIR} \
--libdir=lib \
--buildtype=release \
--default-library=shared \
-Dvulkan=enabled \
-Dvk-proc-addr=enabled \
-Dvulkan-registry=${TARGET_DIR}/share/vulkan/registry/vk.xml \
-Dshaderc=enabled \
-Dglslang=disabled \
-D{demos,tests,bench,fuzz}=false
meson configure placebo_build
ninja -j$(nproc) -C placebo_build install
cp -a ${TARGET_DIR}/lib/libplacebo.so* ${SOURCE_DIR}/libplacebo
echo "libplacebo/libplacebo* usr/lib/jellyfin-ffmpeg/lib" >> ${DPKG_INSTALL_LIST}
popd
# pushd ${SOURCE_DIR}
# git clone -b v6.338.2 --recursive --depth=1 https://github.com/haasn/libplacebo.git
# sed -i 's|env: python_env,||g' libplacebo/src/vulkan/meson.build
# meson setup libplacebo placebo_build \
# --prefix=${TARGET_DIR} \
# --libdir=lib \
# --buildtype=release \
# --default-library=shared \
# -Dvulkan=enabled \
# -Dvk-proc-addr=enabled \
# -Dvulkan-registry=${TARGET_DIR}/share/vulkan/registry/vk.xml \
# -Dshaderc=enabled \
# -Dglslang=disabled \
# -D{demos,tests,bench,fuzz}=false
# meson configure placebo_build
# ninja -j$(nproc) -C placebo_build install
# cp -a ${TARGET_DIR}/lib/libplacebo.so* ${SOURCE_DIR}/libplacebo
# echo "libplacebo/libplacebo* usr/lib/jellyfin-ffmpeg/lib" >> ${DPKG_INSTALL_LIST}
# popd
}
# Prepare extra headers, libs and drivers for {arm,aarch64}-linux-gnu*
@ -783,5 +783,5 @@ popd
# Move the artifacts out
mkdir -p ${ARTIFACT_DIR}/deb
mv /jellyfin-ffmpeg{,6}_* ${ARTIFACT_DIR}/deb/
mv /jellyfin-ffmpeg{,7}_* ${ARTIFACT_DIR}/deb/
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}

View File

@ -67,6 +67,7 @@ build() {
-Dgobject=disabled \
-Dicu=disabled \
-Dcpp_std=c++17 \
-Dfreetype=enabled \
-Dgdi=disabled \
-Dgraphite=disabled \
-Ddirectwrite=disabled \

View File

@ -26,6 +26,7 @@ export FF_MINGW_PREFIX="${MINGW_TOOLCHAIN_PREFIX}/ffbuild"
prepare() {
cd ${srcdir}/${_realname}-${pkgver}
sed -i 's/dec_init/libbluray_dec_init/g' src/libbluray/disc/*.c src/libbluray/disc/*.h
}
build() {

View File

@ -3,7 +3,7 @@
_realname=libvpl
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}")
pkgver=2.11.0
pkgver=2.12.0
pkgrel=1
pkgdesc="Intel Video Processing Library (mingw-w64)"
arch=('any')

View File

@ -42,7 +42,7 @@ PKG_CONFIG_PATH=/clang64/ffbuild/lib/pkgconfig ./configure --cc=clang \
--disable-doc \
--disable-sdl2 \
--disable-ptx-compression \
--enable-lto \
--enable-lto=thin \
--enable-gpl \
--enable-version3 \
--enable-schannel \
@ -55,6 +55,7 @@ PKG_CONFIG_PATH=/clang64/ffbuild/lib/pkgconfig ./configure --cc=clang \
--enable-libfreetype \
--enable-libfribidi \
--enable-libfontconfig \
--enable-libharfbuzz \
--enable-libass \
--enable-libbluray \
--enable-libmp3lame \
@ -73,6 +74,7 @@ PKG_CONFIG_PATH=/clang64/ffbuild/lib/pkgconfig ./configure --cc=clang \
--enable-opencl \
--enable-dxva2 \
--enable-d3d11va \
--enable-d3d12va \
--enable-amf \
--enable-libvpl \
--enable-ffnvcodec \