In either case, following the process described in <link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/books/porters-handbook/port-upgrading.html">Porter's Handbook</link> will yield the best results. (You might also wish to read <link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/articles/contributing/ports-contributing.html">Contributing to the FreeBSD Ports Collection</link>.)