96 | | === Step 7: '''Build the port''' === |
| 96 | === Step 7: '''Fix the Portfile''' === |
| 97 | |
| 98 | The 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: |
| 99 | |
| 100 | * 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. |
| 101 | {{{ |
| 102 | # Uncomment this line if you know there will be no arch-specific code: |
| 103 | #supported_archs noarch |
| 104 | }}} |
| 105 | |
| 106 | * Determine and add the correct license. There is a commented license line that is common to many perl ports. |
| 107 | {{{ |
| 108 | #license {Artistic-1 GPL} |
| 109 | }}} |
| 110 | |
| 111 | * 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. |
| 112 | {{{ |
| 113 | if {${perl5.major} != ""} { |
| 114 | depends_lib-append port:p${perl5.major}-digest-md5 \ |
| 115 | port:p${perl5.major}-io-compress |
| 116 | } |
| 117 | }}} |
| 118 | |
| 119 | * Check the appropriate perl versions supported by the port. At the time of writing, 5.28 is the current and only version in use. |
| 120 | {{{ |
| 121 | perl5.branches 5.28 |
| 122 | }}} |
| 123 | |
| 124 | |
| 125 | === Step 8: '''Build the port''' === |
144 | | === Step 8: '''Fix the Portfile''' === |
145 | | |
146 | | The 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: |
147 | | |
148 | | * 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. |
149 | | {{{ |
150 | | # Uncomment this line if you know there will be no arch-specific code: |
151 | | #supported_archs noarch |
152 | | }}} |
153 | | |
154 | | * Determine and add the correct license. There is a commented license line that is common to many perl ports. |
155 | | {{{ |
156 | | #license {Artistic-1 GPL} |
157 | | }}} |
158 | | |
159 | | * 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. |
160 | | {{{ |
161 | | if {${perl5.major} != ""} { |
162 | | depends_lib-append port:p${perl5.major}-digest-md5 \ |
163 | | port:p${perl5.major}-io-compress |
164 | | } |
165 | | }}} |
166 | | |
167 | | * Check the appropriate perl versions supported by the port. At the time of writing, 5.28 is the current and only version in use. |
168 | | {{{ |
169 | | perl5.branches 5.28 |
170 | | }}} |
171 | | |
172 | | |
173 | | If you make changes to the Portfile, remember to re-build it: |
174 | | {{{ |
175 | | $ cd ~/macports/perl/p5-timedate |
176 | | $ sudo port build |
177 | | }}} |
178 | | |