mlt, add modules (#4626)

This commit is contained in:
Schrijvers Luc
2020-01-21 14:55:51 +01:00
committed by GitHub
parent 26c4641785
commit 57ad1cd7ae
2 changed files with 124 additions and 26 deletions

View File

@@ -15,14 +15,33 @@ libMltVersionCompat="$portVersion compat >= ${portVersion%%.*}"
PROVIDES="
mlt$secondaryArchSuffix = $portVersion
cmd:melt
cmd:melt = $portVersion
lib:libmlt$secondaryArchSuffix = $libMltVersionCompat
lib:libmlt++$secondaryArchSuffix = $libMltVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
# ladspa_sdk$secondaryArchSuffix
frei0r$secondaryArchSuffix
lib:libavcodec$secondaryArchSuffix
lib:libavdevice$secondaryArchSuffix
lib:libavfilter$secondaryArchSuffix
lib:libavformat$secondaryArchSuffix
lib:libavutil$secondaryArchSuffix
lib:libebur128$secondaryArchSuffix
lib:libfftw3$secondaryArchSuffix
# lib:libjack$secondaryArchSuffix
lib:libSDL_1.2$secondaryArchSuffix
# lib:libSDL_image_1.2$secondaryArchSuffix
lib:libSDL2_2.0$secondaryArchSuffix
# lib:libSDL2_image_2.0$secondaryArchSuffix
lib:libsox$secondaryArchSuffix
lib:libswscale$secondaryArchSuffix
lib:libswresample$secondaryArchSuffix
lib:libxml2$secondaryArchSuffix
"
PROVIDES_devel="
mlt${secondaryArchSuffix}_devel = $portVersion
devel:libmlt$secondaryArchSuffix = $libMltVersionCompat
@@ -34,6 +53,24 @@ REQUIRES_devel="
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
# ladspa_sdk${secondaryArchSuffix}_devel
frei0r${secondaryArchSuffix}_devel
devel:libavcodec$secondaryArchSuffix
devel:libavdevice$secondaryArchSuffix
devel:libavfilter$secondaryArchSuffix
devel:libavformat$secondaryArchSuffix
devel:libavutil$secondaryArchSuffix
devel:libebur128$secondaryArchSuffix
devel:libfftw3$secondaryArchSuffix
# devel:libjack$secondaryArchSuffix
devel:libSDL_1.2$secondaryArchSuffix
# devel:libSDL_image_1.2$secondaryArchSuffix
devel:libSDL2_2.0$secondaryArchSuffix
# devel:libSDL2_image_2.0$secondaryArchSuffix
devel:libsox$secondaryArchSuffix
devel:libswscale$secondaryArchSuffix
devel:libswresample$secondaryArchSuffix
devel:libxml2$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk

View File

@@ -1,23 +1,11 @@
From 0d0dfdbd3bff57d61e5522cc8ff4e240e38c4ef3 Mon Sep 17 00:00:00 2001
From 39d78014135554764b6d847ed4ad2c4fe02af2f4 Mon Sep 17 00:00:00 2001
From: TURX <turx2003@gmail.com>
Date: Sun, 19 Jan 2020 22:57:40 +0800
Subject: [PATCH] fix Haiku support
Subject: fix Haiku support
---
Makefile | 4 ++--
configure | 19 +++++++++++++++++--
src/framework/Makefile | 6 +++---
src/framework/configure | 3 ++-
src/framework/mlt_consumer.c | 8 ++++++++
src/framework/mlt_slices.c | 2 ++
src/mlt++/Makefile | 6 +++---
src/mlt++/configure | 4 ++--
src/modules/decklink/consumer_decklink.cpp | 2 ++
src/modules/decklink/producer_decklink.cpp | 2 ++
10 files changed, 43 insertions(+), 13 deletions(-)
diff --git a/Makefile b/Makefile
index 938c6a6c..64de6f36 100644
index 938c6a6..64de6f3 100644
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,7 @@ include config.mak
@@ -39,7 +27,7 @@ index 938c6a6c..64de6f36 100644
ifeq ($(compat_dirs), true)
rm -rf "$(DESTDIR)$(prefix)/share/mlt"
diff --git a/configure b/configure
index a32a75ce..7dff1e19 100755
index a32a75c..7dff1e1 100755
--- a/configure
+++ b/configure
@@ -18,6 +18,7 @@ General build options:
@@ -118,7 +106,7 @@ index a32a75ce..7dff1e19 100755
export unversionedmoduledir=${libdir}/mlt
export unversionedmltdatadir=${datadir}/mlt
diff --git a/src/framework/Makefile b/src/framework/Makefile
index 654883f1..395e7955 100644
index 654883f..395e795 100644
--- a/src/framework/Makefile
+++ b/src/framework/Makefile
@@ -128,8 +128,8 @@ install:
@@ -142,7 +130,7 @@ index 654883f1..395e7955 100644
ifneq ($(wildcard .depend),)
diff --git a/src/framework/configure b/src/framework/configure
index 601b20c9..a16a5668 100755
index 601b20c..a16a566 100755
--- a/src/framework/configure
+++ b/src/framework/configure
@@ -1,4 +1,5 @@
@@ -153,7 +141,7 @@ index 601b20c9..a16a5668 100755
echo > config.mak
diff --git a/src/framework/mlt_consumer.c b/src/framework/mlt_consumer.c
index 21f02403..f8241ca2 100644
index 21f0240..f8241ca 100644
--- a/src/framework/mlt_consumer.c
+++ b/src/framework/mlt_consumer.c
@@ -1191,9 +1191,13 @@ static void consumer_work_start( mlt_consumer self )
@@ -185,7 +173,7 @@ index 21f02403..f8241ca2 100644
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 60b17cd4..63e5daec 100644
index 60b17cd..63e5dae 100644
--- a/src/framework/mlt_slices.c
+++ b/src/framework/mlt_slices.c
@@ -200,7 +200,9 @@ mlt_slices mlt_slices_init( int threads, int policy, int priority )
@@ -199,7 +187,7 @@ index 60b17cd4..63e5daec 100644
pthread_attr_setschedparam( &tattr, &param );
diff --git a/src/mlt++/Makefile b/src/mlt++/Makefile
index 5fe19b66..6bc97f56 100644
index 5fe19b6..6bc97f5 100644
--- a/src/mlt++/Makefile
+++ b/src/mlt++/Makefile
@@ -86,8 +86,8 @@ install:
@@ -223,7 +211,7 @@ index 5fe19b66..6bc97f56 100644
ifneq ($(wildcard .depend),)
include .depend
diff --git a/src/mlt++/configure b/src/mlt++/configure
index 48e1fd9e..432ca716 100755
index 48e1fd9..432ca71 100755
--- a/src/mlt++/configure
+++ b/src/mlt++/configure
@@ -1,6 +1,6 @@
@@ -244,7 +232,7 @@ index 48e1fd9e..432ca716 100755
echo "CXXFLAGS+=-Wall $WARNINGS -fPIC -DPIC"
echo "LIBFLAGS=-shared"
diff --git a/src/modules/decklink/consumer_decklink.cpp b/src/modules/decklink/consumer_decklink.cpp
index 2ffdef04..c659c641 100644
index 2ffdef0..c659c64 100644
--- a/src/modules/decklink/consumer_decklink.cpp
+++ b/src/modules/decklink/consumer_decklink.cpp
@@ -657,7 +657,9 @@ protected:
@@ -258,7 +246,7 @@ index 2ffdef04..c659c641 100644
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 43e7fa46..75a7c5d3 100644
index 43e7fa4..75a7c5d 100644
--- a/src/modules/decklink/producer_decklink.cpp
+++ b/src/modules/decklink/producer_decklink.cpp
@@ -457,7 +457,9 @@ public:
@@ -272,5 +260,78 @@ index 43e7fa46..75a7c5d3 100644
if ( !strcmp( "max", mlt_properties_get( properties, "priority" ) ) )
param.sched_priority = sched_get_priority_max(SCHED_FIFO) - 1;
--
2.20.1
2.24.1
From 62fb1f5235e41426c4dd095a3a394d6640357b4b Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Tue, 21 Jan 2020 09:51:23 +0000
Subject: Fix SDL module
diff --git a/src/modules/sdl/Makefile b/src/modules/sdl/Makefile
index b789750..3a6f0cd 100644
--- a/src/modules/sdl/Makefile
+++ b/src/modules/sdl/Makefile
@@ -22,6 +22,8 @@ endif
ifeq ($(targetos),Darwin)
CFLAGS += -ObjC
LDFLAGS += -lobjc -framework Foundation
+else ifeq ($(targetos), Haiku)
+LDFLAGS +=
else ifneq ($(targetos), MinGW)
LDFLAGS += -lX11
endif
diff --git a/src/modules/sdl/consumer_sdl.c b/src/modules/sdl/consumer_sdl.c
index 7de5309..10435ee 100644
--- a/src/modules/sdl/consumer_sdl.c
+++ b/src/modules/sdl/consumer_sdl.c
@@ -936,7 +936,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 cc1fe28..1cc84fd 100644
--- a/src/modules/sdl/consumer_sdl_still.c
+++ b/src/modules/sdl/consumer_sdl_still.c
@@ -604,7 +604,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.24.1
From 817770b0895be8a5c452b969f08d2bcae24a7cca Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Tue, 21 Jan 2020 09:52:54 +0000
Subject: Fix SDL2 module
diff --git a/src/modules/sdl2/Makefile b/src/modules/sdl2/Makefile
index 032d33d..51c1009 100644
--- a/src/modules/sdl2/Makefile
+++ b/src/modules/sdl2/Makefile
@@ -16,6 +16,8 @@ OBJS = factory.o \
ifeq ($(targetos),Darwin)
CFLAGS += -ObjC
LDFLAGS += -lobjc -framework Foundation
+else ifeq ($(targetos), Haiku)
+LDFLAGS +=
else ifneq ($(targetos), MinGW)
LDFLAGS += -lX11
endif
--
2.24.1