dev-cpp/pangomm: stable 2.42.1 for hppa, bug #717144
[gentoo.git] / net-im / mcabber / mcabber-1.1.0-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit flag-o-matic readme.gentoo-r1
7
8 DESCRIPTION="A small Jabber console client with various features, like MUC, SSL, PGP"
9 HOMEPAGE="http://mcabber.com/"
10
11 if [[ "${PV}" == 9999 ]]; then
12         inherit mercurial
13         EHG_REPO_URI="https://bitbucket.org/McKael/mcabber"
14         EHG_CHECKOUT_DIR="${WORKDIR}"
15         EHG_BOOTSTRAP="autogen.sh"
16         S="${WORKDIR}/${PN}"
17 else
18         SRC_URI="http://mcabber.com/files/${P}.tar.bz2"
19         KEYWORDS="~alpha amd64 ~arm ~mips ~ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
20 fi
21
22 LICENSE="GPL-2"
23 SLOT="0"
24
25 IUSE="aspell crypt idn otr spell ssl vim-syntax"
26
27 LANGS="cs de fr it nl pl ru uk"
28 # localized help versions are installed only, when L10N var is set
29 for i in ${LANGS}; do
30         IUSE="${IUSE} l10n_${i}"
31 done;
32
33 RDEPEND="crypt? ( >=app-crypt/gpgme-1.0.0 )
34         otr? ( >=net-libs/libotr-3.1.0 )
35         aspell? ( app-text/aspell )
36         vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
37         idn? ( net-dns/libidn:= )
38         spell? ( app-text/enchant:0 )
39         dev-libs/glib:2
40         net-libs/libnsl:0=
41         sys-libs/ncurses:0=
42         >=net-libs/loudmouth-1.4.3-r1[ssl?]"
43 DEPEND="${RDEPEND}
44         virtual/pkgconfig"
45
46 DOCS=( AUTHORS ChangeLog NEWS README TODO mcabberrc.example doc/README_PGP.txt )
47
48 pkg_setup() {
49         if use aspell && use spell; then
50                 ewarn "NOTE: You have both USE flags 'aspell' and 'spell' enabled, enchant (USE flag 'spell') will be preferred."
51         fi
52 }
53
54 src_configure() {
55         econf \
56                 --enable-modules \
57                 $(use_enable crypt gpgme) \
58                 $(use_enable otr) \
59                 $(use_enable aspell) \
60                 $(use_enable spell enchant) \
61                 $(use_with idn libidn)
62 }
63
64 src_install() {
65         default
66
67         # clean unneeded language documentation
68         for i in ${LANGS}; do
69                 use l10n_${i} || rm -rf "${ED}"/usr/share/${PN}/help/${i}
70         done
71
72         # contrib themes
73         insinto /usr/share/${PN}/themes
74         doins "${S}"/contrib/themes/*
75
76         # contrib generic scripts
77         exeinto /usr/share/${PN}/scripts
78         doexe "${S}"/contrib/*.{pl,py}
79
80         # contrib event scripts
81         exeinto /usr/share/${PN}/scripts/events
82         doexe "${S}"/contrib/events/*
83
84         if use vim-syntax; then
85                 cd contrib/vim/ || die
86
87                 insinto /usr/share/vim/vimfiles/syntax
88                 doins mcabber_log-syntax.vim
89
90                 insinto /usr/share/vim/vimfiles/ftdetect
91                 doins mcabber_log-ftdetect.vim
92         fi
93
94         readme.gentoo_create_doc
95 }
96
97 pkg_postinst() {
98         readme.gentoo_print_elog
99 }