Copyright 1999-2009 Gentoo Foundation Distributed under the terms of t

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-im/psi/psi-9999.ebuild,v 1.0 2008/03/24 08:52:16 Rion Exp $
EAPI="2"
inherit eutils qt4 multilib git subversion
LANGPACK_VER="20090217"
RU_LANGPACK_VER="05_Jul_2009"
DESCRIPTION="Qt4 Jabber Client, with Licq-like interface"
HOMEPAGE="http://psi-im.org/"
SRC_URI="
linguas_ru? ( http://psi-ru.googlecode.com/files/Psi_ru_${RU_LANGPACK_VER}.zip )
!linguas_ru? ( mirror://gentoo/${PN}-langs-${LANGPACK_VER}.tar.bz2 )
http://psi-dev.googlecode.com/svn/trunk/iconsets/moods/silk.jisp"
EGIT_REPO_URI="git://git.psi-im.org/psi.git"
EGIT_PROJECT="psi"
PATCHES_URI=http://psi-dev.googlecode.com/svn/trunk/patches
PSIPLUS_ICONS_URI=http://psi-dev.googlecode.com/svn/trunk/iconsets/psiplus/default
CLIENTS_ICONS_URI=http://psi-dev.googlecode.com/svn/trunk/iconsets/clients/default
ESVN_PROJECT=psiplus
LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE="crypt dbus debug doc jingle spell ssl xscreensaver powersave plugins"
RESTRICT="test"
LANGS="cs de eo es_ES fr it mk pl pt_BR ru uk ur_PK vi zh zh_TW"
for LNG in ${LANGS}; do
IUSE="${IUSE} linguas_${LNG}"
done
RDEPEND=">=x11-libs/qt-gui-4.4:4[qt3support,dbus?]
>=app-crypt/qca-2.0.2:2
whiteboarding? ( >=x11-libs/qt-svg-4.4:4 )
spell? ( app-text/aspell )
xscreensaver? ( x11-libs/libXScrnSaver )"
DEPEND="${RDEPEND}
sys-devel/qconf
doc? ( app-doc/doxygen )"
PDEPEND="crypt? ( app-crypt/qca-gnupg:2 )
jingle? ( net-im/psimedia )
ssl? ( app-crypt/qca-ossl:2 )"
src_unpack() {
use linguas_ru && unpack "Psi_ru_${RU_LANGPACK_VER}.zip"
! use linguas_ru && unpack "${PN}-langs-${LANGPACK_VER}.tar.bz2"
git_src_unpack
S="${S}/iris"
[[ -d "$S" ]] && rm -rf $S
EGIT_REPO_URI="git://git.psi-im.org/iris.git"
EGIT_PROJECT="iris"
git_src_unpack
S="${WORKDIR}/patches"
ESVN_REPO_URI="${PATCHES_URI}"
subversion_src_unpack
S="${WORKDIR}/${P}/iconsets/psiplus/default"
ESVN_REPO_URI="${PSIPLUS_ICONS_URI}"
ESVN_PROJECT=psiplus/psiplus
subversion_src_unpack
S="${WORKDIR}/${P}/iconsets/clients/default"
ESVN_REPO_URI="${CLIENTS_ICONS_URI}"
ESVN_PROJECT=psiplus/clients
subversion_src_unpack
}
src_prepare() {
rm "${WORKDIR}/patches"/*-psi-win32-* #useless windows patches
rm "${WORKDIR}/patches"/*dirty-check* #useless update check
S="${WORKDIR}/${P}"
cd "${S}"
epatch "${WORKDIR}/patches"/*.diff
use powersave && epatch "${WORKDIR}/patches/dev"/psi-reduce-power-consumption.patch
subversion_wc_info
sed "s/.xxx/.${ESVN_WC_REVISION}/" -i src/applicationinfo.cpp
# enable plugins if disabled
sed 's/<!--\(.*plugins.*\)-->/\1/' -i psi.qc
# enable whiteboarding
use whiteboarding && {
sed 's/#CONFIG += whiteboarding/CONFIG += whiteboarding/' \
-i src/src.pro
# fix undefined qdebug
sed '/qDebug/d' -i src/sxe/sxeedit.cpp
sed '/qDebug/d' -i src/sxe/sxerecord.cpp
ewarn "whiteboarding is very unstable thing.";
ewarn "don't post bug reports about it";
}
rm -rf third-party/qca # We use system libraries.
qconf
}
src_configure() {
# unable to use econf because of non-standard configure script
# disable growl as it is a MacOS X extension only
local confcmd="./configure
--prefix=/usr
--qtdir=/usr
--disable-bundled-qca
--disable-growl
$(use dbus || echo '--disable-qdbus')
$(use debug && echo '--enable-debug')
$(use spell || echo '--disable-aspell')
$(use xscreensaver || echo '--disable-xss')
$(use plugins && echo '--enable-plugins')"
echo ${confcmd}
${confcmd} || die "configure failed"
}
src_compile() {
eqmake4 ${PN}.pro
emake || die "emake failed"
if use doc; then
cd doc
mkdir -p api # 259632
make api_public || die "make api_public failed"
fi
}
src_install() {
emake INSTALL_ROOT="${D}" install || die "emake install failed"
# this way the docs will be installed in the standard gentoo dir
newdoc iconsets/roster/README README.roster || die
newdoc iconsets/system/README README.system || die
newdoc certs/README README.certs || die
dodoc README || die
if use doc; then
cd doc
dohtml -r api || die "dohtml failed"
fi
# install translations
insinto /usr/share/${PN}/
if use linguas_ru; then
cd "${WORKDIR}"
doins psi_ru.qm
doins qt_ru.qm
else
cd "${WORKDIR}/${PN}-langs"
for LNG in ${LANGS}; do
if use linguas_${LNG}; then
doins ${PN}_${LNG/ur_PK/ur_pk}.qm || die
fi
done
fi
insinto /usr/share/psi/iconsets/moods/
doins "${PORTAGE_ACTUAL_DISTDIR}"/silk.jisp
if use plugins; then
cd "${S}"
insinto /usr/share/psi/plugins
doins "${S}/src/plugins/plugins.pri"
doins "${S}/src/plugins/psiplugin.pri"
doins -r "${S}/src/plugins/include"
fi
}