1 |
commit: ec0e293315d902112a471837e653d156e095adc1 |
2 |
Author: Michael Weber <xmw <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 29 07:41:15 2017 +0000 |
4 |
Commit: Michael Weber <xmw <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 29 07:41:15 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec0e2933 |
7 |
|
8 |
media-libs/libsub: Add live version for upcoming dcpomatic. |
9 |
|
10 |
Package-Manager: Portage-2.3.10, Repoman-2.3.3 |
11 |
|
12 |
media-libs/libsub/files/libsub-9999-boost.patch | 31 ++++++++ |
13 |
media-libs/libsub/files/libsub-9999-iostream.patch | 90 ++++++++++++++++++++++ |
14 |
.../libsub/files/libsub-9999-libcxml-9999.patch | 21 +++++ |
15 |
.../libsub/files/libsub-9999-no-ldconfig.patch | 9 +++ |
16 |
.../files/libsub-9999-respect-cxxflags.patch | 13 ++++ |
17 |
.../libsub/files/libsub-9999-test-boost.patch_ | 15 ++++ |
18 |
media-libs/libsub/libsub-9999.ebuild | 51 ++++++++++++ |
19 |
7 files changed, 230 insertions(+) |
20 |
|
21 |
diff --git a/media-libs/libsub/files/libsub-9999-boost.patch b/media-libs/libsub/files/libsub-9999-boost.patch |
22 |
new file mode 100644 |
23 |
index 00000000000..347610f5854 |
24 |
--- /dev/null |
25 |
+++ b/media-libs/libsub/files/libsub-9999-boost.patch |
26 |
@@ -0,0 +1,31 @@ |
27 |
+--- libsub-9999/test/dcp_reader_test.cc |
28 |
++++ libsub-9999/test/dcp_reader_test.cc |
29 |
+@@ -19,6 +19,7 @@ |
30 |
+ |
31 |
+ #include "interop_dcp_reader.h" |
32 |
+ #include "collect.h" |
33 |
++#include <boost/optional/optional_io.hpp> |
34 |
+ #include <boost/test/unit_test.hpp> |
35 |
+ #include <fstream> |
36 |
+ #include <iostream> |
37 |
+--- libsub-9999/test/wscript |
38 |
++++ libsub-9999/test/wscript |
39 |
+@@ -17,7 +17,7 @@ |
40 |
+ def build(bld): |
41 |
+ obj = bld(features='cxx cxxprogram') |
42 |
+ obj.name = 'tests' |
43 |
+- obj.uselib = 'BOOST_TEST DCP CXML' |
44 |
++ obj.uselib = 'BOOST_TEST BOOST_FILESYSTEM DCP CXML' |
45 |
+ obj.use = 'libsub-1.0' |
46 |
+ obj.source = """ |
47 |
+ dcp_reader_test.cc |
48 |
+--- libsub-9999/tools/wscript |
49 |
++++ libsub-9999/tools/wscript |
50 |
+@@ -1,6 +1,6 @@ |
51 |
+ def build(bld): |
52 |
+ obj = bld(features = 'cxx cxxprogram') |
53 |
+ obj.use = ['libsub-1.0'] |
54 |
+- obj.uselib = 'OPENJPEG DCP CXML' |
55 |
++ obj.uselib = 'OPENJPEG DCP CXML BOOST_FILESYSTEM' |
56 |
+ obj.source = 'dumpsubs.cc' |
57 |
+ obj.target = 'dumpsubs' |
58 |
|
59 |
diff --git a/media-libs/libsub/files/libsub-9999-iostream.patch b/media-libs/libsub/files/libsub-9999-iostream.patch |
60 |
new file mode 100644 |
61 |
index 00000000000..48a94c9737d |
62 |
--- /dev/null |
63 |
+++ b/media-libs/libsub/files/libsub-9999-iostream.patch |
64 |
@@ -0,0 +1,90 @@ |
65 |
+--- libsub-1.9999/src/stl_text_reader.cc |
66 |
++++ libsub-1.9999/src/stl_text_reader.cc |
67 |
+@@ -22,6 +22,7 @@ |
68 |
+ #include <boost/algorithm/string.hpp> |
69 |
+ #include <boost/lexical_cast.hpp> |
70 |
+ #include <vector> |
71 |
++#include <iostream> |
72 |
+ |
73 |
+ using std::list; |
74 |
+ using std::ostream; |
75 |
+--- libsub-9999/src/dcp_reader.cc |
76 |
++++ libsub-9999/src/dcp_reader.cc |
77 |
+@@ -26,6 +26,7 @@ |
78 |
+ #include "dcp/subtitle.h" |
79 |
+ #include <libcxml/cxml.h> |
80 |
+ #include <libxml++/libxml++.h> |
81 |
++#include <iostream> |
82 |
+ |
83 |
+ using std::list; |
84 |
+ using std::cout; |
85 |
+--- libsub-9999/src/sub_time.cc |
86 |
++++ libsub-9999/src/sub_time.cc |
87 |
+@@ -21,6 +21,7 @@ |
88 |
+ #include "exceptions.h" |
89 |
+ #include <cmath> |
90 |
+ #include <iomanip> |
91 |
++#include <iostream> |
92 |
+ |
93 |
+ using std::ostream; |
94 |
+ using std::cout; |
95 |
+--- libsub-9999/test/dcp_reader_test.cc |
96 |
++++ libsub-9999/test/dcp_reader_test.cc |
97 |
+@@ -21,6 +21,7 @@ |
98 |
+ #include "collect.h" |
99 |
+ #include <boost/test/unit_test.hpp> |
100 |
+ #include <fstream> |
101 |
++#include <iostream> |
102 |
+ |
103 |
+ using std::list; |
104 |
+ using std::cout; |
105 |
+--- libsub-9999/test/stl_binary_reader_test.cc |
106 |
++++ libsub-9999/test/stl_binary_reader_test.cc |
107 |
+@@ -24,7 +24,6 @@ |
108 |
+ #include "test.h" |
109 |
+ |
110 |
+ using std::list; |
111 |
+-using std::cout; |
112 |
+ using std::ifstream; |
113 |
+ |
114 |
+ /* Test reading of a binary STL file */ |
115 |
+--- libsub-9999/test/subrip_reader_test.cc |
116 |
++++ libsub-9999/test/subrip_reader_test.cc |
117 |
+@@ -24,6 +24,7 @@ |
118 |
+ #include <boost/test/unit_test.hpp> |
119 |
+ #include <boost/filesystem.hpp> |
120 |
+ #include <fstream> |
121 |
++#include <iostream> |
122 |
+ |
123 |
+ using std::list; |
124 |
+ using std::cerr; |
125 |
+--- libsub-9999/test/test.cc |
126 |
++++ libsub-9999/test/test.cc |
127 |
+@@ -22,6 +22,7 @@ |
128 |
+ #include <boost/test/unit_test.hpp> |
129 |
+ #include <boost/filesystem.hpp> |
130 |
+ #include <fstream> |
131 |
++#include <iostream> |
132 |
+ #include <string> |
133 |
+ #include "iso6937_tables.h" |
134 |
+ |
135 |
+--- libsub-9999/tools/dumpsubs.cc |
136 |
++++ libsub-9999/tools/dumpsubs.cc |
137 |
+@@ -23,6 +23,7 @@ |
138 |
+ #include <getopt.h> |
139 |
+ #include <boost/filesystem.hpp> |
140 |
+ #include <map> |
141 |
++#include <iostream> |
142 |
+ |
143 |
+ using std::string; |
144 |
+ using std::cerr; |
145 |
+--- libsub-9999/asdcplib/src/h__Writer.cpp |
146 |
++++ libsub-9999/asdcplib/src/h__Writer.cpp |
147 |
+@@ -32,7 +32,6 @@ |
148 |
+ #include "AS_DCP_internal.h" |
149 |
+ #include "KLV.h" |
150 |
+ |
151 |
+-using std::cout; |
152 |
+ using namespace ASDCP; |
153 |
+ using namespace ASDCP::MXF; |
154 |
+ |
155 |
|
156 |
diff --git a/media-libs/libsub/files/libsub-9999-libcxml-9999.patch b/media-libs/libsub/files/libsub-9999-libcxml-9999.patch |
157 |
new file mode 100644 |
158 |
index 00000000000..9937b138742 |
159 |
--- /dev/null |
160 |
+++ b/media-libs/libsub/files/libsub-9999-libcxml-9999.patch |
161 |
@@ -0,0 +1,21 @@ |
162 |
+--- libsub-9999/src/smpte_dcp_reader.cc |
163 |
++++ libsub-9999/src/smpte_dcp_reader.cc |
164 |
+@@ -29,7 +29,6 @@ |
165 |
+ |
166 |
+ using std::string; |
167 |
+ using std::list; |
168 |
+-using std::stringstream; |
169 |
+ using boost::shared_ptr; |
170 |
+ using namespace sub; |
171 |
+ |
172 |
+@@ -46,9 +45,7 @@ |
173 |
+ |
174 |
+ string s; |
175 |
+ reader.ReadTimedTextResource (s, 0, 0); |
176 |
+- stringstream t; |
177 |
+- t << s; |
178 |
+- xml->read_stream (t); |
179 |
++ xml->read_string (s); |
180 |
+ |
181 |
+ ASDCP::WriterInfo info; |
182 |
+ reader.FillWriterInfo (info); |
183 |
|
184 |
diff --git a/media-libs/libsub/files/libsub-9999-no-ldconfig.patch b/media-libs/libsub/files/libsub-9999-no-ldconfig.patch |
185 |
new file mode 100644 |
186 |
index 00000000000..46851bf833e |
187 |
--- /dev/null |
188 |
+++ b/media-libs/libsub/files/libsub-9999-no-ldconfig.patch |
189 |
@@ -0,0 +1,9 @@ |
190 |
+--- libsub-1.9999/wscript |
191 |
++++ libsub-1.9999/wscript |
192 |
+@@ -128,5 +128,4 @@ |
193 |
+ sys.exit(-1) |
194 |
+ |
195 |
+ def post(ctx): |
196 |
+- if ctx.cmd == 'install': |
197 |
+- ctx.exec_command('/sbin/ldconfig') |
198 |
++ pass |
199 |
|
200 |
diff --git a/media-libs/libsub/files/libsub-9999-respect-cxxflags.patch b/media-libs/libsub/files/libsub-9999-respect-cxxflags.patch |
201 |
new file mode 100644 |
202 |
index 00000000000..992ef6bccce |
203 |
--- /dev/null |
204 |
+++ b/media-libs/libsub/files/libsub-9999-respect-cxxflags.patch |
205 |
@@ -0,0 +1,13 @@ |
206 |
+--- libsub-9999/wscript |
207 |
++++ libsub-9999/wscript |
208 |
+@@ -23,10 +23,6 @@ |
209 |
+ conf.env.DISABLE_TESTS = conf.options.disable_tests |
210 |
+ conf.env.API_VERSION = API_VERSION |
211 |
+ |
212 |
+- if conf.options.enable_debug: |
213 |
+- conf.env.append_value('CXXFLAGS', '-g') |
214 |
+- else: |
215 |
+- conf.env.append_value('CXXFLAGS', '-O3') |
216 |
+ |
217 |
+ conf.check_cfg(package='openssl', args='--cflags --libs', uselib_store='OPENSSL', mandatory=True) |
218 |
+ |
219 |
|
220 |
diff --git a/media-libs/libsub/files/libsub-9999-test-boost.patch_ b/media-libs/libsub/files/libsub-9999-test-boost.patch_ |
221 |
new file mode 100644 |
222 |
index 00000000000..eacc5ea65ca |
223 |
--- /dev/null |
224 |
+++ b/media-libs/libsub/files/libsub-9999-test-boost.patch_ |
225 |
@@ -0,0 +1,15 @@ |
226 |
+--- libsub-9999/test/wscript |
227 |
++++ libsub-9999/test/wscript |
228 |
+@@ -6,10 +6,11 @@ |
229 |
+ conf.check_cxx(fragment=""" |
230 |
+ #define BOOST_TEST_MODULE Config test\n |
231 |
+ #include <boost/test/unit_test.hpp>\n |
232 |
++ #include <boost/filesystem.hpp>\n |
233 |
+ int main() {} |
234 |
+ """, |
235 |
+ msg='Checking for boost unit testing library', |
236 |
+- lib='boost_unit_test_framework%s' % boost_lib_suffix, |
237 |
++ lib='boost_unit_test_framework%s boost_filesystem%s' % (boost_lib_suffix, boost_lib_suffix), |
238 |
+ uselib_store='BOOST_TEST') |
239 |
+ |
240 |
+ conf.env.prepend_value('LINKFLAGS', '-Lsrc') |
241 |
|
242 |
diff --git a/media-libs/libsub/libsub-9999.ebuild b/media-libs/libsub/libsub-9999.ebuild |
243 |
new file mode 100644 |
244 |
index 00000000000..8772a9cff0d |
245 |
--- /dev/null |
246 |
+++ b/media-libs/libsub/libsub-9999.ebuild |
247 |
@@ -0,0 +1,51 @@ |
248 |
+# Copyright 1999-2017 Gentoo Foundation |
249 |
+# Distributed under the terms of the GNU General Public License v2 |
250 |
+ |
251 |
+EAPI=6 |
252 |
+ |
253 |
+PYTHON_COMPAT=( python2_7 python3_4 python3_5 python3_6 ) |
254 |
+PYTHON_REQ_USE="threads(+)" |
255 |
+inherit git-r3 python-any-r1 waf-utils |
256 |
+ |
257 |
+DESCRIPTION="read and write subtitles in a few different formats" |
258 |
+HOMEPAGE="http://carlh.net/libsub" |
259 |
+EGIT_REPO_URI="https://github.com/cth103/${PN}.git" |
260 |
+EGIT_BRANCH="1.0" |
261 |
+ |
262 |
+LICENSE="GPL-2" |
263 |
+SLOT="1.0" |
264 |
+KEYWORDS="" |
265 |
+IUSE="" |
266 |
+ |
267 |
+RDEPEND="dev-cpp/glibmm:2 |
268 |
+ dev-cpp/libxmlpp:2.6 |
269 |
+ dev-libs/boost:= |
270 |
+ >=dev-libs/libcxml-0.15.4 |
271 |
+ dev-libs/openssl:0 |
272 |
+ >=media-libs/libasdcp-cth-0.1.3" |
273 |
+DEPEND="${RDEPEND} |
274 |
+ dev-util/waf |
275 |
+ virtual/pkgconfig |
276 |
+ ${PYTHON_DEPS}" |
277 |
+ |
278 |
+PATCHES=( "${FILESDIR}"/${P}-no-ldconfig.patch |
279 |
+ "${FILESDIR}"/${P}-respect-cxxflags.patch |
280 |
+ "${FILESDIR}"/${P}-iostream.patch |
281 |
+ "${FILESDIR}"/${P}-libcxml-9999.patch |
282 |
+ "${FILESDIR}"/${P}-boost.patch ) |
283 |
+ |
284 |
+src_prepare() { |
285 |
+ rm -v waf || die |
286 |
+ export WAF_BINARY=${EROOT}usr/bin/waf |
287 |
+ |
288 |
+ ewarn "Some tests failing due missing files/certs are disabled." |
289 |
+ sed -e '/ssa_reader_test.cc/d' \ |
290 |
+ -e '/dcp_to_stl_binary_test.cc/d' \ |
291 |
+ -i test/wscript || die |
292 |
+ |
293 |
+ default |
294 |
+} |
295 |
+ |
296 |
+src_test() { |
297 |
+ ./run/tests || die |
298 |
+} |