View | Details | Raw Unified | Return to bug 192479
Collapse All | Expand All

(-)multimedia/aegisub/Makefile (-11 / +30 lines)
Lines 2-8 Link Here
2
# $FreeBSD: head/multimedia/aegisub/Makefile 360785 2014-07-05 17:46:36Z riggs $
2
# $FreeBSD: head/multimedia/aegisub/Makefile 360785 2014-07-05 17:46:36Z riggs $
3
3
4
PORTNAME=	aegisub
4
PORTNAME=	aegisub
5
PORTVERSION=	3.1.3
5
PORTVERSION=	3.2.0
6
CATEGORIES=	multimedia
6
CATEGORIES=	multimedia
7
MASTER_SITES=	http://ftp.aegisub.org/pub/archives/releases/source/:aegisub \
7
MASTER_SITES=	http://ftp.aegisub.org/pub/archives/releases/source/:aegisub \
8
		ftp://ftp.aegisub.org/pub/archives/releases/source/:aegisub \
8
		ftp://ftp.aegisub.org/pub/archives/releases/source/:aegisub \
Lines 17-24 Link Here
17
17
18
LIB_DEPENDS=	libboost_thread.so:${PORTSDIR}/devel/boost-libs \
18
LIB_DEPENDS=	libboost_thread.so:${PORTSDIR}/devel/boost-libs \
19
		libicui18n.so:${PORTSDIR}/devel/icu \
19
		libicui18n.so:${PORTSDIR}/devel/icu \
20
		libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig \
20
		libass.so:${PORTSDIR}/multimedia/libass \
21
		libass.so:${PORTSDIR}/multimedia/libass
21
		libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig
22
22
23
USE_GITHUB=	yes
23
USE_GITHUB=	yes
24
GH_ACCOUNT=	FFMS
24
GH_ACCOUNT=	FFMS
Lines 28-34 Link Here
28
28
29
WRKSRC=		${WRKDIR}/${DISTNAME}
29
WRKSRC=		${WRKDIR}/${DISTNAME}
30
30
31
USES=		compiler:c++11-lib desktop-file-utils gmake gettext iconv \
31
USES=		compiler:c++11-lib desktop-file-utils gettext gmake iconv \
32
		pkgconfig tar:xz
32
		pkgconfig tar:xz
33
USE_GNOME=	intltool
33
USE_GNOME=	intltool
34
USE_WX=		3.0
34
USE_WX=		3.0
Lines 36-47 Link Here
36
WX_CONF_ARGS=	absolute
36
WX_CONF_ARGS=	absolute
37
USE_GL=		glu
37
USE_GL=		glu
38
USE_CSTD=	c99
38
USE_CSTD=	c99
39
USE_LUA=	5.1+
40
GNU_CONFIGURE=	yes
39
GNU_CONFIGURE=	yes
40
CONFIGURE_ENV=	agi_cv_with_iconv=yes
41
CONFIGURE_ARGS=	--disable-compiler-flags \
41
CONFIGURE_ARGS=	--disable-compiler-flags \
42
		--disable-gcc-prec \
43
		--disable-sanity-checks \
42
		--disable-update-checker \
44
		--disable-update-checker \
43
		--without-libc++ \
45
		--without-libc++ \
44
		--disable-gcc-prec
46
		${ICONV_CONFIGURE_ARG}
45
INSTALLS_ICONS=	yes
47
INSTALLS_ICONS=	yes
46
48
47
PLIST_SUB=	VERSION="${PORTVERSION:R}"
49
PLIST_SUB=	VERSION="${PORTVERSION:R}"
Lines 49-56 Link Here
49
CPPFLAGS+=	-I${LOCALBASE}/include
51
CPPFLAGS+=	-I${LOCALBASE}/include
50
LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB}
52
LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB}
51
53
52
OPTIONS_DEFINE=		ALSA DOCS FFMPEG FFTW HUNSPELL OPENAL \
54
OPTIONS_DEFINE=		ALSA DOCS FFMPEG FFTW HUNSPELL OPENAL PORTAUDIO \
53
			PORTAUDIO PULSEAUDIO
55
			PULSEAUDIO
54
OPTIONS_DEFAULT=	FFMPEG FFTW HUNSPELL PULSEAUDIO
56
OPTIONS_DEFAULT=	FFMPEG FFTW HUNSPELL PULSEAUDIO
55
57
56
ALSA_LIB_DEPENDS=	libasound.so:${PORTSDIR}/audio/alsa-lib
58
ALSA_LIB_DEPENDS=	libasound.so:${PORTSDIR}/audio/alsa-lib
Lines 58-64 Link Here
58
FFMPEG_LIB_DEPENDS=	libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
60
FFMPEG_LIB_DEPENDS=	libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
59
FFMPEG_CONFIGURE_ENV=	FFMS2_CFLAGS="${FFMS_CFLAGS}" \
61
FFMPEG_CONFIGURE_ENV=	FFMS2_CFLAGS="${FFMS_CFLAGS}" \
60
			FFMS2_LIBS="${FFMS_LIBS}"
62
			FFMS2_LIBS="${FFMS_LIBS}"
61
FFMPEG_CONFIGURE_OFF=	--without-ffms2
63
FFMPEG_CONFIGURE_OFF=	--without-ffms
62
FFMPEG_CPPFLAGS=	${FFMS_CFLAGS}
64
FFMPEG_CPPFLAGS=	${FFMS_CFLAGS}
63
FFTW_LIB_DEPENDS=	libfftw3.so:${PORTSDIR}/math/fftw3
65
FFTW_LIB_DEPENDS=	libfftw3.so:${PORTSDIR}/math/fftw3
64
FFTW_CONFIGURE_OFF=	--without-fftw3
66
FFTW_CONFIGURE_OFF=	--without-fftw3
Lines 90-98 Link Here
90
92
91
.if ${COMPILER_TYPE} == "gcc"
93
.if ${COMPILER_TYPE} == "gcc"
92
USE_CXXSTD=	gnu++11
94
USE_CXXSTD=	gnu++11
95
.if empty(CFLAGS:M-march=*)
96
CFLAGS_i386=	-march=pentium
97
.endif
93
.else
98
.else
94
USE_CXXSTD=	c++11
99
USE_CXXSTD=	c++11
95
CXXFLAGS+=	-Wno-c++11-narrowing
100
CXXFLAGS+=	-Wno-c++11-narrowing
101
.if ${COMPILER_VERSION} < 34
102
BUILD_DEPENDS+=	${LOCALBASE}/lib/c++/libstdc++.so:${PORTSDIR}/devel/libc++ \
103
		${LOCALBASE}/bin/clang34:${PORTSDIR}/lang/clang34
104
CPP=		clang-cpp34
105
CC=		clang34
106
CXX=		clang++34
107
CXXFLAGS+=	-nostdinc++ -isystem ${LOCALBASE}/include/c++/v1
108
LDFLAGS+=	-L${LOCALBASE}lib/c++
109
.endif
96
.endif
110
.endif
97
111
98
post-patch:
112
post-patch:
Lines 101-108 Link Here
101
	@${REINPLACE_CMD} -e \
115
	@${REINPLACE_CMD} -e \
102
		's|".*build/|"./build/|' ${WRKSRC}/build/version.sh
116
		's|".*build/|"./build/|' ${WRKSRC}/build/version.sh
103
	@${REINPLACE_CMD} -e \
117
	@${REINPLACE_CMD} -e \
104
		'/iconv_t/s|^|//|' \
118
		's|^CC=|CC?=| ; \
105
		${WRKSRC}/libaegisub/include/libaegisub/charset_conv.h
119
		 /^CCOPT_/s|=.*|=| ; \
120
		 /^CCDEBUG/s|=.*|=|' ${WRKSRC}/vendor/luajit/src/Makefile
121
.if ${COMPILER_TYPE} == "gcc"
122
	@${FIND} ${WRKSRC} -name "*.h" | ${XARGS} ${REINPLACE_CMD} -e \
123
		'/virtual /s|= default;$$|{ }|'
124
.endif
106
125
107
pre-configure:
126
pre-configure:
108
.if ${PORT_OPTIONS:MFFMPEG}
127
.if ${PORT_OPTIONS:MFFMPEG}
(-)multimedia/aegisub/distinfo (-2 / +2 lines)
Lines 1-4 Link Here
1
SHA256 (aegisub-3.1.3.tar.xz) = efea5bc2bc5e0651ada4f65cfdd8af1b422a15f87933710d11287bf51e2b5e58
1
SHA256 (aegisub-3.2.0.tar.xz) = d9e5fd48b243e29832361a13f8be82b271ef0c606b13593ec72461156ee19159
2
SIZE (aegisub-3.1.3.tar.xz) = 4215196
2
SIZE (aegisub-3.2.0.tar.xz) = 5181228
3
SHA256 (ffms2-2.19.1.tar.gz) = 8516af3f71531746e7e3e4b16eb30dade5df5edfc0782e7b69f965310ea66640
3
SHA256 (ffms2-2.19.1.tar.gz) = 8516af3f71531746e7e3e4b16eb30dade5df5edfc0782e7b69f965310ea66640
4
SIZE (ffms2-2.19.1.tar.gz) = 512444
4
SIZE (ffms2-2.19.1.tar.gz) = 512444
(-)multimedia/aegisub/files/patch-libaegisub__ass__uuencode.cpp (-11 lines)
Lines 1-11 Link Here
1
--- libaegisub/ass/uuencode.cpp.orig
2
+++ libaegisub/ass/uuencode.cpp
3
@@ -16,6 +16,8 @@
4
 
5
 #include "../config.h"
6
 
7
+#include <cstring>
8
+
9
 #include "libaegisub/ass/uuencode.h"
10
 
11
 // Despite being called uuencoding by ass_specs.doc, the format is actually
(-)multimedia/aegisub/files/patch-libaegisub__cajun__reader.cpp (-27 lines)
Lines 1-27 Link Here
1
--- libaegisub/common/cajun/reader.cpp.orig
2
+++ libaegisub/common/cajun/reader.cpp
3
@@ -9,6 +9,7 @@
4
 #include "libaegisub/cajun/reader.h"
5
 
6
 #include <cassert>
7
+#include <cstdio>
8
 #include <set>
9
 #include <sstream>
10
 
11
@@ -243,8 +244,16 @@
12
 }
13
 
14
 void Reader::MatchNumber(std::string& sNumber, InputStream& inputStream) {
15
+#if defined(_LIBCPP_VERSION)
16
 	const char numericChars[] = "0123456789.eE-+";
17
 	while (!inputStream.EOS() && std::find(numericChars, std::end(numericChars), inputStream.Peek()) != std::end(numericChars))
18
+#else
19
+	const char sNumericChars[] = "0123456789.eE-+";
20
+	std::set<char> numericChars; 
21
+	numericChars.insert(sNumericChars, sNumericChars + sizeof(sNumericChars)); 
22
+
23
+	while (!inputStream.EOS()&& numericChars.count(inputStream.Peek())) 
24
+#endif
25
 		sNumber.push_back(inputStream.Get());
26
 }
27
 
(-)multimedia/aegisub/files/patch-libaegisub__common__cajun__reader.cpp (+28 lines)
Line 0 Link Here
1
--- libaegisub/common/cajun/reader.cpp.orig
2
+++ libaegisub/common/cajun/reader.cpp
3
@@ -10,6 +10,8 @@
4
 
5
 #include <boost/interprocess/streams/bufferstream.hpp>
6
 #include <cassert>
7
+#include <cstdio>
8
+#include <set>
9
 
10
 /*
11
 
12
@@ -231,8 +233,16 @@
13
 }
14
 
15
 void Reader::MatchNumber(std::string& sNumber, InputStream& inputStream) {
16
+#if defined(_LIBCPP_VERSION)
17
 	const char numericChars[] = "0123456789.eE-+";
18
 	while (!inputStream.EOS() && std::find(numericChars, std::end(numericChars), inputStream.Peek()) != std::end(numericChars))
19
+#else
20
+	const char sNumericChars[] = "0123456789.eE-+";
21
+	std::set<char> numericChars; 
22
+	numericChars.insert(sNumericChars, sNumericChars + sizeof(sNumericChars)); 
23
+
24
+	while (!inputStream.EOS()&& numericChars.count(inputStream.Peek())) 
25
+#endif
26
 		sNumber.push_back(inputStream.Get());
27
 }
28
 
(-)multimedia/aegisub/files/patch-libaegisub__common__calltip_provider.cpp (+10 lines)
Line 0 Link Here
1
--- libaegisub/common/calltip_provider.cpp.orig	2014-08-05 20:40:25.000000000 +0900
2
+++ libaegisub/common/calltip_provider.cpp	2014-08-05 20:40:42.000000000 +0900
3
@@ -19,6 +19,7 @@
4
 #include "libaegisub/ass/dialogue_parser.h"
5
 
6
 #include <algorithm>
7
+#include <cstring>
8
 
9
 namespace {
10
 struct proto_lit {
(-)multimedia/aegisub/files/patch-libaegisub__common__character_count.cpp (+11 lines)
Line 0 Link Here
1
--- libaegisub/common/character_count.cpp.orig	2014-08-05 20:41:47.000000000 +0900
2
+++ libaegisub/common/character_count.cpp	2014-08-05 20:43:19.000000000 +0900
3
@@ -22,6 +22,8 @@
4
 #include <unicode/uchar.h>
5
 #include <unicode/utf8.h>
6
 
7
+#include <algorithm>
8
+#include <memory>
9
 #include <mutex>
10
 #include <unicode/brkiter.h>
11
 
(-)multimedia/aegisub/files/patch-libaegisub__common__charset.cpp (+10 lines)
Line 0 Link Here
1
--- libaegisub/common/charset.cpp.orig	2014-08-05 20:44:44.000000000 +0900
2
+++ libaegisub/common/charset.cpp	2014-08-05 20:44:59.000000000 +0900
3
@@ -20,6 +20,7 @@
4
 
5
 #include "libaegisub/file_mapping.h"
6
 
7
+#include <algorithm>
8
 #include <string>
9
 
10
 #ifndef _WIN32
(-)multimedia/aegisub/files/patch-libaegisub__common__color.cpp (+25 lines)
Line 0 Link Here
1
--- libaegisub/common/color.cpp.orig	2014-08-05 20:04:54.000000000 +0900
2
+++ libaegisub/common/color.cpp	2014-08-05 20:06:27.000000000 +0900
3
@@ -18,6 +18,13 @@
4
 
5
 #include "libaegisub/format.h"
6
 
7
+#ifdef _LIBCPP_VERSION
8
+#define TO_STRING(x) std::to_string(x)
9
+#else
10
+#include <boost/lexical_cast.hpp>
11
+#define TO_STRING(x) boost::lexical_cast<std::string>(x)
12
+#endif
13
+
14
 namespace agi {
15
 
16
 Color::Color(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
17
@@ -37,7 +44,7 @@
18
 }
19
 
20
 std::string Color::GetSsaFormatted() const {
21
-	return std::to_string((a << 24) + (b << 16) + (g << 8) + r);
22
+	return TO_STRING((a << 24) + (b << 16) + (g << 8) + r);
23
 }
24
 
25
 std::string Color::GetHexFormatted(bool rgba) const {
(-)multimedia/aegisub/files/patch-libaegisub__include__libaegisub__audio__provider.h (+10 lines)
Line 0 Link Here
1
--- libaegisub/include/libaegisub/audio/provider.h.orig	2014-07-28 23:29:16.000000000 +0900
2
+++ libaegisub/include/libaegisub/audio/provider.h	2014-08-05 19:40:17.000000000 +0900
3
@@ -20,6 +20,7 @@
4
 #include <libaegisub/fs_fwd.h>
5
 
6
 #include <atomic>
7
+#include <memory>
8
 #include <vector>
9
 
10
 namespace agi {
(-)multimedia/aegisub/files/patch-src__ass_file.cpp (-14 / +14 lines)
Lines 1-27 Link Here
1
--- src/ass_file.cpp.orig
1
--- src/ass_file.cpp.orig
2
+++ src/ass_file.cpp
2
+++ src/ass_file.cpp
3
@@ -49,6 +49,13 @@
3
@@ -29,6 +29,13 @@
4
 #include <boost/algorithm/string/case_conv.hpp>
5
 #include <boost/filesystem/path.hpp>
4
 #include <boost/filesystem/path.hpp>
5
 #include <cassert>
6
 
6
 
7
+#ifdef _LIBCPP_VERSION
7
+#ifdef _LIBCPP_VERSION
8
+#define TO_STRING(x) std::to_string(x) 
8
+#define TO_STRING(x) std::to_string(x)
9
+#else
9
+#else
10
+#include <boost/lexical_cast.hpp>
10
+#include <boost/lexical_cast.hpp>
11
+#define TO_STRING(x) boost::lexical_cast<std::string>(x)
11
+#define TO_STRING(x) boost::lexical_cast<std::string>(x)
12
+#endif
12
+#endif
13
+
13
+
14
 namespace std {
14
 AssFile::AssFile() { }
15
 	template<>
15
 
16
 	void swap(AssFile &lft, AssFile &rgt) {
16
 AssFile::~AssFile() {
17
@@ -71,8 +78,8 @@
17
@@ -42,8 +49,8 @@
18
 	Line.push_back(*new AssInfo("WrapStyle", "0"));
18
 	Info.emplace_back("WrapStyle", "0");
19
 	Line.push_back(*new AssInfo("ScaledBorderAndShadow", "yes"));
19
 	Info.emplace_back("ScaledBorderAndShadow", "yes");
20
 	if (!OPT_GET("Subtitle/Default Resolution/Auto")->GetBool()) {
20
 	if (!OPT_GET("Subtitle/Default Resolution/Auto")->GetBool()) {
21
-		Line.push_back(*new AssInfo("PlayResX", std::to_string(OPT_GET("Subtitle/Default Resolution/Width")->GetInt())));
21
-		Info.emplace_back("PlayResX", std::to_string(OPT_GET("Subtitle/Default Resolution/Width")->GetInt()));
22
-		Line.push_back(*new AssInfo("PlayResY", std::to_string(OPT_GET("Subtitle/Default Resolution/Height")->GetInt())));
22
-		Info.emplace_back("PlayResY", std::to_string(OPT_GET("Subtitle/Default Resolution/Height")->GetInt()));
23
+		Line.push_back(*new AssInfo("PlayResX", TO_STRING(OPT_GET("Subtitle/Default Resolution/Width")->GetInt())));
23
+		Info.emplace_back("PlayResX", TO_STRING(OPT_GET("Subtitle/Default Resolution/Width")->GetInt()));
24
+		Line.push_back(*new AssInfo("PlayResY", TO_STRING(OPT_GET("Subtitle/Default Resolution/Height")->GetInt())));
24
+		Info.emplace_back("PlayResY", TO_STRING(OPT_GET("Subtitle/Default Resolution/Height")->GetInt()));
25
 	}
25
 	}
26
 	Line.push_back(*new AssInfo("YCbCr Matrix", "None"));
26
 	Info.emplace_back("YCbCr Matrix", "None");
27
 
27
 
(-)multimedia/aegisub/files/patch-src__ass_override.cpp (-8 / +3 lines)
Lines 1-6 Link Here
1
--- src/ass_override.cpp.orig
1
--- src/ass_override.cpp.orig
2
+++ src/ass_override.cpp
2
+++ src/ass_override.cpp
3
@@ -49,6 +49,13 @@
3
@@ -44,6 +44,13 @@
4
 #include <boost/range/adaptor/transformed.hpp>
4
 #include <boost/range/adaptor/transformed.hpp>
5
 #include <functional>
5
 #include <functional>
6
 
6
 
Lines 14-30 Link Here
14
 using namespace boost::adaptors;
14
 using namespace boost::adaptors;
15
 
15
 
16
 AssOverrideParameter::AssOverrideParameter(VariableDataType type, AssParameterClass classification)
16
 AssOverrideParameter::AssOverrideParameter(VariableDataType type, AssParameterClass classification)
17
@@ -129,11 +136,11 @@
17
@@ -126,7 +133,7 @@
18
 	if (classification == AssParameterClass::ALPHA)
18
 	if (classification == AssParameterClass::ALPHA)
19
 		Set(str(boost::format("&H%02X&") % mid(0, new_value, 255)));
19
 		Set(agi::format("&H%02X&", mid(0, new_value, 255)));
20
 	else
20
 	else
21
-		Set(std::to_string(new_value));
21
-		Set(std::to_string(new_value));
22
+		Set(TO_STRING(new_value));
22
+		Set(TO_STRING(new_value));
23
 }
23
 }
24
 
24
 
25
 template<> void AssOverrideParameter::Set<double>(double new_value) {
25
 template<> void AssOverrideParameter::Set<double>(double new_value) {
26
-	Set(std::to_string(new_value));
27
+	Set(TO_STRING(new_value));
28
 }
29
 
30
 template<> void AssOverrideParameter::Set<bool>(bool new_value) {
(-)multimedia/aegisub/files/patch-src__auto4_lua_dialog.cpp (-6 / +6 lines)
Lines 1-8 Link Here
1
--- src/auto4_lua_dialog.cpp.orig
1
--- src/auto4_lua_dialog.cpp.orig
2
+++ src/auto4_lua_dialog.cpp
2
+++ src/auto4_lua_dialog.cpp
3
@@ -66,6 +66,13 @@
3
@@ -60,6 +60,13 @@
4
 #include <wx/valnum.h>
4
 #include <wx/stattext.h>
5
 #include <wx/window.h>
5
 #include <wx/valgen.h>
6
 
6
 
7
+#ifdef _LIBCPP_VERSION
7
+#ifdef _LIBCPP_VERSION
8
+#define TO_STRING(x) std::to_string(x)
8
+#define TO_STRING(x) std::to_string(x)
Lines 11-20 Link Here
11
+#define TO_STRING(x) boost::lexical_cast<std::string>(x)
11
+#define TO_STRING(x) boost::lexical_cast<std::string>(x)
12
+#endif
12
+#endif
13
+
13
+
14
 using namespace agi::lua;
14
 namespace {
15
 namespace {
15
 	inline void get_if_right_type(lua_State *L, std::string &def) {
16
 	inline void get_if_right_type(lua_State *L, std::string &def) {
16
 		if (lua_isstring(L, -1))
17
@@ -249,7 +256,7 @@
17
@@ -256,7 +263,7 @@
18
 			}
18
 			}
19
 
19
 
20
 			bool CanSerialiseValue() const override  { return true; }
20
 			bool CanSerialiseValue() const override  { return true; }
Lines 23-29 Link Here
23
 			void UnserialiseValue(const std::string &serialised) override { value = atoi(serialised.c_str()); }
23
 			void UnserialiseValue(const std::string &serialised) override { value = atoi(serialised.c_str()); }
24
 
24
 
25
 			wxControl *Create(wxWindow *parent) override {
25
 			wxControl *Create(wxWindow *parent) override {
26
@@ -317,7 +324,7 @@
26
@@ -287,7 +294,7 @@
27
 			}
27
 			}
28
 
28
 
29
 			bool CanSerialiseValue() const override { return true; }
29
 			bool CanSerialiseValue() const override { return true; }
(-)multimedia/aegisub/files/patch-src__base_grid.cpp (-83 lines)
Lines 1-83 Link Here
1
--- src/base_grid.cpp.orig
2
+++ src/base_grid.cpp
3
@@ -67,6 +67,15 @@
4
 #include <wx/scrolbar.h>
5
 #include <wx/sizer.h>
6
 
7
+#ifdef _LIBCPP_VERSION
8
+#define TO_STRING(x) std::to_string(x) 
9
+#define TO_WSTRING(x) std::to_wstring(x) 
10
+#else
11
+#include <boost/lexical_cast.hpp>
12
+#define TO_STRING(x) boost::lexical_cast<std::string>(x)
13
+#define TO_WSTRING(x) boost::lexical_cast<std::wstring>(x)
14
+#endif
15
+
16
 enum {
17
 	GRID_SCROLLBAR = 1730,
18
 	MENU_SHOW_COL = 1250 // Needs 15 IDs after this
19
@@ -194,8 +203,8 @@
20
 }
21
 
22
 void BaseGrid::OnSubtitlesSave() {
23
-	context->ass->SaveUIState("Scroll Position", std::to_string(yPos));
24
-	context->ass->SaveUIState("Active Line", std::to_string(GetDialogueIndex(active_line)));
25
+	context->ass->SaveUIState("Scroll Position", TO_STRING(yPos));
26
+	context->ass->SaveUIState("Active Line", TO_STRING(GetDialogueIndex(active_line)));
27
 }
28
 
29
 void BaseGrid::OnShowColMenu(wxCommandEvent &event) {
30
@@ -557,11 +566,11 @@
31
 }
32
 
33
 void BaseGrid::GetRowStrings(int row, AssDialogue *line, bool *paint_columns, wxString *strings, bool replace, wxString const& rep_char) const {
34
-	if (paint_columns[0]) strings[0] = std::to_wstring(row + 1);
35
-	if (paint_columns[1]) strings[1] = std::to_wstring(line->Layer);
36
+	if (paint_columns[0]) strings[0] = TO_WSTRING(row + 1);
37
+	if (paint_columns[1]) strings[1] = TO_WSTRING(line->Layer);
38
 	if (byFrame) {
39
-		if (paint_columns[2]) strings[2] = std::to_wstring(context->videoController->FrameAtTime(line->Start, agi::vfr::START));
40
-		if (paint_columns[3]) strings[3] = std::to_wstring(context->videoController->FrameAtTime(line->End, agi::vfr::END));
41
+		if (paint_columns[2]) strings[2] = TO_WSTRING(context->videoController->FrameAtTime(line->Start, agi::vfr::START));
42
+		if (paint_columns[3]) strings[3] = TO_WSTRING(context->videoController->FrameAtTime(line->End, agi::vfr::END));
43
 	}
44
 	else {
45
 		if (paint_columns[2]) strings[2] = to_wx(line->Start.GetAssFormated());
46
@@ -570,9 +579,9 @@
47
 	if (paint_columns[4]) strings[4] = to_wx(line->Style);
48
 	if (paint_columns[5]) strings[5] = to_wx(line->Actor);
49
 	if (paint_columns[6]) strings[6] = to_wx(line->Effect);
50
-	if (paint_columns[7]) strings[7] = line->Margin[0] ? wxString(std::to_wstring(line->Margin[0])) : wxString();
51
-	if (paint_columns[8]) strings[8] = line->Margin[1] ? wxString(std::to_wstring(line->Margin[1])) : wxString();
52
-	if (paint_columns[9]) strings[9] = line->Margin[2] ? wxString(std::to_wstring(line->Margin[2])) : wxString();
53
+	if (paint_columns[7]) strings[7] = line->Margin[0] ? wxString(TO_WSTRING(line->Margin[0])) : wxString();
54
+	if (paint_columns[8]) strings[8] = line->Margin[1] ? wxString(TO_WSTRING(line->Margin[1])) : wxString();
55
+	if (paint_columns[9]) strings[9] = line->Margin[2] ? wxString(TO_WSTRING(line->Margin[2])) : wxString();
56
 
57
 	if (paint_columns[10]) {
58
 		strings[10].clear();
59
@@ -799,7 +808,7 @@
60
 	// O(1) widths
61
 	int marginLen = dc.GetTextExtent("0000").GetWidth();
62
 
63
-	int labelLen = dc.GetTextExtent(std::to_wstring(GetRows())).GetWidth();
64
+	int labelLen = dc.GetTextExtent(TO_WSTRING(GetRows())).GetWidth();
65
 	int startLen = 0;
66
 	int endLen = 0;
67
 	if (!byFrame)
68
@@ -844,12 +853,12 @@
69
 	}
70
 
71
 	// Finish layer
72
-	int layerLen = maxLayer ? dc.GetTextExtent(std::to_wstring(maxLayer)).GetWidth() : 0;
73
+	int layerLen = maxLayer ? dc.GetTextExtent(TO_WSTRING(maxLayer)).GetWidth() : 0;
74
 
75
 	// Finish times
76
 	if (byFrame) {
77
-		startLen = dc.GetTextExtent(std::to_wstring(maxStart)).GetWidth();
78
-		endLen = dc.GetTextExtent(std::to_wstring(maxEnd)).GetWidth();
79
+		startLen = dc.GetTextExtent(TO_WSTRING(maxStart)).GetWidth();
80
+		endLen = dc.GetTextExtent(TO_WSTRING(maxEnd)).GetWidth();
81
 	}
82
 
83
 	// Set column widths
(-)multimedia/aegisub/files/patch-src__command__command.h (+10 lines)
Line 0 Link Here
1
--- src/command/command.h.orig	2014-08-05 20:09:07.000000000 +0900
2
+++ src/command/command.h	2014-08-05 20:09:21.000000000 +0900
3
@@ -17,6 +17,7 @@
4
 /// @ingroup command
5
 
6
 #include <map>
7
+#include <memory>
8
 #include <string>
9
 #include <vector>
10
 
(-)multimedia/aegisub/files/patch-src__command__edit.cpp (-20 / +20 lines)
Lines 1-8 Link Here
1
--- src/command/edit.cpp.orig
1
--- src/command/edit.cpp.orig
2
+++ src/command/edit.cpp
2
+++ src/command/edit.cpp
3
@@ -68,6 +68,13 @@
3
@@ -69,6 +69,13 @@
4
 #include <wx/clipbrd.h>
5
 #include <wx/fontdlg.h>
4
 #include <wx/fontdlg.h>
5
 #include <wx/textentry.h>
6
 
6
 
7
+#ifdef _LIBCPP_VERSION
7
+#ifdef _LIBCPP_VERSION
8
+#define TO_STRING(x) std::to_string(x) 
8
+#define TO_STRING(x) std::to_string(x) 
Lines 14-38 Link Here
14
 namespace {
14
 namespace {
15
 	using namespace boost::adaptors;
15
 	using namespace boost::adaptors;
16
 	using cmd::Command;
16
 	using cmd::Command;
17
@@ -450,13 +457,13 @@
17
@@ -516,13 +523,13 @@
18
 		if (font.GetFaceName() != startfont.GetFaceName())
18
 			if (font.GetFaceName() != startfont.GetFaceName())
19
 			set_tag(line, blocks, "\\fn", from_wx(font.GetFaceName()), sel_start, sel_end);
19
 				do_set_tag("\\fn", from_wx(font.GetFaceName()));
20
 		if (font.GetPointSize() != startfont.GetPointSize())
20
 			if (font.GetPointSize() != startfont.GetPointSize())
21
-			set_tag(line, blocks, "\\fs", std::to_string(font.GetPointSize()), sel_start, sel_end);
21
-				do_set_tag("\\fs", std::to_string(font.GetPointSize()));
22
+			set_tag(line, blocks, "\\fs", TO_STRING(font.GetPointSize()), sel_start, sel_end);
22
+				do_set_tag("\\fs", TO_STRING(font.GetPointSize()));
23
 		if (font.GetWeight() != startfont.GetWeight())
23
 			if (font.GetWeight() != startfont.GetWeight())
24
-			set_tag(line, blocks, "\\b", std::to_string(font.GetWeight() == wxFONTWEIGHT_BOLD), sel_start, sel_end);
24
-				do_set_tag("\\b", std::to_string(font.GetWeight() == wxFONTWEIGHT_BOLD));
25
+			set_tag(line, blocks, "\\b", TO_STRING(font.GetWeight() == wxFONTWEIGHT_BOLD), sel_start, sel_end);
25
+				do_set_tag("\\b", TO_STRING(font.GetWeight() == wxFONTWEIGHT_BOLD));
26
 		if (font.GetStyle() != startfont.GetStyle())
26
 			if (font.GetStyle() != startfont.GetStyle())
27
-			set_tag(line, blocks, "\\i", std::to_string(font.GetStyle() == wxFONTSTYLE_ITALIC), sel_start, sel_end);
27
-				do_set_tag("\\i", std::to_string(font.GetStyle() == wxFONTSTYLE_ITALIC));
28
+			set_tag(line, blocks, "\\i", TO_STRING(font.GetStyle() == wxFONTSTYLE_ITALIC), sel_start, sel_end);
28
+				do_set_tag("\\i", TO_STRING(font.GetStyle() == wxFONTSTYLE_ITALIC));
29
 		if (font.GetUnderlined() != startfont.GetUnderlined())
29
 			if (font.GetUnderlined() != startfont.GetUnderlined())
30
-			set_tag(line, blocks, "\\i", std::to_string(font.GetUnderlined()), sel_start, sel_end);
30
-				do_set_tag("\\i", std::to_string(font.GetUnderlined()));
31
+			set_tag(line, blocks, "\\i", TO_STRING(font.GetUnderlined()), sel_start, sel_end);
31
+				do_set_tag("\\i", TO_STRING(font.GetUnderlined()));
32
 
32
 
33
 		commit_text(c, _("set font"), sel_start, sel_end);
33
 			return shift;
34
 	}
34
 		});
35
@@ -711,7 +718,7 @@
35
@@ -761,7 +768,7 @@
36
 }
36
 }
37
 
37
 
38
 static void combine_karaoke(AssDialogue *first, AssDialogue *second) {
38
 static void combine_karaoke(AssDialogue *first, AssDialogue *second) {
(-)multimedia/aegisub/files/patch-src__dialog_jumpto.cpp (-12 / +12 lines)
Lines 1-6 Link Here
1
--- src/dialog_jumpto.cpp.orig
1
--- src/dialog_jumpto.cpp.orig	2014-07-28 23:29:16.000000000 +0900
2
+++ src/dialog_jumpto.cpp
2
+++ src/dialog_jumpto.cpp	2014-08-05 21:03:34.000000000 +0900
3
@@ -48,6 +48,13 @@
3
@@ -43,6 +43,13 @@
4
 #include <wx/stattext.h>
4
 #include <wx/stattext.h>
5
 #include <wx/textctrl.h>
5
 #include <wx/textctrl.h>
6
 
6
 
Lines 11-25 Link Here
11
+#define TO_STRING(x) boost::lexical_cast<std::string>(x)
11
+#define TO_STRING(x) boost::lexical_cast<std::string>(x)
12
+#endif
12
+#endif
13
+
13
+
14
 DialogJumpTo::DialogJumpTo(agi::Context *c)
14
 namespace {
15
 : wxDialog(c->parent, -1, _("Jump to"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxWANTS_CHARS)
15
 struct DialogJumpTo {
16
 , c(c)
16
 	wxDialog d;
17
@@ -59,7 +66,7 @@
17
@@ -74,7 +81,7 @@
18
 	auto LabelTime = new wxStaticText(this, -1, _("Time: "));
18
 	auto LabelTime = new wxStaticText(&d, -1, _("Time: "));
19
 
19
 
20
 	JumpFrame = new wxTextCtrl(this,-1,"",wxDefaultPosition,wxSize(-1,-1),wxTE_PROCESS_ENTER, IntValidator((int)jumpframe));
20
 	JumpFrame = new wxTextCtrl(&d,-1,"",wxDefaultPosition,wxSize(-1,-1),wxTE_PROCESS_ENTER, IntValidator((int)jumpframe));
21
-	JumpFrame->SetMaxLength(std::to_string(c->videoController->GetLength() - 1).size());
21
-	JumpFrame->SetMaxLength(std::to_string(c->project->VideoProvider()->GetFrameCount() - 1).size());
22
+	JumpFrame->SetMaxLength(TO_STRING(c->videoController->GetLength() - 1).size());
22
+	JumpFrame->SetMaxLength(TO_STRING(c->project->VideoProvider()->GetFrameCount() - 1).size());
23
 	JumpTime = new TimeEdit(this, -1, c, AssTime(c->videoController->TimeAtFrame(jumpframe)).GetAssFormated(), wxSize(-1,-1));
23
 	JumpTime = new TimeEdit(&d, -1, c, agi::Time(c->videoController->TimeAtFrame(jumpframe)).GetAssFormatted(), wxSize(-1,-1));
24
 
24
 
25
 	auto TimesSizer = new wxGridSizer(2, 5, 5);
25
 	auto TimesSizer = new wxGridSizer(2, 5, 5);
(-)multimedia/aegisub/files/patch-src__dialog_kara_timing_copy.cpp (-7 / +7 lines)
Lines 1-8 Link Here
1
--- src/dialog_kara_timing_copy.cpp.orig
1
--- src/dialog_kara_timing_copy.cpp.orig
2
+++ src/dialog_kara_timing_copy.cpp
2
+++ src/dialog_kara_timing_copy.cpp
3
@@ -69,6 +69,13 @@
3
@@ -53,6 +53,13 @@
4
 #define TEXT_LABEL_SOURCE _("Source: ")
4
 #include <wx/stattext.h>
5
 #define TEXT_LABEL_DEST _("Dest: ")
5
 #include <wx/string.h>
6
 
6
 
7
+#ifdef _LIBCPP_VERSION
7
+#ifdef _LIBCPP_VERSION
8
+#define TO_STRING(x) std::to_string(x)
8
+#define TO_STRING(x) std::to_string(x)
Lines 11-20 Link Here
11
+#define TO_STRING(x) boost::lexical_cast<std::string>(x)
11
+#define TO_STRING(x) boost::lexical_cast<std::string>(x)
12
+#endif
12
+#endif
13
+
13
+
14
 class KaraokeLineMatchDisplay : public wxControl {
14
 namespace {
15
 	typedef AssKaraoke::Syllable MatchSyllable;
15
 #define TEXT_LABEL_SOURCE _("Source: ")
16
 
16
 #define TEXT_LABEL_DEST _("Dest: ")
17
@@ -358,7 +365,7 @@
17
@@ -343,7 +350,7 @@
18
 		int duration = 0;
18
 		int duration = 0;
19
 		for (auto const& syl : match.src)
19
 		for (auto const& syl : match.src)
20
 			duration += syl.duration;
20
 			duration += syl.duration;
(-)multimedia/aegisub/files/patch-src__dialog_properties.cpp (-13 / +15 lines)
Lines 1-6 Link Here
1
--- src/dialog_properties.cpp.orig
1
--- src/dialog_properties.cpp.orig	2014-07-28 23:29:16.000000000 +0900
2
+++ src/dialog_properties.cpp
2
+++ src/dialog_properties.cpp	2014-08-05 20:27:38.000000000 +0900
3
@@ -54,6 +54,15 @@
3
@@ -47,6 +47,15 @@
4
 #include <wx/stattext.h>
4
 #include <wx/stattext.h>
5
 #include <wx/textctrl.h>
5
 #include <wx/textctrl.h>
6
 
6
 
Lines 13-36 Link Here
13
+#define TO_WSTRING(x) boost::lexical_cast<std::wstring>(x)
13
+#define TO_WSTRING(x) boost::lexical_cast<std::wstring>(x)
14
+#endif
14
+#endif
15
+
15
+
16
 DialogProperties::DialogProperties(agi::Context *c)
16
 namespace {
17
 : wxDialog(c->parent, -1, _("Script Properties"))
17
 class DialogProperties {
18
 , c(c)
18
 	wxDialog d;
19
@@ -145,7 +154,7 @@
19
@@ -186,7 +195,7 @@
20
 
20
 
21
 	count += SetInfoIfDifferent("PlayResX", from_wx(ResX->GetValue()));
21
 	count += SetInfoIfDifferent("PlayResX", from_wx(ResX->GetValue()));
22
 	count += SetInfoIfDifferent("PlayResY", from_wx(ResY->GetValue()));
22
 	count += SetInfoIfDifferent("PlayResY", from_wx(ResY->GetValue()));
23
-	count += SetInfoIfDifferent("WrapStyle", std::to_string(WrapStyle->GetSelection()));
23
-	count += SetInfoIfDifferent("WrapStyle", std::to_string(WrapStyle->GetSelection()));
24
+	count += SetInfoIfDifferent("WrapStyle", TO_STRING(WrapStyle->GetSelection()));
24
+	count += SetInfoIfDifferent("WrapStyle", TO_STRING(WrapStyle->GetSelection()));
25
 	count += SetInfoIfDifferent("ScaledBorderAndShadow", ScaleBorder->GetValue() ? "yes" : "no");
25
 	count += SetInfoIfDifferent("ScaledBorderAndShadow", ScaleBorder->GetValue() ? "yes" : "no");
26
 	count += SetInfoIfDifferent("YCbCr Matrix", from_wx(YCbCrMatrix->GetValue()));
26
 
27
 
27
 	if (count) c->ass->Commit(_("property changes"), AssFile::COMMIT_SCRIPTINFO);
28
@@ -204,8 +213,8 @@
28
@@ -162,6 +171,6 @@
29
 }
29
 }
30
 
30
 
31
 void DialogProperties::OnSetFromVideo(wxCommandEvent &) {
31
 void DialogProperties::OnSetFromVideo(wxCommandEvent &) {
32
-	ResX->SetValue(std::to_wstring(c->videoController->GetWidth()));
32
-	ResX->SetValue(std::to_wstring(c->project->VideoProvider()->GetWidth()));
33
-	ResY->SetValue(std::to_wstring(c->videoController->GetHeight()));
33
-	ResY->SetValue(std::to_wstring(c->project->VideoProvider()->GetHeight()));
34
+	ResX->SetValue(TO_WSTRING(c->videoController->GetWidth()));
34
+	ResX->SetValue(TO_WSTRING(c->project->VideoProvider()->GetWidth()));
35
+	ResY->SetValue(TO_WSTRING(c->videoController->GetHeight()));
35
+	ResY->SetValue(TO_WSTRING(c->project->VideoProvider()->GetHeight()));
36
 }
36
 }
37
 }
38
 
(-)multimedia/aegisub/files/patch-src__dialog_shift_times.cpp (-10 / +10 lines)
Lines 1-6 Link Here
1
--- src/dialog_shift_times.cpp.orig
1
--- src/dialog_shift_times.cpp.orig	2014-07-28 23:29:16.000000000 +0900
2
+++ src/dialog_shift_times.cpp
2
+++ src/dialog_shift_times.cpp	2014-08-05 20:21:09.000000000 +0900
3
@@ -56,6 +56,13 @@
3
@@ -48,6 +48,13 @@
4
 #include <wx/sizer.h>
4
 #include <wx/sizer.h>
5
 #include <wx/textctrl.h>
5
 #include <wx/textctrl.h>
6
 
6
 
Lines 11-25 Link Here
11
+#define TO_WSTRING(x) boost::lexical_cast<std::wstring>(x)
11
+#define TO_WSTRING(x) boost::lexical_cast<std::wstring>(x)
12
+#endif
12
+#endif
13
+
13
+
14
 static wxString get_history_string(json::Object &obj) {
14
 namespace {
15
 	wxString filename = to_wx(obj["filename"]);
15
 class DialogShiftTimes final : public wxDialog {
16
 	if (filename.empty())
16
 	agi::Context *context;
17
@@ -87,7 +94,7 @@
17
@@ -118,7 +125,7 @@
18
 			int beg = (int64_t)(*it)["start"];
18
 			int beg = (int64_t)range["start"];
19
 			int end = (int64_t)(*it)["end"];
19
 			int end = (int64_t)range["end"];
20
 			if (beg == end)
20
 			if (beg == end)
21
-				lines += std::to_wstring(beg);
21
-				lines += std::to_wstring(beg);
22
+				lines += TO_WSTRING(beg);
22
+				lines += TO_WSTRING(beg);
23
 			else
23
 			else
24
 				lines += wxString::Format("%d-%d", beg, end);
24
 				lines += fmt_wx("%d-%d", beg, end);
25
 			if (it + 1 != sel.end())
25
 			if (it + 1 != sel.end())
(-)multimedia/aegisub/files/patch-src__dialog_style_editor.cpp (-6 / +15 lines)
Lines 1-7 Link Here
1
--- src/dialog_style_editor.cpp.orig
1
--- src/dialog_style_editor.cpp.orig	2014-07-28 23:29:16.000000000 +0900
2
+++ src/dialog_style_editor.cpp
2
+++ src/dialog_style_editor.cpp	2014-08-05 20:30:35.000000000 +0900
3
@@ -62,6 +62,13 @@
3
@@ -61,6 +61,13 @@
4
 #include <wx/sizer.h>
4
 #include <wx/spinctrl.h>
5
 #include <wx/stattext.h>
5
 #include <wx/stattext.h>
6
 
6
 
7
+#ifdef _LIBCPP_VERSION
7
+#ifdef _LIBCPP_VERSION
Lines 14-21 Link Here
14
 /// Style rename helper that walks a file searching for a style and optionally
14
 /// Style rename helper that walks a file searching for a style and optionally
15
 /// updating references to it
15
 /// updating references to it
16
 class StyleRenamer {
16
 class StyleRenamer {
17
@@ -160,7 +167,7 @@
17
@@ -166,7 +173,7 @@
18
 	SetIcon(GETICON(style_toolbutton_16));
18
 	};
19
 
19
 
20
 	// Prepare control values
20
 	// Prepare control values
21
-	wxString EncodingValue = std::to_wstring(style->encoding);
21
-	wxString EncodingValue = std::to_wstring(style->encoding);
Lines 23-25 Link Here
23
 	wxString alignValues[9] = { "7", "8", "9", "4", "5", "6", "1", "2", "3" };
23
 	wxString alignValues[9] = { "7", "8", "9", "4", "5", "6", "1", "2", "3" };
24
 
24
 
25
 	// Encoding options
25
 	// Encoding options
26
@@ -197,7 +204,7 @@
27
 		new ColourButton(this, wxSize(55, 16), true, style->shadow, ColorValidator(&work->shadow))
28
 	};
29
 	for (int i = 0; i < 3; i++)
30
-		margin[i] = new wxSpinCtrl(this, -1, std::to_wstring(style->Margin[i]),
31
+		margin[i] = new wxSpinCtrl(this, -1, TO_WSTRING(style->Margin[i]),
32
 		                           wxDefaultPosition, wxSize(60, -1),
33
 		                           wxSP_ARROW_KEYS, 0, 9999, style->Margin[i]);
34
 
(-)multimedia/aegisub/files/patch-src__dialog_video_properties.cpp (+38 lines)
Line 0 Link Here
1
--- src/dialog_video_properties.cpp	2014-07-28 23:29:16.000000000 +0900
2
+++ /home/jungle/dialog_video_properties.cpp	2014-08-05 20:35:18.000000000 +0900
3
@@ -27,6 +27,13 @@
4
 #include <wx/sizer.h>
5
 #include <wx/stattext.h>
6
 
7
+#ifdef _LIBCPP_VERSION
8
+#define TO_STRING(x) std::to_string(x)
9
+#else
10
+#include <boost/lexical_cast.hpp>
11
+#define TO_STRING(x) boost::lexical_cast<std::string>(x)
12
+#endif
13
+
14
 namespace {
15
 enum {
16
 	MISMATCH_IGNORE,
17
@@ -103,8 +110,8 @@
18
 	// If the script resolution hasn't been set at all just force it to the
19
 	// video resolution
20
 	if (sx == 0 && sy == 0) {
21
-		file->SetScriptInfo("PlayResX", std::to_string(vx));
22
-		file->SetScriptInfo("PlayResY", std::to_string(vy));
23
+		file->SetScriptInfo("PlayResX", TO_STRING(vx));
24
+		file->SetScriptInfo("PlayResY", TO_STRING(vy));
25
 		return true;
26
 	}
27
 
28
@@ -126,8 +133,8 @@
29
 		return commit_subs;
30
 
31
 	case MISMATCH_SET:
32
-		file->SetScriptInfo("PlayResX", std::to_string(vx));
33
-		file->SetScriptInfo("PlayResY", std::to_string(vy));
34
+		file->SetScriptInfo("PlayResX", TO_STRING(vx));
35
+		file->SetScriptInfo("PlayResY", TO_STRING(vy));
36
 		return true;
37
 
38
 	case MISMATCH_RESAMPLE:
(-)multimedia/aegisub/files/patch-src__grid_column.cpp (+103 lines)
Line 0 Link Here
1
--- src/grid_column.cpp.orig	2014-08-05 23:58:58.000000000 +0900
2
+++ src/grid_column.cpp	2014-08-06 00:01:32.000000000 +0900
3
@@ -27,6 +27,13 @@
4
 
5
 #include <wx/dc.h>
6
 
7
+#ifdef _LIBCPP_VERSION
8
+#define TO_WSTRING(x) std::to_wstring(x)
9
+#else
10
+#include <boost/lexical_cast.hpp>
11
+#define TO_WSTRING(x) boost::lexical_cast<std::wstring>(x)
12
+#endif
13
+
14
 int WidthHelper::operator()(boost::flyweight<std::string> const& str) {
15
 	if (str.get().empty()) return 0;
16
 	auto it = widths.find(str);
17
@@ -84,7 +91,7 @@
18
 	bool Centered() const override { return true; }
19
 
20
 	wxString Value(const AssDialogue *d, const agi::Context * = nullptr) const override {
21
-		return std::to_wstring(d->Row + 1);
22
+		return TO_WSTRING(d->Row + 1);
23
 	}
24
 
25
 	int Width(const agi::Context *c, WidthHelper &helper) const override {
26
@@ -108,12 +115,12 @@
27
 	bool Centered() const override { return true; }
28
 
29
 	wxString Value(const AssDialogue *d, const agi::Context *) const override {
30
-		return d->Layer ? wxString(std::to_wstring(d->Layer)) : wxString();
31
+		return d->Layer ? wxString(TO_WSTRING(d->Layer)) : wxString();
32
 	}
33
 
34
 	int Width(const agi::Context *c, WidthHelper &helper) const override {
35
 		int max_layer = max_value(&AssDialogue::Layer, c->ass->Events);
36
-		return max_layer == 0 ? 0 : helper(std::to_wstring(max_layer));
37
+		return max_layer == 0 ? 0 : helper(TO_WSTRING(max_layer));
38
 	}
39
 };
40
 
41
@@ -130,7 +137,7 @@
42
 
43
 	wxString Value(const AssDialogue *d, const agi::Context *c) const override {
44
 		if (by_frame)
45
-			return std::to_wstring(c->videoController->FrameAtTime(d->Start, agi::vfr::START));
46
+			return TO_WSTRING(c->videoController->FrameAtTime(d->Start, agi::vfr::START));
47
 		return to_wx(d->Start.GetAssFormatted());
48
 	}
49
 
50
@@ -138,7 +145,7 @@
51
 		if (!by_frame)
52
 			return helper(wxS("0:00:00.00"));
53
 		int frame = c->videoController->FrameAtTime(max_value(&AssDialogue::Start, c->ass->Events), agi::vfr::START);
54
-		return helper(std::to_wstring(frame));
55
+		return helper(TO_WSTRING(frame));
56
 	}
57
 };
58
 
59
@@ -148,7 +155,7 @@
60
 
61
 	wxString Value(const AssDialogue *d, const agi::Context *c) const override {
62
 		if (by_frame)
63
-			return std::to_wstring(c->videoController->FrameAtTime(d->End, agi::vfr::END));
64
+			return TO_WSTRING(c->videoController->FrameAtTime(d->End, agi::vfr::END));
65
 		return to_wx(d->End.GetAssFormatted());
66
 	}
67
 
68
@@ -156,7 +163,7 @@
69
 		if (!by_frame)
70
 			return helper(wxS("0:00:00.00"));
71
 		int frame = c->videoController->FrameAtTime(max_value(&AssDialogue::End, c->ass->Events), agi::vfr::END);
72
-		return helper(std::to_wstring(frame));
73
+		return helper(TO_WSTRING(frame));
74
 	}
75
 };
76
 
77
@@ -220,7 +227,7 @@
78
 	bool Centered() const override { return true; }
79
 
80
 	wxString Value(const AssDialogue *d, const agi::Context *) const override {
81
-		return d->Margin[Index] ? wxString(std::to_wstring(d->Margin[Index])) : wxString();
82
+		return d->Margin[Index] ? wxString(TO_WSTRING(d->Margin[Index])) : wxString();
83
 	}
84
 
85
 	int Width(const agi::Context *c, WidthHelper &helper) const override {
86
@@ -229,7 +236,7 @@
87
 			if (line.Margin[Index] > max)
88
 				max = line.Margin[Index];
89
 		}
90
-		return max == 0 ? 0 : helper(std::to_wstring(max));
91
+		return max == 0 ? 0 : helper(TO_WSTRING(max));
92
 	}
93
 };
94
 
95
@@ -296,7 +303,7 @@
96
 		int cps = CPS(d);
97
 		if (cps < 0 || cps > 100) return;
98
 
99
-		wxString str = std::to_wstring(cps);
100
+		wxString str = TO_WSTRING(cps);
101
 		wxSize ext = dc.GetTextExtent(str);
102
 		auto tc = dc.GetTextForeground();
103
 
(-)multimedia/aegisub/files/patch-src__main.cpp (-10 lines)
Lines 1-10 Link Here
1
--- src/main.cpp.orig
2
+++ src/main.cpp
3
@@ -69,6 +69,7 @@
4
 #include <boost/locale.hpp>
5
 #include <sstream>
6
 
7
+#include <wx/clipbrd.h>
8
 #include <wx/config.h>
9
 #include <wx/msgdlg.h>
10
 #include <wx/stackwalk.h>
(-)multimedia/aegisub/files/patch-src__preferences.cpp (+10 lines)
Line 0 Link Here
1
--- src/preferences.cpp.orig
2
+++ src/preferences.cpp
3
@@ -47,6 +47,7 @@
4
 
5
 #include <wx/checkbox.h>
6
 #include <wx/combobox.h>
7
+#include <wx/dc.h>
8
 #include <wx/event.h>
9
 #include <wx/listctrl.h>
10
 #include <wx/msgdlg.h>
(-)multimedia/aegisub/files/patch-src__preferences_base.cpp (-13 / +21 lines)
Lines 1-8 Link Here
1
--- src/preferences_base.cpp.orig
1
--- src/preferences_base.cpp.orig	2014-07-28 23:29:16.000000000 +0900
2
+++ src/preferences_base.cpp
2
+++ src/preferences_base.cpp	2014-08-05 07:56:10.000000000 +0900
3
@@ -42,6 +42,13 @@
3
@@ -40,6 +40,13 @@
4
 #include <wx/stattext.h>
4
 
5
 #include <wx/treebook.h>
5
 #undef Bool
6
 
6
 
7
+#ifdef _LIBCPP_VERSION
7
+#ifdef _LIBCPP_VERSION
8
+#define TO_WSTRING(x) std::to_wstring(x)
8
+#define TO_WSTRING(x) std::to_wstring(x)
Lines 14-34 Link Here
14
 #define OPTION_UPDATER(type, evttype, opt, body)                            \
14
 #define OPTION_UPDATER(type, evttype, opt, body)                            \
15
 	class type {                                                            \
15
 	class type {                                                            \
16
 		std::string name;                                                   \
16
 		std::string name;                                                   \
17
@@ -126,7 +133,7 @@
17
@@ -124,14 +131,14 @@
18
 		}
18
 		}
19
 
19
 
20
 		case agi::OptionValue::Type_Int: {
20
 		case agi::OptionType::Int: {
21
-			wxSpinCtrl *sc = new wxSpinCtrl(this, -1, std::to_wstring((int)opt->GetInt()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, min, max, opt->GetInt());
21
-			auto sc = new wxSpinCtrl(this, -1, std::to_wstring((int)opt->GetInt()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, min, max, opt->GetInt());
22
+			wxSpinCtrl *sc = new wxSpinCtrl(this, -1, TO_WSTRING((int)opt->GetInt()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, min, max, opt->GetInt());
22
+			auto sc = new wxSpinCtrl(this, -1, TO_WSTRING((int)opt->GetInt()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, min, max, opt->GetInt());
23
 			sc->Bind(wxEVT_SPINCTRL, IntUpdater(opt_name, parent));
23
 			sc->Bind(wxEVT_SPINCTRL, IntUpdater(opt_name, parent));
24
 			Add(flex, name, sc);
24
 			Add(flex, name, sc);
25
 			return sc;
25
 			return sc;
26
@@ -240,7 +247,7 @@
26
 		}
27
 
28
 		case agi::OptionType::Double: {
29
-			auto scd = new wxSpinCtrlDouble(this, -1, std::to_wstring(opt->GetDouble()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, min, max, opt->GetDouble(), inc);
30
+			auto scd = new wxSpinCtrlDouble(this, -1, TO_WSTRING(opt->GetDouble()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, min, max, opt->GetDouble(), inc);
31
 			scd->Bind(wxEVT_SPINCTRL, DoubleUpdater(opt_name, parent));
32
 			Add(flex, name, scd);
33
 			return scd;
34
@@ -238,7 +245,7 @@
27
 	font_name->SetMinSize(wxSize(160, -1));
35
 	font_name->SetMinSize(wxSize(160, -1));
28
 	font_name->Bind(wxEVT_TEXT, StringUpdater(face_opt->GetName().c_str(), parent));
36
 	font_name->Bind(wxEVT_TEXT, StringUpdater(face_opt->GetName().c_str(), parent));
29
 
37
 
30
-	wxSpinCtrl *font_size = new wxSpinCtrl(this, -1, std::to_wstring((int)size_opt->GetInt()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 3, 42, size_opt->GetInt());
38
-	auto font_size = new wxSpinCtrl(this, -1, std::to_wstring((int)size_opt->GetInt()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 3, 42, size_opt->GetInt());
31
+	wxSpinCtrl *font_size = new wxSpinCtrl(this, -1, TO_WSTRING((int)size_opt->GetInt()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 3, 42, size_opt->GetInt());
39
+	auto font_size = new wxSpinCtrl(this, -1, TO_WSTRING((int)size_opt->GetInt()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 3, 42, size_opt->GetInt());
32
 	font_size->Bind(wxEVT_SPINCTRL, IntUpdater(size_opt->GetName().c_str(), parent));
40
 	font_size->Bind(wxEVT_SPINCTRL, IntUpdater(size_opt->GetName().c_str(), parent));
33
 
41
 
34
 	wxButton *pick_btn = new wxButton(this, -1, _("Choose..."));
42
 	auto pick_btn = new wxButton(this, -1, _("Choose..."));
(-)multimedia/aegisub/files/patch-src__resolution_resampler.cpp (-15 / +12 lines)
Lines 1-11 Link Here
1
--- src/resolution_resampler.cpp.orig
1
--- src/resolution_resampler.cpp.orig	2014-07-28 23:29:16.000000000 +0900
2
+++ src/resolution_resampler.cpp
2
+++ src/resolution_resampler.cpp	2014-08-05 07:58:45.000000000 +0900
3
@@ -29,9 +29,15 @@
3
@@ -32,6 +32,13 @@
4
 
4
 #include <cmath>
5
 #include <algorithm>
5
 #include <wx/intl.h>
6
 #include <boost/algorithm/string/predicate.hpp>
7
-#include <boost/lexical_cast.hpp>
8
 #include <functional>
9
 
6
 
10
+#ifdef _LIBCPP_VERSION
7
+#ifdef _LIBCPP_VERSION
11
+#define TO_STRING(x) std::to_string(x)
8
+#define TO_STRING(x) std::to_string(x)
Lines 17-30 Link Here
17
 enum {
14
 enum {
18
 	LEFT = 0,
15
 	LEFT = 0,
19
 	RIGHT = 1,
16
 	RIGHT = 1,
20
@@ -175,8 +181,8 @@
17
@@ -281,8 +288,8 @@
21
 	for (auto& line : ass->Line)
18
 	for (auto& line : ass->Events)
22
 		resample_line(&state, line);
19
 		resample_line(&state, line);
23
 
20
 
24
-	ass->SetScriptInfo("PlayResX", std::to_string(settings.script_x));
21
-	ass->SetScriptInfo("PlayResX", std::to_string(settings.dest_x));
25
-	ass->SetScriptInfo("PlayResY", std::to_string(settings.script_y));
22
-	ass->SetScriptInfo("PlayResY", std::to_string(settings.dest_y));
26
+	ass->SetScriptInfo("PlayResX", TO_STRING(settings.script_x));
23
+	ass->SetScriptInfo("PlayResX", TO_STRING(settings.dest_x));
27
+	ass->SetScriptInfo("PlayResY", TO_STRING(settings.script_y));
24
+	ass->SetScriptInfo("PlayResY", TO_STRING(settings.dest_y));
25
 	ass->SetScriptInfo("YCbCr Matrix", MatrixToString(settings.dest_matrix));
28
 
26
 
29
 	ass->Commit(_("resolution resampling"), AssFile::COMMIT_SCRIPTINFO | AssFile::COMMIT_DIAG_FULL);
27
 	ass->Commit(_("resolution resampling"), AssFile::COMMIT_SCRIPTINFO | AssFile::COMMIT_DIAG_FULL);
30
 }
(-)multimedia/aegisub/files/patch-src__spline_curve.cpp (+10 lines)
Line 0 Link Here
1
--- src/spline_curve.cpp.orig	2014-08-06 00:07:08.000000000 +0900
2
+++ src/spline_curve.cpp	2014-08-06 00:07:27.000000000 +0900
3
@@ -35,6 +35,7 @@
4
 #include "spline_curve.h"
5
 #include "utils.h"
6
 
7
+#include <algorithm>
8
 #include <limits>
9
 
10
 SplineCurve::SplineCurve(Vector2D p1) : p1(p1), type(POINT) { }
(-)multimedia/aegisub/files/patch-src__subs_edit_box.cpp (-8 / +17 lines)
Lines 1-6 Link Here
1
--- src/subs_edit_box.cpp.orig
1
--- src/subs_edit_box.cpp.orig	2014-07-28 23:29:16.000000000 +0900
2
+++ src/subs_edit_box.cpp
2
+++ src/subs_edit_box.cpp	2014-08-06 00:09:49.000000000 +0900
3
@@ -71,6 +71,13 @@
3
@@ -69,6 +69,13 @@
4
 #include <wx/sizer.h>
4
 #include <wx/sizer.h>
5
 #include <wx/spinctrl.h>
5
 #include <wx/spinctrl.h>
6
 
6
 
Lines 11-20 Link Here
11
+#define TO_WSTRING(x) boost::lexical_cast<std::wstring>(x)
11
+#define TO_WSTRING(x) boost::lexical_cast<std::wstring>(x)
12
+#endif
12
+#endif
13
+
13
+
14
 namespace {
14
 namespace std {
15
 
15
 	template <typename T>
16
 /// Work around wxGTK's fondness for generating events from ChangeValue
16
 	struct hash<boost::flyweight<T>> {
17
@@ -324,7 +331,7 @@
17
@@ -354,7 +361,7 @@
18
 	if (type & AssFile::COMMIT_DIAG_META) {
18
 	if (type & AssFile::COMMIT_DIAG_META) {
19
 		layer->SetValue(line->Layer);
19
 		layer->SetValue(line->Layer);
20
 		for (size_t i = 0; i < margin.size(); ++i)
20
 		for (size_t i = 0; i < margin.size(); ++i)
Lines 22-25 Link Here
22
+			change_value(margin[i], TO_WSTRING(line->Margin[i]));
22
+			change_value(margin[i], TO_WSTRING(line->Margin[i]));
23
 		comment_box->SetValue(line->Comment);
23
 		comment_box->SetValue(line->Comment);
24
 		style_box->Select(style_box->FindString(to_wx(line->Style)));
24
 		style_box->Select(style_box->FindString(to_wx(line->Style)));
25
 
25
 		active_style = line ? c->ass->GetStyle(line->Style) : nullptr;
26
@@ -623,7 +630,7 @@
27
 	if (OPT_GET("Subtitle/Character Counter/Ignore Punctuation")->GetBool())
28
 		ignore |= agi::IGNORE_PUNCTUATION;
29
 	size_t length = agi::MaxLineLength(text, ignore);
30
-	char_count->SetValue(std::to_wstring(length));
31
+	char_count->SetValue(TO_WSTRING(length));
32
 	size_t limit = (size_t)OPT_GET("Subtitle/Character Limit")->GetInt();
33
 	if (limit && length > limit)
34
 		char_count->SetBackgroundColour(to_wx(OPT_GET("Colour/Subtitle/Syntax/Background/Error")->GetColor()));
(-)multimedia/aegisub/files/patch-src__subtitle_format_ass.cpp (+34 lines)
Line 0 Link Here
1
--- src/subtitle_format_ass.cpp.orig	2014-08-05 23:16:03.000000000 +0900
2
+++ src/subtitle_format_ass.cpp	2014-08-05 23:18:02.000000000 +0900
3
@@ -31,6 +31,13 @@
4
 #include <libaegisub/ass/uuencode.h>
5
 #include <libaegisub/fs.h>
6
 
7
+#ifdef _LIBCPP_VERSION
8
+#define TO_STRING(x) std::to_string(x)
9
+#else
10
+#include <boost/lexical_cast.hpp>
11
+#define TO_STRING(x) boost::lexical_cast<std::string>(x)
12
+#endif
13
+
14
 DEFINE_EXCEPTION(AssParseError, SubtitleFormatParseError);
15
 
16
 void AssSubtitleFormat::ReadFile(AssFile *target, agi::fs::path const& filename, agi::vfr::Framerate const& fps, std::string const& encoding) const {
17
@@ -119,7 +126,7 @@
18
 	template<typename Number>
19
 	void WriteIfNotZero(const char *key, Number n) {
20
 		if (n != Number{})
21
-			file.WriteLineToFile(key + std::to_string(n));
22
+			file.WriteLineToFile(key + TO_STRING(n));
23
 	}
24
 
25
 	void WriteExtradata(AegisubExtradataMap const& extradata) {
26
@@ -131,7 +138,7 @@
27
 		file.WriteLineToFile("[Aegisub Extradata]");
28
 		for (auto const& edi : extradata) {
29
 			std::string line = "Data: ";
30
-			line += std::to_string(edi.first);
31
+			line += TO_STRING(edi.first);
32
 			line += ",";
33
 			line += inline_string_encode(edi.second.first);
34
 			line += ",";
(-)multimedia/aegisub/files/patch-src__subtitle_format_srt.cpp (-9 / +9 lines)
Lines 1-8 Link Here
1
--- src/subtitle_format_srt.cpp.orig
1
--- src/subtitle_format_srt.cpp.orig	2014-07-28 23:29:16.000000000 +0900
2
+++ src/subtitle_format_srt.cpp
2
+++ src/subtitle_format_srt.cpp	2014-08-05 08:01:33.000000000 +0900
3
@@ -54,6 +54,13 @@
3
@@ -50,6 +50,13 @@
4
 #include <boost/algorithm/string/trim.hpp>
4
 #include <boost/regex.hpp>
5
 #include <boost/regex.hpp>
5
 #include <map>
6
 
6
 
7
+#ifdef _LIBCPP_VERSION
7
+#ifdef _LIBCPP_VERSION
8
+#define TO_STRING(x) std::to_string(x)
8
+#define TO_STRING(x) std::to_string(x)
Lines 11-25 Link Here
11
+#define TO_STRING(x) boost::lexical_cast<std::string>(x)
11
+#define TO_STRING(x) boost::lexical_cast<std::string>(x)
12
+#endif
12
+#endif
13
+
13
+
14
 DEFINE_SIMPLE_EXCEPTION(SRTParseError, SubtitleFormatParseError, "subtitle_io/parse/srt")
14
 DEFINE_EXCEPTION(SRTParseError, SubtitleFormatParseError);
15
 
15
 
16
 namespace {
16
 namespace {
17
@@ -481,7 +488,7 @@
17
@@ -435,7 +442,7 @@
18
 	// Write lines
18
 	// Write lines
19
 	int i=0;
19
 	int i=0;
20
 	for (auto current : copy.Line | agi::of_type<AssDialogue>()) {
20
 	for (auto const& current : copy.Events) {
21
-		file.WriteLineToFile(std::to_string(++i));
21
-		file.WriteLineToFile(std::to_string(++i));
22
+		file.WriteLineToFile(TO_STRING(++i));
22
+		file.WriteLineToFile(TO_STRING(++i));
23
 		file.WriteLineToFile(WriteSRTTime(current->Start) + " --> " + WriteSRTTime(current->End));
23
 		file.WriteLineToFile(WriteSRTTime(current.Start) + " --> " + WriteSRTTime(current.End));
24
 		file.WriteLineToFile(ConvertTags(current));
24
 		file.WriteLineToFile(ConvertTags(&current));
25
 		file.WriteLineToFile("");
25
 		file.WriteLineToFile("");
(-)multimedia/aegisub/files/patch-src__timeedit_ctrl.cpp (-7 / +7 lines)
Lines 1-6 Link Here
1
--- src/timeedit_ctrl.cpp.orig
1
--- src/timeedit_ctrl.cpp.orig	2014-07-28 23:29:16.000000000 +0900
2
+++ src/timeedit_ctrl.cpp
2
+++ src/timeedit_ctrl.cpp	2014-08-05 08:03:02.000000000 +0900
3
@@ -52,6 +52,13 @@
3
@@ -48,6 +48,13 @@
4
 
4
 
5
 #define TimeEditWindowStyle
5
 #define TimeEditWindowStyle
6
 
6
 
Lines 14-25 Link Here
14
 enum {
14
 enum {
15
 	Time_Edit_Copy = 1320,
15
 	Time_Edit_Copy = 1320,
16
 	Time_Edit_Paste
16
 	Time_Edit_Paste
17
@@ -117,7 +124,7 @@
17
@@ -113,7 +120,7 @@
18
 
18
 
19
 void TimeEdit::UpdateText() {
19
 void TimeEdit::UpdateText() {
20
 	if (byFrame)
20
 	if (byFrame)
21
-		ChangeValue(std::to_wstring(c->videoController->FrameAtTime(time, isEnd ? agi::vfr::END : agi::vfr::START)));
21
-		ChangeValue(std::to_wstring(c->project->Timecodes().FrameAtTime(time, isEnd ? agi::vfr::END : agi::vfr::START)));
22
+		ChangeValue(TO_WSTRING(c->videoController->FrameAtTime(time, isEnd ? agi::vfr::END : agi::vfr::START)));
22
+		ChangeValue(TO_WSTRING(c->project->Timecodes().FrameAtTime(time, isEnd ? agi::vfr::END : agi::vfr::START)));
23
 	else
23
 	else
24
 		ChangeValue(to_wx(time.GetAssFormated()));
24
 		ChangeValue(to_wx(time.GetAssFormatted()));
25
 }
25
 }
(-)multimedia/aegisub/files/patch-src__validators.cpp (-5 / +14 lines)
Lines 1-7 Link Here
1
--- src/validators.cpp.orig
1
--- src/validators.cpp.orig	2014-07-28 23:29:16.000000000 +0900
2
+++ src/validators.cpp
2
+++ src/validators.cpp	2014-08-06 00:12:26.000000000 +0900
3
@@ -27,6 +27,13 @@
3
@@ -25,6 +25,13 @@
4
 #include <wx/combobox.h>
4
 #include <wx/spinctrl.h>
5
 #include <wx/textctrl.h>
5
 #include <wx/textctrl.h>
6
 
6
 
7
+#ifdef _LIBCPP_VERSION
7
+#ifdef _LIBCPP_VERSION
Lines 14-20 Link Here
14
 namespace {
14
 namespace {
15
 std::string new_value(wxTextCtrl *ctrl, int chr) {
15
 std::string new_value(wxTextCtrl *ctrl, int chr) {
16
 	long from, to;
16
 	long from, to;
17
@@ -57,7 +64,7 @@
17
@@ -55,7 +62,7 @@
18
 }
18
 }
19
 
19
 
20
 bool IntValidator::TransferToWindow() {
20
 bool IntValidator::TransferToWindow() {
Lines 23-25 Link Here
23
 	return true;
23
 	return true;
24
 }
24
 }
25
 
25
 
26
@@ -132,7 +139,7 @@
27
 }
28
 
29
 bool DoubleValidator::TransferToWindow() {
30
-	auto str = std::to_wstring(*value);
31
+	auto str = TO_WSTRING(*value);
32
 	if (decimal_sep != '.')
33
 		std::replace(str.begin(), str.end(), L'.', decimal_sep);
34
 	if (str.find(decimal_sep) != str.npos) {
(-)multimedia/aegisub/files/patch-src__video_context.cpp (-58 lines)
Lines 1-58 Link Here
1
--- src/video_context.cpp.orig
2
+++ src/video_context.cpp
3
@@ -58,6 +58,13 @@
4
 
5
 #include <wx/msgdlg.h>
6
 
7
+#ifdef _LIBCPP_VERSION
8
+#define TO_STRING(x) std::to_string(x)
9
+#else
10
+#include <boost/lexical_cast.hpp>
11
+#define TO_STRING(x) boost::lexical_cast<std::string>(x)
12
+#endif
13
+
14
 VideoContext::VideoContext()
15
 : playback(this)
16
 , playAudioOnStep(OPT_GET("Audio/Plays When Stepping Video"))
17
@@ -135,8 +142,8 @@
18
 		// If the script resolution hasn't been set at all just force it to the
19
 		// video resolution
20
 		if (sx == 0 && sy == 0) {
21
-			context->ass->SetScriptInfo("PlayResX", std::to_string(vx));
22
-			context->ass->SetScriptInfo("PlayResY", std::to_string(vy));
23
+			context->ass->SetScriptInfo("PlayResX", TO_STRING(vx));
24
+			context->ass->SetScriptInfo("PlayResY", TO_STRING(vy));
25
 			commit_subs = true;
26
 		}
27
 		// If it has been set to something other than a multiple of the video
28
@@ -153,8 +160,8 @@
29
 					break;
30
 				// Fallthrough to case 2
31
 			case 2: // Always change script res
32
-				context->ass->SetScriptInfo("PlayResX", std::to_string(vx));
33
-				context->ass->SetScriptInfo("PlayResY", std::to_string(vy));
34
+				context->ass->SetScriptInfo("PlayResX", TO_STRING(vx));
35
+				context->ass->SetScriptInfo("PlayResY", TO_STRING(vy));
36
 				commit_subs = true;
37
 				break;
38
 			default: // Never change
39
@@ -248,16 +255,16 @@
40
 
41
 	std::string ar;
42
 	if (ar_type == AspectRatio::Custom)
43
-		ar = "c" + std::to_string(ar_value);
44
+		ar = "c" + TO_STRING(ar_value);
45
 	else
46
-		ar = std::to_string((int)ar_type);
47
+		ar = TO_STRING((int)ar_type);
48
 
49
 	context->ass->SetScriptInfo("Video File", config::path->MakeRelative(video_filename, "?script").generic_string());
50
 	auto matrix = video_provider->GetColorSpace();
51
 	if (!matrix.empty())
52
 		context->ass->SetScriptInfo("YCbCr Matrix", matrix);
53
 	context->ass->SaveUIState("Video Aspect Ratio", ar);
54
-	context->ass->SaveUIState("Video Position", std::to_string(frame_n));
55
+	context->ass->SaveUIState("Video Position", TO_STRING(frame_n));
56
 }
57
 
58
 void VideoContext::JumpToFrame(int n) {
(-)multimedia/aegisub/files/patch-src__video_display.cpp (-23 lines)
Lines 1-23 Link Here
1
--- src/video_display.cpp.orig
2
+++ src/video_display.cpp
3
@@ -69,6 +69,13 @@
4
 #include <GL/gl.h>
5
 #endif
6
 
7
+#ifdef _LIBCPP_VERSION
8
+#define TO_STRING(x) std::to_string(x)
9
+#else
10
+#include <boost/lexical_cast.hpp>
11
+#define TO_STRING(x) boost::lexical_cast<std::string>(x)
12
+#endif
13
+
14
 /// Attribute list for gl canvases; set the canvases to doublebuffered rgba with an 8 bit stencil buffer
15
 int attribList[] = { WX_GL_RGBA , WX_GL_DOUBLEBUFFER, WX_GL_STENCIL_SIZE, 8, 0 };
16
 
17
@@ -439,5 +446,5 @@
18
 }
19
 
20
 void VideoDisplay::OnSubtitlesSave() {
21
-	con->ass->SaveUIState("Video Zoom Percent", std::to_string(zoomValue));
22
+	con->ass->SaveUIState("Video Zoom Percent", TO_STRING(zoomValue));
23
 }
(-)multimedia/aegisub/files/patch-src__video_provider_yuv4mpeg.cpp (-34 lines)
Lines 1-34 Link Here
1
--- src/video_provider_yuv4mpeg.cpp.orig
2
+++ src/video_provider_yuv4mpeg.cpp
3
@@ -47,6 +47,13 @@
4
 #include <boost/algorithm/string/case_conv.hpp>
5
 #include <boost/filesystem/path.hpp>
6
 
7
+#ifdef _LIBCPP_VERSION
8
+#define TO_STRING(x) std::to_string(x)
9
+#else
10
+#include <boost/lexical_cast.hpp>
11
+#define TO_STRING(x) boost::lexical_cast<std::string>(x)
12
+#endif
13
+
14
 // All of this cstdio bogus is because of one reason and one reason only:
15
 // MICROSOFT'S IMPLEMENTATION OF STD::FSTREAM DOES NOT SUPPORT FILES LARGER THAN 2 GB.
16
 // (yes, really)
17
@@ -141,7 +148,7 @@
18
 	int buf;
19
 
20
 	if (fseeko(sf, startpos, SEEK_SET))
21
-		throw VideoOpenError("YUV4MPEG video provider: ReadHeader: failed seeking to position " + std::to_string(startpos));
22
+		throw VideoOpenError("YUV4MPEG video provider: ReadHeader: failed seeking to position " + TO_STRING(startpos));
23
 
24
 	// read header until terminating newline (0x0A) is found
25
 	while ((buf = fgetc(sf)) != 0x0A) {
26
@@ -317,7 +324,7 @@
27
 			seek_table.push_back(curpos);
28
 			// seek to next frame header start position
29
 			if (fseeko(sf, frame_sz, SEEK_CUR))
30
-				throw VideoOpenError("IndexFile: failed seeking to position " + std::to_string(curpos + frame_sz));
31
+				throw VideoOpenError("IndexFile: failed seeking to position " + TO_STRING(curpos + frame_sz));
32
 		}
33
 		else {
34
 			/// @todo implement rff flags etc
(-)multimedia/aegisub/pkg-plist (-29 / +29 lines)
Lines 1-5 Link Here
1
bin/aegisub-%%VERSION%%
1
bin/aegisub-%%VERSION%%
2
%%DATADIR%%/automation/autoload/clean-info.lua
3
%%DATADIR%%/automation/autoload/cleantags-autoload.lua
2
%%DATADIR%%/automation/autoload/cleantags-autoload.lua
4
%%DATADIR%%/automation/autoload/kara-templater.lua
3
%%DATADIR%%/automation/autoload/kara-templater.lua
5
%%DATADIR%%/automation/autoload/karaoke-auto-leadin.lua
4
%%DATADIR%%/automation/autoload/karaoke-auto-leadin.lua
Lines 9-14 Link Here
9
%%DATADIR%%/automation/autoload/strip-tags.lua
8
%%DATADIR%%/automation/autoload/strip-tags.lua
10
%%DATADIR%%/automation/demos/future-windy-blur.lua
9
%%DATADIR%%/automation/demos/future-windy-blur.lua
11
%%DATADIR%%/automation/demos/raytracer.lua
10
%%DATADIR%%/automation/demos/raytracer.lua
11
%%DATADIR%%/automation/demos/raytracer-test1.ass
12
%%DATADIR%%/automation/include/aegisub/clipboard.lua
12
%%DATADIR%%/automation/include/aegisub/clipboard.lua
13
%%DATADIR%%/automation/include/aegisub/re.moon
13
%%DATADIR%%/automation/include/aegisub/re.moon
14
%%DATADIR%%/automation/include/aegisub/unicode.moon
14
%%DATADIR%%/automation/include/aegisub/unicode.moon
Lines 38-71 Link Here
38
share/icons/hicolor/48x48/apps/aegisub.png
38
share/icons/hicolor/48x48/apps/aegisub.png
39
share/icons/hicolor/64x64/apps/aegisub.png
39
share/icons/hicolor/64x64/apps/aegisub.png
40
share/icons/hicolor/scalable/apps/aegisub.svg
40
share/icons/hicolor/scalable/apps/aegisub.svg
41
share/locale/ar/LC_MESSAGES/aegisub-31.mo
41
share/locale/ar/LC_MESSAGES/aegisub-32.mo
42
share/locale/bg/LC_MESSAGES/aegisub-31.mo
42
share/locale/bg/LC_MESSAGES/aegisub-32.mo
43
share/locale/ca/LC_MESSAGES/aegisub-31.mo
43
share/locale/ca/LC_MESSAGES/aegisub-32.mo
44
share/locale/cs/LC_MESSAGES/aegisub-31.mo
44
share/locale/cs/LC_MESSAGES/aegisub-32.mo
45
share/locale/da/LC_MESSAGES/aegisub-31.mo
45
share/locale/da/LC_MESSAGES/aegisub-32.mo
46
share/locale/de/LC_MESSAGES/aegisub-31.mo
46
share/locale/de/LC_MESSAGES/aegisub-32.mo
47
share/locale/el/LC_MESSAGES/aegisub-31.mo
47
share/locale/el/LC_MESSAGES/aegisub-32.mo
48
share/locale/es/LC_MESSAGES/aegisub-31.mo
48
share/locale/es/LC_MESSAGES/aegisub-32.mo
49
share/locale/eu/LC_MESSAGES/aegisub-31.mo
49
share/locale/eu/LC_MESSAGES/aegisub-32.mo
50
share/locale/fa/LC_MESSAGES/aegisub-31.mo
50
share/locale/fa/LC_MESSAGES/aegisub-32.mo
51
share/locale/fi/LC_MESSAGES/aegisub-31.mo
51
share/locale/fi/LC_MESSAGES/aegisub-32.mo
52
share/locale/fr_FR/LC_MESSAGES/aegisub-31.mo
52
share/locale/fr_FR/LC_MESSAGES/aegisub-32.mo
53
share/locale/gl/LC_MESSAGES/aegisub-31.mo
53
share/locale/gl/LC_MESSAGES/aegisub-32.mo
54
share/locale/hu/LC_MESSAGES/aegisub-31.mo
54
share/locale/hu/LC_MESSAGES/aegisub-32.mo
55
share/locale/id/LC_MESSAGES/aegisub-31.mo
55
share/locale/id/LC_MESSAGES/aegisub-32.mo
56
share/locale/it/LC_MESSAGES/aegisub-31.mo
56
share/locale/it/LC_MESSAGES/aegisub-32.mo
57
share/locale/ja/LC_MESSAGES/aegisub-31.mo
57
share/locale/ja/LC_MESSAGES/aegisub-32.mo
58
share/locale/ko/LC_MESSAGES/aegisub-31.mo
58
share/locale/ko/LC_MESSAGES/aegisub-32.mo
59
share/locale/nl/LC_MESSAGES/aegisub-31.mo
59
share/locale/nl/LC_MESSAGES/aegisub-32.mo
60
share/locale/pl/LC_MESSAGES/aegisub-31.mo
60
share/locale/pl/LC_MESSAGES/aegisub-32.mo
61
share/locale/pt_BR/LC_MESSAGES/aegisub-31.mo
61
share/locale/pt_BR/LC_MESSAGES/aegisub-32.mo
62
share/locale/pt_PT/LC_MESSAGES/aegisub-31.mo
62
share/locale/pt_PT/LC_MESSAGES/aegisub-32.mo
63
share/locale/ru/LC_MESSAGES/aegisub-31.mo
63
share/locale/ru/LC_MESSAGES/aegisub-32.mo
64
share/locale/sr_RS/LC_MESSAGES/aegisub-31.mo
64
share/locale/sr_RS/LC_MESSAGES/aegisub-32.mo
65
share/locale/sr_RS@latin/LC_MESSAGES/aegisub-31.mo
65
share/locale/sr_RS@latin/LC_MESSAGES/aegisub-32.mo
66
share/locale/vi/LC_MESSAGES/aegisub-31.mo
66
share/locale/vi/LC_MESSAGES/aegisub-32.mo
67
share/locale/zh_CN/LC_MESSAGES/aegisub-31.mo
67
share/locale/zh_CN/LC_MESSAGES/aegisub-32.mo
68
share/locale/zh_TW/LC_MESSAGES/aegisub-31.mo
68
share/locale/zh_TW/LC_MESSAGES/aegisub-32.mo
69
@dirrmtry share/locale/sr_RS@latin/LC_MESSAGES
69
@dirrmtry share/locale/sr_RS@latin/LC_MESSAGES
70
@dirrmtry share/locale/sr_RS@latin
70
@dirrmtry share/locale/sr_RS@latin
71
@dirrmtry share/locale/sr_RS/LC_MESSAGES
71
@dirrmtry share/locale/sr_RS/LC_MESSAGES

Return to bug 192479