diff options
author | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-02-18 19:21:30 +0100 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2021-04-17 23:06:19 -0500 |
commit | 9bb325293fb1b03112adc5ad294ac427b507732c (patch) | |
tree | 5d4ff51d5eb0dfa05a3d8bb1bb57f16e9cd7d0ae | |
parent | d61d744e2075f3211a550bb4c2261bdf074d1c27 (diff) | |
download | slackbuilds-9bb325293fb1b03112adc5ad294ac427b507732c.tar.gz |
multimedia/aegisub: Fix build with the newer boost, icu4c and make.
Thanks to KG Hammarlund for pointing at the make patch
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r-- | multimedia/aegisub/aegisub.SlackBuild | 5 | ||||
-rw-r--r-- | multimedia/aegisub/patches/boost.patch | 34 | ||||
-rw-r--r-- | multimedia/aegisub/patches/icu.patch | 11 | ||||
-rw-r--r-- | multimedia/aegisub/patches/make-4.3.patch | 23 |
4 files changed, 72 insertions, 1 deletions
diff --git a/multimedia/aegisub/aegisub.SlackBuild b/multimedia/aegisub/aegisub.SlackBuild index 0bdf6b18bb..cc3600c6c8 100644 --- a/multimedia/aegisub/aegisub.SlackBuild +++ b/multimedia/aegisub/aegisub.SlackBuild @@ -69,10 +69,13 @@ 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 +for i in $CWD/patches/* ; do patch -p1 < $i ; done +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 LDFLAGS="$LDFLAGS -lz" \ CFLAGS="$SLKCFLAGS" \ +CPPFLAGS+=' -DU_USING_ICU_NAMESPACE=1' \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ diff --git a/multimedia/aegisub/patches/boost.patch b/multimedia/aegisub/patches/boost.patch new file mode 100644 index 0000000000..5d917f607e --- /dev/null +++ b/multimedia/aegisub/patches/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/patches/icu.patch b/multimedia/aegisub/patches/icu.patch new file mode 100644 index 0000000000..2145140ed0 --- /dev/null +++ b/multimedia/aegisub/patches/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> diff --git a/multimedia/aegisub/patches/make-4.3.patch b/multimedia/aegisub/patches/make-4.3.patch new file mode 100644 index 0000000000..6edb8c3b5e --- /dev/null +++ b/multimedia/aegisub/patches/make-4.3.patch @@ -0,0 +1,23 @@ +From f4cc905c69ca69c68cb95674cefce4abc37ce046 Mon Sep 17 00:00:00 2001 +From: wangqr <wangqr@wangqr.tk> +Date: Mon, 17 Feb 2020 14:42:07 +0800 +Subject: [PATCH] Use target name without directory in $*_OBJ macro + +Fix Aegisub/Aegisub#171 +--- + Makefile.target | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.target b/Makefile.target +index 516ef3c24..5c4c5d259 100644 +--- a/Makefile.target ++++ b/Makefile.target +@@ -112,7 +112,7 @@ POST_FLAGS = $($@_FLAGS) -c -o $@ $< + # Libraries contain all object files they depend on (but they may depend on other files) + # Not using libtool on OS X because it has an unsilenceable warning about a + # compatibility issue with BSD 4.3 (wtf) +-lib%.a: $$($$*_OBJ) ++lib%.a: $$($$(*F)_OBJ) + @$(BIN_MKDIR_P) $(dir $@) + $(BIN_AR) cru $@ $(filter %.o,$^) + $(BIN_RANLIB) $@ |