1 | # -*- 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 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name perl5.18 |
---|
7 | version 5.18.1 |
---|
8 | revision 0 |
---|
9 | set branch [join [lrange [split ${version} .] 0 1] .] |
---|
10 | categories lang |
---|
11 | license {Artistic-1 GPL} |
---|
12 | platforms darwin freebsd linux |
---|
13 | maintainers ricci openmaintainer |
---|
14 | description Perl 5.18.x - Practical Extraction and Report Language |
---|
15 | |
---|
16 | long_description \ |
---|
17 | Perl is a general-purpose programming language originally developed \ |
---|
18 | for text manipulation and now used for a wide range of tasks including \ |
---|
19 | system administration, web development, network programming, GUI \ |
---|
20 | development, and more. |
---|
21 | |
---|
22 | distname perl-${version} |
---|
23 | use_bzip2 yes |
---|
24 | homepage http://www.perl.org/ |
---|
25 | master_sites http://www.cpan.org/src/5.0/ |
---|
26 | |
---|
27 | checksums rmd160 015c4c617474e1f2716a8c1484c44852ab459b74 \ |
---|
28 | sha256 bf46c732c68fb160ea276b4b0cda26971646a206e31951abb8623a60f0ee5249 |
---|
29 | |
---|
30 | depends_lib-append port:gdbm |
---|
31 | |
---|
32 | pre-configure { |
---|
33 | reinplace "s|/opt/local|${prefix}|g" ${worksrcpath}/Configure |
---|
34 | } |
---|
35 | |
---|
36 | configure.ccache no |
---|
37 | configure.distcc no |
---|
38 | configure.env LC_ALL=C |
---|
39 | configure.cmd sh Configure |
---|
40 | configure.pre_args |
---|
41 | configure.universal_args-delete --disable-dependency-tracking |
---|
42 | configure.post_args \ |
---|
43 | -des \ |
---|
44 | -Dprefix='${prefix}' \ |
---|
45 | -Dscriptdir='${prefix}/bin' \ |
---|
46 | -Dcppflags="\${CPPFLAGS}" \ |
---|
47 | -Dccflags="\${CFLAGS}" \ |
---|
48 | -Dldflags="\${LDFLAGS}" \ |
---|
49 | -Dvendorprefix='${prefix}' \ |
---|
50 | -Dusemultiplicity=y \ |
---|
51 | -Dusethreads \ |
---|
52 | -Duseshrplib \ |
---|
53 | -D cc=\${CC} \ |
---|
54 | -D ld=\${CC} \ |
---|
55 | -D man1ext='1pm' \ |
---|
56 | -D man3ext='3pm' \ |
---|
57 | -D man1dir='${prefix}/share/man/man1p' \ |
---|
58 | -D man3dir='${prefix}/share/man/man3p' \ |
---|
59 | -D sitebin='${prefix}/libexec/perl${branch}/sitebin' \ |
---|
60 | -D siteman1dir='${prefix}/share/perl${branch}/siteman/man1' \ |
---|
61 | -D siteman3dir='${prefix}/share/perl${branch}/siteman/man3' \ |
---|
62 | -D vendorbin='${prefix}/libexec/perl${branch}' \ |
---|
63 | -D vendorman1dir='${prefix}/share/perl${branch}/man/man1' \ |
---|
64 | -D vendorman3dir='${prefix}/share/perl${branch}/man/man3' \ |
---|
65 | -D pager="/usr/bin/less -sR" \ |
---|
66 | -D perlpath="${prefix}/bin/perl${branch}" \ |
---|
67 | -D startperl="#!${prefix}/bin/perl${branch}" |
---|
68 | |
---|
69 | # Allow perl to find p5-* ports installed by previous (minor) versions |
---|
70 | set platsuffix "" |
---|
71 | if {${os.platform} == "darwin"} { |
---|
72 | set platsuffix "-2level" |
---|
73 | } |
---|
74 | configure.args-append "-D inc_version_list=\"5.18.0/${os.platform}-thread-multi${platsuffix} 5.18.0 \"" |
---|
75 | |
---|
76 | if {[variant_isset universal]} { |
---|
77 | post-configure { |
---|
78 | system "cd ${worksrcpath} && ed - ${worksrcpath}/config.h < ${filespath}/config.h.ed" |
---|
79 | } |
---|
80 | } |
---|
81 | |
---|
82 | post-build { |
---|
83 | reinplace -E {s|-arch [a-z0-9_]+||g} \ |
---|
84 | ${worksrcpath}/lib/Config_heavy.pl |
---|
85 | } |
---|
86 | |
---|
87 | test.run yes |
---|
88 | |
---|
89 | variant dtrace description {Build with DTrace probes} { |
---|
90 | configure.args-append -Dusedtrace |
---|
91 | } |
---|
92 | |
---|
93 | post-destroot { |
---|
94 | # avoid conflicting with other perl versions |
---|
95 | # perl5 creates unversioned symlinks |
---|
96 | delete ${destroot}${prefix}/bin/perl |
---|
97 | foreach binFile [glob -directory "${destroot}${prefix}/bin" *] { |
---|
98 | if {$binFile != "${destroot}${prefix}/bin/perl${version}"} { |
---|
99 | move ${binFile} ${binFile}-${branch} |
---|
100 | } |
---|
101 | } |
---|
102 | move ${destroot}${prefix}/bin/perl${version} ${destroot}${prefix}/bin/${name} |
---|
103 | ln -s ${name} ${destroot}${prefix}/bin/perl${version} |
---|
104 | foreach man1File [glob -directory "${destroot}${prefix}/share/man/man1p" *] { |
---|
105 | regexp (.*)(\.1.*) ${man1File} -> program suffix |
---|
106 | move ${man1File} ${program}-${branch}${suffix} |
---|
107 | } |
---|
108 | foreach man3File [glob -directory "${destroot}${prefix}/share/man/man3p" *] { |
---|
109 | regexp (.*)(\.3.*) ${man3File} -> program suffix |
---|
110 | move ${man3File} ${program}-${branch}${suffix} |
---|
111 | } |
---|
112 | } |
---|
113 | |
---|
114 | ## livecheck.type regex |
---|
115 | ## livecheck.url http://www.cpan.org/src |
---|
116 | ## livecheck.regex latest_[join [lrange [split ${version} .] 0 1] .]_is_(\\d+(?:\\.\\d+)*) |
---|
117 | |
---|
118 | livecheck.type regex |
---|
119 | livecheck.url http://www.cpan.org/src |
---|
120 | livecheck.regex {perl-(5\.18\.\d)\.} |
---|