Re: git: 8177b0385384 - main - devel/pcre: Adding option to disable jit support

From: Piotr Kubaj <pkubaj_at_anongoth.pl>
Date: Wed, 19 Oct 2022 13:04:35 UTC
Why enable JIT by default only on some architectures that work with it?
It should either be disabled on all by default, or enabled on all that
support it.

On 22-10-19 09:29:36, Kirill Ponomarev wrote:
> The branch main has been updated by krion:
> 
> URL: https://cgit.FreeBSD.org/ports/commit/?id=8177b0385384c4561e31c9698a1eb25ffdf720eb
> 
> commit 8177b0385384c4561e31c9698a1eb25ffdf720eb
> Author:     Kirill Ponomarev <krion@FreeBSD.org>
> AuthorDate: 2022-10-19 09:28:44 +0000
> Commit:     Kirill Ponomarev <krion@FreeBSD.org>
> CommitDate: 2022-10-19 09:28:44 +0000
> 
>     devel/pcre: Adding option to disable jit support
>     
>     PR:             267174
>     Reported by:    olivier
> ---
>  devel/pcre/Makefile | 19 ++++++++++---------
>  1 file changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git a/devel/pcre/Makefile b/devel/pcre/Makefile
> index fb9a2b63b98b..1bda6e50aef1 100644
> --- a/devel/pcre/Makefile
> +++ b/devel/pcre/Makefile
> @@ -1,6 +1,6 @@
>  PORTNAME=	pcre
>  PORTVERSION=	8.45
> -PORTREVISION=	1
> +PORTREVISION=	2
>  CATEGORIES=	devel
>  MASTER_SITES=	https://ftp.pcre.org/pub/pcre/ \
>  		SF
> @@ -31,16 +31,23 @@ TEST_TARGET=	check
>  
>  PORTDOCS=	*
>  
> -OPTIONS_DEFINE=		DOCS MAN3 STACK_RECURSION
> +OPTIONS_DEFINE=		DOCS JIT MAN3 STACK_RECURSION
>  OPTIONS_DEFAULT=	MAN3 STACK_RECURSION
> -OPTIONS_SUB=		yes
> +OPTIONS_DEFAULT_aarch64+=	JIT
> +OPTIONS_DEFAULT_amd64+=	JIT
> +OPTIONS_DEFAULT_i386+=	JIT
> +OPTIONS_DEFAULT_mips+=	JIT
>  
>  OPTIONS_RADIO=		CLI
>  OPTIONS_RADIO_CLI=	LIBEDIT READLINE
> +OPTIONS_SUB=		yes
>  
> +JIT_DESC=		Use the JIT compiler (not available on all platforms)
>  MAN3_DESC=		Install API manpages (section 3)
>  STACK_RECURSION_DESC=	Use the stack for recursion during matching
>  
> +JIT_CONFIGURE_ENABLE=	jit
> +
>  LIBEDIT_USES=			libedit
>  LIBEDIT_CONFIGURE_ENABLE=	pcretest-libedit
>  
> @@ -84,12 +91,6 @@ CONFIGURE_ARGS+=	--with-parens-nest-limit=${WITH_PARENS_NEST_LIMIT}
>  CONFIGURE_ARGS+=	--with-posix-malloc-threshold=${WITH_POSIX_MALLOC_THRESHOLD}
>  .endif
>  
> -.if ${ARCH} != "sparc64" && empty(ARCH:Mmips64*) && empty(ARCH:Mriscv64*)
> -CONFIGURE_ARGS+=	--enable-jit
> -.else
> -CONFIGURE_ARGS+=	--disable-jit
> -.endif
> -
>  post-patch:
>  	@${REINPLACE_CMD} -e "/^\.rs/d" ${WRKSRC}/doc/*.3 ${WRKSRC}/doc/*.1
>  	@${REINPLACE_CMD} -e "s/£//g" ${WRKSRC}/doc/pcre_compile2.3