2013-01-07 07:35:04 +01:00
|
|
|
# Created by: Jyun-Yan You <jyyou@cs.nctu.edu.tw>
|
2012-01-23 17:07:04 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= rust
|
2013-07-09 14:51:31 +02:00
|
|
|
PORTVERSION= 0.7
|
2012-01-23 17:07:04 +01:00
|
|
|
CATEGORIES= lang
|
2013-01-07 07:35:04 +01:00
|
|
|
MASTER_SITES= http://static.rust-lang.org/dist/:src \
|
|
|
|
http://static.rust-lang.org/stage0-snapshots/:boot
|
2012-05-22 19:49:35 +02:00
|
|
|
DISTFILES= ${RUST_SOURCE}:src \
|
|
|
|
${RUST_BOOT}:boot
|
|
|
|
EXTRACT_ONLY= ${RUST_SOURCE}
|
2012-01-23 17:07:04 +01:00
|
|
|
|
|
|
|
MAINTAINER= jyyou@cs.nctu.edu.tw
|
|
|
|
COMMENT= A language with a focus on memory safety and concurrency
|
|
|
|
|
2012-05-22 19:49:35 +02:00
|
|
|
RUST_SOURCE= ${DISTNAME}${EXTRACT_SUFX}
|
|
|
|
RUST_BOOT= rust-stage0-${RUST_BOOT_SIG}.tar.bz2
|
2013-07-09 14:51:31 +02:00
|
|
|
RUST_BOOT_SIG= 2013-06-23-f827561-freebsd-x86_64-a05bdda2d9ec0e66336d81b98bee8a95442a501f
|
2012-05-22 19:49:35 +02:00
|
|
|
RUST_TARGET= x86_64-unknown-freebsd
|
|
|
|
|
2012-01-23 17:07:04 +01:00
|
|
|
ONLY_FOR_ARCHS= amd64
|
|
|
|
HAS_CONFIGURE= yes
|
|
|
|
USE_LDCONFIG= yes
|
2013-09-17 08:40:21 +02:00
|
|
|
USES= gmake perl5
|
|
|
|
USE_PERL5= build
|
2012-01-23 17:07:04 +01:00
|
|
|
USE_PYTHON_BUILD= 2.6-2.7
|
|
|
|
|
2013-09-08 17:10:42 +02:00
|
|
|
MAKE_JOBS_UNSAFE= yes
|
|
|
|
|
2012-06-13 19:01:04 +02:00
|
|
|
MAN1= rustc.1
|
|
|
|
|
2013-04-24 15:46:41 +02:00
|
|
|
OPTIONS_DEFINE= RUSTPKG
|
|
|
|
RUSTPKG_DESC= Build with package manager
|
|
|
|
OPTIONS_DEFAULT= RUSTPKG
|
2012-01-23 17:07:04 +01:00
|
|
|
|
2013-09-20 21:53:09 +02:00
|
|
|
NO_STAGE= yes
|
2012-01-23 17:07:04 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2012-10-18 09:03:50 +02:00
|
|
|
.if ${OSVERSION} < 900044
|
2013-07-09 14:51:31 +02:00
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/log2.patch \
|
|
|
|
${FILESDIR}/llvm.patch
|
2012-10-18 09:03:50 +02:00
|
|
|
.endif
|
|
|
|
|
2012-01-23 17:07:04 +01:00
|
|
|
.if ${OSVERSION} >= 900044
|
2012-06-13 19:01:04 +02:00
|
|
|
LIB_DEPENDS+= unwind:${PORTSDIR}/devel/libunwind
|
2012-01-23 17:07:04 +01:00
|
|
|
CC= clang
|
|
|
|
CXX= clang++
|
|
|
|
CONFIGURE_ARGS+= --enable-clang
|
|
|
|
.else
|
2013-01-07 07:35:04 +01:00
|
|
|
USE_GCC= yes
|
2012-01-23 17:07:04 +01:00
|
|
|
.endif
|
|
|
|
|
2013-04-24 15:46:41 +02:00
|
|
|
.if ${PORT_OPTIONS:MRUSTPKG}
|
2013-07-09 14:51:31 +02:00
|
|
|
RUN_DEPENDS+= git:${PORTSDIR}/devel/git
|
2013-04-24 15:46:41 +02:00
|
|
|
PLIST_SUB+= RUSTPKG=""
|
2012-04-07 18:22:23 +02:00
|
|
|
.else
|
2013-04-24 15:46:41 +02:00
|
|
|
PLIST_SUB+= RUSTPKG="@comment "
|
2012-01-23 17:07:04 +01:00
|
|
|
.endif
|
|
|
|
|
2012-06-13 19:01:04 +02:00
|
|
|
LIB_DEPENDS+= execinfo:${PORTSDIR}/devel/libexecinfo
|
2012-01-23 17:07:04 +01:00
|
|
|
|
|
|
|
MAKE_ARGS+= CC=${CC} CXX=${CXX} ARCH=x86_64
|
|
|
|
CONFIGURE_ARGS+= --disable-valgrind --disable-docs
|
|
|
|
|
2012-05-22 19:49:35 +02:00
|
|
|
post-extract:
|
|
|
|
${MKDIR} ${WRKSRC}/${RUST_TARGET} && \
|
|
|
|
cd ${WRKSRC}/${RUST_TARGET} && \
|
|
|
|
${TAR} -xf ${DISTDIR}/${RUST_BOOT} && \
|
|
|
|
${MV} rust-stage0 stage0
|
|
|
|
|
2012-01-23 17:07:04 +01:00
|
|
|
post-patch:
|
|
|
|
${REINPLACE_CMD} \
|
2012-04-07 18:22:23 +02:00
|
|
|
-e 's|$$(PREFIX_ROOT)/share/man|${MANPREFIX}/man|' \
|
2012-01-23 17:07:04 +01:00
|
|
|
${WRKSRC}/mk/install.mk
|
2012-05-22 19:49:35 +02:00
|
|
|
${REINPLACE_CMD} \
|
2013-04-24 15:46:41 +02:00
|
|
|
-e '/get-snapshot.py $$(CFG_BUILD_TRIPLE)/d' \
|
2012-05-22 19:49:35 +02:00
|
|
|
${WRKSRC}/mk/stage0.mk
|
2013-04-24 15:46:41 +02:00
|
|
|
.if empty(PORT_OPTIONS:MRUSTPKG)
|
2012-02-02 19:17:31 +01:00
|
|
|
${REINPLACE_CMD} \
|
2013-04-24 15:46:41 +02:00
|
|
|
-e '/$$(Q)$$(call INSTALL,$$(HB2),$$(PHB),rustpkg$$(X_$$(CFG_BUILD_TRIPLE)))/d' \
|
2012-04-07 18:22:23 +02:00
|
|
|
${WRKSRC}/mk/install.mk
|
2012-02-02 19:17:31 +01:00
|
|
|
.endif
|
2012-01-23 17:07:04 +01:00
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|