From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/boost/files/, dev-libs/boost/
Date: Mon, 20 May 2024 07:00:28 +0000 (UTC) [thread overview]
Message-ID: <1716188196.9292ab9aa7003a86b551aba3470bb23581e6ab2c.sam@gentoo> (raw)
commit: 9292ab9aa7003a86b551aba3470bb23581e6ab2c
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May 20 06:56:36 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 20 06:56:36 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9292ab9a
dev-libs/boost: fix USE=tools build
Closes: https://bugs.gentoo.org/932240
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-libs/boost/boost-1.85.0.ebuild | 1 +
.../boost/files/boost-1.85.0-bcp-filesystem.patch | 188 +++++++++++++++++++++
2 files changed, 189 insertions(+)
diff --git a/dev-libs/boost/boost-1.85.0.ebuild b/dev-libs/boost/boost-1.85.0.ebuild
index 3a6700ea176b..30577a1da191 100644
--- a/dev-libs/boost/boost-1.85.0.ebuild
+++ b/dev-libs/boost/boost-1.85.0.ebuild
@@ -50,6 +50,7 @@ BDEPEND=">=dev-build/b2-5.0.0"
PATCHES=(
"${FILESDIR}"/${PN}-1.81.0-disable_icu_rpath.patch
"${FILESDIR}"/${PN}-1.79.0-build-auto_index-tool.patch
+ "${FILESDIR}"/${PN}-1.85.0-bcp-filesystem.patch
)
create_user-config.jam() {
diff --git a/dev-libs/boost/files/boost-1.85.0-bcp-filesystem.patch b/dev-libs/boost/files/boost-1.85.0-bcp-filesystem.patch
new file mode 100644
index 000000000000..23d94040341d
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.85.0-bcp-filesystem.patch
@@ -0,0 +1,188 @@
+https://bugs.gentoo.org/932240
+https://github.com/boostorg/bcp/commit/cd21e9b4a749a77c24facf2da44f01e032c40842
+
+From cd21e9b4a749a77c24facf2da44f01e032c40842 Mon Sep 17 00:00:00 2001
+From: Andrey Semashev <andrey.semashev@gmail.com>
+Date: Sun, 24 Mar 2024 14:49:18 +0300
+Subject: [PATCH] Remove usage of deprecated and removed Boost.Filesystem APIs.
+
+---
+ add_dependent_lib.cpp | 5 +++--
+ add_path.cpp | 30 +++++++++++++++---------------
+ bcp_imp.hpp | 1 +
+ copy_path.cpp | 8 ++++----
+ file_types.cpp | 2 +-
+ 5 files changed, 24 insertions(+), 22 deletions(-)
+
+diff --git a/tools/bcp/add_dependent_lib.cpp b/tools/bcp/add_dependent_lib.cpp
+index 4852914..521b70d 100644
+--- a/tools/bcp/add_dependent_lib.cpp
++++ b/tools/bcp/add_dependent_lib.cpp
+@@ -15,6 +15,7 @@
+ #include "bcp_imp.hpp"
+ #include "fileview.hpp"
+ #include <boost/regex.hpp>
++#include <boost/filesystem/directory.hpp>
+ #include <boost/filesystem/operations.hpp>
+ #include <boost/filesystem/exception.hpp>
+ #include <iostream>
+@@ -43,12 +44,12 @@ static void init_library_scanner(const fs::path& p, bool cvs_mode, const std::st
+ //
+ // Don't add files created by build system:
+ //
+- if((p.leaf() == "bin") || (p.leaf() == "bin-stage"))
++ if((p.filename() == "bin") || (p.filename() == "bin-stage"))
+ return;
+ //
+ // Don't add version control directories:
+ //
+- if((p.leaf() == "CVS") || (p.leaf() == ".svn"))
++ if((p.filename() == "CVS") || (p.filename() == ".svn"))
+ return;
+ //
+ // don't add directories not under version control:
+diff --git a/tools/bcp/add_path.cpp b/tools/bcp/add_path.cpp
+index 8a1fee3..747bb8c 100644
+--- a/tools/bcp/add_path.cpp
++++ b/tools/bcp/add_path.cpp
+@@ -15,6 +15,7 @@
+ #include "bcp_imp.hpp"
+ #include "fileview.hpp"
+ #include <boost/regex.hpp>
++#include <boost/filesystem/directory.hpp>
+ #include <boost/filesystem/operations.hpp>
+ #include <boost/filesystem/exception.hpp>
+ #include <iostream>
+@@ -24,8 +25,7 @@ void bcp_implementation::add_path(const fs::path& p)
+ {
+ if (m_excluded.find(p) != m_excluded.end())
+ return;
+- fs::path normalized_path = p;
+- normalized_path.normalize();
++ fs::path normalized_path = p.lexically_normal();
+ if(fs::exists(m_boost_path / normalized_path))
+ {
+ if(fs::is_directory(m_boost_path / normalized_path))
+@@ -45,12 +45,12 @@ void bcp_implementation::add_directory(const fs::path& p)
+ //
+ // Don't add files created by build system:
+ //
+- if((p.leaf() == "bin") || (p.leaf() == "bin-stage"))
++ if((p.filename() == "bin") || (p.filename() == "bin-stage"))
+ return;
+ //
+ // Don't add version control directories:
+ //
+- if((p.leaf() == "CVS") || (p.leaf() == ".svn"))
++ if((p.filename() == "CVS") || (p.filename() == ".svn"))
+ return;
+ //
+ // don't add directories not under version control:
+@@ -180,7 +180,7 @@ void bcp_implementation::add_file(const fs::path& p)
+ {
+ // only concatonate if it's a relative path
+ // rather than a URL:
+- fs::path dep(p.branch_path() / s);
++ fs::path dep(p.parent_path() / s);
+ if(!m_dependencies.count(dep))
+ {
+ m_dependencies[dep] = p; // set up dependency tree
+@@ -355,13 +355,13 @@ void bcp_implementation::add_file_dependencies(const fs::path& p, bool scanfile)
+ continue;
+ }
+ include_file = i->str();
+- fs::path test_file(m_boost_path / p.branch_path() / include_file);
+- if(fs::exists(test_file) && !fs::is_directory(test_file) && (p.branch_path().string() != "boost"))
++ fs::path test_file(m_boost_path / p.parent_path() / include_file);
++ if(fs::exists(test_file) && !fs::is_directory(test_file) && (p.parent_path().string() != "boost"))
+ {
+- if(!m_dependencies.count(p.branch_path() / include_file))
++ if(!m_dependencies.count(p.parent_path() / include_file))
+ {
+- m_dependencies[p.branch_path() / include_file] = p;
+- add_pending_path(p.branch_path() / include_file);
++ m_dependencies[p.parent_path() / include_file] = p;
++ add_pending_path(p.parent_path() / include_file);
+ }
+ }
+ else if(fs::exists(m_boost_path / include_file))
+@@ -405,13 +405,13 @@ void bcp_implementation::add_file_dependencies(const fs::path& p, bool scanfile)
+ ++i;
+ continue;
+ }
+- fs::path test_file(m_boost_path / p.branch_path() / include_file);
+- if(fs::exists(test_file) && !fs::is_directory(test_file) && (p.branch_path().string() != "boost"))
++ fs::path test_file(m_boost_path / p.parent_path() / include_file);
++ if(fs::exists(test_file) && !fs::is_directory(test_file) && (p.parent_path().string() != "boost"))
+ {
+- if(!m_dependencies.count(p.branch_path() / include_file))
++ if(!m_dependencies.count(p.parent_path() / include_file))
+ {
+- m_dependencies[p.branch_path() / include_file] = p;
+- add_pending_path(p.branch_path() / include_file);
++ m_dependencies[p.parent_path() / include_file] = p;
++ add_pending_path(p.parent_path() / include_file);
+ }
+ }
+ else if(fs::exists(m_boost_path / include_file))
+diff --git a/tools/bcp/bcp_imp.hpp b/tools/bcp/bcp_imp.hpp
+index e515581..51c85ba 100644
+--- a/tools/bcp/bcp_imp.hpp
++++ b/tools/bcp/bcp_imp.hpp
+@@ -14,6 +14,7 @@
+ #include <set>
+ #include <map>
+ #include <queue>
++#include <string>
+ #include <boost/filesystem/path.hpp>
+
+ namespace fs = boost::filesystem;
+diff --git a/tools/bcp/copy_path.cpp b/tools/bcp/copy_path.cpp
+index 4143c79..6b7a370 100644
+--- a/tools/bcp/copy_path.cpp
++++ b/tools/bcp/copy_path.cpp
+@@ -49,18 +49,18 @@ void bcp_implementation::copy_path(const fs::path& p)
+ if(fs::exists(m_dest_path / p))
+ {
+ std::cout << "Copying (and overwriting) file: " << p.string() << "\n";
+- fs::remove(m_dest_path / p);
++ fs::remove(m_dest_path / p);
+ }
+ else
+ std::cout << "Copying file: " << p.string() << "\n";
+ //
+ // create the path to the new file if it doesn't already exist:
+ //
+- create_path(p.branch_path());
++ create_path(p.parent_path());
+ //
+ // do text based copy if requested:
+ //
+- if((p.leaf() == "Jamroot") && m_namespace_name.size())
++ if((p.filename() == "Jamroot") && m_namespace_name.size())
+ {
+ static std::vector<char> v1, v2;
+ v1.clear();
+@@ -240,7 +240,7 @@ void bcp_implementation::create_path(const fs::path& p)
+ if(!fs::exists(m_dest_path / p))
+ {
+ // recurse then create the path:
+- create_path(p.branch_path());
++ create_path(p.parent_path());
+ fs::create_directory(m_dest_path / p);
+ }
+ }
+diff --git a/tools/bcp/file_types.cpp b/tools/bcp/file_types.cpp
+index 297d304..69f6027 100644
+--- a/tools/bcp/file_types.cpp
++++ b/tools/bcp/file_types.cpp
+@@ -52,7 +52,7 @@ bool bcp_implementation::is_binary_file(const fs::path& p)
+ "|"
+ "(Jamfile|makefile|configure)",
+ boost::regex::perl | boost::regex::icase);
+- return !boost::regex_match(p.leaf().generic_string(), e);
++ return !boost::regex_match(p.filename().generic_string(), e);
+
+ }
+
+
next reply other threads:[~2024-05-20 7:00 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 7:00 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-05-31 22:38 [gentoo-commits] repo/gentoo:master commit in: dev-libs/boost/files/, dev-libs/boost/ Sam James
2024-02-20 20:49 Andreas Sturmlechner
2024-01-23 16:32 David Seifert
2023-12-14 8:12 Sam James
2023-04-30 17:16 Andreas Sturmlechner
2022-12-20 23:57 Sam James
2022-09-10 10:59 Sam James
2022-09-03 20:28 David Seifert
2022-07-06 10:27 Andreas Sturmlechner
2022-07-03 8:33 WANG Xuerui
2022-05-08 13:35 Andreas Sturmlechner
2022-01-15 12:28 David Seifert
2021-11-20 7:07 Sam James
2021-09-05 2:22 Sam James
2021-08-23 16:17 Sam James
2021-05-31 12:15 Sam James
2021-03-21 21:15 Andreas Sturmlechner
2020-12-24 22:14 Andreas K. Hüttel
2020-12-22 21:22 Andreas K. Hüttel
2019-12-29 13:06 David Seifert
2019-12-22 23:12 David Seifert
2019-04-16 12:09 David Seifert
2018-11-24 19:27 David Seifert
2018-07-31 22:27 Patrick McLean
2017-04-04 17:54 David Seifert
2016-01-27 6:21 Sergey Popov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1716188196.9292ab9aa7003a86b551aba3470bb23581e6ab2c.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox