1 | # $Id$ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name perl5.12 |
---|
6 | conflicts perl5.8 perl5.10 |
---|
7 | version 5.12.0 |
---|
8 | revision 0 |
---|
9 | categories lang |
---|
10 | platforms darwin freebsd linux |
---|
11 | maintainers ricci openmaintainer |
---|
12 | description Perl 5.12.x - Practical Extraction and Report Language |
---|
13 | |
---|
14 | long_description \ |
---|
15 | Perl is a general-purpose programming language originally developed \ |
---|
16 | for text manipulation and now used for a wide range of tasks including \ |
---|
17 | system administration, web development, network programming, GUI \ |
---|
18 | development, and more. |
---|
19 | |
---|
20 | distname perl-${version} |
---|
21 | use_bzip2 yes |
---|
22 | homepage http://www.perl.org/ |
---|
23 | master_sites http://www.cpan.org/src/5.0/ |
---|
24 | |
---|
25 | checksums md5 3e15696f4160775a90f6b2fb3ccc98c2 \ |
---|
26 | sha1 f533687077e2da113b48a6c5e578f4a206fbf173 \ |
---|
27 | rmd160 10819912e62e14777942c482903f354170e73990 |
---|
28 | |
---|
29 | # patchfiles patch-Configure.diff patch-darwin.sh.diff |
---|
30 | |
---|
31 | #platform darwin { |
---|
32 | # patchfiles-append patch-hints_darwin.diff \ |
---|
33 | # patch-perl.c.diff |
---|
34 | #} |
---|
35 | |
---|
36 | pre-configure { |
---|
37 | reinplace "s|/opt/local|${prefix}|g" ${worksrcpath}/Configure |
---|
38 | } |
---|
39 | |
---|
40 | configure.ccache no |
---|
41 | configure.distcc no |
---|
42 | configure.env LC_ALL=C |
---|
43 | configure.cmd sh Configure |
---|
44 | configure.pre_args |
---|
45 | configure.universal_args-delete --disable-dependency-tracking |
---|
46 | configure.post_args \ |
---|
47 | -des \ |
---|
48 | -Dprefix='${prefix}' \ |
---|
49 | -Dscriptdir='${prefix}/bin' \ |
---|
50 | -Dcppflags="\${CPPFLAGS}" \ |
---|
51 | -Dccflags="\${CFLAGS}" \ |
---|
52 | -Dldflags="\${LDFLAGS}" \ |
---|
53 | -Dvendorprefix='${prefix}' \ |
---|
54 | -Dusemultiplicity=y \ |
---|
55 | -D cc=\${CC} \ |
---|
56 | -D ld=\${CC} \ |
---|
57 | -D man1ext='1pm' \ |
---|
58 | -D man3ext='3pm' \ |
---|
59 | -D man1dir='${prefix}/share/man/man1p' \ |
---|
60 | -D man3dir='${prefix}/share/man/man3p' \ |
---|
61 | -D siteman1dir='${prefix}/share/man/man1' \ |
---|
62 | -D siteman3dir='${prefix}/share/man/man3' \ |
---|
63 | -D vendorman1dir='${prefix}/share/man/man1' \ |
---|
64 | -D vendorman3dir='${prefix}/share/man/man3' \ |
---|
65 | -D pager="/usr/bin/less -sR" |
---|
66 | |
---|
67 | configure.ccache no |
---|
68 | |
---|
69 | if {[variant_isset universal]} { |
---|
70 | post-configure { |
---|
71 | system "cd ${worksrcpath} && ed - ${worksrcpath}/config.h < ${filespath}/config.h.ed" |
---|
72 | } |
---|
73 | } elseif {![info exists configure.ld_archflags]} { |
---|
74 | eval configure.ldflags-append ${configure.cc_archflags} |
---|
75 | } |
---|
76 | |
---|
77 | test.run yes |
---|
78 | |
---|
79 | variant threads description {Build with thread support} { |
---|
80 | configure.args-append -Dusethreads |
---|
81 | } |
---|
82 | |
---|
83 | variant shared description {Build shared perl library} { |
---|
84 | configure.args-append -Duseshrplib |
---|
85 | } |
---|
86 | |
---|
87 | variant dtrace description {Build with DTrace probes} { |
---|
88 | configure.args-append ‚àíDusedtrace |
---|
89 | } |
---|
90 | |
---|
91 | variant mangle_names description {mangle the installed names by appending -5.12 to avoid conflicting with perl5.8 and perl5.10} { |
---|
92 | conflicts-delete perl5.8 |
---|
93 | conflicts-delete perl5.10 |
---|
94 | post-destroot { |
---|
95 | file delete ${destroot}${prefix}/bin/perl |
---|
96 | set branch [join [lrange [split ${version} .] 0 1] .] |
---|
97 | foreach bin [glob ${destroot}${prefix}/bin/*] { |
---|
98 | if {$bin != "${destroot}${prefix}/bin/perl${version}"} { |
---|
99 | move ${bin} ${bin}-${branch} |
---|
100 | } |
---|
101 | } |
---|
102 | |
---|
103 | ln -s ${prefix}/bin/perl${version} ${destroot}${prefix}/bin/$name |
---|
104 | |
---|
105 | foreach man1File [glob ${destroot}${prefix}/share/man/man1p/*] { |
---|
106 | regexp (.*)(\.1.*) ${man1File} -> program suffix |
---|
107 | file rename ${man1File} ${program}-${branch}${suffix} |
---|
108 | } |
---|
109 | foreach man3File [glob ${destroot}${prefix}/share/man/man3p/*] { |
---|
110 | regexp (.*)(\.3.*) ${man3File} -> program suffix |
---|
111 | file rename ${man3File} ${program}-${branch}${suffix} |
---|
112 | } |
---|
113 | } |
---|
114 | } |
---|
115 | |
---|
116 | livecheck.type regex |
---|
117 | livecheck.url http://www.cpan.org/src |
---|
118 | livecheck.regex latest_[join [lrange [split ${version} .] 0 1] .]_is_(\\d+(?:\\.\\d+)*) |
---|
119 | |
---|
120 | |
---|