blob: dde27d7b1fdef639df8d9cc22104a526261da4d8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# New ports collection makefile for: llvm-gcc4
# Date created: 25 Jul 2007
# Whom: Max Khon
#
# $FreeBSD$
#
PORTNAME= gcc4
PORTVERSION= 2.2
PORTREVISION= 1
CATEGORIES= lang devel
MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/
PKGNAMEPREFIX= llvm-
DISTNAME= ${PKGNAMEPREFIX}${PORTNAME}.2-${PORTVERSION}.source
MAINTAINER= emil@cs.rmit.edu.au
COMMENT= A gcc4 frontend for LLVM
BUILD_DEPENDS= llc:${PORTSDIR}/devel/llvm
GNU_CONFIGURE= yes
USE_BISON= build
USE_GMAKE= yes
USE_ICONV= yes
USE_PERL5_BUILD=yes
ONLY_FOR_ARCHS= i386 amd64
GCC_VER= 4.2.1
WRKSRC= ${WRKDIR}/${DISTNAME}/build
TARGLIB= ${PREFIX}/lib/gcc-llvm-${PORTVERSION}
CONFIGURE_SCRIPT= ../configure
CONFIGURE_ARGS= --enable-llvm=${LOCALBASE}\
--enable-languages=c,c++\
--disable-nls\
--with-system-zlib\
--with-libiconv-prefix=${LOCALBASE}\
--program-prefix=llvm-\
--libdir=${TARGLIB}\
--with-gxx-include-dir=${TARGLIB}/include/c++\
--libexecdir=${TARGLIB}\
--infodir=${PREFIX}/llvm-gcc
PLIST_SUB= GCC_VER=${GCC_VER}\
GNU_HOST=${CONFIGURE_TARGET}
INFO= llvm-gcc/cpp \
llvm-gcc/cppinternals \
llvm-gcc/gcc \
llvm-gcc/gccinstall \
llvm-gcc/gccint \
llvm-gcc/libgomp
MAN1= llvm-cpp.1 llvm-g++.1 llvm-gcc.1 llvm-gcov.1
post-extract:
@${MKDIR} ${WRKSRC}
post-patch:
@${REINPLACE_CMD} -e 's,LLVMBASEPATH/Release/bin/llc,LLVMBASEPATH/bin/llc,'\
${WRKSRC}/../gcc/configure\
${WRKSRC}/../libcpp/configure
@${REINPLACE_CMD}\
-e 's,LLVMBINPATH = .*,LLVMBINPATH = @LLVMBASEPATH@/bin,'\
-e 's,LLVMSRCDIR := .*,LLVMSRCDIR = @LLVMBASEPATH@,'\
${WRKSRC}/../gcc/Makefile.in
post-install:
${RM} -f ${PREFIX}/man/man7/fsf-funding.7 \
${PREFIX}/man/man7/gfdl.7 ${PREFIX}/man/man7/gpl.7
# Add target libraries and include files to packaging list.
${RM} -f ${WRKDIR}/PLIST.lib
.for d in ${TARGLIB:S/^${PREFIX}\///}
cd ${PREFIX} ; if [ -d $d ]; then \
${FIND} $d -type f -o -type l >>${WRKDIR}/PLIST.lib ;\
${FIND} $d -type d | ${SORT} -r \
| ${SED} -e 's/^/@dirrm /g' >>${WRKDIR}/PLIST.lib ;\
fi
.endfor
cd ${WRKDIR} ; ${SED} -i -e "/PLIST.lib/ r PLIST.lib" ${TMPPLIST}
.include <bsd.port.pre.mk>
.if ${ARCH} == "amd64"
CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL}
CONFIGURE_ARGS+= --disable-shared
.else
CONFIGURE_TARGET= ${ARCH}-portbld-freebsd${OSREL}
.endif
.include <bsd.port.post.mk>
|