- New upstream release 2023.03.0+386. - Replace 0007-use-system-node.patch by remove-panmirror.patch. Building panmirror seems to have gotten more complicated, and I can't figure out how to make it work. So let's remove it for now. - Remove obsolete patches: * 0009-Fix-false-quarto-warning.patch * missing-include.patch - Make 0006-Fix-libclang-usage.patch work with Clang 16. OBS-URL: https://build.opensuse.org/request/show/1076732 OBS-URL: https://build.opensuse.org/package/show/devel:languages:R:released/rstudio?expand=0&rev=87
56 lines
2.0 KiB
Diff
56 lines
2.0 KiB
Diff
From e93996837bceb3bdae376332be5aca964a2737ff Mon Sep 17 00:00:00 2001
|
|
From: Aaron Puchert <aaronpuchert@alice-dsl.net>
|
|
Date: Mon, 7 Sep 2020 11:12:26 +0200
|
|
Subject: [PATCH 6/8] Fix libclang usage
|
|
|
|
---
|
|
src/cpp/core/include/core/libclang/LibClang.hpp | 1 +
|
|
src/cpp/core/libclang/LibClang.cpp | 17 +++++++----------
|
|
2 files changed, 8 insertions(+), 10 deletions(-)
|
|
|
|
--- a/src/cpp/core/include/core/libclang/LibClang.hpp
|
|
+++ b/src/cpp/core/include/core/libclang/LibClang.hpp
|
|
@@ -36,6 +36,7 @@
|
|
|
|
#include "clang-c/Index.h"
|
|
#include "clang-c/CXCompilationDatabase.h"
|
|
+#include "clang-c/Documentation.h"
|
|
|
|
namespace rstudio {
|
|
namespace core {
|
|
--- a/src/cpp/core/libclang/LibClang.cpp
|
|
+++ b/src/cpp/core/libclang/LibClang.cpp
|
|
@@ -62,12 +62,12 @@ std::vector<std::string> defaultCompileArgs(LibraryVersion version)
|
|
|
|
// we need to add in the associated libclang headers as
|
|
// they are not discovered / used by default during compilation
|
|
- FilePath llvmPath = s_libraryPath.getParent().getParent();
|
|
- boost::format fmt("%1%/lib/clang/%2%/include");
|
|
- fmt % llvmPath.getAbsolutePath() % version.asString();
|
|
+ FilePath llvmPath = s_libraryPath.getParent();
|
|
+ boost::format fmt("%1%/clang/%2%/include");
|
|
+ const std::string& versionStr = version.asString();
|
|
+ fmt % llvmPath.getAbsolutePath() % versionStr.substr(0, versionStr.find('.'));
|
|
std::string includePath = fmt.str();
|
|
- if (FilePath(includePath).exists())
|
|
- compileArgs.push_back(std::string("-I") + includePath);
|
|
+ compileArgs.push_back(std::string("-I") + includePath);
|
|
|
|
return compileArgs;
|
|
}
|
|
@@ -89,12 +89,9 @@ std::vector<std::string> systemClangVersions()
|
|
#elif defined(__unix__)
|
|
// default set of versions
|
|
clangVersions = {
|
|
- "/usr/lib/libclang.so",
|
|
- "/usr/lib/llvm/libclang.so",
|
|
- "/usr/lib64/libclang.so",
|
|
- "/usr/lib64/llvm/libclang.so",
|
|
+ "LIBCLANG_PLACEHOLDER",
|
|
};
|
|
-
|
|
+#elif 0
|
|
// iterate through the set of available 'llvm' directories
|
|
for (const char* prefix : {"/usr/lib", "/usr/lib64"})
|
|
{
|