From 2c867ff5f7b592f52d9f1a18292b6e5b2f4c1c99 Mon Sep 17 00:00:00 2001 From: Marcin Deranek Date: Sat, 10 Jun 2017 21:36:52 +0200 Subject: Added openshot with extra libraries --- media-libs/libopenshot/Manifest | 3 + .../files/libopenshot-0.1.6-fix-tests.patch | 26 +++++++ media-libs/libopenshot/libopenshot-0.1.6.ebuild | 84 ++++++++++++++++++++++ 3 files changed, 113 insertions(+) create mode 100644 media-libs/libopenshot/Manifest create mode 100644 media-libs/libopenshot/files/libopenshot-0.1.6-fix-tests.patch create mode 100644 media-libs/libopenshot/libopenshot-0.1.6.ebuild (limited to 'media-libs/libopenshot') diff --git a/media-libs/libopenshot/Manifest b/media-libs/libopenshot/Manifest new file mode 100644 index 0000000..0caebf3 --- /dev/null +++ b/media-libs/libopenshot/Manifest @@ -0,0 +1,3 @@ +AUX libopenshot-0.1.6-fix-tests.patch 1084 SHA256 45aced268c7d847f29d942d328c86d2c718a3731c4aec795cea257a30927d6e3 SHA512 412320163c30bc4ee6e9dbedeebae37d6fcb71023c3513171f93d6108c53df2e0dd6e0e31657f9c16f3206356c876ddb9bb84abf3ec7f036997dbdac43139d92 WHIRLPOOL e3ec28aafb580471c36bc0118fe01ca86bd8c397e580b5f36d49f692289c7bfa67f2c19b76570b826e47cd4f4e80bc98e06fbe510b4aec7b4af63c9688f0f969 +DIST libopenshot-0.1.6.tar.gz 11022639 SHA256 c3f9713b7d64629a2a446ffe77a743bef036d050fb3057fe4dc6e61beb25f26f SHA512 603349b0295c743101b072e2c41251cbffffd3244525175cdc0cd765961a29248a2cc7e972788e6e643eb127499f35d12e30ab5a290e9a61f2fb1bc5f310452f WHIRLPOOL 3fcbe3f056ca0989ec0be96999a3f098d05e72f397a814de3e4b0cd56b7b722eaea9b80c5aa49cee1936015fd15b0a903a7b21ff83392083d72304ee3e7f3efd +EBUILD libopenshot-0.1.6.ebuild 2138 SHA256 f70c1f2d94c80616eae718d8e41cb4e5de92048b10634a799f5ba235d598e237 SHA512 7b6b6ae56d2a89d4fc899a989ae567f91269566e8c979a1763a351bd149747d2e45b93b5ef6b429cef9d57eb09830883d6b45e552d8b479e3f9f692b98ccf73c WHIRLPOOL 5897f5021de5982ee7120a76f7416f6562eec51a3fef8885c47e90d0d120c6b6ec4e3a1eac5c2cce171c7aa710305300baab7b57524f2e852b890100227bff71 diff --git a/media-libs/libopenshot/files/libopenshot-0.1.6-fix-tests.patch b/media-libs/libopenshot/files/libopenshot-0.1.6-fix-tests.patch new file mode 100644 index 0000000..8ed3102 --- /dev/null +++ b/media-libs/libopenshot/files/libopenshot-0.1.6-fix-tests.patch @@ -0,0 +1,26 @@ +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 29fbe45..ff67cb5 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -24,16 +24,19 @@ + # along with OpenShot Library. If not, see . + ################################################################################ + ++SET(TEST_MEDIA_PATH "${openshot_SOURCE_DIR}/src/examples/") + + ################ WINDOWS ################## + # Set some compiler options for Windows + # required for libopenshot-audio headers + IF (WIN32) +- STRING(REPLACE "/" "\\\\" TEST_MEDIA_PATH "${openshot_SOURCE_DIR}/src/examples/") +- add_definitions( -DIGNORE_JUCE_HYPOT=1 -DTEST_MEDIA_PATH="${TEST_MEDIA_PATH}" ) ++ STRING(REPLACE "/" "\\\\" TEST_MEDIA_PATH TEST_MEDIA_PATH) ++ add_definitions( -DIGNORE_JUCE_HYPOT=1 ) + SET(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -include cmath -std=c++0x") + ENDIF(WIN32) + ++add_definitions( -DTEST_MEDIA_PATH="${TEST_MEDIA_PATH}" ) ++ + ################### UNITTEST++ ##################### + # Find UnitTest++ libraries (used for unit testing) + FIND_PACKAGE(UnitTest++ REQUIRED) diff --git a/media-libs/libopenshot/libopenshot-0.1.6.ebuild b/media-libs/libopenshot/libopenshot-0.1.6.ebuild new file mode 100644 index 0000000..cc13df3 --- /dev/null +++ b/media-libs/libopenshot/libopenshot-0.1.6.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python3_{4,5} ) + +inherit cmake-utils python-single-r1 toolchain-funcs versionator + +DESCRIPTION="Video editing library used by OpenShot" +HOMEPAGE="http://www.openshotvideo.com/" +SRC_URI="https://github.com/OpenShot/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+imagemagick libav +python test" +# https://github.com/OpenShot/libopenshot/issues/43 +RESTRICT="test" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + net-libs/cppzmq + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtmultimedia:5[widgets] + media-libs/libopenshot-audio + imagemagick? ( media-gfx/imagemagick:0=[cxx] ) + 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/45 +PATCHES=( ${FILESDIR}/${P}-fix-tests.patch ) + +pkg_pretend() { + if [[ ${MERGE_TYPE} != binary ]] && ! tc-has-openmp; then + eerror "${P} requires a compiler with OpenMP support. Your current" + eerror "compiler does not support it. If you use gcc, you can" + eerror "re-emerge it with the 'openmp' use flag enabled." + die "The current compiler does not support OpenMP" + fi +} + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # https://github.com/OpenShot/libopenshot/issues/17 + use test || cmake_comment_add_subdirectory tests + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DENABLE_RUBY=OFF # TODO: add ruby support + -DENABLE_PYTHON=$(usex python) + -DCMAKE_DISABLE_FIND_PACKAGE_ImageMagick=$(usex !imagemagick) + ) + use python && mycmakeargs+=( + -DPYTHON_EXECUTABLE="${PYTHON}" + -DPYTHON_INCLUDE_DIR="$(python_get_includedir)" + -DPYTHON_LIBRARY="$(python_get_library_path)" + ) + cmake-utils_src_configure +} + +src_test() { + cd "${BUILD_DIR}" || die + emake test +} + +src_install() { + cmake-utils_src_install + python_optimize +} -- cgit v1.2.3