void-packages/srcpkgs/perl/template

219 lines
6.1 KiB
Plaintext

# Template build file for 'perl'.
pkgname=perl
version=5.16.0
distfiles="http://www.cpan.org/src/5.0/$pkgname-$version.tar.bz2"
makedepends="gdbm-devel db-devel less groff"
short_desc="Practical Extraction and Report Language"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.perl.org"
license="GPL-2"
checksum=8c1d25e92a5760e84f77baa57fde5606fd6e95ec992408d36fa53c47162721d1
long_desc="
Perl is a general-purpose programming language originally developed
for text manipulation and now used for a wide range of tasks including
system administration, web development, network programming, GUI
development, and more. The language is intended to be practical (easy
to use, efficient, complete) rather than beautiful (tiny, elegant,
minimal). Its major features are that it's easy to use, supports both
procedural and object-oriented (OO) programming, has powerful built-in
support for text processing, and has one of the world's most impressive
collections of third-party modules."
# Before updating this package to a new major version, run ${FILESDIR}/provides.pl
# against ${wrksrc} to find the list of built in packages.
provides="
perl-Archive-Extract-0.58
perl-Archive-Tar-1.82
perl-Attribute-Handlers-0.93
perl-AutoLoader-5.72
perl-B-Debug-1.17
perl-B-Deparse-1.14
perl-B-Lint-1.14
perl-CGI-3.59
perl-CPAN-1.9800
perl-CPAN-Meta-2.120630
perl-CPAN-Meta-YAML-0.007
perl-CPANPLUS-0.9121
perl-CPANPLUS-Dist-Build-0.62
perl-Carp-1.26
perl-Compress-Raw-Bzip2-2.048
perl-Compress-Raw-Zlib-2.048
perl-DB_File-1.826
perl-Data-Dumper-2.135_06
perl-Devel-PPPort-3.20
perl-Devel-SelfStubber-1.05
perl-Digest-1.17
perl-Digest-MD5-2.51
perl-Digest-SHA-5.71
perl-Dumpvalue-1.17
perl-Encode-2.44
perl-Env-1.03
perl-Exporter-5.66
perl-ExtUtils-CBuilder-0.280206
perl-ExtUtils-Command-1.17
perl-ExtUtils-Constant-0.23
perl-ExtUtils-Install-1.58
perl-ExtUtils-MakeMaker-6.63_02
perl-ExtUtils-Manifest-1.61
perl-ExtUtils-ParseXS-3.16
perl-File-CheckTree-4.41
perl-File-Fetch-0.32
perl-File-Path-2.08_01
perl-File-Temp-0.22
perl-Filter-Simple-0.88
perl-Filter-Util-Call-1.40
perl-Getopt-Long-2.38
perl-HTTP-Tiny-0.017
perl-I18N-Collate-1.02
perl-I18N-LangTags-0.38
perl-IO-1.25_06
perl-IO-Compress-2.048
perl-IO-Zlib-1.10
perl-IPC-Cmd-0.76
perl-IPC-SysV-2.03
perl-JSON-PP-2.27200
perl-Locale-Codes-3.21
perl-Locale-Maketext-1.22
perl-Locale-Maketext-Simple-0.21
perl-Log-Message-0.04
perl-Log-Message-Simple-0.08
perl-MIME-Base64-3.13
perl-Math-BigInt-1.998
perl-Math-BigInt-FastCalc-0.30
perl-Math-BigRat-0.2603
perl-Math-Complex-1.59
perl-Memoize-1.02
perl-Module-Build-0.39_01
perl-Module-CoreList-2.66
perl-Module-Load-0.22
perl-Module-Load-Conditional-0.46
perl-Module-Loaded-0.08
perl-Module-Metadata-1.000009
perl-Module-Pluggable-4.0
perl-NEXT-0.65
perl-Net-Ping-2.38
perl-Object-Accessor-0.42
perl-Package-Constants-0.02
perl-Params-Check-0.32
perl-Parse-CPAN-Meta-1.4402
perl-PathTools-3.39_02
perl-Perl-OSType-1.002
perl-PerlIO-via-QuotedPrint-0.06
perl-Pod-Escapes-1.04
perl-Pod-LaTeX-0.60
perl-Pod-Parser-1.51
perl-Pod-Perldoc-3.17
perl-Pod-Simple-3.20
perl-Safe-2.31_01
perl-Scalar-List-Utils-1.23
perl-Search-Dict-1.04
perl-SelfLoader-1.20
perl-Socket-2.001
perl-Storable-2.34
perl-Sys-Syslog-0.29
perl-Term-ANSIColor-3.01
perl-Term-Cap-1.13
perl-Term-Complete-1.402
perl-Term-ReadLine-1.09
perl-Term-UI-0.30
perl-Test-1.25_02
perl-Test-Harness-3.23
perl-Test-Simple-0.98
perl-Text-Abbrev-1.02
perl-Text-Balanced-2.02
perl-Text-ParseWords-3.27
perl-Text-Soundex-3.03_01
perl-Text-Tabs+Wrap-2009.0305
perl-Thread-Queue-2.12
perl-Thread-Semaphore-2.12
perl-Tie-File-0.98
perl-Tie-RefHash-1.39
perl-Time-HiRes-1.9725
perl-Time-Local-1.2000
perl-Time-Piece-1.20_01
perl-Unicode-Collate-0.89
perl-Unicode-Normalize-1.14
perl-Version-Requirements-0.101022
perl-Win32-0.44
perl-Win32API-File-0.1200
perl-XSLoader-0.16
perl-autodie-2.10
perl-autouse-1.07
perl-base-2.18
perl-bignum-0.29
perl-constant-1.23
perl-encoding-warnings-0.11
perl-if-0.0602
perl-lib-0.63
perl-libnet-1.22
perl-parent-0.225
perl-perlfaq-5.0150039
perl-podlators-2.4.0
perl-threads-1.86
perl-threads-shared-1.40
perl-version-0.99
"
for _f in ${provides}; do
_p=$($XBPS_PKGDB_CMD getpkgname ${_f})
replaces="${replaces} ${_p}>=0"
done
do_build() {
./Configure \
-des -Dusethreads -Duseshrplib \
-Dinstallprefix=/usr \
-Dprefix=/usr -Dvendorprefix=/usr \
-Dprivlib=/usr/share/perl5/core_perl \
-Darchlib=/usr/lib/perl5/core_perl \
-Dsitelib=/usr/share/perl5/site_perl \
-Dsitearch=/usr/lib/perl5/site_perl \
-Dvendorlib=/usr/share/perl5/vendor_perl \
-Dvendorarch=/usr/lib/perl5/vendor_perl \
-Dscriptdir=/usr/lib/perl5/core_perl/bin \
-Dsitescript=/usr/lib/perl5/site_perl/bin \
-Dvendorscript=/usr/lib/perl5/vendor_perl/bin \
-Dinc_version_list=none -Dman1ext=1p -Dman3ext=3p \
-Dcccdlflags="-fPIC" -Doptimize="${XBPS_CFLAGS}"
make ${makejobs}
}
do_install() {
# We use the same defaults than Arch Linux.
make DESTDIR=${DESTDIR} install
# Make a link from perl${version} to perl.
cd ${DESTDIR}/usr/bin && ln -sf perl${version} perl
### CPAN Settings ###
# Set CPAN default config to use the site directories.
sed -e '/(makepl_arg =>/ s/""/"INSTALLDIRS=site"/' \
-e '/(mbuildpl_arg =>/ s/""/"installdirs=site"/' \
-i ${DESTDIR}/usr/share/perl5/core_perl/CPAN/FirstTime.pm
### CPANPLUS Settings ###
# Set CPANPLUS default config to use the site directories.
sed -e "/{'makemakerflags'}/ s/'';/'INSTALLDIRS=site';/" \
-e "/{'buildflags'}/ s/'';/'installdirs=site';/" \
-i ${DESTDIR}/usr/share/perl5/core_perl/CPANPLUS/Config.pm
# Profile script so set paths to perl scripts.
vinstall ${FILESDIR}/perlbin.sh 644 etc/profile.d
# Remove all pod files *except* those under
# /usr/share/perl5/core_perl/pod/ (FS#16488)
rm -f ${DESTDIR}/usr/share/perl5/core_perl/*.pod
for d in ${DESTDIR}/usr/share/perl5/core_perl/*; do
if [ -d $d -a $(basename $d) != "pod" ]; then
find $d -name *.pod -delete
fi
done
find ${DESTDIR}/usr/lib -name *.pod -delete
find ${DESTDIR} -name .packlist -delete
# Make a symlink so that libperl.so is accesible.
cd ${DESTDIR}/usr/lib && \
ln -sf ./perl5/core_perl/CORE/libperl.so libperl.so
}