Changes between Version 6 and Version 7 of howto/cpan2port


Ignore:
Timestamp:
Mar 10, 2014, 10:42:59 PM (7 years ago)
Author:
mf2k (Frank Schima)
Comment:

Add step about fixing the Portfile before submitting.

Legend:

Unmodified
Added
Removed
Modified
  • howto/cpan2port

    v6 v7  
    44
    55 * Audience: Perl users
    6  * Requires the following MacPorts perl ports: p5-list-moreutils p5-parse-cpan-meta p5-module-depends p5-cpan-meta-yaml
     6 * Requires the following MacPorts perl ports: p5-list-moreutils p5-parse-cpan-meta p5-module-depends p5-cpan-meta-yaml. Not that perl 5.16 is the default, you can install them as follows:
     7{{{
     8port install p5.16-list-moreutils p5.16-parse-cpan-meta p5.16-module-depends p5.16-cpan-meta-yaml
     9}}}
    710
    811== Introduction ==
     
    112115}}}
    113116
    114 === Step 7: '''Read up on local port repositories''' ===
     117=== Step 7: '''Fix the Portfile''' ===
     118
     119The Portfile as generated is in rough form and not ready for submission as a new or updated port. Please at least check and update the following in the Portfile:
     120
     121  * Check if the port compiles any files or is simply straight perl code. If the latter, then uncomment the following line and delete the comment above it. Otherwise delete the lines entirely.
     122{{{
     123# Uncomment this line if you know there will be no arch-specific code:
     124#supported_archs     noarch
     125}}}
     126
     127  * Determine and add the correct license. There is a commented license line that is common to many perl ports.
     128{{{
     129#license             {Artistic-1 GPL}
     130}}}
     131
     132  * Dependencies need to be put into an if block so that they only appear in the sub-ports, not the stub p5 port. See below as an example.
     133{{{
     134if {${perl5.major} != ""} {
     135    depends_lib-append  port:p${perl5.major}-digest-md5 \
     136                                      port:p${perl5.major}-io-compress
     137}
     138}}}
     139
     140  * Check the appropriate perl versions supported by the port. If the dependencies exist for perl 5.18, then add it too.
     141{{{
     142perl5.branches      5.8 5.10 5.12 5.14 5.16 5.18
     143}}}
     144
     145=== Step 8: '''Read up on local port repositories''' ===
    115146
    116147[http://guide.macports.org/chunked/development.local-repositories.html]