How to test a port file locally?

Joshua Root jmr at macports.org
Sun Jan 18 04:36:45 PST 2009


Jean-Michel Pouré wrote:
> Dear Friends,
> 
> Following a message on the list a few weeks ago, I was able to get
> access to a remote MacOsX computer via SSH. 
> 
> I plan to submit a set a packages to be able to build MLT and Kdenlive
> video editor to bring free tool to MacOsX users in the GNU philosophy.
> 
> First question about writing ports, that i did not find on
> http://guide.macports.org
> 
> Is there a way to test your portfile locally before submiting it? This
> reduces the risk for errors.

The easiest way for a single port is to cd to the directory containing
the Portfile. Then when you don't specify a port name on the command
line, port will use the one in the current directory. For example:

cd path/to/my_port
sudo port -v install

If there are dependencies on other ports that are not yet in the
official tree, you need to add a local repository. See:
<http://guide.macports.org/#development.local-repositories>

- Josh


More information about the macports-dev mailing list