forked from pool/doxygen
This commit is contained in:
parent
3bebd679a5
commit
0be7ade6c2
70
doxygen-reproducible.patch
Normal file
70
doxygen-reproducible.patch
Normal file
@ -0,0 +1,70 @@
|
||||
Index: doxygen-1.9.4/filesystem/filesystem.hpp
|
||||
===================================================================
|
||||
--- doxygen-1.9.4.orig/filesystem/filesystem.hpp
|
||||
+++ doxygen-1.9.4/filesystem/filesystem.hpp
|
||||
@@ -5548,12 +5548,13 @@ public:
|
||||
impl(const path& path, directory_options options)
|
||||
: _base(path)
|
||||
, _options(options)
|
||||
- , _dir(nullptr)
|
||||
+ , _n(-1)
|
||||
+ , _name_list(nullptr)
|
||||
, _entry(nullptr)
|
||||
{
|
||||
if (!path.empty()) {
|
||||
- _dir = ::opendir(path.native().c_str());
|
||||
- if (!_dir) {
|
||||
+ _n = ::scandir(path.native().c_str(), &_name_list, NULL, alphasort);
|
||||
+ if (_n == -1) {
|
||||
auto error = errno;
|
||||
_base = filesystem::path();
|
||||
if ((error != EACCES && error != EPERM) || (options & directory_options::skip_permission_denied) == directory_options::none) {
|
||||
@@ -5568,30 +5569,31 @@ public:
|
||||
impl(const impl& other) = delete;
|
||||
~impl()
|
||||
{
|
||||
- if (_dir) {
|
||||
- ::closedir(_dir);
|
||||
+ if (_name_list) {
|
||||
+ ::free(_name_list);
|
||||
}
|
||||
}
|
||||
void increment(std::error_code& ec)
|
||||
{
|
||||
- if (_dir) {
|
||||
+ if (_name_list) {
|
||||
bool skip;
|
||||
do {
|
||||
skip = false;
|
||||
errno = 0;
|
||||
- _entry = ::readdir(_dir);
|
||||
- if (_entry) {
|
||||
+ if (_n >= 0) {
|
||||
+ _entry = _name_list[_n--];
|
||||
_dir_entry._path = _base;
|
||||
_dir_entry._path.append_name(_entry->d_name);
|
||||
copyToDirEntry();
|
||||
+ ::free(_entry);
|
||||
if (ec && (ec.value() == EACCES || ec.value() == EPERM) && (_options & directory_options::skip_permission_denied) == directory_options::skip_permission_denied) {
|
||||
ec.clear();
|
||||
skip = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
- ::closedir(_dir);
|
||||
- _dir = nullptr;
|
||||
+ ::free(_name_list);
|
||||
+ _name_list = nullptr;
|
||||
_dir_entry._path.clear();
|
||||
if (errno) {
|
||||
ec = detail::make_system_error();
|
||||
@@ -5634,7 +5636,8 @@ public:
|
||||
}
|
||||
path _base;
|
||||
directory_options _options;
|
||||
- DIR* _dir;
|
||||
+ int _n;
|
||||
+ struct ::dirent** _name_list;
|
||||
struct ::dirent* _entry;
|
||||
directory_entry _dir_entry;
|
||||
std::error_code _ec;
|
@ -36,6 +36,8 @@ Patch0: %{name}-modify_footer.patch
|
||||
Patch1: %{name}-no-lowercase-man-names.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch2: doxygen-gcc12.patch
|
||||
# reproducible
|
||||
Patch3: doxygen-reproducible.patch
|
||||
# The unified libclang-cpp library doesn't exist on older Leap / SLE
|
||||
Patch10: doxygen-no-libclang-cpp.patch
|
||||
BuildRequires: bison
|
||||
@ -69,6 +71,7 @@ as well.
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%if %{with libclang}
|
||||
%if 0%{?sle_version} == 150100 || (0%{?sle_version} == 150200 && !0%{?is_opensuse})
|
||||
%patch10 -p1
|
||||
|
Loading…
Reference in New Issue
Block a user