# -*- 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 PortGroup perl5 1.0 name perl5 version 5.24.0 categories lang platforms darwin freebsd linux license {Artistic-1 GPL} maintainers mojca openmaintainer homepage http://www.perl.org/ master_sites http://www.cpan.org/src/5.0/ # obsolete Perl versions; remove after 2016-12-09 foreach perl5.major {5.8 5.10 5.12 5.14} { subport perl${perl5.major} { version 5.22.0 replaced_by perl5.22 PortGroup obsolete 1.0 } } # current Perl versions # # meaning of the fields: # - version # - subversion # - revision # - rmd160 sha256 set perl5.versions_info { 5.16 3 3 f25fdd72449156a7cbe989e8bd339fdba1afabc0 bb7bc735e6813b177dcfccd480defcde7eddefa173b5967eac11babd1bfa98e8 5.18 4 2 d97181a98f7acc80125b0d2a182a6a2cd7542ceb 1fb4d27b75cd244e849f253320260efe1750641aaff4a18ce0d67556ff1b96a5 5.20 3 1 499846a1c92e00dd357cb782bc14787b8cd47051 1b40068166c242e34a536836286e70b78410602a80615143301e52aa2901493b 5.22 2 1 203afca8995ca426db0af48b78eb606b5d24011a f2322b9b04fe0cdbca9fe755360da04892cb6483d44959457cfebc0bcddc8058 5.24 0 0 756bf07069e91eabe3dac3a47aec5097d48f8963 62328a53d157e8153b33e137594155f6f8b64418f7f9238210feb809585290e0 } # 5.22 3-RC3 0 24f508e342cb824d96254e91ffd35b09ed740382 9074ac008f11aa5ea3df91a646fa8c23fec37923c729e06a8bc54be4fa710d07 # 5.24 1-RC3 0 9d055aa3bc92b8cae2a1dd14fd29b7dde1345218 9be39db0b008d2c2d14ae4f6b92418260ce5eb7809a79d729686a0d461b96404 # 5.25 3 0 268c9c45e4b4f296981be238c11332094fe559b9 0d406dc08717822cfc67937414cf38801ca7101b5a971465b88c0aee005fe823 # NOTE: if you need to revbump perl, please consult with maintainer first # to change the configure flags at the same time foreach {perl5.v perl5.subversion perl5.revision perl5.rmd160 perl5.sha256} ${perl5.versions_info} { subport perl${perl5.v} { set perl5.major ${perl5.v} version ${perl5.major}.[string range ${perl5.subversion} 0 0] set minor [lrange [split ${version} .] 1 1] revision ${perl5.revision} checksums rmd160 ${perl5.rmd160} sha256 ${perl5.sha256} description Perl ${version} - 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. depends_lib-append port:gdbm distname perl-${perl5.major}.${perl5.subversion} dist_subdir perl${perl5.major} use_bzip2 yes # TODO: revise patch naming scheme patchfiles ${perl5.major}/clean-up-paths.patch \ ${perl5.major}/avoid-no-cpp-precomp-PR38913.patch # Prevent build from picking up the bind9 port's static libbind, which # duplicates symbols from /usr/lib/libdl (r10638). patchfiles-append ${perl5.major}/avoid-bind9-linking.patch # Prevent miniperl linking from accidentally finding our libstdc++ # https://trac.macports.org/ticket/36438 patchfiles-append ${perl5.major}/fix-miniperl-linking-PR36438.patch # Install files under 5.xx rather than 5.xx.yy # https://trac.macports.org/ticket/43480 patchfiles-append ${perl5.major}/install-under-short-version-PR43480.patch if {${perl5.major} == 5.16} { patchfiles-append \ ${perl5.major}/use-stdbool.patch # Avoid a C++ linkage trick that recent Clang doesn't like. See #43150 # and https://rt.perl.org/Public/Bug/Display.html?id=121714. patchfiles-append \ ${perl5.major}/fix-cxx-dNOOP-PR43150.patch } if {${perl5.major} >= 5.22} { # failed test # https://trac.macports.org/ticket/51327 patchfiles-append \ ${perl5.major}/patch-dist-IO-t-cachepropagate-unix.t.diff } if {${perl5.major} == 5.24} { # Prevent build error on Sierra # https://trac.macports.org/ticket/52012 patchfiles-append \ ${perl5.major}/patch-dist-Time-HiRes-HiRes.xs.diff patchfiles-append \ ${perl5.major}/fix-ld-modification.patch } else { # Do not compile for 10.3/10.4 # https://trac.macports.org/ticket/51980 patchfiles-append \ ${perl5.major}/remove-10.3-target-PR126360.patch } post-patch { reinplace -W ${worksrcpath} "s|__PREFIX__|${prefix}|g" \ Configure Makefile.SH } configure.ccache no configure.distcc no configure.env LC_ALL=C configure.cmd sh Configure configure.pre_args configure.universal_args-delete \ --disable-dependency-tracking configure.post_args -des \ -Dprefix='${prefix}' \ -Dscriptdir='${prefix}/bin' \ -Dvendorprefix='${prefix}' \ -Dusemultiplicity=y \ -Dusethreads \ -Duseshrplib \ {-Dcc="$CC"} \ -Dman1ext=1pm \ -Dman3ext=3pm \ -Dinstallstyle='lib/perl5' \ -Dman1dir='${prefix}/share/man/man1p' \ -Dman3dir='${prefix}/share/man/man3p' \ -Dsitebin='${prefix}/libexec/perl${perl5.major}/sitebin' \ -Dsiteman1dir='${prefix}/share/perl${perl5.major}/siteman/man1' \ -Dsiteman3dir='${prefix}/share/perl${perl5.major}/siteman/man3' \ -Dvendorbin='${prefix}/libexec/perl${perl5.major}' \ -Dvendorman1dir='${prefix}/share/perl${perl5.major}/man/man1' \ -Dvendorman3dir='${prefix}/share/perl${perl5.major}/man/man3' \ -Dpager='/usr/bin/less -sR' \ -Dperlpath="${perl5.bin}" \ -Dstartperl="#!${perl5.bin}" \ {-Acppflags="$CPPFLAGS"} \ {-Accflags="$CFLAGS"} \ {-Aldflags="$LDFLAGS"} if {[variant_isset universal]} { post-configure { system "cd ${worksrcpath} && ed - ${worksrcpath}/config.h < ${filespath}/${perl5.major}/config.h.ed" } } post-build { reinplace -E {s/-arch [a-z0-9_]+//g} \ ${worksrcpath}/lib/Config_heavy.pl } test.run yes variant dtrace description {Build with DTrace probes} { configure.args-append -Dusedtrace } post-destroot { # avoid conflicting with other perl versions # perl5 creates unversioned symlinks delete ${destroot}${prefix}/bin/perl foreach binFile [glob -directory "${destroot}${prefix}/bin" *] { if {$binFile ne "${destroot}${prefix}/bin/perl${version}"} { move ${binFile} ${binFile}-${perl5.major} } } move ${destroot}${prefix}/bin/perl${version} ${destroot}${prefix}/bin/${subport} ln -s ${subport} ${destroot}${prefix}/bin/perl${version} foreach man1File [glob -directory "${destroot}${prefix}/share/man/man1p" *] { regexp (.*)(\.1.*) ${man1File} -> program suffix move ${man1File} ${program}-${perl5.major}${suffix} } foreach man3File [glob -directory "${destroot}${prefix}/share/man/man3p" *] { regexp (.*)(\.3.*) ${man3File} -> program suffix move ${man3File} ${program}-${perl5.major}${suffix} } } livecheck.type regex livecheck.url http://www.cpan.org/src livecheck.regex perl-(5\\.${minor}\\.\\d)\\. } } # wrapper port if {$subport eq $name} { description Wrapper port for Perl 5.x long_description ${description} supported_archs noarch perl5.require_variant yes perl5.conflict_variants yes perl5.branches 5.24 perl5.default_branch 5.24 perl5.create_variants ${perl5.branches} distfiles use_configure no build {} ## ## Note: the destroot section below currently uses lists of files ## to know what files to link. In the future we can use ## something like: ## set contents_list [registry_port_registered $portname]) ## to get the lists of binaries and man pages installed by ## the perl5.x ports. ## destroot { if {[file exists ${perl5.bin}]} { ln -s perl${perl5.major} ${destroot}${prefix}/bin/${name} ln -s perl${perl5.major} ${destroot}${prefix}/bin/perl } else { ui_error "Can't find perl ${perl5.major} (as ${perl5.bin}) so can't link $name to it." return -code error "perl${perl5.major} is missing" } # some binaries are not included in the list because they would conflict # with module ports: # config_data -> p5-module-build (ticket #24025) # corelist -> p5-module-corelist (ticket #28485) # instmodsh -> p5-extutils-makemaker (ticket #24590) # ptar, ptardiff -> p5-archive-tar (ticket #28255) # shasum -> p5-digest-sha (ticket #28580) foreach list {binList man1pList man3pList} { set fd [open ${filespath}/${list}]; set $list [read $fd]; close $fd } foreach binFile $binList { if {[file exists ${prefix}/bin/${binFile}-${perl5.major}]} { ln -s ${binFile}-${perl5.major} ${destroot}${prefix}/bin/${binFile} } } file mkdir ${destroot}${prefix}/share/man/man1p foreach manFile $man1pList { if {[file exists ${prefix}/share/man/man1p/${manFile}-${perl5.major}.1pm]} { ln -s ${manFile}-${perl5.major}.1pm ${destroot}${prefix}/share/man/man1p/${manFile}.1pm } } file mkdir ${destroot}${prefix}/share/man/man3p foreach manFile $man3pList { if {[file exists ${prefix}/share/man/man3p/${manFile}-${perl5.major}.3pm]} { ln -s ${manFile}-${perl5.major}.3pm ${destroot}${prefix}/share/man/man3p/${manFile}.3pm } } } livecheck.type none }