about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2018-07-17 20:38:56 +0200
committerMichael Weiss <dev.primeos@gmail.com>2018-07-17 21:17:21 +0200
commitbf2a009380ab57f647f4c2e4cc531721aaa32847 (patch)
tree46e0affcbf74d24fdb899f4ddaf74fa97634c6a4
parentbf23666022f1c0f097ad9aa276f3203c7e86271f (diff)
downloadnixlib-bf2a009380ab57f647f4c2e4cc531721aaa32847.tar
nixlib-bf2a009380ab57f647f4c2e4cc531721aaa32847.tar.gz
nixlib-bf2a009380ab57f647f4c2e4cc531721aaa32847.tar.bz2
nixlib-bf2a009380ab57f647f4c2e4cc531721aaa32847.tar.lz
nixlib-bf2a009380ab57f647f4c2e4cc531721aaa32847.tar.xz
nixlib-bf2a009380ab57f647f4c2e4cc531721aaa32847.tar.zst
nixlib-bf2a009380ab57f647f4c2e4cc531721aaa32847.zip
tdesktop: 1.3.7 -> 1.3.10
tdesktopPackages.preview: 1.3.7 -> 1.3.10

Without the patch the build will fail with the following error:

[ 15%] Building CXX object CMakeFiles/lib_export.dir/build/tdesktop/Telegram/SourceFiles/export/export_api_wrap.o
/build/tdesktop/Telegram/SourceFiles/export/export_api_wrap.cpp: In lambda function:
/build/tdesktop/Telegram/SourceFiles/export/export_api_wrap.cpp:712:56: internal compiler error: Segmentation fault
   if constexpr (MTPDphotos_photos::Is<decltype(data)>()) {
                                                        ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
make[2]: *** [CMakeFiles/lib_export.dir/build.make:77: CMakeFiles/lib_export.dir/build/tdesktop/Telegram/SourceFiles/export/export_api_wrap.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1101: CMakeFiles/lib_export.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix8
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/tdesktop/fix-internal-compiler-error.patch68
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix5
3 files changed, 76 insertions, 5 deletions
diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
index 3e0e60594f82..9354ae728218 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
@@ -4,11 +4,11 @@ let
   mkTelegram = args: qt5.callPackage (import ./generic.nix args) { };
   stableVersion = {
     stable = true;
-    version = "1.3.7";
-    sha256Hash = "1rwnqgla061icvyvw8gxqd7qki1jnq0f46hvyffp74ng5r1b6wjg";
+    version = "1.3.10";
+    sha256Hash = "0i1lzks8pf627658w6p7dz87d6cl4g98031qm166npkc40f89bpr";
     # svn log svn://svn.archlinux.org/community/telegram-desktop/trunk
-    archPatchesRevision = "310557";
-    archPatchesHash = "1v134dal3xiapgh3akfr61vh62j24m9vkb62kckwvap44iqb0hlk";
+    archPatchesRevision = "359861";
+    archPatchesHash = "15xybfs9k6dww747if8z6m9sh7anvqi76zsx2gxyna2j1z36i0r0";
   };
 in {
   stable = mkTelegram stableVersion;
diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/fix-internal-compiler-error.patch b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/fix-internal-compiler-error.patch
new file mode 100644
index 000000000000..1c79840d6260
--- /dev/null
+++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/fix-internal-compiler-error.patch
@@ -0,0 +1,68 @@
+Date: Tue, 17 Jul 2018 20:29:49 +0200
+
+---
+ Telegram/SourceFiles/export/data/export_data_types.cpp | 9 ++++++---
+ Telegram/SourceFiles/export/export_api_wrap.cpp        | 6 ++++--
+ 2 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/Telegram/SourceFiles/export/data/export_data_types.cpp b/Telegram/SourceFiles/export/data/export_data_types.cpp
+index f835dc2f9..e811c27e8 100644
+--- a/Telegram/SourceFiles/export/data/export_data_types.cpp
++++ b/Telegram/SourceFiles/export/data/export_data_types.cpp
+@@ -221,7 +221,8 @@ Image ParseMaxImage(
+ 				result.width = data.vw.v;
+ 				result.height = data.vh.v;
+ 				result.file.location = ParseLocation(data.vlocation);
+-				if constexpr (MTPDphotoCachedSize::Is<decltype(data)>()) {
++				constexpr bool condition = MTPDphotoCachedSize::Is<decltype(data)>();
++				if constexpr (condition) {
+ 					result.file.content = data.vbytes.v;
+ 					result.file.size = result.file.content.size();
+ 				} else {
+@@ -409,7 +410,8 @@ Document ParseDocument(
+ 			result.width = data.vw.v;
+ 			result.height = data.vh.v;
+ 			result.file.location = ParseLocation(data.vlocation);
+-			if constexpr (MTPDphotoCachedSize::Is<decltype(data)>()) {
++			constexpr bool condition = MTPDphotoCachedSize::Is<decltype(data)>();
++			if constexpr (condition) {
+ 				result.file.content = data.vbytes.v;
+ 				result.file.size = result.file.content.size();
+ 			} else {
+@@ -1017,7 +1019,8 @@ Message ParseMessage(
+ 	auto result = Message();
+ 	data.match([&](const auto &data) {
+ 		result.id = data.vid.v;
+-		if constexpr (!MTPDmessageEmpty::Is<decltype(data)>()) {
++		constexpr bool condition = !MTPDmessageEmpty::Is<decltype(data)>();
++		if constexpr (condition) {
+ 			result.toId = ParsePeerId(data.vto_id);
+ 			const auto peerId = (!data.is_out()
+ 				&& data.has_from_id()
+diff --git a/Telegram/SourceFiles/export/export_api_wrap.cpp b/Telegram/SourceFiles/export/export_api_wrap.cpp
+index b618937f6..bb98647dd 100644
+--- a/Telegram/SourceFiles/export/export_api_wrap.cpp
++++ b/Telegram/SourceFiles/export/export_api_wrap.cpp
+@@ -709,7 +709,8 @@ void ApiWrap::handleUserpicsSlice(const MTPphotos_Photos &result) {
+ 	Expects(_userpicsProcess != nullptr);
+ 
+ 	result.match([&](const auto &data) {
+-		if constexpr (MTPDphotos_photos::Is<decltype(data)>()) {
++		constexpr bool condition = MTPDphotos_photos::Is<decltype(data)>();
++		if constexpr (condition) {
+ 			_userpicsProcess->lastSlice = true;
+ 		}
+ 		loadUserpicsFiles(Data::ParseUserpicsSlice(
+@@ -1141,7 +1142,8 @@ void ApiWrap::requestMessagesSlice() {
+ 		result.match([&](const MTPDmessages_messagesNotModified &data) {
+ 			error("Unexpected messagesNotModified received.");
+ 		}, [&](const auto &data) {
+-			if constexpr (MTPDmessages_messages::Is<decltype(data)>()) {
++			constexpr bool condition = MTPDmessages_messages::Is<decltype(data)>();
++			if constexpr (condition) {
+ 				_chatProcess->lastSlice = true;
+ 			}
+ 			loadMessagesFiles(Data::ParseMessagesSlice(
+-- 
+2.16.3
+
diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix
index 732ea95dd07c..2d9a9d10aed9 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix
@@ -28,7 +28,10 @@ mkDerivation rec {
   };
 
   # TODO: libtgvoip.patch no-gtk2.patch
-  patches = [ "${archPatches}/tdesktop.patch" ];
+  patches = [ "${archPatches}/tdesktop.patch" ]
+    # TODO: Only required to work around a compiler bug.
+    # This should be fixed in GCC 7.3.1 (or later?)
+    ++ [ ./fix-internal-compiler-error.patch ];
 
   postPatch = ''
     substituteInPlace Telegram/SourceFiles/platform/linux/linux_libs.cpp \