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-audio/Manifest | 2 + .../libopenshot-audio-0.1.4.ebuild | 33 +++++++++ media-libs/libopenshot/Manifest | 3 + .../files/libopenshot-0.1.6-fix-tests.patch | 26 +++++++ media-libs/libopenshot/libopenshot-0.1.6.ebuild | 84 ++++++++++++++++++++++ media-video/openshot/Manifest | 2 + media-video/openshot/openshot-2.3.3.ebuild | 55 ++++++++++++++ 7 files changed, 205 insertions(+) create mode 100644 media-libs/libopenshot-audio/Manifest create mode 100644 media-libs/libopenshot-audio/libopenshot-audio-0.1.4.ebuild 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 create mode 100644 media-video/openshot/Manifest create mode 100644 media-video/openshot/openshot-2.3.3.ebuild diff --git a/media-libs/libopenshot-audio/Manifest b/media-libs/libopenshot-audio/Manifest new file mode 100644 index 0000000..3e9166e --- /dev/null +++ b/media-libs/libopenshot-audio/Manifest @@ -0,0 +1,2 @@ +DIST libopenshot-audio-0.1.4.tar.gz 2959997 SHA256 3aa8cff51913a65e266b49699858fd5139b63817bd207145cf5699fe75d2459e SHA512 5605164a8c66c33ac893cc2b42cdacffff03eb156a61740c1b2c00dd7e7602a802fa1dc3795c620810e3ee29a290aa6bae8b62bc17eab3f4dd2d8052e0481824 WHIRLPOOL 3022438a912ed17684e8946f70d315c58bd2b1a8f5897c795c837e2aaaf9426f87e31aded294b6eadb583c7108df7331cf76476b21847fa0a3d78a0803da70fe +EBUILD libopenshot-audio-0.1.4.ebuild 768 SHA256 a01ee52d5d6959eb10d7c6f46a4b4956db94abff80c9a074c08b84b1ecb972a4 SHA512 b8b66c01a8194e7846bce3c3b7518160abee23d518ce842b0b7a64185837f7a73d3cf556360d11f533a383d68918c31c384e22405d0f9244da5a3ef2cd1a59f9 WHIRLPOOL a24a91b8a91386ad983157132c49e398827d2cbc1f310e897b296c01d6cb346cb665940ffa599d80fe63bd7e27571b4587a62491ba07994d83754695baf8fba3 diff --git a/media-libs/libopenshot-audio/libopenshot-audio-0.1.4.ebuild b/media-libs/libopenshot-audio/libopenshot-audio-0.1.4.ebuild new file mode 100644 index 0000000..44fffc1 --- /dev/null +++ b/media-libs/libopenshot-audio/libopenshot-audio-0.1.4.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-utils + +DESCRIPTION="Audio library used by OpenShot" +HOMEPAGE="http://www.openshot.org/ https://launchpad.net/libopenshot" +SRC_URI="https://github.com/OpenShot/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + media-libs/alsa-lib + media-libs/freetype + x11-libs/libX11 + x11-libs/libXcursor + x11-libs/libXext + x11-libs/libXinerama + x11-libs/libXrandr +" +DEPEND="${RDEPEND}" + +src_prepare() { + # fix under-linking + # https://github.com/OpenShot/libopenshot-audio/issues/3 + sed -i 's/^\(target_link_libraries(.*\))$/\1 dl pthread)/' \ + src/CMakeLists.txt || die + cmake-utils_src_prepare +} 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 +} diff --git a/media-video/openshot/Manifest b/media-video/openshot/Manifest new file mode 100644 index 0000000..8f807d8 --- /dev/null +++ b/media-video/openshot/Manifest @@ -0,0 +1,2 @@ +DIST openshot-qt-2.3.3.tar.gz 60640932 SHA256 920c4e77ad290af255501c933eaac4b1883a3d632565252cc472081f82c99d8a SHA512 12339e25c1d8c84d2474617dc95911bb6a2beb49ab497d0c5a712c853bc5b7447c5c9fb8df69e78dafe50e6c49c4a9df0bbee3f3e01002d888bda9269792c825 WHIRLPOOL 436899a84cb3ac4f55ab8258066daec3ca76d0c5e4e31c4af9e090b44be6fa05b5156691e7e224175e12cdf6e58525573e2b91f253648eb39b4721c79a24a6b6 +EBUILD openshot-2.3.3.ebuild 1203 SHA256 3efad3f9b11b7da966bfbf770a076960c27ec1eb35813ecef413fa7e3d90c33e SHA512 8caeb2192ebd50d822467cacff2036c805fbe6489fa965d88ad2ce0d65dcd0c37d3cd621000b92b0d9b90fdce598f3ba82b1cb1d6d3fd8426ac2dd761cf494ff WHIRLPOOL 0854b822adfefffb2bad8d2f040bbe82497647dffc30e52ab9d7b4c722ec17ece0299ee78a0cfe5ce13a38a6ff729a9eeed2ebfa84f7224b6cf04a6279d331e3 diff --git a/media-video/openshot/openshot-2.3.3.ebuild b/media-video/openshot/openshot-2.3.3.ebuild new file mode 100644 index 0000000..baf9025 --- /dev/null +++ b/media-video/openshot/openshot-2.3.3.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_REQ_USE=xml +PYTHON_COMPAT=( python3_{4,5} ) +DISTUTILS_SINGLE_IMPL=1 + +inherit distutils-r1 gnome2-utils versionator xdg + +MY_PN="${PN}-qt" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Free, open-source, non-linear video editor to create and edit videos and movies" +HOMEPAGE="http://www.openshot.org/ https://launchpad.net/openshot" +SRC_URI="https://launchpad.net/${PN}/$(get_version_component_range 1-2)/${PV}/+download/${MY_P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="1" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + dev-python/PyQt5[svg,webkit,${PYTHON_USEDEP}] + media-libs/libopenshot[python,${PYTHON_USEDEP}] + dev-python/httplib2[${PYTHON_USEDEP}] + dev-python/pyzmq[${PYTHON_USEDEP}] +" +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] +" + +S="${WORKDIR}" + +src_prepare() { + # prevent setup.py from trying to update MIME databases + sed -i 's/^ROOT =.*/ROOT = False/' setup.py || die + xdg_src_prepare + distutils-r1_src_prepare +} + +pkg_preinst() { + xdg_pkg_preinst + gnome2_icon_savelist +} + +pkg_postinst() { + xdg_pkg_postinst + gnome2_icon_cache_update +} + +pkg_postrm() { + xdg_pkg_postrm + gnome2_icon_cache_update +} -- cgit v1.2.3