diff --git a/breakpad-master.tar.gz b/breakpad-master.tar.gz new file mode 100644 index 0000000..b059b5a --- /dev/null +++ b/breakpad-master.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:863b17993f4fbcb7b8e76381f22d2cf2d383d74f6530143a01f2fc1489cf2edc +size 5183382 diff --git a/breakpad-refs-heads-master.tar.gz b/breakpad-refs-heads-master.tar.gz deleted file mode 100644 index 358ac8d..0000000 --- a/breakpad-refs-heads-master.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8df1d77b479b9d152d81c19ca05bf7ccd8ad76c2f55671737ada2e88441f3930 -size 5148013 diff --git a/patch-1.0.0.diff b/patch-1.0.0.diff new file mode 100644 index 0000000..d3358eb --- /dev/null +++ b/patch-1.0.0.diff @@ -0,0 +1,186 @@ +diff --git a/Telegram/gyp/Telegram.gyp b/Telegram/gyp/Telegram.gyp +index 2503f1e..da2fe9d 100644 +--- a/Telegram/gyp/Telegram.gyp ++++ b/Telegram/gyp/Telegram.gyp +@@ -79,8 +79,11 @@ + ], + + 'defines': [ +- 'AL_LIBTYPE_STATIC', + ' /dev/null --libs xkbcommon xkbcommon-x11)', ++ ' /dev/null --libs libpcre16)', ++ ' /dev/null --libs zlib)', ++ ' /dev/null --libs libpng16)', ++ ' /dev/null --libs libwebp)', ++ ' /dev/null --libs harfbuzz)', ++ ' /dev/null --libs xcb-shm xcb-xfixes xcb-render xcb-renderutil xcb-sync xcb-randr xcb-xinerama xcb-xkb xcb-icccm xcb-image xcb-shape xcb-keysyms xcb-util)', + ], + 'include_dirs': [ + '<(qt_loc)/mkspecs/linux-g++', + ], + 'ldflags': [ +- '-static-libstdc++', + '-pthread', + '-g', + '-rdynamic', +diff --git a/Telegram/gyp/telegram_linux.gypi b/Telegram/gyp/telegram_linux.gypi +index b42e744..d791379 100644 +--- a/Telegram/gyp/telegram_linux.gypi ++++ b/Telegram/gyp/telegram_linux.gypi +@@ -21,11 +21,20 @@ + 'conditions': [[ 'build_linux', { + 'variables': { + 'pkgconfig_libs': [ +-# In order to work libxkbcommon must be linked statically, +-# PKGCONFIG links it like "-L/usr/local/lib -lxkbcommon" +-# which makes a dynamic link which leads to segfault in +-# QApplication() -> createPlatformIntegration -> QXcbIntegrationPlugin::create +- #'xkbcommon', ++ 'liblzma', ++ 'openal', ++ 'libavformat', ++ 'libavcodec', ++ 'libswresample', ++ 'libswscale', ++ 'libavutil', ++ 'opus', ++ 'libva-x11', ++ 'libva-drm', ++ 'libva', ++ 'libdrm', ++ 'zlib', ++ + ], + 'linux_path_ffmpeg%': '/usr/local', + 'linux_path_openal%': '/usr/local', +@@ -35,46 +44,26 @@ + 'linux_path_breakpad%': '<(libs_loc)/breakpad', + }, + 'include_dirs': [ +- '/usr/local/include', +- '<(linux_path_ffmpeg)/include', +- '<(linux_path_openal)/include', ++ '/usr/include', + '<(linux_path_breakpad)/include/breakpad', + ], + 'library_dirs': [ +- '/usr/local/lib', +- '<(linux_path_ffmpeg)/lib', +- '<(linux_path_openal)/lib', +- '<(linux_path_libexif_lib)', +- '<(linux_path_va)/lib', +- '<(linux_path_vdpau)/lib', +- '<(linux_path_breakpad)/lib', ++ '/usr/lib', ++ '<(linux_path_breakpad)/src/client/linux', + ], + 'libraries': [ +- 'breakpad_client', + 'composeplatforminputcontextplugin', + 'ibusplatforminputcontextplugin', + 'fcitxplatforminputcontextplugin', +- 'liblzma.a', +- 'libopenal.a', +- 'libavformat.a', +- 'libavcodec.a', +- 'libswresample.a', +- 'libswscale.a', +- 'libavutil.a', +- 'libopus.a', +- 'libva-x11.a', +- 'libva-drm.a', +- 'libva.a', +- 'libvdpau.a', +- 'libdrm.a', +- 'libz.a', +-# ' /dev/null --libs <@(pkgconfig_libs))', ++ ' /dev/null --libs <@(pkgconfig_libs))', ++ 'libbreakpad_client.a', + ], + 'cflags_cc': [ + ' /dev/null --cflags appindicator-0.1)', + ' /dev/null --cflags gtk+-2.0)', + ' /dev/null --cflags glib-2.0)', + ' /dev/null --cflags dee-1.0)', ++ ' /dev/null --cflags <@(pkgconfig_libs))', + ], + 'configurations': { + 'Release': { diff --git a/patch.diff b/patch.diff deleted file mode 100644 index 2f9580f..0000000 --- a/patch.diff +++ /dev/null @@ -1,494 +0,0 @@ -diff --git a/Telegram/SourceFiles/platform/linux/linux_libs.cpp b/Telegram/SourceFiles/platform/linux/linux_libs.cpp -index a9731ce..2bb4468 100644 ---- a/Telegram/SourceFiles/platform/linux/linux_libs.cpp -+++ b/Telegram/SourceFiles/platform/linux/linux_libs.cpp -@@ -45,6 +45,7 @@ bool loadLibrary(QLibrary &lib, const char *name, int version) { - } - - bool setupGtkBase(QLibrary &lib_gtk) { -+ load(lib_gtk, "gdk_set_allowed_backends", gdk_set_allowed_backends); - if (!load(lib_gtk, "gtk_init_check", gtk_init_check)) return false; - if (!load(lib_gtk, "gtk_menu_new", gtk_menu_new)) return false; - if (!load(lib_gtk, "gtk_menu_get_type", gtk_menu_get_type)) return false; -@@ -106,6 +107,10 @@ bool setupGtkBase(QLibrary &lib_gtk) { - if (!load(lib_gtk, "g_slist_free", g_slist_free)) return false; - - DEBUG_LOG(("Library gtk functions loaded!")); -+ if (gdk_set_allowed_backends != nullptr) { -+ gdk_set_allowed_backends("x11"); -+ } -+ - if (!gtk_init_check(0, 0)) { - gtk_init_check = nullptr; - DEBUG_LOG(("Failed to gtk_init_check(0, 0)!")); -@@ -128,6 +133,7 @@ bool setupAppIndicator(QLibrary &lib_indicator) { - - } // namespace - -+f_gdk_set_allowed_backends gdk_set_allowed_backends = nullptr; - f_gtk_init_check gtk_init_check = nullptr; - f_gtk_menu_new gtk_menu_new = nullptr; - f_gtk_menu_get_type gtk_menu_get_type = nullptr; -diff --git a/Telegram/SourceFiles/platform/linux/linux_libs.h b/Telegram/SourceFiles/platform/linux/linux_libs.h -index bc3dce6..07c5042 100644 ---- a/Telegram/SourceFiles/platform/linux/linux_libs.h -+++ b/Telegram/SourceFiles/platform/linux/linux_libs.h -@@ -52,6 +52,9 @@ bool load(QLibrary &lib, const char *name, Function &func) { - return false; - } - -+typedef void (*f_gdk_set_allowed_backends)(const gchar *backends); -+extern f_gdk_set_allowed_backends gdk_set_allowed_backends; -+ - typedef gboolean (*f_gtk_init_check)(int *argc, char ***argv); - extern f_gtk_init_check gtk_init_check; - -diff --git a/Telegram/gyp/Telegram.gyp b/Telegram/gyp/Telegram.gyp -index f6609c1..76cd33b 100644 ---- a/Telegram/gyp/Telegram.gyp -+++ b/Telegram/gyp/Telegram.gyp -@@ -78,19 +78,17 @@ - ], - - 'defines': [ -- 'AL_LIBTYPE_STATIC', - ' /dev/null --libs xkbcommon xkbcommon-x11)', -+ ' /dev/null --libs harfbuzz)', -+ ' /dev/null --libs libpcre16)', -+ ' /dev/null --libs zlib)', -+ ' /dev/null --libs libpng16)', -+ 'jpeg', -+ ' /dev/null --libs libwebp)', -+ ' /dev/null --libs xcb-shm xcb-xfixes xcb-render xcb-renderutil xcb-sync xcb-randr xcb-xinerama xcb-xkb xcb-icccm xcb-image xcb-shape xcb-keysyms xcb-util)', -+ 'proxy', -+ 'GL', - ], - 'include_dirs': [ - '<(qt_loc)/mkspecs/linux-g++', - ], - 'ldflags': [ -- '-static-libstdc++', - '-pthread', - '-g', - '-rdynamic', -diff --git a/Telegram/gyp/qt.gypi.orig b/Telegram/gyp/qt.gypi.orig -new file mode 100644 -index 0000000..bb9b56b ---- /dev/null -+++ b/Telegram/gyp/qt.gypi.orig -@@ -0,0 +1,261 @@ -+# This file is part of Telegram Desktop, -+# the official desktop version of Telegram messaging app, see https://telegram.org -+# -+# Telegram Desktop is free software: you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation, either version 3 of the License, or -+# (at your option) any later version. -+# -+# It is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# In addition, as a special exception, the copyright holders give permission -+# to link the code of portions of this program with the OpenSSL library. -+# -+# Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -+# Copyright (c) 2014 John Preston, https://desktop.telegram.org -+ -+{ -+ 'variables': { -+ 'variables': { -+ 'variables': { -+ 'variables': { -+ 'variables': { -+ 'conditions': [ -+ [ 'build_macold', { -+ 'qt_version%': '5.3.2', -+ }, { -+ 'qt_version%': '5.6.2', -+ }] -+ ], -+ }, -+ 'qt_libs': [ -+ 'qwebp', -+ 'Qt5PrintSupport', -+ 'Qt5PlatformSupport', -+ 'Qt5Network', -+ 'Qt5Widgets', -+ 'Qt5Gui', -+ ], -+ 'qt_version%': '<(qt_version)', -+ 'linux_path_qt%': '/usr/local/tdesktop/Qt-<(qt_version)', -+ }, -+ 'qt_version%': '<(qt_version)', -+ 'qt_loc_unix': '<(linux_path_qt)', -+ 'conditions': [ -+ [ 'build_win', { -+ 'qt_lib_prefix': '<(ld_lib_prefix)', -+ 'qt_lib_debug_postfix': 'd<(ld_lib_postfix)', -+ 'qt_lib_release_postfix': '<(ld_lib_postfix)', -+ 'qt_libs': [ -+ '<@(qt_libs)', -+ 'Qt5Core', -+ 'qtmain', -+ 'qwindows', -+ 'qtfreetype', -+ 'qtpcre', -+ ], -+ }], -+ [ 'build_mac', { -+ 'qt_lib_prefix': '<(ld_lib_prefix)', -+ 'qt_lib_debug_postfix': '_debug<(ld_lib_postfix)', -+ 'qt_lib_release_postfix': '<(ld_lib_postfix)', -+ 'qt_libs': [ -+ '<@(qt_libs)', -+ 'Qt5Core', -+ 'qgenericbearer', -+ 'qcocoa', -+ ], -+ }], -+ [ 'build_mac and not build_macold', { -+ 'qt_libs': [ -+ '<@(qt_libs)', -+ 'Qt5Core', -+ 'qtfreetype', -+ 'qtpcre', -+ ], -+ }], -+ [ 'build_linux', { -+ 'qt_lib_prefix': 'lib', -+ 'qt_lib_debug_postfix': '.a', -+ 'qt_lib_release_postfix': '.a', -+ 'qt_libs': [ -+ 'qxcb', -+ 'Qt5XcbQpa', -+ 'qconnmanbearer', -+ 'qgenericbearer', -+ 'qnmbearer', -+ '<@(qt_libs)', -+ 'Qt5DBus', -+ 'Qt5Core', -+ ], -+ }], -+ ], -+ }, -+ 'qt_version%': '<(qt_version)', -+ 'qt_loc_unix': '<(qt_loc_unix)', -+ 'qt_version_loc': ' /dev/null --libs xkbcommon xkbcommon-x11)', -+ ' /dev/null --libs harfbuzz)', -+ ' /dev/null --libs libpcre16)', -+ ' /dev/null --libs zlib)', -+ ' /dev/null --libs libpng16)', -+ ' /dev/null --libs libjpeg)', -+ ' /dev/null --libs libwebp)', -+ ' /dev/null --libs xcb-shm xcb-xfixes xcb-render xcb-renderutil xcb-sync xcb-randr xcb-xinerama xcb-xkb xcb-icccm xcb-image xcb-shape xcb-keysyms xcb-util)', -+ 'proxy', -+ 'GL', -+ ], -+ 'include_dirs': [ -+ '<(qt_loc)/mkspecs/linux-g++', -+ ], -+ 'ldflags': [ -+ '-pthread', -+ '-g', -+ '-rdynamic', -+ ], -+ }], -+ ], -+ -+ 'rules': [{ -+ 'rule_name': 'qt_moc', -+ 'extension': 'h', -+ 'outputs': [ -+ '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/moc/moc_<(RULE_INPUT_ROOT).cpp', -+ ], -+ 'action': [ -+ '<(qt_loc)/bin/moc<(exe_ext)', -+ -+ # Silence "Note: No relevant classes found. No output generated." -+ '--no-notes', -+ -+ ' createPlatformIntegration -> QXcbIntegrationPlugin::create -- #'xkbcommon', -+ 'liblzma', -+ 'openal', -+ 'libavformat', -+ 'libavcodec', -+ 'libswresample', -+ 'libswscale', -+ 'libavutil', -+ 'opus', -+ 'libva-x11', -+ 'libva-drm', -+ 'libva', -+ 'libdrm', -+ 'zlib', -+ 'glib-2.0', - ], - 'linux_path_ffmpeg%': '/usr/local', - 'linux_path_openal%': '/usr/local', -@@ -34,44 +43,26 @@ - 'linux_path_breakpad%': '<(libs_loc)/breakpad', - }, - 'include_dirs': [ -- '/usr/local/include', -- '<(linux_path_ffmpeg)/include', -- '<(linux_path_openal)/include', - '<(linux_path_breakpad)/include/breakpad', -+ '/usr/include', - ], - 'library_dirs': [ -- '/usr/local/lib', -- '<(linux_path_ffmpeg)/lib', -- '<(linux_path_openal)/lib', -- '<(linux_path_libexif_lib)', -- '<(linux_path_va)/lib', -- '<(linux_path_breakpad)/lib', -+ '<(linux_path_breakpad)/src/client/linux', -+ '/usr/lib', - ], - 'libraries': [ -- 'breakpad_client', - 'composeplatforminputcontextplugin', - 'ibusplatforminputcontextplugin', - 'fcitxplatforminputcontextplugin', -- 'liblzma.a', -- 'libopenal.a', -- 'libavformat.a', -- 'libavcodec.a', -- 'libswresample.a', -- 'libswscale.a', -- 'libavutil.a', -- 'libopus.a', -- 'libva-x11.a', -- 'libva-drm.a', -- 'libva.a', -- 'libdrm.a', -- 'libz.a', --# ' /dev/null --libs <@(pkgconfig_libs))', -+ ' /dev/null --libs <@(pkgconfig_libs))', -+ 'libbreakpad_client.a', - ], - 'cflags_cc': [ - ' /dev/null --cflags appindicator-0.1)', - ' /dev/null --cflags gtk+-2.0)', - ' /dev/null --cflags glib-2.0)', - ' /dev/null --cflags dee-1.0)', -+ ' /dev/null --cflags <@(pkgconfig_libs))', - ], - 'configurations': { - 'Release': { diff --git a/tdesktop-0.10.19.tar.gz b/tdesktop-0.10.19.tar.gz deleted file mode 100644 index 6bed7af..0000000 --- a/tdesktop-0.10.19.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0620d2c6e2dc254e3d69659d311a6117efef251a16270ba908fec150712b50b4 -size 11485857 diff --git a/tdesktop-1.0.0.tar.gz b/tdesktop-1.0.0.tar.gz new file mode 100644 index 0000000..616881c --- /dev/null +++ b/tdesktop-1.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:160a441fd96ffc4e0287801adce1a6224e7345e02ad071b1d2e6f1af19a8c62d +size 11633197 diff --git a/telegram-desktop.spec b/telegram-desktop.spec index d781d35..01de7a5 100644 --- a/telegram-desktop.spec +++ b/telegram-desktop.spec @@ -1,18 +1,19 @@ Name: telegram-desktop Summary: A new era of messaging -Version: 0.10.19 +Version: 1.0.0 Release: 1 License: GPL-3.0 URL: https://github.com/telegramdesktop/tdesktop Source: tdesktop-%{version}.tar.gz -Source1: breakpad-refs-heads-master.tar.gz +Source1: breakpad-master.tar.gz Source2: linux-syscall-support-refs-heads-master.tar.gz -Source3: gyp-master.tar.gz +Source3: gyp-master.tar.gz +Source4: patch-%{version}.diff ExclusiveArch: x86_64 BuildRequires: libtelegram-qt5-devel-static -BuildRequires: gcc5-c++ BuildRequires: libappindicator-devel +BuildRequires: gcc5-c++ BuildRequires: libtiff-devel BuildRequires: libmng-devel BuildRequires: pcre-devel @@ -32,6 +33,10 @@ BuildRequires: xcb-util-image-devel BuildRequires: xcb-util-renderutil-devel BuildRequires: xcb-util-keysyms-devel BuildRequires: libproxy-devel +BuildRequires: libXfixes-devel +BuildRequires: fontconfig-devel +BuildRequires: libexpat-devel +BuildRequires: freetype-devel BuildRequires: libjpeg-devel BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(xcb-util) @@ -69,7 +74,7 @@ Telegram Desktop app. A new era of messaging. %prep %setup -n tdesktop-%{version} -cp %{_sourcedir}/patch.diff . +cp %{_sourcedir}/patch-%{version}.diff . %setup -T -c -n breakpad -b 1 %setup -T -c -n breakpad-lss -b 2 @@ -106,7 +111,7 @@ make # patch with patch.diff cd %{_builddir}/tdesktop -patch -p1 < patch.diff +patch -p1 < patch-%{version}.diff # use gyp to generate cmake files cd %{_builddir}/tdesktop/Telegram/gyp