pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/include-what-you-use Fixed building with LLVM 4.0.0
details: https://anonhg.NetBSD.org/pkgsrc/rev/064d7dc2ec5a
branches: trunk
changeset: 359792:064d7dc2ec5a
user: adam <adam%pkgsrc.org@localhost>
date: Fri Mar 17 22:39:30 2017 +0000
description:
Fixed building with LLVM 4.0.0
diffstat:
devel/include-what-you-use/Makefile | 6 +-
devel/include-what-you-use/distinfo | 6 ++-
devel/include-what-you-use/patches/patch-CMakeLists.txt | 16 ++++++
devel/include-what-you-use/patches/patch-iwyu.cc | 15 ++++++
devel/include-what-you-use/patches/patch-iwyu__driver.cc | 24 ++++++++++
devel/include-what-you-use/patches/patch-iwyu__location__util.h | 16 ++++++
6 files changed, 79 insertions(+), 4 deletions(-)
diffs (127 lines):
diff -r e280671253cb -r 064d7dc2ec5a devel/include-what-you-use/Makefile
--- a/devel/include-what-you-use/Makefile Fri Mar 17 22:38:17 2017 +0000
+++ b/devel/include-what-you-use/Makefile Fri Mar 17 22:39:30 2017 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.8 2016/12/18 23:33:11 joerg Exp $
+# $NetBSD: Makefile,v 1.9 2017/03/17 22:39:30 adam Exp $
DISTNAME= include-what-you-use-0.7.src
PKGNAME= ${DISTNAME:.src=}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= devel
MASTER_SITES= http://include-what-you-use.org/downloads/
@@ -13,8 +13,8 @@
WRKSRC= ${WRKDIR}/llvm/tools/clang/tools/include-what-you-use/
USE_CMAKE= yes
-CMAKE_ARGS= -DIWYU_LLVM_ROOT_PATH:PATH=${BUILDLINK_PREFIX.clang}
USE_LANGUAGES= c c++
+CMAKE_ARGS= -DIWYU_LLVM_ROOT_PATH:PATH=${BUILDLINK_PREFIX.clang}
GCC_REQD+= 4.8
REPLACE_PYTHON= *.py
diff -r e280671253cb -r 064d7dc2ec5a devel/include-what-you-use/distinfo
--- a/devel/include-what-you-use/distinfo Fri Mar 17 22:38:17 2017 +0000
+++ b/devel/include-what-you-use/distinfo Fri Mar 17 22:39:30 2017 +0000
@@ -1,7 +1,11 @@
-$NetBSD: distinfo,v 1.4 2016/11/15 16:35:40 wiz Exp $
+$NetBSD: distinfo,v 1.5 2017/03/17 22:39:30 adam Exp $
SHA1 (include-what-you-use-0.7.src.tar.gz) = 2c50ace20d108a097d2aa5433b0c50a7d1f8b59e
RMD160 (include-what-you-use-0.7.src.tar.gz) = 3143e978989bbbdefc14e7d41b696980fcc6ebd9
SHA512 (include-what-you-use-0.7.src.tar.gz) = dd7990fa4112ddb0434807efd9dcf0f77bbecaa61eab51be24428f8e45b9321c7647a979278f3f1266ba9be05c6f1de536fc084613d38638b795248001ce4b44
Size (include-what-you-use-0.7.src.tar.gz) = 446773 bytes
+SHA1 (patch-CMakeLists.txt) = 7be956ee821692ddea128b0d2fef4d3404fd24e5
+SHA1 (patch-iwyu.cc) = 787d8ff0179dbc932d7eb72168eb5f345fc1ed4d
+SHA1 (patch-iwyu__driver.cc) = 003630ec42b5a22e83b914b19f88b348558720e0
+SHA1 (patch-iwyu__location__util.h) = 9fcd20b3618cf19ff41014110fd887c8b3eee011
SHA1 (patch-iwyu__output.cc) = 072236f94c44ebd7e0ca20ad828dd938c9683b4a
diff -r e280671253cb -r 064d7dc2ec5a devel/include-what-you-use/patches/patch-CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/include-what-you-use/patches/patch-CMakeLists.txt Fri Mar 17 22:39:30 2017 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-CMakeLists.txt,v 1.3 2017/03/17 22:39:31 adam Exp $
+
+Fix for LLVM 4.0.0.
+
+--- CMakeLists.txt.orig 2017-03-17 21:28:49.000000000 +0000
++++ CMakeLists.txt
+@@ -156,7 +156,8 @@ target_link_libraries(include-what-you-u
+ LLVMObject # BitReader, Core, Support
+ LLVMBitReader # Core, Support
+ LLVMCore # Support
+- LLVMSupport
++ LLVMSupport # Demangle
++ LLVMDemangle
+ )
+
+ # Platform dependencies.
diff -r e280671253cb -r 064d7dc2ec5a devel/include-what-you-use/patches/patch-iwyu.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/include-what-you-use/patches/patch-iwyu.cc Fri Mar 17 22:39:30 2017 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-iwyu.cc,v 1.1 2017/03/17 22:39:31 adam Exp $
+
+Fix for LLVM 4.0.0.
+
+--- iwyu.cc.orig 2017-03-17 20:45:17.000000000 +0000
++++ iwyu.cc
+@@ -3552,7 +3552,7 @@ class IwyuAstConsumer
+
+ // Force parsing and AST building of the yet-uninstantiated function
+ // template body.
+- clang::LateParsedTemplate* lpt = sema.LateParsedTemplateMap[fd];
++ clang::LateParsedTemplate* lpt = sema.LateParsedTemplateMap[fd].get();
+ sema.LateTemplateParser(sema.OpaqueParser, *lpt);
+ }
+ }
diff -r e280671253cb -r 064d7dc2ec5a devel/include-what-you-use/patches/patch-iwyu__driver.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/include-what-you-use/patches/patch-iwyu__driver.cc Fri Mar 17 22:39:30 2017 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-iwyu__driver.cc,v 1.1 2017/03/17 22:39:31 adam Exp $
+
+Fix for LLVM 4.0.0.
+
+--- iwyu_driver.cc.orig 2017-03-17 20:52:13.000000000 +0000
++++ iwyu_driver.cc
+@@ -207,7 +207,7 @@ CompilerInstance* CreateCompilerInstance
+ const ArgStringList &cc_arguments = command.getArguments();
+ const char** args_start = const_cast<const char**>(cc_arguments.data());
+ const char** args_end = args_start + cc_arguments.size();
+- unique_ptr<CompilerInvocation> invocation(new CompilerInvocation);
++ std::shared_ptr<CompilerInvocation> invocation(new CompilerInvocation);
+ CompilerInvocation::CreateFromArgs(*invocation,
+ args_start, args_end, diagnostics);
+ invocation->getFrontendOpts().DisableFree = false;
+@@ -238,7 +238,7 @@ CompilerInstance* CreateCompilerInstance
+ // Create a compiler instance to handle the actual work.
+ // The caller will be responsible for freeing this.
+ CompilerInstance* compiler = new CompilerInstance;
+- compiler->setInvocation(invocation.release());
++ compiler->setInvocation(invocation);
+
+ // Create the compilers actual diagnostics engine.
+ compiler->createDiagnostics();
diff -r e280671253cb -r 064d7dc2ec5a devel/include-what-you-use/patches/patch-iwyu__location__util.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/include-what-you-use/patches/patch-iwyu__location__util.h Fri Mar 17 22:39:30 2017 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-iwyu__location__util.h,v 1.1 2017/03/17 22:39:31 adam Exp $
+
+Fix for LLVM 4.0.0.
+
+--- iwyu_location_util.h.orig 2017-03-17 20:33:46.000000000 +0000
++++ iwyu_location_util.h
+@@ -78,8 +78,7 @@ inline bool IsBuiltinFile(const clang::F
+ // IsBuiltinOrCommandLineFile(file) returns true if it's either of the
+ // two cases.
+ inline bool IsBuiltinOrCommandLineFile(const clang::FileEntry* file) {
+- return IsBuiltinFile(file) ||
+- (strcmp(file->getName(), "<command line>") == 0);
++ return IsBuiltinFile(file) || file->getName().equals("<command line>");
+ }
+
+ // When macro args are concatenated e.g. '#define CAT(A, B) A##B', their
Home |
Main Index |
Thread Index |
Old Index