mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 20:20:06 +02:00
mlt, bump version (#8426)
This commit is contained in:
@@ -2,26 +2,37 @@ SUMMARY="An open source multimedia framework"
|
||||
DESCRIPTION="A LGPL multimedia framework designed for TV broadcasting"
|
||||
HOMEPAGE="https://www.mltframework.org/"
|
||||
COPYRIGHT="2011-2019 by Meltytech, LLC."
|
||||
LICENSE="GNU LGPL v2.1"
|
||||
LICENSE="GNU LGPL v2
|
||||
GNU LGPL v2.1
|
||||
GNU LGPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/mltframework/mlt/releases/download/v$portVersion/mlt-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="3b977c5632329fca7634d0034162df6d5b79cde3256bac43e7ba8353acced61e"
|
||||
CHECKSUM_SHA256="3a7e83ed5e30f3f2d073d172c9d886310d8a73dbd2ee850ad44e3c43a9ab6394"
|
||||
PATCHES="mlt-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all"
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libMltVersionCompat="$portVersion compat >= ${portVersion%%.*}"
|
||||
commandBinDir=$binDir
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
mlt$secondaryArchSuffix = $portVersion
|
||||
cmd:melt = $portVersion
|
||||
lib:libmlt$secondaryArchSuffix = $libMltVersionCompat
|
||||
lib:libmlt++$secondaryArchSuffix = $libMltVersionCompat
|
||||
cmd:melt$commandSuffix = $portVersion
|
||||
cmd:melt_7$commandSuffix = $portVersion
|
||||
lib:libmlt_7$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libmlt++_7$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
# ladspa_sdk$secondaryArchSuffix
|
||||
ladspa_sdk$secondaryArchSuffix
|
||||
frei0r$secondaryArchSuffix
|
||||
lib:libatomic$secondaryArchSuffix
|
||||
lib:libavcodec$secondaryArchSuffix
|
||||
@@ -30,23 +41,29 @@ REQUIRES="
|
||||
lib:libavformat$secondaryArchSuffix
|
||||
lib:libavutil$secondaryArchSuffix
|
||||
lib:libebur128$secondaryArchSuffix
|
||||
lib:libexif$secondaryArchSuffix
|
||||
lib:libfftw3$secondaryArchSuffix
|
||||
lib:libfontconfig$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
# lib:libjack$secondaryArchSuffix
|
||||
lib:librubberband$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:libsamplerate$secondaryArchSuffix
|
||||
lib:libvorbis$secondaryArchSuffix
|
||||
lib:libvorbisfile$secondaryArchSuffix
|
||||
lib:libxml2$secondaryArchSuffix
|
||||
"
|
||||
|
||||
|
||||
PROVIDES_devel="
|
||||
mlt${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libmlt$secondaryArchSuffix = $libMltVersionCompat
|
||||
devel:libmlt++$secondaryArchSuffix = $libMltVersionCompat
|
||||
devel:libmlt_7$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libmlt++_7$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
mlt$secondaryArchSuffix == $portVersion base
|
||||
@@ -54,7 +71,7 @@ REQUIRES_devel="
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
# ladspa_sdk${secondaryArchSuffix}_devel
|
||||
ladspa_sdk${secondaryArchSuffix}_devel
|
||||
frei0r${secondaryArchSuffix}_devel
|
||||
devel:libavcodec$secondaryArchSuffix
|
||||
devel:libavdevice$secondaryArchSuffix
|
||||
@@ -62,40 +79,49 @@ BUILD_REQUIRES="
|
||||
devel:libavformat$secondaryArchSuffix
|
||||
devel:libavutil$secondaryArchSuffix
|
||||
devel:libebur128$secondaryArchSuffix
|
||||
devel:libexif$secondaryArchSuffix
|
||||
devel:libfftw3$secondaryArchSuffix
|
||||
devel:libfontconfig$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
# devel:libjack$secondaryArchSuffix
|
||||
devel:librubberband$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:libsamplerate$secondaryArchSuffix
|
||||
devel:libvorbis$secondaryArchSuffix
|
||||
devel:libvorbisfile$secondaryArchSuffix
|
||||
devel:libxml2$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:awk
|
||||
cmd:find
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:swig
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
runConfigure ./configure
|
||||
make $jobsArgs
|
||||
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
|
||||
$cmakeDirArgs \
|
||||
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
|
||||
-DMOD_RTAUDIO=OFF
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
make -C build install
|
||||
|
||||
prepareInstalledDevelLibs libmlt libmlt++
|
||||
prepareInstalledDevelLibs libmlt-7 libmlt++-7
|
||||
fixPkgconfig
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
}
|
||||
@@ -1,337 +0,0 @@
|
||||
From 39d78014135554764b6d847ed4ad2c4fe02af2f4 Mon Sep 17 00:00:00 2001
|
||||
From: TURX <turx2003@gmail.com>
|
||||
Date: Sun, 19 Jan 2020 22:57:40 +0800
|
||||
Subject: fix Haiku support
|
||||
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 938c6a6..64de6f3 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -26,7 +26,7 @@ include config.mak
|
||||
|
||||
install:
|
||||
install -d "$(DESTDIR)$(prefix)/bin"
|
||||
- install -d "$(DESTDIR)$(prefix)/include"
|
||||
+ install -d "$(DESTDIR)$(includedir)"
|
||||
install -d "$(DESTDIR)$(libdir)"
|
||||
install -d "$(DESTDIR)$(moduledir)"
|
||||
ifeq ($(extra_versioning), true)
|
||||
@@ -52,7 +52,7 @@ uninstall:
|
||||
for subdir in $$list; do \
|
||||
$(MAKE) DESTDIR=$(DESTDIR) -C $$subdir $@ || exit 1; \
|
||||
done
|
||||
- rm -rf "$(DESTDIR)$(prefix)/include/mlt"
|
||||
+ rm -rf "$(DESTDIR)$(includedir)/mlt"
|
||||
rm -rf "$(DESTDIR)$(mltdatadir)"
|
||||
ifeq ($(compat_dirs), true)
|
||||
rm -rf "$(DESTDIR)$(prefix)/share/mlt"
|
||||
diff --git a/configure b/configure
|
||||
index a32a75c..7dff1e1 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -18,6 +18,7 @@ General build options:
|
||||
--libdir=directory - lib directory (default: $prefix/lib)
|
||||
--datadir=directory - data directory (default: $prefix/share)
|
||||
--mandir=directory - man documentation directory (default: $prefix/share/man)
|
||||
+ --includedir=directory - headers directory (default: $prefix/include)
|
||||
--rename-melt - Give melt executable a different name (it will not be versioned)
|
||||
--enable-extra-versioning - Version melt and the data and modules directories
|
||||
--enable-gpl - Enable GPLv2 components
|
||||
@@ -58,6 +59,7 @@ build_config()
|
||||
echo "bindir=$prefix/bin"
|
||||
echo "datadir=$datadir"
|
||||
echo "mandir=$mandir"
|
||||
+ echo "includedir=$includedir"
|
||||
echo "extra_versioning=$extra_versioning"
|
||||
echo "melt_noversion=$melt_noversion"
|
||||
echo "targetos=$targetos"
|
||||
@@ -131,6 +133,16 @@ build_config()
|
||||
echo "RDYNAMIC=-rdynamic"
|
||||
echo "LDFLAGS+=-Wl,--as-needed"
|
||||
;;
|
||||
+ Haiku)
|
||||
+ [ "$optimisations" = "true" ] &&
|
||||
+ echo "OPTIMISATIONS+=-ffast-math"
|
||||
+ echo "CFLAGS+=-fPIC"
|
||||
+ echo "CXXFLAGS+=-fPIC"
|
||||
+ echo "SHFLAGS=-shared"
|
||||
+ echo "LIBDL="
|
||||
+ echo "RDYNAMIC="
|
||||
+ echo "LDFLAGS+=-Wl,--no-undefined -Wl,--as-needed"
|
||||
+ ;;
|
||||
MinGW)
|
||||
[ "$windeploy" = false ] &&
|
||||
echo "CFLAGS+=-DNODEPLOY"
|
||||
@@ -178,7 +190,7 @@ build_pkgconfig()
|
||||
(
|
||||
echo exec_prefix=$prefix
|
||||
echo libdir=$libdir
|
||||
- echo includedir=$prefix/include
|
||||
+ echo includedir=$includedir
|
||||
echo datadir=$datadir
|
||||
echo mandir=$mandir
|
||||
echo version=$version
|
||||
@@ -194,7 +206,7 @@ build_pkgconfig()
|
||||
(
|
||||
echo exec_prefix=$prefix
|
||||
echo libdir=$libdir
|
||||
- echo includedir=$prefix/include
|
||||
+ echo includedir=$includedir
|
||||
echo datadir=$datadir
|
||||
echo mandir=$mandir
|
||||
echo version=$version
|
||||
@@ -229,6 +241,7 @@ export amd64=false
|
||||
export extra_versioning=false
|
||||
export melt_noversion=false
|
||||
export windeploy=true
|
||||
+export includedir=$includedir
|
||||
|
||||
# Define the compiler used in tests (gcc is not installed everywhere)
|
||||
: ${CC:=gcc}
|
||||
@@ -264,6 +277,7 @@ do
|
||||
--libdir=* ) libdir="${i#--libdir=}" ;;
|
||||
--datadir=* ) datadir="${i#--datadir=}" ;;
|
||||
--mandir=* ) mandir="${i#--mandir=}" ;;
|
||||
+ --includedir=* ) includedir="${i#--includedir=}" ;;
|
||||
--rename-melt=* ) meltname="${i#--rename-melt=}"; melt_noversion=true ;;
|
||||
--enable-extra-versioning ) extra_versioning=true ;;
|
||||
--enable-debug ) optimisations=false ;;
|
||||
@@ -322,6 +336,7 @@ export LIBSUF
|
||||
[ "$libdir" = "" ] && libdir=$prefix/lib
|
||||
[ "$datadir" = "" ] && datadir=$prefix/share
|
||||
[ "$mandir" = "" ] && mandir=$prefix/share/man
|
||||
+[ "$includedir" = "" ] && includedir=$prefix/include
|
||||
|
||||
export unversionedmoduledir=${libdir}/mlt
|
||||
export unversionedmltdatadir=${datadir}/mlt
|
||||
diff --git a/src/framework/Makefile b/src/framework/Makefile
|
||||
index 654883f..395e795 100644
|
||||
--- a/src/framework/Makefile
|
||||
+++ b/src/framework/Makefile
|
||||
@@ -128,8 +128,8 @@ install:
|
||||
ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(SONAME) ; \
|
||||
ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(NAME) ; \
|
||||
fi
|
||||
- install -d "$(DESTDIR)$(prefix)/include/mlt/framework"
|
||||
- install -m 644 $(INCS) "$(DESTDIR)$(prefix)/include/mlt/framework"
|
||||
+ install -d "$(DESTDIR)$(includedir)/mlt/framework"
|
||||
+ install -m 644 $(INCS) "$(DESTDIR)$(includedir)/mlt/framework"
|
||||
install -d "$(DESTDIR)$(mltdatadir)"
|
||||
install -m 644 metaschema.yaml "$(DESTDIR)$(mltdatadir)"
|
||||
|
||||
@@ -148,7 +148,7 @@ uninstall:
|
||||
fi ; \
|
||||
rm -f "$(DESTDIR)$(libdir)/libmlt.def" ; \
|
||||
fi
|
||||
- rm -rf "$(DESTDIR)$(prefix)/include/mlt/framework"
|
||||
+ rm -rf "$(DESTDIR)$(includedir)/mlt/framework"
|
||||
rm -f "$(DESTDIR)$(mltdatadir)/metaschema.yaml"
|
||||
|
||||
ifneq ($(wildcard .depend),)
|
||||
diff --git a/src/framework/configure b/src/framework/configure
|
||||
index 601b20c..a16a566 100755
|
||||
--- a/src/framework/configure
|
||||
+++ b/src/framework/configure
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
-echo "framework -I$prefix/include -I$prefix/include/mlt -D_REENTRANT -L$libdir -lmlt" >> ../../packages.dat
|
||||
+
|
||||
+echo "framework -I$includedir -I$includedir/mlt -D_REENTRANT -L$libdir -lmlt" >> ../../packages.dat
|
||||
|
||||
echo > config.mak
|
||||
diff --git a/src/framework/mlt_consumer.c b/src/framework/mlt_consumer.c
|
||||
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 )
|
||||
|
||||
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-- )
|
||||
@@ -1779,9 +1783,13 @@ static void mlt_thread_create( mlt_consumer self, 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 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 )
|
||||
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/mlt++/Makefile b/src/mlt++/Makefile
|
||||
index 5fe19b6..6bc97f5 100644
|
||||
--- a/src/mlt++/Makefile
|
||||
+++ b/src/mlt++/Makefile
|
||||
@@ -86,8 +86,8 @@ install:
|
||||
ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(SONAME) ; \
|
||||
ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(NAME) ; \
|
||||
fi
|
||||
- $(INSTALL) -d "$(DESTDIR)$(prefix)/include/mlt++"
|
||||
- $(INSTALL) -m 644 $(HEADERS) "$(DESTDIR)$(prefix)/include/mlt++"
|
||||
+ $(INSTALL) -d "$(DESTDIR)$(includedir)/mlt++"
|
||||
+ $(INSTALL) -m 644 $(HEADERS) "$(DESTDIR)$(includedir)/mlt++"
|
||||
|
||||
uninstall:
|
||||
rm -f "$(DESTDIR)$(libdir)/$(TARGET)"
|
||||
@@ -104,7 +104,7 @@ uninstall:
|
||||
fi ; \
|
||||
rm -f "$(DESTDIR)$(libdir)/libmlt++.def" ; \
|
||||
fi
|
||||
- rm -rf "$(DESTDIR)$(prefix)/include/mlt++"
|
||||
+ rm -rf "$(DESTDIR)$(includedir)/mlt++"
|
||||
|
||||
ifneq ($(wildcard .depend),)
|
||||
include .depend
|
||||
diff --git a/src/mlt++/configure b/src/mlt++/configure
|
||||
index 48e1fd9..432ca71 100755
|
||||
--- a/src/mlt++/configure
|
||||
+++ b/src/mlt++/configure
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
echo "soversion=3" > config.mak
|
||||
-echo "mlt++ -I$prefix/include -I$prefix/include/mlt++ -D_REENTRANT -L$libdir -lmlt++" >> ../../packages.dat
|
||||
+echo "mlt++ -I$includedir -I$includedir/mlt++ -D_REENTRANT -L$libdir -lmlt++" >> ../../packages.dat
|
||||
|
||||
WARNINGS="-W -Wwrite-strings -Wcast-qual -Wpointer-arith -Wcast-align -Wredundant-decls"
|
||||
|
||||
@@ -10,7 +10,7 @@ case $targetos in
|
||||
echo "CXXFLAGS+=-Wall -fPIC"
|
||||
echo "LIBFLAGS=-dynamiclib -single_module"
|
||||
;;
|
||||
- Linux|FreeBSD|NetBSD|GNU/kFreeBSD|GNU)
|
||||
+ Linux|FreeBSD|NetBSD|GNU/kFreeBSD|GNU|Haiku)
|
||||
echo LIBSUF=.so
|
||||
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 2ffdef0..c659c64 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 43e7fa4..75a7c5d 100644
|
||||
--- a/src/modules/decklink/producer_decklink.cpp
|
||||
+++ b/src/modules/decklink/producer_decklink.cpp
|
||||
@@ -457,7 +457,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;
|
||||
--
|
||||
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
|
||||
|
||||
|
||||
174
media-libs/mlt/patches/mlt-7.14.0.patchset
Normal file
174
media-libs/mlt/patches/mlt-7.14.0.patchset
Normal file
@@ -0,0 +1,174 @@
|
||||
From d05e9e4218598ea79aee1e867360b71dbeb68fa9 Mon Sep 17 00:00:00 2001
|
||||
From: TURX <turx2003@gmail.com>
|
||||
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 <begasus@gmail.com>
|
||||
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 <begasus@gmail.com>
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user