mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Add a port of the clang C, Objective-C, and (soon) C++ compiler version
2.6. NOTE: this port is slightly evil and both depends on llvm and builds all of it. We hope to find the correct make string to fix this, but wanted make clang available now.
This commit is contained in:
parent
95e3ccce00
commit
c17defb201
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=243274
16 changed files with 547 additions and 0 deletions
|
@ -171,6 +171,7 @@
|
|||
SUBDIR += cl-split-sequence-sbcl
|
||||
SUBDIR += cl-uffi
|
||||
SUBDIR += cl-uffi-sbcl
|
||||
SUBDIR += clang
|
||||
SUBDIR += clanlib
|
||||
SUBDIR += clewn
|
||||
SUBDIR += clig
|
||||
|
|
116
devel/clang/Makefile
Normal file
116
devel/clang/Makefile
Normal file
|
@ -0,0 +1,116 @@
|
|||
# New ports collection makefile for: clang
|
||||
# Date created: 24 Oct 2009
|
||||
# Whom: Brooks Davis
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= clang
|
||||
PORTVERSION= 2.6
|
||||
CATEGORIES= devel lang
|
||||
MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/
|
||||
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
|
||||
${LLVM_SOURCE}
|
||||
EXTRACT_ONLY= ${LLVM_SOURCE}
|
||||
|
||||
MAINTAINER= brooks@FreeBSD.org
|
||||
COMMENT= C, Objective-C, and (soon) C++ compiler
|
||||
|
||||
CLANG_NAME= clang-${PORTVERSION}
|
||||
CLANG_SOURCE= ${CLANG_NAME}${EXTRACT_SUFX}
|
||||
LLVM_NAME= llvm-${PORTVERSION}
|
||||
LLVM_SOURCE= ${LLVM_NAME}${EXTRACT_SUFX}
|
||||
|
||||
WRKSRC= ${WRKDIR}/${LLVM_NAME}
|
||||
INSTALL_WRKSRC= ${WRKSRC}/tools/clang
|
||||
|
||||
BUILD_DEPENDS+= llvm=2.6:${PORTSDIR}/devel/llvm
|
||||
RUN_DEPENDS+= llvm=2.6:${PORTSDIR}/devel/llvm
|
||||
.if defined(PACKAGE_BUILDING) || defined(MAINTAINER_MODE)
|
||||
BUILD_DEPENDS+= runtest:${PORTSDIR}/misc/dejagnu
|
||||
.endif
|
||||
.if defined(MAINTAINER_MODE)
|
||||
BUILD_DEPENDS+= f2c:${PORTSDIR}/lang/f2c
|
||||
.endif
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USE_GMAKE= yes
|
||||
USE_PERL5_BUILD=yes
|
||||
MAKE_JOBS_SAFE= yes
|
||||
|
||||
.if defined(MAINTAINER_MODE)
|
||||
CONFIGURE_ARGS+= --with-f2c=${LOCALBASE}
|
||||
.else
|
||||
CONFIGURE_ARGS+= --enable-optimized
|
||||
.endif
|
||||
|
||||
.if defined(NOPORTDOCS)
|
||||
DOCSRCDIR=
|
||||
.else
|
||||
DOCSRCDIR= docs
|
||||
.endif
|
||||
|
||||
MAN1= clang.1
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${ARCH} == "sparc64"
|
||||
BROKEN= Does not compile on sparc64
|
||||
.endif
|
||||
|
||||
post-extract:
|
||||
cd ${WRKSRC}/tools && \
|
||||
tar xf ${DISTDIR}/${CLANG_SOURCE} && \
|
||||
${MV} ${CLANG_NAME} clang
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's|\(PROJ_docsdir.*:=\).*$$|\1${DOCSDIR}|g' \
|
||||
${WRKSRC}/Makefile.config.in
|
||||
${REINPLACE_CMD} -e 's|\(PROJ_mandir.*:=\).*$$|\1${MANPREFIX}/man|g' \
|
||||
${WRKSRC}/Makefile.config.in
|
||||
${REINPLACE_CMD} -e 's|%%DOCSRCDIR%%|${DOCSRCDIR}|' \
|
||||
${WRKSRC}/Makefile
|
||||
${REINPLACE_CMD} -e 's|/usr/bin/env perl|${PERL}|' \
|
||||
${WRKSRC}/tools/clang/utils/ccc-analyzer \
|
||||
${WRKSRC}/tools/clang/utils/scan-build
|
||||
|
||||
post-install:
|
||||
@${INSTALL_SCRIPT} ${WRKSRC}/tools/clang/utils/ccc-analyzer \
|
||||
${PREFIX}/bin
|
||||
@${INSTALL_SCRIPT} ${WRKSRC}/tools/clang/utils/scan-build \
|
||||
${PREFIX}/bin
|
||||
@${MKDIR} ${DATADIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/tools/clang/utils/scanview.css ${DATADIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/tools/clang/utils/sorttable.js ${DATADIR}
|
||||
|
||||
TEST_CMD= '(cd ${WRKSRC}/test; ${SETENV} ${MAKE_ENV} ${GMAKE} check)'
|
||||
regression-test: ${BUILD_COOKIE}
|
||||
if [ `${ID} -u` = 0 ]; then \
|
||||
${CHOWN} -R nobody ${WRKSRC}/test; \
|
||||
su -m nobody -c ${TEST_CMD}; \
|
||||
else \
|
||||
${SH} -c ${TEST_CMD}; \
|
||||
fi
|
||||
|
||||
PLIST_FILE_LIST= bin/ccc-analyzer \
|
||||
bin/clang \
|
||||
bin/scan-build \
|
||||
libexec/clang-cc
|
||||
PLIST_DIR_LIST= lib/clang
|
||||
build-plist:
|
||||
${RM} -f ${PLIST}
|
||||
cd ${PREFIX} && \
|
||||
(ls ${PLIST_FILE_LIST}; ${FIND} ${PLIST_DIR_LIST} -type f) | \
|
||||
${SORT} >> ${PLIST}
|
||||
${FIND} ${DATADIR} ${DOCSDIR} -type f | \
|
||||
${SED} -e 's|${DATADIR}|%%DATADIR%%|' \
|
||||
-e 's|${DOCSDIR}|%%PORTDOCS%%%%DOCSDIR%%|' | ${SORT} >> ${PLIST}
|
||||
cd ${PREFIX} && \
|
||||
${FIND} ${PLIST_DIR_LIST} -type d | \
|
||||
${SORT} -r | ${SED} -e 's|^|@dirrm |' >> ${PLIST}
|
||||
${FIND} ${DOCSDIR} -type d | ${SORT} -r | \
|
||||
${SED} -e 's|${DATADIR}|%%DATADIR%%|' \
|
||||
-e 's|${DOCSDIR}|%%DOCSDIR%%|' \
|
||||
-e 's|^|%%PORTDOCS%%@dirrm |' >> ${PLIST}
|
||||
|
||||
.include <bsd.port.post.mk>
|
6
devel/clang/distinfo
Normal file
6
devel/clang/distinfo
Normal file
|
@ -0,0 +1,6 @@
|
|||
MD5 (llvm-2.6.tar.gz) = 34a11e807add0f4555f691944e1a404a
|
||||
SHA256 (llvm-2.6.tar.gz) = 4cd9257350c5ff8b9b139d19497e2396c0604eef0e5d6504f5c1463b09bf2d84
|
||||
SIZE (llvm-2.6.tar.gz) = 7790380
|
||||
MD5 (clang-2.6.tar.gz) = 09d696bf23bb4a3cf6af3c7341cdd946
|
||||
SHA256 (clang-2.6.tar.gz) = 98e22f4f5877fb3c73abb9ddcb3065ba9c94a21146387da7f905e6fd559d39ea
|
||||
SIZE (clang-2.6.tar.gz) = 3857138
|
14
devel/clang/files/patch-Makefile
Normal file
14
devel/clang/files/patch-Makefile
Normal file
|
@ -0,0 +1,14 @@
|
|||
|
||||
$FreeBSD$
|
||||
|
||||
--- Makefile.orig
|
||||
+++ Makefile
|
||||
@@ -24,7 +24,7 @@
|
||||
OPTIONAL_DIRS :=
|
||||
else
|
||||
DIRS := lib/System lib/Support utils lib/VMCore lib tools/llvm-config \
|
||||
- tools runtime docs
|
||||
+ tools runtime %%DOCSRCDIR%%
|
||||
OPTIONAL_DIRS := examples projects bindings
|
||||
endif
|
||||
|
4
devel/clang/pkg-descr
Normal file
4
devel/clang/pkg-descr
Normal file
|
@ -0,0 +1,4 @@
|
|||
The goal of the Clang project is to create a new C, C++, Objective C and
|
||||
Objective C++ front-end for the LLVM compiler.
|
||||
|
||||
WWW: http://clang.llvm.org/
|
42
devel/clang/pkg-plist
Normal file
42
devel/clang/pkg-plist
Normal file
|
@ -0,0 +1,42 @@
|
|||
bin/ccc-analyzer
|
||||
bin/clang
|
||||
bin/scan-build
|
||||
lib/clang/1.0/include/emmintrin.h
|
||||
lib/clang/1.0/include/float.h
|
||||
lib/clang/1.0/include/iso646.h
|
||||
lib/clang/1.0/include/limits.h
|
||||
lib/clang/1.0/include/mm_malloc.h
|
||||
lib/clang/1.0/include/mmintrin.h
|
||||
lib/clang/1.0/include/pmmintrin.h
|
||||
lib/clang/1.0/include/stdarg.h
|
||||
lib/clang/1.0/include/stdbool.h
|
||||
lib/clang/1.0/include/stddef.h
|
||||
lib/clang/1.0/include/stdint.h
|
||||
lib/clang/1.0/include/tgmath.h
|
||||
lib/clang/1.0/include/tmmintrin.h
|
||||
lib/clang/1.0/include/xmmintrin.h
|
||||
libexec/clang-cc
|
||||
%%DATADIR%%/scanview.css
|
||||
%%DATADIR%%/sorttable.js
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html.tar.gz
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/AnalyzerRegions.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/DriverInternals.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/InternalsManual.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/LanguageExtensions.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/PCHInternals.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/PTHInternals.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/UsersManual.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/clang/clang.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/clang/manpage.css
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/doxygen.css
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/index.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/libIndex.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/ps/clang.ps
|
||||
@dirrm lib/clang/1.0/include
|
||||
@dirrm lib/clang/1.0
|
||||
@dirrm lib/clang
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%/ps
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%/html/img
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%/html/clang
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%/html
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
116
lang/clang-devel/Makefile
Normal file
116
lang/clang-devel/Makefile
Normal file
|
@ -0,0 +1,116 @@
|
|||
# New ports collection makefile for: clang
|
||||
# Date created: 24 Oct 2009
|
||||
# Whom: Brooks Davis
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= clang
|
||||
PORTVERSION= 2.6
|
||||
CATEGORIES= devel lang
|
||||
MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/
|
||||
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
|
||||
${LLVM_SOURCE}
|
||||
EXTRACT_ONLY= ${LLVM_SOURCE}
|
||||
|
||||
MAINTAINER= brooks@FreeBSD.org
|
||||
COMMENT= C, Objective-C, and (soon) C++ compiler
|
||||
|
||||
CLANG_NAME= clang-${PORTVERSION}
|
||||
CLANG_SOURCE= ${CLANG_NAME}${EXTRACT_SUFX}
|
||||
LLVM_NAME= llvm-${PORTVERSION}
|
||||
LLVM_SOURCE= ${LLVM_NAME}${EXTRACT_SUFX}
|
||||
|
||||
WRKSRC= ${WRKDIR}/${LLVM_NAME}
|
||||
INSTALL_WRKSRC= ${WRKSRC}/tools/clang
|
||||
|
||||
BUILD_DEPENDS+= llvm=2.6:${PORTSDIR}/devel/llvm
|
||||
RUN_DEPENDS+= llvm=2.6:${PORTSDIR}/devel/llvm
|
||||
.if defined(PACKAGE_BUILDING) || defined(MAINTAINER_MODE)
|
||||
BUILD_DEPENDS+= runtest:${PORTSDIR}/misc/dejagnu
|
||||
.endif
|
||||
.if defined(MAINTAINER_MODE)
|
||||
BUILD_DEPENDS+= f2c:${PORTSDIR}/lang/f2c
|
||||
.endif
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USE_GMAKE= yes
|
||||
USE_PERL5_BUILD=yes
|
||||
MAKE_JOBS_SAFE= yes
|
||||
|
||||
.if defined(MAINTAINER_MODE)
|
||||
CONFIGURE_ARGS+= --with-f2c=${LOCALBASE}
|
||||
.else
|
||||
CONFIGURE_ARGS+= --enable-optimized
|
||||
.endif
|
||||
|
||||
.if defined(NOPORTDOCS)
|
||||
DOCSRCDIR=
|
||||
.else
|
||||
DOCSRCDIR= docs
|
||||
.endif
|
||||
|
||||
MAN1= clang.1
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${ARCH} == "sparc64"
|
||||
BROKEN= Does not compile on sparc64
|
||||
.endif
|
||||
|
||||
post-extract:
|
||||
cd ${WRKSRC}/tools && \
|
||||
tar xf ${DISTDIR}/${CLANG_SOURCE} && \
|
||||
${MV} ${CLANG_NAME} clang
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's|\(PROJ_docsdir.*:=\).*$$|\1${DOCSDIR}|g' \
|
||||
${WRKSRC}/Makefile.config.in
|
||||
${REINPLACE_CMD} -e 's|\(PROJ_mandir.*:=\).*$$|\1${MANPREFIX}/man|g' \
|
||||
${WRKSRC}/Makefile.config.in
|
||||
${REINPLACE_CMD} -e 's|%%DOCSRCDIR%%|${DOCSRCDIR}|' \
|
||||
${WRKSRC}/Makefile
|
||||
${REINPLACE_CMD} -e 's|/usr/bin/env perl|${PERL}|' \
|
||||
${WRKSRC}/tools/clang/utils/ccc-analyzer \
|
||||
${WRKSRC}/tools/clang/utils/scan-build
|
||||
|
||||
post-install:
|
||||
@${INSTALL_SCRIPT} ${WRKSRC}/tools/clang/utils/ccc-analyzer \
|
||||
${PREFIX}/bin
|
||||
@${INSTALL_SCRIPT} ${WRKSRC}/tools/clang/utils/scan-build \
|
||||
${PREFIX}/bin
|
||||
@${MKDIR} ${DATADIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/tools/clang/utils/scanview.css ${DATADIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/tools/clang/utils/sorttable.js ${DATADIR}
|
||||
|
||||
TEST_CMD= '(cd ${WRKSRC}/test; ${SETENV} ${MAKE_ENV} ${GMAKE} check)'
|
||||
regression-test: ${BUILD_COOKIE}
|
||||
if [ `${ID} -u` = 0 ]; then \
|
||||
${CHOWN} -R nobody ${WRKSRC}/test; \
|
||||
su -m nobody -c ${TEST_CMD}; \
|
||||
else \
|
||||
${SH} -c ${TEST_CMD}; \
|
||||
fi
|
||||
|
||||
PLIST_FILE_LIST= bin/ccc-analyzer \
|
||||
bin/clang \
|
||||
bin/scan-build \
|
||||
libexec/clang-cc
|
||||
PLIST_DIR_LIST= lib/clang
|
||||
build-plist:
|
||||
${RM} -f ${PLIST}
|
||||
cd ${PREFIX} && \
|
||||
(ls ${PLIST_FILE_LIST}; ${FIND} ${PLIST_DIR_LIST} -type f) | \
|
||||
${SORT} >> ${PLIST}
|
||||
${FIND} ${DATADIR} ${DOCSDIR} -type f | \
|
||||
${SED} -e 's|${DATADIR}|%%DATADIR%%|' \
|
||||
-e 's|${DOCSDIR}|%%PORTDOCS%%%%DOCSDIR%%|' | ${SORT} >> ${PLIST}
|
||||
cd ${PREFIX} && \
|
||||
${FIND} ${PLIST_DIR_LIST} -type d | \
|
||||
${SORT} -r | ${SED} -e 's|^|@dirrm |' >> ${PLIST}
|
||||
${FIND} ${DOCSDIR} -type d | ${SORT} -r | \
|
||||
${SED} -e 's|${DATADIR}|%%DATADIR%%|' \
|
||||
-e 's|${DOCSDIR}|%%DOCSDIR%%|' \
|
||||
-e 's|^|%%PORTDOCS%%@dirrm |' >> ${PLIST}
|
||||
|
||||
.include <bsd.port.post.mk>
|
6
lang/clang-devel/distinfo
Normal file
6
lang/clang-devel/distinfo
Normal file
|
@ -0,0 +1,6 @@
|
|||
MD5 (llvm-2.6.tar.gz) = 34a11e807add0f4555f691944e1a404a
|
||||
SHA256 (llvm-2.6.tar.gz) = 4cd9257350c5ff8b9b139d19497e2396c0604eef0e5d6504f5c1463b09bf2d84
|
||||
SIZE (llvm-2.6.tar.gz) = 7790380
|
||||
MD5 (clang-2.6.tar.gz) = 09d696bf23bb4a3cf6af3c7341cdd946
|
||||
SHA256 (clang-2.6.tar.gz) = 98e22f4f5877fb3c73abb9ddcb3065ba9c94a21146387da7f905e6fd559d39ea
|
||||
SIZE (clang-2.6.tar.gz) = 3857138
|
14
lang/clang-devel/files/patch-Makefile
Normal file
14
lang/clang-devel/files/patch-Makefile
Normal file
|
@ -0,0 +1,14 @@
|
|||
|
||||
$FreeBSD$
|
||||
|
||||
--- Makefile.orig
|
||||
+++ Makefile
|
||||
@@ -24,7 +24,7 @@
|
||||
OPTIONAL_DIRS :=
|
||||
else
|
||||
DIRS := lib/System lib/Support utils lib/VMCore lib tools/llvm-config \
|
||||
- tools runtime docs
|
||||
+ tools runtime %%DOCSRCDIR%%
|
||||
OPTIONAL_DIRS := examples projects bindings
|
||||
endif
|
||||
|
4
lang/clang-devel/pkg-descr
Normal file
4
lang/clang-devel/pkg-descr
Normal file
|
@ -0,0 +1,4 @@
|
|||
The goal of the Clang project is to create a new C, C++, Objective C and
|
||||
Objective C++ front-end for the LLVM compiler.
|
||||
|
||||
WWW: http://clang.llvm.org/
|
42
lang/clang-devel/pkg-plist
Normal file
42
lang/clang-devel/pkg-plist
Normal file
|
@ -0,0 +1,42 @@
|
|||
bin/ccc-analyzer
|
||||
bin/clang
|
||||
bin/scan-build
|
||||
lib/clang/1.0/include/emmintrin.h
|
||||
lib/clang/1.0/include/float.h
|
||||
lib/clang/1.0/include/iso646.h
|
||||
lib/clang/1.0/include/limits.h
|
||||
lib/clang/1.0/include/mm_malloc.h
|
||||
lib/clang/1.0/include/mmintrin.h
|
||||
lib/clang/1.0/include/pmmintrin.h
|
||||
lib/clang/1.0/include/stdarg.h
|
||||
lib/clang/1.0/include/stdbool.h
|
||||
lib/clang/1.0/include/stddef.h
|
||||
lib/clang/1.0/include/stdint.h
|
||||
lib/clang/1.0/include/tgmath.h
|
||||
lib/clang/1.0/include/tmmintrin.h
|
||||
lib/clang/1.0/include/xmmintrin.h
|
||||
libexec/clang-cc
|
||||
%%DATADIR%%/scanview.css
|
||||
%%DATADIR%%/sorttable.js
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html.tar.gz
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/AnalyzerRegions.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/DriverInternals.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/InternalsManual.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/LanguageExtensions.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/PCHInternals.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/PTHInternals.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/UsersManual.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/clang/clang.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/clang/manpage.css
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/doxygen.css
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/index.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/libIndex.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/ps/clang.ps
|
||||
@dirrm lib/clang/1.0/include
|
||||
@dirrm lib/clang/1.0
|
||||
@dirrm lib/clang
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%/ps
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%/html/img
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%/html/clang
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%/html
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
116
lang/clang/Makefile
Normal file
116
lang/clang/Makefile
Normal file
|
@ -0,0 +1,116 @@
|
|||
# New ports collection makefile for: clang
|
||||
# Date created: 24 Oct 2009
|
||||
# Whom: Brooks Davis
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= clang
|
||||
PORTVERSION= 2.6
|
||||
CATEGORIES= devel lang
|
||||
MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/
|
||||
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
|
||||
${LLVM_SOURCE}
|
||||
EXTRACT_ONLY= ${LLVM_SOURCE}
|
||||
|
||||
MAINTAINER= brooks@FreeBSD.org
|
||||
COMMENT= C, Objective-C, and (soon) C++ compiler
|
||||
|
||||
CLANG_NAME= clang-${PORTVERSION}
|
||||
CLANG_SOURCE= ${CLANG_NAME}${EXTRACT_SUFX}
|
||||
LLVM_NAME= llvm-${PORTVERSION}
|
||||
LLVM_SOURCE= ${LLVM_NAME}${EXTRACT_SUFX}
|
||||
|
||||
WRKSRC= ${WRKDIR}/${LLVM_NAME}
|
||||
INSTALL_WRKSRC= ${WRKSRC}/tools/clang
|
||||
|
||||
BUILD_DEPENDS+= llvm=2.6:${PORTSDIR}/devel/llvm
|
||||
RUN_DEPENDS+= llvm=2.6:${PORTSDIR}/devel/llvm
|
||||
.if defined(PACKAGE_BUILDING) || defined(MAINTAINER_MODE)
|
||||
BUILD_DEPENDS+= runtest:${PORTSDIR}/misc/dejagnu
|
||||
.endif
|
||||
.if defined(MAINTAINER_MODE)
|
||||
BUILD_DEPENDS+= f2c:${PORTSDIR}/lang/f2c
|
||||
.endif
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USE_GMAKE= yes
|
||||
USE_PERL5_BUILD=yes
|
||||
MAKE_JOBS_SAFE= yes
|
||||
|
||||
.if defined(MAINTAINER_MODE)
|
||||
CONFIGURE_ARGS+= --with-f2c=${LOCALBASE}
|
||||
.else
|
||||
CONFIGURE_ARGS+= --enable-optimized
|
||||
.endif
|
||||
|
||||
.if defined(NOPORTDOCS)
|
||||
DOCSRCDIR=
|
||||
.else
|
||||
DOCSRCDIR= docs
|
||||
.endif
|
||||
|
||||
MAN1= clang.1
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${ARCH} == "sparc64"
|
||||
BROKEN= Does not compile on sparc64
|
||||
.endif
|
||||
|
||||
post-extract:
|
||||
cd ${WRKSRC}/tools && \
|
||||
tar xf ${DISTDIR}/${CLANG_SOURCE} && \
|
||||
${MV} ${CLANG_NAME} clang
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's|\(PROJ_docsdir.*:=\).*$$|\1${DOCSDIR}|g' \
|
||||
${WRKSRC}/Makefile.config.in
|
||||
${REINPLACE_CMD} -e 's|\(PROJ_mandir.*:=\).*$$|\1${MANPREFIX}/man|g' \
|
||||
${WRKSRC}/Makefile.config.in
|
||||
${REINPLACE_CMD} -e 's|%%DOCSRCDIR%%|${DOCSRCDIR}|' \
|
||||
${WRKSRC}/Makefile
|
||||
${REINPLACE_CMD} -e 's|/usr/bin/env perl|${PERL}|' \
|
||||
${WRKSRC}/tools/clang/utils/ccc-analyzer \
|
||||
${WRKSRC}/tools/clang/utils/scan-build
|
||||
|
||||
post-install:
|
||||
@${INSTALL_SCRIPT} ${WRKSRC}/tools/clang/utils/ccc-analyzer \
|
||||
${PREFIX}/bin
|
||||
@${INSTALL_SCRIPT} ${WRKSRC}/tools/clang/utils/scan-build \
|
||||
${PREFIX}/bin
|
||||
@${MKDIR} ${DATADIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/tools/clang/utils/scanview.css ${DATADIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/tools/clang/utils/sorttable.js ${DATADIR}
|
||||
|
||||
TEST_CMD= '(cd ${WRKSRC}/test; ${SETENV} ${MAKE_ENV} ${GMAKE} check)'
|
||||
regression-test: ${BUILD_COOKIE}
|
||||
if [ `${ID} -u` = 0 ]; then \
|
||||
${CHOWN} -R nobody ${WRKSRC}/test; \
|
||||
su -m nobody -c ${TEST_CMD}; \
|
||||
else \
|
||||
${SH} -c ${TEST_CMD}; \
|
||||
fi
|
||||
|
||||
PLIST_FILE_LIST= bin/ccc-analyzer \
|
||||
bin/clang \
|
||||
bin/scan-build \
|
||||
libexec/clang-cc
|
||||
PLIST_DIR_LIST= lib/clang
|
||||
build-plist:
|
||||
${RM} -f ${PLIST}
|
||||
cd ${PREFIX} && \
|
||||
(ls ${PLIST_FILE_LIST}; ${FIND} ${PLIST_DIR_LIST} -type f) | \
|
||||
${SORT} >> ${PLIST}
|
||||
${FIND} ${DATADIR} ${DOCSDIR} -type f | \
|
||||
${SED} -e 's|${DATADIR}|%%DATADIR%%|' \
|
||||
-e 's|${DOCSDIR}|%%PORTDOCS%%%%DOCSDIR%%|' | ${SORT} >> ${PLIST}
|
||||
cd ${PREFIX} && \
|
||||
${FIND} ${PLIST_DIR_LIST} -type d | \
|
||||
${SORT} -r | ${SED} -e 's|^|@dirrm |' >> ${PLIST}
|
||||
${FIND} ${DOCSDIR} -type d | ${SORT} -r | \
|
||||
${SED} -e 's|${DATADIR}|%%DATADIR%%|' \
|
||||
-e 's|${DOCSDIR}|%%DOCSDIR%%|' \
|
||||
-e 's|^|%%PORTDOCS%%@dirrm |' >> ${PLIST}
|
||||
|
||||
.include <bsd.port.post.mk>
|
6
lang/clang/distinfo
Normal file
6
lang/clang/distinfo
Normal file
|
@ -0,0 +1,6 @@
|
|||
MD5 (llvm-2.6.tar.gz) = 34a11e807add0f4555f691944e1a404a
|
||||
SHA256 (llvm-2.6.tar.gz) = 4cd9257350c5ff8b9b139d19497e2396c0604eef0e5d6504f5c1463b09bf2d84
|
||||
SIZE (llvm-2.6.tar.gz) = 7790380
|
||||
MD5 (clang-2.6.tar.gz) = 09d696bf23bb4a3cf6af3c7341cdd946
|
||||
SHA256 (clang-2.6.tar.gz) = 98e22f4f5877fb3c73abb9ddcb3065ba9c94a21146387da7f905e6fd559d39ea
|
||||
SIZE (clang-2.6.tar.gz) = 3857138
|
14
lang/clang/files/patch-Makefile
Normal file
14
lang/clang/files/patch-Makefile
Normal file
|
@ -0,0 +1,14 @@
|
|||
|
||||
$FreeBSD$
|
||||
|
||||
--- Makefile.orig
|
||||
+++ Makefile
|
||||
@@ -24,7 +24,7 @@
|
||||
OPTIONAL_DIRS :=
|
||||
else
|
||||
DIRS := lib/System lib/Support utils lib/VMCore lib tools/llvm-config \
|
||||
- tools runtime docs
|
||||
+ tools runtime %%DOCSRCDIR%%
|
||||
OPTIONAL_DIRS := examples projects bindings
|
||||
endif
|
||||
|
4
lang/clang/pkg-descr
Normal file
4
lang/clang/pkg-descr
Normal file
|
@ -0,0 +1,4 @@
|
|||
The goal of the Clang project is to create a new C, C++, Objective C and
|
||||
Objective C++ front-end for the LLVM compiler.
|
||||
|
||||
WWW: http://clang.llvm.org/
|
42
lang/clang/pkg-plist
Normal file
42
lang/clang/pkg-plist
Normal file
|
@ -0,0 +1,42 @@
|
|||
bin/ccc-analyzer
|
||||
bin/clang
|
||||
bin/scan-build
|
||||
lib/clang/1.0/include/emmintrin.h
|
||||
lib/clang/1.0/include/float.h
|
||||
lib/clang/1.0/include/iso646.h
|
||||
lib/clang/1.0/include/limits.h
|
||||
lib/clang/1.0/include/mm_malloc.h
|
||||
lib/clang/1.0/include/mmintrin.h
|
||||
lib/clang/1.0/include/pmmintrin.h
|
||||
lib/clang/1.0/include/stdarg.h
|
||||
lib/clang/1.0/include/stdbool.h
|
||||
lib/clang/1.0/include/stddef.h
|
||||
lib/clang/1.0/include/stdint.h
|
||||
lib/clang/1.0/include/tgmath.h
|
||||
lib/clang/1.0/include/tmmintrin.h
|
||||
lib/clang/1.0/include/xmmintrin.h
|
||||
libexec/clang-cc
|
||||
%%DATADIR%%/scanview.css
|
||||
%%DATADIR%%/sorttable.js
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html.tar.gz
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/AnalyzerRegions.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/DriverInternals.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/InternalsManual.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/LanguageExtensions.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/PCHInternals.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/PTHInternals.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/UsersManual.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/clang/clang.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/clang/manpage.css
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/doxygen.css
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/index.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/html/libIndex.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/ps/clang.ps
|
||||
@dirrm lib/clang/1.0/include
|
||||
@dirrm lib/clang/1.0
|
||||
@dirrm lib/clang
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%/ps
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%/html/img
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%/html/clang
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%/html
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
Loading…
Add table
Reference in a new issue