Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/makemkv/, media-video/makemkv/files/
Date: Sun, 27 Dec 2015 12:10:17
Message-Id: 1451218189.a7865d18b3ecb8fd9fd7da9dc2ad0aba73795d60.chewi@gentoo
1 commit: a7865d18b3ecb8fd9fd7da9dc2ad0aba73795d60
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 27 12:05:23 2015 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 27 12:09:49 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7865d18
7
8 media-video/makemkv: Add Qt5 support, closes bug #569768
9
10 Qt5 always trumps Qt4 if it is available. There are no configure
11 options or variables to control this and there is no publicly
12 available configure.ac either so we have to selectively patch the raw
13 configure script directly.
14
15 Also make a couple of simplifications. src_configure checked for a
16 configure script even though there is always one there now. I also
17 couldn't see any reason for having virtual/opengl as a dependency.
18
19 Package-Manager: portage-2.2.26
20
21 media-video/makemkv/files/makemkv-qt4.patch | 34 ++++++++++++++++++++++
22 media-video/makemkv/files/makemkv-qt5.patch | 28 ++++++++++++++++++
23 ...akemkv-1.9.8.ebuild => makemkv-1.9.8-r1.ebuild} | 31 +++++++++++++++-----
24 3 files changed, 86 insertions(+), 7 deletions(-)
25
26 diff --git a/media-video/makemkv/files/makemkv-qt4.patch b/media-video/makemkv/files/makemkv-qt4.patch
27 new file mode 100644
28 index 0000000..cbc2fa0
29 --- /dev/null
30 +++ b/media-video/makemkv/files/makemkv-qt4.patch
31 @@ -0,0 +1,34 @@
32 +--- makemkv-oss-1.9.8/configure.orig 2015-12-20 16:22:19.000000000 +0000
33 ++++ makemkv-oss-1.9.8/configure 2015-12-26 23:59:44.601387071 +0000
34 +@@ -5048,6 +5048,7 @@
35 + if test "$enable_gui" != "no"; then
36 +
37 +
38 ++: '
39 + pkg_failed=no
40 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for qt5" >&5
41 + $as_echo_n "checking for qt5... " >&6; }
42 +@@ -5105,6 +5106,7 @@
43 + fi
44 + # Put the nasty error message in config.log where it belongs
45 + echo "$qt5_PKG_ERRORS" >&5
46 ++'
47 +
48 +
49 +
50 +@@ -5271,6 +5273,7 @@
51 +
52 + fi
53 +
54 ++: '
55 + else
56 + qt5_CFLAGS=$pkg_cv_qt5_CFLAGS
57 + qt5_LIBS=$pkg_cv_qt5_LIBS
58 +@@ -5283,6 +5286,7 @@
59 + QT_MOC="$qt5_host_bins/moc";
60 +
61 + fi
62 ++'
63 +
64 + QT_INC=$QT_INC
65 +
66
67 diff --git a/media-video/makemkv/files/makemkv-qt5.patch b/media-video/makemkv/files/makemkv-qt5.patch
68 new file mode 100644
69 index 0000000..58b5e41
70 --- /dev/null
71 +++ b/media-video/makemkv/files/makemkv-qt5.patch
72 @@ -0,0 +1,28 @@
73 +--- makemkv-oss-1.9.8/configure.orig 2015-12-20 16:22:19.000000000 +0000
74 ++++ makemkv-oss-1.9.8/configure 2015-12-27 00:05:18.659860655 +0000
75 +@@ -5108,6 +5108,7 @@
76 +
77 +
78 +
79 ++: '
80 + pkg_failed=no
81 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for qt4" >&5
82 + $as_echo_n "checking for qt4... " >&6; }
83 +@@ -5257,7 +5258,9 @@
84 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
85 + $as_echo "no" >&6; }
86 +
87 ++'
88 + as_fn_error $? "Qt library (version 5 or 4) is required to build GUI" "$LINENO" 5
89 ++: '
90 +
91 + else
92 + qt4_CFLAGS=$pkg_cv_qt4_CFLAGS
93 +@@ -5270,6 +5273,7 @@
94 + QT_MOC=`$PKG_CONFIG --variable moc_location "QtCore" 2>/dev/null`;
95 +
96 + fi
97 ++'
98 +
99 + else
100 + qt5_CFLAGS=$pkg_cv_qt5_CFLAGS
101
102 diff --git a/media-video/makemkv/makemkv-1.9.8.ebuild b/media-video/makemkv/makemkv-1.9.8-r1.ebuild
103 similarity index 85%
104 rename from media-video/makemkv/makemkv-1.9.8.ebuild
105 rename to media-video/makemkv/makemkv-1.9.8-r1.ebuild
106 index 74150ad..252dc73 100644
107 --- a/media-video/makemkv/makemkv-1.9.8.ebuild
108 +++ b/media-video/makemkv/makemkv-1.9.8-r1.ebuild
109 @@ -16,7 +16,8 @@ SRC_URI="http://www.makemkv.com/download/${MY_P}.tar.gz
110 LICENSE="LGPL-2.1 MPL-1.1 MakeMKV-EULA openssl"
111 SLOT="0"
112 KEYWORDS="~amd64 ~x86"
113 -IUSE="libav multilib qt4"
114 +IUSE="libav multilib qt4 qt5"
115 +REQUIRED_USE="?? ( qt4 qt5 )"
116
117 QA_PREBUILT="opt/bin/makemkvcon opt/bin/mmdtsdec"
118
119 @@ -26,11 +27,16 @@ RDEPEND="
120 dev-libs/openssl:0
121 sys-libs/zlib
122 qt4? (
123 - virtual/opengl
124 dev-qt/qtcore:4
125 dev-qt/qtdbus:4
126 dev-qt/qtgui:4
127 )
128 + qt5? (
129 + dev-qt/qtcore:5
130 + dev-qt/qtdbus:5
131 + dev-qt/qtgui:5
132 + dev-qt/qtwidgets:5
133 + )
134 !libav? ( >=media-video/ffmpeg-1.0.0:0= )
135 libav? ( >=media-video/libav-0.8.9:0= )
136 "
137 @@ -40,14 +46,25 @@ S=${WORKDIR}/makemkv-oss-${PV}
138
139 src_prepare() {
140 epatch "${FILESDIR}"/${PN}-{makefile,path}.patch
141 +
142 + # Qt5 always trumps Qt4 if it is available. There are no configure
143 + # options or variables to control this and there is no publicly
144 + # available configure.ac either.
145 + if use qt4; then
146 + epatch "${FILESDIR}"/${PN}-qt4.patch
147 + elif use qt5; then
148 + epatch "${FILESDIR}"/${PN}-qt5.patch
149 + fi
150 }
151
152 src_configure() {
153 + # See bug #439380.
154 replace-flags -O* -Os
155 - local args=""
156 - use qt4 || args="--disable-gui"
157 - if [[ -x ${ECONF_SOURCE:-.}/configure ]] ; then
158 - econf $args
159 +
160 + if use qt4 || use qt5; then
161 + econf --enable-gui
162 + else
163 + econf --disable-gui
164 fi
165 }
166
167 @@ -68,7 +85,7 @@ src_install() {
168 dosym libmmbd.so.0 /usr/$(get_libdir)/libmmbd.so.0.${PV}
169 into /opt
170
171 - if use qt4; then
172 + if use qt4 || use qt5; then
173 dobin out/makemkv
174
175 local res