summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2017-09-29 09:41:15 +0200
committerMichael Weber <xmw@gentoo.org>2017-09-29 09:41:15 +0200
commitec0e293315d902112a471837e653d156e095adc1 (patch)
tree5fff1f21b00f19ad094c92cbf9b4d635a847fdcb /media-libs
parentdev-libs/libcxml: Add live version for current dcpomatic. (diff)
downloadgentoo-ec0e293315d902112a471837e653d156e095adc1.tar.gz
gentoo-ec0e293315d902112a471837e653d156e095adc1.tar.bz2
gentoo-ec0e293315d902112a471837e653d156e095adc1.zip
media-libs/libsub: Add live version for upcoming dcpomatic.
Package-Manager: Portage-2.3.10, Repoman-2.3.3
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/libsub/files/libsub-9999-boost.patch31
-rw-r--r--media-libs/libsub/files/libsub-9999-iostream.patch90
-rw-r--r--media-libs/libsub/files/libsub-9999-libcxml-9999.patch21
-rw-r--r--media-libs/libsub/files/libsub-9999-no-ldconfig.patch9
-rw-r--r--media-libs/libsub/files/libsub-9999-respect-cxxflags.patch13
-rw-r--r--media-libs/libsub/files/libsub-9999-test-boost.patch_15
-rw-r--r--media-libs/libsub/libsub-9999.ebuild51
7 files changed, 230 insertions, 0 deletions
diff --git a/media-libs/libsub/files/libsub-9999-boost.patch b/media-libs/libsub/files/libsub-9999-boost.patch
new file mode 100644
index 000000000000..347610f58545
--- /dev/null
+++ b/media-libs/libsub/files/libsub-9999-boost.patch
@@ -0,0 +1,31 @@
+--- libsub-9999/test/dcp_reader_test.cc
++++ libsub-9999/test/dcp_reader_test.cc
+@@ -19,6 +19,7 @@
+
+ #include "interop_dcp_reader.h"
+ #include "collect.h"
++#include <boost/optional/optional_io.hpp>
+ #include <boost/test/unit_test.hpp>
+ #include <fstream>
+ #include <iostream>
+--- libsub-9999/test/wscript
++++ libsub-9999/test/wscript
+@@ -17,7 +17,7 @@
+ def build(bld):
+ obj = bld(features='cxx cxxprogram')
+ obj.name = 'tests'
+- obj.uselib = 'BOOST_TEST DCP CXML'
++ obj.uselib = 'BOOST_TEST BOOST_FILESYSTEM DCP CXML'
+ obj.use = 'libsub-1.0'
+ obj.source = """
+ dcp_reader_test.cc
+--- libsub-9999/tools/wscript
++++ libsub-9999/tools/wscript
+@@ -1,6 +1,6 @@
+ def build(bld):
+ obj = bld(features = 'cxx cxxprogram')
+ obj.use = ['libsub-1.0']
+- obj.uselib = 'OPENJPEG DCP CXML'
++ obj.uselib = 'OPENJPEG DCP CXML BOOST_FILESYSTEM'
+ obj.source = 'dumpsubs.cc'
+ obj.target = 'dumpsubs'
diff --git a/media-libs/libsub/files/libsub-9999-iostream.patch b/media-libs/libsub/files/libsub-9999-iostream.patch
new file mode 100644
index 000000000000..48a94c9737d4
--- /dev/null
+++ b/media-libs/libsub/files/libsub-9999-iostream.patch
@@ -0,0 +1,90 @@
+--- libsub-1.9999/src/stl_text_reader.cc
++++ libsub-1.9999/src/stl_text_reader.cc
+@@ -22,6 +22,7 @@
+ #include <boost/algorithm/string.hpp>
+ #include <boost/lexical_cast.hpp>
+ #include <vector>
++#include <iostream>
+
+ using std::list;
+ using std::ostream;
+--- libsub-9999/src/dcp_reader.cc
++++ libsub-9999/src/dcp_reader.cc
+@@ -26,6 +26,7 @@
+ #include "dcp/subtitle.h"
+ #include <libcxml/cxml.h>
+ #include <libxml++/libxml++.h>
++#include <iostream>
+
+ using std::list;
+ using std::cout;
+--- libsub-9999/src/sub_time.cc
++++ libsub-9999/src/sub_time.cc
+@@ -21,6 +21,7 @@
+ #include "exceptions.h"
+ #include <cmath>
+ #include <iomanip>
++#include <iostream>
+
+ using std::ostream;
+ using std::cout;
+--- libsub-9999/test/dcp_reader_test.cc
++++ libsub-9999/test/dcp_reader_test.cc
+@@ -21,6 +21,7 @@
+ #include "collect.h"
+ #include <boost/test/unit_test.hpp>
+ #include <fstream>
++#include <iostream>
+
+ using std::list;
+ using std::cout;
+--- libsub-9999/test/stl_binary_reader_test.cc
++++ libsub-9999/test/stl_binary_reader_test.cc
+@@ -24,7 +24,6 @@
+ #include "test.h"
+
+ using std::list;
+-using std::cout;
+ using std::ifstream;
+
+ /* Test reading of a binary STL file */
+--- libsub-9999/test/subrip_reader_test.cc
++++ libsub-9999/test/subrip_reader_test.cc
+@@ -24,6 +24,7 @@
+ #include <boost/test/unit_test.hpp>
+ #include <boost/filesystem.hpp>
+ #include <fstream>
++#include <iostream>
+
+ using std::list;
+ using std::cerr;
+--- libsub-9999/test/test.cc
++++ libsub-9999/test/test.cc
+@@ -22,6 +22,7 @@
+ #include <boost/test/unit_test.hpp>
+ #include <boost/filesystem.hpp>
+ #include <fstream>
++#include <iostream>
+ #include <string>
+ #include "iso6937_tables.h"
+
+--- libsub-9999/tools/dumpsubs.cc
++++ libsub-9999/tools/dumpsubs.cc
+@@ -23,6 +23,7 @@
+ #include <getopt.h>
+ #include <boost/filesystem.hpp>
+ #include <map>
++#include <iostream>
+
+ using std::string;
+ using std::cerr;
+--- libsub-9999/asdcplib/src/h__Writer.cpp
++++ libsub-9999/asdcplib/src/h__Writer.cpp
+@@ -32,7 +32,6 @@
+ #include "AS_DCP_internal.h"
+ #include "KLV.h"
+
+-using std::cout;
+ using namespace ASDCP;
+ using namespace ASDCP::MXF;
+
diff --git a/media-libs/libsub/files/libsub-9999-libcxml-9999.patch b/media-libs/libsub/files/libsub-9999-libcxml-9999.patch
new file mode 100644
index 000000000000..9937b138742d
--- /dev/null
+++ b/media-libs/libsub/files/libsub-9999-libcxml-9999.patch
@@ -0,0 +1,21 @@
+--- libsub-9999/src/smpte_dcp_reader.cc
++++ libsub-9999/src/smpte_dcp_reader.cc
+@@ -29,7 +29,6 @@
+
+ using std::string;
+ using std::list;
+-using std::stringstream;
+ using boost::shared_ptr;
+ using namespace sub;
+
+@@ -46,9 +45,7 @@
+
+ string s;
+ reader.ReadTimedTextResource (s, 0, 0);
+- stringstream t;
+- t << s;
+- xml->read_stream (t);
++ xml->read_string (s);
+
+ ASDCP::WriterInfo info;
+ reader.FillWriterInfo (info);
diff --git a/media-libs/libsub/files/libsub-9999-no-ldconfig.patch b/media-libs/libsub/files/libsub-9999-no-ldconfig.patch
new file mode 100644
index 000000000000..46851bf833ea
--- /dev/null
+++ b/media-libs/libsub/files/libsub-9999-no-ldconfig.patch
@@ -0,0 +1,9 @@
+--- libsub-1.9999/wscript
++++ libsub-1.9999/wscript
+@@ -128,5 +128,4 @@
+ sys.exit(-1)
+
+ def post(ctx):
+- if ctx.cmd == 'install':
+- ctx.exec_command('/sbin/ldconfig')
++ pass
diff --git a/media-libs/libsub/files/libsub-9999-respect-cxxflags.patch b/media-libs/libsub/files/libsub-9999-respect-cxxflags.patch
new file mode 100644
index 000000000000..992ef6bccce0
--- /dev/null
+++ b/media-libs/libsub/files/libsub-9999-respect-cxxflags.patch
@@ -0,0 +1,13 @@
+--- libsub-9999/wscript
++++ libsub-9999/wscript
+@@ -23,10 +23,6 @@
+ conf.env.DISABLE_TESTS = conf.options.disable_tests
+ conf.env.API_VERSION = API_VERSION
+
+- if conf.options.enable_debug:
+- conf.env.append_value('CXXFLAGS', '-g')
+- else:
+- conf.env.append_value('CXXFLAGS', '-O3')
+
+ conf.check_cfg(package='openssl', args='--cflags --libs', uselib_store='OPENSSL', mandatory=True)
+
diff --git a/media-libs/libsub/files/libsub-9999-test-boost.patch_ b/media-libs/libsub/files/libsub-9999-test-boost.patch_
new file mode 100644
index 000000000000..eacc5ea65ca6
--- /dev/null
+++ b/media-libs/libsub/files/libsub-9999-test-boost.patch_
@@ -0,0 +1,15 @@
+--- libsub-9999/test/wscript
++++ libsub-9999/test/wscript
+@@ -6,10 +6,11 @@
+ conf.check_cxx(fragment="""
+ #define BOOST_TEST_MODULE Config test\n
+ #include <boost/test/unit_test.hpp>\n
++ #include <boost/filesystem.hpp>\n
+ int main() {}
+ """,
+ msg='Checking for boost unit testing library',
+- lib='boost_unit_test_framework%s' % boost_lib_suffix,
++ lib='boost_unit_test_framework%s boost_filesystem%s' % (boost_lib_suffix, boost_lib_suffix),
+ uselib_store='BOOST_TEST')
+
+ conf.env.prepend_value('LINKFLAGS', '-Lsrc')
diff --git a/media-libs/libsub/libsub-9999.ebuild b/media-libs/libsub/libsub-9999.ebuild
new file mode 100644
index 000000000000..8772a9cff0d2
--- /dev/null
+++ b/media-libs/libsub/libsub-9999.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_4 python3_5 python3_6 )
+PYTHON_REQ_USE="threads(+)"
+inherit git-r3 python-any-r1 waf-utils
+
+DESCRIPTION="read and write subtitles in a few different formats"
+HOMEPAGE="http://carlh.net/libsub"
+EGIT_REPO_URI="https://github.com/cth103/${PN}.git"
+EGIT_BRANCH="1.0"
+
+LICENSE="GPL-2"
+SLOT="1.0"
+KEYWORDS=""
+IUSE=""
+
+RDEPEND="dev-cpp/glibmm:2
+ dev-cpp/libxmlpp:2.6
+ dev-libs/boost:=
+ >=dev-libs/libcxml-0.15.4
+ dev-libs/openssl:0
+ >=media-libs/libasdcp-cth-0.1.3"
+DEPEND="${RDEPEND}
+ dev-util/waf
+ virtual/pkgconfig
+ ${PYTHON_DEPS}"
+
+PATCHES=( "${FILESDIR}"/${P}-no-ldconfig.patch
+ "${FILESDIR}"/${P}-respect-cxxflags.patch
+ "${FILESDIR}"/${P}-iostream.patch
+ "${FILESDIR}"/${P}-libcxml-9999.patch
+ "${FILESDIR}"/${P}-boost.patch )
+
+src_prepare() {
+ rm -v waf || die
+ export WAF_BINARY=${EROOT}usr/bin/waf
+
+ ewarn "Some tests failing due missing files/certs are disabled."
+ sed -e '/ssa_reader_test.cc/d' \
+ -e '/dcp_to_stl_binary_test.cc/d' \
+ -i test/wscript || die
+
+ default
+}
+
+src_test() {
+ ./run/tests || die
+}