summaryrefslogtreecommitdiff
blob: 3d1b46ff6069c9a640b1d4fa65ef25348e720a71 (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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit cmake-utils eutils

DESCRIPTION="Off-The-Record messaging (OTR) for irssi"
HOMEPAGE="http://projects.tuxfamily.org/group.pl?name=irssiotr"

# This should probably be exported by cmake-utils as a variable
CMAKE_BINARY_DIR="${WORKDIR}"/${PN}_build

MY_PV=v${PV/_/-}
S="${WORKDIR}/irssiotr"

MY_IRSSI_URL="http://svn.irssi.org/cgi-bin/viewvc.cgi/irssi/trunk/src/fe-text"
MY_IRSSI_URLPARMS="revision=4806&root=irssi"
SRC_URI="
	${MY_IRSSI_URL}/mainwindows.h?${MY_IRSSI_URLPARMS}
	${MY_IRSSI_URL}/term.h?${MY_IRSSI_URLPARMS}
	${MY_IRSSI_URL}/statusbar.h?${MY_IRSSI_URLPARMS}
	http://git.tuxfamily.org/irssiotr/irssiotr.git?p=gitroot/irssiotr/irssiotr.git;a=snapshot;h=${MY_PV};sf=tgz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug"

RDEPEND="
	>=net-libs/libotr-3.1.0
	net-irc/irssi"

DEPEND="${RDEPEND}
	dev-libs/glib
	>=dev-util/cmake-2.4.7
	dev-util/pkgconfig
	dev-lang/python"

src_unpack() {
	ln -s "${DISTDIR}/irssiotr.git;a=snapshot;h=${MY_PV};sf=tgz" ${P}.tgz
	unpack ./${P}.tgz

	mkdir -p "${CMAKE_BINARY_DIR}"

	# copy prefetched irssi private headers and patch them
	# a bug has been filed to make these public, irssi FS#535
	for privheader in mainwindows.h term.h statusbar.h; do
		cp "${DISTDIR}/${privheader}?${MY_IRSSI_URLPARMS}" \
			"${CMAKE_BINARY_DIR}/${privheader}" \
			|| die "failed to copy prefetched irssi private headers"
	done
	cd "${CMAKE_BINARY_DIR}"
	epatch "${S}"/privheaders.patch
	mycmakeargs="-DIRSSIOTR_VERSION=${PV}"
}