From e69b6cb7e2cd6d867d694e5f92075203cd47de1c Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Thu, 1 Feb 2024 13:05:55 +0100 Subject: [PATCH] mlt, bump version, add functionalities (#10034) --- .../{mlt-7.14.0.recipe => mlt-7.22.0.recipe} | 18 +- media-libs/mlt/patches/mlt-7.14.0.patchset | 174 ------------------ media-libs/mlt/patches/mlt-7.22.0.patchset | 170 +++++++++++++++++ 3 files changed, 186 insertions(+), 176 deletions(-) rename media-libs/mlt/{mlt-7.14.0.recipe => mlt-7.22.0.recipe} (84%) delete mode 100644 media-libs/mlt/patches/mlt-7.14.0.patchset create mode 100644 media-libs/mlt/patches/mlt-7.22.0.patchset diff --git a/media-libs/mlt/mlt-7.14.0.recipe b/media-libs/mlt/mlt-7.22.0.recipe similarity index 84% rename from media-libs/mlt/mlt-7.14.0.recipe rename to media-libs/mlt/mlt-7.22.0.recipe index 584184b9b..fa6ace680 100644 --- a/media-libs/mlt/mlt-7.14.0.recipe +++ b/media-libs/mlt/mlt-7.22.0.recipe @@ -7,7 +7,7 @@ LICENSE="GNU LGPL v2 GNU LGPL v3" REVISION="1" SOURCE_URI="https://github.com/mltframework/mlt/releases/download/v$portVersion/mlt-$portVersion.tar.gz" -CHECKSUM_SHA256="3a7e83ed5e30f3f2d073d172c9d886310d8a73dbd2ee850ad44e3c43a9ab6394" +CHECKSUM_SHA256="7cf4d9573a061d76902c6e12a2f09f5f461e7c697635233df82a63a3fe4d6da6" PATCHES="mlt-$portVersion.patchset" ARCHITECTURES="all !x86_gcc2" @@ -43,10 +43,20 @@ REQUIRES=" lib:libebur128$secondaryArchSuffix lib:libexif$secondaryArchSuffix lib:libfftw3$secondaryArchSuffix + lib:libfreetype$secondaryArchSuffix lib:libfontconfig$secondaryArchSuffix + lib:libgdk_pixbuf_2.0$secondaryArchSuffix lib:libglib_2.0$secondaryArchSuffix + lib:libharfbuzz$secondaryArchSuffix lib:libintl$secondaryArchSuffix # lib:libjack$secondaryArchSuffix + lib:libpango_1.0$secondaryArchSuffix + lib:libpangoft2_1.0$secondaryArchSuffix + lib:libQt5Core$secondaryArchSuffix + lib:libQt5Gui$secondaryArchSuffix + lib:libQt5Svg$secondaryArchSuffix + lib:libQt5Widgets$secondaryArchSuffix + lib:libQt5Xml$secondaryArchSuffix lib:librubberband$secondaryArchSuffix lib:libSDL_1.2$secondaryArchSuffix lib:libSDL2_2.0$secondaryArchSuffix @@ -72,7 +82,7 @@ REQUIRES_devel=" BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel ladspa_sdk${secondaryArchSuffix}_devel - frei0r${secondaryArchSuffix}_devel + devel:frei0r$secondaryArchSuffix devel:libavcodec$secondaryArchSuffix devel:libavdevice$secondaryArchSuffix devel:libavfilter$secondaryArchSuffix @@ -82,8 +92,11 @@ BUILD_REQUIRES=" devel:libexif$secondaryArchSuffix devel:libfftw3$secondaryArchSuffix devel:libfontconfig$secondaryArchSuffix + devel:libgdk_pixbuf_2.0$secondaryArchSuffix devel:libglib_2.0$secondaryArchSuffix # devel:libjack$secondaryArchSuffix + devel:libpangoft2_1.0$secondaryArchSuffix + devel:libQt5Core$secondaryArchSuffix devel:librubberband$secondaryArchSuffix devel:libSDL_1.2$secondaryArchSuffix devel:libSDL2_2.0$secondaryArchSuffix @@ -94,6 +107,7 @@ BUILD_REQUIRES=" devel:libvorbis$secondaryArchSuffix devel:libvorbisfile$secondaryArchSuffix devel:libxml2$secondaryArchSuffix + devel:libX11$secondaryArchSuffix " BUILD_PREREQUIRES=" cmd:cmake diff --git a/media-libs/mlt/patches/mlt-7.14.0.patchset b/media-libs/mlt/patches/mlt-7.14.0.patchset deleted file mode 100644 index 4d494e0cd..000000000 --- a/media-libs/mlt/patches/mlt-7.14.0.patchset +++ /dev/null @@ -1,174 +0,0 @@ -From d05e9e4218598ea79aee1e867360b71dbeb68fa9 Mon Sep 17 00:00:00 2001 -From: TURX -Date: Sun, 19 Jan 2020 22:57:40 +0800 -Subject: Fix Haiku support - - -diff --git a/src/modules/decklink/consumer_decklink.cpp b/src/modules/decklink/consumer_decklink.cpp -index ee8a2e9..e8df148 100644 ---- a/src/modules/decklink/consumer_decklink.cpp -+++ b/src/modules/decklink/consumer_decklink.cpp -@@ -657,7 +657,9 @@ protected: - return; - - pthread_attr_init(&tattr); -+#ifndef __HAIKU__ - pthread_attr_setschedpolicy(&tattr, SCHED_FIFO); -+#endif - - if ( !strcmp( "max", mlt_properties_get( properties, "priority" ) ) ) - param.sched_priority = sched_get_priority_max(SCHED_FIFO) - 1; -diff --git a/src/modules/decklink/producer_decklink.cpp b/src/modules/decklink/producer_decklink.cpp -index 6a01c15..108433b 100644 ---- a/src/modules/decklink/producer_decklink.cpp -+++ b/src/modules/decklink/producer_decklink.cpp -@@ -455,7 +455,10 @@ public: - struct sched_param param; - - pthread_attr_init(&tattr); -+ -+#ifndef __HAIKU__ - pthread_attr_setschedpolicy(&tattr, SCHED_FIFO); -+#endif - - if ( !strcmp( "max", mlt_properties_get( properties, "priority" ) ) ) - param.sched_priority = sched_get_priority_max(SCHED_FIFO) - 1; -diff --git a/src/modules/plusgpl/CMakeLists.txt b/src/modules/plusgpl/CMakeLists.txt -index 4a91637..21f56e9 100644 ---- a/src/modules/plusgpl/CMakeLists.txt -+++ b/src/modules/plusgpl/CMakeLists.txt -@@ -21,7 +21,7 @@ target_link_libraries(mltplusgpl PRIVATE mlt m Threads::Threads) - - if(WIN32) - target_link_libraries(mltplusgpl PRIVATE ws2_32) --elseif(UNIX AND NOT APPLE) -+elseif(UNIX AND NOT APPLE AND NOT HAIKU) - target_link_libraries(mltplusgpl PRIVATE rt) - endif() - --- -2.37.3 - - -From 699cf99375913f6296ba453c324a9bcc2ceb44ce Mon Sep 17 00:00:00 2001 -From: Begasus -Date: Tue, 18 Apr 2023 08:53:33 +0200 -Subject: Fix SDL module - - -diff --git a/src/modules/sdl/CMakeLists.txt b/src/modules/sdl/CMakeLists.txt -index 6128184..769591b 100644 ---- a/src/modules/sdl/CMakeLists.txt -+++ b/src/modules/sdl/CMakeLists.txt -@@ -17,7 +17,7 @@ target_link_libraries(mltsdl PRIVATE mlt m Threads::Threads PkgConfig::sdl) - - if(APPLE) - target_link_libraries(mltsdl PRIVATE objc "-framework Foundation") --elseif(UNIX) -+elseif(UNIX AND NOT HAIKU) - target_link_libraries(mltsdl PRIVATE X11) - endif() - -diff --git a/src/modules/sdl/consumer_sdl.c b/src/modules/sdl/consumer_sdl.c -index e23e5ed..1c3816a 100644 ---- a/src/modules/sdl/consumer_sdl.c -+++ b/src/modules/sdl/consumer_sdl.c -@@ -928,7 +928,7 @@ static int consumer_get_dimensions( int *width, int *height ) - // Get the wm structure - if ( SDL_GetWMInfo( &wm ) == 1 ) - { --#ifndef _WIN32 -+#if !defined(_WIN32) && !defined(__HAIKU__) - // Check that we have the X11 wm - if ( wm.subsystem == SDL_SYSWM_X11 ) - { -diff --git a/src/modules/sdl/consumer_sdl_still.c b/src/modules/sdl/consumer_sdl_still.c -index 3523926..c3e0a6a 100644 ---- a/src/modules/sdl/consumer_sdl_still.c -+++ b/src/modules/sdl/consumer_sdl_still.c -@@ -598,7 +598,7 @@ static int consumer_get_dimensions( int *width, int *height ) - // Get the wm structure - if ( SDL_GetWMInfo( &wm ) == 1 ) - { --#ifndef _WIN32 -+#if !defined(_WIN32) && !defined(__HAIKU__) - // Check that we have the X11 wm - if ( wm.subsystem == SDL_SYSWM_X11 ) - { --- -2.37.3 - - -From 9bf0293ce8159181ef9b16b40633f44575e572c1 Mon Sep 17 00:00:00 2001 -From: Begasus -Date: Tue, 18 Apr 2023 13:16:06 +0200 -Subject: More Haiku fixes - - -diff --git a/src/framework/mlt_consumer.c b/src/framework/mlt_consumer.c -index 35246f8..e0e4bf8 100644 ---- a/src/framework/mlt_consumer.c -+++ b/src/framework/mlt_consumer.c -@@ -1158,9 +1158,13 @@ static void consumer_work_start( mlt_consumer self ) - - priority.sched_priority = mlt_properties_get_int( MLT_CONSUMER_PROPERTIES( self ), "priority" ); - pthread_attr_init( &thread_attributes ); -+#ifndef __HAIKU__ - pthread_attr_setschedpolicy( &thread_attributes, SCHED_OTHER ); -+#endif - pthread_attr_setschedparam( &thread_attributes, &priority ); -+#ifndef __HAIKU__ - pthread_attr_setinheritsched( &thread_attributes, PTHREAD_EXPLICIT_SCHED ); -+#endif - pthread_attr_setscope( &thread_attributes, PTHREAD_SCOPE_SYSTEM ); - - while ( n-- ) -@@ -1748,9 +1752,13 @@ static void mlt_thread_create(mlt_consumer self, mlt_thread_function_t function - { - pthread_attr_t thread_attributes; - pthread_attr_init( &thread_attributes ); -+#ifndef __HAIKU__ - pthread_attr_setschedpolicy( &thread_attributes, SCHED_OTHER ); -+#endif - pthread_attr_setschedparam( &thread_attributes, &priority ); -+#ifndef __HAIKU__ - pthread_attr_setinheritsched( &thread_attributes, PTHREAD_EXPLICIT_SCHED ); -+#endif - pthread_attr_setscope( &thread_attributes, PTHREAD_SCOPE_SYSTEM ); - priv->ahead_thread = malloc( sizeof( pthread_t ) ); - pthread_t *handle = priv->ahead_thread; -diff --git a/src/framework/mlt_slices.c b/src/framework/mlt_slices.c -index 1b96d6e..0a8f2b0 100644 ---- a/src/framework/mlt_slices.c -+++ b/src/framework/mlt_slices.c -@@ -199,7 +199,9 @@ static mlt_slices mlt_slices_init( int threads, int policy, int priority ) - policy = SCHED_OTHER; - if ( priority < 0 ) - priority = sched_get_priority_max( policy ); -+#ifndef __HAIKU__ - pthread_attr_setschedpolicy( &tattr, policy ); -+#endif - param.sched_priority = priority; - pthread_attr_setschedparam( &tattr, ¶m ); - -diff --git a/src/modules/plusgpl/consumer_cbrts.c b/src/modules/plusgpl/consumer_cbrts.c -index 9a9a64d..b4049ad 100644 ---- a/src/modules/plusgpl/consumer_cbrts.c -+++ b/src/modules/plusgpl/consumer_cbrts.c -@@ -923,9 +923,13 @@ static void start_output_thread( consumer_cbrts self ) - pthread_attr_t thread_attributes; - pthread_attr_init( &thread_attributes ); - priority.sched_priority = rtprio; -+#ifndef __HAIKU__ - pthread_attr_setschedpolicy( &thread_attributes, SCHED_FIFO ); -+#endif - pthread_attr_setschedparam( &thread_attributes, &priority ); -+#ifndef __HAIKU__ - pthread_attr_setinheritsched( &thread_attributes, PTHREAD_EXPLICIT_SCHED ); -+#endif - pthread_attr_setscope( &thread_attributes, PTHREAD_SCOPE_SYSTEM ); - if ( pthread_create( &self->output_thread, &thread_attributes, output_thread, self ) < 0 ) - { --- -2.37.3 - diff --git a/media-libs/mlt/patches/mlt-7.22.0.patchset b/media-libs/mlt/patches/mlt-7.22.0.patchset new file mode 100644 index 000000000..5a574e7bd --- /dev/null +++ b/media-libs/mlt/patches/mlt-7.22.0.patchset @@ -0,0 +1,170 @@ +From 7fe65a21e6c7fa9878dba186590eb847d09de811 Mon Sep 17 00:00:00 2001 +From: Begasus +Date: Sat, 11 Nov 2023 17:02:02 +0100 +Subject: Fix Haiku support + + +diff --git a/src/modules/decklink/consumer_decklink.cpp b/src/modules/decklink/consumer_decklink.cpp +index d04024d..f69365c 100644 +--- a/src/modules/decklink/consumer_decklink.cpp ++++ b/src/modules/decklink/consumer_decklink.cpp +@@ -651,7 +651,9 @@ protected: + return; + + pthread_attr_init(&tattr); ++#ifndef __HAIKU__ + pthread_attr_setschedpolicy(&tattr, SCHED_FIFO); ++#endif + + if (!strcmp("max", mlt_properties_get(properties, "priority"))) + param.sched_priority = sched_get_priority_max(SCHED_FIFO) - 1; +diff --git a/src/modules/decklink/producer_decklink.cpp b/src/modules/decklink/producer_decklink.cpp +index 22be72e..8134e27 100644 +--- a/src/modules/decklink/producer_decklink.cpp ++++ b/src/modules/decklink/producer_decklink.cpp +@@ -470,7 +470,9 @@ public: + struct sched_param param; + + pthread_attr_init(&tattr); ++#ifndef __HAIKU__ + pthread_attr_setschedpolicy(&tattr, SCHED_FIFO); ++#endif + + if (!strcmp("max", mlt_properties_get(properties, "priority"))) + param.sched_priority = sched_get_priority_max(SCHED_FIFO) - 1; +diff --git a/src/modules/plusgpl/CMakeLists.txt b/src/modules/plusgpl/CMakeLists.txt +index ebdfd89..b8a7dc6 100644 +--- a/src/modules/plusgpl/CMakeLists.txt ++++ b/src/modules/plusgpl/CMakeLists.txt +@@ -21,7 +21,7 @@ target_link_libraries(mltplusgpl PRIVATE mlt m Threads::Threads) + + if(WIN32) + target_link_libraries(mltplusgpl PRIVATE ws2_32) +-elseif(UNIX AND NOT APPLE AND NOT ANDROID) ++elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT HAIKU) + target_link_libraries(mltplusgpl PRIVATE rt) + endif() + +-- +2.42.1 + + +From 86403f244bcdda6398e025337407fafcae528463 Mon Sep 17 00:00:00 2001 +From: Begasus +Date: Sat, 11 Nov 2023 17:22:08 +0100 +Subject: Fix SDL module + + +diff --git a/src/modules/sdl/CMakeLists.txt b/src/modules/sdl/CMakeLists.txt +index 6128184..769591b 100644 +--- a/src/modules/sdl/CMakeLists.txt ++++ b/src/modules/sdl/CMakeLists.txt +@@ -17,7 +17,7 @@ target_link_libraries(mltsdl PRIVATE mlt m Threads::Threads PkgConfig::sdl) + + if(APPLE) + target_link_libraries(mltsdl PRIVATE objc "-framework Foundation") +-elseif(UNIX) ++elseif(UNIX AND NOT HAIKU) + target_link_libraries(mltsdl PRIVATE X11) + endif() + +diff --git a/src/modules/sdl/consumer_sdl.c b/src/modules/sdl/consumer_sdl.c +index 98abfaa..7f1492a 100644 +--- a/src/modules/sdl/consumer_sdl.c ++++ b/src/modules/sdl/consumer_sdl.c +@@ -876,7 +876,7 @@ static int consumer_get_dimensions(int *width, int *height) + #ifndef __APPLE__ + // Get the wm structure + if (SDL_GetWMInfo(&wm) == 1) { +-#ifndef _WIN32 ++#if !defined(_WIN32) && !defined(__HAIKU__) + // Check that we have the X11 wm + if (wm.subsystem == SDL_SYSWM_X11) { + // Get the SDL window +diff --git a/src/modules/sdl/consumer_sdl_still.c b/src/modules/sdl/consumer_sdl_still.c +index 629c75b..0414b18 100644 +--- a/src/modules/sdl/consumer_sdl_still.c ++++ b/src/modules/sdl/consumer_sdl_still.c +@@ -579,7 +579,7 @@ static int consumer_get_dimensions(int *width, int *height) + #ifndef __APPLE__ + // Get the wm structure + if (SDL_GetWMInfo(&wm) == 1) { +-#ifndef _WIN32 ++#if !defined(_WIN32) && !defined(__HAIKU__) + // Check that we have the X11 wm + if (wm.subsystem == SDL_SYSWM_X11) { + // Get the SDL window +-- +2.42.1 + + +From 2e93fc129b9d7af02cece898bce11c456dd76d92 Mon Sep 17 00:00:00 2001 +From: Begasus +Date: Sun, 12 Nov 2023 08:05:00 +0100 +Subject: More Haiku fixes + + +diff --git a/src/framework/mlt_consumer.c b/src/framework/mlt_consumer.c +index a65d7c8..cca843d 100644 +--- a/src/framework/mlt_consumer.c ++++ b/src/framework/mlt_consumer.c +@@ -1174,9 +1174,11 @@ static void consumer_work_start(mlt_consumer self) + + priority.sched_priority = mlt_properties_get_int(MLT_CONSUMER_PROPERTIES(self), "priority"); + pthread_attr_init(&thread_attributes); ++#ifndef __HAIKU__ + pthread_attr_setschedpolicy(&thread_attributes, SCHED_OTHER); ++#endif + pthread_attr_setschedparam(&thread_attributes, &priority); +-#if !defined(__ANDROID__) || (defined(__ANDROID__) && __ANDROID_API__ >= 28) ++#if !defined(__HAIKU__) && !defined(__ANDROID__) || (defined(__ANDROID__) && __ANDROID_API__ >= 28) + pthread_attr_setinheritsched(&thread_attributes, PTHREAD_EXPLICIT_SCHED); + #endif + pthread_attr_setscope(&thread_attributes, PTHREAD_SCOPE_SYSTEM); +@@ -1754,9 +1756,11 @@ static void mlt_thread_create(mlt_consumer self, mlt_thread_function_t function) + < 1) { + pthread_attr_t thread_attributes; + pthread_attr_init(&thread_attributes); ++#ifndef __HAIKU__ + pthread_attr_setschedpolicy(&thread_attributes, SCHED_OTHER); ++#endif + pthread_attr_setschedparam(&thread_attributes, &priority); +-#if !defined(__ANDROID__) \ ++#if !defined(__HAIKU__) && !defined(__ANDROID__) \ + || (defined(__ANDROID__) \ + && __ANDROID_API__ \ + >= 28) // pthread_attr_setinheritsched is not available until API level 28 +diff --git a/src/framework/mlt_slices.c b/src/framework/mlt_slices.c +index 3f5b321..b036d71 100644 +--- a/src/framework/mlt_slices.c ++++ b/src/framework/mlt_slices.c +@@ -199,7 +199,9 @@ static mlt_slices mlt_slices_init(int threads, int policy, int priority) + policy = SCHED_OTHER; + if (priority < 0) + priority = sched_get_priority_max(policy); ++#ifndef __HAIKU__ + pthread_attr_setschedpolicy(&tattr, policy); ++#endif + param.sched_priority = priority; + pthread_attr_setschedparam(&tattr, ¶m); + +diff --git a/src/modules/plusgpl/consumer_cbrts.c b/src/modules/plusgpl/consumer_cbrts.c +index 7cc8b88..0dc6787 100644 +--- a/src/modules/plusgpl/consumer_cbrts.c ++++ b/src/modules/plusgpl/consumer_cbrts.c +@@ -913,9 +913,11 @@ static void start_output_thread(consumer_cbrts self) + pthread_attr_t thread_attributes; + pthread_attr_init(&thread_attributes); + priority.sched_priority = rtprio; ++#ifndef __HAIKU__ + pthread_attr_setschedpolicy(&thread_attributes, SCHED_FIFO); ++#endif + pthread_attr_setschedparam(&thread_attributes, &priority); +-#if !defined(__ANDROID__) || (defined(__ANDROID__) && __ANDROID_API__ >= 28) ++#if !defined(__HAIKU__) && !defined(__ANDROID__) || (defined(__ANDROID__) && __ANDROID_API__ >= 28) + pthread_attr_setinheritsched(&thread_attributes, PTHREAD_EXPLICIT_SCHED); + #endif + pthread_attr_setscope(&thread_attributes, PTHREAD_SCOPE_SYSTEM); +-- +2.42.1 +