diff options
Diffstat (limited to 'media-libs/libopenshot')
-rw-r--r-- | media-libs/libopenshot/Manifest | 8 | ||||
-rw-r--r-- | media-libs/libopenshot/files/libopenshot-0.1.3-fix-tests.patch | 26 | ||||
-rw-r--r-- | media-libs/libopenshot/files/libopenshot-0.2.2-imagemagick7.patch | 78 | ||||
-rw-r--r-- | media-libs/libopenshot/libopenshot-0.1.3.ebuild | 84 | ||||
-rw-r--r-- | media-libs/libopenshot/libopenshot-0.2.2.ebuild (renamed from media-libs/libopenshot/libopenshot-0.1.7.ebuild) | 23 |
5 files changed, 95 insertions, 124 deletions
diff --git a/media-libs/libopenshot/Manifest b/media-libs/libopenshot/Manifest index 514b42e2d353..4be3af3fe327 100644 --- a/media-libs/libopenshot/Manifest +++ b/media-libs/libopenshot/Manifest @@ -1,9 +1,7 @@ -AUX libopenshot-0.1.3-fix-tests.patch 1084 BLAKE2B a3bfa594403f36e37e7cf5078d7975384a5e0af3dd4fb1e2cb20b969b4fa5554e5dd6a8a9a55d7f4e76a23cfb5c9e3f04a01786b84c45dd8854a6757fdc35d5a SHA512 412320163c30bc4ee6e9dbedeebae37d6fcb71023c3513171f93d6108c53df2e0dd6e0e31657f9c16f3206356c876ddb9bb84abf3ec7f036997dbdac43139d92 AUX libopenshot-0.1.8-fix-tests.patch 1073 BLAKE2B 1ee4f19a3251924c688c49059a55510e620df9f2cdfd30bcd23b32e3cd1b4a8b1976e29837322f3ea1bb74e88a69aab60f6fdcf39747ce1e34a8d76654d6539c SHA512 0adaae336fe5d8a8eaf74b5c0b39eeb6845c54d60d506eb6ba24238a1064c536c0d1e903a673175c3d498bb6c1926a4ff1d3fb1d2d1c6d00dd8059bae3dba157 -DIST libopenshot-0.1.3.tar.gz 11019740 BLAKE2B a706889f709024300ef79518406da861111a8445b5ce23364b8492a72e74e7944c88ba9b4a29da356ca21500253d19e8c32abe7b5aaa0ac35bebec85e52ba970 SHA512 d59817505812868db408a88dc1d30b5b1833910f45dd0df03937110b7d4cbd85a270773008e75a1501f4b3b89a09ea798ed9b580755adf3ae79ac24d403f6982 -DIST libopenshot-0.1.7.tar.gz 11022594 BLAKE2B f3e0836ebb6dd89ce42085dc9d18dd3bce9ab3011550958bec41eead2c62b454459d219d2efeece1a43eb0536cb99866eaf9b478205d717da4c173e954772a46 SHA512 4c8871ff30c03a14766e35a64052695768311afd81ecc55598720ad146f53c122ef3b1293467670f7dd48da77bf6cb4f4f14a18c298a649b8827f901ed653709 +AUX libopenshot-0.2.2-imagemagick7.patch 3545 BLAKE2B e2fe6ae205459c69ff288f14ba2d0a2b461b761e7ff6e9e66e11e4895b10661d5fc2ab9e2011899ca983399af685a0d411aa4820c02d02b4600617bd314d7670 SHA512 06622c81253fd15440e1cf0256a0beb21e2039a5a98a8c889828898b137a9a6efeb6fb295a0646dc5aa12da9805ff73b62c29272b0037cb1ea2454de7571f59b DIST libopenshot-0.1.8.tar.gz 11019495 BLAKE2B a86994a09328e24705fe06ec3c47cbedb89815e6ec1440237dc58babfc066655f1c7dacc19257b02b645a9415c63cd4e0c1191fa452b7632cf531d98a1b073c3 SHA512 02630d7ce9fd378ad648d034622d4f971728a2074691d7facc8a36dcd52b87c1372dd5a9588c0ba852589105bdbf78941083fd6b1eb1bcc0a33d4ca49634162c -EBUILD libopenshot-0.1.3.ebuild 2138 BLAKE2B 97297a5c170ad398c4c9df91ba503493f2c335beadf2414595fa29f2bba80e4ab9e229d7b0bb71271e8ed52b5ecccecb9a49d3c326b22baba82baa38193667fa SHA512 7b6b6ae56d2a89d4fc899a989ae567f91269566e8c979a1763a351bd149747d2e45b93b5ef6b429cef9d57eb09830883d6b45e552d8b479e3f9f692b98ccf73c -EBUILD libopenshot-0.1.7.ebuild 2139 BLAKE2B 1a68511d4bcfe9d0ee5d55a7ebec2ddc36c7ff6d43e527cfc256ad6af6bd5e26203a7de738d797de17fbea0245f67b104a5360b550fd945d24e7930eef5ba48a SHA512 2d6b2ff9d9818b2b59cb55411ab430fe0bb6b56a03bbfbe671f7dc6455ef787807677545534a3c601ce38a18d0cee46ee8a8bc951c0734f5e75dfc3bf9f40a3d +DIST libopenshot-0.2.2.tar.gz 11037768 BLAKE2B c307e41bf17d40ae421a541bbdf4cd53c6ef4d97041a476c6910bd156c10815aa5a5811813b24fdc472401516f29cf8cb68fbda17a0b434767c3f3aa63d6f222 SHA512 b89189e57e82da68a063417bba9c94704c04b0546c0aed227daa23a794eee56341a05988d8e28dbd339edfcdeeaed48103b347060eccf94f32fe1a4bf23d6553 EBUILD libopenshot-0.1.8.ebuild 2185 BLAKE2B 34b9556926c8f76c570a470b34dd66d2e722e712a557536b6d7c01a45493eb5e0401962d03ebb9a4633e232330d3c621ba42718fd968f58d2ce755e76bb42f98 SHA512 1c0d40239e19214ac3a0162f75e07180aebb94bf79da82e6f3752a2d5a9cf794a4babeab17fdd2160899a2a60bf46d36292b3f305502238a954adf4872fcdae5 +EBUILD libopenshot-0.2.2.ebuild 2211 BLAKE2B ed168c1fc226da7f3d237836e5225f992f52011ec92175bb6a88862c436b0c8063f218eb608477e169a3ce0051f678a4534d8160ba446b9bec3b1073530268ad SHA512 e320c0ec38d3bf9414bd5c549ad89b3319a3f2a493ed818e43155caf17f76792ee0a669ff12b4786c2f5415140c06ac97d96864bc8e507342bb44f07c8b150d9 MISC metadata.xml 374 BLAKE2B cc763fd4cda8c70fc654d85ebaa8a3b748499308a4633c6f70aeef1cbb767f5b5eaad0f6c4402a74862e8ebe392b6862722835e92cb53ef4b88a9cc87b2315db SHA512 2a1810910f38b67624eea2d8778c095bbe884cf8a06ababaf595a295d8fbb904e13a809ccc888b8d5956e87a2ddf1295982133741596a08e713f9cbb6a6347ba diff --git a/media-libs/libopenshot/files/libopenshot-0.1.3-fix-tests.patch b/media-libs/libopenshot/files/libopenshot-0.1.3-fix-tests.patch deleted file mode 100644 index 8ed3102b7adc..000000000000 --- a/media-libs/libopenshot/files/libopenshot-0.1.3-fix-tests.patch +++ /dev/null @@ -1,26 +0,0 @@ -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 <http://www.gnu.org/licenses/>. - ################################################################################ - -+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/files/libopenshot-0.2.2-imagemagick7.patch b/media-libs/libopenshot/files/libopenshot-0.2.2-imagemagick7.patch new file mode 100644 index 000000000000..bc5f738d7f63 --- /dev/null +++ b/media-libs/libopenshot/files/libopenshot-0.2.2-imagemagick7.patch @@ -0,0 +1,78 @@ +diff -Nru a/include/TextReader.h b/include/TextReader.h +--- a/include/TextReader.h 2018-09-22 21:47:46.000000000 +0200 ++++ b/include/TextReader.h 2018-09-23 16:17:21.212888285 +0200 +@@ -91,7 +91,7 @@ + string text_color; + string background_color; + std::shared_ptr<Magick::Image> image; +- list<Magick::Drawable> lines; ++ vector<Magick::Drawable> lines; + bool is_open; + GravityType gravity; + +diff -Nru a/src/Frame.cpp b/src/Frame.cpp +--- a/src/Frame.cpp 2018-09-22 21:47:46.000000000 +0200 ++++ b/src/Frame.cpp 2018-09-23 16:21:44.921563711 +0200 +@@ -29,6 +29,9 @@ + + using namespace std; + using namespace openshot; ++#ifdef USE_IMAGEMAGICK ++using namespace Magick; ++#endif + + // Constructor - blank frame (300x200 blank image, 48kHz audio silence) + Frame::Frame() : number(1), pixel_ratio(1,1), channels(2), width(1), height(1), color("#000000"), +@@ -904,7 +907,7 @@ + // Give image a transparent background color + magick_image->backgroundColor(Magick::Color("none")); + magick_image->virtualPixelMethod(Magick::TransparentVirtualPixelMethod); +- magick_image->matte(true); ++ magick_image->alpha(true); + + return magick_image; + } +@@ -926,13 +929,14 @@ + // Iterate through the pixel packets, and load our own buffer + // Each color needs to be scaled to 8 bit (using the ImageMagick built-in ScaleQuantumToChar function) + int numcopied = 0; +- Magick::PixelPacket *pixels = new_image->getPixels(0,0, new_image->columns(), new_image->rows()); ++ const Quantum *pixels = new_image->getConstPixels(0,0, new_image->columns(), new_image->rows()); + for (int n = 0, i = 0; n < new_image->columns() * new_image->rows(); n += 1, i += 4) { +- buffer[i+0] = MagickCore::ScaleQuantumToChar((Magick::Quantum) pixels[n].red); +- buffer[i+1] = MagickCore::ScaleQuantumToChar((Magick::Quantum) pixels[n].green); +- buffer[i+2] = MagickCore::ScaleQuantumToChar((Magick::Quantum) pixels[n].blue); +- buffer[i+3] = 255 - MagickCore::ScaleQuantumToChar((Magick::Quantum) pixels[n].opacity); ++ buffer[i+0] = MagickCore::ScaleQuantumToChar(MagickCore::GetPixelRed(new_image->image(), pixels)); ++ buffer[i+1] = MagickCore::ScaleQuantumToChar(MagickCore::GetPixelGreen(new_image->image(), pixels)); ++ buffer[i+2] = MagickCore::ScaleQuantumToChar(MagickCore::GetPixelBlue(new_image->image(), pixels)); ++ buffer[i+3] = MagickCore::ScaleQuantumToChar(MagickCore::GetPixelAlpha(new_image->image(), pixels)); + numcopied+=4; ++ pixels += MagickCore::GetPixelChannels(new_image->image()); + } + + // Create QImage of frame data +diff -Nru a/src/ImageReader.cpp b/src/ImageReader.cpp +--- a/src/ImageReader.cpp 2018-09-22 21:47:46.000000000 +0200 ++++ b/src/ImageReader.cpp 2018-09-23 16:22:32.330865516 +0200 +@@ -59,7 +59,7 @@ + + // Give image a transparent background color + image->backgroundColor(Magick::Color("none")); +- image->matte(true); ++ image->alpha(true); + } + catch (Magick::Exception e) { + // raise exception +diff -Nru a/src/ImageWriter.cpp b/src/ImageWriter.cpp +--- a/src/ImageWriter.cpp 2018-09-22 21:47:46.000000000 +0200 ++++ b/src/ImageWriter.cpp 2018-09-23 16:22:58.380031419 +0200 +@@ -97,7 +97,7 @@ + std::shared_ptr<Magick::Image> frame_image = frame->GetMagickImage(); + frame_image->magick( info.vcodec ); + frame_image->backgroundColor(Magick::Color("none")); +- frame_image->matte(true); ++ frame_image->alpha(true); + frame_image->quality(image_quality); + frame_image->animationDelay(info.video_timebase.ToFloat() * 100); + frame_image->animationIterations(number_of_loops); diff --git a/media-libs/libopenshot/libopenshot-0.1.3.ebuild b/media-libs/libopenshot/libopenshot-0.1.3.ebuild deleted file mode 100644 index cc13df34d2a1..000000000000 --- a/media-libs/libopenshot/libopenshot-0.1.3.ebuild +++ /dev/null @@ -1,84 +0,0 @@ -# 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-libs/libopenshot/libopenshot-0.1.7.ebuild b/media-libs/libopenshot/libopenshot-0.2.2.ebuild index 4f9643afa9b0..4b0aeae13e16 100644 --- a/media-libs/libopenshot/libopenshot-0.1.7.ebuild +++ b/media-libs/libopenshot/libopenshot-0.2.2.ebuild @@ -1,8 +1,7 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 - PYTHON_COMPAT=( python3_{4,5,6} ) inherit cmake-utils python-single-r1 toolchain-funcs versionator @@ -25,8 +24,8 @@ RDEPEND=" dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtmultimedia:5[widgets] - media-libs/libopenshot-audio - imagemagick? ( <media-gfx/imagemagick-7:0=[cxx] ) + >=media-libs/libopenshot-audio-0.1.4 + imagemagick? ( >=media-gfx/imagemagick-7: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} ) @@ -37,10 +36,11 @@ DEPEND=" test? ( dev-libs/unittest++ ) " -# https://github.com/OpenShot/libopenshot/pull/45 -PATCHES=( ${FILESDIR}/${PN}-0.1.3-fix-tests.patch ) +# From Mageia +# https://github.com/OpenShot/libopenshot/issues/60 +PATCHES=( ${FILESDIR}/${PN}-0.2.2-imagemagick7.patch ) -pkg_pretend() { +check_compiler() { 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" @@ -49,21 +49,26 @@ pkg_pretend() { fi } +pkg_pretend() { + check_compiler +} + pkg_setup() { + check_compiler use python && python-single-r1_pkg_setup } src_prepare() { + cmake-utils_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) + $(cmake-utils_use_find_package imagemagick ImageMagick) ) use python && mycmakeargs+=( -DPYTHON_EXECUTABLE="${PYTHON}" |