diff options
author | Li-Wen Hsu <lwhsu@FreeBSD.org> | 2012-06-13 17:01:04 +0000 |
---|---|---|
committer | Li-Wen Hsu <lwhsu@FreeBSD.org> | 2012-06-13 17:01:04 +0000 |
commit | a7087ecbaf97e62905e03fed75ebe9fbe6c4edab (patch) | |
tree | 47f98c172b201d4cccbc4d8aa2eb7f7f5dca822f /lang | |
parent | Convert to use new OPTIONS framework. (diff) |
- Use the new options framework
PR: ports/168703
Submitted by: Jyun-Yan You <jyyou@cs.nctu.edu.tw> (maintainer)
Notes
Notes:
svn path=/head/; revision=299204
Diffstat (limited to 'lang')
-rw-r--r-- | lang/rust/Makefile | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lang/rust/Makefile b/lang/rust/Makefile index a73afa90df2d..0d040dcdc2ab 100644 --- a/lang/rust/Makefile +++ b/lang/rust/Makefile @@ -17,8 +17,6 @@ EXTRACT_ONLY= ${RUST_SOURCE} MAINTAINER= jyyou@cs.nctu.edu.tw COMMENT= A language with a focus on memory safety and concurrency -OPTIONS= CARGO "Build with package manager" on - RUST_SOURCE= ${DISTNAME}${EXTRACT_SUFX} RUST_BOOT= rust-stage0-${RUST_BOOT_SIG}.tar.bz2 RUST_BOOT_SIG= 2012-03-27-eec6383-freebsd-x86_64-595f06a3c7a073917fa3274d2aafa6328c50754b @@ -31,12 +29,16 @@ USE_GMAKE= yes USE_PERL5_BUILD= yes USE_PYTHON_BUILD= 2.6-2.7 -MAN1= rustc.1 +MAN1= rustc.1 + +OPTIONS_DEFINE= CARGO +CARGO_DESC= Build with package manager +OPTIONS_DEFAULT= CARGO .include <bsd.port.pre.mk> .if ${OSVERSION} >= 900044 -LIB_DEPENDS+= unwind.8:${PORTSDIR}/devel/libunwind +LIB_DEPENDS+= unwind:${PORTSDIR}/devel/libunwind CC= clang CXX= clang++ CONFIGURE_ARGS+= --enable-clang @@ -44,7 +46,7 @@ CONFIGURE_ARGS+= --enable-clang USE_GCC= 4.6+ .endif -.if !defined(WITHOUT_CARGO) +.if ${PORT_OPTIONS:MCARGO} RUN_DEPENDS+= curl:${PORTSDIR}/ftp/curl \ git:${PORTSDIR}/devel/git \ gpg:${PORTSDIR}/security/gnupg @@ -53,7 +55,7 @@ PLIST_SUB+= CARGO="" PLIST_SUB+= CARGO="@comment " .endif -LIB_DEPENDS+= execinfo.1:${PORTSDIR}/devel/libexecinfo +LIB_DEPENDS+= execinfo:${PORTSDIR}/devel/libexecinfo MAKE_ARGS+= CC=${CC} CXX=${CXX} ARCH=x86_64 CONFIGURE_ARGS+= --disable-valgrind --disable-docs @@ -77,7 +79,7 @@ post-patch: ${REINPLACE_CMD} \ -e '/get-snapshot.py $$(CFG_HOST_TRIPLE)/d' \ ${WRKSRC}/mk/stage0.mk -.if defined(WITHOUT_CARGO) +.if !${PORT_OPTIONS:MCARGO} ${REINPLACE_CMD} \ -e '/$$(Q)$$(call INSTALL,$$(HB3),$$(PHB),cargo$$(X))/d' \ ${WRKSRC}/mk/install.mk |