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