Package: perl5341
Version: 5.34.1
Revision: 2
# To match /usr/bin/perl5.34 on 15.0-15.x
Distribution: 10.9, 10.10, 10.11, 10.12, 10.13, 10.14, 10.14.5, 10.15, 11.0, 11.3, 12.0, 13.0, 14.0
BuildDepends: <<
 db60-aes,
 fink (>= 0.32.0),
 gdbm6
<<
Depends: %n-core (>= %v-%r)
Conflicts: perl5162, perl5182, perl5184, perl5282, perl5302, perl5303, perl5341
Replaces: perl5162, perl5182, perl5184, perl5282, perl5302, perl5303, perl5341
License: Artistic
Description: The Perl programming language, v. 5.34.1
DescDetail: <<
Perl is a high-level programming language with roots in C, sed, awk
and shell scripting.  Perl is good at handling processes and files,
and is especially good at handling text.  Perl's hallmarks are
practicality and efficiency.  While it is used to do a lot of
different things, Perl's most common applications are system
administration utilities and web programming.  A large proportion of
the CGI scripts on the web are written in Perl.

Fink's perl packages retain the perl version subdirectories in the
lib tree.  Without these, upgrading or downgrading Perl breaks all of
the binary modules.
<<
DescPort: <<
Because the perl build system is designed to download source files for
"extra" perlmodules directly from CPAN, we do not include those "extra" 
perlmodules in this package.  For that reason, the following packages
which are Provided by Apple's build of perl5.34.1 on 15.0 are not provided
here:
  convert-tnef-pm5341, html-parser-pm5341, 
  perl-objcbridge-pm5341, scalar-list-utils-pm5341, uri-pm5341, 
  algorithm-diff-pm5341, class-autouse-pm5341, corefoundation-pm5341, 
  data-hierarcy-pm5341, freezethaw-pm5341, io-pager-pm5341, 
  locale-maketext-lexicon-pm5341, perlio-eol-pm5341

On macOS11.0, buildtime miniperl is not properly referenced in some Makefiles.
So we hardcode the relative position for building.

Time::HiRes misidentifies macOS having clock_nanosleep.

Internal EU::MM turned off errors for implicit function declarations in v7.56.
We don't want to hide those errors.

Don't get tangled up by fink's netdb.h or assume we need -lbind

libperl.t: handle nm output on Mac OS Ventura 13.4 (fixed in 5.39.1).

Use upstream patch to silence warnings with clang-12+ about
compound-token-split-by-macro.
<<
DescUsage: <<
Most perl scripts start with #!/usr/bin/perl which will invoke Apple's
/usr/bin/perl. This package does not alter /usr/bin/perl. If you wish
to use this version of perl in scripts, the script should begin with
#!%p/bin/perl5.34.1 instead of #!/usr/bin/perl
<<
Source: mirror:cpan:src/5.0/perl-%v.tar.xz
Source-Checksum: SHA256(6d52cf833ff1af27bb5e986870a2c30cec73c044b41e3458cd991f94374039f7)
PatchFile: %n.patch
PatchFile-MD5: 8ffedb0d3b849765ab1e6dcebc3f4d12
Patchfile2: %n-implicit-function-errors.patch
PatchFile2-MD5: c8834d9af621b177fca16a65b7f23e7f
#PatchFile4: %n-macos11.patch
#PatchFile4-MD5: 621344203183d47554d394ea539a5adf
PatchFile5: %n-timehires.patch
PatchFile5-MD5: 4a45e34b5df46f8272f102dfb202ead8
PatchFile6: %n-libperl-t.patch
PatchFile6-MD5: 87a9266867d153f155a9b69d3244a565
PatchFile7: %n-clang_braces.patch
PatchFile7-MD5: 85721b026d1f5c1130091f57507974f4
PatchFile8: %n-avoid-fink-deps.patch
PatchFile8-MD5: 6f76f43385c317ddfe629842936a8e0d
#PatchFile9: %n-locale.patch
#PatchFile9-MD5: cdf1e773b4959fca5fe409244e528026
PatchScript: <<
    sed -e 's|@FINK_PREFIX@|%p|g' <  %{PatchFile} | patch -p1
    patch -p1 < %{PatchFile2}
    patch -p1 < %{PatchFile5}
    patch -p1 < %{PatchFile6}
    patch -p1 < %{PatchFile7}
    patch -p1 < %{PatchFile8}
#    patch -p1 < %{PatchFile9}
<<
CompileScript: <<
#!/bin/sh -ev
	if [[ `sw_vers -productVersion | cut -f 1 -d.` -ge 11 ]]; then
		# race condition on macOS11 causes miniperl to not propagate sometimes
		ABSPERL=../../miniperl
		# /usr/lib/libc* no longer exists
		perl -pi -e 's,win32|vms|openbsd|bitrig|cygwin,$&|darwin,g' ext/DynaLoader/t/DynaLoader.t
	fi
	sh Configure \
	-desr \
	-Dcc="gcc" \
	-Dcpp="-gcc -E" \
	-Dprefix=%p \
	-Dccflags=-I%p/include \
	-Dldflags=-L%p/lib \
	-Dperladmin=none \
	-Uinstallusrbinperl \
	-Dprivlib="%p/lib/perl5-core/5.34.1" \
	-Darchlib="%p/lib/perl5-core/5.34.1/darwin-thread-multi-2level" \
	-Dman3dir="%p/lib/perl5-core/5.34.1/man/man3" \
	-Dman3ext=3pm \
	-Dscriptdir="%p/bin" \
	-Duseithreads \
	-Dinc_version_list=none \
	-Dcf_by="Fink Project" \
	-Dcf_email="fink-core@lists.sourceforge.net" \
	-Umydomain \
	-Dmyhostname="localhost" \
	-Adefine:startperl="#!%p/bin/perl5.34.1" \
	-Adefine:perlpath="%p/bin/perl5.34.1"
	make
<<
DocFiles: README Copying
InfoTest: <<
	TestScript: <<
	#!/bin/sh -ev
		# Occasional reported Time-HiRes test-failures
		#	https://pastebin.com/JK68gr5p
		# likely due to other system processes. See:
		#	https://github.com/Perl/perl5/pull/20908
		export PERL_FILE_ATIME_CHANGES=1

		make test || exit 2
	<<
<<

InstallScript: <<
 make install DESTDIR=%d

 mkdir -p %i/etc/profile.d
 echo "append_path MANPATH %p/lib/perl5-core/5.34.1/man" >> %i/etc/profile.d/%N-core.csh
 echo "append_path MANPATH %p/lib/perl5/5.34.1/man" >> %i/etc/profile.d/%N-core.csh
 echo "append_path MANPATH %p/lib/perl5-core/5.34.1/man" >> %i/etc/profile.d/%N-core.sh
 echo "append_path MANPATH %p/lib/perl5/5.34.1/man" >> %i/etc/profile.d/%N-core.sh
 echo "export MANPATH" >> %i/etc/profile.d/%N-core.sh
 chmod 755 %i/etc/profile.d/%N-core.*

<<
SplitOff: <<
 Package: %N-core
 Conflicts: compress-zlib-pm (<= 1.19-2), crypt-ssleay-pm (<= 0.45-2), dbd-mysql-pm (<= 2.1026-1), dbd-pg-pm (<= 1.21-4), dbd-pg-pm-ssl (<= 1.21-4), dbi-pm (<= 1:1.35-1), digest-md5-pm (<= 2.24-1), digest-sha1-pm (<= 2.02-1), egd (<= 0.8-3), eperl-pm (<= 2.2.14-2), filter-util-pm (<= 1.26-1), fribidi-pm (<= 0.05-2), ftlib-pm (<= 1.2-1), gd-pm (<= 2.06-5), gimp-perl (<= 1.211-4), gtk-perl-pm (<= 0.7008-7), html-parser-pm (<= 3.27-1), http-ghttp-pm (<= 1.07-1), irssi-ssl (<= 0.8.6-3), irssi (<= 0.8.6-2), jcode-pm (<= 0.82-1), libapreq-pm (<= 1.0-1), mac-carbon-pm (<= 0.05-1), macosx-file-pm (<= 0.64-1), mime-base64-pm (<= 2.18-1), net-ssleay-pm (<= 1.22-2), nkf (<= 1.92-1), params-validate-pm (<= 0.57-1), pdl (<= 2.3.2-1), perlmagick-pm (<= 5.5.4-1), pgplot-perl (<= 2.18-4), postgresql-perl (<= 7.3.2-7), postgresql-ssl-perl (<= 7.3.2-7), rrdtool-perl (<= 1.0.41-1), scalar-list-utils-pm (<= 1.11-1), sha-pm (<= 1.2-2), shout-pm (<= 1.0-1), storable-pm (<= 1.0.14-1), string-approx-pm (<= 3.19-1), template-notex-pm (<= 2.08-13), template-pm (<= 2.08-13), term-readkey-pm (<= 2.21-1), term-readline-gnu-pm (<= 1.13-1), text-iconv-pm (<= 1.2-1), time-hires-pm (<= 1.46-1), time-piece-pm (<= 1.08-1), tk-pm (<= 800.024-2), tk-tablematrix-pm (<= 1.01-1), unicode-string-pm (<= 2.07-1), xml-parser-pm (<= 2.31-4), xmms-pm (<= 0.12-2)
 # use `corelist -a Foo::Bar` to see if these are still included
 Provides: <<
  archive-tar-pm5341,
  attribute-handlers-pm5341,
  carp-pm5341,
  compress-raw-bzip2-pm5341,
  compress-raw-zlib-pm5341,
  compress-zlib-pm5341,
  cpan-meta-requirements-pm5341,
  data-dumper-pm5341,
  db-pm5341,
  devel-peek-pm5341,
  digest-md5-pm5341,
  digest-pm5341,
  digest-sha-pm5341,
  extutils-cbuilder-pm5341,
  extutils-makemaker-pm5341,
  extutils-parsexs-pm5341,
  file-find-pm5341,
  file-path-pm5341,
  file-spec-pm5341,
  file-temp-pm5341,
  filter-simple-pm5341,
  getopt-long-pm5341,
  http-tiny-pm5341,
  i18n-langtags-pm5341,
  io-zlib-pm5341,
  libnet-pm5341,
  list-util-pm5341,
  locale-maketext-pm5341,
  locale-maketext-simple-pm5341,
  math-bigint-pm5341,
  memoize-pm5341,
  mime-base64-pm5341,
  module-corelist-pm5341,
  module-load-conditional-pm5341,
  module-load-pm5341,
  params-check-pm5341,
  perl-ostype-pm5341,
  pod-escapes-pm5341,
  pod-simple-pm5341,
  sys-syslog-pm5341,
  term-readline-pm5341,
  test-harness-pm5341,
  test-simple-pm5341,
  text-tabs-pm5341,
  text-wrap-pm5341,
  time-hires-pm5341,
  unicode-normalize-pm5341
 <<
 Depends: <<
  db60-aes-shlibs,
  gdbm6-shlibs
 <<
 Files: bin/perl5.34.1 etc lib/perl5 lib/perl5-core
 Description: Core files for perl, v. 5.34.1
 DocFiles: README Copying
<<
DescPackaging: <<
 We split the perl5.34.1 binary and the files in lib/perl5* off as a separate
 "core" package which does not conflict with other versions of perl.
 %p/bin/perl and other binaries remain in the perl5341 package, and
 different versions of perl can be selected by installing a different
 package instead.

 We now use lib/perl5-core as the main installation directory to avoid
 conflicts with fink-installed perl modules.
<<
Homepage: https://www.cpan.org/
Maintainer: Fink Core Group <fink-core@lists.sourceforge.net>