forked from pool/telegram-desktop
Accepting request 985388 from server:messaging
OBS-URL: https://build.opensuse.org/request/show/985388 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/telegram-desktop?expand=0&rev=79
This commit is contained in:
commit
60b81e9492
11
0001-use-bundled-webrtc.patch
Normal file
11
0001-use-bundled-webrtc.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/cmake/external/webrtc/CMakeLists.txt
|
||||
+++ b/cmake/external/webrtc/CMakeLists.txt
|
||||
@@ -7,7 +7,7 @@
|
||||
add_library(external_webrtc INTERFACE IMPORTED GLOBAL)
|
||||
add_library(desktop-app::external_webrtc ALIAS external_webrtc)
|
||||
|
||||
-if (DESKTOP_APP_USE_PACKAGED)
|
||||
+if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||
find_package(tg_owt REQUIRED)
|
||||
target_link_libraries(external_webrtc INTERFACE tg_owt::tg_owt)
|
||||
return()
|
@ -1,3 +1,35 @@
|
||||
--- a/cmake/external/rnnoise/CMakeLists.txt
|
||||
+++ b/cmake/external/rnnoise/CMakeLists.txt
|
||||
@@ -4,7 +4,7 @@
|
||||
# For license and copyright information please follow this link:
|
||||
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||
|
||||
-if (DESKTOP_APP_USE_PACKAGED)
|
||||
+if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||
add_library(external_rnnoise INTERFACE IMPORTED GLOBAL)
|
||||
add_library(desktop-app::external_rnnoise ALIAS external_rnnoise)
|
||||
|
||||
@@ -18,7 +18,7 @@ endif()
|
||||
add_library(external_rnnoise STATIC IMPORTED GLOBAL)
|
||||
add_library(desktop-app::external_rnnoise ALIAS external_rnnoise)
|
||||
|
||||
-set(rnnoise_lib_loc ${libs_loc}/rnnoise/out)
|
||||
+set(rnnoise_lib_loc ${libs_loc}/rnnoise/.libs)
|
||||
if (WIN32)
|
||||
target_include_directories(external_rnnoise SYSTEM
|
||||
INTERFACE
|
||||
@@ -40,9 +40,9 @@ elseif (APPLE)
|
||||
else()
|
||||
target_include_directories(external_rnnoise SYSTEM
|
||||
INTERFACE
|
||||
- /usr/local/include
|
||||
+ ${libs_loc}/rnnoise/include
|
||||
)
|
||||
- find_library(RNNOISE_LIBRARY librnnoise.a REQUIRED)
|
||||
+ find_library(RNNOISE_LIBRARY librnnoise.a HINTS "${rnnoise_lib_loc}" REQUIRED)
|
||||
set_target_properties(external_rnnoise PROPERTIES
|
||||
IMPORTED_LOCATION "${RNNOISE_LIBRARY}"
|
||||
)
|
||||
--- a/cmake/external/expected/CMakeLists.txt
|
||||
+++ b/cmake/external/expected/CMakeLists.txt
|
||||
@@ -7,7 +7,7 @@
|
3
rnnoise-git20210122.tar.gz
Normal file
3
rnnoise-git20210122.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:767b22cd9d72f1062f1d424b10538056d281d1677373f00034e4f61fc09112b2
|
||||
size 173774
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 26 14:21:10 UTC 2022 - Xu Zhao <i@xuzhao.net>
|
||||
|
||||
- Add 0002-use-bundled-rnnoise-expected-gsl-ranges-webrtc.patch
|
||||
* Fix the build on openSUSE 15.4
|
||||
- Rename 0001-use-bundled-ranged-exptected-gsl.patch to
|
||||
0001-use-bundled-webrtc.patch
|
||||
* Use system provided ranged, gsl, and ranges library.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jun 25 08:19:33 UTC 2022 - Manfred Hollstein <manfred.h@gmx.net>
|
||||
|
||||
|
@ -47,8 +47,14 @@ Source0: https://github.com/telegramdesktop/tdesktop/releases/download/v%
|
||||
# Usage: python tg_owt-packager.py --repo-dir $PWD/tg_owt-master
|
||||
Source1: tg_owt-packager.py
|
||||
Source2: tg_owt-master.zip
|
||||
%if 0%{?suse_version} > 01500
|
||||
# PATCH-FIX-OPENSUSE
|
||||
Patch1: 0001-use-bundled-ranged-exptected-gsl.patch
|
||||
Patch1: 0001-use-bundled-webrtc.patch
|
||||
%else
|
||||
Source3: rnnoise-git20210122.tar.gz
|
||||
# PATCH-FIX-OPENSUSE
|
||||
Patch1: 0002-use-bundled-rnnoise-expected-gsl-ranges-webrtc.patch
|
||||
%endif
|
||||
# PATCH-FIX-OPENSUSE
|
||||
Patch3: 0003-revert-webrtc-cmake-target-file.patch
|
||||
# PATCH-FIX-OPENSUSE
|
||||
@ -145,7 +151,17 @@ BuildRequires: pkgconfig(opusfile)
|
||||
BuildRequires: pkgconfig(opusurl)
|
||||
BuildRequires: pkgconfig(portaudio-2.0)
|
||||
BuildRequires: pkgconfig(portaudiocpp)
|
||||
# Use system rnnoise on TW, self-build on others
|
||||
%if 0%{?suse_version} > 01500
|
||||
BuildRequires: expect-devel
|
||||
BuildRequires: range-v3-devel
|
||||
BuildRequires: pkgconfig(gsl)
|
||||
BuildRequires: pkgconfig(rnnoise)
|
||||
%else
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
%endif
|
||||
BuildRequires: pkgconfig(tslib)
|
||||
BuildRequires: pkgconfig(vdpau)
|
||||
BuildRequires: pkgconfig(vpx)
|
||||
@ -187,10 +203,16 @@ The service also provides APIs to independent developers.
|
||||
%patch1 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
mkdir ../Libraries
|
||||
|
||||
# If not TW, unpack rnnoise source
|
||||
%if 0%{?suse_version} <= 01500
|
||||
%setup -q -T -D -b 3 -n tdesktop-%{version}-full
|
||||
mv ../rnnoise-git20210122 ../Libraries/rnnoise
|
||||
%endif
|
||||
|
||||
cd ../
|
||||
unzip -q %{SOURCE2}
|
||||
mkdir Libraries
|
||||
mv tg_owt-master Libraries/tg_owt
|
||||
|
||||
%build
|
||||
@ -202,6 +224,15 @@ export CXX=g++-10
|
||||
# Fix build failures due to not finding installed headers for xkbcommon and wayland-client
|
||||
export CXXFLAGS+="`pkg-config --cflags xkbcommon wayland-client`"
|
||||
|
||||
# If not TW, build rnnoise
|
||||
%if 0%{?suse_version} <= 01500
|
||||
pushd %{_builddir}/Libraries/rnnoise
|
||||
./autogen.sh
|
||||
%configure
|
||||
%make_build
|
||||
popd
|
||||
%endif
|
||||
|
||||
cd %{_builddir}/Libraries/tg_owt
|
||||
mkdir -p out/Release
|
||||
cd out/Release
|
||||
|
Loading…
Reference in New Issue
Block a user