summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Willy Sudiarto Raharjo2019-04-16 16:05:09 +0200
committer Matteo Bernardini2019-08-18 07:46:26 +0200
commit7873927a68a13f6b80bd8d9bd55b072b775b1a26 (patch)
tree202465c2a448ab3f1f21ecd0b72791bf34d17a13
parentd04189e642ca17186cb9b2b5899fa9c12aceb782 (diff)
downloadslackbuilds-aegisub.tar.gz
multimedia/aegisub: Fix build with newer boost and icu4c.aegisub
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--multimedia/aegisub/aegisub.SlackBuild8
-rw-r--r--multimedia/aegisub/boost.patch34
-rw-r--r--multimedia/aegisub/icu.patch11
3 files changed, 52 insertions, 1 deletions
diff --git a/multimedia/aegisub/aegisub.SlackBuild b/multimedia/aegisub/aegisub.SlackBuild
index 0bdf6b18bb..e6f616dba4 100644
--- a/multimedia/aegisub/aegisub.SlackBuild
+++ b/multimedia/aegisub/aegisub.SlackBuild
@@ -69,10 +69,16 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-sed 's/$(LIBS_BOOST) $(LIBS_ICU)/$(LIBS_BOOST) $(LIBS_ICU) -pthread/' -i tools/Makefile
+patch -Np1 < $CWD/boost.patch
+sed 's|gil/gil_all.hpp|gil.hpp|g' -i src/*.cpp # boost 1.69
+sed 's/$(LIBS_BOOST) $(LIBS_ICU)/$(LIBS_BOOST) $(LIBS_ICU) -pthread/' -i tools/Makefile # missing link flag
+patch -Np1 < $CWD/icu.patch
+
+./autogen.sh
LDFLAGS="$LDFLAGS -lz" \
CFLAGS="$SLKCFLAGS" \
+CPPFLAGS+=' -DU_USING_ICU_NAMESPACE=1' \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
diff --git a/multimedia/aegisub/boost.patch b/multimedia/aegisub/boost.patch
new file mode 100644
index 0000000000..5d917f607e
--- /dev/null
+++ b/multimedia/aegisub/boost.patch
@@ -0,0 +1,34 @@
+From d8336d2fed73c72d1227b343d6acfb991bc1651b Mon Sep 17 00:00:00 2001
+From: Jan Beich <jbeich@FreeBSD.org>
+Date: Mon, 9 Jul 2018 20:15:29 +0000
+Subject: [PATCH] Keep using std::distance after Boost 1.68
+
+src/search_replace_engine.cpp:256:14: error: call to
+ 'distance' is ambiguous
+ count += distance(
+ ^~~~~~~~
+/usr/include/c++/v1/iterator:511:1: note: candidate function [with _InputIter =
+ boost::u32regex_iterator<std::__1::__wrap_iter<const char *> >]
+distance(_InputIter __first, _InputIter __last)
+^
+/usr/local/include/boost/iterator/distance.hpp:49:9: note: candidate function [with SinglePassIterator =
+ boost::u32regex_iterator<std::__1::__wrap_iter<const char *> >]
+ distance(SinglePassIterator first, SinglePassIterator last)
+ ^
+---
+ src/search_replace_engine.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/search_replace_engine.cpp b/src/search_replace_engine.cpp
+index 594c21e5e..14c71680d 100644
+--- a/src/search_replace_engine.cpp
++++ b/src/search_replace_engine.cpp
+@@ -253,7 +253,7 @@ bool SearchReplaceEngine::ReplaceAll() {
+ if (MatchState ms = matches(&diag, 0)) {
+ auto& diag_field = diag.*get_dialogue_field(settings.field);
+ std::string const& text = diag_field.get();
+- count += distance(
++ count += std::distance(
+ boost::u32regex_iterator<std::string::const_iterator>(begin(text), end(text), *ms.re),
+ boost::u32regex_iterator<std::string::const_iterator>());
+ diag_field = u32regex_replace(text, *ms.re, settings.replace_with);
diff --git a/multimedia/aegisub/icu.patch b/multimedia/aegisub/icu.patch
new file mode 100644
index 0000000000..2145140ed0
--- /dev/null
+++ b/multimedia/aegisub/icu.patch
@@ -0,0 +1,11 @@
+diff -upr aegisub-3.2.2.orig/src/utils.cpp aegisub-3.2.2/src/utils.cpp
+--- aegisub-3.2.2.orig/src/utils.cpp 2014-12-08 02:07:09.000000000 +0200
++++ aegisub-3.2.2/src/utils.cpp 2017-04-26 11:11:15.438239182 +0300
+@@ -44,6 +44,7 @@
+ #include <boost/filesystem/path.hpp>
+ #include <map>
+ #include <unicode/locid.h>
++#include <unicode/unistr.h>
+ #include <wx/clipbrd.h>
+ #include <wx/filedlg.h>
+ #include <wx/stdpaths.h>