public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/mlt/, media-libs/mlt/files/
Date: Wed, 15 Nov 2017 23:45:36 +0000 (UTC)	[thread overview]
Message-ID: <1510788929.3a9f7bedd4083a1808be16cadc82aa961ec983bf.asturm@gentoo> (raw)

commit:     3a9f7bedd4083a1808be16cadc82aa961ec983bf
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 31 18:58:14 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Nov 15 23:35:29 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a9f7bed

media-libs/mlt: Add patches to drop bogus Qt5OpenGL DEPEND

Package-Manager: Portage-2.3.13, Repoman-2.3.4

 media-libs/mlt/files/mlt-6.4.1-qtopengl-1.patch |  33 ++++
 media-libs/mlt/files/mlt-6.4.1-qtopengl-2.patch |  61 +++++++
 media-libs/mlt/mlt-6.4.1-r5.ebuild              | 218 ++++++++++++++++++++++++
 3 files changed, 312 insertions(+)

diff --git a/media-libs/mlt/files/mlt-6.4.1-qtopengl-1.patch b/media-libs/mlt/files/mlt-6.4.1-qtopengl-1.patch
new file mode 100644
index 00000000000..c00e8d05615
--- /dev/null
+++ b/media-libs/mlt/files/mlt-6.4.1-qtopengl-1.patch
@@ -0,0 +1,33 @@
+From d2a04ae77a6b2c82a2e12b9fb631beb8f825946d Mon Sep 17 00:00:00 2001
+From: Alberto Villa <avilla@FreeBSD.org>
+Date: Sat, 24 Dec 2016 05:07:54 +0100
+Subject: [PATCH] Move Qt OpenGL include(s) to Qt 4 specific code
+
+Only Qt 4 code references those files (QMutex and QWaitCondition are
+not OpenGL files, but still they're only useful in Qt 4 code).
+---
+ src/modules/qt/consumer_qglsl.cpp | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/modules/qt/consumer_qglsl.cpp b/src/modules/qt/consumer_qglsl.cpp
+index 74840602..ca0cf383 100644
+--- a/src/modules/qt/consumer_qglsl.cpp
++++ b/src/modules/qt/consumer_qglsl.cpp
+@@ -20,13 +20,14 @@
+ #include "common.h"
+ #include <framework/mlt.h>
+ #include <QApplication>
+-#include <QGLWidget>
+-#include <QMutex>
+-#include <QWaitCondition>
+ #include <QtGlobal>
+ 
+ #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+ 
++#include <QGLWidget>
++#include <QMutex>
++#include <QWaitCondition>
++
+ class GLWidget : public QGLWidget
+ {
+ private:

diff --git a/media-libs/mlt/files/mlt-6.4.1-qtopengl-2.patch b/media-libs/mlt/files/mlt-6.4.1-qtopengl-2.patch
new file mode 100644
index 00000000000..5f98f12bbb1
--- /dev/null
+++ b/media-libs/mlt/files/mlt-6.4.1-qtopengl-2.patch
@@ -0,0 +1,61 @@
+From 6ba6cab570d824641f63c66b355ba28f0721811f Mon Sep 17 00:00:00 2001
+From: Alberto Villa <avilla@FreeBSD.org>
+Date: Sat, 24 Dec 2016 05:10:20 +0100
+Subject: [PATCH] Avoid looking for Qt5OpenGL module
+
+The OpenGL-related code needed by qimage was moved to Qt5Gui, which
+allows to safely remove the dependency on Qt 5 builds.
+
+Build tested on FreeBSD.
+---
+ src/modules/qt/configure | 20 +-------------------
+ 1 file changed, 1 insertion(+), 19 deletions(-)
+
+diff --git a/src/modules/qt/configure b/src/modules/qt/configure
+index 24803baf..7475dc09 100755
+--- a/src/modules/qt/configure
++++ b/src/modules/qt/configure
+@@ -107,14 +107,6 @@ else
+ 		then
+ 			echo QTCXXFLAGS=-I$qt_includedir -I$qt_includedir/QtCore -I$qt_includedir/QtGui -I$qt_includedir/QtXml -I$qt_includedir/QtSvg -I$qt_includedir/QtWidgets >> config.mak
+ 			echo QTLIBS=-Wl,-rpath-link,"$qt_libdir" -L"$qt_libdir" -lQt5Core -lQt5Gui -lQt5Xml -lQt5Svg -lQt5Widgets >> config.mak
+-			if [ -f "$qt_libdir/libQt5OpenGL.so" ] || [ -f "$qt_libdir/libQt5OpenGL.a" ]
+-			then
+-				echo QTCXXFLAGS+=-I$qt_includedir/QtOpenGL >> config.mak
+-				echo QTLIBS+=-lQt5OpenGL >> config.mak
+-			else
+-				echo "- Qt5OpenGL not found: disabling"
+-				without_opengl=true
+-			fi
+ 		# Qt5 on OS X
+ 		elif [ -d "$qt_libdir/QtWidgets.framework" ]
+ 		then
+@@ -123,11 +115,10 @@ else
+ 				-I$qt_includedir/QtGui -I$qt_libdir/QtGui.framework/Headers \
+ 				-I$qt_includedir/QtXml -I$qt_libdir/QtXml.framework/Headers \
+ 				-I$qt_includedir/QtSvg -I$qt_libdir/QtSvg.framework/Headers \
+-				-I$qt_includedir/QtOpenGL -I$qt_libdir/QtOpenGL.framework/Headers \
+ 				-I$qt_includedir/QtWidgets -I$qt_libdir/QtWidgets.framework/Headers \
+ 				>> config.mak
+ 			echo QTLIBS=-F"$qt_libdir" -framework QtCore -framework QtGui -framework \
+-				QtXml -framework QtSvg -framework QtOpenGL -framework QtWidgets >> config.mak
++				QtXml -framework QtSvg -framework QtWidgets >> config.mak
+ 		# Qt4 on OS X
+ 		elif [ -d "$qt_libdir/QtGui.framework" ]
+ 		then
+@@ -151,15 +142,6 @@ else
+ 			without_kde=true
+ 			echo QTCXXFLAGS=$(pkg-config --cflags Qt5Core Qt5Gui Qt5Xml Qt5Svg Qt5Widgets) >> config.mak
+ 			echo QTLIBS=$(pkg-config --libs Qt5Core Qt5Gui Qt5Xml Qt5Svg Qt5Widgets) >> config.mak
+-			pkg-config --exists 'Qt5OpenGL'
+-			if [ $? -eq 0 ]
+-			then
+-				echo QTCXXFLAGS+=$(pkg-config --cflags Qt5OpenGL) >> config.mak
+-				echo QTLIBS+=$(pkg-config --libs Qt5OpenGL) >> config.mak
+-			else
+-				echo "- Qt5OpenGL not found: disabling"
+-				without_opengl=true
+-			fi
+ 		else
+ 			pkg-config --exists 'QtGui >= 4'
+ 			if [ $? -eq 0 ]

diff --git a/media-libs/mlt/mlt-6.4.1-r5.ebuild b/media-libs/mlt/mlt-6.4.1-r5.ebuild
new file mode 100644
index 00000000000..05105d0264d
--- /dev/null
+++ b/media-libs/mlt/mlt-6.4.1-r5.ebuild
@@ -0,0 +1,218 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+# this ebuild currently only supports installing ruby bindings for a single ruby version
+# so USE_RUBY must contain only a single value (the latest stable) as the ebuild calls
+# /usr/bin/${USE_RUBY} directly
+USE_RUBY="ruby22"
+inherit eutils flag-o-matic multilib python-single-r1 ruby-single toolchain-funcs
+
+DESCRIPTION="Open source multimedia framework for television broadcasting"
+HOMEPAGE="https://www.mltframework.org/"
+SRC_URI="https://github.com/mltframework/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="compressed-lumas cpu_flags_x86_mmx cpu_flags_x86_sse cpu_flags_x86_sse2 debug ffmpeg fftw frei0r
+gtk jack kdenlive libav libsamplerate lua melt opencv opengl python qt5 rtaudio ruby sdl vdpau xine xml"
+# java perl php tcl vidstab
+IUSE="${IUSE} kernel_linux"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+#rtaudio will use OSS on non linux OSes
+COMMON_DEPEND="
+	>=media-libs/libebur128-1.2.2
+	ffmpeg? (
+		libav? ( media-video/libav:0=[vdpau?] )
+		!libav? ( media-video/ffmpeg:0=[vdpau?] )
+	)
+	fftw? ( sci-libs/fftw:3.0= )
+	frei0r? ( media-plugins/frei0r-plugins )
+	gtk? (
+		media-libs/libexif
+		x11-libs/gtk+:2
+		x11-libs/pango
+	)
+	jack? (
+		>=dev-libs/libxml2-2.5
+		media-libs/ladspa-sdk
+		>=media-sound/jack-audio-connection-kit-0.121.3
+	)
+	libsamplerate? ( >=media-libs/libsamplerate-0.1.2 )
+	lua? ( >=dev-lang/lua-5.1.4-r4:= )
+	opencv? ( >=media-libs/opencv-3.2.0:= )
+	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
+		kernel_linux? ( media-libs/alsa-lib )
+	)
+	ruby? ( ${RUBY_DEPS} )
+	sdl? (
+		>=media-libs/libsdl-1.2.10[X,opengl,video]
+		>=media-libs/sdl-image-1.2.4
+	)
+	xine? ( >=media-libs/xine-lib-1.1.2_pre20060328-r7 )
+	xml? ( >=dev-libs/libxml2-2.5 )"
+#	java? ( >=virtual/jre-1.5 )
+#	perl? ( dev-lang/perl )
+#	php? ( dev-lang/php )
+#	sox? ( media-sound/sox )
+#	tcl? ( dev-lang/tcl:0= )
+#	vidstab? ( media-libs/libvidstab )
+SWIG_DEPEND=">=dev-lang/swig-2.0"
+DEPEND="${COMMON_DEPEND}
+	virtual/pkgconfig
+	compressed-lumas? ( virtual/imagemagick-tools[png] )
+	lua? ( ${SWIG_DEPEND} virtual/pkgconfig )
+	python? ( ${SWIG_DEPEND} )
+	ruby? ( ${SWIG_DEPEND} )"
+#	java? ( ${SWIG_DEPEND} >=virtual/jdk-1.5 )
+#	perl? ( ${SWIG_DEPEND} )
+#	php? ( ${SWIG_DEPEND} )
+#	tcl? ( ${SWIG_DEPEND} )
+RDEPEND="${COMMON_DEPEND}
+	!media-libs/mlt++
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-6.2.0-ruby-link.patch
+	"${FILESDIR}"/${P}-libebur128-unbundle.patch
+	"${FILESDIR}"/${P}-opencv-3.3.patch
+	"${FILESDIR}"/${P}-glibc226-{1,2}.patch
+	"${FILESDIR}"/${P}-qtopengl-{1,2}.patch
+)
+
+pkg_setup() {
+	use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	default
+
+	# 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
+	sed -i "/^LDFLAGS/s: += :& ${LDFLAGS} :" src/swig/ruby/build || die
+
+	sed -i -e "s/env ruby/${USE_RUBY}/" src/swig/ruby/* || die
+}
+
+src_configure() {
+	tc-export CC CXX
+
+	# bug 589848
+	append-cxxflags -std=c++11
+
+	local myconf="--enable-gpl
+		--enable-gpl3
+		--enable-motion-est
+		--target-arch=$(tc-arch)
+		--disable-kde
+		--disable-swfdec
+		$(use_enable debug)
+		$(use compressed-lumas && echo ' --luma-compress')
+		$(use_enable cpu_flags_x86_sse sse)
+		$(use_enable cpu_flags_x86_sse2 sse2)
+		$(use_enable gtk gtk2)
+		$(use_enable sdl)
+		$(use_enable jack jackrack)
+		$(use_enable ffmpeg avformat)
+		$(use ffmpeg && echo ' --avformat-swscale')
+		$(use_enable fftw plus)
+		$(use_enable frei0r)
+		$(use_enable melt)
+		$(use_enable opencv)
+		$(use_enable opengl)
+		$(use_enable libsamplerate resample)
+		$(use_enable rtaudio)
+		$(use vdpau && echo ' --avformat-vdpau')
+		$(use_enable xml)
+		$(use_enable xine)
+		$(use_enable kdenlive)
+		--disable-sox"
+		#$(use_enable sox) FIXME
+
+	if use qt5 ; then
+		myconf+=" --enable-qt
+			--qt-includedir=$(pkg-config Qt5Core --variable=includedir)
+			--qt-libdir=$(pkg-config Qt5Core --variable=libdir)"
+	else
+		myconf+=" --disable-qt"
+	fi
+
+	if use x86 || use amd64 ; then
+		myconf+=" $(use_enable cpu_flags_x86_mmx mmx)"
+	else
+		myconf+=" --disable-mmx"
+	fi
+
+	if ! use melt; then
+		sed -i -e "s;src/melt;;" Makefile || die
+	fi
+
+	# TODO: add swig language bindings
+	# see also https://www.mltframework.org/twiki/bin/view/MLT/ExtremeMakeover
+
+	local swig_lang
+	# TODO: java perl php tcl
+	for i in lua python ruby ; do
+		use $i && swig_lang="${swig_lang} $i"
+	done
+	[ -z "${swig_lang}" ] && swig_lang="none"
+
+	econf ${myconf} --swig-languages="${swig_lang}"
+
+	sed -i -e s/^OPT/#OPT/ "${S}/config.mak" || die
+}
+
+src_install() {
+	emake DESTDIR="${D}" install
+	dodoc AUTHORS ChangeLog NEWS README docs/*.txt
+
+	dodir /usr/share/${PN}
+	insinto /usr/share/${PN}
+	doins -r demo
+
+	docinto swig
+
+	# Install SWIG bindings
+	if use lua; then
+		cd "${S}"/src/swig/lua || die
+		exeinto $(pkg-config --variable INSTALL_CMOD lua)
+		doexe mlt.so
+		dodoc play.lua
+	fi
+
+	if use python; then
+		cd "${S}"/src/swig/python || die
+		insinto $(python_get_sitedir)
+		doins mlt.py
+		exeinto $(python_get_sitedir)
+		doexe _mlt.so
+		dodoc play.py
+		python_optimize
+	fi
+
+	if use ruby; then
+		cd "${S}"/src/swig/ruby || die
+		exeinto $("${EPREFIX}"/usr/bin/${USE_RUBY} -r rbconfig -e 'print RbConfig::CONFIG["sitearchdir"]')
+		doexe mlt.so
+		dodoc play.rb thumbs.rb
+	fi
+	# TODO: java perl php tcl
+}


             reply	other threads:[~2017-11-15 23:45 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15 23:45 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-21 17:35 [gentoo-commits] repo/gentoo:master commit in: media-libs/mlt/, media-libs/mlt/files/ Andreas Sturmlechner
2024-01-07 14:33 Andreas Sturmlechner
2023-10-08 14:37 Andreas Sturmlechner
2023-06-12 18:04 Sam James
2022-12-15 19:26 Andreas Sturmlechner
2022-04-29  4:25 Sam James
2021-08-05  1:48 Sam James
2021-04-24 21:40 Andreas Sturmlechner
2020-10-05 11:22 Andreas Sturmlechner
2020-06-30 21:44 Andreas Sturmlechner
2020-06-30 21:44 Andreas Sturmlechner
2020-06-30 21:44 Andreas Sturmlechner
2020-03-19 11:46 Andreas Sturmlechner
2018-12-12 11:56 Andreas Sturmlechner
2018-08-09 22:20 Andreas Sturmlechner
2018-07-22 21:50 Andreas Sturmlechner
2018-07-22 21:50 Andreas Sturmlechner
2018-07-22 21:50 Andreas Sturmlechner
2017-10-28 12:17 Andreas Sturmlechner
2016-05-11 18:06 Michael Palimaka
2016-02-15 15:42 Alexis Ballier
2015-08-21 12:53 Alexis Ballier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1510788929.3a9f7bedd4083a1808be16cadc82aa961ec983bf.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox