mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 16:49:10 -07:00
media-video/makemkv: Add Qt5 support, closes bug #569768
Qt5 always trumps Qt4 if it is available. There are no configure options or variables to control this and there is no publicly available configure.ac either so we have to selectively patch the raw configure script directly. Also make a couple of simplifications. src_configure checked for a configure script even though there is always one there now. I also couldn't see any reason for having virtual/opengl as a dependency. Package-Manager: portage-2.2.26
This commit is contained in:
34
media-video/makemkv/files/makemkv-qt4.patch
Normal file
34
media-video/makemkv/files/makemkv-qt4.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
--- makemkv-oss-1.9.8/configure.orig 2015-12-20 16:22:19.000000000 +0000
|
||||
+++ makemkv-oss-1.9.8/configure 2015-12-26 23:59:44.601387071 +0000
|
||||
@@ -5048,6 +5048,7 @@
|
||||
if test "$enable_gui" != "no"; then
|
||||
|
||||
|
||||
+: '
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for qt5" >&5
|
||||
$as_echo_n "checking for qt5... " >&6; }
|
||||
@@ -5105,6 +5106,7 @@
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$qt5_PKG_ERRORS" >&5
|
||||
+'
|
||||
|
||||
|
||||
|
||||
@@ -5271,6 +5273,7 @@
|
||||
|
||||
fi
|
||||
|
||||
+: '
|
||||
else
|
||||
qt5_CFLAGS=$pkg_cv_qt5_CFLAGS
|
||||
qt5_LIBS=$pkg_cv_qt5_LIBS
|
||||
@@ -5283,6 +5286,7 @@
|
||||
QT_MOC="$qt5_host_bins/moc";
|
||||
|
||||
fi
|
||||
+'
|
||||
|
||||
QT_INC=$QT_INC
|
||||
|
||||
28
media-video/makemkv/files/makemkv-qt5.patch
Normal file
28
media-video/makemkv/files/makemkv-qt5.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
--- makemkv-oss-1.9.8/configure.orig 2015-12-20 16:22:19.000000000 +0000
|
||||
+++ makemkv-oss-1.9.8/configure 2015-12-27 00:05:18.659860655 +0000
|
||||
@@ -5108,6 +5108,7 @@
|
||||
|
||||
|
||||
|
||||
+: '
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for qt4" >&5
|
||||
$as_echo_n "checking for qt4... " >&6; }
|
||||
@@ -5257,7 +5258,9 @@
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
+'
|
||||
as_fn_error $? "Qt library (version 5 or 4) is required to build GUI" "$LINENO" 5
|
||||
+: '
|
||||
|
||||
else
|
||||
qt4_CFLAGS=$pkg_cv_qt4_CFLAGS
|
||||
@@ -5270,6 +5273,7 @@
|
||||
QT_MOC=`$PKG_CONFIG --variable moc_location "QtCore" 2>/dev/null`;
|
||||
|
||||
fi
|
||||
+'
|
||||
|
||||
else
|
||||
qt5_CFLAGS=$pkg_cv_qt5_CFLAGS
|
||||
@@ -16,7 +16,8 @@ SRC_URI="http://www.makemkv.com/download/${MY_P}.tar.gz
|
||||
LICENSE="LGPL-2.1 MPL-1.1 MakeMKV-EULA openssl"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="libav multilib qt4"
|
||||
IUSE="libav multilib qt4 qt5"
|
||||
REQUIRED_USE="?? ( qt4 qt5 )"
|
||||
|
||||
QA_PREBUILT="opt/bin/makemkvcon opt/bin/mmdtsdec"
|
||||
|
||||
@@ -26,11 +27,16 @@ RDEPEND="
|
||||
dev-libs/openssl:0
|
||||
sys-libs/zlib
|
||||
qt4? (
|
||||
virtual/opengl
|
||||
dev-qt/qtcore:4
|
||||
dev-qt/qtdbus:4
|
||||
dev-qt/qtgui:4
|
||||
)
|
||||
qt5? (
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtdbus:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtwidgets:5
|
||||
)
|
||||
!libav? ( >=media-video/ffmpeg-1.0.0:0= )
|
||||
libav? ( >=media-video/libav-0.8.9:0= )
|
||||
"
|
||||
@@ -40,14 +46,25 @@ S=${WORKDIR}/makemkv-oss-${PV}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-{makefile,path}.patch
|
||||
|
||||
# Qt5 always trumps Qt4 if it is available. There are no configure
|
||||
# options or variables to control this and there is no publicly
|
||||
# available configure.ac either.
|
||||
if use qt4; then
|
||||
epatch "${FILESDIR}"/${PN}-qt4.patch
|
||||
elif use qt5; then
|
||||
epatch "${FILESDIR}"/${PN}-qt5.patch
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# See bug #439380.
|
||||
replace-flags -O* -Os
|
||||
local args=""
|
||||
use qt4 || args="--disable-gui"
|
||||
if [[ -x ${ECONF_SOURCE:-.}/configure ]] ; then
|
||||
econf $args
|
||||
|
||||
if use qt4 || use qt5; then
|
||||
econf --enable-gui
|
||||
else
|
||||
econf --disable-gui
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -68,7 +85,7 @@ src_install() {
|
||||
dosym libmmbd.so.0 /usr/$(get_libdir)/libmmbd.so.0.${PV}
|
||||
into /opt
|
||||
|
||||
if use qt4; then
|
||||
if use qt4 || use qt5; then
|
||||
dobin out/makemkv
|
||||
|
||||
local res
|
||||
Reference in New Issue
Block a user