From 401840aeb928780f528c16117ea47ed11ae0cab1 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 30 Jun 2019 17:57:38 +0100 Subject: media-libs/mlt : version bump --- media-libs/mlt/Manifest | 2 +- ....16.0-bad-aspect-ratio-resulting-in-black.patch | 56 +++++ ..._multi-does-not-correctly-handle-in-point.patch | 22 ++ media-libs/mlt/files/mlt-6.16.0-crop-filter.patch | 31 +++ .../mlt-6.16.0-mlt_consumer-race-condition.patch | 30 +++ .../mlt-6.16.0-rotoscoping-interpolation.patch | 22 ++ media-libs/mlt/mlt-6.14.0-r1337.ebuild | 222 -------------------- media-libs/mlt/mlt-6.16.0-r314.ebuild | 230 +++++++++++++++++++++ 8 files changed, 392 insertions(+), 223 deletions(-) create mode 100644 media-libs/mlt/files/mlt-6.16.0-bad-aspect-ratio-resulting-in-black.patch create mode 100644 media-libs/mlt/files/mlt-6.16.0-consumer_multi-does-not-correctly-handle-in-point.patch create mode 100644 media-libs/mlt/files/mlt-6.16.0-crop-filter.patch create mode 100644 media-libs/mlt/files/mlt-6.16.0-mlt_consumer-race-condition.patch create mode 100644 media-libs/mlt/files/mlt-6.16.0-rotoscoping-interpolation.patch delete mode 100644 media-libs/mlt/mlt-6.14.0-r1337.ebuild create mode 100644 media-libs/mlt/mlt-6.16.0-r314.ebuild (limited to 'media-libs') diff --git a/media-libs/mlt/Manifest b/media-libs/mlt/Manifest index b2c8320a..40a4d088 100644 --- a/media-libs/mlt/Manifest +++ b/media-libs/mlt/Manifest @@ -1 +1 @@ -DIST mlt-6.14.0.tar.gz 1413015 BLAKE2B 81501c0b770c0be2ccf2dfa12c4ebb893c0e9921f36722e6f5cb8f643d3eaaa4b8eaf4fd87ba05fa55d49960b7147b73ea5f2cf771a6784b587a6797466f2f73 SHA512 86b26b0c421cc881f6bebbde2c0ae9d834f190d8f878fb279ab29a1d7ac5416077b7dd91420bf63a7821fade9ca9c044a92440e02673c7b330b8ff36982a9fb9 +DIST mlt-6.16.0.tar.gz 1414374 BLAKE2B 6c031360721d535e95cbaf890c1f42f5f5dd914e0c6c20992bd3aec4ecbcc0b53370fe6b82b5d11c8242bb0a1f2d94f28bc61b4e5a920e5afb41ca8bb5229433 SHA512 554e8b9baa7a8578cc52315fe0583c61762bf6fbbcdd4a1e4f25753846d92f013e7d74745498625fcc781de993aa0526fd761920450b4314e67105783b9bde26 diff --git a/media-libs/mlt/files/mlt-6.16.0-bad-aspect-ratio-resulting-in-black.patch b/media-libs/mlt/files/mlt-6.16.0-bad-aspect-ratio-resulting-in-black.patch new file mode 100644 index 00000000..c2bc1946 --- /dev/null +++ b/media-libs/mlt/files/mlt-6.16.0-bad-aspect-ratio-resulting-in-black.patch @@ -0,0 +1,56 @@ +From f0628d1fe7f61a267f1adad8824b9a2083e3376a Mon Sep 17 00:00:00 2001 +From: Dan Dennedy +Date: Fri, 31 May 2019 19:03:32 -0700 +Subject: [PATCH] Fix #453 bad aspect ratio computed resulting in black. + +This occured when the s, width, or height properties are supplied with +no "aspect." +--- + src/modules/avformat/consumer_avformat.c | 34 +++++++++++++----------- + 1 file changed, 18 insertions(+), 16 deletions(-) + +diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c +index 738f5a972..dd2719997 100644 +--- a/src/modules/avformat/consumer_avformat.c ++++ b/src/modules/avformat/consumer_avformat.c +@@ -271,22 +271,24 @@ mlt_consumer consumer_avformat_init( mlt_profile profile, char *arg ) + static void recompute_aspect_ratio( mlt_properties properties ) + { + double ar = mlt_properties_get_double( properties, "aspect" ); +- AVRational rational = av_d2q( ar, 255 ); +- int width = mlt_properties_get_int( properties, "width" ); +- int height = mlt_properties_get_int( properties, "height" ); +- +- // Update the profile and properties as well since this is an alias +- // for mlt properties that correspond to profile settings +- mlt_properties_set_int( properties, "display_aspect_num", rational.num ); +- mlt_properties_set_int( properties, "display_aspect_den", rational.den ); +- +- // Now compute the sample aspect ratio +- rational = av_d2q( ar * height / FFMAX(width, 1), 255 ); +- +- // Update the profile and properties as well since this is an alias +- // for mlt properties that correspond to profile settings +- mlt_properties_set_int( properties, "sample_aspect_num", rational.num ); +- mlt_properties_set_int( properties, "sample_aspect_den", rational.den ); ++ if (ar > 0.0) { ++ AVRational rational = av_d2q( ar, 255 ); ++ int width = mlt_properties_get_int( properties, "width" ); ++ int height = mlt_properties_get_int( properties, "height" ); ++ ++ // Update the profile and properties as well since this is an alias ++ // for mlt properties that correspond to profile settings ++ mlt_properties_set_int( properties, "display_aspect_num", rational.num ); ++ mlt_properties_set_int( properties, "display_aspect_den", rational.den ); ++ ++ // Now compute the sample aspect ratio ++ rational = av_d2q( ar * height / FFMAX(width, 1), 255 ); ++ ++ // Update the profile and properties as well since this is an alias ++ // for mlt properties that correspond to profile settings ++ mlt_properties_set_int( properties, "sample_aspect_num", rational.num ); ++ mlt_properties_set_int( properties, "sample_aspect_den", rational.den ); ++ } + } + + static void color_trc_from_colorspace( mlt_properties properties ) diff --git a/media-libs/mlt/files/mlt-6.16.0-consumer_multi-does-not-correctly-handle-in-point.patch b/media-libs/mlt/files/mlt-6.16.0-consumer_multi-does-not-correctly-handle-in-point.patch new file mode 100644 index 00000000..946d06ae --- /dev/null +++ b/media-libs/mlt/files/mlt-6.16.0-consumer_multi-does-not-correctly-handle-in-point.patch @@ -0,0 +1,22 @@ +From 434dbcf62048cc1220c425c2adc77697b4d40ffb Mon Sep 17 00:00:00 2001 +From: Jean-Baptiste Mardelle +Date: Mon, 10 Jun 2019 18:18:44 +0200 +Subject: [PATCH] Fix multi consumer doesn't correctly handle in point + +--- + src/modules/core/consumer_multi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/modules/core/consumer_multi.c b/src/modules/core/consumer_multi.c +index 4bb16ddf5..d9b5fbc0f 100644 +--- a/src/modules/core/consumer_multi.c ++++ b/src/modules/core/consumer_multi.c +@@ -304,7 +304,7 @@ static void foreach_consumer_start( mlt_consumer consumer ) + if ( nested ) + { + mlt_properties nested_props = MLT_CONSUMER_PROPERTIES(nested); +- mlt_properties_set_position( nested_props, "_multi_position", 0 ); ++ mlt_properties_set_position( nested_props, "_multi_position", mlt_properties_get_position( properties, "in" ) ); + mlt_properties_set_data( nested_props, "_multi_audio", NULL, 0, NULL, NULL ); + mlt_properties_set_int( nested_props, "_multi_samples", 0 ); + mlt_consumer_start( nested ); diff --git a/media-libs/mlt/files/mlt-6.16.0-crop-filter.patch b/media-libs/mlt/files/mlt-6.16.0-crop-filter.patch new file mode 100644 index 00000000..d42da685 --- /dev/null +++ b/media-libs/mlt/files/mlt-6.16.0-crop-filter.patch @@ -0,0 +1,31 @@ +From f6225b7f4cd5e9b6011ca79c3849dc9e286a7acb Mon Sep 17 00:00:00 2001 +From: Dan Dennedy +Date: Mon, 13 May 2019 11:44:13 -0700 +Subject: [PATCH] Fix crop filter not working with color producer. + +Fixes https://github.com/mltframework/shotcut/issues/737 +--- + src/modules/core/producer_colour.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/modules/core/producer_colour.c b/src/modules/core/producer_colour.c +index e1cfe5284..67d36dfb2 100644 +--- a/src/modules/core/producer_colour.c ++++ b/src/modules/core/producer_colour.c +@@ -1,6 +1,6 @@ + /* + * producer_colour.c +- * Copyright (C) 2003-2018 Meltytech, LLC ++ * Copyright (C) 2003-2019 Meltytech, LLC + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -248,6 +248,8 @@ static int producer_get_frame( mlt_producer producer, mlt_frame_ptr frame, int i + mlt_properties_set_int( properties, "progressive", 1 ); + mlt_profile profile = mlt_service_profile( MLT_PRODUCER_SERVICE( producer ) ); + mlt_properties_set_double( properties, "aspect_ratio", mlt_profile_sar( profile ) ); ++ mlt_properties_set_int( properties, "meta.media.width", profile->width ); ++ mlt_properties_set_int( properties, "meta.media.height", profile->height ); + + // colour is an alias for resource + if ( mlt_properties_get( producer_props, "colour" ) != NULL ) diff --git a/media-libs/mlt/files/mlt-6.16.0-mlt_consumer-race-condition.patch b/media-libs/mlt/files/mlt-6.16.0-mlt_consumer-race-condition.patch new file mode 100644 index 00000000..7fd1c577 --- /dev/null +++ b/media-libs/mlt/files/mlt-6.16.0-mlt_consumer-race-condition.patch @@ -0,0 +1,30 @@ +From 9b89b781b9d06181c8d486605ed4c2b3089d64d6 Mon Sep 17 00:00:00 2001 +From: alcinos +Date: Wed, 1 May 2019 23:50:41 +0200 +Subject: [PATCH] Fix race in mlt_consumer + +--- + src/framework/mlt_consumer.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/framework/mlt_consumer.c b/src/framework/mlt_consumer.c +index 491bc5e99..0e36bde3c 100644 +--- a/src/framework/mlt_consumer.c ++++ b/src/framework/mlt_consumer.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + /** Define this if you want an automatic deinterlace (if necessary) when the + * consumer's producer is not running at normal speed. +@@ -65,7 +66,7 @@ typedef struct + double fps; + int channels; + int frequency; +- int speed; ++ atomic_int speed; + /* additional fields added for the parallel work queue */ + mlt_deque worker_threads; + pthread_mutex_t done_mutex; diff --git a/media-libs/mlt/files/mlt-6.16.0-rotoscoping-interpolation.patch b/media-libs/mlt/files/mlt-6.16.0-rotoscoping-interpolation.patch new file mode 100644 index 00000000..935a2d13 --- /dev/null +++ b/media-libs/mlt/files/mlt-6.16.0-rotoscoping-interpolation.patch @@ -0,0 +1,22 @@ +From ddf6983b4aaaf662944b84103dd4412aff45a428 Mon Sep 17 00:00:00 2001 +From: alcinos +Date: Fri, 10 May 2019 23:20:22 +0200 +Subject: [PATCH] Fix interpolation in rotoscoping filter + +--- + src/modules/plusgpl/filter_rotoscoping.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/modules/plusgpl/filter_rotoscoping.c b/src/modules/plusgpl/filter_rotoscoping.c +index 0667929cd..70e3a093b 100644 +--- a/src/modules/plusgpl/filter_rotoscoping.c ++++ b/src/modules/plusgpl/filter_rotoscoping.c +@@ -572,7 +572,7 @@ static mlt_frame filter_process( mlt_filter filter, mlt_frame frame ) + int c2 = json2BCurves( keyframe, &p2 ); + + // range 0-1 +- double position = ( time - pos1 ) / (double)( pos2 - pos1 + 1 ); ++ double position = ( time - pos1 ) / (double)( pos2 - pos1 ); + + count = MIN( c1, c2 ); // additional points are ignored + points = mlt_pool_alloc( count * sizeof( BPointF ) ); diff --git a/media-libs/mlt/mlt-6.14.0-r1337.ebuild b/media-libs/mlt/mlt-6.14.0-r1337.ebuild deleted file mode 100644 index c412d7a1..00000000 --- a/media-libs/mlt/mlt-6.14.0-r1337.ebuild +++ /dev/null @@ -1,222 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -# TODO python3_{6,7} contrary to 6.14 changelog, still does not build. -PYTHON_COMPAT=( python2_7 ) -# this ebuild currently only supports installing ruby bindings for a single ruby version -# so USE_RUBY must contain only a single value (the latest stable) as the ebuild calls -# /usr/bin/${USE_RUBY} directly -USE_RUBY="ruby25" -inherit python-single-r1 ruby-single toolchain-funcs - -DESCRIPTION="Open source multimedia framework for television broadcasting" -HOMEPAGE="https://www.mltframework.org/" -SRC_URI="https://github.com/mltframework/${PN}/releases/download/v${PV}/${P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~arm64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" -IUSE="compressed-lumas cpu_flags_x86_mmx cpu_flags_x86_sse cpu_flags_x86_sse2 debug ffmpeg fftw frei0r -gtk jack kdenlive kernel_linux libav libsamplerate lua melt opencv opengl python qt5 rtaudio ruby sdl -vdpau vidstab xine xml" -# java perl php tcl - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -SWIG_DEPEND=">=dev-lang/swig-2.0" -# java? ( ${SWIG_DEPEND} >=virtual/jdk-1.5 ) -# perl? ( ${SWIG_DEPEND} ) -# php? ( ${SWIG_DEPEND} ) -# tcl? ( ${SWIG_DEPEND} ) -BDEPEND=" - virtual/pkgconfig - compressed-lumas? ( virtual/imagemagick-tools[png] ) - lua? ( ${SWIG_DEPEND} virtual/pkgconfig ) - python? ( ${SWIG_DEPEND} ) - ruby? ( ${SWIG_DEPEND} )" -#rtaudio will use OSS on non linux OSes -DEPEND=" - >=media-libs/libebur128-1.2.2 - ffmpeg? ( - libav? ( >=media-video/libav-12:0=[vdpau?] ) - !libav? ( media-video/ffmpeg:0=[vdpau?] ) - ) - fftw? ( sci-libs/fftw:3.0= ) - frei0r? ( media-plugins/frei0r-plugins ) - gtk? ( - media-libs/libexif - x11-libs/gtk+:2 - x11-libs/pango - ) - jack? ( - >=dev-libs/libxml2-2.5 - media-libs/ladspa-sdk - virtual/jack - ) - libsamplerate? ( >=media-libs/libsamplerate-0.1.2 ) - lua? ( >=dev-lang/lua-5.1.4-r4:= ) - opencv? ( >=media-libs/opencv-3.2.0:= ) - opengl? ( media-video/movit ) - python? ( ${PYTHON_DEPS} ) - qt5? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtsvg:5 - dev-qt/qtwidgets:5 - dev-qt/qtxml:5 - media-libs/libexif - x11-libs/libX11 - ) - rtaudio? ( - >=media-libs/rtaudio-4.1.2 - kernel_linux? ( media-libs/alsa-lib ) - ) - ruby? ( ${RUBY_DEPS} ) - sdl? ( - media-libs/libsdl2[X,opengl,video] - media-libs/sdl2-image - ) - vidstab? ( media-libs/vidstab ) - xine? ( >=media-libs/xine-lib-1.1.2_pre20060328-r7 ) - xml? ( >=dev-libs/libxml2-2.5 )" -# java? ( >=virtual/jre-1.5 ) -# perl? ( dev-lang/perl ) -# php? ( dev-lang/php ) -# sox? ( media-sound/sox ) -# tcl? ( dev-lang/tcl:0= ) -RDEPEND="${DEPEND}" - -DOCS=( AUTHORS ChangeLog NEWS README docs/{framework,melt,mlt{++,-xml}}.txt ) - -PATCHES=( "${FILESDIR}"/${PN}-6.10.0-swig-underlinking.patch ) - -pkg_setup() { - use python && python-single-r1_pkg_setup -} - -src_prepare() { - default - - # respect CFLAGS LDFLAGS when building shared libraries. Bug #308873 - for x in python lua; do - sed -i "/mlt.so/s: -lmlt++ :& ${CFLAGS} ${LDFLAGS} :" src/swig/$x/build || die - done - sed -i "/^LDFLAGS/s: += :& ${LDFLAGS} :" src/swig/ruby/build || die - - sed -i -e "s/env ruby/${USE_RUBY}/" src/swig/ruby/* || die -} - -src_configure() { - tc-export CC CXX - - local myconf=( - --enable-gpl - --enable-gpl3 - --enable-motion-est - --target-arch=$(tc-arch) - --disable-kde - --disable-sdl - --disable-swfdec - $(use_enable debug) - $(use compressed-lumas && echo ' --luma-compress') - $(use_enable cpu_flags_x86_sse sse) - $(use_enable cpu_flags_x86_sse2 sse2) - $(use_enable gtk gtk2) - $(use_enable jack jackrack) - $(use_enable ffmpeg avformat) - $(use ffmpeg && echo ' --avformat-swscale') - $(use_enable fftw plus) - $(use_enable frei0r) - $(use_enable melt) - $(use_enable opencv) - $(use_enable opengl) - $(use_enable libsamplerate resample) - $(use_enable rtaudio) - $(use vdpau && echo ' --avformat-vdpau') - $(use_enable sdl sdl2) - $(use_enable vidstab vid.stab ) - $(use_enable xml) - $(use_enable xine) - $(use_enable kdenlive) - --disable-sox - ) - #$(use_enable sox) FIXME - - if use qt5 ; then - myconf+=( - --enable-qt - --qt-includedir=$(pkg-config Qt5Core --variable=includedir) - --qt-libdir=$(pkg-config Qt5Core --variable=libdir) - ) - else - myconf+=( --disable-qt ) - fi - - if use x86 || use amd64 ; then - myconf+=( $(use_enable cpu_flags_x86_mmx mmx) ) - else - myconf+=( --disable-mmx ) - fi - - if ! use melt; then - sed -i -e "s;src/melt;;" Makefile || die - fi - - # TODO: add swig language bindings - # see also https://www.mltframework.org/twiki/bin/view/MLT/ExtremeMakeover - - local swig_lang - # TODO: java perl php tcl - for i in lua python ruby ; do - use $i && swig_lang="${swig_lang} $i" - done - [[ -z "${swig_lang}" ]] && swig_lang="none" - - econf ${myconf[@]} --swig-languages="${swig_lang}" - - sed -i -e s/^OPT/#OPT/ "${S}/config.mak" || die -} - -src_install() { - emake DESTDIR="${D}" install - einstalldocs - - dodir /usr/share/${PN} - insinto /usr/share/${PN} - doins -r demo - - docinto swig - - # Install SWIG bindings - if use lua; then - cd "${S}"/src/swig/lua || die - exeinto $(pkg-config --variable INSTALL_CMOD lua) - doexe mlt.so - dodoc play.lua - fi - - if use python; then - cd "${S}"/src/swig/python || die - insinto $(python_get_sitedir) - doins mlt.py - exeinto $(python_get_sitedir) - doexe _mlt.so - dodoc play.py - python_optimize - fi - - if use ruby; then - cd "${S}"/src/swig/ruby || die - exeinto $("${EPREFIX}"/usr/bin/${USE_RUBY} -r rbconfig -e 'print RbConfig::CONFIG["sitearchdir"]') - doexe mlt.so - dodoc play.rb thumbs.rb - fi - - if use qt5 && use melt; then - dosym melt usr/bin/qmelt - fi - - # TODO: java perl php tcl -} diff --git a/media-libs/mlt/mlt-6.16.0-r314.ebuild b/media-libs/mlt/mlt-6.16.0-r314.ebuild new file mode 100644 index 00000000..a231e856 --- /dev/null +++ b/media-libs/mlt/mlt-6.16.0-r314.ebuild @@ -0,0 +1,230 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7} ) +# this ebuild currently only supports installing ruby bindings for a single ruby version +# so USE_RUBY must contain only a single value (the latest stable) as the ebuild calls +# /usr/bin/${USE_RUBY} directly +USE_RUBY="ruby25" +inherit python-single-r1 qmake-utils ruby-single toolchain-funcs + +DESCRIPTION="Open source multimedia framework for television broadcasting" +HOMEPAGE="https://www.mltframework.org/" +SRC_URI="https://github.com/mltframework/${PN}/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux" +IUSE="compressed-lumas cpu_flags_x86_mmx cpu_flags_x86_sse cpu_flags_x86_sse2 debug ffmpeg +fftw frei0r gtk jack kdenlive kernel_linux libav libsamplerate lua melt opencv opengl python +qt5 rtaudio ruby sdl vdpau vidstab xine xml" +# java perl php tcl + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +SWIG_DEPEND=">=dev-lang/swig-2.0" +# java? ( ${SWIG_DEPEND} >=virtual/jdk-1.5 ) +# perl? ( ${SWIG_DEPEND} ) +# php? ( ${SWIG_DEPEND} ) +# tcl? ( ${SWIG_DEPEND} ) +BDEPEND=" + virtual/pkgconfig + compressed-lumas? ( virtual/imagemagick-tools[png] ) + lua? ( ${SWIG_DEPEND} virtual/pkgconfig ) + python? ( ${SWIG_DEPEND} ) + ruby? ( ${SWIG_DEPEND} )" +#rtaudio will use OSS on non linux OSes +DEPEND=" + >=media-libs/libebur128-1.2.2:= + ffmpeg? ( + libav? ( >=media-video/libav-12:0=[vdpau?] ) + !libav? ( media-video/ffmpeg:0=[vdpau?,-flite] ) + ) + fftw? ( sci-libs/fftw:3.0= ) + frei0r? ( media-plugins/frei0r-plugins ) + gtk? ( + media-libs/libexif + x11-libs/gtk+:2 + x11-libs/pango + ) + jack? ( + >=dev-libs/libxml2-2.5 + media-libs/ladspa-sdk + virtual/jack + ) + libsamplerate? ( >=media-libs/libsamplerate-0.1.2 ) + lua? ( >=dev-lang/lua-5.1.4-r4:= ) + opencv? ( >=media-libs/opencv-3.2.0:= ) + opengl? ( media-video/movit ) + python? ( ${PYTHON_DEPS} ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtsvg:5 + dev-qt/qtwidgets:5 + dev-qt/qtxml:5 + media-libs/libexif + x11-libs/libX11 + ) + rtaudio? ( + >=media-libs/rtaudio-4.1.2 + kernel_linux? ( media-libs/alsa-lib ) + ) + ruby? ( ${RUBY_DEPS} ) + sdl? ( + media-libs/libsdl2[X,opengl,video] + media-libs/sdl2-image + ) + vidstab? ( media-libs/vidstab ) + xine? ( >=media-libs/xine-lib-1.1.2_pre20060328-r7 ) + xml? ( >=dev-libs/libxml2-2.5 )" +# java? ( >=virtual/jre-1.5 ) +# perl? ( dev-lang/perl ) +# php? ( dev-lang/php ) +# sox? ( media-sound/sox ) +# tcl? ( dev-lang/tcl:0= ) +RDEPEND="${DEPEND}" + +DOCS=( AUTHORS ChangeLog NEWS README docs/{framework,melt,mlt{++,-xml}}.txt ) + +PATCHES=( + "${FILESDIR}"/${PN}-6.10.0-swig-underlinking.patch + "${FILESDIR}"/${P}-mlt_consumer-race-condition.patch + "${FILESDIR}"/${P}-rotoscoping-interpolation.patch + "${FILESDIR}"/${P}-crop-filter.patch + "${FILESDIR}"/${P}-consumer_multi-does-not-correctly-handle-in-point.patch + "${FILESDIR}"/${P}-bad-aspect-ratio-resulting-in-black.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + default + + # respect CFLAGS LDFLAGS when building shared libraries. Bug #308873 + for x in python lua; do + sed -i "/mlt.so/s: -lmlt++ :& ${CFLAGS} ${LDFLAGS} :" src/swig/$x/build || die + done + + sed -i -e "s/env ruby/${USE_RUBY}/" src/swig/ruby/* || die + + # fix python3 include dir + sed -i -e 's/python{}.{}/python{}.{}m/' src/swig/python/build || die +} + +src_configure() { + tc-export CC CXX + + local myconf=( + --enable-gpl + --enable-gpl3 + --enable-motion-est + --target-arch=$(tc-arch) + --disable-kde + --disable-sdl + --disable-swfdec + $(use_enable debug) + $(use_enable cpu_flags_x86_sse sse) + $(use_enable cpu_flags_x86_sse2 sse2) + $(use_enable ffmpeg avformat) + $(use_enable fftw plus) + $(use_enable frei0r) + $(use_enable gtk gtk2) + $(use_enable jack jackrack) + $(use_enable kdenlive) + $(use_enable libsamplerate resample) + $(use_enable melt) + $(use_enable opencv) + $(use_enable opengl) + $(use_enable qt5 qt) + $(use_enable rtaudio) + $(use_enable sdl sdl2) + $(use_enable vidstab vid.stab ) + $(use_enable xine) + $(use_enable xml) + --disable-sox + ) + #$(use_enable sox) FIXME + + use compressed-lumas && myconf+=( --luma-compress ) + use ffmpeg && myconf+=( --avformat-swscale ) + use vdpau && myconf+=( --avformat-vdpau ) + + if use qt5 ; then + myconf+=( + --qt-includedir=$(qt5_get_headerdir) + --qt-libdir=$(qt5_get_libdir) + ) + fi + + if use amd64 || use x86 ; then + myconf+=( $(use_enable cpu_flags_x86_mmx mmx) ) + else + myconf+=( --disable-mmx ) + fi + + if ! use melt ; then + sed -i -e "s;src/melt;;" Makefile || die + fi + + # TODO: add swig language bindings + # see also https://www.mltframework.org/twiki/bin/view/MLT/ExtremeMakeover + + local swig_lang=() + # TODO: java perl php tcl + for i in lua python ruby ; do + use $i && swig_lang+=( $i ) + done + [[ -z "${swig_lang}" ]] && swig_lang=( none ) + + econf "${myconf[@]}" --swig-languages="${swig_lang[*]}" + + sed -i -e s/^OPT/#OPT/ config.mak || die +} + +src_install() { + default + + dodir /usr/share/${PN} + insinto /usr/share/${PN} + doins -r demo + + docinto swig + + # Install SWIG bindings + if use lua; then + cd "${S}"/src/swig/lua || die + exeinto $(pkg-config --variable INSTALL_CMOD lua) + doexe mlt.so + dodoc play.lua + fi + + if use python; then + cd "${S}"/src/swig/python || die + insinto $(python_get_sitedir) + doins mlt.py + exeinto $(python_get_sitedir) + doexe _mlt.so + dodoc play.py + python_optimize + fi + + if use ruby; then + cd "${S}"/src/swig/ruby || die + exeinto $("${EPREFIX}"/usr/bin/${USE_RUBY} -r rbconfig -e 'print RbConfig::CONFIG["sitearchdir"]') + doexe mlt.so + dodoc play.rb thumbs.rb + fi + + # start : Redcore Linux Project tweaks + if use qt5 && use melt; then + dosym melt usr/bin/qmelt + fi + # stop : Redcore Linux Project tweaks + + # TODO: java perl php tcl +} -- cgit v1.2.3