diff options
author | B. Watson <yalhcru@gmail.com> | 2022-02-15 14:14:08 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-02-16 08:20:08 +0700 |
commit | 2d5f3fb75ce6237960dd4dfcdf07cf225ad5bf21 (patch) | |
tree | 0bcfe297f4f7d974dce26dc744d6810810f9cce1 /multimedia/bombono-dvd | |
parent | 98a8bbab7c08f848c9fd4354f882d70b57d17d6c (diff) | |
download | slackbuilds-2d5f3fb75ce6237960dd4dfcdf07cf225ad5bf21.tar.gz |
multimedia/bombono-dvd: Fix 15.0 build.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'multimedia/bombono-dvd')
-rw-r--r-- | multimedia/bombono-dvd/bombono-dvd.SlackBuild | 39 | ||||
-rw-r--r-- | multimedia/bombono-dvd/patches/autoptr2uniqueptr.patch | 12 | ||||
-rw-r--r-- | multimedia/bombono-dvd/patches/boost-1.78.diff | 914 | ||||
-rw-r--r-- | multimedia/bombono-dvd/patches/boost.patch | 157 | ||||
-rw-r--r-- | multimedia/bombono-dvd/patches/ffmpeg3.patch | 24 | ||||
-rw-r--r-- | multimedia/bombono-dvd/patches/fix_c++11_literal_warnings.patch | 174 | ||||
-rw-r--r-- | multimedia/bombono-dvd/patches/fix_ffmpeg_codecid.patch | 39 | ||||
-rw-r--r-- | multimedia/bombono-dvd/patches/fix_operator_ambiguity.patch | 352 | ||||
-rw-r--r-- | multimedia/bombono-dvd/patches/fix_ptr2bool_cast.patch | 13 | ||||
-rw-r--r-- | multimedia/bombono-dvd/patches/fix_throw_specifications.patch | 24 | ||||
-rw-r--r-- | multimedia/bombono-dvd/patches/scons.diff | 221 |
11 files changed, 1150 insertions, 819 deletions
diff --git a/multimedia/bombono-dvd/bombono-dvd.SlackBuild b/multimedia/bombono-dvd/bombono-dvd.SlackBuild index af35e4a7a1..b36426d4eb 100644 --- a/multimedia/bombono-dvd/bombono-dvd.SlackBuild +++ b/multimedia/bombono-dvd/bombono-dvd.SlackBuild @@ -23,6 +23,8 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20220215 bkw: Modified by SlackBuilds.org, fix build on 15.0. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=bombono-dvd @@ -39,9 +41,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -76,28 +75,23 @@ cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ + -o -perm 511 \) -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ + +# 20220215 bkw: ported the stupid scons stuff to python3, since +# 15.0's scons doesn't do python2. +patch -p1 < $CWD/patches/scons.diff -# specify our CFLAGS -sed -i "s|-O2||" SConstruct # Allow use of cdrtools as an alternative to cdrkit, thanks gentoo patch -p1 < $CWD/patches/bombono-dvd-1.2.0-cdrtools.patch -# Fix for the newer ffmpeg - thanks ArchLinux -patch -p1 < $CWD/patches/fix_ffmpeg_codecid.patch +# 20220215 bkw: more boost breakage. this is upstream's commit e0956f48d5, +# but slightly edited to remove the reference to README (which won't apply). +patch -p1 < $CWD/patches/boost-1.78.diff -# Credit to ARCH Linux -patch -p1 < $CWD/patches/fix_ptr2bool_cast.patch -patch -p1 < $CWD/patches/fix_c++11_literal_warnings.patch -patch -p1 < $CWD/patches/autoptr2uniqueptr.patch -patch -p1 < $CWD/patches/boost.patch -patch -p1 < $CWD/patches/fix_operator_ambiguity.patch -patch -p1 < $CWD/patches/fix_throw_specifications.patch - -# Fix for ffmpeg-3 -patch -p1 < $CWD/patches/ffmpeg3.patch +# specify our CFLAGS +sed -i "s|-O2||" SConstruct # Build package scons \ @@ -123,13 +117,10 @@ scons \ DESTDIR=$PKG \ install -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +strip $PKG/usr/bin/* mv $PKG/usr/share/man $PKG/usr/ - -find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +gzip -9 $PKG/usr/man/man*/* mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a COPYING README $PKG/usr/doc/$PRGNAM-$VERSION diff --git a/multimedia/bombono-dvd/patches/autoptr2uniqueptr.patch b/multimedia/bombono-dvd/patches/autoptr2uniqueptr.patch deleted file mode 100644 index ca4c045537..0000000000 --- a/multimedia/bombono-dvd/patches/autoptr2uniqueptr.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- bombono-dvd-1.2.2/libs/boost-logging/boost/logging/detail/tss/tss_impl_pthread.hpp 2013-03-08 00:50:45.000000000 +0330 -+++ new/libs/boost-logging/boost/logging/detail/tss/tss_impl_pthread.hpp 2015-11-26 20:06:48.693423531 +0330 -@@ -39,7 +39,7 @@ - slots = static_cast<tss_slots*>( pthread_getspecific(tss_data_native_key())); - if (slots == 0) - { -- std::auto_ptr<tss_slots> temp( new_object_ensure_delete<tss_slots>() ); -+ std::unique_ptr<tss_slots> temp( new_object_ensure_delete<tss_slots>() ); - // pre-allocate a few elems, so that we'll be fast - temp->resize(BOOST_LOG_TSS_SLOTS_SIZE); - - diff --git a/multimedia/bombono-dvd/patches/boost-1.78.diff b/multimedia/bombono-dvd/patches/boost-1.78.diff new file mode 100644 index 0000000000..c5df5c413b --- /dev/null +++ b/multimedia/bombono-dvd/patches/boost-1.78.diff @@ -0,0 +1,914 @@ +diff --git a/libs/boost-logging/boost/logging/detail/tss/tss_impl_pthread.hpp b/libs/boost-logging/boost/logging/detail/tss/tss_impl_pthread.hpp +index 3077276..af9afd2 100644 +--- a/libs/boost-logging/boost/logging/detail/tss/tss_impl_pthread.hpp ++++ b/libs/boost-logging/boost/logging/detail/tss/tss_impl_pthread.hpp +@@ -39,7 +39,7 @@ inline tss_slots* get_slots() + slots = static_cast<tss_slots*>( pthread_getspecific(tss_data_native_key())); + if (slots == 0) + { +- std::auto_ptr<tss_slots> temp( new_object_ensure_delete<tss_slots>() ); ++ std::unique_ptr<tss_slots> temp( new_object_ensure_delete<tss_slots>() ); + // pre-allocate a few elems, so that we'll be fast + temp->resize(BOOST_LOG_TSS_SLOTS_SIZE); + +diff --git a/src/mbase/project/media.cpp b/src/mbase/project/media.cpp +index 81e44d2..5f9e4f6 100644 +--- a/src/mbase/project/media.cpp ++++ b/src/mbase/project/media.cpp +@@ -58,7 +58,9 @@ void StorageMD::MakeByPath(const std::string& path, bool cnv_to_utf8, + + std::string MakeAutoName(const std::string& str, int old_sz) + { +- return (str::stream() << str << " " << old_sz+1).str(); ++ str::stream ss; ++ ss << str << " " << old_sz+1; ++ return ss.str(); + } + + void VideoMD::AddChapter(ChapterItem chp) +diff --git a/src/mbase/project/menu.cpp b/src/mbase/project/menu.cpp +index 1f25817..94b8755 100644 +--- a/src/mbase/project/menu.cpp ++++ b/src/mbase/project/menu.cpp +@@ -166,7 +166,9 @@ void MenuMD::SerializeImpl(Archieve& ar) + static std::string MakeObjectPath(int idx, const char* type) + { + ASSERT( idx != NO_HNDL ); +- return (str::stream() << type << "." << idx).str(); ++ str::stream ss; ++ ss << type << "." << idx; ++ return ss.str(); + } + + std::string GetMediaRef(MediaItem mi) +@@ -197,7 +199,9 @@ class RefMaker: public ObjVisitor + void RefMaker::Visit(VideoChapterMD& obj) + { + refStr = GetMediaRef(obj.owner); +- refStr += (str::stream() << "." << ChapterPosInt(&obj)).str(); ++ str::stream ss; ++ ss << "." << ChapterPosInt(&obj); ++ refStr += ss.str(); + } + + std::string Media2Ref(MediaItem mi) +@@ -233,8 +237,9 @@ int GetRefIndex(const char*& str) + + std::string ThrowBadIndex(const char* prefix, int idx) + { +- throw std::runtime_error( +- (str::stream() << prefix << idx).str() ); ++ str::stream ss; ++ ss << prefix << idx; ++ throw std::runtime_error(ss.str()); + } + + MediaItem TryGetMedia(int idx) +diff --git a/src/mbase/project/serialization.h b/src/mbase/project/serialization.h +index ff5b7a9..547c438 100644 +--- a/src/mbase/project/serialization.h ++++ b/src/mbase/project/serialization.h +@@ -75,7 +75,9 @@ namespace ToString + template<typename T> + std::string MakeString(const T& t) + { +- return (str::stream() << t).str(); ++ str::stream ss; ++ ss << t; ++ return ss.str(); + } + + template<typename T> +diff --git a/src/mbase/project/srl-common.cpp b/src/mbase/project/srl-common.cpp +index c2c92b5..ab1c62b 100644 +--- a/src/mbase/project/srl-common.cpp ++++ b/src/mbase/project/srl-common.cpp +@@ -36,10 +36,12 @@ void Serialize(Archieve& ar, MenuParams& mp) + std::string ToString(const RGBA::Pixel& pxl) + { + using Mpeg::set_hms; +- return (str::stream("#") << std::hex +- << set_hms() << (int)pxl.red +- << set_hms() << (int)pxl.green +- << set_hms() << (int)pxl.blue << (int)pxl.alpha).str(); ++ str::stream ss ("#"); ++ ss << std::hex ++ << set_hms() << (int)pxl.red ++ << set_hms() << (int)pxl.green ++ << set_hms() << (int)pxl.blue << (int)pxl.alpha; ++ return ss.str(); + } + + // как pango_color_parse() +diff --git a/src/mbase/project/srl-db.cpp b/src/mbase/project/srl-db.cpp +index c3babec..e50a523 100644 +--- a/src/mbase/project/srl-db.cpp ++++ b/src/mbase/project/srl-db.cpp +@@ -102,7 +102,7 @@ void DbSerializeProjectImpl(Archieve& ar) + } + + void ADatabase::Load(const std::string& fname, +- const std::string& cur_dir) throw (std::exception) ++ const std::string& cur_dir) + { + try + { +diff --git a/src/mbase/project/table.cpp b/src/mbase/project/table.cpp +index 455c334..3e52383 100644 +--- a/src/mbase/project/table.cpp ++++ b/src/mbase/project/table.cpp +@@ -29,6 +29,7 @@ + #include "theme.h" + + #include <mbase/resources.h> ++#include <boost/filesystem/directory.hpp> + + + const char* APROJECT_VERSION = "1.2.4"; +@@ -154,7 +155,7 @@ NameValueT<Media> LoadMedia(Archieve& ar, MediaList& md_list) + void SerializePath(Archieve& ar, const char* tag_name, std::string& fpath) + { + //ar & NameValue("Path", mdPath); +- fs::path rel_to_dir = fs::path(AData().GetProjectFName()).branch_path(); ++ fs::path rel_to_dir = fs::path(AData().GetProjectFName()).parent_path(); + if( ar.IsLoad() ) + { + ar >> NameValue(tag_name, fpath); +@@ -162,7 +163,7 @@ void SerializePath(Archieve& ar, const char* tag_name, std::string& fpath) + if( !fpath.empty() ) + { + fs::path pth(fpath); +- if( !pth.is_complete() ) ++ if( !pth.is_absolute() ) + fpath = (rel_to_dir/fpath).string(); + } + } +diff --git a/src/mbase/project/table.h b/src/mbase/project/table.h +index 7c73085..cc7e36d 100644 +--- a/src/mbase/project/table.h ++++ b/src/mbase/project/table.h +@@ -128,7 +128,7 @@ class ADatabase: public Singleton<ADatabase>, public DataWare + void ClearSettings(); + + void Load(const std::string& fname, +- const std::string& cur_dir = std::string()) throw (std::exception); ++ const std::string& cur_dir = std::string()); + bool Save(); + + bool SaveAs(const std::string& fname, +diff --git a/src/mbase/project/tests/test_table.cpp b/src/mbase/project/tests/test_table.cpp +index f8a1c20..3e7115a 100644 +--- a/src/mbase/project/tests/test_table.cpp ++++ b/src/mbase/project/tests/test_table.cpp +@@ -129,7 +129,7 @@ BOOST_AUTO_TEST_CASE( TestMediaList ) + // проверка чтения/записи путей + boost::intrusive_ptr<StillImageMD> pict2 = ptr::dynamic_pointer_cast<StillImageMD>(ml[2]); + fs::path pth = pict2->GetPath(); +- BOOST_CHECK( pth.is_complete() ); ++ BOOST_CHECK( pth.is_absolute() ); + BOOST_CHECK( fs::exists(pth) ); + + // проверка ссылок +diff --git a/src/mdemux/dvdread.cpp b/src/mdemux/dvdread.cpp +index d8392b1..12fcae6 100644 +--- a/src/mdemux/dvdread.cpp ++++ b/src/mdemux/dvdread.cpp +@@ -35,8 +35,10 @@ namespace DVD { + std::string VobFName(VobPos& pos, const std::string& suffix) + { + using Mpeg::set_hms; +- return (str::stream("Video") << set_hms() << int(pos.Vts()) +- << "-" << set_hms() << pos.VobId() << suffix << ".vob").str(); ++ str::stream ss ("Video"); ++ ss << set_hms() << int(pos.Vts()) ++ << "-" << set_hms() << pos.VobId() << suffix << ".vob"; ++ return ss.str(); + } + + typedef boost::function<void(int, double)> VobTimeFnr; +@@ -282,9 +284,11 @@ VobPtr FindVob(VobArr& dvd_vobs, uint8_t vts, uint16_t vob_id) + static void TryDVDReadBlocks(dvd_file_t* file, int off, size_t cnt, char* buf) + { + int real_cnt = DVDReadBlocks(file, off, cnt, (unsigned char*)buf); +- if( (int)cnt != real_cnt ) +- throw std::runtime_error( (str::stream() << real_cnt << +- " != DVDReadBlocks(" << cnt << ")").str() ); ++ if( (int)cnt != real_cnt ) { ++ str::stream ss; ++ ss << real_cnt << " != DVDReadBlocks(" << cnt << ")"; ++ throw std::runtime_error( ss.str() ); ++ } + } + + // размер буфера должен соответствовать читаемому диапазону +diff --git a/src/mdemux/mpeg2demux.cpp b/src/mdemux/mpeg2demux.cpp +index bb7b1b1..ecb3774 100644 +--- a/src/mdemux/mpeg2demux.cpp ++++ b/src/mdemux/mpeg2demux.cpp +@@ -71,7 +71,9 @@ bool DemuxSvc::Filter(uint32_t code) + + static std::string MakePESKey(int id, const char* ext) + { +- return (str::stream() << id << "." << ext).str(); ++ str::stream ss; ++ ss << id << "." << ext; ++ return ss.str(); + } + + static bool ReadPart(io::stream& strm, uint8_t* buf, int sz, int& len) +@@ -110,7 +112,9 @@ static std::string MakeKeyNameForLPCM(int track, uint8_t inf) + ASSERT(0); + } + +- std::string header_str = (str::stream() << sample_rate << ":" << channels << ":" << bps << ".lpcm").str(); ++ str::stream ss; ++ ss << sample_rate << ":" << channels << ":" << bps << ".lpcm"; ++ std::string header_str = ss.str(); + return MakePESKey(track, header_str.c_str()); + } + +diff --git a/src/mdemux/seek.cpp b/src/mdemux/seek.cpp +index e46658f..f0ce934 100644 +--- a/src/mdemux/seek.cpp ++++ b/src/mdemux/seek.cpp +@@ -37,8 +37,10 @@ std::string SecToHMS(double len, bool round_sec) + int hh = min / 60; + int mm = min - hh*60; + +- return (str::stream() << set_hms() << hh << ":" +- << set_hms() << mm << ":" << set_hms() << ss).str(); ++ str::stream strss; ++ strss << set_hms() << hh << ":" ++ << set_hms() << mm << ":" << set_hms() << ss; ++ return strss.str(); + } + + bool MediaInfo::InitBegin(VideoLine& vl) +diff --git a/src/mgui/author/burn.cpp b/src/mgui/author/burn.cpp +index ddfad0a..578429e 100644 +--- a/src/mgui/author/burn.cpp ++++ b/src/mgui/author/burn.cpp +@@ -85,7 +85,7 @@ BurnData& GetInitedBD() + return bd; + } + +-re::pattern WriteSpeed_RE("Write Speed #"RG_NUM":"RG_SPS RG_NUM"\\."RG_NUM "x1385"); ++re::pattern WriteSpeed_RE("Write Speed #" RG_NUM ":" RG_SPS RG_NUM "\\." RG_NUM "x1385"); + + RefPtr<Gtk::ListStore> sp_store; + +@@ -253,7 +253,7 @@ DVDInfo ParseDVDInfo(bool is_good, const std::string& out_info) + } + else + { +- static re::pattern media_type_re("Mounted Media:"RG_SPS"[0-9A-F]+h, ([^ \n]+)"); ++ static re::pattern media_type_re("Mounted Media:" RG_SPS "[0-9A-F]+h, ([^ \n]+)"); + re::match_results what; + + bool is_found = re::search(out_info, what, media_type_re); +@@ -277,7 +277,7 @@ DVDInfo ParseDVDInfo(bool is_good, const std::string& out_info) + // isBlank + if( res != dvdOTHER ) + { +- static re::pattern media_status_re("Disc status:"RG_SPS"([a-z]+)\n"); ++ static re::pattern media_status_re("Disc status:" RG_SPS "([a-z]+)\n"); + bool is_found = re::search(out_info, what, media_status_re); + ASSERT_RTL( is_found ); + +diff --git a/src/mgui/author/execute.cpp b/src/mgui/author/execute.cpp +index 5b2330c..e308552 100644 +--- a/src/mgui/author/execute.cpp ++++ b/src/mgui/author/execute.cpp +@@ -64,9 +64,9 @@ static void InitFoundStageTag(RefPtr<Gtk::TextTag> tag) + tag->property_foreground() = "darkgreen"; + } + +-re::pattern DVDAuthorRE(RG_CMD_BEG"dvdauthor"RG_EW ".*-x"RG_EW RG_SPS RG_BW"DVDAuthor\\.xml"RG_EW); +-re::pattern MkIsoFsRE(RG_CMD_BEG MK_ISO_CMD RG_EW ".*-dvd-video"RG_EW ".*>.*"RG_BW"dvd.iso"RG_EW); +-re::pattern GrowIsoFsRE(RG_CMD_BEG"growisofs"RG_EW ".*-dvd-compat"RG_EW ".*-dvd-video"RG_EW); ++re::pattern DVDAuthorRE(RG_CMD_BEG"dvdauthor" RG_EW ".*-x" RG_EW RG_SPS RG_BW "DVDAuthor\\.xml" RG_EW); ++re::pattern MkIsoFsRE(RG_CMD_BEG MK_ISO_CMD RG_EW ".*-dvd-video" RG_EW ".*>.*" RG_BW "dvd.iso" RG_EW); ++re::pattern GrowIsoFsRE(RG_CMD_BEG"growisofs" RG_EW ".*-dvd-compat" RG_EW ".*-dvd-video" RG_EW); + + //static void PrintMatchResults(const re::match_results& what) + //{ +@@ -94,7 +94,7 @@ class MkIsoFsPP: public ProgressParser + virtual void Filter(const std::string& line); + }; + +-re::pattern MkIsoFsPercent_RE( RG_FLT"?% done"); ++re::pattern MkIsoFsPercent_RE( RG_FLT "?% done"); + + void MkIsoFsPP::Filter(const std::string& line) + { +@@ -126,8 +126,8 @@ class DVDAuthorPP: public ProgressParser + bool fixStage; + }; + +-re::pattern DVDAuthorVOB_RE( "^STAT: VOBU "RG_NUM" at "RG_NUM"MB"); +-re::pattern DVDAuthorFix_RE( "^STAT: fixing VOBU at "RG_NUM"MB \\("RG_NUM"/"RG_NUM", "RG_NUM"%\\)"); ++re::pattern DVDAuthorVOB_RE( "^STAT: VOBU " RG_NUM " at " RG_NUM "MB"); ++re::pattern DVDAuthorFix_RE( "^STAT: fixing VOBU at " RG_NUM "MB \\(" RG_NUM "/" RG_NUM ", " RG_NUM "%\\)"); + + void DVDAuthorPP::Filter(const std::string& line) + { +@@ -157,7 +157,7 @@ void DVDAuthorPP::Filter(const std::string& line) + if( p ) + of.SetProgress(p); + +- static re::pattern ch_error_re("ERR:.*Cannot jump to chapter "RG_NUM" of title "RG_NUM", only "RG_NUM" exist"); ++ static re::pattern ch_error_re("ERR:.*Cannot jump to chapter " RG_NUM " of title " RG_NUM ", only " RG_NUM " exist"); + if( re::search(line, what, ch_error_re) ) + { + std::string& err_str = of.firstError; +diff --git a/src/mgui/author/render.cpp b/src/mgui/author/render.cpp +index 1ffbca2..81720d7 100644 +--- a/src/mgui/author/render.cpp ++++ b/src/mgui/author/render.cpp +@@ -866,7 +866,7 @@ std::string FFmpegPostArgs(const std::string& out_fname, bool is_4_3, bool is_pa + // + // :KLUDGE: (только) в ffmpeg, avformat 53.13.0, поменяли . на : => надо + // самим открывать файл и узнавать индекс! +- static re::pattern audio_idx("Stream #"RG_NUM"[\\.|:]"RG_NUM".*Audio:"); ++ static re::pattern audio_idx("Stream #" RG_NUM "[\\.|:]" RG_NUM ".*Audio:"); + + re::match_results what; + // флаг означает, что перевод строки не может быть точкой +@@ -1221,17 +1221,17 @@ void TestFFmpegForDVDEncoding(const std::string& conts) + { + CheckNoCodecs(CheckForCodecList(conts)); + +- static re::pattern dvd_format("^ .E dvd"RG_EW); ++ static re::pattern dvd_format("^ .E dvd" RG_EW); + CheckStrippedFFmpeg(dvd_format, conts, "dvd format"); + + // :TRICKY: с версии libavcodec 54 при выводе начальный пробел не ставят => поэтому ? + // ("спасибо" Anton Khirnov за очередное "улучшение") + #define _CPP_ "^ ?" +- static re::pattern mpeg2video_codec(_CPP_".EV... mpeg2video"RG_EW); ++ static re::pattern mpeg2video_codec(_CPP_ ".EV... mpeg2video" RG_EW); + CheckStrippedFFmpeg(mpeg2video_codec, conts, "mpeg2 video encoder"); + + // по факту ffmpeg всегда использует ac3, однако mp2 тоже возможен +- static re::pattern ac3_codec(_CPP_".EA... ac3"RG_EW); ++ static re::pattern ac3_codec(_CPP_ ".EA... ac3" RG_EW); + CheckStrippedFFmpeg(ac3_codec, conts, "ac3 audio encoder"); + #undef _CPP_ + } +@@ -1241,7 +1241,7 @@ TripleVersion FindAVVersion(const std::string& conts, const char* avlib_name) + // * ищем версию libavfilter + // пример: " libavfilter 0. 4. 0 / " + #define RG_PADNUM RG_SPS RG_NUM +- std::string reg_str = boost::format(RG_BW"%1%"RG_PADNUM"\\."RG_PADNUM"\\."RG_PADNUM" / ") ++ std::string reg_str = boost::format(RG_BW "%1%" RG_PADNUM "\\." RG_PADNUM "\\." RG_PADNUM " / ") + % avlib_name % bf::stop; + re::pattern avfilter_version(reg_str.c_str()); + return FindVersion(conts, avfilter_version, AVCnvBin(), avlib_name); +@@ -1307,7 +1307,9 @@ FFmpegVersion CheckFFDVDEncoding() + + bool RenderMainPicture(const std::string& out_dir, Menu mn, int i) + { +- Author::Info((str::stream() << "Rendering menu \"" << mn->mdName << "\" ...").str()); ++ str::stream ss; ++ ss << "Rendering menu \"" << mn->mdName << "\" ..."; ++ Author::Info(ss.str()); + const std::string mn_dir = MakeMenuPath(out_dir, mn, i); + + if( IsMotion(mn) ) +diff --git a/src/mgui/author/script.cpp b/src/mgui/author/script.cpp +index ccfd32f..f2b1c7e 100644 +--- a/src/mgui/author/script.cpp ++++ b/src/mgui/author/script.cpp +@@ -130,7 +130,9 @@ static std::string MakeFPTarget(MediaItem mi) + { + VideoItem vi = IsVideo(mi); + ASSERT( vi ); +- str = (str::stream() << "title " << GetAuthorNumber(vi)).str(); ++ str::stream ss; ++ ss << "title " << GetAuthorNumber(vi); ++ str = ss.str(); + } + return str; + } +@@ -179,7 +181,9 @@ void TargetCommandVis::Visit(VideoChapterMD& obj) + // Потому: для удоства пользователей даем создавать нулевую главу, разрешая это здесь + // (однако доп. нулевые главы будут приводить к ошибке Cannot jump to chapter N ... only M exist) + int c_num = ChapterPosInt(&obj) + (owner->List()[0]->chpTime ? 2 : 1) ; +- res = (str::stream() << "jump title " << v_num << " chapter " << c_num << ";").str(); ++ str::stream ss; ++ ss << "jump title " << v_num << " chapter " << c_num << ";"; ++ res = ss.str(); + } + + static std::string MakeButtonJump(MediaItem mi, bool vts_domain) +@@ -204,7 +208,9 @@ std::string MenuAuthorDir(Menu mn, int idx, bool cnv_from_utf8) + if( !fs::native(name) ) + name = "Menu"; + +- std::string fname = (str::stream() << idx+1 << "." << name).str(); ++ str::stream ss; ++ ss << idx+1 << "." << name; ++ std::string fname = ss.str(); + return cnv_from_utf8 ? ConvertPathFromUtf8(fname) : fname ; + } + +@@ -626,7 +632,9 @@ static void CopyRootFile(const std::string& fname, const std::string& out_dir) + void AuthorSectionInfo(const std::string& str) + { + Author::Info("\n#", false); +- Author::Info((str::stream() << "# " << str).str(), false); ++ str::stream ss; ++ ss << "# " << str; ++ Author::Info(ss.str(), false); + Author::Info("#\n", false); + } + +@@ -676,7 +684,7 @@ static void CheckSpumuxFontFile() + if( !fs::exists(font_path) ) + { + std::string err_str; +- if( !CreateDirs(font_path.branch_path(), err_str) ) ++ if( !CreateDirs(font_path.parent_path(), err_str) ) + Error(err_str.c_str()); + fs::copy_file(DataDirPath("copy-n-paste/FreeSans.ttf"), font_path); + } +@@ -755,9 +763,9 @@ static void CalcTransPercent(double cur_dur, Job& job, JobData& jd, double full_ + // ffmpeg выводит статистику первого создаваемого файла каждые полсекунды, + // см. print_report() (при verbose=1, по умолчанию) + // Формат размера: "size=%8.0fkB" +-re::pattern FFmpegSizePat( "size= *"RG_NUM"kB"); ++re::pattern FFmpegSizePat( "size= *" RG_NUM "kB"); + // Формат длительности: "time=%0.2f" +-re::pattern FFmpegDurPat( "time="RG_FLT); ++re::pattern FFmpegDurPat( "time=" RG_FLT); + + static void OnTranscodePrintParse(const char* dat, int sz, const PercentFunctor& fnr) + { +@@ -787,7 +795,7 @@ static void OnTranscodePrintParse(const char* dat, int sz, const PercentFunctor& + + // Формат длительности для ffmpeg c коммита dd471070: "time=%02d:%02d:%02d.%02d" + // Образец: frame= 208 fps= 58 q=2.0 size= 476kB time=00:00:08.44 bitrate= 461.9kbits/s dup=1 drop=0 +-re::pattern FFmpegNewDurPat( "time="RG_NUM":"RG_NUM":"RG_FLT); ++re::pattern FFmpegNewDurPat( "time=" RG_NUM ":" RG_NUM ":" RG_FLT); + + static void OnTranscodeHMSParse(const char* dat, int sz, const PercentFunctor& fnr) + { +@@ -1082,7 +1090,9 @@ static void TranscodeVideos(int pass, const std::string& out_dir) + + static void AuthorImpl(const std::string& out_dir) + { +- AuthorSectionInfo((str::stream() << "Build DVD-Video in folder: " << out_dir).str()); ++ str::stream ss; ++ ss << "Build DVD-Video in folder: " << out_dir; ++ AuthorSectionInfo(ss.str()); + IteratePendingEvents(); + + IndexVideosForAuthoring(); +@@ -1136,7 +1146,7 @@ static void AuthorImpl(const std::string& out_dir) + // 2) парсер dvdauthor не любит незнакомые ему атрибуты => spumux < 0.7 не работает + std::string help_str; + PipeOutput("spumux -h", help_str); +- static re::pattern spumux_version("DVDAuthor::spumux, version "RG_NUM"\\."RG_NUM"\\."RG_NUM"\\.\n"); ++ static re::pattern spumux_version("DVDAuthor::spumux, version " RG_NUM "\\." RG_NUM "\\." RG_NUM "\\.\n"); + if( IsVersionGE(FindVersion(help_str, spumux_version, "spumux"), TripleVersion(0, 7, 0)) ) + AddFormatAttr(sp); + +diff --git a/src/mgui/dvdimport.cpp b/src/mgui/dvdimport.cpp +index 44dcdec..fc9b965 100644 +--- a/src/mgui/dvdimport.cpp ++++ b/src/mgui/dvdimport.cpp +@@ -211,10 +211,11 @@ static void OnPreparePage(ImportData& id) + row[VF().selState] = false; + row[VF().name] = VobFName(vob.pos); + row[VF().thumbnail] = vob.aspect == af4_3 ? pix4_3 : pix16_9; +- std::string desc = (str::stream(Mpeg::SecToHMS(vob.tmLen, true)) << ", " +- << vob.sz.x << "x" << vob.sz.y << ", " +- << (vob.aspect == af4_3 ? "4:3" : "16:9") << ", " +- << std::fixed << std::setprecision(2) << vob.Count()/512. << " " << _("MB")).str(); ++ str::stream ss (Mpeg::SecToHMS(vob.tmLen, true)); ++ ss << ", " << vob.sz.x << "x" << vob.sz.y << ", " ++ << (vob.aspect == af4_3 ? "4:3" : "16:9") << ", " ++ << std::fixed << std::setprecision(2) << vob.Count()/512. << " " << _("MB"); ++ std::string desc = ss.str(); + row[VF().desc] = desc; + } + CompleteSelection(id, false); +@@ -275,7 +276,7 @@ static ReaderPtr OpenDVD(const std::string& dvd_path, ImportData& id) + id.errLbl.hide(); + + id.reader = rd; +- SetCurPageComplete(id.ast, id.reader); ++ SetCurPageComplete(id.ast, bool(id.reader)); + + return rd; + } +diff --git a/src/mgui/editor/toolbar.cpp b/src/mgui/editor/toolbar.cpp +index 6a1894c..a039c3a 100644 +--- a/src/mgui/editor/toolbar.cpp ++++ b/src/mgui/editor/toolbar.cpp +@@ -45,6 +45,8 @@ + #include <mlib/sdk/logger.h> + #include <mlib/range/enumerate.h> + ++#include <boost/filesystem/directory.hpp> ++ + namespace Editor + { + +diff --git a/src/mgui/ffviewer.cpp b/src/mgui/ffviewer.cpp +index 64ea813..a8dc6cb 100644 +--- a/src/mgui/ffviewer.cpp ++++ b/src/mgui/ffviewer.cpp +@@ -36,6 +36,10 @@ + #define AVFORMAT_54 + #endif + ++C_LINKAGE_BEGIN ++#include <libavutil/imgutils.h> ++C_LINKAGE_END ++ + // разрабы libav считают себя самыми умными и потому решили + // закрыть простым смертным доступ к ffurl_register_protocol() + // (бывшая av_register_protocol2()),- https://bugzilla.libav.org/show_bug.cgi?id=224 +@@ -74,7 +78,7 @@ C_LINKAGE_BEGIN + + typedef struct AVCodecTag { + #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52,39,00) +- enum CodecID id; ++ enum AVCodecID id; + #else + int id; + #endif +@@ -82,14 +86,14 @@ typedef struct AVCodecTag { + } AVCodecTag; + + #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52,34,00) +-static uint FFCodecID2Tag(CodecID codec_id) ++static uint FFCodecID2Tag(AVCodecID codec_id) + { + unsigned int ff_codec_get_tag(const AVCodecTag *tags, int id); + extern const AVCodecTag ff_codec_bmp_tags[]; + return ff_codec_get_tag(ff_codec_bmp_tags, codec_id); + } + #else +-static uint FFCodecID2Tag(CodecID codec_id) ++static uint FFCodecID2Tag(AVCodecID codec_id) + { + unsigned int codec_get_tag(const AVCodecTag *tags, int id); + extern const AVCodecTag codec_bmp_tags[]; +@@ -400,7 +404,7 @@ static unsigned char GetChar(uint tag, int bit_begin) + return (tag>>bit_begin) & 0xFF; + } + +-static std::string CodecID2Str(CodecID codec_id) ++static std::string CodecID2Str(AVCodecID codec_id) + { + #ifdef _MSC_VER + std::string tag_str = boost::format("%1%") % codec_id % bf::stop; +@@ -807,7 +811,7 @@ static void DoVideoDecode(FFViewer& ffv, int& got_picture, AVPacket* pkt) + #ifdef AVFRAME_INIT_CHANGE + // avcodec_get_frame_defaults() перенесли в avcodec_decode_video2() + #else +- avcodec_get_frame_defaults(&picture); // ffmpeg.c очищает каждый раз ++ av_frame_unref (&picture); + #endif + + #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52,25,00) +diff --git a/src/mgui/mux.cpp b/src/mgui/mux.cpp +index 427058e..885dde7 100644 +--- a/src/mgui/mux.cpp ++++ b/src/mgui/mux.cpp +@@ -162,7 +162,7 @@ static void OnVideoSelected(Gtk::FileChooserButton& v_btn, Gtk::FileChooserButto + fs::path pth = GetFilename(v_btn); + if( pth.empty() ) + return; +- std::string folder = pth.branch_path().string(); ++ std::string folder = pth.parent_path().string(); + + if( a_btn.get_filename().empty() ) + a_btn.set_current_folder(folder); +diff --git a/src/mgui/project/add.cpp b/src/mgui/project/add.cpp +index 9454578..e8ae94f 100644 +--- a/src/mgui/project/add.cpp ++++ b/src/mgui/project/add.cpp +@@ -86,7 +86,9 @@ static void SetImportError(ErrorDesc& ed, bool is_good, const std::string& out_s + + static std::string FpsToStr(const Point& frate) + { +- return (str::stream() << (double)frate.x/frate.y).str(); ++ str::stream ss; ++ ss << (double)frate.x/frate.y; ++ return ss.str(); + } + + static std::string TVTypeStr(bool is_ntsc) +@@ -163,7 +165,9 @@ void CheckVideoFormat(ErrorDesc& ed, const Mpeg::SequenceData& vid, bool is_ntsc + // * + bool is_aspect_ok = vid.sarCode == af4_3 || vid.sarCode == af16_9; + Point aspect = vid.SizeAspect(); +- std::string aspect_str = (str::stream() << aspect.x << ':' << aspect.y).str(); ++ str::stream ss; ++ ss << aspect.x << ':' << aspect.y; ++ std::string aspect_str = ss.str(); + SetImportError(ed, is_aspect_ok, + std::string(_("Aspect ratio")) + ": \t" + MarkError(aspect_str, is_aspect_ok), + BF_(Descriptions[2]) % tv_type % bf::stop); +@@ -479,7 +483,7 @@ void TryAddMedias(const Str::List& paths, MediaBrowser& brw, + MessageBox(BF_("The file \"%1%\" looks like VOB from DVD.\nRun import?") % leaf % bf::stop, + Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_OK_CANCEL) == Gtk::RESPONSE_OK ) + { +- DVD::RunImport(*GetTopWindow(brw), pth.branch_path().string()); ++ DVD::RunImport(*GetTopWindow(brw), pth.parent_path().string()); + return; + } + } +diff --git a/src/mgui/project/browser.cpp b/src/mgui/project/browser.cpp +index 02d95a1..47b730b 100644 +--- a/src/mgui/project/browser.cpp ++++ b/src/mgui/project/browser.cpp +@@ -328,7 +328,7 @@ Gtk::HButtonBox& CreateMListButtonBox() + return hb; + } + +-std::string MediaItemDnDTVType() { return "DnDTreeView<"DND_MI_NAME">"; } ++std::string MediaItemDnDTVType() { return "DnDTreeView<" DND_MI_NAME ">"; } + + void SetupBrowser(ObjectBrowser& brw, int dnd_column, bool is_media_brw) + { +diff --git a/src/mgui/project/mconstructor.cpp b/src/mgui/project/mconstructor.cpp +index 3b56587..754f9f8 100644 +--- a/src/mgui/project/mconstructor.cpp ++++ b/src/mgui/project/mconstructor.cpp +@@ -52,6 +52,8 @@ + // COPY_N_PASTE_ETALON из go-file.c, проект Gnumeric, http://projects.gnome.org/gnumeric/ + // + ++#include <boost/filesystem/directory.hpp> ++ + #ifndef GOFFICE_WITH_GNOME + static char * + check_program (char const *prog) +diff --git a/src/mgui/project/serialize.cpp b/src/mgui/project/serialize.cpp +index a5366aa..03583ec 100644 +--- a/src/mgui/project/serialize.cpp ++++ b/src/mgui/project/serialize.cpp +@@ -73,7 +73,7 @@ static std::string MakeProjectTitle(bool with_path_breakdown = false) + fs::path full_path(db.GetProjectFName()); + std::string res_str = fs::name_str(full_path); + if( with_path_breakdown ) +- res_str += " (" + full_path.branch_path().string() + ")"; ++ res_str += " (" + full_path.parent_path().string() + ")"; + return res_str; + } + +diff --git a/src/mgui/sdk/cairo_utils.cpp b/src/mgui/sdk/cairo_utils.cpp +index 14f11be..10c1f97 100644 +--- a/src/mgui/sdk/cairo_utils.cpp ++++ b/src/mgui/sdk/cairo_utils.cpp +@@ -27,6 +27,8 @@ + std::string MakeSVGFilename(const char* prefix) + { + static int idx = 1; +- return (str::stream() << prefix << "-" << Mpeg::set_hms() << idx++ << ".svg" ).str(); ++ str::stream ss; ++ ss << prefix << "-" << Mpeg::set_hms() << idx++ << ".svg"; ++ return ss.str(); + } + +diff --git a/src/mgui/timeline/layout.cpp b/src/mgui/timeline/layout.cpp +index c139626..b5b5ca7 100644 +--- a/src/mgui/timeline/layout.cpp ++++ b/src/mgui/timeline/layout.cpp +@@ -600,8 +600,10 @@ time4_t FramesToTime(int cnt, double fps) + void FramesToTime(std::string& str, int cnt, double fps) + { + time4_t t4 = FramesToTime(cnt, fps); +- str = (str::stream() << Mpeg::set_hms() << t4.hh << ":" << Mpeg::set_hms() << t4.mm << ":" +- << Mpeg::set_hms() << t4.ss << ";" << Mpeg::set_hms() << t4.ff).str(); ++ str::stream ss; ++ ss << Mpeg::set_hms() << t4.hh << ":" << Mpeg::set_hms() << t4.mm << ":" ++ << Mpeg::set_hms() << t4.ss << ";" << Mpeg::set_hms() << t4.ff; ++ str = ss.str(); + } + + } // namespace TimeLine +diff --git a/src/mgui/timeline/select.cpp b/src/mgui/timeline/select.cpp +index 9d8ec5a..337ada6 100644 +--- a/src/mgui/timeline/select.cpp ++++ b/src/mgui/timeline/select.cpp +@@ -152,7 +152,7 @@ static void SaveFrame(DAMonitor& mon) + + mon.FramePixbuf()->save(fnam, ext); + +- SaveFrameDir() = fs::path(fnam).branch_path().string(); ++ SaveFrameDir() = fs::path(fnam).parent_path().string(); + if( add_btn.get_active() ) + Project::TryAddMediaQuiet(fnam, "SaveFrame"); + } +diff --git a/src/mgui/win_utils.cpp b/src/mgui/win_utils.cpp +index e135f1a..beafca8 100644 +--- a/src/mgui/win_utils.cpp ++++ b/src/mgui/win_utils.cpp +@@ -132,7 +132,9 @@ void Scale(RefPtr<Context> cr, RefPtr<ImageSurface> src, + + std::string ColorToString(const unsigned int rgba) + { +- return (str::stream() << std::hex << (rgba >> 8)).str(); ++ str::stream ss; ++ ss << std::hex << (rgba >> 8); ++ return ss.str(); + } + + CR::Color GetBGColor(Gtk::Widget& wdg) +diff --git a/src/mlib/filesystem.cpp b/src/mlib/filesystem.cpp +index 7ae7162..278dfc5 100644 +--- a/src/mlib/filesystem.cpp ++++ b/src/mlib/filesystem.cpp +@@ -30,6 +30,7 @@ + #if BOOST_MINOR_VERSION >= 51 + #define BOOST_FS_3 boost::filesystem + #include <boost/filesystem/path_traits.hpp> // boost::filesystem::convert() ++#include <boost/filesystem/directory.hpp> + #else + #define BOOST_FS_3 boost::filesystem3 + #include <boost/filesystem/v3/path_traits.hpp> +@@ -161,25 +162,16 @@ namespace Project + + fs::path MakeAbsolutePath(const fs::path& pth, const fs::path& cur_dir) + { +- fs::path res; +- +- if( pth.is_complete() ) +- res = pth; +- else +- { +- fs::path dir = cur_dir.empty() ? fs::current_path() : cur_dir ; +- res = dir/pth; +- } +- return res.normalize(); ++ return absolute(pth, cur_dir); + } + + // оба аргумента должны быть абсолютными путями + bool MakeRelativeToDir(fs::path& pth, fs::path dir) + { +- pth.normalize(); +- dir.normalize(); +- ASSERT( pth.is_complete() ); +- ASSERT( dir.is_complete() ); ++ pth = canonical(pth); ++ dir = canonical(dir); ++ ASSERT( pth.is_absolute() ); ++ ASSERT( dir.is_absolute() ); + + fs::path::iterator p_itr = pth.begin(), p_end = pth.end(); + fs::path::iterator d_itr = dir.begin(), d_end = dir.end(); +diff --git a/src/mlib/read_stream.h b/src/mlib/read_stream.h +index 9806ae3..05c6e1f 100644 +--- a/src/mlib/read_stream.h ++++ b/src/mlib/read_stream.h +@@ -22,6 +22,8 @@ + #ifndef __MLIB_READ_STREAM_H__ + #define __MLIB_READ_STREAM_H__ + ++#include <boost/mpl/bool.hpp> ++ + #include "stream.h" + #include "filesystem.h" + +diff --git a/src/mlib/regex.cpp b/src/mlib/regex.cpp +index df98fdb..dc9ea62 100644 +--- a/src/mlib/regex.cpp ++++ b/src/mlib/regex.cpp +@@ -22,7 +22,7 @@ + #include "regex.h" + #include "string.h" + +-#include <boost/regex.hpp> ++#include <boost/regex/v4/regex.hpp> + + namespace re + { +diff --git a/src/mlib/regex.h b/src/mlib/regex.h +index 4a18717..8da1214 100644 +--- a/src/mlib/regex.h ++++ b/src/mlib/regex.h +@@ -27,6 +27,7 @@ + #include <boost/regex/v4/regbase.hpp> + #include <boost/regex/v4/match_flags.hpp> + ++#include <boost/mpl/bool.hpp> + #include <mlib/ptr.h> + + #include <string> +@@ -185,7 +186,7 @@ bool search(const std::string& s, + #define RG_EW "\\>" // конец слова + #define RG_SPS "[[:space:]]*" // пробелы + #define RG_NUM "([0-9]+)" // число +-#define RG_FLT RG_NUM"([\\.,]"RG_NUM")" // вещ. число, в паре с ExtractDouble() ++#define RG_FLT RG_NUM "([\\.,]" RG_NUM ")" // вещ. число, в паре с ExtractDouble() + #define RG_CMD_BEG RG_BW // "^"RG_SPS // начало команды + + bool ExtractDouble(double& val, const re::match_results& what, int idx = 1); +diff --git a/src/mlib/sdk/bfs.h b/src/mlib/sdk/bfs.h +index c12b5d0..6e172cc 100644 +--- a/src/mlib/sdk/bfs.h ++++ b/src/mlib/sdk/bfs.h +@@ -7,6 +7,7 @@ + //#define BOOST_FILESYSTEM_NO_DEPRECATED + + #include <boost/filesystem/path.hpp> ++#include <boost/filesystem/exception.hpp> + #include <boost/filesystem/operations.hpp> + #include <boost/filesystem/convenience.hpp> // fs::create_directories() + +diff --git a/src/mlib/sdk/misc.cpp b/src/mlib/sdk/misc.cpp +index 5d3f297..803187b 100644 +--- a/src/mlib/sdk/misc.cpp ++++ b/src/mlib/sdk/misc.cpp +@@ -173,12 +173,16 @@ std::string PointToStr(const Point& pnt) + std::string Double2Str(double val) + { + //return boost::format("%1%") % val % bf::stop; +- return (str::stream() << val).str(); ++ str::stream ss; ++ ss << val; ++ return ss.str(); + } + + std::string Int2Str(int val) + { +- return (str::stream() << val).str(); ++ str::stream ss; ++ ss << val; ++ return ss.str(); + } + + static bool ICaseMatch(const std::string& str, const std::string& pat_str) +diff --git a/src/mlib/sdk/system.cpp b/src/mlib/sdk/system.cpp +index 8d10e3f..e9508bd 100644 +--- a/src/mlib/sdk/system.cpp ++++ b/src/mlib/sdk/system.cpp +@@ -28,7 +28,9 @@ + int GetMemSize() + { + pid_t pid = getpid(); +- std::string str = (str::stream() << "/proc/" << pid << "/statm").str(); ++ str::stream ss; ++ ss << "/proc/" << pid << "/statm"; ++ std::string str = ss.str(); + + io::stream strm(str.c_str(), iof::in); + int mem; +diff --git a/src/mlib/tech.h b/src/mlib/tech.h +index 6ddadf8..f2e2c2a 100644 +--- a/src/mlib/tech.h ++++ b/src/mlib/tech.h +@@ -26,7 +26,7 @@ + // Технические вещи + // + #include <boost/current_function.hpp> // для BOOST_CURRENT_FUNCTION +-#include <boost/detail/endian.hpp> // для BOOST_XXX_ENDIAN ++#include <boost/predef/other/endian.h> // BOOST_ENDIAN_*_BYTE + #include <boost/version.hpp> // для BOOST_MINOR_VERSION + + // для С-шного кода в С++ +@@ -78,9 +78,9 @@ void AssertImpl(const char* assertion, const char* file, + long line, const char* function); + + // endianness +-#if defined(BOOST_BIG_ENDIAN) ++#if defined(BOOST_ENDIAN_BIG_BYTE) + # define HAS_BIG_ENDIAN +-#elif defined(BOOST_LITTLE_ENDIAN) ++#elif defined(BOOST_ENDIAN_LITTLE_BYTE) + # define HAS_LITTLE_ENDIAN + #else + # error mlib/tech.h: unknown endianness (legacy PDP arch?) +diff --git a/src/mlib/tests/test_utils.cpp b/src/mlib/tests/test_utils.cpp +index c4712e8..99a2e94 100644 +--- a/src/mlib/tests/test_utils.cpp ++++ b/src/mlib/tests/test_utils.cpp +@@ -139,17 +139,17 @@ BOOST_AUTO_TEST_CASE( TestFilesystem ) + #endif + } + +- // is_complete ++ // is_absolute + { + fs::path pth("../some_file"); +- BOOST_CHECK( !pth.is_complete() ); +- BOOST_CHECK( fs::current_path().is_complete() ); ++ BOOST_CHECK( !pth.is_absolute() ); ++ BOOST_CHECK( fs::current_path().is_absolute() ); + + fs::path apth = Project::MakeAbsolutePath(pth); + //LOG_INF << "Making abs path: " << pth.string() << " => " << apth.string() << io::endl; + +- BOOST_CHECK( Project::MakeAbsolutePath(pth, MakeRootComplete("/")).is_complete() ); +- BOOST_CHECK( !Project::MakeAbsolutePath(pth, "./").is_complete() ); ++ BOOST_CHECK( Project::MakeAbsolutePath(pth, MakeRootComplete("/")).is_absolute() ); ++ BOOST_CHECK( !Project::MakeAbsolutePath(pth, "./").is_absolute() ); + } + + // MakeRelativeToDir diff --git a/multimedia/bombono-dvd/patches/boost.patch b/multimedia/bombono-dvd/patches/boost.patch deleted file mode 100644 index 1bb95aaaa4..0000000000 --- a/multimedia/bombono-dvd/patches/boost.patch +++ /dev/null @@ -1,157 +0,0 @@ -diff -ru bombono-dvd-1.2.2/src/mbase/project/table.cpp new/src/mbase/project/table.cpp ---- bombono-dvd-1.2.2/src/mbase/project/table.cpp 2013-03-08 00:50:45.000000000 +0330 -+++ new/src/mbase/project/table.cpp 2016-01-19 13:02:00.117338769 +0330 -@@ -154,7 +154,7 @@ - void SerializePath(Archieve& ar, const char* tag_name, std::string& fpath) - { - //ar & NameValue("Path", mdPath); -- fs::path rel_to_dir = fs::path(AData().GetProjectFName()).branch_path(); -+ fs::path rel_to_dir = fs::path(AData().GetProjectFName()).parent_path(); - if( ar.IsLoad() ) - { - ar >> NameValue(tag_name, fpath); -diff -ru bombono-dvd-1.2.2/src/mgui/author/script.cpp new/src/mgui/author/script.cpp ---- bombono-dvd-1.2.2/src/mgui/author/script.cpp 2016-01-19 12:54:07.640700667 +0330 -+++ new/src/mgui/author/script.cpp 2016-01-19 12:59:52.407346489 +0330 -@@ -676,7 +676,7 @@ - if( !fs::exists(font_path) ) - { - std::string err_str; -- if( !CreateDirs(font_path.branch_path(), err_str) ) -+ if( !CreateDirs(font_path.parent_path(), err_str) ) - Error(err_str.c_str()); - fs::copy_file(DataDirPath("copy-n-paste/FreeSans.ttf"), font_path); - } -diff -ru bombono-dvd-1.2.2/src/mgui/mux.cpp new/src/mgui/mux.cpp ---- bombono-dvd-1.2.2/src/mgui/mux.cpp 2013-03-08 00:50:45.000000000 +0330 -+++ new/src/mgui/mux.cpp 2016-01-19 12:58:22.840685236 +0330 -@@ -162,7 +162,7 @@ - fs::path pth = GetFilename(v_btn); - if( pth.empty() ) - return; -- std::string folder = pth.branch_path().string(); -+ std::string folder = pth.parent_path().string(); - - if( a_btn.get_filename().empty() ) - a_btn.set_current_folder(folder); -diff -ru bombono-dvd-1.2.2/src/mgui/project/add.cpp new/src/mgui/project/add.cpp ---- bombono-dvd-1.2.2/src/mgui/project/add.cpp 2016-01-19 12:54:07.634034002 +0330 -+++ new/src/mgui/project/add.cpp 2016-01-19 13:00:49.220676388 +0330 -@@ -479,7 +479,7 @@ - MessageBox(BF_("The file \"%1%\" looks like VOB from DVD.\nRun import?") % leaf % bf::stop, - Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_OK_CANCEL) == Gtk::RESPONSE_OK ) - { -- DVD::RunImport(*GetTopWindow(brw), pth.branch_path().string()); -+ DVD::RunImport(*GetTopWindow(brw), pth.parent_path().string()); - return; - } - } -diff -ru bombono-dvd-1.2.2/src/mgui/project/serialize.cpp new/src/mgui/project/serialize.cpp ---- bombono-dvd-1.2.2/src/mgui/project/serialize.cpp 2013-03-08 00:50:45.000000000 +0330 -+++ new/src/mgui/project/serialize.cpp 2016-01-19 13:00:29.230677594 +0330 -@@ -73,7 +73,7 @@ - fs::path full_path(db.GetProjectFName()); - std::string res_str = fs::name_str(full_path); - if( with_path_breakdown ) -- res_str += " (" + full_path.branch_path().string() + ")"; -+ res_str += " (" + full_path.parent_path().string() + ")"; - return res_str; - } - -diff -ru bombono-dvd-1.2.2/src/mgui/timeline/select.cpp new/src/mgui/timeline/select.cpp ---- bombono-dvd-1.2.2/src/mgui/timeline/select.cpp 2013-03-08 00:50:45.000000000 +0330 -+++ new/src/mgui/timeline/select.cpp 2016-01-19 12:59:12.187348923 +0330 -@@ -152,7 +152,7 @@ - - mon.FramePixbuf()->save(fnam, ext); - -- SaveFrameDir() = fs::path(fnam).branch_path().string(); -+ SaveFrameDir() = fs::path(fnam).parent_path().string(); - if( add_btn.get_active() ) - Project::TryAddMediaQuiet(fnam, "SaveFrame"); - } -diff -ru bombono-dvd-1.2.2/src/mbase/project/table.cpp new/src/mbase/project/table.cpp ---- bombono-dvd-1.2.2/src/mbase/project/table.cpp 2016-01-19 13:11:42.883970202 +0330 -+++ new/src/mbase/project/table.cpp 2016-01-19 13:42:58.317190146 +0330 -@@ -162,7 +162,7 @@ - if( !fpath.empty() ) - { - fs::path pth(fpath); -- if( !pth.is_complete() ) -+ if( !pth.is_absolute() ) - fpath = (rel_to_dir/fpath).string(); - } - } -diff -ru bombono-dvd-1.2.2/src/mbase/project/tests/test_table.cpp new/src/mbase/project/tests/test_table.cpp ---- bombono-dvd-1.2.2/src/mbase/project/tests/test_table.cpp 2013-03-08 00:50:45.000000000 +0330 -+++ new/src/mbase/project/tests/test_table.cpp 2016-01-19 13:42:16.977192649 +0330 -@@ -129,7 +129,7 @@ - // проверка чтения/записи путей - boost::intrusive_ptr<StillImageMD> pict2 = ptr::dynamic_pointer_cast<StillImageMD>(ml[2]); - fs::path pth = pict2->GetPath(); -- BOOST_CHECK( pth.is_complete() ); -+ BOOST_CHECK( pth.is_absolute() ); - BOOST_CHECK( fs::exists(pth) ); - - // проверка ссылок -diff -ru bombono-dvd-1.2.2/src/mlib/tests/test_utils.cpp new/src/mlib/tests/test_utils.cpp ---- bombono-dvd-1.2.2/src/mlib/tests/test_utils.cpp 2013-03-08 00:50:45.000000000 +0330 -+++ new/src/mlib/tests/test_utils.cpp 2016-01-19 13:23:58.830592369 +0330 -@@ -139,17 +139,17 @@ - #endif - } - -- // is_complete -+ // is_absolute - { - fs::path pth("../some_file"); -- BOOST_CHECK( !pth.is_complete() ); -- BOOST_CHECK( fs::current_path().is_complete() ); -+ BOOST_CHECK( !pth.is_absolute() ); -+ BOOST_CHECK( fs::current_path().is_absolute() ); - - fs::path apth = Project::MakeAbsolutePath(pth); - //LOG_INF << "Making abs path: " << pth.string() << " => " << apth.string() << io::endl; - -- BOOST_CHECK( Project::MakeAbsolutePath(pth, MakeRootComplete("/")).is_complete() ); -- BOOST_CHECK( !Project::MakeAbsolutePath(pth, "./").is_complete() ); -+ BOOST_CHECK( Project::MakeAbsolutePath(pth, MakeRootComplete("/")).is_absolute() ); -+ BOOST_CHECK( !Project::MakeAbsolutePath(pth, "./").is_absolute() ); - } - - // MakeRelativeToDir -diff -ru bombono-dvd-1.2.2/src/mlib/filesystem.cpp new/src/mlib/filesystem.cpp ---- bombono-dvd-1.2.2/src/mlib/filesystem.cpp 2013-03-08 00:50:45.000000000 +0330 -+++ new/src/mlib/filesystem.cpp 2016-01-19 14:02:05.303787474 +0330 -@@ -161,25 +161,16 @@ - - fs::path MakeAbsolutePath(const fs::path& pth, const fs::path& cur_dir) - { -- fs::path res; -- -- if( pth.is_complete() ) -- res = pth; -- else -- { -- fs::path dir = cur_dir.empty() ? fs::current_path() : cur_dir ; -- res = dir/pth; -- } -- return res.normalize(); -+ return absolute(pth, cur_dir); - } - - // оба аргумента должны быть абсолютными путями - bool MakeRelativeToDir(fs::path& pth, fs::path dir) - { -- pth.normalize(); -- dir.normalize(); -- ASSERT( pth.is_complete() ); -- ASSERT( dir.is_complete() ); -+ pth = canonical(pth); -+ dir = canonical(dir); -+ ASSERT( pth.is_absolute() ); -+ ASSERT( dir.is_absolute() ); - - fs::path::iterator p_itr = pth.begin(), p_end = pth.end(); - fs::path::iterator d_itr = dir.begin(), d_end = dir.end(); - diff --git a/multimedia/bombono-dvd/patches/ffmpeg3.patch b/multimedia/bombono-dvd/patches/ffmpeg3.patch deleted file mode 100644 index ccf726cd1f..0000000000 --- a/multimedia/bombono-dvd/patches/ffmpeg3.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ruN old/src/mgui/ffviewer.cpp new/src/mgui/ffviewer.cpp ---- old/src/mgui/ffviewer.cpp 2016-06-18 11:37:10.409735832 +0430 -+++ new/src/mgui/ffviewer.cpp 2016-06-18 11:45:40.343038336 +0430 -@@ -36,6 +36,10 @@ - #define AVFORMAT_54 - #endif - -+C_LINKAGE_BEGIN -+#include <libavutil/imgutils.h> -+C_LINKAGE_END -+ - // разрабы libav считают себя самыми умными и потому решили - // закрыть простым смертным доступ к ffurl_register_protocol() - // (бывшая av_register_protocol2()),- https://bugzilla.libav.org/show_bug.cgi?id=224 -@@ -807,7 +811,7 @@ - #ifdef AVFRAME_INIT_CHANGE - // avcodec_get_frame_defaults() перенесли в avcodec_decode_video2() - #else -- avcodec_get_frame_defaults(&picture); // ffmpeg.c очищает каждый раз -+ av_frame_unref (&picture); - #endif - - #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52,25,00) - diff --git a/multimedia/bombono-dvd/patches/fix_c++11_literal_warnings.patch b/multimedia/bombono-dvd/patches/fix_c++11_literal_warnings.patch deleted file mode 100644 index 5cfc96f47e..0000000000 --- a/multimedia/bombono-dvd/patches/fix_c++11_literal_warnings.patch +++ /dev/null @@ -1,174 +0,0 @@ -diff -ruN old/src/mlib/regex.h new/src/mlib/regex.h ---- old/src/mlib/regex.h 2016-04-10 15:15:39.000000000 +0430 -+++ new/src/mlib/regex.h 2016-06-18 11:02:30.666528235 +0430 -@@ -185,7 +185,7 @@ - #define RG_EW "\\>" // конец слова - #define RG_SPS "[[:space:]]*" // пробелы - #define RG_NUM "([0-9]+)" // число --#define RG_FLT RG_NUM"([\\.,]"RG_NUM")" // вещ. число, в паре с ExtractDouble() -+#define RG_FLT RG_NUM "([\\.,]" RG_NUM ")" // вещ. число, в паре с ExtractDouble() - #define RG_CMD_BEG RG_BW // "^"RG_SPS // начало команды - - bool ExtractDouble(double& val, const re::match_results& what, int idx = 1); -diff -ruN old/src/mgui/author/burn.cpp new/src/mgui/author/burn.cpp ---- old/src/mgui/author/burn.cpp 2016-04-10 15:15:39.000000000 +0430 -+++ new/src/mgui/author/burn.cpp 2016-06-18 11:04:08.113189012 +0430 -@@ -85,7 +85,7 @@ - return bd; - } - --re::pattern WriteSpeed_RE("Write Speed #"RG_NUM":"RG_SPS RG_NUM"\\."RG_NUM "x1385"); -+re::pattern WriteSpeed_RE("Write Speed #" RG_NUM ":" RG_SPS RG_NUM "\\." RG_NUM "x1385"); - - RefPtr<Gtk::ListStore> sp_store; - -@@ -253,7 +253,7 @@ - } - else - { -- static re::pattern media_type_re("Mounted Media:"RG_SPS"[0-9A-F]+h, ([^ \n]+)"); -+ static re::pattern media_type_re("Mounted Media:" RG_SPS "[0-9A-F]+h, ([^ \n]+)"); - re::match_results what; - - bool is_found = re::search(out_info, what, media_type_re); -@@ -277,7 +277,7 @@ - // isBlank - if( res != dvdOTHER ) - { -- static re::pattern media_status_re("Disc status:"RG_SPS"([a-z]+)\n"); -+ static re::pattern media_status_re("Disc status:" RG_SPS "([a-z]+)\n"); - bool is_found = re::search(out_info, what, media_status_re); - ASSERT_RTL( is_found ); - -diff -ruN old/src/mgui/author/execute.cpp new/src/mgui/author/execute.cpp ---- old/src/mgui/author/execute.cpp 2016-04-10 15:15:39.000000000 +0430 -+++ new/src/mgui/author/execute.cpp 2016-06-18 11:07:03.359845082 +0430 -@@ -64,9 +64,9 @@ - tag->property_foreground() = "darkgreen"; - } - --re::pattern DVDAuthorRE(RG_CMD_BEG"dvdauthor"RG_EW ".*-x"RG_EW RG_SPS RG_BW"DVDAuthor\\.xml"RG_EW); --re::pattern MkIsoFsRE(RG_CMD_BEG MK_ISO_CMD RG_EW ".*-dvd-video"RG_EW ".*>.*"RG_BW"dvd.iso"RG_EW); --re::pattern GrowIsoFsRE(RG_CMD_BEG"growisofs"RG_EW ".*-dvd-compat"RG_EW ".*-dvd-video"RG_EW); -+re::pattern DVDAuthorRE(RG_CMD_BEG"dvdauthor" RG_EW ".*-x" RG_EW RG_SPS RG_BW "DVDAuthor\\.xml" RG_EW); -+re::pattern MkIsoFsRE(RG_CMD_BEG MK_ISO_CMD RG_EW ".*-dvd-video" RG_EW ".*>.*" RG_BW "dvd.iso" RG_EW); -+re::pattern GrowIsoFsRE(RG_CMD_BEG"growisofs" RG_EW ".*-dvd-compat" RG_EW ".*-dvd-video" RG_EW); - - //static void PrintMatchResults(const re::match_results& what) - //{ -@@ -94,7 +94,7 @@ - virtual void Filter(const std::string& line); - }; - --re::pattern MkIsoFsPercent_RE( RG_FLT"?% done"); -+re::pattern MkIsoFsPercent_RE( RG_FLT "?% done"); - - void MkIsoFsPP::Filter(const std::string& line) - { -@@ -126,8 +126,8 @@ - bool fixStage; - }; - --re::pattern DVDAuthorVOB_RE( "^STAT: VOBU "RG_NUM" at "RG_NUM"MB"); --re::pattern DVDAuthorFix_RE( "^STAT: fixing VOBU at "RG_NUM"MB \\("RG_NUM"/"RG_NUM", "RG_NUM"%\\)"); -+re::pattern DVDAuthorVOB_RE( "^STAT: VOBU " RG_NUM " at " RG_NUM "MB"); -+re::pattern DVDAuthorFix_RE( "^STAT: fixing VOBU at " RG_NUM "MB \\(" RG_NUM "/" RG_NUM ", " RG_NUM "%\\)"); - - void DVDAuthorPP::Filter(const std::string& line) - { -@@ -157,7 +157,7 @@ - if( p ) - of.SetProgress(p); - -- static re::pattern ch_error_re("ERR:.*Cannot jump to chapter "RG_NUM" of title "RG_NUM", only "RG_NUM" exist"); -+ static re::pattern ch_error_re("ERR:.*Cannot jump to chapter " RG_NUM " of title " RG_NUM ", only " RG_NUM " exist"); - if( re::search(line, what, ch_error_re) ) - { - std::string& err_str = of.firstError; -diff -ruN old/src/mgui/author/render.cpp new/src/mgui/author/render.cpp ---- old/src/mgui/author/render.cpp 2016-04-10 15:15:39.000000000 +0430 -+++ new/src/mgui/author/render.cpp 2016-06-18 11:08:43.919839004 +0430 -@@ -866,7 +866,7 @@ - // - // :KLUDGE: (только) в ffmpeg, avformat 53.13.0, поменяли . на : => надо - // самим открывать файл и узнавать индекс! -- static re::pattern audio_idx("Stream #"RG_NUM"[\\.|:]"RG_NUM".*Audio:"); -+ static re::pattern audio_idx("Stream #" RG_NUM "[\\.|:]" RG_NUM ".*Audio:"); - - re::match_results what; - // флаг означает, что перевод строки не может быть точкой -@@ -1221,17 +1221,17 @@ - { - CheckNoCodecs(CheckForCodecList(conts)); - -- static re::pattern dvd_format("^ .E dvd"RG_EW); -+ static re::pattern dvd_format("^ .E dvd" RG_EW); - CheckStrippedFFmpeg(dvd_format, conts, "dvd format"); - - // :TRICKY: с версии libavcodec 54 при выводе начальный пробел не ставят => поэтому ? - // ("спасибо" Anton Khirnov за очередное "улучшение") - #define _CPP_ "^ ?" -- static re::pattern mpeg2video_codec(_CPP_".EV... mpeg2video"RG_EW); -+ static re::pattern mpeg2video_codec(_CPP_ ".EV... mpeg2video" RG_EW); - CheckStrippedFFmpeg(mpeg2video_codec, conts, "mpeg2 video encoder"); - - // по факту ffmpeg всегда использует ac3, однако mp2 тоже возможен -- static re::pattern ac3_codec(_CPP_".EA... ac3"RG_EW); -+ static re::pattern ac3_codec(_CPP_ ".EA... ac3" RG_EW); - CheckStrippedFFmpeg(ac3_codec, conts, "ac3 audio encoder"); - #undef _CPP_ - } -@@ -1241,7 +1241,7 @@ - // * ищем версию libavfilter - // пример: " libavfilter 0. 4. 0 / " - #define RG_PADNUM RG_SPS RG_NUM -- std::string reg_str = boost::format(RG_BW"%1%"RG_PADNUM"\\."RG_PADNUM"\\."RG_PADNUM" / ") -+ std::string reg_str = boost::format(RG_BW "%1%" RG_PADNUM "\\." RG_PADNUM "\\." RG_PADNUM " / ") - % avlib_name % bf::stop; - re::pattern avfilter_version(reg_str.c_str()); - return FindVersion(conts, avfilter_version, AVCnvBin(), avlib_name); -diff -ruN old/src/mgui/author/script.cpp new/src/mgui/author/script.cpp ---- old/src/mgui/author/script.cpp 2016-04-10 15:15:39.000000000 +0430 -+++ new/src/mgui/author/script.cpp 2016-06-18 11:09:54.899834712 +0430 -@@ -755,9 +755,9 @@ - // ffmpeg выводит статистику первого создаваемого файла каждые полсекунды, - // см. print_report() (при verbose=1, по умолчанию) - // Формат размера: "size=%8.0fkB" --re::pattern FFmpegSizePat( "size= *"RG_NUM"kB"); -+re::pattern FFmpegSizePat( "size= *" RG_NUM "kB"); - // Формат длительности: "time=%0.2f" --re::pattern FFmpegDurPat( "time="RG_FLT); -+re::pattern FFmpegDurPat( "time=" RG_FLT); - - static void OnTranscodePrintParse(const char* dat, int sz, const PercentFunctor& fnr) - { -@@ -787,7 +787,7 @@ - - // Формат длительности для ffmpeg c коммита dd471070: "time=%02d:%02d:%02d.%02d" - // Образец: frame= 208 fps= 58 q=2.0 size= 476kB time=00:00:08.44 bitrate= 461.9kbits/s dup=1 drop=0 --re::pattern FFmpegNewDurPat( "time="RG_NUM":"RG_NUM":"RG_FLT); -+re::pattern FFmpegNewDurPat( "time=" RG_NUM ":" RG_NUM ":" RG_FLT); - - static void OnTranscodeHMSParse(const char* dat, int sz, const PercentFunctor& fnr) - { -@@ -1136,7 +1136,7 @@ - // 2) парсер dvdauthor не любит незнакомые ему атрибуты => spumux < 0.7 не работает - std::string help_str; - PipeOutput("spumux -h", help_str); -- static re::pattern spumux_version("DVDAuthor::spumux, version "RG_NUM"\\."RG_NUM"\\."RG_NUM"\\.\n"); -+ static re::pattern spumux_version("DVDAuthor::spumux, version " RG_NUM "\\." RG_NUM "\\." RG_NUM "\\.\n"); - if( IsVersionGE(FindVersion(help_str, spumux_version, "spumux"), TripleVersion(0, 7, 0)) ) - AddFormatAttr(sp); - -diff -ruN old/src/mgui/project/browser.cpp new/src/mgui/project/browser.cpp ---- old/src/mgui/project/browser.cpp 2016-04-10 15:15:39.000000000 +0430 -+++ new/src/mgui/project/browser.cpp 2016-06-18 11:10:21.113166461 +0430 -@@ -328,7 +328,7 @@ - return hb; - } - --std::string MediaItemDnDTVType() { return "DnDTreeView<"DND_MI_NAME">"; } -+std::string MediaItemDnDTVType() { return "DnDTreeView<" DND_MI_NAME ">"; } - - void SetupBrowser(ObjectBrowser& brw, int dnd_column, bool is_media_brw) - { diff --git a/multimedia/bombono-dvd/patches/fix_ffmpeg_codecid.patch b/multimedia/bombono-dvd/patches/fix_ffmpeg_codecid.patch deleted file mode 100644 index 6474693db4..0000000000 --- a/multimedia/bombono-dvd/patches/fix_ffmpeg_codecid.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -u -r -N old/src/mgui/ffviewer.cpp new/src/mgui/ffviewer.cpp ---- old/src/mgui/ffviewer.cpp 2016-04-10 15:15:39.000000000 +0430 -+++ new/src/mgui/ffviewer.cpp 2016-06-18 10:40:26.789941610 +0430 -@@ -74,7 +74,7 @@ - - typedef struct AVCodecTag { - #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52,39,00) -- enum CodecID id; -+ enum AVCodecID id; - #else - int id; - #endif -@@ -82,14 +82,14 @@ - } AVCodecTag; - - #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52,34,00) --static uint FFCodecID2Tag(CodecID codec_id) -+static uint FFCodecID2Tag(AVCodecID codec_id) - { - unsigned int ff_codec_get_tag(const AVCodecTag *tags, int id); - extern const AVCodecTag ff_codec_bmp_tags[]; - return ff_codec_get_tag(ff_codec_bmp_tags, codec_id); - } - #else --static uint FFCodecID2Tag(CodecID codec_id) -+static uint FFCodecID2Tag(AVCodecID codec_id) - { - unsigned int codec_get_tag(const AVCodecTag *tags, int id); - extern const AVCodecTag codec_bmp_tags[]; -@@ -400,7 +400,7 @@ - return (tag>>bit_begin) & 0xFF; - } - --static std::string CodecID2Str(CodecID codec_id) -+static std::string CodecID2Str(AVCodecID codec_id) - { - #ifdef _MSC_VER - std::string tag_str = boost::format("%1%") % codec_id % bf::stop; - diff --git a/multimedia/bombono-dvd/patches/fix_operator_ambiguity.patch b/multimedia/bombono-dvd/patches/fix_operator_ambiguity.patch deleted file mode 100644 index 5fcfaf0466..0000000000 --- a/multimedia/bombono-dvd/patches/fix_operator_ambiguity.patch +++ /dev/null @@ -1,352 +0,0 @@ -diff -ruN old/src/mbase/project/serialization.h new/src/mbase/project/serialization.h ---- old/src/mbase/project/serialization.h 2017-06-01 13:54:44.086895687 +0430 -+++ new/src/mbase/project/serialization.h 2017-06-01 14:09:16.523275880 +0430 -@@ -75,7 +75,9 @@ - template<typename T> - std::string MakeString(const T& t) - { -- return (str::stream() << t).str(); -+ str::stream ss; -+ ss << t; -+ return ss.str(); - } - - template<typename T> -diff -ruN old/src/mgui/dvdimport.cpp new/src/mgui/dvdimport.cpp ---- old/src/mgui/dvdimport.cpp 2017-06-01 13:54:44.086895687 +0430 -+++ new/src/mgui/dvdimport.cpp 2017-06-01 14:06:42.488114237 +0430 -@@ -211,10 +211,11 @@ - row[VF().selState] = false; - row[VF().name] = VobFName(vob.pos); - row[VF().thumbnail] = vob.aspect == af4_3 ? pix4_3 : pix16_9; -- std::string desc = (str::stream(Mpeg::SecToHMS(vob.tmLen, true)) << ", " -- << vob.sz.x << "x" << vob.sz.y << ", " -- << (vob.aspect == af4_3 ? "4:3" : "16:9") << ", " -- << std::fixed << std::setprecision(2) << vob.Count()/512. << " " << _("MB")).str(); -+ str::stream ss (Mpeg::SecToHMS(vob.tmLen, true)); -+ ss << ", " << vob.sz.x << "x" << vob.sz.y << ", " -+ << (vob.aspect == af4_3 ? "4:3" : "16:9") << ", " -+ << std::fixed << std::setprecision(2) << vob.Count()/512. << " " << _("MB"); -+ std::string desc = ss.str(); - row[VF().desc] = desc; - } - CompleteSelection(id, false); -diff -ruN old/src/mbase/project/media.cpp new/src/mbase/project/media.cpp ---- old/src/mbase/project/media.cpp 2017-06-01 14:25:09.492134844 +0430 -+++ new/src/mbase/project/media.cpp 2017-06-01 14:37:53.196336367 +0430 -@@ -58,7 +58,9 @@ - - std::string MakeAutoName(const std::string& str, int old_sz) - { -- return (str::stream() << str << " " << old_sz+1).str(); -+ str::stream ss; -+ ss << str << " " << old_sz+1; -+ return ss.str(); - } - - void VideoMD::AddChapter(ChapterItem chp) -diff -ruN old/src/mbase/project/menu.cpp new/src/mbase/project/menu.cpp ---- old/src/mbase/project/menu.cpp 2017-06-01 14:25:09.495468141 +0430 -+++ new/src/mbase/project/menu.cpp 2017-06-01 14:39:42.004331141 +0430 -@@ -166,7 +166,9 @@ - static std::string MakeObjectPath(int idx, const char* type) - { - ASSERT( idx != NO_HNDL ); -- return (str::stream() << type << "." << idx).str(); -+ str::stream ss; -+ ss << type << "." << idx; -+ return ss.str(); - } - - std::string GetMediaRef(MediaItem mi) -@@ -197,7 +199,9 @@ - void RefMaker::Visit(VideoChapterMD& obj) - { - refStr = GetMediaRef(obj.owner); -- refStr += (str::stream() << "." << ChapterPosInt(&obj)).str(); -+ str::stream ss; -+ ss << "." << ChapterPosInt(&obj); -+ refStr += ss.str(); - } - - std::string Media2Ref(MediaItem mi) -@@ -233,8 +237,9 @@ - - std::string ThrowBadIndex(const char* prefix, int idx) - { -- throw std::runtime_error( -- (str::stream() << prefix << idx).str() ); -+ str::stream ss; -+ ss << prefix << idx; -+ throw std::runtime_error(ss.str()); - } - - MediaItem TryGetMedia(int idx) -diff -ruN old/src/mbase/project/srl-common.cpp new/src/mbase/project/srl-common.cpp ---- old/src/mbase/project/srl-common.cpp 2017-06-01 14:25:09.495468141 +0430 -+++ new/src/mbase/project/srl-common.cpp 2017-06-01 14:40:56.524722225 +0430 -@@ -36,10 +36,12 @@ - std::string ToString(const RGBA::Pixel& pxl) - { - using Mpeg::set_hms; -- return (str::stream("#") << std::hex -- << set_hms() << (int)pxl.red -- << set_hms() << (int)pxl.green -- << set_hms() << (int)pxl.blue << (int)pxl.alpha).str(); -+ str::stream ss ("#"); -+ ss << std::hex -+ << set_hms() << (int)pxl.red -+ << set_hms() << (int)pxl.green -+ << set_hms() << (int)pxl.blue << (int)pxl.alpha; -+ return ss.str(); - } - - // как pango_color_parse() -diff -ruN old/src/mgui/author/render.cpp new/src/mgui/author/render.cpp ---- old/src/mgui/author/render.cpp 2017-06-01 14:25:09.498801438 +0430 -+++ new/src/mgui/author/render.cpp 2017-06-01 14:28:08.901379890 +0430 -@@ -1307,7 +1307,9 @@ - - bool RenderMainPicture(const std::string& out_dir, Menu mn, int i) - { -- Author::Info((str::stream() << "Rendering menu \"" << mn->mdName << "\" ...").str()); -+ str::stream ss; -+ ss << "Rendering menu \"" << mn->mdName << "\" ..."; -+ Author::Info(ss.str()); - const std::string mn_dir = MakeMenuPath(out_dir, mn, i); - - if( IsMotion(mn) ) -diff -ruN old/src/mgui/author/script.cpp new/src/mgui/author/script.cpp ---- old/src/mgui/author/script.cpp 2017-06-01 14:25:09.498801438 +0430 -+++ new/src/mgui/author/script.cpp 2017-06-01 14:31:23.248978018 +0430 -@@ -130,7 +130,9 @@ - { - VideoItem vi = IsVideo(mi); - ASSERT( vi ); -- str = (str::stream() << "title " << GetAuthorNumber(vi)).str(); -+ str::stream ss; -+ ss << "title " << GetAuthorNumber(vi); -+ str = ss.str(); - } - return str; - } -@@ -179,7 +181,9 @@ - // Потому: для удоства пользователей даем создавать нулевую главу, разрешая это здесь - // (однако доп. нулевые главы будут приводить к ошибке Cannot jump to chapter N ... only M exist) - int c_num = ChapterPosInt(&obj) + (owner->List()[0]->chpTime ? 2 : 1) ; -- res = (str::stream() << "jump title " << v_num << " chapter " << c_num << ";").str(); -+ str::stream ss; -+ ss << "jump title " << v_num << " chapter " << c_num << ";"; -+ res = ss.str(); - } - - static std::string MakeButtonJump(MediaItem mi, bool vts_domain) -@@ -204,7 +208,9 @@ - if( !fs::native(name) ) - name = "Menu"; - -- std::string fname = (str::stream() << idx+1 << "." << name).str(); -+ str::stream ss; -+ ss << idx+1 << "." << name; -+ std::string fname = ss.str(); - return cnv_from_utf8 ? ConvertPathFromUtf8(fname) : fname ; - } - -@@ -626,7 +632,9 @@ - void AuthorSectionInfo(const std::string& str) - { - Author::Info("\n#", false); -- Author::Info((str::stream() << "# " << str).str(), false); -+ str::stream ss; -+ ss << "# " << str; -+ Author::Info(ss.str(), false); - Author::Info("#\n", false); - } - -@@ -1082,7 +1090,9 @@ - - static void AuthorImpl(const std::string& out_dir) - { -- AuthorSectionInfo((str::stream() << "Build DVD-Video in folder: " << out_dir).str()); -+ str::stream ss; -+ ss << "Build DVD-Video in folder: " << out_dir; -+ AuthorSectionInfo(ss.str()); - IteratePendingEvents(); - - IndexVideosForAuthoring(); -diff -ruN old/src/mgui/project/add.cpp new/src/mgui/project/add.cpp ---- old/src/mgui/project/add.cpp 2017-06-01 14:25:09.498801438 +0430 -+++ new/src/mgui/project/add.cpp 2017-06-01 14:33:26.303387642 +0430 -@@ -86,7 +86,9 @@ - - static std::string FpsToStr(const Point& frate) - { -- return (str::stream() << (double)frate.x/frate.y).str(); -+ str::stream ss; -+ ss << (double)frate.x/frate.y; -+ return ss.str(); - } - - static std::string TVTypeStr(bool is_ntsc) -@@ -163,7 +165,9 @@ - // * - bool is_aspect_ok = vid.sarCode == af4_3 || vid.sarCode == af16_9; - Point aspect = vid.SizeAspect(); -- std::string aspect_str = (str::stream() << aspect.x << ':' << aspect.y).str(); -+ str::stream ss; -+ ss << aspect.x << ':' << aspect.y; -+ std::string aspect_str = ss.str(); - SetImportError(ed, is_aspect_ok, - std::string(_("Aspect ratio")) + ": \t" + MarkError(aspect_str, is_aspect_ok), - BF_(Descriptions[2]) % tv_type % bf::stop); -diff -ruN old/src/mgui/sdk/cairo_utils.cpp new/src/mgui/sdk/cairo_utils.cpp ---- old/src/mgui/sdk/cairo_utils.cpp 2017-06-01 14:25:09.498801438 +0430 -+++ new/src/mgui/sdk/cairo_utils.cpp 2017-06-01 14:35:20.831246046 +0430 -@@ -27,6 +27,8 @@ - std::string MakeSVGFilename(const char* prefix) - { - static int idx = 1; -- return (str::stream() << prefix << "-" << Mpeg::set_hms() << idx++ << ".svg" ).str(); -+ str::stream ss; -+ ss << prefix << "-" << Mpeg::set_hms() << idx++ << ".svg"; -+ return ss.str(); - } - -diff -ruN old/src/mgui/timeline/layout.cpp new/src/mgui/timeline/layout.cpp ---- old/src/mgui/timeline/layout.cpp 2017-06-01 14:25:09.502134734 +0430 -+++ new/src/mgui/timeline/layout.cpp 2017-06-01 14:36:36.152095784 +0430 -@@ -600,8 +600,10 @@ - void FramesToTime(std::string& str, int cnt, double fps) - { - time4_t t4 = FramesToTime(cnt, fps); -- str = (str::stream() << Mpeg::set_hms() << t4.hh << ":" << Mpeg::set_hms() << t4.mm << ":" -- << Mpeg::set_hms() << t4.ss << ";" << Mpeg::set_hms() << t4.ff).str(); -+ str::stream ss; -+ ss << Mpeg::set_hms() << t4.hh << ":" << Mpeg::set_hms() << t4.mm << ":" -+ << Mpeg::set_hms() << t4.ss << ";" << Mpeg::set_hms() << t4.ff; -+ str = ss.str(); - } - - } // namespace TimeLine -diff -ruN old/src/mgui/win_utils.cpp new/src/mgui/win_utils.cpp ---- old/src/mgui/win_utils.cpp 2017-06-01 14:25:09.498801438 +0430 -+++ new/src/mgui/win_utils.cpp 2017-06-01 14:26:50.898112082 +0430 -@@ -132,7 +132,9 @@ - - std::string ColorToString(const unsigned int rgba) - { -- return (str::stream() << std::hex << (rgba >> 8)).str(); -+ str::stream ss; -+ ss << std::hex << (rgba >> 8); -+ return ss.str(); - } - - CR::Color GetBGColor(Gtk::Widget& wdg) -diff -ruN old/src/mdemux/dvdread.cpp new/src/mdemux/dvdread.cpp ---- old/src/mdemux/dvdread.cpp 2017-06-01 14:48:30.110355679 +0430 -+++ new/src/mdemux/dvdread.cpp 2017-06-01 14:50:50.141065674 +0430 -@@ -35,8 +35,10 @@ - std::string VobFName(VobPos& pos, const std::string& suffix) - { - using Mpeg::set_hms; -- return (str::stream("Video") << set_hms() << int(pos.Vts()) -- << "-" << set_hms() << pos.VobId() << suffix << ".vob").str(); -+ str::stream ss ("Video"); -+ ss << set_hms() << int(pos.Vts()) -+ << "-" << set_hms() << pos.VobId() << suffix << ".vob"; -+ return ss.str(); - } - - typedef boost::function<void(int, double)> VobTimeFnr; -@@ -282,9 +284,11 @@ - static void TryDVDReadBlocks(dvd_file_t* file, int off, size_t cnt, char* buf) - { - int real_cnt = DVDReadBlocks(file, off, cnt, (unsigned char*)buf); -- if( (int)cnt != real_cnt ) -- throw std::runtime_error( (str::stream() << real_cnt << -- " != DVDReadBlocks(" << cnt << ")").str() ); -+ if( (int)cnt != real_cnt ) { -+ str::stream ss; -+ ss << real_cnt << " != DVDReadBlocks(" << cnt << ")"; -+ throw std::runtime_error( ss.str() ); -+ } - } - - // размер буфера должен соответствовать читаемому диапазону -diff -ruN old/src/mdemux/mpeg2demux.cpp new/src/mdemux/mpeg2demux.cpp ---- old/src/mdemux/mpeg2demux.cpp 2017-06-01 14:48:30.110355679 +0430 -+++ new/src/mdemux/mpeg2demux.cpp 2017-06-01 14:55:35.784165916 +0430 -@@ -71,7 +71,9 @@ - - static std::string MakePESKey(int id, const char* ext) - { -- return (str::stream() << id << "." << ext).str(); -+ str::stream ss; -+ ss << id << "." << ext; -+ return ss.str(); - } - - static bool ReadPart(io::stream& strm, uint8_t* buf, int sz, int& len) -@@ -110,7 +112,9 @@ - ASSERT(0); - } - -- std::string header_str = (str::stream() << sample_rate << ":" << channels << ":" << bps << ".lpcm").str(); -+ str::stream ss; -+ ss << sample_rate << ":" << channels << ":" << bps << ".lpcm"; -+ std::string header_str = ss.str(); - return MakePESKey(track, header_str.c_str()); - } - -diff -ruN old/src/mdemux/seek.cpp new/src/mdemux/seek.cpp ---- old/src/mdemux/seek.cpp 2017-06-01 14:48:30.110355679 +0430 -+++ new/src/mdemux/seek.cpp 2017-06-01 14:52:09.669280234 +0430 -@@ -37,8 +37,10 @@ - int hh = min / 60; - int mm = min - hh*60; - -- return (str::stream() << set_hms() << hh << ":" -- << set_hms() << mm << ":" << set_hms() << ss).str(); -+ str::stream strss; -+ strss << set_hms() << hh << ":" -+ << set_hms() << mm << ":" << set_hms() << ss; -+ return strss.str(); - } - - bool MediaInfo::InitBegin(VideoLine& vl) -diff -ruN old/src/mlib/sdk/misc.cpp new/src/mlib/sdk/misc.cpp ---- old/src/mlib/sdk/misc.cpp 2017-06-01 14:48:30.120355606 +0430 -+++ new/src/mlib/sdk/misc.cpp 2017-06-01 14:53:25.504549937 +0430 -@@ -173,12 +173,16 @@ - std::string Double2Str(double val) - { - //return boost::format("%1%") % val % bf::stop; -- return (str::stream() << val).str(); -+ str::stream ss; -+ ss << val; -+ return ss.str(); - } - - std::string Int2Str(int val) - { -- return (str::stream() << val).str(); -+ str::stream ss; -+ ss << val; -+ return ss.str(); - } - - static bool ICaseMatch(const std::string& str, const std::string& pat_str) -diff -ruN old/src/mlib/sdk/system.cpp new/src/mlib/sdk/system.cpp ---- old/src/mlib/sdk/system.cpp 2017-06-01 14:48:30.120355606 +0430 -+++ new/src/mlib/sdk/system.cpp 2017-06-01 14:54:13.980777662 +0430 -@@ -28,7 +28,9 @@ - int GetMemSize() - { - pid_t pid = getpid(); -- std::string str = (str::stream() << "/proc/" << pid << "/statm").str(); -+ str::stream ss; -+ ss << "/proc/" << pid << "/statm"; -+ std::string str = ss.str(); - - io::stream strm(str.c_str(), iof::in); - int mem; diff --git a/multimedia/bombono-dvd/patches/fix_ptr2bool_cast.patch b/multimedia/bombono-dvd/patches/fix_ptr2bool_cast.patch deleted file mode 100644 index 4999db1ca4..0000000000 --- a/multimedia/bombono-dvd/patches/fix_ptr2bool_cast.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -ruN old/src/mgui/dvdimport.cpp new/src/mgui/dvdimport.cpp ---- old/src/mgui/dvdimport.cpp 2016-04-10 15:15:39.000000000 +0430 -+++ new/src/mgui/dvdimport.cpp 2016-06-18 10:52:35.713230871 +0430 -@@ -275,7 +275,7 @@ - id.errLbl.hide(); - - id.reader = rd; -- SetCurPageComplete(id.ast, id.reader); -+ SetCurPageComplete(id.ast, bool(id.reader)); - - return rd; - } - diff --git a/multimedia/bombono-dvd/patches/fix_throw_specifications.patch b/multimedia/bombono-dvd/patches/fix_throw_specifications.patch deleted file mode 100644 index f2f4c40d4f..0000000000 --- a/multimedia/bombono-dvd/patches/fix_throw_specifications.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ruN old/src/mbase/project/table.h new/src/mbase/project/table.h ---- old/src/mbase/project/table.h 2017-06-01 13:54:44.086895687 +0430 -+++ new/src/mbase/project/table.h 2017-06-01 13:55:58.089107253 +0430 -@@ -128,7 +128,7 @@ - void ClearSettings(); - - void Load(const std::string& fname, -- const std::string& cur_dir = std::string()) throw (std::exception); -+ const std::string& cur_dir = std::string()); - bool Save(); - - bool SaveAs(const std::string& fname, -diff -ruN old/src/mbase/project/srl-db.cpp new/src/mbase/project/srl-db.cpp ---- old/src/mbase/project/srl-db.cpp 2017-06-01 14:25:09.495468141 +0430 -+++ new/src/mbase/project/srl-db.cpp 2017-06-01 14:41:49.699901753 +0430 -@@ -102,7 +102,7 @@ - } - - void ADatabase::Load(const std::string& fname, -- const std::string& cur_dir) throw (std::exception) -+ const std::string& cur_dir) - { - try - { diff --git a/multimedia/bombono-dvd/patches/scons.diff b/multimedia/bombono-dvd/patches/scons.diff new file mode 100644 index 0000000000..d45d1d4d1f --- /dev/null +++ b/multimedia/bombono-dvd/patches/scons.diff @@ -0,0 +1,221 @@ +diff -Naur bombono-dvd-1.2.4/SConstruct bombono-dvd-1.2.4.patched/SConstruct +--- bombono-dvd-1.2.4/SConstruct 2016-04-10 06:45:39.000000000 -0400 ++++ bombono-dvd-1.2.4.patched/SConstruct 2022-02-15 13:53:32.444205004 -0500 +@@ -274,13 +274,13 @@ + # Config + + if os.path.exists( BV.CfgFile ): +- print "Using config file: " + BV.CfgFile ++ print("Using config file: " + BV.CfgFile) + + user_options = Variables(BV.CfgFile, BV.Args) + ParseVariables(user_options) + + else: +- print "Creating new config file: " + BV.CfgFile ++ print("Creating new config file: " + BV.CfgFile) + + user_options = Variables(None, BV.Args) + ParseVariables(user_options) +@@ -352,20 +352,19 @@ + + def GenerateBaseConfigH(target, source, env): + cfg_file = open(target[0].path, 'w') +- print >> cfg_file, "/* Generated by means of Autoconfig */" ++ print("/* Generated by means of Autoconfig */", file=cfg_file) + + config_dict = user_options_dict['CONFIGURATION'] +- key_list = config_dict.keys() +- key_list.sort() ++ key_list = sorted(config_dict) + + for key in key_list: + var = config_dict[key] + + text = var.get('text', None) + if text: +- print >> cfg_file ++ print("", file=cfg_file) + BV.AddComment(cfg_file, var) +- print >> cfg_file, text ++ print(text, file=cfg_file) + continue + + BV.AddDefine(cfg_file, key, **var) +diff -Naur bombono-dvd-1.2.4/libs/mpeg2dec/SConscript bombono-dvd-1.2.4.patched/libs/mpeg2dec/SConscript +--- bombono-dvd-1.2.4/libs/mpeg2dec/SConscript 2016-04-10 06:45:39.000000000 -0400 ++++ bombono-dvd-1.2.4.patched/libs/mpeg2dec/SConscript 2022-02-15 13:47:04.028766834 -0500 +@@ -69,9 +69,9 @@ + + def GenerateMpeg2DecCfg(target, source, env): + cfg_file = open(target[0].path, 'w') +- print >> cfg_file, "/* Auto-generated header */" +- print >> cfg_file +- print >> cfg_file, '#include <cfg/config.h>' ++ print("/* Auto-generated header */", file=cfg_file) ++ print("", file=cfg_file) ++ print('#include <cfg/config.h>', file=cfg_file) + + BuildVars.AddDefine(cfg_file, 'ACCEL_DETECT', is_on = 1, comment = "autodetect accelerations") + BuildVars.AddDefine(cfg_file, 'LIBVO_DX', is_on = 0, comment = "libvo DirectX support") +diff -Naur bombono-dvd-1.2.4/po/SConscript bombono-dvd-1.2.4.patched/po/SConscript +--- bombono-dvd-1.2.4/po/SConscript 2016-04-10 06:45:39.000000000 -0400 ++++ bombono-dvd-1.2.4.patched/po/SConscript 2022-02-15 13:47:04.028766834 -0500 +@@ -35,7 +35,7 @@ + str(source[0]), + str(source[1]), + ] +- print 'Updating ' + trgt ++ print('Updating ' + trgt) + return os.spawnvp(os.P_WAIT, 'msgmerge', args) + + po_bld = Builder (action = po_builder) +diff -Naur bombono-dvd-1.2.4/src/mgui/tests/SConscript bombono-dvd-1.2.4.patched/src/mgui/tests/SConscript +--- bombono-dvd-1.2.4/src/mgui/tests/SConscript 2016-04-10 06:45:39.000000000 -0400 ++++ bombono-dvd-1.2.4.patched/src/mgui/tests/SConscript 2022-02-15 13:47:04.028766834 -0500 +@@ -36,8 +36,8 @@ + bin_mgui_tests_env.Program(target=test_prg_name, source = source_files+lib_mgui_objs) + + import os +-if os.environ.has_key('DISPLAY'): ++if 'DISPLAY' in os.environ: + UnitTest(test_prg_name, bin_mgui_tests_env) + else: +- print "Warning: X Display is not found. GUI tests are disabled." ++ print("Warning: X Display is not found. GUI tests are disabled.") + +diff -Naur bombono-dvd-1.2.4/tools/scripts/BuildVars.py bombono-dvd-1.2.4.patched/tools/scripts/BuildVars.py +--- bombono-dvd-1.2.4/tools/scripts/BuildVars.py 2016-04-10 06:45:39.000000000 -0400 ++++ bombono-dvd-1.2.4.patched/tools/scripts/BuildVars.py 2022-02-15 13:47:54.476603032 -0500 +@@ -30,11 +30,11 @@ + + def PrintBright(is_end): + if not is_end: +- print +- print "****************************************************" ++ print() ++ print("****************************************************") + else: +- print "****************************************************" +- print ++ print("****************************************************") ++ print() + + def IsDebugCfg(): + return BuildCfg == 'debug' +@@ -68,10 +68,10 @@ + def CheckSettings(main_env): + global Cc, Cxx, BuildDir, Targets, RunTests, BuildTests + if RunTests : +- print 'Tests: on' ++ print('Tests: on') + else: + if BuildTests: +- print 'Tests: on (only building)' ++ print('Tests: on (only building)') + + def_env = GetDefEnv() + # for SCons =<0.96 we need to warn that just 'scons' is not enough: +@@ -92,9 +92,9 @@ + ( (len(BuildDir) >= 1 and BuildDir[0] == '/') or (len(BuildDir) >= 2 and BuildDir[0:2] == '..') ) and \ + (Targets == [] or Targets == ['.']) : + PrintBright(0) +- print 'Warning! "scons" or "scons ." detected while BUILD_DIR is outside "."!' +- print 'To build successfully with SCons <= v0.96.1 you may need to run something like ' +- print '\t"scons <...> ' + BuildDir + '".' ++ print('Warning! "scons" or "scons ." detected while BUILD_DIR is outside "."!') ++ print('To build successfully with SCons <= v0.96.1 you may need to run something like ') ++ print('\t"scons <...> ' + BuildDir + '".' ) + PrintBright(1) + + # we use TestSConscript() function instead of SConscript() +@@ -149,7 +149,7 @@ + SetBriefOutput(main_env) + + # to separate our output from SCons' +- print ++ print() + + # Non/Verbose output + def SetBriefOutput(env): +@@ -228,7 +228,7 @@ + + def ErrorAndExit(msg): + PrintBright(0) +- print msg ++ print(msg) + PrintBright(1) + + GetDefEnv().Exit(1) +@@ -383,20 +383,20 @@ + comment = MakeHeaderComment(var['ccomment'], var.get('val') == '1') + + if comment: +- print >> cfg_file, "/* " + comment + " */" ++ print("/* " + comment + " */", file=cfg_file) + + def AddDefine(cfg_file, key, **var): +- print >> cfg_file ++ print("", file=cfg_file) + AddComment(cfg_file, var) + + if var['is_on']: + str = var.get('val', None) + if str == None: +- print >> cfg_file, "#define %s" % key ++ print("#define %s" % key, file=cfg_file) + else: +- print >> cfg_file, "#define %s %s" % (key, var['val']) ++ print("#define %s %s" % (key, var['val']), file=cfg_file) + else: +- print >> cfg_file, "/* #undef %s */" % key ++ print("/* #undef %s */" % key, file=cfg_file) + + GenFunctionMap = {} + +@@ -495,7 +495,7 @@ + res = True + elif not IsReenter(IsToBuildQuick): + # warn once only +- print 'BUILD_QUICK=true is not supported for current compiler(%s)!' % Cc ++ print('BUILD_QUICK=true is not supported for current compiler(%s)!' % Cc) + + return res + +@@ -504,7 +504,7 @@ + + def CreateEnvVersion2(**kw): + tools = ['default', 'AuxTools'] +- if kw.has_key('tools'): ++ if 'tools' in kw: + tools += kw['tools'] + kw['tools'] = tools + +diff -Naur bombono-dvd-1.2.4/tools/scripts/copy_boost.py bombono-dvd-1.2.4.patched/tools/scripts/copy_boost.py +--- bombono-dvd-1.2.4/tools/scripts/copy_boost.py 2016-04-10 06:45:39.000000000 -0400 ++++ bombono-dvd-1.2.4.patched/tools/scripts/copy_boost.py 2022-02-15 13:47:04.029766851 -0500 +@@ -26,7 +26,7 @@ + for fname in os.listdir(boost_dst): + if not fname in lst: + fpath = os.path.join(boost_dst, fname) +- print 'rm', fpath ++ #print 'rm', fpath + o_p.del_any_fpath(fpath) + + cmd = '''%(bcp)s --boost=%(boost_src)s boost/smart_ptr.hpp boost/test boost/function.hpp boost/lambda boost/bind \ +diff -Naur bombono-dvd-1.2.4/tools/scripts/gch.py bombono-dvd-1.2.4.patched/tools/scripts/gch.py +--- bombono-dvd-1.2.4/tools/scripts/gch.py 2016-04-10 06:45:39.000000000 -0400 ++++ bombono-dvd-1.2.4.patched/tools/scripts/gch.py 2022-02-15 13:47:04.029766851 -0500 +@@ -78,10 +78,10 @@ + + + def SetPCHDependencies(target, source, env, gch_key): +- if env.has_key(gch_key) and env[gch_key]: ++ if gch_key in env and env[gch_key]: + gch_node = env[gch_key] + # Murav'jov - alternative variant +- if env.has_key('DepGch') and env['DepGch']: ++ if 'DepGch' in env and env['DepGch']: + env.Depends(target, gch_node) + else: + scanner = GetCScannerFunc() |