37 | | # Set some variables. |
38 | | set perl5.bin ${prefix}/bin/perl |
| 37 | # portfile configuration options |
| 38 | # perl5.branches: the major perl version supported by this module. A |
| 39 | # subport will be created for each. e.g. p5.12-foo, p5.10-foo, ... |
| 40 | # perl5.default_branch: the branch used when you request p5-foo |
| 41 | options perl5.default_branch perl5.branches |
| 42 | default perl5.default_branch 5.12 |
| 43 | default perl5.branches {"5.8 5.10 5.12 5.14"} |
94 | | configure.cmd ${perl5.bin} |
95 | | configure.env PERL_AUTOINSTALL=--skipdeps |
96 | | configure.pre_args Makefile.PL |
97 | | configure.args INSTALLDIRS=vendor |
98 | | |
99 | | test.run yes |
100 | | |
101 | | destroot.target pure_install |
102 | | |
103 | | post-destroot { |
104 | | fs-traverse file ${destroot}${perl5.lib} { |
105 | | if {[file tail ${file}] eq ".packlist"} { |
106 | | ui_info "Fixing packlist ${file}" |
107 | | reinplace "s|${destroot}||" ${file} |
| 103 | if {$subport == $name} { |
| 104 | distfiles |
| 105 | supported_archs noarch |
| 106 | replaced_by p[option perl5.default_branch]-[string tolower ${perl5.module}] |
| 107 | depends_lib port:p[option perl5.default_branch]-[string tolower ${perl5.module}] |
| 108 | use_configure no |
| 109 | build {} |
| 110 | destroot { |
| 111 | system "echo $name is a stub port > ${destroot}${prefix}/share/doc/${name}/README" |
| 112 | } |
| 113 | } else { |
| 114 | perl5.major [string range $subport 1 [expr [string first - $subport]-1]] |
| 115 | configure.cmd ${perl5.bin} |
| 116 | configure.env PERL_AUTOINSTALL=--skipdeps |
| 117 | configure.pre_args Makefile.PL |
| 118 | configure.args INSTALLDIRS=vendor |
| 119 | |
| 120 | test.run yes |
| 121 | |
| 122 | destroot.target pure_install |
| 123 | |
| 124 | post-destroot { |
| 125 | fs-traverse file ${destroot}${perl5.lib} { |
| 126 | if {[file tail ${file}] eq ".packlist"} { |
| 127 | ui_info "Fixing packlist ${file}" |
| 128 | reinplace "s|${destroot}||" ${file} |
| 129 | } |