head	1.11;
access;
symbols
	RELEASE_8_3_0:1.3;
locks; strict;
comment	@# @;


1.11
date	2013.01.07.06.52.35;	author svnexp;	state Exp;
branches;
next	1.10;

1.10
date	2012.11.17.05.58.56;	author svnexp;	state Exp;
branches;
next	1.9;

1.9
date	2012.10.18.07.03.50;	author vanilla;	state Exp;
branches;
next	1.8;

1.8
date	2012.07.19.22.06.33;	author ak;	state Exp;
branches;
next	1.7;

1.7
date	2012.06.28.02.09.37;	author lwhsu;	state Exp;
branches;
next	1.6;

1.6
date	2012.06.13.17.01.04;	author lwhsu;	state Exp;
branches;
next	1.5;

1.5
date	2012.05.22.17.49.35;	author sperber;	state Exp;
branches;
next	1.4;

1.4
date	2012.04.07.16.22.23;	author scheidell;	state Exp;
branches;
next	1.3;

1.3
date	2012.03.15.15.28.13;	author gerald;	state Exp;
branches;
next	1.2;

1.2
date	2012.02.02.18.17.31;	author jgh;	state Exp;
branches;
next	1.1;

1.1
date	2012.01.23.16.07.04;	author lwhsu;	state Exp;
branches;
next	;


desc
@@


1.11
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/310023
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r310023 | lwhsu | 2013-01-07 06:35:04 +0000 (Mon, 07 Jan 2013) | 5 lines
## SVN ##
## SVN ## - Update to 0.5
## SVN ##
## SVN ## PR:		ports/174670
## SVN ## Submitted by:	Jyun-Yan You <jyyou@@cs.nctu.edu.tw> (maintainer)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@# Created by: Jyun-Yan You <jyyou@@cs.nctu.edu.tw>
# $FreeBSD: head/lang/rust/Makefile 310023 2013-01-07 06:35:04Z lwhsu $

PORTNAME=	rust
PORTVERSION=	0.5
CATEGORIES=	lang
MASTER_SITES=	http://static.rust-lang.org/dist/:src \
		http://static.rust-lang.org/stage0-snapshots/:boot
DISTFILES=	${RUST_SOURCE}:src \
		${RUST_BOOT}:boot
EXTRACT_ONLY=	${RUST_SOURCE}

MAINTAINER=	jyyou@@cs.nctu.edu.tw
COMMENT=	A language with a focus on memory safety and concurrency

RUST_SOURCE=	${DISTNAME}${EXTRACT_SUFX}
RUST_BOOT=	rust-stage0-${RUST_BOOT_SIG}.tar.bz2
RUST_BOOT_SIG=	2012-12-19-8554d5e-freebsd-x86_64-2bffa280f338913c735672f6ddb630c6da126fad
RUST_TARGET=	x86_64-unknown-freebsd

ONLY_FOR_ARCHS=	amd64
HAS_CONFIGURE=	yes
USE_LDCONFIG=	yes
USE_GMAKE=	yes
MAKE_JOBS_SAFE=	yes
USE_PERL5_BUILD=	yes
USE_PYTHON_BUILD=	2.6-2.7

MAN1=	rustc.1

OPTIONS_DEFINE=		CARGO
CARGO_DESC=		Build with package manager
OPTIONS_DEFAULT=	CARGO

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 900044
EXTRA_PATCHES+=	${FILESDIR}/log2.patch
.endif

.if ${OSVERSION} < 801000
EXTRA_PATCHES+=	${FILESDIR}/tgammaf.patch
.endif

.if ${OSVERSION} >= 900044
LIB_DEPENDS+=	unwind:${PORTSDIR}/devel/libunwind
CC=		clang
CXX=		clang++
CONFIGURE_ARGS+=	--enable-clang
.else
USE_GCC=	yes
.endif

.if ${PORT_OPTIONS:MCARGO}
RUN_DEPENDS+=	curl:${PORTSDIR}/ftp/curl \
		git:${PORTSDIR}/devel/git \
		gpg:${PORTSDIR}/security/gnupg
PLIST_SUB+=	CARGO=""
.else
PLIST_SUB+=	CARGO="@@comment "
.endif

LIB_DEPENDS+=	execinfo:${PORTSDIR}/devel/libexecinfo

MAKE_ARGS+=		CC=${CC} CXX=${CXX} ARCH=x86_64
CONFIGURE_ARGS+=	--disable-valgrind --disable-docs

post-extract:
	${MKDIR} ${WRKSRC}/${RUST_TARGET} && \
	cd ${WRKSRC}/${RUST_TARGET} && \
	${TAR} -xf ${DISTDIR}/${RUST_BOOT} && \
	${MV} rust-stage0 stage0

post-patch:
	${REINPLACE_CMD} \
	    -e 's|subprocess.call(\["curl"|subprocess.call(["fetch"|' \
	    ${WRKSRC}/src/etc/snapshot.py
	${REINPLACE_CMD} \
	    -e 's|$$(PREFIX_ROOT)/share/man|${MANPREFIX}/man|' \
	    ${WRKSRC}/mk/install.mk
	${REINPLACE_CMD} \
	    -e '/get-snapshot.py $$(CFG_HOST_TRIPLE)/d' \
	    ${WRKSRC}/mk/stage0.mk
.if empty(PORT_OPTIONS:MCARGO)
	${REINPLACE_CMD} \
	    -e '/$$(Q)$$(call INSTALL,$$(HB2),$$(PHB),cargo$$(X))/d' \
	    ${WRKSRC}/mk/install.mk
.endif

.include <bsd.port.post.mk>
@


1.10
log
@Switch exporter over
@
text
@d1 2
a2 6
# New ports collection makefile for: rust
# Date created: 2012-01-21
# Whom: Jyun-Yan You <jyyou@@cs.nctu.edu.tw>
#
# $FreeBSD: head/lang/rust/Makefile 306053 2012-10-18 07:03:50Z vanilla $
#
d5 1
a5 1
PORTVERSION=	0.4
d7 2
a8 2
MASTER_SITES=	http://dl.rust-lang.org/dist/:src \
		http://dl.rust-lang.org/stage0-snapshots/:boot
d18 1
a18 1
RUST_BOOT_SIG=	2012-10-09-cd6f24f-freebsd-x86_64-a2b5e9dddfa8f21cc8a068b77a47ba5425bfdcc6
d51 1
a51 1
USE_GCC=	4.6+
d86 1
a86 1
	    -e '/$$(Q)$$(call INSTALL,$$(HB3),$$(PHB),cargo$$(X))/d' \
@


1.9
log
@SVN rev 306053 on 2012-10-18 07:03:50Z by vanilla

Upgrade to 0.4.

PR:		ports/172791
Submitted by:	maintainer
Feature safe:   yes
@
text
@d5 1
a5 1
# $FreeBSD$
@


1.8
log
@SVN rev 301193 on 2012-07-19 22:06:33Z by ak

- Update to 0.3 (see https://github.com/mozilla/rust/blob/release-0.3/RELEASES.txt)

PR:	ports/169906
Submitted by:	Jyun-Yan You <jyyou@@cs.nctu.edu.tw> (maintainer)
@
text
@d9 1
a9 1
PORTVERSION=	0.3
d22 1
a22 1
RUST_BOOT_SIG=	2012-07-06-b5f5676-freebsd-x86_64-926e17746576397c10af9796d30af6a730329f71
d41 8
a79 3
	    -e '/probe_need CFG_CURL/d' \
	    ${WRKSRC}/configure
	${REINPLACE_CMD} \
@


1.7
log
@- Use empty() to check if an option is not set

PR:		ports/169051
Submitted by:	Jyun-Yan You <jyyou@@cs.nctu.edu.tw> (maintainer)
@
text
@d9 1
a9 1
PORTVERSION=	0.2
d22 1
a22 1
RUST_BOOT_SIG=	2012-03-27-eec6383-freebsd-x86_64-595f06a3c7a073917fa3274d2aafa6328c50754b
d29 1
@


1.6
log
@- Use the new options framework

PR:		ports/168703
Submitted by:	Jyun-Yan You <jyyou@@cs.nctu.edu.tw> (maintainer)
@
text
@d82 1
a82 1
.if !${PORT_OPTIONS:MCARGO}
@


1.5
log
@This patch fixes the problem that it attempts to fetch a file during building.
It adds snapshot to distfiles and removes code for downloading.

PR:            ports/168223
Submitted by:  Jyun-Yan You <jyyou _at_ cs.nctu.edu.tw> (maintainer)
Reported by:   pointyhat-west
Approved by:   decke (mentor)
@
text
@a19 2
OPTIONS=	CARGO	"Build with package manager" on

d32 5
a36 1
MAN1=		rustc.1
d41 1
a41 1
LIB_DEPENDS+=	unwind.8:${PORTSDIR}/devel/libunwind
d49 1
a49 1
.if !defined(WITHOUT_CARGO)
d58 1
a58 1
LIB_DEPENDS+=	execinfo.1:${PORTSDIR}/devel/libexecinfo
d82 1
a82 1
.if defined(WITHOUT_CARGO)
@


1.4
log
@- Update to 0.2
- The bootstrap compiler needs "cc" to link objects.

PR:		ports/166551
Submitted by:	Jyun-Yan You <jyyou@@cs.nctu.edu.tw> (maintainer)
Feature safe:	yes
@
text
@d11 5
a15 1
MASTER_SITES=	http://dl.rust-lang.org/dist/
d22 5
d61 6
d77 3
@


1.3
log
@Replace USE_GCC=4.4+ by USE_GCC=4.6+, a noop on the build cluster.

Approved by:	maintainer (jyyou@@cs.nctu.edu.tw)
Feature safe:	yes
@
text
@d9 1
a9 2
PORTVERSION=	0.1
PORTREVISION=	1
d11 1
a11 5
MASTER_SITES=	http://dl.rust-lang.org/dist/:source \
		http://people.cs.nctu.edu.tw/~jyyou/rust/:boot
DISTFILES=	${RUST_SOURCE}:source \
		${RUST_BOOT}:boot
EXTRACT_ONLY=	${RUST_SOURCE}
d16 1
a16 5
OPTIONS=	CARGO	"Build with package manager" off

RUST_SOURCE=	${DISTNAME}${EXTRACT_SUFX}
RUST_BOOT=	rust-${PORTVERSION}-boot-${CC}.tar.bz2
RUST_TARGET=	x86_64-unknown-freebsd
d42 3
a51 6
post-extract:
	${MKDIR} ${WRKSRC}/${RUST_TARGET} && \
	cd ${WRKSRC}/${RUST_TARGET} && \
	    tar xf ${DISTDIR}/${RUST_BOOT} && \
	    ${MV} rust-stage0 stage0

d57 2
a58 2
	    -e '/src\/etc\/get-snapshot.py $$(CFG_HOST_TRIPLE)/d' \
	    ${WRKSRC}/mk/stage0.mk
d60 1
a60 1
	    -e 's|\$$(PREFIX_ROOT)/share/man|${MANPREFIX}/man|g' \
d62 1
a62 1
.if ${OSVERSION} >= 900044
d64 2
a65 2
	    -e 's|prog: str = "gcc"|prog: str = "clang"|' \
	    ${WRKSRC}/src/comp/back/link.rs
@


1.2
log
@- fix linker errors for systems that have installed llvm
- let clang build llvm
- fix build on ${OSVERSION} < 800107

PR: ports/164467
Submitted by: maintainer, jyyou at cs.nctu.edu.tw
Approved by:	crees (mentor)
@
text
@d44 1
a44 1
USE_GCC=	4.4+
@


1.1
log
@Add rust 0.1, a language with a focus on memory safety and concurrency.

PR:		ports/164366
Submitted by:	Jyun-Yan You <jyyou@@cs.nctu.edu.tw>
@
text
@d10 1
d24 1
a24 1
RUST_BOOT=	rust-${PORTVERSION}-boot.tar.bz2
a46 4
.if ${OSVERSION} < 800107
IGNORE=	needs tgammaf(3)
.endif

d66 3
d74 5
@

