summaryrefslogtreecommitdiff
blob: 2eec954acb127f9ccc497ab75e53f0b6a70fb8c8 (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-video/camserv/camserv-0.5.1-r2.ebuild,v 1.17 2012/05/24 03:44:58 ssuominen Exp $

EAPI=4
inherit autotools eutils

DESCRIPTION="A streaming video server"
HOMEPAGE="http://cserv.sourceforge.net"
SRC_URI="mirror://sourceforge/cserv/${P}.tar.gz"

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

# libtool's libltdl is used for loading plugins
RDEPEND="media-libs/imlib2
	>=sys-devel/libtool-2.2.6b
	virtual/jpeg"
DEPEND="${RDEPEND}
	media-libs/libv4l" # libv4l1-videodev.h wrt #396635

DOCS="AUTHORS BUGS ChangeLog NEWS README TODO javascript.txt"

src_prepare() {
	epatch \
		"${FILESDIR}"/${P/.1}-errno.patch \
		"${FILESDIR}"/${P}-libtool.patch \
		"${FILESDIR}"/${P}-memcpy.patch

	# no longer existing macro (AM_ACLOCAL_INCLUDE), but we don't need it
	# linux-headers no longer ship videodev.h wrt #396635
	sed -i \
		-e '/AM_ACLOCAL_INCLUDE/d' \
		-e 's:linux/videodev.h:libv4l1-videodev.h:' \
		configure.in camserv/video_v4l.c || die

	AT_M4DIR=macros eautoreconf
}

src_configure() {
	econf --disable-static
}

src_install() {
	default

	newinitd "${FILESDIR}"/camserv.init camserv

	find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
}