net-im/skype: forgot some quotes.
[gentoo-soor-overlay.git] / net-im / skype / skype-2.0.0.63.ebuild
blob2120a4d3db721d9ca1382b947806cc8a277cb29d
1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 EAPI="1"
7 inherit eutils pax-utils
9 DESCRIPTION="A P2P-VoiceIP client."
10 HOMEPAGE="http://www.skype.com/"
12 SFILENAME=${PN}_static-${PV}.tar.bz2
13 DFILENAME=${P}.tar.bz2
14 SRC_URI="!qt-static? ( http://download.skype.com/linux/${DFILENAME} )
15 qt-static? ( http://download.skype.com/linux/${SFILENAME} )"
17 LICENSE="skype-eula"
18 SLOT="0"
19 KEYWORDS="amd64 x86"
20 IUSE="qt-static"
21 RESTRICT="mirror strip"
23 DEPEND="amd64? (
24 >=app-emulation/emul-linux-x86-xlibs-1.2
25 >=app-emulation/emul-linux-x86-baselibs-2.1.1
26 >=app-emulation/emul-linux-x86-soundlibs-2.4
27 app-emulation/emul-linux-x86-compat
29 x86? (
30 >=sys-libs/glibc-2.4
31 >=media-libs/alsa-lib-1.0.11
32 x11-libs/libXScrnSaver
33 x11-libs/libXv
34 qt-static? (
35 media-libs/fontconfig
36 media-libs/freetype
37 x11-libs/libICE
38 x11-libs/libSM
39 x11-libs/libXcursor
40 x11-libs/libXext
41 x11-libs/libXfixes
42 x11-libs/libXi
43 x11-libs/libXinerama
44 x11-libs/libXrandr
45 x11-libs/libXrender
46 x11-libs/libX11
48 !qt-static? (
49 || (
51 x11-libs/qt-core:4
52 x11-libs/qt-gui:4
53 x11-libs/qt-dbus:4
55 >=x11-libs/qt-4.2.3:4
57 x11-libs/libX11
58 x11-libs/libXau
59 x11-libs/libXdmcp
62 RDEPEND="${DEPEND}"
64 QA_EXECSTACK="opt/skype/skype"
66 use qt-static && S="${WORKDIR}/${PN}_static-${PV}"
68 pkg_setup() {
69 if ! use qt-static; then
70 if has_version '<=x11-libs/qt-4.4.0_alpha'; then
71 if ! built_with_use 'x11-libs/qt:4' accessibility dbus ; then
72 eerror "Rebuild qt-4 with USE=\"accessibility dbus\" or set USE=qt-static"
73 die "USE=\"-qt-static\" only works with qt-4 built with USE=\"accessibility dbus\"."
75 else
76 if ! built_with_use 'x11-libs/qt-gui' accessiblity dbus; then
77 eerror "Rebuild qt-gui with USE=\"accessibility dbus\" or set USE=qt-static"
78 die "USE=\"-qt-static\" only works with qt-gui built with USE=\"accessibility dbus\"."
84 src_unpack() {
85 unpack ${A}
88 src_install() {
89 # remove mprotect() restrictions for PaX usage - see Bug 100507
90 pax-mark m "${S}"/skype
92 exeinto /opt/${PN}
93 doexe skype
94 fowners root:audio /opt/skype/skype
95 make_wrapper skype /opt/${PN}/skype /opt/${PN} /opt/${PN} /usr/bin
97 insinto /opt/${PN}/sounds
98 doins sounds/*.wav
100 if ! use qt-static ; then
101 insinto /etc/dbus-1/system.d
102 newins "${FILESDIR}"/skype.debus.config skype.conf
105 insinto /opt/${PN}/lang
107 #There have been some issues were lang is not updated from the .ts files
108 #but if we have qt we can rebuild it
110 if ! use qt-static ; then
111 lrelease lang/*.ts
114 doins lang/*.qm
116 insinto /opt/${PN}/avatars
117 doins avatars/*.png
119 insinto /opt/${PN}
120 for X in 16 32 48
122 insinto /usr/share/icons/hicolor/${X}x${X}/apps
123 newins "${S}"/icons/SkypeBlue_${X}x${X}.png ${PN}.png
124 done
126 dodoc README
128 # insinto /usr/share/applications/
129 # doins skype.desktop
130 make_desktop_entry ${PN} "Skype VoIP" ${PN} "Network;InstantMessaging;Telephony"
132 #Fix for no sound notifications
133 dosym /opt/${PN} /usr/share/${PN}
135 # TODO: Optional configuration of callto:// in KDE, Mozilla and friends
136 # doexe skype-callto-handler
139 pkg_postinst() {
140 elog "If you have sound problems please visit: "
141 elog "http://forum.skype.com/bb/viewtopic.php?t=4489"
142 elog "These kernel options are reported to help"
143 elog
144 elog "Processor type and features --->"
145 elog "-- Preemption Model (Preemptible Kernel (Low-Latency Desktop))"
146 elog "-- Timer frequency (250 HZ)"
147 elog
148 ewarn "This release no longer uses the old wrapper because ${PN} now uses ALSA"
149 ewarn