Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Sep 2014 01:25:58 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r369352 - in head/lang/clang33: . files
Message-ID:  <201409270125.s8R1Pw5N010644@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Sat Sep 27 01:25:57 2014
New Revision: 369352
URL: http://svnweb.freebsd.org/changeset/ports/369352
QAT: https://qat.redports.org/buildarchive/r369352/

Log:
  Install scan-view dependencies.
  
  Tell the user the correct scan-view to run.
  
  PR:		193955
  Sponsored by:	DARPA, AFRL

Modified:
  head/lang/clang33/Makefile
  head/lang/clang33/files/llvm-wrapper.sh.in
  head/lang/clang33/files/patch-tools_clang_tools_scan-build_scan-build
  head/lang/clang33/pkg-plist

Modified: head/lang/clang33/Makefile
==============================================================================
--- head/lang/clang33/Makefile	Sat Sep 27 01:00:41 2014	(r369351)
+++ head/lang/clang33/Makefile	Sat Sep 27 01:25:57 2014	(r369352)
@@ -2,7 +2,7 @@
 
 PORTNAME=	clang
 DISTVERSION=	3.3
-PORTREVISION=	7
+PORTREVISION=	8
 CATEGORIES=	lang devel
 MASTER_SITES=	http://llvm.org/releases/${PORTVERSION}/
 PKGNAMESUFFIX=	${LLVM_SUFFIX}
@@ -29,12 +29,12 @@ LLVM_SUFFIX=	${PORTVERSION:S/.//g}
 LLVM_PREFIX=	${PREFIX}/llvm${LLVM_SUFFIX}
 DATADIR=	${PREFIX}/share/${PORTNAME}${LLVM_SUFFIX}
 DOCSDIR=	${PREFIX}/share/doc/${PORTNAME}${LLVM_SUFFIX}
+PYTHONLIBDIR=	${LLVM_PREFIX}/lib/python
 
 GNU_CONFIGURE=	yes
 GNU_CONFIGURE_PREFIX=	${LLVM_PREFIX}
-USES=		gmake perl5
+USES=		gmake perl5 python
 USE_LDCONFIG=	yes
-USE_PYTHON_BUILD=	-2.9
 
 MAKE_ARGS=	CLANG_TBLGEN=${WRKSRC}/${RELTYPE}/bin/clang-tblgen \
 		LLVMIncDir=${LLVM_PREFIX}/include \
@@ -112,6 +112,7 @@ post-patch:
 	${REINPLACE_CMD} -e 's|/usr/local/|${LOCALBASE}/|g' \
 	    ${WRKSRC}/tools/clang/lib/Frontend/InitHeaderSearch.cpp
 	${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}/|g' \
+	    -e 's|%%LLVM_SUFFIX%%|${LLVM_SUFFIX}|g' \
 	    ${WRKSRC}/tools/clang/tools/scan-build/scan-build
 
 pre-build:
@@ -126,9 +127,7 @@ pre-build:
 
 post-build:
 	@cd ${WRKSRC}/tools/clang/docs/tools && ${MAKE_CMD} man
-.if ${PORT_OPTIONS:MDOCS}
 	@cd ${WRKSRC}/tools/clang/docs/tools && ${MAKE_CMD} html ps
-.endif
 
 post-install:
 	${STRIP_CMD} ${STAGEDIR}${LLVM_PREFIX}/lib/libclang.so
@@ -150,10 +149,18 @@ post-install:
 	${LN} -f ${STAGEDIR}${PREFIX}/bin/${FIRST_COMMAND}${LLVM_SUFFIX} \
 	    ${STAGEDIR}${PREFIX}/bin/${command}${LLVM_SUFFIX}
 .endfor
-.if ${PORT_OPTIONS:MDOCS}
 	cd ${WRKSRC}/tools/clang/docs/tools && \
 	    ${MAKE_CMD} DESTDIR=${STAGEDIR}/ install-html install-ps
-.endif
+	${MKDIR} ${STAGEDIR}${PYTHONLIBDIR}
+	${MKDIR} ${STAGEDIR}${PYTHONLIBDIR}/Resources
+	${INSTALL_SCRIPT} ${WRKSRC}/tools/clang/tools/scan-view/*.py \
+	    ${STAGEDIR}${PYTHONLIBDIR}
+	${INSTALL_SCRIPT} ${WRKSRC}/tools/clang/tools/scan-view/Resources/* \
+	    ${STAGEDIR}${PYTHONLIBDIR}/Resources
+	${MKDIR} ${STAGEDIR}${DATADIR}
+	${INSTALL_DATA} ${WRKSRC}/tools/clang/tools/scan-build/scanview.css \
+	    ${WRKSRC}/tools/clang/tools/scan-build/sorttable.js \
+	    ${STAGEDIR}${DATADIR}
 	${INSTALL_MAN} ${WRKSRC}/tools/clang/docs/tools/clang.1 \
 	    ${STAGEDIR}${MANPREFIX}/man/man1/clang${LLVM_SUFFIX}.1
 	${INSTALL_MAN} ${WRKSRC}/tools/clang/tools/scan-build/scan-build.1 \
@@ -163,7 +170,8 @@ PLIST_FILE_LIST=	${COMMANDS:S|^|bin/|} \
 			lib/libclang*
 PLIST_DIR_LIST=		include/clang \
 			include/clang-c \
-			lib/clang
+			lib/clang \
+			lib/python
 
 build-plist:
 	${RM} -f ${PLIST}

Modified: head/lang/clang33/files/llvm-wrapper.sh.in
==============================================================================
--- head/lang/clang33/files/llvm-wrapper.sh.in	Sat Sep 27 01:00:41 2014	(r369351)
+++ head/lang/clang33/files/llvm-wrapper.sh.in	Sat Sep 27 01:25:57 2014	(r369352)
@@ -6,5 +6,6 @@ LLVM_SUFFIX="%%LLVM_SUFFIX%%"
 
 tool=$(basename $0)
 tool="${LLVM_PREFIX}/bin/${tool%${LLVM_SUFFIX}}"
+PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${LLVM_PREFIX}/lib/python" \
 LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LLVM_PREFIX}/lib" \
     "${tool}" "${@}"

Modified: head/lang/clang33/files/patch-tools_clang_tools_scan-build_scan-build
==============================================================================
--- head/lang/clang33/files/patch-tools_clang_tools_scan-build_scan-build	Sat Sep 27 01:00:41 2014	(r369351)
+++ head/lang/clang33/files/patch-tools_clang_tools_scan-build_scan-build	Sat Sep 27 01:25:57 2014	(r369352)
@@ -3,7 +3,7 @@ $FreeBSD$
 
 --- tools/clang/tools/scan-build/scan-build.orig
 +++ tools/clang/tools/scan-build/scan-build
-@@ -423,7 +423,7 @@
+@@ -410,7 +410,7 @@
  
    my $Dir = shift;
  
@@ -12,7 +12,7 @@ $FreeBSD$
    
    DieDiag("Cannot find 'sorttable.js'.\n")
      if (! -r $JS);  
-@@ -433,7 +433,7 @@
+@@ -420,7 +420,7 @@
    DieDiag("Could not copy 'sorttable.js' to '$Dir'.\n")
      if (! -r "$Dir/sorttable.js");
      
@@ -21,3 +21,12 @@ $FreeBSD$
    
    DieDiag("Cannot find 'scanview.css'.\n")
      if (! -r $CSS);
+@@ -844,7 +844,7 @@
+   my $Num = scalar(@Index);
+   Diag("$Num bugs found.\n");
+   if ($Num > 0 && -r "$Dir/index.html") {
+-    Diag("Run 'scan-view $Dir' to examine bug reports.\n");
++    Diag("Run 'scan-view%%LLVM_SUFFIX%% $Dir' to examine bug reports.\n");
+   }
+   
+   DiagCrashes($Dir) if (scalar @failures || scalar @attributes_ignored);

Modified: head/lang/clang33/pkg-plist
==============================================================================
--- head/lang/clang33/pkg-plist	Sat Sep 27 01:00:41 2014	(r369351)
+++ head/lang/clang33/pkg-plist	Sat Sep 27 01:25:57 2014	(r369352)
@@ -474,11 +474,19 @@ llvm33/lib/libclangStaticAnalyzerChecker
 llvm33/lib/libclangStaticAnalyzerCore.a
 llvm33/lib/libclangStaticAnalyzerFrontend.a
 llvm33/lib/libclangTooling.a
+llvm33/lib/python/Reporter.py
+llvm33/lib/python/Resources/FileRadar.scpt
+llvm33/lib/python/Resources/GetRadarVersion.scpt
+llvm33/lib/python/Resources/bugcatcher.ico
+llvm33/lib/python/ScanView.py
+llvm33/lib/python/startfile.py
 man/man1/clang33.1.gz
 man/man1/scan-build%%LLVM_SUFFIX%%.1.gz
 %%PORTDOCS%%%%DOCSDIR%%/html/clang/clang.html
 %%PORTDOCS%%%%DOCSDIR%%/html/clang/manpage.css
 %%PORTDOCS%%%%DOCSDIR%%/ps/clang.ps
+@dirrm llvm33/lib/python/Resources
+@dirrm llvm33/lib/python
 @dirrm llvm33/lib/clang/3.3/include
 @dirrm llvm33/lib/clang/3.3
 @dirrm llvm33/lib/clang



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409270125.s8R1Pw5N010644>