[arch-commits] Commit in aegisub/trunk (PKGBUILD boost-1.68.patch)

Evangelos Foutras foutrelis at archlinux.org
Tue Sep 18 02:45:15 UTC 2018


    Date: Tuesday, September 18, 2018 @ 02:45:15
  Author: foutrelis
Revision: 382865

Fix build with boost 1.68

Added:
  aegisub/trunk/boost-1.68.patch
Modified:
  aegisub/trunk/PKGBUILD

------------------+
 PKGBUILD         |    3 +++
 boost-1.68.patch |   34 ++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-09-18 02:34:42 UTC (rev 382864)
+++ PKGBUILD	2018-09-18 02:45:15 UTC (rev 382865)
@@ -14,13 +14,16 @@
          'libass.so' 'libffms2.so')
 makedepends=('boost' 'intltool' 'mesa')
 source=("http://ftp.aegisub.org/pub/archives/releases/source/aegisub-${pkgver}.tar.xz"
+        'boost-1.68.patch'
         'icu59.patch')
 sha256sums=('c55e33945b82d8513c02ea6e782f0d72c726adcd3707e95b8c0022f6151e6885'
+            'aa1689a2204f6a617000f3380b8dea9c3dca4f500d0643e05172750c49cc5a21'
             '29d8cc91e73602d5e3c8517c977dcc77cb84af7d42787f510d487d0a6abf7fa6')
 
 prepare() {
   cd aegisub-${pkgver}
 
+  patch -Np1 -i ../boost-1.68.patch
   patch -Np1 -i ../icu59.patch
 
   sed 's/$(LIBS_BOOST) $(LIBS_ICU)/$(LIBS_BOOST) $(LIBS_ICU) -pthread/' -i tools/Makefile

Added: boost-1.68.patch
===================================================================
--- boost-1.68.patch	                        (rev 0)
+++ boost-1.68.patch	2018-09-18 02:45:15 UTC (rev 382865)
@@ -0,0 +1,34 @@
+From d8336d2fed73c72d1227b343d6acfb991bc1651b Mon Sep 17 00:00:00 2001
+From: Jan Beich <jbeich at 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);



More information about the arch-commits mailing list