extra/mlt to 6.22.0-1

This commit is contained in:
Kevin Mihelich 2020-07-31 14:24:26 +00:00
parent ccaf01bad9
commit ed03b451c0
4 changed files with 53 additions and 55 deletions

View file

@ -7,11 +7,11 @@
# Contributor: Gustavo Alvarez <sl1pkn07@gmail.com> # Contributor: Gustavo Alvarez <sl1pkn07@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org> # ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - explicitly link v5/v6 with libatomic # - delete x86 file so that it's not picked up for the build
pkgname=mlt pkgname=mlt
pkgver=6.20.0 pkgver=6.22.0
pkgrel=5 pkgrel=1
pkgdesc="An open source multimedia framework" pkgdesc="An open source multimedia framework"
arch=(x86_64) arch=(x86_64)
url="https://www.mltframework.org" url="https://www.mltframework.org"
@ -23,7 +23,6 @@ optdepends=('sdl_image: SDL1 plugin'
'sox: SOX (Audio Swiss Army Knife) plugin' 'sox: SOX (Audio Swiss Army Knife) plugin'
'ffmpeg: ffmpeg plugin' 'ffmpeg: ffmpeg plugin'
'vid.stab: video stabilize plugin' 'vid.stab: video stabilize plugin'
'gtk2: Gtk plugin'
'qt5-svg: Qt5 plugins' 'qt5-svg: Qt5 plugins'
'jack: JACK sound output plugin' 'jack: JACK sound output plugin'
'ladspa: LADSPA plugins' 'ladspa: LADSPA plugins'
@ -32,49 +31,45 @@ optdepends=('sdl_image: SDL1 plugin'
'movit: opengl plugin' 'movit: opengl plugin'
'opencv: openCV plugin' 'opencv: openCV plugin'
'rubberband: rubberband plugin' 'rubberband: rubberband plugin'
'gdk-pixbuf2: gdk plugin'
'pango: gdk plugin'
'rtaudio: rtaudio plugin'
'python: python bindings') 'python: python bindings')
makedepends=(ladspa frei0r-plugins libdv sdl_image libsamplerate sox ffmpeg vid.stab qt5-svg makedepends=(cmake ladspa frei0r-plugins libdv sdl_image libsamplerate sox ffmpeg vid.stab qt5-svg
jack libexif python swig movit eigen opencv gtk2 rubberband) jack libexif python swig movit eigen opencv rubberband gdk-pixbuf2 pango rtaudio)
conflicts=(python-mlt) conflicts=(python-mlt)
provides=(python-mlt) provides=(python-mlt)
replaces=(python-mlt) replaces=(python-mlt)
source=($pkgname-$pkgver.tar.gz::"https://github.com/mltframework/mlt/archive/v$pkgver.tar.gz" source=($pkgname-$pkgver.tar.gz::"https://github.com/mltframework/mlt/archive/v$pkgver.tar.gz"
mlt-opencv4.patch mlt-cmake-fix-build.patch
mlt-qt5.15.patch::"https://github.com/mltframework/mlt/commit/f58b44d7.patch") mlt-cmake-fix-python-bindings.patch)
sha256sums=('ab211e27c06c0688f9cbe2d74dc0623624ef75ea4f94eea915cdc313196be2dd' sha256sums=('3392d70c528d7f32e78329232b1b93a5a36b058215f664953090315132b797e5'
'e770eaa39337cbbeb7d03357c11013e62ea355696023d1bd2d0fca6d1812b627' '5871dee1c2153cf70d2a27782eba38eb694421dd089d83636b2a7f1d60938264'
'7bb659b08c776d81bc88a9aff3ed78553df23ea847ba31d7fbf7e0090f1f6dc3') 'db0430533324ad65c1846e5391d012b97f856025ce661241f5584b681dfe0075')
prepare() { prepare() {
cd $pkgname-$pkgver patch -d $pkgname-$pkgver -p1 -i ../mlt-cmake-fix-build.patch # Fix build with cmake
patch -p1 -i ../mlt-opencv4.patch # Fix build with openCV 4 patch -d $pkgname-$pkgver -p1 -i ../mlt-cmake-fix-python-bindings.patch # Fix python bindings build with cmake
patch -p1 -i ../mlt-qt5.15.patch # Fix build with Qt 5.15
rm $pkgname-$pkgver/src/modules/core/composite_line_yuv_sse2_simple.c
} }
build() { build() {
cd mlt-$pkgver cmake -B build -S $pkgname-$pkgver \
-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
[[ $CARCH == "arm" || $CARCH == "armv6h" ]] && LIBS="-latomic" cmake --build build
./configure --prefix=/usr \
--avformat-swscale \
--enable-gpl \
--enable-gpl3 \
--enable-opencv \
--avformat-ldextra=$LIBS
make
# python bindings # python bindings
cd src/swig/python cd $pkgname-$pkgver/src/swig/python
./build ./build
} }
package() { package() {
cd mlt-$pkgver DESTDIR="$pkgdir" cmake --install build
make DESTDIR="$pkgdir" install
# Install python bindings # Install python bindings
_pythonpath=`python -c "from sysconfig import get_path; print(get_path('platlib'))"` _pythonpath=`python -c "from sysconfig import get_path; print(get_path('platlib'))"`
cd "$srcdir/mlt-$pkgver/src/swig/python" cd $pkgname-$pkgver/src/swig/python
mkdir -p "$pkgdir/$_pythonpath" mkdir -p "$pkgdir/$_pythonpath"
install -m755 mlt.py "$pkgdir/$_pythonpath" install -m755 mlt.py "$pkgdir/$_pythonpath"
install -m755 _mlt.so "$pkgdir/$_pythonpath" install -m755 _mlt.so "$pkgdir/$_pythonpath"

View file

@ -0,0 +1,17 @@
diff --git a/src/melt/CMakeLists.txt b/src/melt/CMakeLists.txt
index b79afaf8..e8402276 100644
--- a/src/melt/CMakeLists.txt
+++ b/src/melt/CMakeLists.txt
@@ -1,11 +1,7 @@
set(melt_lib mlt Threads::Threads)
find_package(SDL2 QUIET)
if(SDL2_FOUND)
- add_library(sdl2 SHARED IMPORTED GLOBAL)
- set_target_properties(sdl2 PROPERTIES
- INTERFACE_INCLUDE_DIRECTORIES ${SDL2_INCLUDE_DIRS}
- IMPORTED_LOCATION ${libdir}/libSDL2.so
- )
+ add_library(sdl2 ALIAS SDL2::SDL2)
else()
pkg_check_modules(sdl2 IMPORTED_TARGET GLOBAL sdl2)
if(TARGET PkgConfig::sdl2)

View file

@ -0,0 +1,13 @@
diff --git a/src/swig/python/build b/src/swig/python/build
index 9b86703c..1c51399f 100755
--- a/src/swig/python/build
+++ b/src/swig/python/build
@@ -25,7 +25,7 @@ then
${CXX} -fPIC -D_GNU_SOURCE ${CXXFLAGS} -c -I../.. $PYTHON_INCLUDE mlt_wrap.cxx || exit $?
# Create the module
- ${CXX} ${CXXFLAGS} -shared mlt_wrap.o -L../../mlt++ -lmlt++ -L../../framework -lmlt $("${PYTHON}-config" --ldflags) -o _mlt.so || exit $?
+ ${CXX} ${CXXFLAGS} -shared mlt_wrap.o -L../../../../build/src/mlt++ -lmlt++ -L../../../../build/src/framework -lmlt ${LDFLAGS} $("${PYTHON}-config" --ldflags) -o _mlt.so || exit $?
else
echo Python not installed.
exit 1

View file

@ -1,27 +0,0 @@
diff --git a/src/modules/opencv/configure b/src/modules/opencv/configure
index 36851f67..f8084301 100755
--- a/src/modules/opencv/configure
+++ b/src/modules/opencv/configure
@@ -26,18 +26,18 @@ else
exit 0
fi
- pkg-config --atleast-version=3.1.0 'opencv'
+ pkg-config --atleast-version=3.1.0 'opencv4'
if [ $? -eq 0 ]
then
- result=`pkg-config --libs opencv | grep "opencv_tracking"`
+ result=`pkg-config --libs opencv4 | 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 opencv4)" >> config.mak
+ echo "LDFLAGS += $(pkg-config --libs opencv4)" >> config.mak
fi
else
echo "- OpenCV >= 3.1.0 NOT found: disabling"