commit:     2d7fcf66c742fc7d780ffc72a468bde7fd5c6741
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 13 00:27:39 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Aug 13 00:32:45 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d7fcf66

media-libs/mlt: drop Lua bindings in 7.x

After spending far too long messing around with the Lua
bindings, I realised I should really check whether anything
in the tree actually needs them. It seems no such consumer exists.

Dropping the bindings rather than complicating the ebuild
for an apparently unneeded feature in our case.

Closes: https://bugs.gentoo.org/807903
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/mlt/mlt-7.0.1.ebuild | 51 ++++++-----------------------------------
 1 file changed, 7 insertions(+), 44 deletions(-)

diff --git a/media-libs/mlt/mlt-7.0.1.ebuild b/media-libs/mlt/mlt-7.0.1.ebuild
index c2028151188..81c8e9271bc 100644
--- a/media-libs/mlt/mlt-7.0.1.ebuild
+++ b/media-libs/mlt/mlt-7.0.1.ebuild
@@ -3,9 +3,8 @@
 
 EAPI=7
 
-LUA_COMPAT=( lua5-{1..4} luajit )
 PYTHON_COMPAT=( python3_{8,9,10} )
-inherit lua python-single-r1 cmake toolchain-funcs
+inherit python-single-r1 cmake toolchain-funcs
 
 DESCRIPTION="Open source multimedia framework for television broadcasting"
 HOMEPAGE="https://www.mltframework.org/";
@@ -14,14 +13,13 @@ 
SRC_URI="https://github.com/mltframework/${PN}/releases/download/v${PV}/${P}.tar
 LICENSE="GPL-3"
 SLOT="0/7"
 KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="debug ffmpeg frei0r gtk jack kernel_linux libsamplerate lua opencv 
opengl python qt5 rtaudio rubberband sdl test vdpau vidstab xine xml"
-# TODO: swig bindings for java perl php tcl
+IUSE="debug ffmpeg frei0r gtk jack kernel_linux libsamplerate opencv opengl 
python qt5 rtaudio rubberband sdl test vdpau vidstab xine xml"
+# TODO: swig bindings for java perl php tcl (and restore lua?)
 
 # Needs unpackaged 'kwalify'
 RESTRICT="test"
 
-REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )
-       python? ( ${PYTHON_REQUIRED_USE} )"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
 SWIG_DEPEND=">=dev-lang/swig-2.0"
 #      java? ( ${SWIG_DEPEND} >=virtual/jdk-1.5 )
@@ -31,7 +29,6 @@ SWIG_DEPEND=">=dev-lang/swig-2.0"
 #      ruby? ( ${SWIG_DEPEND} )
 BDEPEND="
        virtual/pkgconfig
-       lua? ( ${SWIG_DEPEND} virtual/pkgconfig )
        python? ( ${SWIG_DEPEND} )
 "
 # rtaudio will use OSS on non linux OSes
@@ -49,7 +46,6 @@ DEPEND="
                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} )
@@ -98,7 +94,7 @@ pkg_setup() {
 src_prepare() {
        # respect CFLAGS LDFLAGS when building shared libraries. Bug #308873
        local x
-       for x in python lua; do
+       for x in python; do
                sed -i "/mlt.so/s/ -lmlt++ /& ${CFLAGS} ${LDFLAGS} /" 
src/swig/${x}/build || die
        done
 
@@ -142,7 +138,7 @@ src_configure() {
 
        local swig_lang=()
        # Not done: java perl php ruby tcl
-       # Handled separately: lua
+       # Handled separately: lua (in the past)
        for i in python; do
                # bug #806484 wrt capitalisation
                use ${i} && mycmakeargs+=( -DSWIG_${i^^}=ON )
@@ -151,25 +147,6 @@ src_configure() {
        cmake_src_configure
 }
 
-src_compile() {
-       cmake_src_compile
-
-       if use lua; then
-               # Only copy sources now to avoid unnecessary rebuilds
-               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 || die
-
-                       popd > /dev/null || die
-               }
-               lua_foreach_impl lua_compile
-       fi
-}
-
 src_install() {
        cmake_src_install
 
@@ -182,24 +159,10 @@ src_install() {
 
        docinto swig
 
-       if use lua; then
-               lua_install() {
-                       pushd "${BUILD_DIR}"/src/swig/lua > /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
-       fi
-
        if use python; then
                dodoc "${S}"/src/swig/python/play.py
                python_optimize
        fi
 
-       # Not done: java perl php ruby tcl
+       # Not done: java perl php ruby tcl (lua anymore)
 }

Reply via email to