[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1056093: casparcg-server: FTBFS: boost1.83 transition



Attached is a patch which fixes this build failure.

This patch is also submitted as a MR to the package repository in salsa https://salsa.debian.org/multimedia-team/casparcg-server/-/merge_requests/8

Julian
diff -Nru casparcg-server-2.3.3+dfsg/debian/patches/0005-boost-181.patch casparcg-server-2.3.3+dfsg/debian/patches/0005-boost-181.patch
--- casparcg-server-2.3.3+dfsg/debian/patches/0005-boost-181.patch	1970-01-01 00:00:00.000000000 +0000
+++ casparcg-server-2.3.3+dfsg/debian/patches/0005-boost-181.patch	2023-12-08 22:24:36.000000000 +0000
@@ -0,0 +1,43 @@
+From 435921f5573507cb93d28d008d205ea9b1b537ed Mon Sep 17 00:00:00 2001
+From: Oscar Cowdery Lack <oscar@lightningvisuals.com>
+Date: Mon, 6 Mar 2023 21:02:03 +1100
+Subject: [PATCH] fix: compat with boost 1.81 (#1465)
+Forwarded: https://github.com/CasparCG/server/pull/1465
+
+---
+ src/protocol/amcp/AMCPCommandsImpl.cpp | 4 ++++
+ src/shell/main.cpp                     | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/src/protocol/amcp/AMCPCommandsImpl.cpp b/src/protocol/amcp/AMCPCommandsImpl.cpp
+index 62654527c1..40be8cd8fa 100644
+--- a/src/protocol/amcp/AMCPCommandsImpl.cpp
++++ b/src/protocol/amcp/AMCPCommandsImpl.cpp
+@@ -124,7 +124,11 @@ std::wstring read_latin1_file(const boost::filesystem::path& file)
+ {
+     boost::locale::generator gen;
+     gen.locale_cache_enabled(true);
++#if BOOST_VERSION >= 108100
++    gen.categories(boost::locale::category_t::codepage);
++#else
+     gen.categories(boost::locale::codepage_facet);
++#endif
+ 
+     std::stringstream           result_stream;
+     boost::filesystem::ifstream filestream(file);
+diff --git a/src/shell/main.cpp b/src/shell/main.cpp
+index d12ab3fb1f..4e45df45f9 100644
+--- a/src/shell/main.cpp
++++ b/src/shell/main.cpp
+@@ -62,7 +62,11 @@ namespace caspar {
+ void setup_global_locale()
+ {
+     boost::locale::generator gen;
++#if BOOST_VERSION >= 108100
++    gen.categories(boost::locale::category_t::codepage);
++#else
+     gen.categories(boost::locale::codepage_facet);
++#endif
+ 
+     std::locale::global(gen(""));
+ 
diff -Nru casparcg-server-2.3.3+dfsg/debian/patches/1003-boost-183.patch casparcg-server-2.3.3+dfsg/debian/patches/1003-boost-183.patch
--- casparcg-server-2.3.3+dfsg/debian/patches/1003-boost-183.patch	1970-01-01 00:00:00.000000000 +0000
+++ casparcg-server-2.3.3+dfsg/debian/patches/1003-boost-183.patch	2023-12-08 22:55:33.000000000 +0000
@@ -0,0 +1,44 @@
+Description: fix FTBFS against boost 1.83
+ .
+ casparcg-server (2.3.3+dfsg-3.2) UNRELEASED; urgency=medium
+ .
+   * debian/patches: add 1003-debian-181.patch
+     This fixes FTBFS against boost 1.83 (Closes: #1056093)
+Author: Julian Waller <me@julusian.co.uk>
+Bug-Debian: https://bugs.debian.org/1056093
+Forwarded: no
+
+Index: casparcg-server-2.3.3+dfsg/src/core/StdAfx.h
+===================================================================
+--- casparcg-server-2.3.3+dfsg.orig/src/core/StdAfx.h
++++ casparcg-server-2.3.3+dfsg/src/core/StdAfx.h
+@@ -36,7 +36,7 @@
+ #include <boost/range/distance.hpp>
+ #include <boost/range/iterator_range.hpp>
+ #include <boost/rational.hpp>
+-#include <boost/timer.hpp>
++//#include <boost/timer.hpp>
+ #include <boost/variant.hpp>
+ #include <common/array.h>
+ #include <common/assert.h>
+Index: casparcg-server-2.3.3+dfsg/src/modules/ffmpeg/producer/ffmpeg_producer.cpp
+===================================================================
+--- casparcg-server-2.3.3+dfsg.orig/src/modules/ffmpeg/producer/ffmpeg_producer.cpp
++++ casparcg-server-2.3.3+dfsg/src/modules/ffmpeg/producer/ffmpeg_producer.cpp
+@@ -36,6 +36,7 @@
+ 
+ #include <boost/algorithm/string/predicate.hpp>
+ #include <boost/filesystem.hpp>
++#include <boost/filesystem/fstream.hpp>
+ #include <boost/logic/tribool.hpp>
+ 
+ #include <cstdint>
+@@ -255,7 +256,7 @@ bool is_valid_file(const std::wstring& f
+         return true;
+     }
+ 
+-    std::ifstream file(u8filename);
++    boost::filesystem::ifstream file(u8filename);
+ 
+     std::vector<unsigned char> buf;
+     for (auto file_it = std::istreambuf_iterator<char>(file);
diff -Nru casparcg-server-2.3.3+dfsg/debian/patches/series casparcg-server-2.3.3+dfsg/debian/patches/series
--- casparcg-server-2.3.3+dfsg/debian/patches/series	2023-10-10 07:09:47.000000000 +0000
+++ casparcg-server-2.3.3+dfsg/debian/patches/series	2023-12-08 22:55:33.000000000 +0000
@@ -2,6 +2,8 @@
 0002-ffmpeg-5.0-1419.patch
 0003-fix-boost-1.73-ftbfs-1397.patch
 0004-fix-shader-frag.patch
+0005-boost-181.patch
 1001-cmake-ftbfs.patch
 1002-arm64-compatibility.patch
+1003-boost-183.patch
 use-renamed-AV_CODEC_CAP_OTHER_THREADS.patch

Reply to: