Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Sep 2014 22:18:07 +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: r369350 - in head/lang/clang35: . files
Message-ID:  <201409262218.s8QMI7ZP021459@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Fri Sep 26 22:18:07 2014
New Revision: 369350
URL: http://svnweb.freebsd.org/changeset/ports/369350
QAT: https://qat.redports.org/buildarchive/r369350/

Log:
  Install the bits necessicary for scan-view to work.
  
  Make scan-build35 tell the user to run scan-view35.
  
  PR:		193955
  Sponsored by:	DARPA, AFRL

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

Modified: head/lang/clang35/Makefile
==============================================================================
--- head/lang/clang35/Makefile	Fri Sep 26 21:42:21 2014	(r369349)
+++ head/lang/clang35/Makefile	Fri Sep 26 22:18:07 2014	(r369350)
@@ -2,6 +2,7 @@
 
 PORTNAME=	clang
 DISTVERSION=	3.5.0
+PORTREVISION=	1
 CATEGORIES=	lang devel
 MASTER_SITES=   http://llvm.org/releases/3.5.0/
 PKGNAMESUFFIX=	${LLVM_SUFFIX}
@@ -31,6 +32,7 @@ LLVM_SUFFIX=	${PORTVERSION:C/([0-9]\.[0-
 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}
@@ -108,6 +110,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:
@@ -121,9 +124,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
@@ -145,10 +146,18 @@ post-install:
 	${LN} -f ${STAGEDIR}${PREFIX}/bin/${FIRST_COMMAND}${LLVM_SUFFIX} \
 	    ${STAGEDIR}${PREFIX}/bin/${command}${LLVM_SUFFIX}
 .endfor
-.if ${PORT_OPTIONS:MDOCS}
+	${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}
 	cd ${WRKSRC}/tools/clang/docs/tools && \
 	    ${MAKE_CMD} DESTDIR=${STAGEDIR}/ install-html install-ps
-.endif
 	${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 \
@@ -158,7 +167,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/clang35/files/llvm-wrapper.sh.in
==============================================================================
--- head/lang/clang35/files/llvm-wrapper.sh.in	Fri Sep 26 21:42:21 2014	(r369349)
+++ head/lang/clang35/files/llvm-wrapper.sh.in	Fri Sep 26 22:18:07 2014	(r369350)
@@ -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/clang35/files/patch-tools_clang_tools_scan-build_scan-build
==============================================================================
--- head/lang/clang35/files/patch-tools_clang_tools_scan-build_scan-build	Fri Sep 26 21:42:21 2014	(r369349)
+++ head/lang/clang35/files/patch-tools_clang_tools_scan-build_scan-build	Fri Sep 26 22:18:07 2014	(r369350)
@@ -21,3 +21,12 @@ $FreeBSD$
  
    DieDiag("Cannot find 'scanview.css'.\n")
      if (! -r $CSS);
+@@ -882,7 +882,7 @@
+     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/clang35/pkg-plist
==============================================================================
--- head/lang/clang35/pkg-plist	Fri Sep 26 21:42:21 2014	(r369349)
+++ head/lang/clang35/pkg-plist	Fri Sep 26 22:18:07 2014	(r369350)
@@ -502,11 +502,19 @@ llvm%%LLVM_SUFFIX%%/lib/libclangStaticAn
 llvm%%LLVM_SUFFIX%%/lib/libclangStaticAnalyzerCore.a
 llvm%%LLVM_SUFFIX%%/lib/libclangStaticAnalyzerFrontend.a
 llvm%%LLVM_SUFFIX%%/lib/libclangTooling.a
+llvm%%LLVM_SUFFIX%%/lib/python/Reporter.py
+llvm%%LLVM_SUFFIX%%/lib/python/Resources/FileRadar.scpt
+llvm%%LLVM_SUFFIX%%/lib/python/Resources/GetRadarVersion.scpt
+llvm%%LLVM_SUFFIX%%/lib/python/Resources/bugcatcher.ico
+llvm%%LLVM_SUFFIX%%/lib/python/ScanView.py
+llvm%%LLVM_SUFFIX%%/lib/python/startfile.py
 man/man1/clang%%LLVM_SUFFIX%%.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 llvm%%LLVM_SUFFIX%%/lib/python/Resources
+@dirrm llvm%%LLVM_SUFFIX%%/lib/python
 @dirrm llvm%%LLVM_SUFFIX%%/lib/clang/3.5.0/include
 @dirrm llvm%%LLVM_SUFFIX%%/lib/clang/3.5.0
 @dirrm llvm%%LLVM_SUFFIX%%/lib/clang



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