blob: f366ad7bac507f0408a549f865990b119dca1ac4 (
plain)
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
|
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
PYTHON_COMPAT=( python2_7 )
inherit eutils python-any-r1
MY_PN=${PN/_/-}
MY_P=${MY_PN}-${PV}
DESCRIPTION="A package with many different plugins for pidgin and libpurple"
HOMEPAGE="https://bitbucket.org/rekkanoryo/purple-plugin-pack/"
SRC_URI="https://bitbucket.org/rekkanoryo/${MY_PN}/downloads/${MY_P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 hppa ppc x86"
IUSE="debug gtk ncurses spell talkfilters"
RDEPEND="dev-libs/json-glib
net-im/pidgin[gtk?,ncurses?]
talkfilters? ( app-text/talkfilters )
spell? ( app-text/gtkspell:2 )"
DEPEND="${RDEPEND}
${PYTHON_DEPS}"
S=${WORKDIR}/${MY_P}
src_prepare() {
sed -e '/CFLAGS=/{s| -g3||}' -i configure || die
}
list_plugins_dep() {
local dependency=${1}
grep -EH "depends.*$dependency" */plugins.cfg | sed 's:/.*::'
}
src_configure() {
local plugins=""
# list all plugins, then pull DISABLED_PLUGINS with the ones we don't need
plugins="$(${EPYTHON} plugin_pack.py -d dist_dirs)"
einfo "List of all possible plugins:"
einfo "${plugins}"
eval DISABLED_PLUGINS="\$${PN//[^a-z]/_}_DISABLED_PLUGINS"
# disable known broken plugins
DISABLED_PLUGINS+=" schedule findip"
use gtk || DISABLED_PLUGINS+=" $(list_plugins_dep pidgin)"
use ncurses || DISABLED_PLUGINS+=" $(list_plugins_dep finch)"
use spell || DISABLED_PLUGINS+=" $(list_plugins_dep gtkspell)"
use talkfilters || DISABLED_PLUGINS+=" $(list_plugins_dep talkfiltersbin)"
for plug in ${DISABLED_PLUGINS}; do
plugins="${plugins//${plug}}"
done
plugins="$(echo ${plugins} | sed 's:[ \t]\+:,:g;s:,$::;s:^,::')"
econf \
--with-plugins="${plugins}" \
$(use_enable debug)
}
src_install() {
emake DESTDIR="${D}" install
dodoc AUTHORS ChangeLog NEWS README VERSION
}
pkg_preinst() {
elog "Note: if you want to disable some plugins in pack, define"
elog "${PN//[^a-z]/_}_DISABLED_PLUGINS with a list of plugins to"
elog "skip during install (for list see einfo in build output)."
}
|