pkgsrc/lang/perl5/options.mk
wiz 83f7126a09 perl: update to 5.34.0.
= Core Enhancements

= Experimental Try/Catch Syntax

An initial experimental attempt at providing C<try>/C<catch> notation has
been added.

    use feature 'try';

    try {
        a_function();
    }
    catch ($e) {
        warn "An error occurred: $e";
    }

For more information, see L<perlsyn/"Try Catch Exception Handling">.

= C<qr/{,n}/> is now accepted

An empty lower bound is now accepted for regular expression quantifiers,
like C<{,3}>.

= Blanks freely allowed within but adjacent to curly braces

(in double-quotish contexts and regular expression patterns)

This means you can write things like S<C<\x{ FFFC }>> if you like.  This
applies to all such constructs, namely C<\b{}>, C<\g{}>, C<\k{}>,
C<\N{}>, C<\o{}>, and C<\x{}>; as well as the regular expression
quantifier C<{I<m>,I<n>}>.  C<\p{}> and C<\P{}> retain their
already-existing, even looser, rules mandated by the Unicode standard
(see L<perluniprops/Properties accessible through \p{} and \P{}>).

This ability is in effect regardless of the presence of the C</x>
regular expression pattern modifier.

Additionally, the comma in a regular expression braced quantifier may
have blanks (tabs or spaces) before and/or after the comma, like
S<C<qr/a{ 5, 7 }/>>.

= New octal syntax C<0oI<ddddd>>

It is now possible to specify octal literals with C<0o> prefixes,
as in C<0o123_456>, parallel to the existing construct to specify
hexadecimal literal C<0xI<ddddd>> and binary literal C<0bI<ddddd>>.
Also, the builtin C<oct()> function now accepts this new syntax.

See L<perldata/Scalar value constructors> and L<perlfunc/oct EXPR>.

= Performance Enhancements

=item *

Fix a memory leak in RegEx
[L<GH #18604|https://github.com/Perl/perl5/issues/18604>]

= Modules and Pragmata

= New Modules and Pragmata

=item *

L<ExtUtils::PL2Bat> 0.004 has been added to the Perl core.

This module is a generalization of the C<pl2bat> script. It being a script has
led to at least two forks of this code; this module will unify them under one
implementation with tests.

(and lots more changes)
2021-05-24 17:46:25 +00:00

100 lines
2.6 KiB
Makefile

# $NetBSD: options.mk,v 1.16 2021/05/24 17:46:25 wiz Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.perl
PKG_OPTIONS_REQUIRED_GROUPS= perlbits
PKG_OPTIONS_GROUP.perlbits= perl-64bitauto perl-64bitint perl-64bitmore perl-64bitall perl-64bitnone
PKG_SUPPORTED_OPTIONS= debug dtrace threads mstats
CHECK_BUILTIN.pthread:= yes
.include "../../mk/pthread.builtin.mk"
CHECK_BUILTIN.pthread:= no
# By default, build with threads only if the threads are native.
.if !empty(USE_BUILTIN.pthread:M[yY][eE][sS])
PERL5_BUILD_THREADS_SUPPORT= yes
.else
PERL5_BUILD_THREADS_SUPPORT= ${DLOPEN_REQUIRE_PTHREADS}
.endif
### from KNOWN PROBLEMS in README.haiku
### Perl cannot be compiled with threading support ATM.
###
.if !empty(MACHINE_PLATFORM:MHaiku-*-*)
PERL5_BUILD_THREADS_SUPPORT= no
.endif
# miniperl fails with locking errors during build on QNX.
.if ${OPSYS} == "QNX"
PERL5_BUILD_THREADS_SUPPORT= no
.endif
.if !empty(PERL5_BUILD_THREADS_SUPPORT:M[yY][eE][sS])
PKG_SUGGESTED_OPTIONS= threads
.endif
.if ${OPSYS} == "IRIX"
. if defined(ABI) && ${ABI} == "64"
PKG_SUGGESTED_OPTIONS+= perl-64bitint
. endif
.elif ${OPSYS} == "AIX"
. if defined(ABI) && ${ABI} == "64"
PKG_SUGGESTED_OPTIONS+= perl-64bitall
. else
PKG_SUGGESTED_OPTIONS+= perl-64bitnone
. endif
.else
PKG_SUGGESTED_OPTIONS+= perl-64bitauto
.endif
.if !empty(MACHINE_PLATFORM:MSunOS-5.1[1-9]-*) || \
(${OPSYS} == "Darwin" && ${OS_VERSION:R} >= 9)
PKG_SUGGESTED_OPTIONS+= dtrace
.endif
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mthreads)
. include "../../mk/pthread.buildlink3.mk"
CONFIGURE_ARGS+= -Duseithreads
CFLAGS+= ${PTHREAD_CFLAGS}
LDFLAGS+= ${PTHREAD_LDFLAGS}
LIBSWANTED+= ${PTHREAD_LIBS:M-l*:S/^-l//}
. if ${OBJECT_FMT} == "XCOFF"
PERL5_RPATH_THREAD=-thread
. endif
.else
CONFIGURE_ARGS+= -Uuseithreads
. if ${OBJECT_FMT} == "XCOFF"
PERL5_RPATH_THREAD=
. endif
.endif
.if !empty(PKG_OPTIONS:Mdebug)
CFLAGS+= -DDEBUGGING
.endif
.if !empty(PKG_OPTIONS:Mdtrace)
CONFIGURE_ARGS+= -Dusedtrace
.endif
.if !empty(PKG_OPTIONS:Mmstats)
CFLAGS+= -DPERL_DEBUGGING_MSTATS
CONFIGURE_ARGS+= -Dusemymalloc
.else
CONFIGURE_ARGS+= -Uusemymalloc
.endif
.if !empty(PKG_OPTIONS:Mperl-64bitint)
CONFIGURE_ARGS+= -Duse64bitint
.elif !empty(PKG_OPTIONS:Mperl-64bitmore)
CONFIGURE_ARGS+= -Dusemorebits
.elif !empty(PKG_OPTIONS:Mperl-64bitall)
CONFIGURE_ARGS+= -Duse64bitall
.elif !empty(PKG_OPTIONS:Mperl-64bitnone)
CONFIGURE_ARGS+= -Uuse64bitall -Uusemorebits -Uuse64bitint
.else
. if ${OBJECT_FMT} == "XCOFF"
BROKEN= "XCOFF targets need the path specified where libperl.a resides."
BROKEN+= "Please choose on of perl-64bitint perl-64bitmore perl-64bitall or perl-64bitnone to allow this."
. endif
.endif