svn commit: r322654 - in head/lang/clang33: . files

Koop Mast kwm at FreeBSD.org
Wed Jul 10 11:27:37 UTC 2013


Author: kwm
Date: Wed Jul 10 11:27:36 2013
New Revision: 322654
URL: http://svnweb.freebsd.org/changeset/ports/322654

Log:
  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@)

Added:
  head/lang/clang33/files/patch-tools_clang_lib_Frontend_InitHeaderSearch.cpp   (contents, props changed)
Modified:
  head/lang/clang33/Makefile   (contents, props changed)

Modified: head/lang/clang33/Makefile
==============================================================================
--- head/lang/clang33/Makefile	Wed Jul 10 11:26:34 2013	(r322653)
+++ head/lang/clang33/Makefile	Wed Jul 10 11:27:36 2013	(r322654)
@@ -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 \

Added: head/lang/clang33/files/patch-tools_clang_lib_Frontend_InitHeaderSearch.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/clang33/files/patch-tools_clang_lib_Frontend_InitHeaderSearch.cpp	Wed Jul 10 11:27:36 2013	(r322654)
@@ -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);
+     }


More information about the svn-ports-all mailing list