diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..290ed62 --- /dev/null +++ b/_constraints @@ -0,0 +1,7 @@ + + + + 2048 + + + diff --git a/telegram-desktop.changes b/telegram-desktop.changes index 3de3a0d..5f5e079 100644 --- a/telegram-desktop.changes +++ b/telegram-desktop.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Jun 21 08:40:07 UTC 2017 - badshah400@gmail.com + +- For openSUSE Leap, use gcc6 from the Update repository (gcc6 + from OSS is uninstallable). +- Add a _constraints file to restrict building to hardware with at + 2 GB of physical memory. + ------------------------------------------------------------------- Sun Jun 4 22:04:45 UTC 2017 - badshah400@gmail.com diff --git a/telegram-desktop.spec b/telegram-desktop.spec index 2c4bcad..8d44d5b 100644 --- a/telegram-desktop.spec +++ b/telegram-desktop.spec @@ -37,7 +37,12 @@ BuildRequires: desktop-file-utils BuildRequires: ffmpeg-devel BuildRequires: fontconfig-devel BuildRequires: freetype-devel +%if 0%{?suse_version} <= 1320 +BuildRequires: gcc6-c++ >= 6.2 +BuildRequires: libgcc_s1 >= 6.2 +%else BuildRequires: gcc-c++ >= 5.0 +%endif BuildRequires: libXfixes-devel BuildRequires: libexpat-devel BuildRequires: libjpeg-devel @@ -144,6 +149,10 @@ cd %{_builddir}/Libraries ln -s %{_builddir}/breakpad ./breakpad cd breakpad ln -s %{_builddir}/breakpad-lss ./src/third_party/lss +%if 0%{?suse_version} <= 1320 +export CXX='g++-6' +export GCC='gcc-6' +%endif # FIXME: you should use the %%configure macro ./configure make %{?_smp_mflags} @@ -157,6 +166,7 @@ patch -p1 < patch-%{version}.diff cd %{_builddir}/tdesktop/Telegram/gyp # patch qt.gypi to change libxkbcommon path ../../../Libraries/gyp/gyp \ + -DCMAKE_CXX_COMPILER='g++-6' \ -Dlinux_path_qt="%{_builddir}/Libraries/QtStatic" \ -Dqt_version="5.6.0" \ -Dlinux_lib_ssl=-lssl \ @@ -167,7 +177,13 @@ cd %{_builddir}/tdesktop/Telegram/gyp # build Telegram cd %{_builddir}/tdesktop/out/Release # FIXME: you should use %%cmake macros +%if 0%{?suse_version} <= 1320 +export CXX='g++-6' +export GCC='gcc-6' +CC=gcc-6 CXX=g++-6 cmake . +%else cmake . +%endif make %{?_smp_mflags} chrpath --delete Telegram