aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2014-07-23 15:41:07 +0800
committerdanfe <danfe@FreeBSD.org>2014-07-23 15:41:07 +0800
commita48fba25c649c9102725bf22fcb78666adf03456 (patch)
treefca9e651ee92b42a3498166ab38a9a7d9c30826b /lang
parent597347e2c33ae461f08aa661e33214691d10a10b (diff)
downloadfreebsd-ports-gnome-a48fba25c649c9102725bf22fcb78666adf03456.tar.gz
freebsd-ports-gnome-a48fba25c649c9102725bf22fcb78666adf03456.tar.zst
freebsd-ports-gnome-a48fba25c649c9102725bf22fcb78666adf03456.zip
- Give the reason why the port is currently amd64-only
- Remove no-op patch file (builds just fine with -Werror as it seems) - In BATCH or PACKAGE_BUILDING modes, produce verbose build logs - Rework post-extract target: do not extract bootstrap compiler ourselves, put it into expected download directory instead; this also allows us to optimize away RUST_TARGET knob and post-patch hack - Since the port is for FreeBSD 10+, no need to explicitly depend on libexecinfo.so - Use OPTIONS helpers, perform some other minor Makefile cleanups - Augment port description text while I am here
Diffstat (limited to 'lang')
-rw-r--r--lang/rust/Makefile44
-rw-r--r--lang/rust/files/patch-mk_platform.mk11
-rw-r--r--lang/rust/pkg-descr20
3 files changed, 33 insertions, 42 deletions
diff --git a/lang/rust/Makefile b/lang/rust/Makefile
index cba4ef11f255..e26bcf38875a 100644
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -5,9 +5,9 @@ PORTNAME= rust
PORTVERSION= 0.11.0
CATEGORIES= lang
MASTER_SITES= http://static.rust-lang.org/dist/:src \
- http://static.rust-lang.org/stage0-snapshots/:boot
+ http://static.rust-lang.org/stage0-snapshots/:bootstrap
DISTFILES= ${RUST_SOURCE}:src \
- ${RUST_BOOT}:boot
+ ${RUST_BOOT}:bootstrap
EXTRACT_ONLY= ${RUST_SOURCE}
MAINTAINER= ports@FreeBSD.org
@@ -19,51 +19,45 @@ LICENSE_COMB= dual
LICENSE_FILE= ${WRKSRC}/LICENSE-APACHE \
${WRKSRC}/LICENSE-MIT
+ONLY_FOR_ARCHS= amd64
+ONLY_FOR_ARCHS_REASON= requires prebuilt bootstrap compiler
+
RUST_SOURCE= ${DISTNAME}${EXTRACT_SUFX}
RUST_BOOT= rust-stage0-${RUST_BOOT_SIG}.tar.bz2
RUST_BOOT_SIG= 2014-06-21-db9af1d-freebsd-x86_64-ef2bd0fc0b0efa2bd6f5c1eaa60a2ec8df533254
-RUST_TARGET= x86_64-unknown-freebsd
-ONLY_FOR_ARCHS= amd64
+USES= gmake perl5
HAS_CONFIGURE= yes
+CONFIGURE_ARGS= --disable-valgrind --disable-docs \
+ --enable-clang --mandir=${MANPREFIX}/man
USE_LDCONFIG= yes
-USES= gmake perl5
USE_PERL5= build
USE_PYTHON= yes
USE_PYTHON_BUILD= 2
+MAKE_ARGS= ARCH=x86_64
+
+.if defined(BATCH) || defined(PACKAGE_BUILDING)
+MAKE_ARGS+= VERBOSE=1
+.endif
OPTIONS_DEFINE= LLNEXTGEN
LLNEXTGEN_DESC= Build with grammar verification
-.include <bsd.port.pre.mk>
+LLNEXTGEN_BUILD_DEPENDS= LLnextgen:${PORTSDIR}/devel/llnextgen
-LIB_DEPENDS+= libexecinfo.so:${PORTSDIR}/devel/libexecinfo
+.include <bsd.port.pre.mk>
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000
BROKEN= Only compiles on FreeBSD 10 and 11
.endif
-.if ${PORT_OPTIONS:MLLNEXTGEN}
-BUILD_DEPENDS+= LLnextgen:${PORTSDIR}/devel/llnextgen
-.endif
-
-CC= clang
-CXX= clang++
-CONFIGURE_ARGS+= --disable-valgrind --disable-docs \
- --enable-clang --mandir=${MANPREFIX}/man
-MAKE_ARGS+= CC="${CC}" CXX="${CXX}" ARCH=x86_64
-
post-extract:
- ${MKDIR} ${WRKSRC}/${RUST_TARGET} && \
- cd ${WRKSRC}/${RUST_TARGET} && \
- ${TAR} -xf ${DISTDIR}/${RUST_BOOT} && \
- ${MV} rust-stage0 stage0
-
-post-patch:
- ${REINPLACE_CMD} -e '/get-snapshot.py $$(CFG_BUILD)/d' ${WRKSRC}/mk/stage0.mk
+ @${MKDIR} ${WRKSRC}/dl
+ ${LN} -sf ${DISTDIR}/${RUST_BOOT} ${WRKSRC}/dl
post-install:
@${RM} ${STAGEDIR}${PREFIX}/lib/rustlib/manifest
- ${STRIP_CMD} `${GREP} -v -e '^@dirrm' -e '^man' -e 'rlib$$' ${PLIST} | ${SED} 's:^:${STAGEDIR}${PREFIX}/:g'`
+ @${STRIP_CMD} `${GREP} -v -e '^@dirrm' -e '^man' -e 'rlib$$' \
+ ${PLIST} | ${SED} 's:^:${STAGEDIR}${PREFIX}/:'`
.include <bsd.port.post.mk>
diff --git a/lang/rust/files/patch-mk_platform.mk b/lang/rust/files/patch-mk_platform.mk
deleted file mode 100644
index 6687ecb21fb5..000000000000
--- a/lang/rust/files/patch-mk_platform.mk
+++ /dev/null
@@ -1,11 +0,0 @@
---- mk/platform.mk.orig 2014-07-03 11:11:37.699489136 +0200
-+++ mk/platform.mk 2014-07-03 11:13:34.454205727 +0200
-@@ -562,7 +562,7 @@
- CFG_LIB_GLOB_x86_64-unknown-freebsd=lib$(1)-*.so
- CFG_LIB_DSYM_GLOB_x86_64-unknown-freebsd=$(1)-*.dylib.dSYM
- CFG_CFLAGS_x86_64-unknown-freebsd := -I/usr/local/include $(CFLAGS)
--CFG_GCCISH_CFLAGS_x86_64-unknown-freebsd := -Wall -Werror -g -fPIC -I/usr/local/include $(CFLAGS)
-+CFG_GCCISH_CFLAGS_x86_64-unknown-freebsd := -Wall -g -fPIC -I/usr/local/include $(CFLAGS)
- CFG_GCCISH_LINK_FLAGS_x86_64-unknown-freebsd := -shared -fPIC -g -pthread -lrt
- CFG_GCCISH_DEF_FLAG_x86_64-unknown-freebsd := -Wl,--export-dynamic,--dynamic-list=
- CFG_GCCISH_PRE_LIB_FLAGS_x86_64-unknown-freebsd := -Wl,-whole-archive
diff --git a/lang/rust/pkg-descr b/lang/rust/pkg-descr
index 082f40244625..c0852bd5d80b 100644
--- a/lang/rust/pkg-descr
+++ b/lang/rust/pkg-descr
@@ -1,8 +1,16 @@
-Rust is a curly-brace, block-structured expression language.
-It visually resembles the C language family, but differs significantly
-in syntactic and semantic details. Its design is oriented toward
-concerns of "programming in the large", that is,
-of creating and maintaining boundaries - both abstract and operational -
-that preserve large-system integrity, availability and concurrency.
+Rust is a systems programming language that runs blazingly fast, prevents
+almost all crashes, and eliminates data races. Some of its features:
+
+ - Algebraic data types, type inference
+ - Pattern matching and closures
+ - Concurrency without data races
+ - Guaranteed memory safety
+ - Optional garbage collection
+ - Zero-cost abstractions
+ - Minimal runtime
+ - Efficient C bindings
+
+Rust is currently work-in-progress. Its development is driven by Mozilla
+with help of large open source community.
WWW: http://www.rust-lang.org/