wiki:MaintainingAPort

Version 2 (modified by boeyms@…, 17 years ago) (diff)

Add informal, draft instructions about how to update a port, as well as a comment about this being an informal and draft addition.

Source

To be removed once all major points in this email are covered.

	From: 	  john_owens@yahoo.com
	Subject: 	my first port - how to
	Date: 	10 December 2006 08:48:13 EST
	To: 	  macports-users@lists.macosforge.org

Greetings, I'm attempting to write my first port. Writing the portfile
is not too difficult, as there's lots of good examples. However,
actually making it install is a lot tougher.

I am making it work by:

- adding the portfile in the right place in /opt/local
- changing the portindex file to add the port info manually (and
  making up a number for it)

However, these things seem really kludgey. Is it not possible to
have a local portfile somewhere and install it using a command
line "port" command? That would seem much better, but I can't find
any documentation on how that's done. (For instance, there's a 
local "~/.portsrc" file? but I can't find any docs on it.)

I think this is the sort of thing that really ought to be on the
wiki - the barrier to entry of adding a portfile is really very
high, and a short guide would be helpful. What it should say:

- "So you've written a Portfile. Here's how you test it locally."
  - "Here's how you prevent it from being clobbered when you
     selfupdate."
  - "Here's where you put it if you're testing it locally, and want
    to leave it local for a while."
- "Your Portfile is awesome. It works. Here's how to add it to
  the MacPorts repository."
  - "... and here's how you update it."
- "Your Portfile probably has lots of dependencies. Here's how
  you tell what they are." 
- "Here are naming conventions for ports."

etc.

Especially the first one right now would be very useful for me.

JDO

Comments from boeyms@

I intend to get this written up properly some day, but in the meantime:

Updating a port

  • Set up an account on http://www.macports.org/ if you have not already done so. Follow the "Register" link on any MacPorts page (it appears visually in the top right corner).
  • Go to the Bug Reports page (you will be asked to log in if you have not done so already) and follow the "New Ticket" link (or go there directly).
  • Fill out the ticket in accordance with the guidelines in TracTicketing; note the fact that, as of this writing (6 May 2007), notification of a new ticket is not automatically sent to the assignee of a ticket, so you will need to put the assignee's address into the Cc: field by hand. As mentioned in TracTicketing, also add at least your own email address to the Cc: field so that you are notified about any comments on or changes to the ticket.
  • Preview your ticket (you won't be able to change its content after submission, only append to it), and then submit it if you are satisfied.
  • Attachments: you can add or replace these after the ticket has been submitted by using the "Attach File" button on the ticket once it has been created.