aboutsummaryrefslogtreecommitdiffstats
path: root/devel/clang
diff options
context:
space:
mode:
authormandree <mandree@FreeBSD.org>2010-08-18 08:59:18 +0800
committermandree <mandree@FreeBSD.org>2010-08-18 08:59:18 +0800
commit1a9e9168e68ef4dc563cfbe9a3ee3c4035e6d58d (patch)
treeddd182f31231260367304ed048ebf83209255f83 /devel/clang
parentd6209d052dc6709ac76dadd4e147c72523d54878 (diff)
downloadfreebsd-ports-gnome-1a9e9168e68ef4dc563cfbe9a3ee3c4035e6d58d.tar.gz
freebsd-ports-gnome-1a9e9168e68ef4dc563cfbe9a3ee3c4035e6d58d.tar.zst
freebsd-ports-gnome-1a9e9168e68ef4dc563cfbe9a3ee3c4035e6d58d.zip
Fix clang analyzer, and clean up port a bit. Adds dependencies.
- patch scan-view to use PYTHON_CMD - also install c++-analyzer and scan-view - also install ScanView.py and its dependencies into PYTHON_SITELIBDIR - change USE_PERL5_BUILD to USE_PERL5, as scan-build needs it at run time - add USE_PYTHON, as scan-view needs it (let's see to making these dependencies optional later) - move EXTRACT_SUFX up to quiet portlint - indent CONFLICTS value with TAB to quiet portlint - add USE_LDCONFIG, found missing by portlint - nuke empty $DOCSDIR/html/img that made deinstall complain - amend to build-plist target - rebuild pkg-plist - bump PORTREVISION (changed pkg-plist) The approval was a blanket approval under the condition that build-plist was also updated, and was mailed to portmgr@ and yours truly on 2010-08-10 by brooks@ in reference to the PR mentioned below. Approved by: brooks (maintainer) PR: ports/147434
Diffstat (limited to 'devel/clang')
-rw-r--r--devel/clang/Makefile40
-rw-r--r--devel/clang/pkg-plist10
2 files changed, 42 insertions, 8 deletions
diff --git a/devel/clang/Makefile b/devel/clang/Makefile
index 5e26bc753885..7aad8c8c6c16 100644
--- a/devel/clang/Makefile
+++ b/devel/clang/Makefile
@@ -7,18 +7,18 @@
PORTNAME= clang
PORTVERSION= 2.7
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel lang
MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/
+EXTRACT_SUFX= .tgz
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
${LLVM_SOURCE}
EXTRACT_ONLY= ${LLVM_SOURCE}
-EXTRACT_SUFX= .tgz
MAINTAINER= brooks@FreeBSD.org
COMMENT= C, Objective-C, and (alpha-quality) C++ compiler
-CONFLICTS= clang-devel-2.[0-9]* llvm-devel-2.[0-9]*
+CONFLICTS= clang-devel-2.[0-9]* llvm-devel-2.[0-9]*
CLANG_NAME= clang-${PORTVERSION}
CLANG_SOURCE= ${CLANG_NAME}${EXTRACT_SUFX}
@@ -40,7 +40,9 @@ BUILD_DEPENDS+= f2c:${PORTSDIR}/lang/f2c
GNU_CONFIGURE= yes
USE_GCC= 4.2+
USE_GMAKE= yes
-USE_PERL5_BUILD=yes
+USE_LDCONFIG= yes
+USE_PERL5= yes
+USE_PYTHON= yes
MAKE_JOBS_SAFE= yes
.if defined(MAINTAINER_MODE)
@@ -77,7 +79,10 @@ post-patch:
${WRKSRC}/Makefile ${WRKSRC}/tools/clang/Makefile
${REINPLACE_CMD} -e 's|/usr/bin/env perl|${PERL}|' \
${WRKSRC}/tools/clang/tools/scan-build/ccc-analyzer \
+ ${WRKSRC}/tools/clang/tools/scan-build/c++-analyzer \
${WRKSRC}/tools/clang/tools/scan-build/scan-build
+ ${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|' \
+ ${WRKSRC}/tools/clang/tools/scan-view/scan-view
.if defined(NOPORTDOCS)
post-build:
@@ -86,9 +91,16 @@ post-build:
post-install:
@${INSTALL_SCRIPT} ${WRKSRC}/tools/clang/tools/scan-build/ccc-analyzer \
+ ${WRKSRC}/tools/clang/tools/scan-build/c++-analyzer \
+ ${WRKSRC}/tools/clang/tools/scan-build/scan-build \
+ ${WRKSRC}/tools/clang/tools/scan-view/scan-view \
${PREFIX}/bin
- @${INSTALL_SCRIPT} ${WRKSRC}/tools/clang/tools/scan-build/scan-build \
- ${PREFIX}/bin
+ @${MKDIR} ${PYTHONPREFIX_SITELIBDIR}
+ @${MKDIR} ${PYTHONPREFIX_SITELIBDIR}/Resources
+ @${INSTALL_SCRIPT} ${WRKSRC}/tools/clang/tools/scan-view/*.py \
+ ${PYTHONPREFIX_SITELIBDIR}
+ @${INSTALL_SCRIPT} ${WRKSRC}/tools/clang/tools/scan-view/Resources/* \
+ ${PYTHONPREFIX_SITELIBDIR}/Resources
@${MKDIR} ${DATADIR}
@${INSTALL_DATA} ${WRKSRC}/tools/clang/tools/scan-build/scanview.css ${DATADIR}
@${INSTALL_DATA} ${WRKSRC}/tools/clang/tools/scan-build/sorttable.js ${DATADIR}
@@ -96,6 +108,7 @@ post-install:
@${INSTALL_MAN} ${WRKSRC}/tools/clang/docs/tools/clang.1 \
${MANPREFIX}/man/man1/
.endif
+ @${RMDIR} ${DOCSDIR}/html/img
TEST_CMD= '(cd ${WRKSRC}/test; ${SETENV} ${MAKE_ENV} ${GMAKE} check)'
regression-test: ${BUILD_COOKIE}
@@ -107,15 +120,22 @@ regression-test: ${BUILD_COOKIE}
fi
PLIST_FILE_LIST= bin/ccc-analyzer \
+ bin/c++-analyzer \
bin/clang \
bin/clang++ \
bin/scan-build \
+ bin/scan-view \
lib/libCIndex.* \
lib/libclang*
PLIST_DIR_LIST= include/clang \
include/clang-c \
lib/clang
-
+PLIST_PYFILE_LIST= ScanView.py \
+ Reporter.py \
+ Resources/* \
+ startfile.py
+PLIST_PYDIR_LIST= Resources
+
build-plist:
${RM} -f ${PLIST}
cd ${PREFIX} && \
@@ -124,9 +144,15 @@ build-plist:
${FIND} ${DATADIR} ${DOCSDIR} -type f | \
${SED} -e 's|${DATADIR}|%%DATADIR%%|' \
-e 's|${DOCSDIR}|%%PORTDOCS%%%%DOCSDIR%%|' | ${SORT} >> ${PLIST}
+ cd ${PYTHONPREFIX_SITELIBDIR} && \
+ ls ${PLIST_PYFILE_LIST} | ${SORT} | \
+ ${SED} -e 's|^|%%PYTHON_SITELIBDIR%%/|' >> ${PLIST}
cd ${PREFIX} && \
${FIND} ${PLIST_DIR_LIST} -type d | \
${SORT} -r | ${SED} -e 's|^|@dirrm |' >> ${PLIST}
+ cd ${PYTHONPREFIX_SITELIBDIR} && \
+ ${FIND} ${PLIST_PYDIR_LIST} -type d | ${SORT} -r | \
+ ${SED} -e 's|^|@dirrm %%PYTHON_SITELIBDIR%%/|' >> ${PLIST}
${FIND} ${DATADIR} ${DOCSDIR} -type d | ${SORT} -r | \
${SED} -e 's|${DATADIR}|@dirrm %%DATADIR%%|' \
-e 's|${DOCSDIR}|%%PORTDOCS%%@dirrm %%DOCSDIR%%|' >> ${PLIST}
diff --git a/devel/clang/pkg-plist b/devel/clang/pkg-plist
index 993b51329aa5..4e912743a439 100644
--- a/devel/clang/pkg-plist
+++ b/devel/clang/pkg-plist
@@ -1,7 +1,9 @@
+bin/c++-analyzer
bin/ccc-analyzer
bin/clang
bin/clang++
bin/scan-build
+bin/scan-view
include/clang-c/Index.h
include/clang/AST/APValue.h
include/clang/AST/AST.h
@@ -298,6 +300,12 @@ lib/libclangSema.a
%%PORTDOCS%%%%DOCSDIR%%/html/index.html
%%PORTDOCS%%%%DOCSDIR%%/html/libIndex.html
%%PORTDOCS%%%%DOCSDIR%%/ps/clang.ps
+%%PYTHON_SITELIBDIR%%/Reporter.py
+%%PYTHON_SITELIBDIR%%/Resources/FileRadar.scpt
+%%PYTHON_SITELIBDIR%%/Resources/GetRadarVersion.scpt
+%%PYTHON_SITELIBDIR%%/Resources/bugcatcher.ico
+%%PYTHON_SITELIBDIR%%/ScanView.py
+%%PYTHON_SITELIBDIR%%/startfile.py
@dirrm lib/clang/1.1/include
@dirrm lib/clang/1.1
@dirrm lib/clang
@@ -325,8 +333,8 @@ lib/libclangSema.a
@dirrm include/clang/AST
@dirrm include/clang-c
@dirrm include/clang
+@dirrm %%PYTHON_SITELIBDIR%%/Resources
%%PORTDOCS%%@dirrm %%DOCSDIR%%/ps
-%%PORTDOCS%%@dirrm %%DOCSDIR%%/html/img
%%PORTDOCS%%@dirrm %%DOCSDIR%%/html/clang
%%PORTDOCS%%@dirrm %%DOCSDIR%%/html
%%PORTDOCS%%@dirrm %%DOCSDIR%%