blob: 0f77a8adaa909c3bceac5221e134a76907e5e906 (
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
PYTHON_COMPAT=( python3_{4,5} )
inherit cmake-utils python-single-r1
DESCRIPTION="Video editing library used by OpenShot"
HOMEPAGE="http://www.openshotvideo.com/"
SRC_URI="https://launchpad.net/${PN}/$(get_version_component_range 1-2)/${PV}/+download/${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="libav +python test"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND="
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtmultimedia:5[widgets]
media-gfx/imagemagick[cxx]
media-libs/libopenshot-audio
libav? ( media-video/libav:=[encode,x264,xvid,vpx,mp3,theora] )
!libav? ( media-video/ffmpeg:0=[encode,x264,xvid,vpx,mp3,theora] )
python? ( ${PYTHON_DEPS} )
"
DEPEND="
${RDEPEND}
python? ( dev-lang/swig )
test? ( dev-libs/unittest++ )
"
# https://github.com/OpenShot/libopenshot/pull/19
PATCHES=( "${FILESDIR}/${P}-fix-tests-exit-code.patch" )
S="${WORKDIR}"
pkg_setup() {
use python && python-single-r1_pkg_setup
}
src_prepare() {
use test || cmake_comment_add_subdirectory tests
pushd src > /dev/null || die
if use python; then
pushd bindings > /dev/null || die
cmake_comment_add_subdirectory ruby # TODO: support ruby
popd > /dev/null || die
else
cmake_comment_add_subdirectory bindings
fi
popd > /dev/null || die
cmake-utils_src_prepare
}
src_configure() {
if use python; then
local mycmakeargs=(
-DPYTHON_EXECUTABLE="${PYTHON}"
-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
-DPYTHON_LIBRARY="$(python_get_library_path)"
)
fi
cmake-utils_src_configure
}
src_test() {
pushd "${BUILD_DIR}/tests" > /dev/null || die
./openshot-test || die "Tests failed"
popd > /dev/null || die
}
|