mlt updated to 6.22.1
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
--- ./configure 2020-02-16 14:31:58.000000000 -0800
|
||||
+++ ./configure.fix 2020-06-19 03:07:16.152206200 -0700
|
||||
@@ -182,8 +182,8 @@
|
||||
echo datadir=$datadir
|
||||
echo mandir=$mandir
|
||||
echo version=$version
|
||||
- echo cflags=`grep ^framework packages.dat | cut -f 2`
|
||||
- echo libs=`grep ^framework packages.dat | cut -f 3`
|
||||
+ echo cflags=`grep ^framework packages.dat | cut -f 2 | sed "s#${prefix}/include#\\${includedir}#g"`
|
||||
+ echo libs=`grep ^framework packages.dat | cut -f 3 | sed "s#${libdir}#\\${libdir}#g"`
|
||||
echo moduledir=${moduledir}
|
||||
echo mltdatadir=${mltdatadir}
|
||||
echo meltbin=${prefix}/bin/${meltname}
|
||||
@@ -198,8 +198,8 @@
|
||||
echo datadir=$datadir
|
||||
echo mandir=$mandir
|
||||
echo version=$version
|
||||
- echo cflags=`grep ^mlt++ packages.dat | cut -f 2`
|
||||
- echo libs=`grep ^mlt++ packages.dat | cut -f 3`
|
||||
+ echo cflags=`grep ^mlt++ packages.dat | cut -f 2 | sed "s#${prefix}/include#\\${includedir}#g"`
|
||||
+ echo libs=`grep ^mlt++ packages.dat | cut -f 3 | sed "s#${libdir}#\\${libdir}#g"`
|
||||
) >> mlt++.pc
|
||||
cat mlt++.pc.in >>mlt++.pc
|
||||
}
|
||||
143
mingw-w64-mlt/010-mlt-6.22.1-fix-msys-cmake.patch
Normal file
143
mingw-w64-mlt/010-mlt-6.22.1-fix-msys-cmake.patch
Normal file
@@ -0,0 +1,143 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5f08108..13c2076 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -9,9 +9,12 @@ if(WIN32)
|
||||
option(NODEPLOY "Keep bin/ lib/ layout on Windows" ON)
|
||||
endif()
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(AMD64)")
|
||||
- set(X86_64 ON)
|
||||
- if(NOT MSVC)
|
||||
- add_definitions(-DUSE_MMX -DUSE_SSE -DUSE_SSE2 -DARCH_X86_64)
|
||||
+ if(${ARCH} MATCHES "i686")
|
||||
+ else()
|
||||
+ set(X86_64 ON)
|
||||
+ if(NOT MSVC)
|
||||
+ add_definitions(-DUSE_MMX -DUSE_SSE -DUSE_SSE2 -DARCH_X86_64)
|
||||
+ endif()
|
||||
endif()
|
||||
endif()
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
|
||||
@@ -60,7 +63,7 @@ set(modules
|
||||
src/modules/vorbis
|
||||
src/modules/xine
|
||||
src/modules/xml
|
||||
- src/modules/lumas
|
||||
+# src/modules/lumas
|
||||
)
|
||||
foreach(module ${modules})
|
||||
add_subdirectory(${module})
|
||||
diff --git a/src/framework/CMakeLists.txt b/src/framework/CMakeLists.txt
|
||||
index e9cda0f..7d53bf3 100644
|
||||
--- a/src/framework/CMakeLists.txt
|
||||
+++ b/src/framework/CMakeLists.txt
|
||||
@@ -5,9 +5,13 @@ endif()
|
||||
add_library(mlt SHARED ${mlt_src})
|
||||
set_target_properties (mlt PROPERTIES SOVERSION ${MLT_VERSION} VERSION 6)
|
||||
if(WIN32)
|
||||
- find_package(dlfcn-win32 REQUIRED)
|
||||
- find_package(iconv REQUIRED)
|
||||
- target_link_libraries(mlt dlfcn-win32::dl Iconv::Iconv)
|
||||
+ find_package(Iconv REQUIRED)
|
||||
+ if (MSYS)
|
||||
+ target_link_libraries(mlt dl Iconv::Iconv)
|
||||
+ else()
|
||||
+ find_package(dlfcn-win32 REQUIRED)
|
||||
+ target_link_libraries(mlt dlfcn-win32::dl Iconv::Iconv)
|
||||
+ endif()
|
||||
if(NODEPLOY)
|
||||
target_compile_definitions(mlt PRIVATE NODEPLOY)
|
||||
endif()
|
||||
@@ -25,7 +29,13 @@ target_include_directories(mlt PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_include_directories(mlt PUBLIC ${CMAKE_SOURCE_DIR}/src)
|
||||
|
||||
if(WIN32)
|
||||
- install(TARGETS mlt DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+ install(TARGETS mlt LIBRARY DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+ # dll.a should be placed in lib directory for proper linking
|
||||
+ if (MSYS)
|
||||
+ install(TARGETS mlt ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
+ else()
|
||||
+ install(TARGETS mlt ARCHIVE DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+ endif()
|
||||
else()
|
||||
install(TARGETS mlt DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
diff --git a/src/melt/CMakeLists.txt b/src/melt/CMakeLists.txt
|
||||
index b79afaf..496e5ea 100644
|
||||
--- a/src/melt/CMakeLists.txt
|
||||
+++ b/src/melt/CMakeLists.txt
|
||||
@@ -1,6 +1,7 @@
|
||||
set(melt_lib mlt Threads::Threads)
|
||||
find_package(SDL2 QUIET)
|
||||
-if(SDL2_FOUND)
|
||||
+# in MSYS SDL2_INCLUDE_DIRS is not set, so we use pkg-config
|
||||
+if(SDL2_FOUND AND SDL2_INCLUDE_DIRS)
|
||||
add_library(sdl2 SHARED IMPORTED GLOBAL)
|
||||
set_target_properties(sdl2 PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${SDL2_INCLUDE_DIRS}
|
||||
diff --git a/src/mlt++/CMakeLists.txt b/src/mlt++/CMakeLists.txt
|
||||
index 1351f8d..3efb968 100644
|
||||
--- a/src/mlt++/CMakeLists.txt
|
||||
+++ b/src/mlt++/CMakeLists.txt
|
||||
@@ -7,7 +7,13 @@ endif()
|
||||
target_include_directories(mlt++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../)
|
||||
target_link_libraries(mlt++ mlt)
|
||||
if(WIN32)
|
||||
- install(TARGETS mlt++ DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+ install(TARGETS mlt++ LIBRARY DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+ # dll.a should be placed in lib directory for proper linking
|
||||
+ if (MSYS)
|
||||
+ install(TARGETS mlt++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
+ else()
|
||||
+ install(TARGETS mlt++ ARCHIVE DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+ endif()
|
||||
else()
|
||||
install(TARGETS mlt++ DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
diff --git a/src/modules/core/CMakeLists.txt b/src/modules/core/CMakeLists.txt
|
||||
index fb7bb61..7d0272d 100644
|
||||
--- a/src/modules/core/CMakeLists.txt
|
||||
+++ b/src/modules/core/CMakeLists.txt
|
||||
@@ -4,6 +4,11 @@ if(WIN32)
|
||||
list(APPEND mltcore_src ${CMAKE_SOURCE_DIR}/src/win32/fnmatch.c)
|
||||
list(APPEND mltcore_inc ${CMAKE_SOURCE_DIR}/src/win32)
|
||||
endif()
|
||||
+
|
||||
+if(NOT X86_64)
|
||||
+ list(REMOVE_ITEM mltcore_src ${CMAKE_CURRENT_SOURCE_DIR}/composite_line_yuv_sse2_simple.c)
|
||||
+endif()
|
||||
+
|
||||
add_library(mltcore MODULE ${mltcore_src})
|
||||
target_include_directories(mltcore PRIVATE ${mltcore_inc})
|
||||
target_link_libraries(mltcore mlt Threads::Threads)
|
||||
diff --git a/src/modules/gdk/CMakeLists.txt b/src/modules/gdk/CMakeLists.txt
|
||||
index 4b209b4..cfd24ec 100644
|
||||
--- a/src/modules/gdk/CMakeLists.txt
|
||||
+++ b/src/modules/gdk/CMakeLists.txt
|
||||
@@ -16,10 +16,11 @@ if(TARGET PkgConfig::GdkPixbuf)
|
||||
endif()
|
||||
|
||||
pkg_check_modules(pango IMPORTED_TARGET pango)
|
||||
+pkg_check_modules(pangoft2 IMPORTED_TARGET pangoft2)
|
||||
pkg_check_modules(fontconfig IMPORTED_TARGET fontconfig)
|
||||
if(TARGET PkgConfig::pango AND TARGET PkgConfig::fontconfig)
|
||||
list(APPEND mltgdk_src producer_pango.c)
|
||||
- list(APPEND mltgdk_lib PkgConfig::pango PkgConfig::fontconfig)
|
||||
+ list(APPEND mltgdk_lib PkgConfig::pango PkgConfig::fontconfig PkgConfig::pangoft2)
|
||||
list(APPEND mltgdk_def USE_PANGO)
|
||||
endif()
|
||||
|
||||
diff --git a/src/modules/lumas/CMakeLists.txt b/src/modules/lumas/CMakeLists.txt
|
||||
index aace5b9..417ad11 100644
|
||||
--- a/src/modules/lumas/CMakeLists.txt
|
||||
+++ b/src/modules/lumas/CMakeLists.txt
|
||||
@@ -1,4 +1,8 @@
|
||||
add_executable(luma luma.c)
|
||||
+if (MSYS)
|
||||
+ # luma requires libmlt to work, so we set the output directory for luma to the location of this library
|
||||
+ set_target_properties(luma PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/src/framework")
|
||||
+endif()
|
||||
target_link_libraries(luma mlt)
|
||||
function(create_lumas dir w h bpp)
|
||||
set(${dir}
|
||||
@@ -3,42 +3,50 @@
|
||||
_realname=mlt
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=6.20.0
|
||||
pkgver=6.22.1
|
||||
pkgrel=1
|
||||
pkgdesc="An open source multimedia framework (mingw-w64)"
|
||||
arch=('any')
|
||||
url="https://www.mltframework.org"
|
||||
license=('GPL')
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-dlfcn"
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
"${MINGW_PACKAGE_PREFIX}-dlfcn"
|
||||
"${MINGW_PACKAGE_PREFIX}-SDL2"
|
||||
"${MINGW_PACKAGE_PREFIX}-fftw"
|
||||
"${MINGW_PACKAGE_PREFIX}-ffmpeg")
|
||||
"${MINGW_PACKAGE_PREFIX}-ffmpeg"
|
||||
"${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2")
|
||||
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-SDL2"
|
||||
"${MINGW_PACKAGE_PREFIX}-fftw"
|
||||
"${MINGW_PACKAGE_PREFIX}-ffmpeg"
|
||||
"${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2")
|
||||
|
||||
#options=('strip' 'staticlibs')
|
||||
source=("https://github.com/mltframework/mlt/archive/v$pkgver.tar.gz"
|
||||
"010-mlt-6.20.0-fix-configure-paths.patch")
|
||||
sha256sums=('ab211e27c06c0688f9cbe2d74dc0623624ef75ea4f94eea915cdc313196be2dd'
|
||||
'a039599ffbf976e9bb60da2be33876f7cac19a9540e7a0576aec75bc9831773e')
|
||||
"010-mlt-6.22.1-fix-msys-cmake.patch")
|
||||
sha256sums=('a3debdf0b8811f0d20c902cc3df3d05dad7d3ff36d1db16c0a7338d0d5989998'
|
||||
'68aec02e1987919935f115cefbd0ce69e7ca1714612b7b11dc757de6efe8a92f')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
patch -p1 -i "${srcdir}/010-mlt-6.20.0-fix-configure-paths.patch"
|
||||
patch -p1 -i "${srcdir}/010-mlt-6.22.1-fix-msys-cmake.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd mlt-$pkgver
|
||||
build_dir=${srcdir}/build-${MINGW_CHOST}
|
||||
[[ -d ${build_dir} ]] && rm -rf ${build_dir}
|
||||
mkdir -p ${build_dir}
|
||||
cd ${build_dir}
|
||||
|
||||
# makepkg-mingw does not set the MSYSTEM_CARCH variable, so we use CARCH instead
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
|
||||
${MINGW_PREFIX}/bin/cmake -G"MSYS Makefiles" -DARCH=${CARCH} -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
./configure \
|
||||
--avformat-swscale \
|
||||
--enable-gpl \
|
||||
--enable-gpl3 \
|
||||
--enable-opencv \
|
||||
--disable-gtk2 \
|
||||
--prefix=${MINGW_PREFIX} \
|
||||
--target-arch=${MSYSTEM_CARCH}
|
||||
make -j$(nproc)
|
||||
}
|
||||
|
||||
package() {
|
||||
cd mlt-$pkgver
|
||||
cd ${srcdir}/build-${MINGW_CHOST}
|
||||
make DESTDIR="$pkgdir" install
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user