The Perl package contains the Practical Extraction and Report Language.
By default, Perl's Compress::Raw::Zlib and Compress::Raw::Bzip2 modules build and link against internal copies of Zlib and Bzip2. The following command will make Perl use the system-installed copies of these libraries:
sed -i -e '/^BUILD_ZLIB/s/True/False/' \ -e '/^INCLUDE/s,\./zlib-src,/usr/include,' \ -e '/^LIB/s,\./zlib-src,/usr/lib64,' \ cpan/Compress-Raw-Zlib/config.in
Perl does not, by default, know about library directories with
names other than lib. The following
patch will allow it to install to other directories:
patch -Np1 -i ../perl-5.26.0-Configure_multilib-1.patch
We still need to tell Perl to actually use lib64:
echo 'installstyle="lib64/perl5"' >> hints/linux.sh
To have full control over the way Perl is set up, you can run the interactive Configure script and hand-pick the way this package is built. If you prefer instead to use the defaults that Perl auto-detects, prepare Perl for compilation with:
./configure.gnu \
--prefix=/usr \
-Dvendorprefix=/usr \
-Dman1dir=/usr/share/man/man1 \
-Dman3dir=/usr/share/man/man3 \
-Dpager="/bin/less -isR" \
-Dlibpth="/usr/local/lib64 /lib64 /usr/lib64" \
-Dcc="gcc ${BUILD64}" \
-Dusethreads \
-Duseshrplib
The meaning of the new configure option:
-Dlibpth="/usr/local/lib64 /lib64
/usr/lib64"
This tells Perl to link against the 64-bit libraries.
-Dman1dir=/usr/share/man/man1
-Dman3dir=/usr/share/man/man3
Since Groff is not installed yet, configure.gnu thinks that we do not want man pages for Perl. Issuing these parameters overrides this decision.
-Dpager="/bin/less -isR"
Less has not yet been installed, so by default perldoc will invoke the more program for viewing documentation. This option ensures that it will use less instead.
-Dusethreads
This tells Perl to use threads.
-Duseshrplib
This tells Perl to build a shared libperl.
Compile the package:
make
To test the results, issue:
make test
Install the package and remove the variables set previously:
make install unset BUILD_ZLIB BUILD_BZIP2
Add a suffix to the perl binary which will be used by the multiarch wrapper:
mv -v /usr/bin/perl{,-64}
mv -v /usr/bin/perl5.26.0{,-64}
Now we need to create a link to the multiarch wrapper that lets us choose which perl installation to use:
ln -sv multiarch_wrapper /usr/bin/perl ln -sv multiarch_wrapper /usr/bin/perl5.26.0
The value of the USE_ARCH environment
variable will decide which perl binary to execute. USE_ARCH=32 perl -V:cc will give
the value of CC used to build the 32bit perl. The multiarch_wrapper
will help later with building perl extensions and bindings. Without
the multiarch_wrapper it is very hard to setup a 32bit extension or
binding.
Builds a Perl extension for the Encode module from either Unicode Character Mappings or Tcl Encoding Files
A shell script for examining installed Perl modules, and can even create a tarball from an installed module
Combines some of the best features of C, sed, awk and sh into a single swiss-army-knife language
Displays a piece of documentation in pod format that is embedded in the Perl installation tree or in a Perl script
The Perl Installation Verification Procedure; it can be used to verify that Perl and its libraries have been installed correctly