diff options
author | brooks <brooks@FreeBSD.org> | 2012-07-17 06:55:45 +0800 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2012-07-17 06:55:45 +0800 |
commit | 7d24fabbd36515f6ebfdd4b783dbe2422b454bcb (patch) | |
tree | 478ae95a5be566d5100e6179506493ea0ebfdb62 /lang/clang-devel/Makefile | |
parent | 381aff263e0cef456e50aaf66ace59e7cf9b25b9 (diff) | |
download | freebsd-ports-gnome-7d24fabbd36515f6ebfdd4b783dbe2422b454bcb.tar.gz freebsd-ports-gnome-7d24fabbd36515f6ebfdd4b783dbe2422b454bcb.tar.zst freebsd-ports-gnome-7d24fabbd36515f6ebfdd4b783dbe2422b454bcb.zip |
Update to a 3.2 snapshot. OPTIONSng-ify. Reduce diffs with non-devel
ports.
Diffstat (limited to 'lang/clang-devel/Makefile')
-rw-r--r-- | lang/clang-devel/Makefile | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/lang/clang-devel/Makefile b/lang/clang-devel/Makefile index ca1fb685aa24..f66c361578a2 100644 --- a/lang/clang-devel/Makefile +++ b/lang/clang-devel/Makefile @@ -6,7 +6,7 @@ # PORTNAME= clang -PORTVERSION= 3.1.r${SVN_REV} +PORTVERSION= 3.2.r${SVN_REV} CATEGORIES= lang devel MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= brooks @@ -21,6 +21,7 @@ COMMENT= C, Objective-C, and (alpha-quality) C++ compiler CONFLICTS= clang-[23]* CLANG_NAME= clang-${PORTVERSION} +CLANG_RELEASE= ${PORTVERSION:C/\.r[0-9]*//} CLANG_SOURCE= ${CLANG_NAME}${EXTRACT_SUFX} LLVM_NAME= llvm-${PORTVERSION} LLVM_SOURCE= ${LLVM_NAME}${EXTRACT_SUFX} @@ -47,22 +48,40 @@ USE_PERL5= yes USE_PYTHON= yes MAKE_JOBS_SAFE= yes -MAKE_ARGS= CLANG_TBLGEN=${WRKSRC}/Release+Asserts/bin/clang-tblgen \ +MAKE_ARGS= CLANG_TBLGEN=${WRKSRC}/${RELTYPE}/bin/clang-tblgen \ LLVMIncDir=${LOCALBASE}/include \ LLVMToolDir=${LOCALBASE}/bin \ LLVMLibDir=${LOCALBASE}/lib +OPTIONS_DEFINE= ASSERTS DOCS + +ASSERTS_DESC= Enable assertions (thread unsafe) + +MAN1= clang.1 + +PLIST_SUB+= CLANG_RELEASE=${CLANG_RELEASE} + +.include <bsd.port.options.mk> + .if defined(MAINTAINER_MODE) CONFIGURE_ARGS+= --with-f2c=${LOCALBASE} .else CONFIGURE_ARGS+= --enable-optimized .endif -.if defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} +CONFIGURE_ARGS+= --enable-docs +.else CONFIGURE_ARGS+= --disable-docs .endif -MAN1= clang.1 +.if ${PORT_OPTIONS:MASSERTS} +CONFIGURE_ARGS+= --enable-assertions +RELTYPE= Release+Asserts +.else +CONFIGURE_ARGS+= --disable-assertions +RELTYPE= Release +.endif .include <bsd.port.pre.mk> @@ -106,12 +125,12 @@ post-patch: pre-build: ${LN} -sf ${LOCALBASE}/include/llvm/Intrinsics.gen ${WRKSRC}/include/llvm/ - ${MKDIR} ${WRKSRC}/Release+Asserts/lib - ${LN} -sf ${LOCALBASE}/lib/libLLVMTableGen.a ${WRKSRC}/Release+Asserts/lib/ - ${LN} -sf ${LOCALBASE}/lib/libLLVMSupport.a ${WRKSRC}/Release+Asserts/lib/ + ${MKDIR} ${WRKSRC}/${RELTYPE}/lib + ${LN} -sf ${LOCALBASE}/lib/libLLVMTableGen.a ${WRKSRC}/${RELTYPE}/lib/ + ${LN} -sf ${LOCALBASE}/lib/libLLVMSupport.a ${WRKSRC}/${RELTYPE}/lib/ cd ${WRKSRC}/utils/unittest && ${GMAKE} -.if defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} post-build: @cd ${WRKSRC}/tools/clang/docs/tools && ${GMAKE} clang.1 .endif @@ -131,7 +150,7 @@ post-install: @${MKDIR} ${DATADIR} @${INSTALL_DATA} ${WRKSRC}/tools/clang/tools/scan-build/scanview.css ${DATADIR} @${INSTALL_DATA} ${WRKSRC}/tools/clang/tools/scan-build/sorttable.js ${DATADIR} -.if defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} @${INSTALL_MAN} ${WRKSRC}/tools/clang/docs/tools/clang.1 \ ${MANPREFIX}/man/man1/ .else @@ -169,6 +188,7 @@ build-plist: ${RM} -f ${PLIST} cd ${PREFIX} && \ (ls ${PLIST_FILE_LIST}; ${FIND} ${PLIST_DIR_LIST} -type f) | \ + ${SED} -e 's|${CLANG_RELEASE}|%%CLANG_RELEASE%%|' | \ ${SORT} >> ${PLIST} ${FIND} ${DATADIR} ${DOCSDIR} -type f | \ ${SED} -e 's|${DATADIR}|%%DATADIR%%|' \ @@ -178,6 +198,7 @@ build-plist: ${SED} -e 's|^|%%PYTHON_SITELIBDIR%%/|' >> ${PLIST} cd ${PREFIX} && \ ${FIND} ${PLIST_DIR_LIST} -type d | \ + ${SED} -e 's|${CLANG_RELEASE}|%%CLANG_RELEASE%%|' | \ ${SORT} -r | ${SED} -e 's|^|@dirrm |' >> ${PLIST} cd ${PYTHONPREFIX_SITELIBDIR} && \ ${FIND} ${PLIST_PYDIR_LIST} -type d | ${SORT} -r | \ |