From 48589b721dc7c812bb01d20941c96a11b2624864 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 25 Apr 2022 20:31:49 +0400 Subject: [PATCH] Update openal to 1.22.0 --- Telegram/build/docker/centos_env/Dockerfile | 30 ++++++++++++++++----- Telegram/build/prepare/prepare.py | 18 +++++++------ snap/snapcraft.yaml | 10 ++++--- 3 files changed, 39 insertions(+), 19 deletions(-) diff --git a/Telegram/build/docker/centos_env/Dockerfile b/Telegram/build/docker/centos_env/Dockerfile index 4cee96322..1e423a2e8 100644 --- a/Telegram/build/docker/centos_env/Dockerfile +++ b/Telegram/build/docker/centos_env/Dockerfile @@ -419,17 +419,35 @@ RUN git init ffmpeg \ && cd .. \ && rm -rf ffmpeg +FROM builder AS pipewire +RUN git clone -b 0.3.42 --depth=1 $GIT/PipeWire/pipewire.git \ + && cd pipewire \ + && meson build \ + --buildtype=release \ + -Dtests=disabled \ + -Dexamples=disabled \ + -Dpipewire-v4l2=disabled \ + -Dspa-plugins=disabled \ + -Dsession-managers=[] \ + && meson compile -C build \ + && DESTDIR="$LibrariesPath/pipewire-cache" meson install -C build \ + && cd .. \ + && rm -rf pipewire + FROM builder AS openal -ADD https://api.github.com/repos/telegramdesktop/openal-soft/git/refs/heads/fix_pulse_default openal-soft-version.json -RUN git clone -b fix_pulse_default --depth=1 $GIT/telegramdesktop/openal-soft.git \ +COPY --from=pipewire ${LibrariesPath}/pipewire-cache / + +RUN git clone -b 1.22.0 --depth=1 $GIT/kcat/openal-soft.git \ && cd openal-soft \ + && curl -sSL https://github.com/kcat/openal-soft/commit/2ea5bb91686ee1a7350672bf15b7b63649dbf111.patch \ + | git apply \ && CFLAGS="$HFLAGS" CXXFLAGS="$HFLAGS" cmake -GNinja -B build . \ -DCMAKE_BUILD_TYPE=Release \ -DLIBTYPE:STRING=STATIC \ -DALSOFT_EXAMPLES=OFF \ -DALSOFT_TESTS=OFF \ -DALSOFT_UTILS=OFF \ - -DALSOFT_CONFIG=OFF \ + -DALSOFT_INSTALL_CONFIG=OFF \ && cmake --build build --parallel \ && DESTDIR="$LibrariesPath/openal-cache" cmake --install build \ && cd .. \ @@ -580,18 +598,16 @@ COPY --from=libvpx ${LibrariesPath}/libvpx-cache / COPY --from=ffmpeg ${LibrariesPath}/ffmpeg-cache / COPY --from=openssl ${LibrariesPath}/openssl-cache / COPY --from=libXtst ${LibrariesPath}/libXtst-cache / +COPY --from=pipewire ${LibrariesPath}/pipewire-cache / # Shallow clone on a specific commit. RUN git init tg_owt \ && cd tg_owt \ && git remote add origin $GIT/desktop-app/tg_owt.git \ - && git fetch --depth=1 origin 63a934db1ed212ebf8aaaa20f0010dd7b0d7b396 \ + && git fetch --depth=1 origin c1aea3d142e0c1dbab80511d555a828f47dcbd8b \ && git reset --hard FETCH_HEAD \ && git submodule update --init --recursive --depth=1 \ && rm -rf .git \ - && cd src/third_party/pipewire \ - && meson build -Dspa-plugins=disabled \ - && cd ../../.. \ && cmake -G"Ninja Multi-Config" -B out . \ -DCMAKE_C_FLAGS_RELEASE="-O3 -DNDEBUG $HFLAGS" \ -DCMAKE_C_FLAGS_DEBUG="-g $HFLAGS_DEBUG" \ diff --git a/Telegram/build/prepare/prepare.py b/Telegram/build/prepare/prepare.py index 26dd9418b..eadc93869 100644 --- a/Telegram/build/prepare/prepare.py +++ b/Telegram/build/prepare/prepare.py @@ -959,26 +959,28 @@ depends:yasm/yasm stage('openal-soft', """ version: 2 +win: git clone -b wasapi_exact_device_time https://github.com/telegramdesktop/openal-soft.git cd openal-soft - cd build -win: - cmake .. ^ + cmake -B build . ^ -A %WIN32X64% ^ -D LIBTYPE:STRING=STATIC ^ -D FORCE_STATIC_VCRT=ON - msbuild OpenAL.vcxproj /property:Configuration=Debug /property:Platform="%WIN32X64%" + cmake --build build --config Debug --parallel release: - msbuild OpenAL.vcxproj /property:Configuration=RelWithDebInfo /property:Platform="%WIN32X64%" + cmake --build build --config RelWithDebInfo --parallel mac: - CFLAGS=$UNGUARDED CPPFLAGS=$UNGUARDED cmake .. \\ + git clone -b 1.22.0 https://github.com/kcat/openal-soft.git + cd openal-soft + CFLAGS=$UNGUARDED CPPFLAGS=$UNGUARDED cmake -B build . \\ -D CMAKE_INSTALL_PREFIX:PATH=$USED_PREFIX \\ -D ALSOFT_EXAMPLES=OFF \\ + -D ALSOFT_UTILS=OFF \\ -D LIBTYPE:STRING=STATIC \\ -D CMAKE_OSX_DEPLOYMENT_TARGET:STRING=$MACOSX_DEPLOYMENT_TARGET \\ -D CMAKE_OSX_ARCHITECTURES="x86_64;arm64" - make $MAKE_THREADS_CNT - make install + cmake --build build $MAKE_THREADS_CNT + cmake --install build """) if 'build-stackwalk' in options: diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index ca2da4290..00877e906 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -238,16 +238,18 @@ parts: - -./usr/share openal: - source: https://github.com/telegramdesktop/openal-soft.git + source: https://github.com/kcat/openal-soft.git source-depth: 1 - source-branch: fix_pulse_default + source-tag: 1.22.0 plugin: cmake build-packages: - ninja-build - libasound2-dev + - libdbus-1-dev - libpulse-dev stage-packages: - libasound2 + - libdbus-1-3 - libpulse0 cmake-parameters: - -GNinja @@ -256,7 +258,7 @@ parts: - -DALSOFT_EXAMPLES=OFF - -DALSOFT_TESTS=OFF - -DALSOFT_UTILS=OFF - - -DALSOFT_CONFIG=OFF + - -DALSOFT_INSTALL_CONFIG=OFF prime: - -./usr/include - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/cmake @@ -432,7 +434,7 @@ parts: webrtc: source: https://github.com/desktop-app/tg_owt.git source-depth: 1 - source-commit: 63a934db1ed212ebf8aaaa20f0010dd7b0d7b396 + source-commit: c1aea3d142e0c1dbab80511d555a828f47dcbd8b plugin: cmake build-packages: - ninja-build