summaryrefslogtreecommitdiff
blob: fe490e72091d8754c9c23ece3bc8b4f76ab091d1 (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
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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-im/sim/sim-0.9.4.3-r2.ebuild,v 1.2 2008/07/27 22:03:57 carlo Exp $

EAPI=1

inherit kde-functions eutils flag-o-matic

DESCRIPTION="Simple Instant Messenger (with KDE support). ICQ/AIM/Jabber/MSN/Yahoo."
HOMEPAGE="http://sim-im.org/"
SRC_URI="mirror://berlios/sim-im/${P}.tar.bz2
	http://dev.gentoo.org/~pva/${P}-r1919_1924.patch.bz2"
LICENSE="GPL-2"

SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="debug kde spell ssl"

RESTRICT="fetch"

# kdebase-data provides the icon "licq.png"
RDEPEND="kde? ( =kde-base/kdelibs-3.5*
				|| ( =kde-base/kdebase-data-3.5* =kde-base/kdebase-3.5* ) )
		 !kde? ( x11-libs/qt:3
				 spell? ( app-text/aspell ) )
		 ssl? ( dev-libs/openssl )
		 dev-libs/libxml2
		 dev-libs/libxslt
		 sys-libs/zlib
		 x11-libs/libXScrnSaver"

DEPEND="${RDEPEND}
	sys-devel/flex
	app-arch/zip
	x11-proto/scrnsaverproto"

pkg_nofetch() {
	einfo "${CATEGORY}/${P} contains icons and sounds with unclear licensing and thus"
	einfo "you have to download and it put into '${DISTDIR}' by yourself."
	einfo "Download location:"
	echo
	einfo "${SRC_URI}"
	echo
	einfo "See http://archives.gentoo.org/gentoo-dev/msg_144003.xml for further"
	einfo "information."
}

pkg_setup() {
	if use kde; then
		if use spell; then
			if ! built_with_use "=kde-base/kdelibs-3.5*" spell; then
				ewarn "kde-base/kdelibs were merged without spell in USE."
				ewarn "Thus spelling will not work in sim. Please, either"
				ewarn "reemerge kde-base/kdelibs with spell in USE or emerge"
				ewarn 'sim with USE="-spell" to avoid this message.'
				ebeep
			fi
		else
			if built_with_use "=kde-base/kdelibs-3.5*" spell; then
				ewarn 'kde-base/kdelibs were merged with spell in USE.'
				ewarn 'Thus spelling will work in sim. Please, either'
				ewarn 'reemerge kde-base/kdelibs without spell in USE or emerge'
				ewarn 'sim with USE="spell" to avoid this message.'
				ebeep
			fi
		fi
		if ! built_with_use "=kde-base/kdelibs-3.5*" arts; then
			myconf="--without-arts"
		fi
	fi
}

src_unpack() {
	unpack ${A}
	cd "${S}"

	epatch "${FILESDIR}"/${P}-double-message-fix.patch
	epatch "${FILESDIR}"/${P}-sslv23.patch
	epatch ../${P}-r1919_1924.patch
	if use kde; then
		set-kdedir 3
	fi
}

src_compile() {
	filter-flags -fstack-protector -fstack-protector-all

	# Workaround for bug #119906
	append-flags -fno-stack-protector

	use kde || use spell || export DO_NOT_COMPILE="$DO_NOT_COMPILE plugins/spell"

	econf ${myconf} $(use_enable kde) \
		  $(use_with ssl) \
		  $(use_enable debug) || die "econf failed"

	emake -j1 || die "make failed"
}

src_install() {
	make DESTDIR="${D}" install || die "make install failed."
	dodoc TODO README AUTHORS.sim jisp-resources.txt ChangeLog
}