[MacPorts] howto/cpan2port modified

MacPorts noreply at macports.org
Mon Mar 10 15:43:01 PDT 2014


Page "howto/cpan2port" was changed by macsforever2000 at macports.org
Diff URL: <https://trac.macports.org/wiki/howto/cpan2port?action=diff&version=7>
Revision 7
Comment: Add step about fixing the Portfile before submitting. 
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: howto/cpan2port
=========================================================================
--- howto/cpan2port (version: 6)
+++ howto/cpan2port (version: 7)
@@ -3,7 +3,10 @@
 = How to create portfiles for CPAN Perl modules =
 
  * Audience: Perl users
- * Requires the following MacPorts perl ports: p5-list-moreutils p5-parse-cpan-meta p5-module-depends p5-cpan-meta-yaml
+ * 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:
+{{{
+port install p5.16-list-moreutils p5.16-parse-cpan-meta p5.16-module-depends p5.16-cpan-meta-yaml
+}}}
 
 == Introduction ==
 
@@ -111,7 +114,35 @@
 --->  Building p5-timedate
 }}}
 
-=== Step 7: '''Read up on local port repositories''' ===
+=== Step 7: '''Fix the Portfile''' ===
+
+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:
+
+  * 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. 
+{{{
+# Uncomment this line if you know there will be no arch-specific code:
+#supported_archs     noarch
+}}}
+
+  * Determine and add the correct license. There is a commented license line that is common to many perl ports. 
+{{{
+#license             {Artistic-1 GPL}
+}}}
+
+  * 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.
+{{{
+if {${perl5.major} != ""} {
+    depends_lib-append  port:p${perl5.major}-digest-md5 \
+                                      port:p${perl5.major}-io-compress
+}
+}}}
+
+  * Check the appropriate perl versions supported by the port. If the dependencies exist for perl 5.18, then add it too. 
+{{{
+perl5.branches      5.8 5.10 5.12 5.14 5.16 5.18
+}}}
+
+=== Step 8: '''Read up on local port repositories''' ===
 
 [http://guide.macports.org/chunked/development.local-repositories.html]
 
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/howto/cpan2port>
MacPorts <http://www.macports.org/>
Ports system for OS X

This is an automated message. Someone added your email address to be
notified of changes on 'howto/cpan2port' page.
If it was not you, please report to .


More information about the macports-changes mailing list