diff options
author | kwm <kwm@FreeBSD.org> | 2013-07-10 19:27:36 +0800 |
---|---|---|
committer | kwm <kwm@FreeBSD.org> | 2013-07-10 19:27:36 +0800 |
commit | a6a28322356e2240e512c7b8afe640cb3ffdd6ea (patch) | |
tree | 4868cff9e16e34a8f49d1a42e566019b6a2936fd /lang | |
parent | dd6a75847b35c390f009baad670481b517239bbe (diff) | |
download | freebsd-ports-gnome-a6a28322356e2240e512c7b8afe640cb3ffdd6ea.tar.gz freebsd-ports-gnome-a6a28322356e2240e512c7b8afe640cb3ffdd6ea.tar.zst freebsd-ports-gnome-a6a28322356e2240e512c7b8afe640cb3ffdd6ea.zip |
Teach clang33 where to find libc++ headers when installed from ports.
It will use the headers in base if it finds them there.
Approved by: maintainer (brooks@)
Diffstat (limited to 'lang')
-rw-r--r-- | lang/clang33/Makefile | 3 | ||||
-rw-r--r-- | lang/clang33/files/patch-tools_clang_lib_Frontend_InitHeaderSearch.cpp | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/lang/clang33/Makefile b/lang/clang33/Makefile index b99ff6485278..0dfff7e88819 100644 --- a/lang/clang33/Makefile +++ b/lang/clang33/Makefile @@ -2,6 +2,7 @@ PORTNAME= clang DISTVERSION= 3.3 +PORTREVISION= 1 CATEGORIES= lang devel MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/ DISTNAME= ${CLANG_NAME} @@ -93,6 +94,8 @@ post-patch: ${WRKSRC}/Makefile.config.in ${REINPLACE_CMD} -e 's|\(PROJ_mandir.*:=\).*$$|\1${MANPREFIX}/man|g' \ ${WRKSRC}/Makefile.config.in + ${REINPLACE_CMD} -e 's|/usr/local/|${LOCALBASE}/|g' \ + ${WRKSRC}/tools/clang/lib/Frontend/InitHeaderSearch.cpp pre-build: ${LN} -sf ${LLVM_PREFIX}/include/llvm/IR/Intrinsics.gen \ diff --git a/lang/clang33/files/patch-tools_clang_lib_Frontend_InitHeaderSearch.cpp b/lang/clang33/files/patch-tools_clang_lib_Frontend_InitHeaderSearch.cpp new file mode 100644 index 000000000000..283a4aa5be75 --- /dev/null +++ b/lang/clang33/files/patch-tools_clang_lib_Frontend_InitHeaderSearch.cpp @@ -0,0 +1,15 @@ +Look for the libc++ headers in base, and afterwards look if they might +have been installed in ports. This is only usefull on FreeBSD <= 9.x since +libc++ is shipped in 10 by default. No path to the library of libc++ is +provided. The port wanting to use libc++ need to provide its own LDFLAGS. + +--- tools/clang/lib/Frontend/InitHeaderSearch.cpp.orig 2013-06-21 20:35:23.000000000 +0200 ++++ tools/clang/lib/Frontend/InitHeaderSearch.cpp 2013-06-21 20:41:38.000000000 +0200 +@@ -486,6 +486,7 @@ void InitHeaderSearch::AddDefaultInclude + AddPath("/usr/include/c++/v1/support/solaris", CXXSystem, false); + + AddPath("/usr/include/c++/v1", CXXSystem, false); ++ AddPath("/usr/local/include/c++/v1", CXXSystem, false); + } else { + AddDefaultCPlusPlusIncludePaths(triple, HSOpts); + } |