summaryrefslogtreecommitdiff
blob: 58359b62570837f8a37f8b035f33179b384c0b62 (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
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI="2"

inherit eutils toolchain-funcs multilib

DESCRIPTION="A ucspi implementation for unix sockets"
HOMEPAGE="http://untroubled.org/ucspi-unix/"
SRC_URI="http://untroubled.org/ucspi-unix/archive/${P}.tar.gz"

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

DEPEND=">=dev-libs/bglibs-1.106"

src_prepare() {
	epatch "${FILESDIR}"/${PN}-gentoo-head.patch
	epatch "${FILESDIR}"/${P}-include-sys_socket.h.patch
	epatch "${FILESDIR}"/${P}-fix-parallel-build.patch
}

src_configure() {
	local has_peercred
	use kernel_linux && has_peercred="-DHASPEERCRED=1"

	echo "$(tc-getCC) ${CFLAGS} -I/usr/include/bglibs ${has_peercred} -D_GNU_SOURCE" > conf-cc
	echo "$(tc-getCC) ${LDFLAGS} -L/usr/$(get_libdir)/bglibs" > conf-ld
}

src_install() {
	dobin unixserver unixclient unixcat || die
	doman unixserver.1 unixclient.1
	dodoc ANNOUNCEMENT NEWS PROTOCOL README TODO
}