diff options
Diffstat (limited to 'media-libs/mlt')
-rw-r--r-- | media-libs/mlt/Manifest | 9 | ||||
-rw-r--r-- | media-libs/mlt/files/mlt-6.20.0-crash-in-composite.patch | 34 | ||||
-rw-r--r-- | media-libs/mlt/files/mlt-6.20.0-crash-w-unsupported-preview-scale.patch | 48 | ||||
-rw-r--r-- | media-libs/mlt/files/mlt-6.20.0-musl-locale.patch | 34 | ||||
-rw-r--r-- | media-libs/mlt/files/mlt-6.20.0-no-gtk2.patch | 421 | ||||
-rw-r--r-- | media-libs/mlt/files/mlt-6.20.0-nullpointer-crash.patch | 22 | ||||
-rw-r--r-- | media-libs/mlt/files/mlt-6.20.0-opencv-double-del-crash.patch | 21 | ||||
-rw-r--r-- | media-libs/mlt/files/mlt-6.20.0-opencv4.patch | 45 | ||||
-rw-r--r-- | media-libs/mlt/mlt-6.20.0-r2.ebuild (renamed from media-libs/mlt/mlt-6.20.0-r1.ebuild) | 42 |
9 files changed, 651 insertions, 25 deletions
diff --git a/media-libs/mlt/Manifest b/media-libs/mlt/Manifest index 171e1ac4cbbe..7face3a14863 100644 --- a/media-libs/mlt/Manifest +++ b/media-libs/mlt/Manifest @@ -1,6 +1,13 @@ AUX mlt-6.10.0-swig-underlinking.patch 596 BLAKE2B b51670d051ae2bd016da65f560ed861518845d11e46aa5b4971a68f196452b86af3e00cb9af02bf23b32028731eb5352214aa63a047ebe12386c9f749df1236c SHA512 95cf9339b88979eb19cda3698474fc386c0c2d01333435e95b5a7662dbc5c359f5c78e05a0d78836023191c07a97e0dbf20c354e10cf6d1ad59d64fa9a203160 +AUX mlt-6.20.0-crash-in-composite.patch 1261 BLAKE2B 80a5b75f75dde7d5b3f9a502290d3cdf3c41d0a31109aef1ca24ca90c07cd0f640c1895b2dbfcc08bab37a07d49ac16fe0da9ccfa71e0288d2d92329a6a2b4c2 SHA512 203e291f91cbbcf4f320ac84f95a814ea84c2c97c3efe085dcfdc0cc33a983d2292d77081537536837a00f48bd0dd5ecb3848dc5ba7ddc523562276f41f3c2d4 +AUX mlt-6.20.0-crash-w-unsupported-preview-scale.patch 1679 BLAKE2B 7626434796d419f2ffd2a83adb546101a04e7a3d3569cd855dc1795283c909a96d31263c2bebbb93ae63c8eaad5d4da23101580ce02d08b02a95cfe0401156ec SHA512 7948610f2f9fc1ce3b12a053a7b69e17ac2b3c63af48bfd915eb7a10801cf049e4c5845e47fd1ccc18d81deafe57fd69b8871ac0f34d5535fa9876cf79a4528a +AUX mlt-6.20.0-musl-locale.patch 961 BLAKE2B 8d129581589ddf103ef1588cb184b81ceb5622f75c065e8f0c970dcb331dfaea4a8c6227c29d18d1a2e50d524d9ef317f5e4b11c379dd3c9caa23f06093a1586 SHA512 a010d41ccd777782ef740896ff35464f7e7aea979d2d4425638ec40bdaff02b785506b8e6561d2e820425f30d7933c638274133800bef0b15df9f0d3060487c1 +AUX mlt-6.20.0-no-gtk2.patch 13767 BLAKE2B 8921d0e394fc4eb61ec3a642b6125cfb0ec87d024b207a3beaff46ff4abfe1594d14fca248728400098aa1b5ab2e8e1dc6a95cdca3b7d7acfea11828fab92a6d SHA512 ea62120f92ff7af1cac78959dd225c723bf810fef8fb31ab88e0651dbb8bb2f1ee91dae5a5fe697529203bdc84d165a738699a2de9e83634392437bb125c9742 +AUX mlt-6.20.0-nullpointer-crash.patch 873 BLAKE2B 99b967c4725352b52f5db9598b80c1f441b720ba0a26697785e04cfabd140cecc99e357176fe339c7203e4931c9a069494ab6a5bee1baebdd7a7d1c691b060ca SHA512 e0e39776ce80534299df82e3c4ada584b727029d11dd77d93d36c6cf605546ffb32184fca549dd2243db489d6c27ecf1a69990f463654a580ec8e0bdc8c131fd +AUX mlt-6.20.0-opencv-double-del-crash.patch 841 BLAKE2B 2527a09828578156815c6c644b59f01d7bc02d9eba978f58a75e26a253375b098727e578270cf24090c38ebebce2be7d61a7245766d1c2ed37f86cf5b386d827 SHA512 2019351d82975f3eb94192d6318f33eff88570a38169bf2cbc32e822ce7f6c80e3051b0d6439b75f4a58e1108f0caef8e150bb3c876adb0cb3a663aa7e104fe5 +AUX mlt-6.20.0-opencv4.patch 1631 BLAKE2B 0b132e30f992bf0d9e19eb1d3946436c981e57c750ad49cac556436c3b74909d22cbb7a3b64071d3804548ab637d4afd69545d4a4a38b764b793bcc15cb561ba SHA512 fce81528abf733e4228fdecb983f0a888ec2712de5723c623f6a1ed083065b151e3f0fb009d488b6d60b577ddb0489ccd35c798c49e9e03f6faf511f40206ef6 AUX mlt-6.20.0-qt-5.15.patch 1571 BLAKE2B a4d5c1a009399ac0ee4d85fdc8f9f603e69ded9d77320083511a46e1c1a2c7adfa1940a97ecfb6d2ad70dfa624b844260cb0f0249fca861ab25aed8b265e9333 SHA512 2eb8934ba6bca513f7851189428c997380da09b36ea8e27bc4b1a3f69c0feebd8b5d53dbf34658693261cae13dd69e60526b26e64ee56605b3972a79c561e295 DIST mlt-6.20.0.tar.gz 1446137 BLAKE2B 50599c827be82ea5f5145297b41001e94b44519ec4c6344b8cfdc6fc92e6106de60ecd985296ab77d24e6a5b74ea8e859187935bd88f9394f3c108308afc68ac SHA512 939e837fb07ff0eace308987d83913e979f82c6eb156b40fde784f3f2b031b5f6896ac96dcde1627925cbb6fc76725f3fc4e5b2d0616fae11263648bcdbe82e3 -EBUILD mlt-6.20.0-r1.ebuild 5343 BLAKE2B b113669829ee553f13eb0fbda8648102e9ae746330bca535053763d87d78a4c09a5ddc4f17ea54d28995a2faa2fafc388b69c0d69f467487d21846828fafba7b SHA512 30d57ecbec0b35e1af8767ba083f23fc80bf84506df5052d4ee557d47e9d8209237fb324ed0ceaf4c2fcb97c554df6d0fb959107d6a297910523786614401acd +EBUILD mlt-6.20.0-r2.ebuild 5130 BLAKE2B a1660102cf36de424c98b13528814b3d0df0fd485f4eb5f5e67b7e6764249852e49c5591a73d7cb98634caca0d92d2894f5b78570887cc4b49a8559fe3588e48 SHA512 94b6675c75ae3abae1c06af0de79e280dc2cbb314f65e294510fce8a18b1ddc94931ed5464124190a0ec59361c466c661f025387c2ebc9855cf1d30045a8fefb EBUILD mlt-6.20.0.ebuild 5340 BLAKE2B c2db005fe50befb993f8154a5f53d8395adebe49e5df102fbd78ecd89f851be944cf16b69fee1b1cd44cfed239219bee3bcb5f5f4b2e184ed06ae32b39459617 SHA512 bdefec68b4a36be06655d5649ca5efd3d94ff501570e8e6a8c0e2fb42bf8907aeaf6727c884c6fb270b31f388bdbf1c8013f3ce784f3ee9c258a16cbf62e21d1 MISC metadata.xml 1595 BLAKE2B 63b95c943ec9860db5c68d7ffcf683381bb0e859afe333263afc51f9e985a9f4263279aded8288ec03511d8d56d12415f5590529a4de0009ff21bb890bc1febe SHA512 7f7005732163a00fcd0ff1d21608c26296f87e0658fad912e35724b61c9072ceb67f1a515b0445159192f4959be87a63a01b717c8fe63a64aa8ceb3081cb11f8 diff --git a/media-libs/mlt/files/mlt-6.20.0-crash-in-composite.patch b/media-libs/mlt/files/mlt-6.20.0-crash-in-composite.patch new file mode 100644 index 000000000000..e5ae5f01c9d0 --- /dev/null +++ b/media-libs/mlt/files/mlt-6.20.0-crash-in-composite.patch @@ -0,0 +1,34 @@ +From 46a226217d8ec5bbf66a4fa3da138fd6924dd13b Mon Sep 17 00:00:00 2001 +From: Dan Dennedy <dan@dennedy.org> +Date: Wed, 25 Mar 2020 16:06:34 -0700 +Subject: [PATCH] fix #535 crash in composite when PGM luma fails to load + +--- + src/modules/core/transition_composite.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/modules/core/transition_composite.c b/src/modules/core/transition_composite.c +index e6d078e36..24a0d30c7 100644 +--- a/src/modules/core/transition_composite.c ++++ b/src/modules/core/transition_composite.c +@@ -1,6 +1,6 @@ + /* + * transition_composite.c -- compose one image over another using alpha channel +- * Copyright (C) 2003-2019 Meltytech, LLC ++ * Copyright (C) 2003-2020 Meltytech, LLC + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -697,10 +697,10 @@ static uint16_t* get_luma( mlt_transition self, mlt_properties properties, int w + { + luma_width = 0; + luma_height = 0; +- } ++ } + } + } +- if ( luma_width > 0 && luma_height > 0 ) ++ if ( orig_bitmap && luma_width > 0 && luma_height > 0 ) + { + // Scale luma map + luma_bitmap = mlt_pool_alloc( width * height * sizeof( uint16_t ) ); diff --git a/media-libs/mlt/files/mlt-6.20.0-crash-w-unsupported-preview-scale.patch b/media-libs/mlt/files/mlt-6.20.0-crash-w-unsupported-preview-scale.patch new file mode 100644 index 000000000000..25057b3c1aeb --- /dev/null +++ b/media-libs/mlt/files/mlt-6.20.0-crash-w-unsupported-preview-scale.patch @@ -0,0 +1,48 @@ +From dc585bfa5765db418923e7b4802c03bc57733111 Mon Sep 17 00:00:00 2001 +From: Dan Dennedy <dan@dennedy.org> +Date: Mon, 2 Mar 2020 14:02:26 -0800 +Subject: [PATCH] fix crash with filters not supporting preview scale + +--- + src/modules/frei0r/transition_frei0r.c | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/src/modules/frei0r/transition_frei0r.c b/src/modules/frei0r/transition_frei0r.c +index b69011719..f11266b75 100644 +--- a/src/modules/frei0r/transition_frei0r.c ++++ b/src/modules/frei0r/transition_frei0r.c +@@ -1,7 +1,7 @@ + /* + * transition_frei0r.c -- frei0r transition + * Copyright (c) 2008 Marco Gittler <g.marco@freenet.de> +- * Copyright (C) 2009-2019 Meltytech, LLC ++ * Copyright (C) 2009-2020 Meltytech, LLC + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -67,9 +67,25 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f + } + else + { ++ mlt_image_format b_format = *format; ++ int b_width = *width; ++ int b_height = *height; ++ + error = mlt_frame_get_image( a_frame, &images[0], format, width, height, 0 ); + if ( error ) return error; + ++ if (*width != b_width || *height != b_height) { ++ if (invert) { ++ *image = images[0]; ++ } else { ++ *image = images[1]; ++ *format = b_format; ++ *width = b_width; ++ *height = b_height; ++ } ++ return error; ++ } ++ + mlt_position position = mlt_transition_get_position( transition, a_frame ); + mlt_profile profile = mlt_service_profile( MLT_TRANSITION_SERVICE( transition ) ); + double time = (double) position / mlt_profile_fps( profile ); diff --git a/media-libs/mlt/files/mlt-6.20.0-musl-locale.patch b/media-libs/mlt/files/mlt-6.20.0-musl-locale.patch new file mode 100644 index 000000000000..ed206108d2ed --- /dev/null +++ b/media-libs/mlt/files/mlt-6.20.0-musl-locale.patch @@ -0,0 +1,34 @@ +From d02611584d4b2f693469c72272fe369413139394 Mon Sep 17 00:00:00 2001 +From: Carlo Landmeter <clandmeter@gmail.com> +Date: Sun, 6 Nov 2016 00:45:44 +0100 +Subject: testing/mlt: new aport + +--- + testing/mlt/musl-locale.patch | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + create mode 100644 testing/mlt/musl-locale.patch + +(limited to 'testing/mlt/musl-locale.patch') + +diff --git a/testing/mlt/musl-locale.patch b/testing/mlt/musl-locale.patch +new file mode 100644 +index 0000000000..030bb781d1 +--- /dev/null ++++ b/testing/mlt/musl-locale.patch +@@ -0,0 +1,13 @@ ++--- ./src/framework/mlt_property.h.orig +++++ ./src/framework/mlt_property.h ++@@ -30,8 +30,8 @@ ++ #include <sys/param.h> ++ #endif ++ ++-#if defined(__GLIBC__) || defined(__APPLE__) || (__FreeBSD_version >= 900506) ++-#include <xlocale.h> +++#if defined(__linux__) || defined(__APPLE__) || (__FreeBSD_version >= 900506) +++#include <locale.h> ++ #else ++ typedef char* locale_t; ++ #endif +-- +cgit v1.2.1 + diff --git a/media-libs/mlt/files/mlt-6.20.0-no-gtk2.patch b/media-libs/mlt/files/mlt-6.20.0-no-gtk2.patch new file mode 100644 index 000000000000..5031ab374f6b --- /dev/null +++ b/media-libs/mlt/files/mlt-6.20.0-no-gtk2.patch @@ -0,0 +1,421 @@ +From 1c45ceae1d06cd3df7063e2644140b647b6d0acd Mon Sep 17 00:00:00 2001 +From: martin <martin.sandsmark@kde.org> +Date: Mon, 13 Apr 2020 19:15:32 +0000 +Subject: [PATCH] split out gdk code from gtk2 code, disable gtk2 by default + (#544) + +* split gtk2 code out from gdk code + +* remove gtk2 module from default build +--- + CMakeLists.txt | 2 +- + src/modules/gdk/CMakeLists.txt | 39 ++++++++ + src/modules/gdk/Makefile | 74 +++++++++++++++ + src/modules/gdk/configure | 82 +++++++++++++++++ + src/modules/gdk/factory.c | 92 +++++++++++++++++++ + src/modules/{gtk2 => gdk}/filter_rescale.c | 0 + src/modules/{gtk2 => gdk}/filter_rescale.yml | 0 + src/modules/{gtk2 => gdk}/have_mmx.S | 0 + src/modules/{gtk2 => gdk}/pixops.c | 0 + src/modules/{gtk2 => gdk}/pixops.h | 0 + src/modules/{gtk2 => gdk}/producer_pango.c | 1 - + src/modules/{gtk2 => gdk}/producer_pango.yml | 0 + src/modules/{gtk2 => gdk}/producer_pixbuf.c | 0 + src/modules/{gtk2 => gdk}/producer_pixbuf.yml | 0 + .../{gtk2 => gdk}/scale_line_22_yuv_mmx.S | 0 + src/modules/gtk2/deprecated | 0 + 20 files changed, 291 insertions(+), 151 deletions(-) + create mode 100644 src/modules/gdk/CMakeLists.txt + create mode 100644 src/modules/gdk/Makefile + create mode 100755 src/modules/gdk/configure + create mode 100644 src/modules/gdk/factory.c + rename src/modules/{gtk2 => gdk}/filter_rescale.c (100%) + rename src/modules/{gtk2 => gdk}/filter_rescale.yml (100%) + rename src/modules/{gtk2 => gdk}/have_mmx.S (100%) + rename src/modules/{gtk2 => gdk}/pixops.c (100%) + rename src/modules/{gtk2 => gdk}/pixops.h (100%) + rename src/modules/{gtk2 => gdk}/producer_pango.c (99%) + rename src/modules/{gtk2 => gdk}/producer_pango.yml (100%) + rename src/modules/{gtk2 => gdk}/producer_pixbuf.c (100%) + rename src/modules/{gtk2 => gdk}/producer_pixbuf.yml (100%) + rename src/modules/{gtk2 => gdk}/scale_line_22_yuv_mmx.S (100%) + create mode 100644 src/modules/gtk2/deprecated + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 54afeceda..e25ca68b0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -31,7 +31,7 @@ set(modules + src/modules/decklink + src/modules/frei0r + src/modules/feeds +- src/modules/gtk2 ++ src/modules/gdk + src/modules/kdenlive + src/modules/motion_est + src/modules/normalize +diff --git a/src/modules/gdk/CMakeLists.txt b/src/modules/gdk/CMakeLists.txt +new file mode 100644 +index 000000000..b7bdb2c24 +--- /dev/null ++++ b/src/modules/gdk/CMakeLists.txt +@@ -0,0 +1,39 @@ ++set(mltgdk_src factory.c) ++set(mltgdk_lib mlt m Threads::Threads) ++set(mltgdk_def "") ++ ++ ++pkg_check_modules(GdkPixbuf IMPORTED_TARGET gdk-pixbuf-2.0 REQUIRED) ++if(TARGET PkgConfig::GdkPixbuf) ++ list(APPEND mltgdk_src producer_pixbuf.c pixops.c filter_rescale.c) ++ list(APPEND mltgdk_lib PkgConfig::GdkPixbuf) ++ list(APPEND mltgdk_def USE_PIXBUF) ++ message(STATUS "${mltgdk_lib}") ++else() ++ message(FATAL_ERROR "Failed to find gdk pixbuf") ++endif() ++ ++pkg_check_modules(pango IMPORTED_TARGET pango) ++if(TARGET PkgConfig::pango) ++ pkg_check_modules(fontconfig IMPORTED_TARGET fontconfig) ++ if(TARGET PkgConfig::fontconfig) ++ list(APPEND mltgdk_src producer_pango.c) ++ list(APPEND mltgdk_lib PkgConfig::pango PkgConfig::fontconfig) ++ list(APPEND mltgdk_def USE_PANGO) ++ endif() ++endif() ++ ++pkg_check_modules(libexif IMPORTED_TARGET libexif) ++if(TARGET PkgConfig::libexif) ++ list(APPEND mltgdk_lib PkgConfig::libexif) ++ list(APPEND mltgdk_def USE_EXIF) ++endif() ++# Only for MMX but not x86_64: deprecated ++# list(APPEND mltgdk_src have_mmx.S scale_line_22_yuv_mmx.S) ++add_library(mltgdk MODULE ${mltgdk_src}) ++target_link_libraries(mltgdk ${mltgdk_lib}) ++target_compile_definitions(mltgdk PRIVATE ${mltgdk_def}) ++install(TARGETS mltgdk LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/mlt) ++file(GLOB yml *.yml) ++install(FILES ${yml} ++ DESTINATION ${CMAKE_INSTALL_DATADIR}/mlt/gdk) +diff --git a/src/modules/gdk/Makefile b/src/modules/gdk/Makefile +new file mode 100644 +index 000000000..2e3018976 +--- /dev/null ++++ b/src/modules/gdk/Makefile +@@ -0,0 +1,74 @@ ++include ../../../config.mak ++include config.mak ++ ++CFLAGS := -I../.. $(CFLAGS) ++ ++LDFLAGS := -L../../framework -lmlt -lpthread -lm $(LDFLAGS) ++ ++TARGET = ../libmltgdk$(LIBSUF) ++ ++OBJS = factory.o ++ ++ifdef USE_PIXBUF ++OBJS += producer_pixbuf.o pixops.o filter_rescale.o ++CFLAGS += $(shell pkg-config $(PKGCONFIG_PREFIX) --cflags gdk-pixbuf-2.0) ++LDFLAGS += $(shell pkg-config $(PKGCONFIG_PREFIX) --libs gdk-pixbuf-2.0) ++endif ++ ++ifdef USE_EXIF ++CFLAGS += $(EXIFCXXFLAGS) ++LDFLAGS += $(EXIFLIBS) ++endif ++ ++ifdef MMX_FLAGS ++ifndef ARCH_X86_64 ++ASM_OBJS = have_mmx.o scale_line_22_yuv_mmx.o ++endif ++endif ++ ++ifdef USE_PANGO ++OBJS += producer_pango.o ++CFLAGS += $(shell pkg-config $(PKGCONFIG_PREFIX) --cflags pangoft2) ++CFLAGS += $(shell pkg-config $(PKGCONFIG_PREFIX) --cflags-only-I freetype2 | awk '{for (i=1; i<=NF; i++) $$i=sprintf("%s/freetype", $$i); print}') ++LDFLAGS += $(shell pkg-config $(PKGCONFIG_PREFIX) --libs pangoft2) ++ifeq ($(targetos),Darwin) ++LDFLAGS += -liconv ++endif ++ifeq ($(targetos),FreeBSD) ++LDFLAGS += -liconv ++endif ++ifeq ($(targetos), MinGW) ++LDFLAGS += -liconv ++endif ++endif ++ ++SRCS := $(OBJS:.o=.c) ++ ++all: $(TARGET) ++ ++$(TARGET): $(OBJS) $(ASM_OBJS) ++ $(CC) $(SHFLAGS) -o $@ $(OBJS) $(ASM_OBJS) $(LDFLAGS) ++ ++have_mmx.o: ++ $(CC) -o $@ -c have_mmx.S ++ ++scale_line_22_yuv_mmx.o: scale_line_22_yuv_mmx.S ++ $(CC) -o $@ -c scale_line_22_yuv_mmx.S ++ ++depend: $(SRCS) ++ $(CC) -MM $(CFLAGS) $^ 1>.depend ++ ++distclean: clean ++ rm -f .depend ++ ++clean: ++ rm -f $(OBJS) $(ASM_OBJS) $(TARGET) ++ ++install: all ++ install -m 755 $(TARGET) "$(DESTDIR)$(moduledir)" ++ install -d "$(DESTDIR)$(mltdatadir)/gdk" ++ install -m 644 *.yml "$(DESTDIR)$(mltdatadir)/gdk" ++ ++ifneq ($(wildcard .depend),) ++include .depend ++endif +diff --git a/src/modules/gdk/configure b/src/modules/gdk/configure +new file mode 100755 +index 000000000..07003b049 +--- /dev/null ++++ b/src/modules/gdk/configure +@@ -0,0 +1,82 @@ ++#!/bin/sh ++ ++if [ "$help" = "1" ] ++then ++ cat << EOF ++GDK options: ++ ++ --gdk-prefix=path - Override the gdk prefix for pkg-config ++ ++EOF ++ ++else ++ pkgconfig_prefix= ++ for i in "$@" ++ do ++ case $i in ++ --gdk-prefix=* ) pkgconfig_prefix="${i#--gdk-prefix=}" ;; ++ esac ++ done ++ [ "$pkgconfig_prefix" != "" ] && pkgconfig_prefix="--define-variable=prefix=\"$pkgconfig_prefix\"" ++ ++ pkg-config $pkgconfig_prefix gdk-pixbuf-2.0 2> /dev/null ++ disable_pixbuf=$? ++ ++ pkg-config $pkgconfig_prefix gdk-pixbuf-2.0 pangoft2 2> /dev/null ++ disable_pango=$? ++ ++ if [ "$disable_pixbuf" != 0 -a "$disable_pango" != "0" ] ++ then ++ echo "- GDK components not found: disabling" ++ touch ../disable-gdk ++ exit 0 ++ fi ++ ++ echo > config.mak ++ ++ if [ "$disable_pixbuf" = "0" ] ++ then ++ echo "CFLAGS += -DUSE_PIXBUF" >> config.mak ++ echo "USE_PIXBUF=1" >> config.mak ++ else ++ echo "- pixbuf not found: pixbuf loader and rescaler disabled" ++ fi ++ ++ if [ "$disable_pango" = "0" ] ++ then ++ echo "CFLAGS += -DUSE_PANGO" >> config.mak ++ echo "USE_PANGO=1" >> config.mak ++ else ++ echo "- pango not found: pango titler disabled" ++ fi ++ ++ [ "$pkgconfig_prefix" != "" ] && echo "PKGCONFIG_PREFIX=$pkgconfig_prefix" >> config.mak ++ ++ pkg-config --exists 'libexif' ++ if [ $? -eq 0 ] ++ then ++ echo "- Libexif found, enabling auto rotate" ++ echo "USE_EXIF=1" >> config.mak ++ echo EXIFCXXFLAGS=$(pkg-config --cflags libexif ) >> config.mak ++ echo EXIFCXXFLAGS += -DUSE_EXIF >> config.mak ++ echo EXIFLIBS=$(pkg-config --libs libexif) >> config.mak ++ elif [ -d "$exif_libdir" -a -d "$exif_includedir" ] ++ then ++ # test if we have a libexif ++ if [ -f "$exif_libdir/exif-data.h" ] ++ then ++ echo "- Libexif found, enabling auto rotate" ++ echo "USE_EXIF=1" >> config.mak ++ echo EXIFCXXFLAGS=-I$exif_includedir >> config.mak ++ echo EXIFCXXFLAGS += -DUSE_EXIF >> config.mak ++ echo EXIFLIBS=-L$exif_libdir lexif >> config.mak ++ else ++ echo "- Libexif not found, disabling exif features (auto rotate)" ++ fi ++ else ++ echo "- Libexif not found, disabling exif features (auto rotate)" ++ fi ++ ++ exit 0 ++fi ++ +diff --git a/src/modules/gdk/factory.c b/src/modules/gdk/factory.c +new file mode 100644 +index 000000000..94b89466e +--- /dev/null ++++ b/src/modules/gdk/factory.c +@@ -0,0 +1,92 @@ ++/* ++ * factory.c -- the factory method interfaces ++ * Copyright (C) 2003-2014 Meltytech, LLC ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ */ ++ ++#include <string.h> ++#include <framework/mlt.h> ++#include <stdlib.h> ++ ++#ifdef USE_PIXBUF ++extern mlt_producer producer_pixbuf_init( char *filename ); ++extern mlt_filter filter_rescale_init( mlt_profile profile, char *arg ); ++#endif ++ ++#ifdef USE_PANGO ++extern mlt_producer producer_pango_init( const char *filename ); ++#endif ++ ++static void initialise( ) ++{ ++ static int init = 0; ++ if ( init == 0 ) ++ { ++ init = 1; ++ if ( getenv("MLT_PIXBUF_PRODUCER_CACHE") ) ++ { ++ int n = atoi( getenv("MLT_PIXBUF_PRODUCER_CACHE" ) ); ++ mlt_service_cache_set_size( NULL, "pixbuf.image", n ); ++ mlt_service_cache_set_size( NULL, "pixbuf.alpha", n ); ++ mlt_service_cache_set_size( NULL, "pixbuf.pixbuf", n ); ++ } ++ if ( getenv("MLT_PANGO_PRODUCER_CACHE") ) ++ { ++ int n = atoi( getenv("MLT_PANGO_PRODUCER_CACHE" ) ); ++ mlt_service_cache_set_size( NULL, "pango.image", n ); ++ } ++ } ++} ++ ++void *create_service( mlt_profile profile, mlt_service_type type, const char *id, char *arg ) ++{ ++ initialise( ); ++ ++#ifdef USE_PIXBUF ++ if ( !strcmp( id, "pixbuf" ) ) ++ return producer_pixbuf_init( arg ); ++#endif ++ ++#ifdef USE_PANGO ++ if ( !strcmp( id, "pango" ) ) ++ return producer_pango_init( arg ); ++#endif ++ ++#ifdef USE_PIXBUF ++ if ( !strcmp( id, "gtkrescale" ) ) ++ return filter_rescale_init( profile, arg ); ++#endif ++ ++ return NULL; ++} ++ ++static mlt_properties metadata( mlt_service_type type, const char *id, void *data ) ++{ ++ char file[ PATH_MAX ]; ++ snprintf( file, PATH_MAX, "%s/gtk2/%s", mlt_environment( "MLT_DATA" ), (char*) data ); ++ return mlt_properties_parse_yaml( file ); ++} ++ ++MLT_REPOSITORY ++{ ++ MLT_REGISTER( filter_type, "gtkrescale", create_service ); ++ MLT_REGISTER( producer_type, "pango", create_service ); ++ MLT_REGISTER( producer_type, "pixbuf", create_service ); ++ ++ MLT_REGISTER_METADATA( filter_type, "gtkrescale", metadata, "filter_rescale.yml" ); ++ MLT_REGISTER_METADATA( producer_type, "pango", metadata, "producer_pango.yml" ); ++ MLT_REGISTER_METADATA( producer_type, "pixbuf", metadata, "producer_pixbuf.yml" ); ++} +diff --git a/src/modules/gtk2/filter_rescale.c b/src/modules/gdk/filter_rescale.c +similarity index 100% +rename from src/modules/gtk2/filter_rescale.c +rename to src/modules/gdk/filter_rescale.c +diff --git a/src/modules/gtk2/filter_rescale.yml b/src/modules/gdk/filter_rescale.yml +similarity index 100% +rename from src/modules/gtk2/filter_rescale.yml +rename to src/modules/gdk/filter_rescale.yml +diff --git a/src/modules/gtk2/have_mmx.S b/src/modules/gdk/have_mmx.S +similarity index 100% +rename from src/modules/gtk2/have_mmx.S +rename to src/modules/gdk/have_mmx.S +diff --git a/src/modules/gtk2/pixops.c b/src/modules/gdk/pixops.c +similarity index 100% +rename from src/modules/gtk2/pixops.c +rename to src/modules/gdk/pixops.c +diff --git a/src/modules/gtk2/pixops.h b/src/modules/gdk/pixops.h +similarity index 100% +rename from src/modules/gtk2/pixops.h +rename to src/modules/gdk/pixops.h +diff --git a/src/modules/gtk2/producer_pango.c b/src/modules/gdk/producer_pango.c +similarity index 99% +rename from src/modules/gtk2/producer_pango.c +rename to src/modules/gdk/producer_pango.c +index b3e11b942..ead6e9123 100644 +--- a/src/modules/gtk2/producer_pango.c ++++ b/src/modules/gdk/producer_pango.c +@@ -172,7 +172,6 @@ mlt_producer producer_pango_init( const char *filename ) + pthread_mutex_lock( &pango_mutex ); + if ( fontmap == NULL ) + fontmap = (PangoFT2FontMap*) pango_ft2_font_map_new(); +- g_type_init(); + pthread_mutex_unlock( &pango_mutex ); + + producer->get_frame = producer_get_frame; +diff --git a/src/modules/gtk2/producer_pango.yml b/src/modules/gdk/producer_pango.yml +similarity index 100% +rename from src/modules/gtk2/producer_pango.yml +rename to src/modules/gdk/producer_pango.yml +diff --git a/src/modules/gtk2/producer_pixbuf.c b/src/modules/gdk/producer_pixbuf.c +similarity index 100% +rename from src/modules/gtk2/producer_pixbuf.c +rename to src/modules/gdk/producer_pixbuf.c +diff --git a/src/modules/gtk2/producer_pixbuf.yml b/src/modules/gdk/producer_pixbuf.yml +similarity index 100% +rename from src/modules/gtk2/producer_pixbuf.yml +rename to src/modules/gdk/producer_pixbuf.yml +diff --git a/src/modules/gtk2/scale_line_22_yuv_mmx.S b/src/modules/gdk/scale_line_22_yuv_mmx.S +similarity index 100% +rename from src/modules/gtk2/scale_line_22_yuv_mmx.S +rename to src/modules/gdk/scale_line_22_yuv_mmx.S +diff --git a/src/modules/gtk2/deprecated b/src/modules/gtk2/deprecated +new file mode 100644 +index 000000000..e69de29bb diff --git a/media-libs/mlt/files/mlt-6.20.0-nullpointer-crash.patch b/media-libs/mlt/files/mlt-6.20.0-nullpointer-crash.patch new file mode 100644 index 000000000000..6bff797c0a92 --- /dev/null +++ b/media-libs/mlt/files/mlt-6.20.0-nullpointer-crash.patch @@ -0,0 +1,22 @@ +From b32be6e56e328bb2e580aa13cd757aa211310bae Mon Sep 17 00:00:00 2001 +From: Dan Dennedy <dan@dennedy.org> +Date: Thu, 27 Feb 2020 23:49:07 -0800 +Subject: [PATCH] fix null pointer crash in mix transition + +--- + src/modules/core/transition_mix.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/modules/core/transition_mix.c b/src/modules/core/transition_mix.c +index ab7a166d0..89c07a285 100644 +--- a/src/modules/core/transition_mix.c ++++ b/src/modules/core/transition_mix.c +@@ -139,7 +139,7 @@ static int transition_get_audio( mlt_frame frame_a, void **buffer, mlt_audio_for + mlt_frame_get_audio( frame_a, (void**) &buffer_a, format, &frequency_a, &channels_a, &samples_a ); + + // Prevent dividing by zero. +- if ( !channels_a || !channels_b ) ++ if ( !channels_a || !channels_b || !buffer_a || !buffer_b ) + return 1; + + if ( buffer_b == buffer_a ) diff --git a/media-libs/mlt/files/mlt-6.20.0-opencv-double-del-crash.patch b/media-libs/mlt/files/mlt-6.20.0-opencv-double-del-crash.patch new file mode 100644 index 000000000000..7f764965046d --- /dev/null +++ b/media-libs/mlt/files/mlt-6.20.0-opencv-double-del-crash.patch @@ -0,0 +1,21 @@ +From 5e906b13cab7f28bbef43a33c20dbe24c2ca1f8d Mon Sep 17 00:00:00 2001 +From: Jean-Baptiste Mardelle <jb@kdenlive.org> +Date: Tue, 17 Mar 2020 18:22:04 +0100 +Subject: [PATCH] Fix OpenCV tracker double deletion crash. Fixes #532 + +--- + src/modules/opencv/filter_opencv_tracker.cpp | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/modules/opencv/filter_opencv_tracker.cpp b/src/modules/opencv/filter_opencv_tracker.cpp +index 04a5f0b09..533f0f513 100644 +--- a/src/modules/opencv/filter_opencv_tracker.cpp ++++ b/src/modules/opencv/filter_opencv_tracker.cpp +@@ -351,7 +351,6 @@ static mlt_frame filter_process( mlt_filter filter, mlt_frame frame ) + static void filter_close( mlt_filter filter ) + { + private_data* data = (private_data*) filter->child; +- free ( data->tracker ); + free ( data ); + filter->child = NULL; + filter->close = NULL; diff --git a/media-libs/mlt/files/mlt-6.20.0-opencv4.patch b/media-libs/mlt/files/mlt-6.20.0-opencv4.patch new file mode 100644 index 000000000000..e3e27904d5a2 --- /dev/null +++ b/media-libs/mlt/files/mlt-6.20.0-opencv4.patch @@ -0,0 +1,45 @@ +From f4329c7e8f4704d3f8e8f2a96bd774e6d966194b Mon Sep 17 00:00:00 2001 +From: martin <martin.sandsmark@kde.org> +Date: Tue, 7 Apr 2020 19:48:01 +0000 +Subject: [PATCH] fix opencv4 support (#545) + +--- + src/modules/opencv/configure | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + +diff --git a/src/modules/opencv/configure b/src/modules/opencv/configure +index 36851f678..4e7fdcf4a 100755 +--- a/src/modules/opencv/configure ++++ b/src/modules/opencv/configure +@@ -26,18 +26,27 @@ else + exit 0 + fi + +- pkg-config --atleast-version=3.1.0 'opencv' ++ opencvname=opencv ++ pkg-config "$opencvname" ++ if [ $? -ne 0 ] ++ then ++ # Try v4, they renamed ++ opencvname=opencv4 ++ fi ++ ++ pkg-config --atleast-version=3.1.0 "$opencvname" ++ + if [ $? -eq 0 ] + then +- result=`pkg-config --libs opencv | grep "opencv_tracking"` ++ result=`pkg-config --libs "$opencvname" | grep "opencv_tracking"` + if [ -z "$result" ] + then + echo "- OpenCV tracking contrib module NOT found, disabling OpenCV modules" + touch ../disable-opencv + exit 0 + else +- echo "CFLAGS += $(pkg-config --cflags opencv)" >> config.mak +- echo "LDFLAGS += $(pkg-config --libs opencv)" >> config.mak ++ echo "CFLAGS += $(pkg-config --cflags "$opencvname")" >> config.mak ++ echo "LDFLAGS += $(pkg-config --libs "$opencvname")" >> config.mak + fi + else + echo "- OpenCV >= 3.1.0 NOT found: disabling" diff --git a/media-libs/mlt/mlt-6.20.0-r1.ebuild b/media-libs/mlt/mlt-6.20.0-r2.ebuild index 6b5ca12addbd..2d15f57bfc5d 100644 --- a/media-libs/mlt/mlt-6.20.0-r1.ebuild +++ b/media-libs/mlt/mlt-6.20.0-r2.ebuild @@ -3,12 +3,8 @@ EAPI=7 -PYTHON_COMPAT=( python3_{6,7,8} ) -# 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="ruby26" -inherit python-single-r1 qmake-utils ruby-single toolchain-funcs +PYTHON_COMPAT=( python3_{6,7,8,9} ) +inherit python-single-r1 qmake-utils toolchain-funcs DESCRIPTION="Open source multimedia framework for television broadcasting" HOMEPAGE="https://www.mltframework.org/" @@ -19,7 +15,7 @@ SLOT="0" KEYWORDS="~amd64 ~arm64 ~ppc64 ~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 libsamplerate lua melt opencv opengl python -qt5 rtaudio ruby sdl vdpau vidstab xine xml" +qt5 rtaudio sdl vdpau vidstab xine xml" # java perl php tcl REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" @@ -29,12 +25,13 @@ SWIG_DEPEND=">=dev-lang/swig-2.0" # perl? ( ${SWIG_DEPEND} ) # php? ( ${SWIG_DEPEND} ) # tcl? ( ${SWIG_DEPEND} ) +# ruby? ( ${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:= @@ -43,7 +40,6 @@ DEPEND=" frei0r? ( media-plugins/frei0r-plugins ) gtk? ( media-libs/libexif - x11-libs/gtk+:2 x11-libs/pango ) jack? ( @@ -69,7 +65,6 @@ DEPEND=" >=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 @@ -80,6 +75,7 @@ DEPEND=" # java? ( >=virtual/jre-1.5 ) # perl? ( dev-lang/perl ) # php? ( dev-lang/php ) +# ruby? ( ${RUBY_DEPS} ) # sox? ( media-sound/sox ) # tcl? ( dev-lang/tcl:0= ) RDEPEND="${DEPEND}" @@ -89,6 +85,13 @@ DOCS=( AUTHORS ChangeLog NEWS README docs/{framework,melt,mlt{++,-xml}}.txt ) PATCHES=( "${FILESDIR}"/${PN}-6.10.0-swig-underlinking.patch "${FILESDIR}"/${P}-qt-5.15.patch + "${FILESDIR}"/${P}-no-gtk2.patch + "${FILESDIR}"/${P}-opencv4.patch + "${FILESDIR}"/${P}-nullpointer-crash.patch + "${FILESDIR}"/${P}-crash-w-unsupported-preview-scale.patch + "${FILESDIR}"/${P}-crash-in-composite.patch + "${FILESDIR}"/${P}-opencv-double-del-crash.patch + "${FILESDIR}"/${P}-musl-locale.patch # from Alpine, pending upstream ) pkg_setup() { @@ -103,8 +106,6 @@ src_prepare() { 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 - use python && python_fix_shebang src/swig/python } @@ -116,6 +117,7 @@ src_configure() { --enable-gpl3 --enable-motion-est --target-arch=$(tc-arch) + --disable-gtk2 --disable-kde --disable-sdl --disable-swfdec @@ -125,7 +127,7 @@ src_configure() { $(use_enable ffmpeg avformat) $(use_enable fftw plus) $(use_enable frei0r) - $(use_enable gtk gtk2) + $(use_enable gtk gdk) $(use_enable jack jackrack) $(use_enable kdenlive) $(use_enable libsamplerate resample) @@ -167,8 +169,8 @@ src_configure() { # 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 + # not done: java perl php ruby tcl + for i in lua python ; do use $i && swig_lang+=( $i ) done [[ -z "${swig_lang}" ]] && swig_lang=( none ) @@ -181,7 +183,6 @@ src_configure() { src_install() { default - dodir /usr/share/${PN} insinto /usr/share/${PN} doins -r demo @@ -203,12 +204,5 @@ src_install() { python_optimize fi - if use ruby; then - cd "${S}"/src/swig/ruby || die - local rubydir=$("${EPREFIX}"/usr/bin/${USE_RUBY} -r rbconfig -e 'print RbConfig::CONFIG["sitearchdir"]') - exeinto "${rubydir#${EPREFIX}}" - doexe mlt.so - dodoc play.rb thumbs.rb - fi - # TODO: java perl php tcl + # not done: java perl php ruby tcl } |