Diff teams-1.4.00.7556-r1 with a teams-1.4.00.13653-r2

/usr/portage/net-im/teams/teams-1.4.00.13653-r2.ebuild 2021-10-31 03:39:00.000000000 +0300
3 3

  
4 4
EAPI=7
5 5

  
6
inherit desktop unpacker xdg-utils chromium-2
6
CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he
7
	hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr
8
	sv sw ta te th tr uk vi zh-CN zh-TW"
9

  
10
inherit chromium-2 desktop unpacker xdg
7 11

  
8 12
DESCRIPTION="Microsoft Teams, an Office 365 multimedia collaboration client, pre-release"
9 13
HOMEPAGE="https://products.office.com/en-us/microsoft-teams/group-chat-software/"
......
13 17
SLOT="0"
14 18
KEYWORDS="-* ~amd64"
15 19
RESTRICT="bindist mirror splitdebug test"
16
IUSE="system-ffmpeg system-mesa"
20
IUSE="swiftshader system-ffmpeg"
17 21

  
18 22
QA_PREBUILT="*"
19

  
20
# libasound2 (>= 1.0.16), libatk-bridge2.0-0 (>= 2.5.3), libatk1.0-0 (>= 1.12.4), libc6 (>= 2.17), libcairo2 (>= 1.6.0), libcups2 (>= 1.4.0),
21
# libexpat1 (>= 2.0.1), libgcc1 (>= 1:3.0), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.35.8), libgtk-3-0 (>= 3.9.10), libnspr4 (>= 2:4.9-2~), libnss3
22
# (>= 2:3.22), libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.14.0), libsecret-1-0 (>= 0.7), libuuid1 (>= 2.16), libx11-6 (>= 2:1.4.99.1), libx11-xcb1,
23
# libxcb1 (>= 1.6), libxcomposite1 (>= 1:0.3-1), libxcursor1 (>> 1.1.2), libxdamage1 (>= 1:1.1), libxext6, libxfixes3, libxi6 (>= 2:1.2.99.4), libxkbfile1,
24
# libxrandr2 (>= 2:1.2.99.3), libxrender1, libxss1, libxtst6, apt-transport-https, libfontconfig1 (>= 2.11.0), libdbus-1-3 (>= 1.6.18), libstdc++6 (>= 4.8.1)
23
# libasound2 (>= 1.0.16), libatk-bridge2.0-0 (>= 2.5.3), libatk1.0-0 (>= 2.2.0), libatspi2.0-0 (>= 2.9.90), libc6 (>= 2.17), libcairo2 (>= 1.10.0),
24
# libcups2 (>= 1.7.0), libdrm2 (>= 2.4.38), libexpat1 (>= 2.0.1), libgbm1 (>= 17.1.0~rc2), libgcc1 (>= 1:3.0), libgdk-pixbuf2.0-0 (>= 2.22.0),
25
# libglib2.0-0 (>= 2.39.4), libgtk-3-0 (>= 3.19.12), libnspr4 (>= 2:4.9-2~), libnss3 (>= 2:3.22), libpango-1.0-0 (>= 1.14.0),
26
# libpangocairo-1.0-0 (>= 1.14.0), libx11-6 (>= 2:1.4.99.1), libx11-xcb1, libxcb-dri3-0, libxcb1 (>= 1.6), libxcomposite1 (>= 1:0.3-1),
27
# libxcursor1 (>> 1.1.2), libxdamage1 (>= 1:1.1), libxext6, libxfixes3, libxi6 (>= 2:1.2.99.4), libxrandr2, libxrender1, libxtst6,
28
# apt-transport-https, libfontconfig1 (>= 2.11.0), libdbus-1-3 (>= 1.6.18), libstdc++6 (>= 4.8.1)
25 29
RDEPEND="
26
	app-accessibility/at-spi2-atk
30
	app-accessibility/at-spi2-core:2
31
	app-accessibility/at-spi2-atk:2
27 32
	app-crypt/libsecret
28 33
	dev-libs/atk
29 34
	dev-libs/expat
......
32 37
	dev-libs/nss
33 38
	media-libs/alsa-lib
34 39
	media-libs/fontconfig
40
	media-libs/mesa[gbm(+)]
35 41
	net-print/cups
36 42
	sys-apps/dbus
37 43
	sys-apps/util-linux
38 44
	x11-libs/cairo
39
	x11-libs/cairo
45
	x11-libs/libdrm
40 46
	x11-libs/gdk-pixbuf
41 47
	x11-libs/gtk+:3
42 48
	x11-libs/libX11
......
53 59
	x11-libs/libxcb
54 60
	x11-libs/libxkbfile
55 61
	x11-libs/pango
56
	system-mesa? ( media-libs/mesa )
57 62
	system-ffmpeg? ( <media-video/ffmpeg-4.3[chromium] )
58 63
"
59 64

  
60 65
S="${WORKDIR}"
61 66

  
62
pkg_pretend() {
63
	chromium_suid_sandbox_check_kernel_config
64
}
65

  
66
src_configure() {
67
	chromium_suid_sandbox_check_kernel_config
67
src_prepare() {
68 68
	default
69
	sed -i '/OnlyShowIn=/d' usr/share/applications/${PN}.desktop || die
70
	sed -e "s@^TEAMS_PATH=.*@TEAMS_PATH=${EPREFIX}/opt/teams/teams@" \
71
		-i usr/bin/teams || die
69 72
}
70 73

  
71 74
src_install() {
72 75
	rm _gpgorigin || die
73
	doins -r .
74

  
75
	fperms +x /usr/bin/teams
76
	fperms +x /usr/share/teams/teams
77

  
78
	if use system-ffmpeg ; then
79
		rm -f "${ED}"/usr/share/teams/libffmpeg.so || die
80

  
81
		cat > 99teams <<-EOF
82
		LDPATH="${EPREFIX}/usr/$(get_libdir)/chromium"
83
		EOF
84
		doenvd 99teams
76
	rm -r "usr/share/${PN}/resources/assets/"{.gitignore,macos,tlb,windows,x86,x64,arm64} || die
77
	rm -r "usr/share/${PN}/resources/tmp" || die
78
	rm "usr/share/${PN}/chrome-sandbox" || die
79

  
80
	insinto /opt
81
	doins -r usr/share/${PN}
82

  
83
	dobin usr/bin/${PN}
84
	domenu usr/share/applications/${PN}.desktop
85
	doicon usr/share/pixmaps/${PN}.png
86

  
87
	pushd "${ED}/opt/${PN}/locales" > /dev/null || die
88
	chromium_remove_language_paks
89
	popd > /dev/null || die
90

  
91
	if use system-ffmpeg; then
92
		rm "${ED}/opt/${PN}/libffmpeg.so" || die
93
		dosym "../../usr/$(get_libdir)/chromium/libffmpeg.so" "opt/${PN}/libffmpeg.so" || die
85 94
		elog "Using system ffmpeg. This is experimental and may lead to crashes."
86 95
	fi
87 96

  
88
	if use system-mesa ; then
89
		rm -f "${ED}"/usr/share/teams/libEGL.so || die
90
		rm -f "${ED}"/usr/share/teams/libGLESv2.so || die
91
		rm -f "${ED}"/usr/share/teams/swiftshader/libEGL.so || die
92
		rm -f "${ED}"/usr/share/teams/swiftshader/libGLESv2.so || die
93
		elog "Using system mesa. This is experimental and may lead to crashes."
97
	if ! use swiftshader; then
98
		rm -r "${ED}/opt/${PN}/swiftshader" || die
99
		elog "Running without SwiftShader OpenGL implementation. If Teams doesn't start "
100
		elog "or you experience graphic issues, then try with USE=swiftshader enabled."
94 101
	fi
95 102

  
96
	rm -rf "${ED}"/usr/share/teams/resources/app.asar.unpacked/node_modules/keytar3 || die
97

  
98
	sed -i '/OnlyShowIn=/d' "${S}"/usr/share/applications/teams.desktop || die
99
	domenu usr/share/applications/teams.desktop
100
}
101

  
102
pkg_postinst() {
103
	xdg_desktop_database_update
104
	xdg_icon_cache_update
105
}
106

  
107
pkg_postrm() {
108
	xdg_desktop_database_update
109
	xdg_icon_cache_update
103
	fperms +x /usr/bin/${PN}
104
	fperms +x /opt/${PN}/${PN}
110 105
}
Thank you!