diff options
author | 2021-06-17 12:19:12 +0200 | |
---|---|---|
committer | 2021-06-17 13:28:20 +0200 | |
commit | 2ae94955edd8bb7e3b6b14a2635fab1ca1c895a1 (patch) | |
tree | b8ba48bf64ca4e3f3acb1456f3248bb0fb0fb3c9 /media-libs | |
parent | media-video/vlc-9999-r1: Add patch to fix libplacebo inclusion (diff) | |
download | seden-2ae94955edd8bb7e3b6b14a2635fab1ca1c895a1.tar.gz seden-2ae94955edd8bb7e3b6b14a2635fab1ca1c895a1.tar.bz2 seden-2ae94955edd8bb7e3b6b14a2635fab1ca1c895a1.zip |
media-libs/mlt: 7.0.1 experimental ebuild (switched to cmake)
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/mlt/Manifest | 1 | ||||
-rw-r--r-- | media-libs/mlt/files/mlt-6.10.0-swig-underlinking.patch | 12 | ||||
-rw-r--r-- | media-libs/mlt/files/mlt-6.22.1-no_lua_bdepend.patch | 11 | ||||
-rw-r--r-- | media-libs/mlt/files/mlt-7.0.1-fix_man_symlink.patch | 11 | ||||
-rw-r--r-- | media-libs/mlt/files/mlt-7.0.1-remove-rpath.patch | 10 | ||||
-rw-r--r-- | media-libs/mlt/metadata.xml | 33 | ||||
-rw-r--r-- | media-libs/mlt/mlt-7.0.1.ebuild | 217 |
7 files changed, 295 insertions, 0 deletions
diff --git a/media-libs/mlt/Manifest b/media-libs/mlt/Manifest new file mode 100644 index 0000000..23b1749 --- /dev/null +++ b/media-libs/mlt/Manifest @@ -0,0 +1 @@ +DIST mlt-7.0.1.tar.gz 1181298 SHA256 b68c88d9ad91889838186188cce938feee8b63e3755a3b6fb45dc9c2ae0c5ecd SHA512 9268889f0fbe69180651a592ac0b328d18f8b60c7d83f9d6c506dc21254afcb2281662f4d19faf3520976ae100600d00cd6eb2aa42c83880fa4c4c36e760c68a WHIRLPOOL 522722506e6d49923762b137dcfe5a29b6b5e8953df55d84be822d4a4f08030300c12868f31b6b61edfab8dd0ca04cc53e7d94feea8872aa7f68301d664124e9 diff --git a/media-libs/mlt/files/mlt-6.10.0-swig-underlinking.patch b/media-libs/mlt/files/mlt-6.10.0-swig-underlinking.patch new file mode 100644 index 0000000..e84e98c --- /dev/null +++ b/media-libs/mlt/files/mlt-6.10.0-swig-underlinking.patch @@ -0,0 +1,12 @@ +diff --git a/src/swig/ruby/build b/src/swig/ruby/build +index 2d0cc0d..1a8aee7 100755 +--- a/src/swig/ruby/build ++++ b/src/swig/ruby/build +@@ -8,6 +8,6 @@ system( "ln -sf ../mlt.i" ) + system( "swig -c++ -ruby -I../../mlt++ -I../.. mlt.i" ) + $CFLAGS = $CFLAGS.to_s + " -I../.. " + (ENV.has_key?('CXXFLAGS')? ENV['CXXFLAGS'] : '') + $CXXFLAGS = $CXXFLAGS.to_s + " -I../.. " + (ENV.has_key?('CXXFLAGS')? ENV['CXXFLAGS'] : '') +-$LDFLAGS = $LDFLAGS.to_s + " -L../../mlt++ -lmlt++" ++$LDFLAGS = $LDFLAGS.to_s + " -L../../mlt++ -lmlt++ -L../../framework -lmlt" + create_makefile('mlt') + system( "make V=1" ) diff --git a/media-libs/mlt/files/mlt-6.22.1-no_lua_bdepend.patch b/media-libs/mlt/files/mlt-6.22.1-no_lua_bdepend.patch new file mode 100644 index 0000000..2b441a2 --- /dev/null +++ b/media-libs/mlt/files/mlt-6.22.1-no_lua_bdepend.patch @@ -0,0 +1,11 @@ +--- a/src/swig/lua/build ++++ b/src/swig/lua/build +@@ -8,7 +8,7 @@ + exit 0 + fi + +-path=`which lua 2> /dev/null` ++path=`/bin/true` + + if [ $? = 0 ] + then diff --git a/media-libs/mlt/files/mlt-7.0.1-fix_man_symlink.patch b/media-libs/mlt/files/mlt-7.0.1-fix_man_symlink.patch new file mode 100644 index 0000000..3a6727f --- /dev/null +++ b/media-libs/mlt/files/mlt-7.0.1-fix_man_symlink.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt 2021-06-17 12:01:11.938991842 +0200 ++++ b/CMakeLists.txt 2021-06-17 12:01:39.312993419 +0200 +@@ -436,7 +436,7 @@ + if(UNIX AND NOT APPLE) + install(FILES docs/melt.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 RENAME melt-${MLT_VERSION_MAJOR}.1) + install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink melt-${MLT_VERSION_MAJOR}.1 melt.1 \ +- WORKING_DIRECTORY ${CMAKE_INSTALL_FULL_MANDIR}/man1)" ++ WORKING_DIRECTORY \$ENV\{DESTDIR\}${CMAKE_INSTALL_FULL_MANDIR}/man1)" + ) + endif() + diff --git a/media-libs/mlt/files/mlt-7.0.1-remove-rpath.patch b/media-libs/mlt/files/mlt-7.0.1-remove-rpath.patch new file mode 100644 index 0000000..f786b31 --- /dev/null +++ b/media-libs/mlt/files/mlt-7.0.1-remove-rpath.patch @@ -0,0 +1,10 @@ +--- a/CMakeLists.txt 2021-06-17 12:08:44.052017901 +0200 ++++ b/CMakeLists.txt 2021-06-17 12:09:17.007019801 +0200 +@@ -69,6 +69,7 @@ + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/out/lib") + set(MLT_MODULE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/out/lib/mlt") + set(MLT_DATA_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/out/share/mlt") ++SET(CMAKE_SKIP_RPATH YES CACHE BOOL "Remove RUNPATH from ELF dynamic sections" FORCE) + + if(NOT EXISTS ${MLT_DATA_OUTPUT_DIRECTORY}) + if(WIN32) # symlinks require admin rights on Windows diff --git a/media-libs/mlt/metadata.xml b/media-libs/mlt/metadata.xml new file mode 100644 index 0000000..26411b9 --- /dev/null +++ b/media-libs/mlt/metadata.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>media-video@gentoo.org</email> + <name>Gentoo Video Project</name> + </maintainer> + <maintainer type="project"> + <email>kde@gentoo.org</email> + <name>Gentoo KDE Project</name> + </maintainer> + <use> + <flag name="compressed-lumas">Compress the luma files in png.</flag> + <flag name="frei0r">Build the module for <pkg>media-plugins/frei0r-plugins</pkg></flag> + <flag name="lua">Build SWIG bindings for Lua</flag> + <flag name="opencv">Build motion tracking module using <pkg>media-libs/opencv</pkg></flag> + <flag name="python">Build SWIG bindings for Python</flag> + <flag name="rtaudio">Builds rtaudio consumer for native audio support on multiple platforms</flag> + <flag name="rubberband">Enable audio pitch-shifting using <pkg>media-libs/rubberband</pkg></flag> + <flag name="vidstab">Enabled video stabilization with <pkg>media-libs/vidstab</pkg></flag> + <!-- + <flag name="swfdec">Use <pkg>media-libs/swfdec</pkg> for reading .swf files (Macromedia Flash) instead of libavformat.</flag> + <flag name="java">Build SWIG bindings for Java</flag> + <flag name="perl">Build SWIG bindings for Perl</flag> + <flag name="php">Build SWIG bindings for PHP</flag> + <flag name="tcl">Build SWIG bindings for TCL</flag> + --> + </use> + <upstream> + <remote-id type="sourceforge">mlt</remote-id> + <remote-id type="github">mltframework/mlt</remote-id> + </upstream> +</pkgmetadata> diff --git a/media-libs/mlt/mlt-7.0.1.ebuild b/media-libs/mlt/mlt-7.0.1.ebuild new file mode 100644 index 0000000..8157b96 --- /dev/null +++ b/media-libs/mlt/mlt-7.0.1.ebuild @@ -0,0 +1,217 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +LUA_COMPAT=( lua5-{1..4} luajit ) +PYTHON_COMPAT=( python3_{7,8,9} ) +inherit cmake lua python-single-r1 toolchain-funcs + +DESCRIPTION="Open source multimedia framework for television broadcasting" +HOMEPAGE="https://www.mltframework.org/" +SRC_URI="https://github.com/mltframework/${PN}/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="compressed-lumas debug +ffmpeg fftw frei0r gtk jack kernel_linux libsamplerate lua opencv opengl python +qt5 rtaudio rubberband sdl sox vdpau vidstab vorbis xine xml" +# java perl php tcl + +REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} ) + python? ( ${PYTHON_REQUIRED_USE} )" + +SWIG_DEPEND=">=dev-lang/swig-2.0" +# java? ( ${SWIG_DEPEND} >=virtual/jdk-1.5 ) +# perl? ( ${SWIG_DEPEND} ) +# php? ( ${SWIG_DEPEND} ) +# tcl? ( ${SWIG_DEPEND} ) +# ruby? ( ${SWIG_DEPEND} ) +BDEPEND=" + virtual/pkgconfig + compressed-lumas? ( virtual/imagemagick-tools[png] ) + lua? ( ${SWIG_DEPEND} virtual/pkgconfig ) + python? ( ${SWIG_DEPEND} ) +" +#rtaudio will use OSS on non linux OSes +DEPEND=" + >=media-libs/libebur128-1.2.2:= + ffmpeg? ( media-video/ffmpeg:0=[vdpau?,-flite] ) + fftw? ( sci-libs/fftw:3.0= ) + frei0r? ( media-plugins/frei0r-plugins ) + gtk? ( + media-libs/libexif + x11-libs/pango + ) + jack? ( + >=dev-libs/libxml2-2.5 + media-libs/ladspa-sdk + virtual/jack + ) + libsamplerate? ( >=media-libs/libsamplerate-0.1.2 ) + lua? ( ${LUA_DEPS} ) + opencv? ( >=media-libs/opencv-4.5.1:= ) + opengl? ( media-video/movit ) + python? ( ${PYTHON_DEPS} ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtsvg:5 + dev-qt/qtwidgets:5 + dev-qt/qtxml:5 + media-libs/libexif + x11-libs/libX11 + ) + rtaudio? ( + >=media-libs/rtaudio-4.1.2 + kernel_linux? ( media-libs/alsa-lib ) + ) + rubberband? ( media-libs/rubberband ) + sdl? ( + media-libs/libsdl2[X,opengl,video] + media-libs/sdl2-image + ) + vidstab? ( media-libs/vidstab ) + vorbis? ( media-libs/libvorbis ) + xine? ( >=media-libs/xine-lib-1.1.2_pre20060328-r7 ) + xml? ( >=dev-libs/libxml2-2.5 ) + sox? ( media-sound/sox )" +# java? ( >=virtual/jre-1.5 ) +# perl? ( dev-lang/perl ) +# php? ( dev-lang/php ) +# ruby? ( ${RUBY_DEPS} ) +# tcl? ( dev-lang/tcl:0= ) +RDEPEND="${DEPEND}" + +DOCS=( AUTHORS COPYING NEWS README.md docs/mlt++.txt ) + +PATCHES=( + "${FILESDIR}"/${PN}-6.10.0-swig-underlinking.patch + "${FILESDIR}"/${PN}-6.22.1-no_lua_bdepend.patch + "${FILESDIR}"/${P}-fix_man_symlink.patch + "${FILESDIR}"/${P}-remove-rpath.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + cmake_src_prepare + + # respect CFLAGS LDFLAGS when building shared libraries. Bug #308873 + for x in python lua; do + sed -i "/mlt.so/s/ -lmlt++ /& ${CFLAGS} ${LDFLAGS} /" src/swig/$x/build || die + done + + use python && python_fix_shebang src/swig/python +} + +src_configure() { + tc-export CC CXX + + local mycmakeargs=( + -DGPL=YES + -DGPL3=YES + -DMOD_KDENLIVE=YES + -DMOD_NORMALIZE=YES + -DMOD_OLDFILM=YES + -DMOD_AVFORMAT=$(usex ffmpeg) + -DMOD_FREI0R=$(usex frei0r) + -DMOD_GDK=$(usex gtk) + -DMOD_JACKRACK=$(usex jack) + -DMOD_MOVIT=$(usex opengl) + -DMOD_OPENCV=$(usex opencv) + -DMOD_PLUS=$(usex fftw) + -DMOD_PLUSGPL=$(usex fftw) + -DMOD_QT=$(usex qt5) + -DMOD_RESAMPLE=$(usex libsamplerate) + -DMOD_RTAUDIO=$(usex rtaudio) + -DMOD_RUBBERBAND=$(usex rubberband) + -DMOD_SDL2=$(usex sdl) + -DMOD_SOX=$(usex sox) + -DMOD_VIDSTAB=$(usex vidstab) + -DMOD_VORBIS=$(usex vorbis) + -DMOD_XINE=$(usex xine) + -DMOD_XML=$(usex xml) + -DSWIG_LUA=$(usex lua) + -DSWIG_PYTHON=$(usex python) + ) + + cmake_src_configure +} + +src_compile() { + cmake_src_compile + + if use lua; then + # Only copy sources now to avoid unnecessary rebuilds + local BUILD_ori="${BUILD_DIR}" + BUILD_DIR="${S}" + + lua_copy_sources + + lua_compile() { + pushd "${BUILD_DIR}"/src/swig/lua > /dev/null || die + + sed -i -e "s| mlt_wrap.cxx| $(lua_get_CFLAGS) mlt_wrap.cxx|" build || die + ./build + + popd > /dev/null || die + } + lua_foreach_impl lua_compile + + BUILD_DIR="${BUILD_ori}" + fi +} + +src_install() { + cmake_src_install + + doman docs/melt.1 + + insinto /usr/share/${PN} + doins -r demo + + # + # Install SWIG bindings + # + + docinto swig + + if use lua; then + local BUILD_ori="${BUILD_DIR}" + BUILD_DIR="${S}" + + lua_install() { + pushd "${BUILD_ori}"/out/lib > /dev/null || die + + exeinto "$(lua_get_cmod_dir)" + doexe mlt.so + + popd > /dev/null || die + } + lua_foreach_impl lua_install + + dodoc "${S}"/src/swig/lua/play.lua + + BUILD_DIR="${BUILD_ori}" + fi + + if use python; then + cd "${BUILD_DIR}"/src/swig/python || die + python_domodule mlt.py + + cd "${BUILD_DIR}"/out/lib || die + python_domodule _mlt7.so + chmod +x "${D}$(python_get_sitedir)/_mlt7.so" || die + + cd "${S}"/src/swig/python || die + dodoc play.py + + python_optimize + fi + + # not done: java perl php ruby tcl +} |