From e3872864be25f7421015bef2732fa57c0c9fb726 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 4 Aug 2018 08:53:53 +0100 Subject: gentoo resync : 04.08.2018 --- media-libs/mlt/Manifest | 9 +- media-libs/mlt/files/mlt-6.6.0-gif-encoding.patch | 33 +++ .../mlt/files/mlt-6.6.0-kdenlivetitle-crash.patch | 22 ++ media-libs/mlt/files/mlt-6.6.0-libav-1.patch | 39 ++++ media-libs/mlt/files/mlt-6.6.0-libav-2.patch | 31 +++ media-libs/mlt/files/mlt-6.6.0-libav-3.patch | 23 ++ media-libs/mlt/files/mlt-6.6.0-png-segfault.patch | 36 ++++ .../mlt/files/mlt-6.6.0-vorbis-ffmpeg-3.4.patch | 29 +++ media-libs/mlt/mlt-6.6.0-r1.ebuild | 238 +++++++++++++++++++++ media-libs/mlt/mlt-6.6.0.ebuild | 221 ------------------- 10 files changed, 459 insertions(+), 222 deletions(-) create mode 100644 media-libs/mlt/files/mlt-6.6.0-gif-encoding.patch create mode 100644 media-libs/mlt/files/mlt-6.6.0-kdenlivetitle-crash.patch create mode 100644 media-libs/mlt/files/mlt-6.6.0-libav-1.patch create mode 100644 media-libs/mlt/files/mlt-6.6.0-libav-2.patch create mode 100644 media-libs/mlt/files/mlt-6.6.0-libav-3.patch create mode 100644 media-libs/mlt/files/mlt-6.6.0-png-segfault.patch create mode 100644 media-libs/mlt/files/mlt-6.6.0-vorbis-ffmpeg-3.4.patch create mode 100644 media-libs/mlt/mlt-6.6.0-r1.ebuild delete mode 100644 media-libs/mlt/mlt-6.6.0.ebuild (limited to 'media-libs/mlt') diff --git a/media-libs/mlt/Manifest b/media-libs/mlt/Manifest index 8110cb256573..1804672aa61f 100644 --- a/media-libs/mlt/Manifest +++ b/media-libs/mlt/Manifest @@ -5,8 +5,15 @@ AUX mlt-6.4.1-libebur128-unbundle.patch 4162 BLAKE2B d7d3094e514f52d4fe5de2791e5 AUX mlt-6.4.1-opencv-3.3.patch 1346 BLAKE2B 686a28e6d08795919dc6bc9429f0cf3494a540ecd4f5b45018c8dca2fb7014cb9dec34177fd117a2cf58d88a0579b3e7df6eaa64d6eb12fa150c654ba1f9dd9d SHA512 5bab43be1a0e85764a7a80f58a1f211aef737a6ccbe3d9080e12103235891a0418aa8505268a71632b737834c9a5eb379bdefcb24f63862a596860dd118ee622 AUX mlt-6.4.1-qtopengl-1.patch 993 BLAKE2B f8f84d0c2b3e08eb8f7a69b915af0e6784c4033e788df5ad6b83abe4a833839ca23fb8773761ce61bcf725dd125efad31c8075fe75ab64c46d76ce5b3097926c SHA512 4acc3ff23c286748986236211b20f6b6192828908e7177bd2056da87dcdc1f9abe93bf50f7d53e2ccac148d6ab757371619f02d4e2ac77fb6b810580804e9696 AUX mlt-6.4.1-qtopengl-2.patch 2573 BLAKE2B 3a313c170a079b8c036a75773b2e9f8b047b958a6df55cacf5d24a05ff2e33f1dad032ff5813aaf224d843988d511ad093b5eaa3314d306493a4d359307bd576 SHA512 dd1c0972e5b659c777a94a05a7d070e0e1ffdf1a364f24213ad7ab37bf90e9d7209711dd1e1dd106ed260721a32533fd4873d0df28e5ac683eb88ccdbbd0947f +AUX mlt-6.6.0-gif-encoding.patch 1173 BLAKE2B 0396640a30e827b9789540db7df643a82fa64d5748e206e6a7b1dbb6fa30c45dc0c170b067c83968a0497bb2e765b5971e33d3b8d945310d7eceb4c44cc6f2d8 SHA512 2b80a8853002c8f129b376826532ca1b3147f933bb83adf9e960224f165f4078cb3a8a273f153d95a8171407da6de5549e26bc95effaa48a423242f37f071655 +AUX mlt-6.6.0-kdenlivetitle-crash.patch 803 BLAKE2B 30d8552398ffa355196dd418110cbac512f6800004c14ece7deddd4210781859c3fc81380816e06b89b0abe6b23a50d40cb17e8e44cdfd63b3331214dc26b157 SHA512 cbbf45c018419f32bc08b378369acf2af91616c569f72fcb35f20e46231f00225d533d77032c9aac3f04ac4eaf003b75ebff73b8e687c7cb13267f6b5a45bf85 +AUX mlt-6.6.0-libav-1.patch 1433 BLAKE2B 3549e44e1957e4fce9558f4d2494e430f36f2a02bbad4fed5510103141df494886561c3c722a21c94b74514d3b2b559e71ee4471fa43c57f5e7f8569a70b675f SHA512 dec1bc755f41c76fe907332aa0f5de9a3c8694b2881e9b7ab7768800343e000e0f216f341167e128b1e1763f4933df32f7e8bc805e0f4436d11eaffe838c29bb +AUX mlt-6.6.0-libav-2.patch 1175 BLAKE2B 57753322de41f78d28178eb2bbcc5b5faca6a54561599977ed95c681186e4560454c86bc4229d326411ecbd5ccb51caff74451b957763844b6a09a80b58fddf4 SHA512 6ccf1aa9560c1e521e661c45ab5ae49ec88d4f58259cf6b5b8dadb1e17d7f3e0bfe7917f07d16405d68ab65539538f14312be5acf0688ada3975908db28cfa9e +AUX mlt-6.6.0-libav-3.patch 1072 BLAKE2B 64d37848454714431df843327f35cafd643036e796d2045986db98f0602078b0291191c618b6be34d9a3286809af7e2a7d88cbb5d2e46f975185f729aa1bb977 SHA512 cd02085fbdd4d5a1ea78d1cda286207fdb0d9487c6db9fed8a2ee87f352e660b8ebd32593613ee8d9d93bc690a6f7d97b31fe840e921fae95f36c1898435d6c7 +AUX mlt-6.6.0-png-segfault.patch 1606 BLAKE2B 9ca96cf4477e84bcb903b64019437ce730a4619db8e04e99828dc793c67982adde32aa5d17962e6f8db48981e34eecfdb4bf9d9d469b58349b8a25865a574751 SHA512 44251f87e0d288fc9b05577f41a5c75e26813a2d95d6133a9b541825b5a73c272d1209bb678686ca84388664a22e0da2d7e3fb44507ae15c71924dbae498dc74 +AUX mlt-6.6.0-vorbis-ffmpeg-3.4.patch 1297 BLAKE2B 65b39a7ecfd4d26b3a18b044b95c2fe3e2c31298e681de4411935ee1dc8e261a8a8a3fc8ae11e3138e500dd50f1d8a97c97fb336b3d0d2d15a69f4336d09dee1 SHA512 f5a07939811b91c9490b16923aac72c172b1fb789b8c3b0e628b77cebf063d310487c39da0f47ea2d26cdba0b91fda4a7bfe2399862353fe0350b624970641ff DIST mlt-6.4.1.tar.gz 1344030 BLAKE2B 835561eac31a44d292c5915567338eb43110b3474778327af282403b43e3e89eaec407e5920f81a774c03968b4c08a496b0ef6c3e6d0970c17353613e7f4d051 SHA512 b082274e2184a0496f496517ddbcae33bab44cd1f50c1708942b7a24e5861ba97cae9fa21ec41ea21d662cbf56e2e2e66caa707a100077ef6e13aa7140f7a9fb DIST mlt-6.6.0.tar.gz 1365768 BLAKE2B e2e6919d603560dac3d809740a3be2989a3b52a4e933fa67927c5c26796a5c9b35da1aedb54caa4c87133dc682d5f41455900594ebdfd6ec1516ff02d477d58f SHA512 06e553d2deb36deddd9e0f2269ee0529bf768e73d2160ee16a4cd36ed3fba5be145165f0b21278623afece046351264269509ff05f24fbbb2f163be1f4d48845 EBUILD mlt-6.4.1-r6.ebuild 5685 BLAKE2B 9785e64a795bfa740e4e70b4c4941b2be9ef3ceeb936c112137e137c19e814cbca10b168498e1da4e5e63010589c98f21c0cc06d23a60870fd645d0229679293 SHA512 f77ba0383dc88fb9f5d473fee589995a8b8a77d433b691e54e165c3785adcdc0d8dc2c6af34f7eb4e17d866769cf85e1e3f8066acacf27d3b70460ec382d19d3 -EBUILD mlt-6.6.0.ebuild 5570 BLAKE2B ad04d53ba03cfdbb2b1e2a073f3c5ebfdb96ba997d65b1038df10ecb0792978d5594abee77d7bd9766594091f7f9b4f4bfdde389bb2bba8c034e76acd62f9129 SHA512 54992941e5c45b3a8c43aad80e2f121790d54551cbcd8f644a995821feaa76c48fcb49ee5cdd436714f339ba62442bac33e41661ad770611dab8100de154cf88 +EBUILD mlt-6.6.0-r1.ebuild 5911 BLAKE2B 92396167dc5cf147c644eec7f03dca94029b6296a527ccf17f0cdf6d5152295900ab8b98d402bd9b3fc4d93c3618c40155168a539046d1a99638c9ba65eb8e7e SHA512 b5990e8e9969d8f4450b5b3e69dc0c22eb9b7238909f042cb71a5078306547fc7b83f94f9299b85485b8660cab9be29013959af7237fca46aef73629c3e95564 MISC metadata.xml 1571 BLAKE2B d048070896ee31a768268cef47e8b051d24a7a48a0728a82045f8a1cccc361378945cb6d84dadb31a7c664e5f57fe15dde85e08fc579fe8f839ce5c3e64e75cc SHA512 6dbfe8206f62d5c8801e2f3a71ab409a3f3072f600d6fc935b1dbb0cc4cb67f3a0ed221a3c6a76977b3fbea60c7fb7bbf2047e55ef5a7a5aacc8bf60252fcc01 diff --git a/media-libs/mlt/files/mlt-6.6.0-gif-encoding.patch b/media-libs/mlt/files/mlt-6.6.0-gif-encoding.patch new file mode 100644 index 000000000000..4faecdc78792 --- /dev/null +++ b/media-libs/mlt/files/mlt-6.6.0-gif-encoding.patch @@ -0,0 +1,33 @@ +From c7c2f271170892094a0cccdb517ca1b6061208d7 Mon Sep 17 00:00:00 2001 +From: Dan Dennedy +Date: Mon, 12 Mar 2018 15:20:29 -0700 +Subject: [PATCH] Fix #284 GIF encoding not working. + +This also fixes DPX. +--- + presets/consumer/avformat/GIF | 1 - + src/modules/avformat/consumer_avformat.c | 2 +- + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/presets/consumer/avformat/GIF b/presets/consumer/avformat/GIF +index f6a0cd41a..da7361851 100644 +--- a/presets/consumer/avformat/GIF ++++ b/presets/consumer/avformat/GIF +@@ -7,4 +7,3 @@ bf=0 + + meta.preset.extension=gif + meta.preset.name=GIF Animation +-meta.preset.hidden=1 +diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c +index caac488e2..c3724d131 100644 +--- a/src/modules/avformat/consumer_avformat.c ++++ b/src/modules/avformat/consumer_avformat.c +@@ -71,7 +71,7 @@ + #define AUDIO_ENCODE_BUFFER_SIZE (48000 * 2 * MAX_AUDIO_STREAMS) + #define AUDIO_BUFFER_SIZE (1024 * 42) + #define VIDEO_BUFFER_SIZE (8192 * 8192) +-#define IMAGE_ALIGN (1) ++#define IMAGE_ALIGN (4) + + // + // This structure should be extended and made globally available in mlt diff --git a/media-libs/mlt/files/mlt-6.6.0-kdenlivetitle-crash.patch b/media-libs/mlt/files/mlt-6.6.0-kdenlivetitle-crash.patch new file mode 100644 index 000000000000..b65a63d87667 --- /dev/null +++ b/media-libs/mlt/files/mlt-6.6.0-kdenlivetitle-crash.patch @@ -0,0 +1,22 @@ +From 95f7f7bc104ec35ed3c909e52d928313fd35a48c Mon Sep 17 00:00:00 2001 +From: Jean-Baptiste Mardelle +Date: Mon, 19 Mar 2018 09:20:49 +0100 +Subject: [PATCH] Fix crash with kdenlivetile caused by wrong malloc size + +--- + src/modules/qt/producer_kdenlivetitle.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/modules/qt/producer_kdenlivetitle.c b/src/modules/qt/producer_kdenlivetitle.c +index 67508aa33..4dc5d9c6b 100644 +--- a/src/modules/qt/producer_kdenlivetitle.c ++++ b/src/modules/qt/producer_kdenlivetitle.c +@@ -41,7 +41,7 @@ void read_xml(mlt_properties properties) + goto error; + rewind (f); + +- char *infile = (char*) mlt_pool_alloc(lSize); ++ char *infile = (char*) mlt_pool_alloc(lSize + 1); + if ( infile ) + { + size = fread(infile,1,lSize,f); diff --git a/media-libs/mlt/files/mlt-6.6.0-libav-1.patch b/media-libs/mlt/files/mlt-6.6.0-libav-1.patch new file mode 100644 index 000000000000..6dc5a73c7fe2 --- /dev/null +++ b/media-libs/mlt/files/mlt-6.6.0-libav-1.patch @@ -0,0 +1,39 @@ +From bd59735b4f97ae9dff864debdecc2318b0cb8f94 Mon Sep 17 00:00:00 2001 +From: Dan Dennedy +Date: Mon, 12 Feb 2018 12:21:19 -0800 +Subject: [PATCH] Fix compile error with libav. + +--- + src/modules/avformat/producer_avformat.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/modules/avformat/producer_avformat.c b/src/modules/avformat/producer_avformat.c +index 214c8b325..7de997cc2 100644 +--- a/src/modules/avformat/producer_avformat.c ++++ b/src/modules/avformat/producer_avformat.c +@@ -1,6 +1,6 @@ + /* + * producer_avformat.c -- avformat producer +- * Copyright (C) 2003-2017 Meltytech, LLC ++ * Copyright (C) 2003-2018 Meltytech, LLC + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -1266,7 +1266,7 @@ static int pick_av_pixel_format( int *pix_fmt ) + return 0; + } + +-#if LIBSWSCALE_VERSION_INT >= AV_VERSION_INT( 3, 1, 101 ) ++#if defined(FFUDIV) && LIBSWSCALE_VERSION_INT >= AV_VERSION_INT( 3, 1, 101 ) + struct sliced_pix_fmt_conv_t + { + int width, height, slice_w; +@@ -1461,7 +1461,7 @@ static int convert_image( producer_avformat self, AVFrame *frame, uint8_t *buffe + sws_freeContext( context ); + } + else +-#if LIBSWSCALE_VERSION_INT >= AV_VERSION_INT( 3, 1, 101 ) ++#if defined(FFUDIV) && LIBSWSCALE_VERSION_INT >= AV_VERSION_INT( 3, 1, 101 ) + { + int i, c; + struct sliced_pix_fmt_conv_t ctx = diff --git a/media-libs/mlt/files/mlt-6.6.0-libav-2.patch b/media-libs/mlt/files/mlt-6.6.0-libav-2.patch new file mode 100644 index 000000000000..d29cabec704a --- /dev/null +++ b/media-libs/mlt/files/mlt-6.6.0-libav-2.patch @@ -0,0 +1,31 @@ +From 56e3affe1ff425d979ea9f2a5e086d769852c3fc Mon Sep 17 00:00:00 2001 +From: Dan Dennedy +Date: Fri, 16 Feb 2018 09:55:29 -0800 +Subject: [PATCH] Fix compile error with libav. + +--- + src/modules/avformat/producer_avformat.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/modules/avformat/producer_avformat.c b/src/modules/avformat/producer_avformat.c +index 7de997cc2..2fafd00e8 100644 +--- a/src/modules/avformat/producer_avformat.c ++++ b/src/modules/avformat/producer_avformat.c +@@ -1266,7 +1266,7 @@ static int pick_av_pixel_format( int *pix_fmt ) + return 0; + } + +-#if defined(FFUDIV) && LIBSWSCALE_VERSION_INT >= AV_VERSION_INT( 3, 1, 101 ) ++#if defined(FFUDIV) && (LIBSWSCALE_VERSION_INT >= ((3<<16)+(1<<8)+101)) + struct sliced_pix_fmt_conv_t + { + int width, height, slice_w; +@@ -1461,7 +1461,7 @@ static int convert_image( producer_avformat self, AVFrame *frame, uint8_t *buffe + sws_freeContext( context ); + } + else +-#if defined(FFUDIV) && LIBSWSCALE_VERSION_INT >= AV_VERSION_INT( 3, 1, 101 ) ++#if defined(FFUDIV) && (LIBSWSCALE_VERSION_INT >= ((3<<16)+(1<<8)+101)) + { + int i, c; + struct sliced_pix_fmt_conv_t ctx = diff --git a/media-libs/mlt/files/mlt-6.6.0-libav-3.patch b/media-libs/mlt/files/mlt-6.6.0-libav-3.patch new file mode 100644 index 000000000000..fdbd5ef271f2 --- /dev/null +++ b/media-libs/mlt/files/mlt-6.6.0-libav-3.patch @@ -0,0 +1,23 @@ +From 53181a4e4629e2cd22c6f5d16a459aa843f4bd65 Mon Sep 17 00:00:00 2001 +From: Dan Dennedy +Date: Fri, 23 Feb 2018 10:04:47 -0800 +Subject: [PATCH] Fix compile error with libav. + +--- + src/modules/avformat/consumer_avformat.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c +index 6deb76df5..ba5c900c7 100644 +--- a/src/modules/avformat/consumer_avformat.c ++++ b/src/modules/avformat/consumer_avformat.c +@@ -1647,7 +1647,9 @@ static void *consumer_thread( void *arg ) + enc_ctx->audio_avframe->format = c->sample_fmt; + enc_ctx->audio_avframe->nb_samples = enc_ctx->audio_input_frame_size; + enc_ctx->audio_avframe->channel_layout = c->channel_layout; ++#if LIBAVCODEC_VERSION_INT >= ((57<<16)+(96<<8)) && LIBAVCODEC_VERSION_MICRO >= 100 + enc_ctx->audio_avframe->channels = c->channels; ++#endif + } else { + mlt_log_error( MLT_CONSUMER_SERVICE(consumer), "failed to allocate audio AVFrame\n" ); + mlt_events_fire( properties, "consumer-fatal-error", NULL ); diff --git a/media-libs/mlt/files/mlt-6.6.0-png-segfault.patch b/media-libs/mlt/files/mlt-6.6.0-png-segfault.patch new file mode 100644 index 000000000000..c93458a8273b --- /dev/null +++ b/media-libs/mlt/files/mlt-6.6.0-png-segfault.patch @@ -0,0 +1,36 @@ +From e013fd7c2f49b40a1b482d712d531329d538da88 Mon Sep 17 00:00:00 2001 +From: Brian Matherly +Date: Wed, 31 Jan 2018 20:57:42 -0600 +Subject: [PATCH] Fix segmentation fault when using qimage png producer #296 + +--- + src/modules/qt/qimage_wrapper.cpp | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/modules/qt/qimage_wrapper.cpp b/src/modules/qt/qimage_wrapper.cpp +index 436f65d15..99b4ebf8e 100644 +--- a/src/modules/qt/qimage_wrapper.cpp ++++ b/src/modules/qt/qimage_wrapper.cpp +@@ -229,18 +229,19 @@ void refresh_image( producer_qimage self, mlt_frame frame, mlt_image_format form + QString interps = mlt_properties_get( properties, "rescale.interp" ); + bool interp = ( interps != "nearest" ) && ( interps != "none" ); + QImage *qimage = static_cast( self->qimage ); ++ int has_alpha = qimage->hasAlphaChannel(); ++ QImage::Format qimageFormat = has_alpha ? QImage::Format_ARGB32 : QImage::Format_RGB32; + + // Note - the original qimage is already safe and ready for destruction +- if ( qimage->depth() == 1 ) ++ if ( qimage->format() != qimageFormat ) + { +- QImage temp = qimage->convertToFormat( QImage::Format_RGB32 ); ++ QImage temp = qimage->convertToFormat( qimageFormat ); + delete qimage; + qimage = new QImage( temp ); + self->qimage = qimage; + } + QImage scaled = interp? qimage->scaled( QSize( width, height ) ) : + qimage->scaled( QSize(width, height), Qt::IgnoreAspectRatio, Qt::SmoothTransformation ); +- int has_alpha = scaled.hasAlphaChannel(); + + // Store width and height + self->current_width = width; diff --git a/media-libs/mlt/files/mlt-6.6.0-vorbis-ffmpeg-3.4.patch b/media-libs/mlt/files/mlt-6.6.0-vorbis-ffmpeg-3.4.patch new file mode 100644 index 000000000000..bdf6ea211d43 --- /dev/null +++ b/media-libs/mlt/files/mlt-6.6.0-vorbis-ffmpeg-3.4.patch @@ -0,0 +1,29 @@ +From 7e0d478d161eacea015aa3d116e250e7c5f9f942 Mon Sep 17 00:00:00 2001 +From: Dan Dennedy +Date: Wed, 7 Feb 2018 16:58:44 -0800 +Subject: [PATCH] Fix vorbis encoding with FFmpeg v3.4+ + +--- + src/modules/avformat/consumer_avformat.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c +index 434710049..6deb76df5 100644 +--- a/src/modules/avformat/consumer_avformat.c ++++ b/src/modules/avformat/consumer_avformat.c +@@ -1,6 +1,6 @@ + /* + * consumer_avformat.c -- an encoder based on avformat +- * Copyright (C) 2003-2017 Meltytech, LLC ++ * Copyright (C) 2003-2018 Meltytech, LLC + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -1647,6 +1647,7 @@ static void *consumer_thread( void *arg ) + enc_ctx->audio_avframe->format = c->sample_fmt; + enc_ctx->audio_avframe->nb_samples = enc_ctx->audio_input_frame_size; + enc_ctx->audio_avframe->channel_layout = c->channel_layout; ++ enc_ctx->audio_avframe->channels = c->channels; + } else { + mlt_log_error( MLT_CONSUMER_SERVICE(consumer), "failed to allocate audio AVFrame\n" ); + mlt_events_fire( properties, "consumer-fatal-error", NULL ); diff --git a/media-libs/mlt/mlt-6.6.0-r1.ebuild b/media-libs/mlt/mlt-6.6.0-r1.ebuild new file mode 100644 index 000000000000..075ddb77dc01 --- /dev/null +++ b/media-libs/mlt/mlt-6.6.0-r1.ebuild @@ -0,0 +1,238 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +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="ruby23" +inherit flag-o-matic 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}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 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 libav libsamplerate lua melt opencv opengl python qt5 rtaudio ruby sdl sdl2 vdpau xine xml" +# java perl php tcl vidstab +IUSE="${IUSE} kernel_linux" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) sdl2? ( sdl )" + +#rtaudio will use OSS on non linux OSes +COMMON_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 + kernel_linux? ( media-libs/alsa-lib ) + ) + ruby? ( ${RUBY_DEPS} ) + sdl? ( + sdl2? ( + media-libs/libsdl2[X,opengl,video] + media-libs/sdl2-image + ) + !sdl2? ( + >=media-libs/libsdl-1.2.10[X,opengl,video] + >=media-libs/sdl-image-1.2.4 + ) + ) + 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= ) +# vidstab? ( media-libs/libvidstab ) +SWIG_DEPEND=">=dev-lang/swig-2.0" +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig + compressed-lumas? ( virtual/imagemagick-tools[png] ) + lua? ( ${SWIG_DEPEND} virtual/pkgconfig ) + python? ( ${SWIG_DEPEND} ) + ruby? ( ${SWIG_DEPEND} )" +# java? ( ${SWIG_DEPEND} >=virtual/jdk-1.5 ) +# perl? ( ${SWIG_DEPEND} ) +# php? ( ${SWIG_DEPEND} ) +# tcl? ( ${SWIG_DEPEND} ) +RDEPEND="${COMMON_DEPEND} + !media-libs/mlt++ +" + +DOCS=( AUTHORS ChangeLog NEWS README docs/{framework,melt,mlt{++,-xml}}.txt ) + +PATCHES=( + "${FILESDIR}"/${P}-vorbis-ffmpeg-3.4.patch + "${FILESDIR}"/${P}-libav-{1,2,3}.patch + "${FILESDIR}"/${P}-png-segfault.patch + "${FILESDIR}"/${P}-gif-encoding.patch + "${FILESDIR}"/${P}-kdenlivetitle-crash.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 + + # bug 589848 + append-cxxflags -std=c++11 + + local myconf=( + --enable-gpl + --enable-gpl3 + --enable-motion-est + --target-arch=$(tc-arch) + --disable-kde + --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 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 sdl ; then + if use sdl2 ; then + myconf+=( --enable-sdl2 --disable-sdl ) + else + myconf+=( --enable-sdl --disable-sdl2 ) + fi + 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 + # TODO: java perl php tcl +} diff --git a/media-libs/mlt/mlt-6.6.0.ebuild b/media-libs/mlt/mlt-6.6.0.ebuild deleted file mode 100644 index 16e7f54c7d0e..000000000000 --- a/media-libs/mlt/mlt-6.6.0.ebuild +++ /dev/null @@ -1,221 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -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="ruby23" -inherit eutils flag-o-matic multilib 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}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~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 libav libsamplerate lua melt opencv opengl python qt5 rtaudio ruby sdl sdl2 vdpau xine xml" -# java perl php tcl vidstab -IUSE="${IUSE} kernel_linux" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -#rtaudio will use OSS on non linux OSes -COMMON_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 - kernel_linux? ( media-libs/alsa-lib ) - ) - ruby? ( ${RUBY_DEPS} ) - sdl? ( - >=media-libs/libsdl-1.2.10[X,opengl,video] - >=media-libs/sdl-image-1.2.4 - ) - sdl2? ( - media-libs/libsdl2[X,opengl,video] - media-libs/sdl2-image - ) - 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= ) -# vidstab? ( media-libs/libvidstab ) -SWIG_DEPEND=">=dev-lang/swig-2.0" -DEPEND="${COMMON_DEPEND} - virtual/pkgconfig - compressed-lumas? ( virtual/imagemagick-tools[png] ) - lua? ( ${SWIG_DEPEND} virtual/pkgconfig ) - python? ( ${SWIG_DEPEND} ) - ruby? ( ${SWIG_DEPEND} )" -# java? ( ${SWIG_DEPEND} >=virtual/jdk-1.5 ) -# perl? ( ${SWIG_DEPEND} ) -# php? ( ${SWIG_DEPEND} ) -# tcl? ( ${SWIG_DEPEND} ) -RDEPEND="${COMMON_DEPEND} - !media-libs/mlt++ -" - -DOCS=( AUTHORS ChangeLog NEWS README docs/{framework,melt,mlt{++,-xml}}.txt ) - -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 - - # bug 589848 - append-cxxflags -std=c++11 - - local myconf=( - --enable-gpl - --enable-gpl3 - --enable-motion-est - --target-arch=$(tc-arch) - --disable-kde - --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 sdl) - $(use_enable sdl2) - $(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 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 - # TODO: java perl php tcl -} -- cgit v1.2.3