Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Nov 2017 21:48:21 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r453382 - head/textproc/ripgrep
Message-ID:  <201711022148.vA2LmLLu071096@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Thu Nov  2 21:48:21 2017
New Revision: 453382
URL: https://svnweb.freebsd.org/changeset/ports/453382

Log:
  textproc/ripgrep: expose SIMD options
  
  PR:		223314
  Approved by:	Petteri Valkonen (maintainer)

Modified:
  head/textproc/ripgrep/Makefile   (contents, props changed)

Modified: head/textproc/ripgrep/Makefile
==============================================================================
--- head/textproc/ripgrep/Makefile	Thu Nov  2 21:41:47 2017	(r453381)
+++ head/textproc/ripgrep/Makefile	Thu Nov  2 21:48:21 2017	(r453382)
@@ -5,6 +5,7 @@
 
 PORTNAME=	ripgrep
 PORTVERSION=	0.7.1
+PORTREVISION=	1
 CATEGORIES=	textproc
 
 MAINTAINER=	petteri.valkonen@iki.fi
@@ -72,6 +73,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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711022148.vA2LmLLu071096>