# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 name perl5.8 conflicts perl5.10 perl5.12 version 5.8.9 revision 3 categories lang platforms darwin freebsd linux maintainers ricci openmaintainer description Perl 5.8.x - Practical Extraction and Report Language long_description \ 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. distname perl-${version} use_bzip2 yes homepage http://www.perl.org/ master_sites http://www.cpan.org/src/ checksums \ md5 1cb52a76ce77fa300218da96577793ec \ sha1 19843b5a7585cf35d96c07dbcd419bbdd5813617 \ rmd160 680004238d626ec985075e1b4519b7f0b34f57e5 patchfiles patch-perl.c.diff patch-Configure.diff post-patch { reinplace "s|/opt/local|${prefix}|g" ${worksrcpath}/Configure # Ensure that the ld value set in configure.args is used reinplace "s|ld='cc';||" ${worksrcpath}/hints/darwin.sh } configure.ccache no configure.distcc no configure.env LC_ALL=C configure.cmd /bin/sh Configure configure.pre_args configure.universal_args-delete --disable-dependency-tracking configure.args \ -des \ -D prefix='${prefix}' \ -D scriptdir='${prefix}/bin' \ -D cppflags="\${CPPFLAGS}" \ -D ccflags="\${CFLAGS}" \ -D ldflags="\${LDFLAGS}" \ -D vendorprefix='${prefix}' \ -D man1ext='1pm' \ -D man3ext='3pm' \ -D cc=\${CC} \ -D ld=\${CC} \ -D man1dir='${prefix}/share/man/man1p' \ -D man3dir='${prefix}/share/man/man3p' \ -D siteman1dir='${prefix}/share/man/man1' \ -D siteman3dir='${prefix}/share/man/man3' \ -D vendorman1dir='${prefix}/share/man/man1' \ -D vendorman3dir='${prefix}/share/man/man3' # Allow perl to find p5-* port installed by the last version if { [variant_isset threads] } { configure.args-append "-D inc_version_list=\"5.8.8 5.8.8/${os.platform}-thread-multi-2level\"" } else { configure.args-append "-D inc_version_list=\"5.8.8 5.8.8/${os.platform}-2level\"" } set exclude_libs {bind gdbm db} post-patch { foreach lib ${exclude_libs} { configure.args-append -U i_${lib} reinplace "s|\\(libswanted=.*\\)${lib} *\\(.*\\)|\\1\\2|" ${worksrcpath}/Configure } } if {[variant_isset universal]} { post-configure { system "cd ${worksrcpath} && ed - ${worksrcpath}/config.h < ${filespath}/config.h.ed" } } elseif {![info exists configure.ld_archflags]} { eval configure.ldflags-append ${configure.cc_archflags} } test.run yes post-destroot { ln -s perl${version} ${destroot}${prefix}/bin/$name } variant threads description {Build with thread support} { configure.args-append -Dusethreads } variant shared description {Build shared perl library} { configure.args-append -Duseshrplib } variant gdbm description {Build with gdbm support} { depends_lib-append port:gdbm set exclude_libs [ldelete ${exclude_libs} gdbm] } variant db description {Build with Berkeley Data Base support} { depends_lib-append port:db47 set exclude_libs [ldelete ${exclude_libs} db] post-patch { reinplace "s|${prefix}/include|${prefix}/include ${prefix}/include/db47|g" ${worksrcpath}/Configure reinplace "s|${prefix}/lib|${prefix}/lib ${prefix}/lib/db47|g" ${worksrcpath}/Configure } } variant mangle_names description {mangle the installed names by appending -5.8 to avoid conflicting with perl5.10 and perl5.12} { conflicts-delete perl5.10 conflicts-delete perl5.12 post-destroot { file delete ${destroot}${prefix}/bin/perl set branch [join [lrange [split ${version} .] 0 1] .] foreach bin [glob ${destroot}${prefix}/bin/*] { if {$bin != "${destroot}${prefix}/bin/perl${version}"} { move ${bin} ${bin}-${branch} } } ln -s ${prefix}/bin/perl${version} ${destroot}${prefix}/bin/$name foreach man1File [glob ${destroot}${prefix}/share/man/man1p/*] { regexp (.*)(\.1.*) ${man1File} -> program suffix file rename ${man1File} ${program}-${branch}${suffix} } foreach man3File [glob ${destroot}${prefix}/share/man/man3p/*] { regexp (.*)(\.3.*) ${man3File} -> program suffix file rename ${man3File} ${program}-${branch}${suffix} } } } livecheck.type regex livecheck.url http://www.cpan.org/src livecheck.regex {perl-(5\.8\.\d)\.}