summaryrefslogtreecommitdiff
blob: cb77af2161552e38427e13ababecb491d52aff52 (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-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

inherit toolchain-funcs multilib eutils

DESCRIPTION="HTTP Ardour Video Daemon"
HOMEPAGE="http://x42.github.io/harvid/"
SRC_URI="https://github.com/x42/harvid/archive/v${PV}.tar.gz -> ${P}.tar.gz"

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

RDEPEND="
	!libav? ( >=media-video/ffmpeg-2.6:0= )
	libav? ( >=media-video/libav-9:0= )
	media-libs/libpng:0=
	virtual/jpeg:0
"
DEPEND="${RDEPEND}
	virtual/pkgconfig
"

src_prepare() {
	epatch "${FILESDIR}/ffmpeg29.patch"
}

hv_make() {
	emake \
		CC="$(tc-getCC)" \
		RANLIB="$(tc-getRANLIB)" \
		STRIP="true" \
		NM="$(tc-getNM) -B" \
		LD="$(tc-getLD)" \
		AR="$(tc-getAR)" \
		PREFIX="${EPREFIX:-/}usr" \
		libdir="${EPREFIX:-/}usr/$(get_libdir)" \
		hdocdir="${EPREFIX:-/}usr/share/doc/${PF}" \
		"${@}"
}

src_compile() {
	hv_make -C libharvid
	hv_make -C src
	hv_make
}

src_install() {
	hv_make DESTDIR="${D}" install
	dodoc ChangeLog README.md
}