summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Sautier <sautier.louis@gmail.com>2016-03-10 12:01:57 +0100
committerIan Delaney <idella4@gentoo.org>2016-03-15 21:32:05 +0800
commitfe2742014af5a4a1f306cc3f1ee5d3e5be7ed64c (patch)
tree4e10d44877f6d34f6ecc79b5092a293e6e854033 /media-libs/libopenshot
parentmedia-libs/libopenshot-audio: new ebuild, version 0.0.6 (diff)
downloadgentoo-fe2742014af5a4a1f306cc3f1ee5d3e5be7ed64c.tar.gz
gentoo-fe2742014af5a4a1f306cc3f1ee5d3e5be7ed64c.tar.bz2
gentoo-fe2742014af5a4a1f306cc3f1ee5d3e5be7ed64c.zip
media-libs/libopenshot: new ebuild, version 0.1.0
Needed for media-video/openshot-2.0.6 Package-Manager: portage-2.2.27 Closes: https://github.com/gentoo/gentoo/pull/1023
Diffstat (limited to 'media-libs/libopenshot')
-rw-r--r--media-libs/libopenshot/Manifest1
-rw-r--r--media-libs/libopenshot/files/libopenshot-0.1.0-fix-tests-exit-code.patch31
-rw-r--r--media-libs/libopenshot/libopenshot-0.1.0.ebuild76
-rw-r--r--media-libs/libopenshot/metadata.xml19
4 files changed, 127 insertions, 0 deletions
diff --git a/media-libs/libopenshot/Manifest b/media-libs/libopenshot/Manifest
new file mode 100644
index 000000000000..2a3fdcab7443
--- /dev/null
+++ b/media-libs/libopenshot/Manifest
@@ -0,0 +1 @@
+DIST libopenshot-0.1.0.tar.gz 10970157 SHA256 1eb3cc27d9d5a5c966dd5dd445567239c6cbcc08772ba99e5f3b52c87a28d809 SHA512 bd5767b96ae38da7f31bfcca3ec5b34c458ab271d3e899b1982cd09b0576d29a3101c54fc840766d40aa7cbc83130064f0440f5c465999f0518449318ab87480 WHIRLPOOL c485271357545e85b94753659f0a58f4e7b0f4c4ee2a4d53bbcb1d650a3cef730103b73577848d0e2e6a355d42788451fbc1839c82343b2f172c3fd725906f29
diff --git a/media-libs/libopenshot/files/libopenshot-0.1.0-fix-tests-exit-code.patch b/media-libs/libopenshot/files/libopenshot-0.1.0-fix-tests-exit-code.patch
new file mode 100644
index 000000000000..ba6cb8ed5a82
--- /dev/null
+++ b/media-libs/libopenshot/files/libopenshot-0.1.0-fix-tests-exit-code.patch
@@ -0,0 +1,31 @@
+From c7dcc18b23e6bfeff8c37f542b37b081bc422f9b Mon Sep 17 00:00:00 2001
+From: Louis Sautier <sautier.louis@gmail.com>
+Date: Tue, 15 Mar 2016 00:35:16 +0100
+Subject: [PATCH] Exit tests with the return value from RunAllTests()
+
+---
+ tests/tests.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tests/tests.cpp b/tests/tests.cpp
+index 5265959..2321513 100644
+--- a/tests/tests.cpp
++++ b/tests/tests.cpp
+@@ -33,14 +33,15 @@ using namespace UnitTest;
+
+ int main()
+ {
++ int exit_code = 0;
+ cout << "----------------------------" << endl;
+ cout << " RUNNING ALL TESTS" << endl;
+ cout << "----------------------------" << endl;
+
+ // Run all unit tests
+- RunAllTests();
++ exit_code = RunAllTests();
+
+ cout << "----------------------------" << endl;
+
+- return 0;
++ return exit_code;
+ }
diff --git a/media-libs/libopenshot/libopenshot-0.1.0.ebuild b/media-libs/libopenshot/libopenshot-0.1.0.ebuild
new file mode 100644
index 000000000000..b7907a9f0eee
--- /dev/null
+++ b/media-libs/libopenshot/libopenshot-0.1.0.ebuild
@@ -0,0 +1,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
+ 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
+}
diff --git a/media-libs/libopenshot/metadata.xml b/media-libs/libopenshot/metadata.xml
new file mode 100644
index 000000000000..6d948f2667e8
--- /dev/null
+++ b/media-libs/libopenshot/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>sautier.louis@gmail.com</email>
+ <name>Louis Sautier</name>
+ <description>Proxied maintainer; set to assignee in all bugs</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="launchpad">libopenshot</remote-id>
+ <remote-id type="github">OpenShot/libopenshot</remote-id>
+ <bugs-to>https://github.com/OpenShot/libopenshot/issues</bugs-to>
+ <bugs-to>https://bugs.launchpad.net/libopenshot/+bugs</bugs-to>
+ </upstream>
+</pkgmetadata>