diff options
author | Georgy Yakovlev <gyakovlev@gentoo.org> | 2020-10-27 01:05:30 -0700 |
---|---|---|
committer | Georgy Yakovlev <gyakovlev@gentoo.org> | 2020-10-27 01:15:31 -0700 |
commit | 8ab45caf651ff9ad2c40e4784ad65cb8eabf1ccb (patch) | |
tree | 648cedf0c3e1c5455c674b0bf6336911aecd4dd2 /net-im/telegram-desktop | |
parent | games-emulation/pcsx2: drop old (diff) | |
download | gentoo-8ab45caf651ff9ad2c40e4784ad65cb8eabf1ccb.tar.gz gentoo-8ab45caf651ff9ad2c40e4784ad65cb8eabf1ccb.tar.bz2 gentoo-8ab45caf651ff9ad2c40e4784ad65cb8eabf1ccb.zip |
net-im/telegram-desktop: add lto useflag (WARNING: insane build times)
tested on both gcc and clang.
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'net-im/telegram-desktop')
-rw-r--r-- | net-im/telegram-desktop/metadata.xml | 1 | ||||
-rw-r--r-- | net-im/telegram-desktop/telegram-desktop-2.4.4.ebuild | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/net-im/telegram-desktop/metadata.xml b/net-im/telegram-desktop/metadata.xml index 3483ee3eee61..4e1022a426dd 100644 --- a/net-im/telegram-desktop/metadata.xml +++ b/net-im/telegram-desktop/metadata.xml @@ -8,6 +8,7 @@ <use> <flag name="enchant">Enable the app-text/aspell spell-checking backend</flag> <flag name="hunspell">Enable the app-text/hunspell spell-checking backend</flag> + <flag name="lto">Enable Link Time Optimization (LTO / IPO)</flag> <flag name="webrtc">WebRTC based video call support</flag> </use> </pkgmetadata> diff --git a/net-im/telegram-desktop/telegram-desktop-2.4.4.ebuild b/net-im/telegram-desktop/telegram-desktop-2.4.4.ebuild index 09b08748d2d1..d5937adb078b 100644 --- a/net-im/telegram-desktop/telegram-desktop-2.4.4.ebuild +++ b/net-im/telegram-desktop/telegram-desktop-2.4.4.ebuild @@ -22,7 +22,7 @@ SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${ LICENSE="GPL-3-with-openssl-exception LGPL-2+ webrtc? ( BSD )" SLOT="0" KEYWORDS="~amd64 ~ppc64" -IUSE="+alsa +dbus enchant +gtk +hunspell libressl +pulseaudio +spell +webrtc +X" +IUSE="+alsa +dbus enchant +gtk +hunspell libressl lto +pulseaudio +spell +webrtc +X" RDEPEND=" !net-im/telegram-desktop-bin @@ -104,7 +104,11 @@ build_tg_owt() { einfo "Building tg_owt / webrtc" mkdir -v "${WORKDIR}/tg_owt_build" || die pushd "${WORKDIR}/tg_owt_build" > /dev/null || die - cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DTG_OWT_PACKAGED_BUILD=ON ../tg_owt || die + cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DTG_OWT_PACKAGED_BUILD=ON \ + $(usex lto "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON" '') \ + ../tg_owt || die eninja popd > /dev/null || die } @@ -114,6 +118,7 @@ src_configure() { -Wno-deprecated-declarations -Wno-error=deprecated-declarations -Wno-switch + -Wno-unknown-warning-option ) append-cxxflags "${mycxxflags[@]}" @@ -138,6 +143,7 @@ src_configure() { -DDESKTOP_APP_DISABLE_SPELLCHECK="$(usex spell OFF ON)" # enables hunspell (recommended) -DDESKTOP_APP_DISABLE_WEBRTC_INTEGRATION="$(usex webrtc OFF ON)" # requires pulse AND alsa -DDESKTOP_APP_USE_ENCHANT="$(usex enchant ON OFF)" # enables enchant and disables hunspell + $(usex lto "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON" '') $(usex webrtc "-Dtg_owt_DIR=${WORKDIR}/tg_owt_build" '') ) |