summaryrefslogtreecommitdiff
blob: 940b5f0a3967c77af91f8beb6c7101772cff06bf (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
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
inherit autotools

DESCRIPTION="Small but powerful library implementing the client-server IRC protocol"
HOMEPAGE="http://www.ulduzsoft.com/libircclient/"
SRC_URI="mirror://sourceforge/libircclient/${P}.tar.gz"

LICENSE="LGPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="doc ipv6 ssl static-libs threads"

DEPEND="ssl? ( dev-libs/openssl:0 )"
RDEPEND=${DEPEND}

PATCHES=(
	"${FILESDIR}"/${PN}-1.8-build.patch
	"${FILESDIR}"/${PN}-1.10-shared.patch
	"${FILESDIR}"/${PN}-1.8-static.patch
	"${FILESDIR}"/${PN}-1.8-include.patch

	# upstream patches (can usually be removed with next version bump)
	"${FILESDIR}"/${PN}-1.10-openssl.patch
)

src_prepare() {
	default
	mv configure.in configure.ac || die
	eautoconf
}

src_configure() {
	local myeconfargs=(
		$(use_enable threads)
		$(use_enable ipv6)
		$(use_enable ssl openssl)
		$(use_enable ssl threads)
	)
	econf "${myeconfargs[@]}"
}

src_compile() {
	emake -C src $(usex static-libs "shared static" "shared")
}

src_install() {
	emake -C src DESTDIR="${D}" install-shared $(usex static-libs "install-static" "")
	insinto /usr/include/libircclient
	doins include/*.h

	dodoc Changelog THANKS
	doman man/libircclient.1
}