aboutsummaryrefslogtreecommitdiff
path: root/textproc/ripgrep
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2017-11-02 21:48:21 +0000
committerJan Beich <jbeich@FreeBSD.org>2017-11-02 21:48:21 +0000
commita8ed4a92246e61e0246730da13916f492c59f145 (patch)
tree3e9902add85f502c6ceb1c8274f9945088814afe /textproc/ripgrep
parente929aea23c678404413a50eb73c457b8960438e1 (diff)
downloadports-a8ed4a92246e61e0246730da13916f492c59f145.tar.gz
ports-a8ed4a92246e61e0246730da13916f492c59f145.zip
textproc/ripgrep: expose SIMD options
PR: 223314 Approved by: Petteri Valkonen (maintainer)
Notes
Notes: svn path=/head/; revision=453382
Diffstat (limited to 'textproc/ripgrep')
-rw-r--r--textproc/ripgrep/Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/textproc/ripgrep/Makefile b/textproc/ripgrep/Makefile
index 842fd3d0bf1c..19dc86a90a29 100644
--- a/textproc/ripgrep/Makefile
+++ b/textproc/ripgrep/Makefile
@@ -5,6 +5,7 @@
PORTNAME= ripgrep
PORTVERSION= 0.7.1
+PORTREVISION= 1
CATEGORIES= textproc
MAINTAINER= petteri.valkonen@iki.fi
@@ -73,6 +74,22 @@ CARGO_CRATES= aho-corasick-0.6.3 \
RIPGREP_OUTDIR= ${WRKDIR}/cargo-out
CARGO_ENV= RIPGREP_OUTDIR=${RIPGREP_OUTDIR}
+OPTIONS_DEFINE= SIMD
+OPTIONS_DEFAULT=SIMD
+
+OPTIONS_DEFINE_amd64= AVX
+OPTIONS_DEFINE_i386= AVX
+
+AVX_DESC= ${SSE_DESC:S/SSE/AVX/}
+AVX_VARS= CARGO_FEATURES+=avx-accel RUSTFLAGS+="-C target-feature=+avx"
+AVX_IMPLIES= SIMD
+
+# simd crate uses cfg_target_feature which isn't stable yet, so unlock
+# unstable features similar to how lang/rust bootstraps. www/firefox
+# uses the same hack when building with --enable-rust-simd.
+SIMD_MAKE_ENV= RUSTC_BOOTSTRAP=1
+SIMD_VARS= CARGO_FEATURES+=simd-accel
+
post-patch:
@${REINPLACE_CMD} -e 's|OUT_DIR|RIPGREP_OUTDIR|' ${WRKSRC}/build.rs